[SCM] BOINC packaging branch, upstream, updated. upstream/7.0.38+dfsg

Gianfranco Costamagna costamagnagianfranco at yahoo.it
Sat Nov 3 13:28:31 UTC 2012


The following commit has been merged in the upstream branch:
commit 86fc3733334f5dece263e7798719e86e977ed033
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date:   Sat Nov 3 11:19:34 2012 +0100

    Imported Upstream version 7.0.38+dfsg

diff --git a/.vimrc b/.vimrc
new file mode 100644
index 0000000..94a5a51
--- /dev/null
+++ b/.vimrc
@@ -0,0 +1,10 @@
+set ai
+set ts=4
+set bs=1
+set cin
+set sts=4
+set sw=4
+set expandtab
+set smarttab
+set backspace=indent,eol,start
+syntax off
diff --git a/Makefile.am b/Makefile.am
index 818d59f..f74a363 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 25623 2012-04-30 21:06:39Z romw $
+## $Id$
 
 AUTOMAKE_OPTIONS = foreign
 
@@ -22,9 +22,9 @@ endif
 
 if ENABLE_MANAGER
    CLIENTGUI_SUBDIRS = clientgui locale
-#if BUILD_X11_SCREENSAVER
-#   CLIENTGUI_SUBDIRS += clientscr
-#endif
+if BUILD_X11_SCREENSAVER
+   CLIENTGUI_SUBDIRS += clientscr
+endif
 endif
 
 # ORDER MATTERS below.  One must build dependencies FIRST, then things
diff --git a/Makefile.incl b/Makefile.incl
index 49aabb5..537a0f9 100644
--- a/Makefile.incl
+++ b/Makefile.incl
@@ -1,5 +1,5 @@
 ## -*-Makefile -*-
-## $Id: Makefile.incl 25351 2012-02-28 06:57:28Z davea $
+## $Id$
 
 # Note: MYSQL_CFLAGS and MYSQL_LIBS set by configure from mysql_config
 
diff --git a/_autosetup b/_autosetup
index 990f6e3..775bc60 100755
--- a/_autosetup
+++ b/_autosetup
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-## $Id: _autosetup 19144 2009-09-23 17:16:24Z davea $
+## $Id$
 
 ## ---------- some portability checks/adjustments [stolen from configure] ----------
 ## 'echo -n' is not portable..
diff --git a/api/Makefile.am b/api/Makefile.am
index 7caf9e0..d720318 100644
--- a/api/Makefile.am
+++ b/api/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 26029 2012-08-16 17:42:54Z romw $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/api/boinc_api_fortran.cpp b/api/boinc_api_fortran.cpp
index a78bac5..0b02748 100644
--- a/api/boinc_api_fortran.cpp
+++ b/api/boinc_api_fortran.cpp
@@ -128,4 +128,4 @@ void boinc_zip_(int* zipmode, const char* zipfile,
 
 }   // extern "C"
 
-const char *BOINC_RCSID_4f5153609c = "$Id: boinc_api_fortran.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_4f5153609c = "$Id$";
diff --git a/api/graphics2_util.cpp b/api/graphics2_util.cpp
index fd58bf7..36fb3bf 100644
--- a/api/graphics2_util.cpp
+++ b/api/graphics2_util.cpp
@@ -35,7 +35,7 @@
 
 #ifdef __EMX__
 static key_t get_shmem_name(const char* prog_name) {
-    char cwd[256], path[256];
+    char cwd[MAXPATHLEN], path[MAXPATHLEN];
     boinc_getcwd(cwd);
     sprintf(path, "%s/init_data.xml", cwd);
     return ftok(path, 2);
@@ -54,7 +54,7 @@ static void get_shmem_name(const char* prog_name, char* shmem_name) {
 void* boinc_graphics_make_shmem(const char* prog_name, int size) {
 #ifdef _WIN32
     HANDLE shmem_handle;
-    char shmem_name[256];
+    char shmem_name[MAXPATHLEN];
     void* p;
     get_shmem_name(prog_name, shmem_name);
     shmem_handle = create_shmem(shmem_name, size, &p);
@@ -67,7 +67,7 @@ void* boinc_graphics_make_shmem(const char* prog_name, int size) {
     int retval = create_shmem(key, size, 0, &p);
 #else
     // V6 Unix/Linux/Mac applications always use mmap() shared memory for graphics communication
-    char shmem_name[256];
+    char shmem_name[MAXPATHLEN];
     get_shmem_name(prog_name, shmem_name);
     int retval = create_shmem_mmap(shmem_name, size, &p);
     // Graphics app may be run by a different user & group than worker app
@@ -82,7 +82,7 @@ void* boinc_graphics_make_shmem(const char* prog_name, int size) {
 #ifdef _WIN32
 void* boinc_graphics_get_shmem(const char* prog_name) {
     HANDLE shmem_handle;
-    char shmem_name[256];
+    char shmem_name[MAXPATHLEN];
     void* p;
     get_shmem_name(prog_name, shmem_name);
     shmem_handle = attach_shmem(shmem_name, &p);
@@ -100,7 +100,7 @@ void* boinc_graphics_get_shmem(const char* prog_name) {
     retval = attach_shmem(key, &p);
 #else
     // V6 Unix/Linux/Mac applications always use mmap() shared memory for graphics communication
-    char shmem_name[256];
+    char shmem_name[MAXPATHLEN];
     get_shmem_name(prog_name, shmem_name);
     retval = attach_shmem_mmap(shmem_name, &p);
 #endif
diff --git a/api/graphics_api.cpp b/api/graphics_api.cpp
index 238b823..62c3657 100644
--- a/api/graphics_api.cpp
+++ b/api/graphics_api.cpp
@@ -99,4 +99,4 @@ bool boinc_graphics_possible() {
     return true;
 }
 
-const char *BOINC_RCSID_b2ceed0813 = "$Id: graphics_api.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_b2ceed0813 = "$Id$";
diff --git a/api/graphics_data.cpp b/api/graphics_data.cpp
index 55f029a..35c2936 100644
--- a/api/graphics_data.cpp
+++ b/api/graphics_data.cpp
@@ -78,4 +78,4 @@ void GRAPHICS_DOUBLE_BUFFER::generate_done(GRAPHICS_BUFFER* b) {
     b->state = GB_STATE_GENERATED;
 }
 
-const char *BOINC_RCSID_ebfbd0f929 = "$Id: graphics_data.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_ebfbd0f929 = "$Id$";
diff --git a/api/graphics_impl.cpp b/api/graphics_impl.cpp
index c5c903f..ce35890 100644
--- a/api/graphics_impl.cpp
+++ b/api/graphics_impl.cpp
@@ -267,4 +267,4 @@ void get_window_title(APP_INIT_DATA& aid, char* buf, int len) {
     }
 }
 
-const char *BOINC_RCSID_6e92742852 = "$Id: graphics_impl.cpp 16726 2008-12-19 18:14:02Z davea $";
+const char *BOINC_RCSID_6e92742852 = "$Id$";
diff --git a/api/graphics_impl_lib.cpp b/api/graphics_impl_lib.cpp
index ac97322..0ab9b3c 100644
--- a/api/graphics_impl_lib.cpp
+++ b/api/graphics_impl_lib.cpp
@@ -51,4 +51,4 @@ void block_sigalrm() {
 }
 #endif
 
-const char *BOINC_RCSID_9886dee259 = "$Id: graphics_impl_lib.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_9886dee259 = "$Id$";
diff --git a/api/graphics_lib.cpp b/api/graphics_lib.cpp
index 1fcb1f2..fad2671 100644
--- a/api/graphics_lib.cpp
+++ b/api/graphics_lib.cpp
@@ -178,4 +178,4 @@ bool boinc_graphics_possible() {
     return true;
 }
 
-const char *BOINC_RCSID_93054c7e32 = "$Id: graphics_lib.cpp 20054 2010-01-01 02:50:56Z davea $";
+const char *BOINC_RCSID_93054c7e32 = "$Id$";
diff --git a/api/gutil.cpp b/api/gutil.cpp
index 1a3e251..c9023ba 100644
--- a/api/gutil.cpp
+++ b/api/gutil.cpp
@@ -729,7 +729,10 @@ tImageJPG *LoadJPG(const char *filename) {
 
 int TEXTURE_DESC::CreateTextureJPG(const char* strFileName) {
 	if(!strFileName) return -1;
-	tImageJPG *pImage = LoadJPG(strFileName);			// Load the image and store the data
+
+    // Load the image and store the data
+    //
+	tImageJPG *pImage = LoadJPG(strFileName);
 	if(pImage == NULL) return -1;
 	glPixelStorei(GL_UNPACK_ALIGNMENT,1);
 	glGenTextures(1, (GLuint*)&id);
@@ -740,12 +743,10 @@ int TEXTURE_DESC::CreateTextureJPG(const char* strFileName) {
     xsize = pImage->sizeX;
     ysize = pImage->sizeY;
 
-	if (pImage) {
-		if (pImage->data) {
-			free(pImage->data);
-		}
-		free(pImage);
-	}
+    if (pImage->data) {
+        free(pImage->data);
+    }
+    free(pImage);
 	return 0;
 }
 
diff --git a/api/static_graphics.cpp b/api/static_graphics.cpp
index e3a90e1..6f5085c 100644
--- a/api/static_graphics.cpp
+++ b/api/static_graphics.cpp
@@ -73,4 +73,4 @@ void app_graphics_resize(int w, int h) {
 void app_graphics_reread_prefs() {
 }
 
-const char *BOINC_RCSID_ebba08c46e = "$Id: static_graphics.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_ebba08c46e = "$Id$";
diff --git a/api/ttfont.cpp b/api/ttfont.cpp
index d4ee435..0bcf431 100644
--- a/api/ttfont.cpp
+++ b/api/ttfont.cpp
@@ -1,194 +1,194 @@
-// This file is part of BOINC.
-// http://boinc.berkeley.edu
-// Copyright (C) 2010 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
-
-
-// utility functions for TrueType font OpenGL graphics
-
-// FTGL OpenGL TrueType/FreeType font rendering
-// you will need to build & link against freetype2 and ftgl
-// tested using ftgl version 2.1.3 rc5 and freetype version 2.4.10
-
-// ftgl library:  http://sourceforge.net/projects/ftgl/files/FTGL%20Source/
-// freetype2 library:  http://www.freetype.org/
-
-// this should basically be a drop-in for the old boinc txf_* functions i.e.
-//  txf_load_fonts and txf_render_string, with extra options on the latter for rotating etc
-
-// originally adapted by Carl Christensen
-
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2010 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+
+// utility functions for TrueType font OpenGL graphics
+
+// FTGL OpenGL TrueType/FreeType font rendering
+// you will need to build & link against freetype2 and ftgl
+// tested using ftgl version 2.1.3 rc5 and freetype version 2.4.10
+
+// ftgl library:  http://sourceforge.net/projects/ftgl/files/FTGL%20Source/
+// freetype2 library:  http://www.freetype.org/
+
+// this should basically be a drop-in for the old boinc txf_* functions i.e.
+//  txf_load_fonts and txf_render_string, with extra options on the latter for rotating etc
+
+// originally adapted by Carl Christensen
+
 #if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_) 
 #include "boinc_win.h"
 #endif
-
-#include "boinc_gl.h"
-#include <FTGL/ftgl.h>
-
-#include "ttfont.h"
-#include "filesys.h"  // from boinc for file_exists
-
-// I put in it's own namespace so call TTFont::ttf_load_fonts() etc
-namespace TTFont {  
-
-// The Liberation version 2.00.0 fonts referenced below are free 
-// fonts under the SIL Open Font License version 1.1.  You can 
-// download the license and fonts from
-// https://fedorahosted.org/liberation-fonts
-//
-// Another source of free fonts is the GNU FreeFont project 
-// at http://www.gnu.org/software/freefont
-
-// you'll want to define a 2-d array of char as appropriate for your 
-// truetype font filenames (path is set in the call to ttf_load_fonts)
-static const char *g_cstrFont[] = {
-    "LiberationSans-Regular.ttf",       // 0, this is the default
-    "LiberationSans-Bold.ttf",          // 1
-    "LiberationSans-Italic.ttf",        // 2
-    "LiberationSans-BoldItalic.ttf",    // 3
-    "LiberationSerif-Regular.ttf",      // 4
-    "LiberationSerif-Bold.ttf",         // 5
-    "LiberationSerif-Italic.ttf",       // 6
-    "LiberationSerif-BoldItalic.ttf",   // 7
-    "LiberationMono-Regular.ttf",       // 8
-    "LiberationMono-Bold.ttf",          // 9
-    "LiberationMono-Italic.ttf",        // 10
-    "LiberationMono-BoldItalic.ttf"     // 11
-};
-    
-// define the number of fonts supported
-#define NUM_FONT (sizeof(g_cstrFont) / sizeof(char*))
-
-FTFont* g_font[NUM_FONT];
-int g_iFont = -1;
-
-// load fonts. call once.
-// pass in the font directory, and any special-scaling font name & size (e.g. if I want a huge typeface for Sans-Serif Regular then I pass in "LiberationSans-Regular.ttf", 3000)
-void ttf_load_fonts(const char* dir, const char* strScaleFont, const int& iScaleFont) {
-    static bool bInit = false; // flag so we don't call again, otherwise we'll have memory leaks each subsequent call to new FTTextureFont etc
-    if (bInit) return; // we've already been here
-    bInit = true; // we're in now!
-    ttf_cleanup();
-    memset(g_font, 0x00, sizeof(FTFont*) * NUM_FONT); // initialize to null's for error checking later
-    char vpath[MAXPATHLEN];
-    g_iFont = -1;
-    for (unsigned int i=0 ; i < NUM_FONT; i++){
-        sprintf(vpath, "%s/%s", dir, g_cstrFont[i]);
-        if (boinc_file_exists(vpath)) {
-            //g_font[i] = new FTBitmapFont(vpath);
-            //g_font[i] = new FTPixmapFont(vpath);
-            //g_font[i] = new FTPolygonFont(vpath);
-            g_font[i] = new FTTextureFont(vpath);
-            if(!g_font[i]->Error()) {
-#ifdef _DEBUG
-               fprintf(stderr, "Successfully loaded '%s'...\n", vpath);
-#endif
-                int iScale = 30;
-                if (strScaleFont && !strcmp(strScaleFont, g_cstrFont[i])) iScale = iScaleFont;
-                if(!g_font[i]->FaceSize(iScale))
-                {
-                    fprintf(stderr, "Failed to set size");
-                }
-
-                g_font[i]->Depth(3.);
-                g_font[i]->Outset(-.5f, 1.5f);
-
-                g_font[i]->CharMap(ft_encoding_unicode);
-                g_iFont = i;
-
-            }
-#ifdef _DEBUG
-             else {
-                fprintf(stderr, "Failed to load '%s'...\n", vpath);
-            }
-#endif
-        }
-    }  
-}
-
-// remove our objects?
-void ttf_cleanup()
-{
-    for (unsigned int i = 0; i < NUM_FONT; i++) {
-        if (g_font[i]) {
-            delete g_font[i];
-            g_font[i] = NULL;
-        }
-    }
-}
-
-
-void ttf_render_string(
-    const double& x,
-    const double& y,
-    const double& z,                // text position
-    const float& fscale,            // scale factor
-    const GLfloat* col,             // colour 4vf
-    const char* s,                  // string ptr
-    const int& iFont,               // font index
-    const float& fRotAngle,         // optional rotation angle
-    const float& fRotX,             // optional rotation vector for X
-    const float& fRotY,             // optional rotation vector for Y
-    const float& fRotZ,             // optional rotation vector for Z
-    const float& fRadius            // circular radius to draw along
-)
-{
-        // http://ftgl.sourceforge.net/docs/html/
-
-    // if requested font isn't available, find first one that is
-    //
-    unsigned int theFont = iFont;
-    while((theFont < NUM_FONT) && !g_font[theFont]) theFont++;
-	if((theFont >= NUM_FONT) || !g_font[theFont]) {
-        // bad font index
-        return;
-    }
-
-    int renderMode = FTGL::RENDER_FRONT; //ALL; //FRONT | FTGL::FTGL_RENDER_BACK;
-
-    glColor4fv(col);
-    glPushMatrix();
-
-    glTranslated(x, y, z);
-    glScaled(1.0f / fscale, 1.0f / fscale, 1.0f / fscale);
-    glEnable(GL_TEXTURE_2D);
-
-    if (fRotAngle != 0.0f) {
-        glRotatef(fRotAngle, fRotX, fRotY, fRotZ);
-    }
-
-    if (fRadius == 0.0f) {
-        g_font[theFont]->Render(s, -1, FTPoint(), FTPoint(), renderMode);
-    }
-    else {
-        int i = 0;
-        float fAdvance = 1.0f;
-        while ( *(s+i) ) {
-            fAdvance = g_font[theFont]->Advance((s+i), 1, FTPoint());
-            g_font[theFont]->Render((s+i), 1, FTPoint(), FTPoint(), renderMode);
-            glTranslated(fAdvance, 0.0f, 0.0f);
-            glRotatef(fRadius * fAdvance / (float) 20.0f, 0.0f, 0.0f, 1.0f);
-            i++;
-        }
-    }
-
-    glDisable(GL_TEXTURE_2D);
-
-    glPopMatrix();
-}
-
-}   // namespace
-
-
+
+#include "boinc_gl.h"
+#include <FTGL/ftgl.h>
+
+#include "ttfont.h"
+#include "filesys.h"  // from boinc for file_exists
+
+// I put in it's own namespace so call TTFont::ttf_load_fonts() etc
+namespace TTFont {  
+
+// The Liberation version 2.00.0 fonts referenced below are free 
+// fonts under the SIL Open Font License version 1.1.  You can 
+// download the license and fonts from
+// https://fedorahosted.org/liberation-fonts
+//
+// Another source of free fonts is the GNU FreeFont project 
+// at http://www.gnu.org/software/freefont
+
+// you'll want to define a 2-d array of char as appropriate for your 
+// truetype font filenames (path is set in the call to ttf_load_fonts)
+static const char *g_cstrFont[] = {
+    "LiberationSans-Regular.ttf",       // 0, this is the default
+    "LiberationSans-Bold.ttf",          // 1
+    "LiberationSans-Italic.ttf",        // 2
+    "LiberationSans-BoldItalic.ttf",    // 3
+    "LiberationSerif-Regular.ttf",      // 4
+    "LiberationSerif-Bold.ttf",         // 5
+    "LiberationSerif-Italic.ttf",       // 6
+    "LiberationSerif-BoldItalic.ttf",   // 7
+    "LiberationMono-Regular.ttf",       // 8
+    "LiberationMono-Bold.ttf",          // 9
+    "LiberationMono-Italic.ttf",        // 10
+    "LiberationMono-BoldItalic.ttf"     // 11
+};
+    
+// define the number of fonts supported
+#define NUM_FONT (sizeof(g_cstrFont) / sizeof(char*))
+
+FTFont* g_font[NUM_FONT];
+int g_iFont = -1;
+
+// load fonts. call once.
+// pass in the font directory, and any special-scaling font name & size (e.g. if I want a huge typeface for Sans-Serif Regular then I pass in "LiberationSans-Regular.ttf", 3000)
+void ttf_load_fonts(const char* dir, const char* strScaleFont, const int& iScaleFont) {
+    static bool bInit = false; // flag so we don't call again, otherwise we'll have memory leaks each subsequent call to new FTTextureFont etc
+    if (bInit) return; // we've already been here
+    bInit = true; // we're in now!
+    ttf_cleanup();
+    memset(g_font, 0x00, sizeof(FTFont*) * NUM_FONT); // initialize to null's for error checking later
+    char vpath[MAXPATHLEN];
+    g_iFont = -1;
+    for (unsigned int i=0 ; i < NUM_FONT; i++){
+        sprintf(vpath, "%s/%s", dir, g_cstrFont[i]);
+        if (boinc_file_exists(vpath)) {
+            //g_font[i] = new FTBitmapFont(vpath);
+            //g_font[i] = new FTPixmapFont(vpath);
+            //g_font[i] = new FTPolygonFont(vpath);
+            g_font[i] = new FTTextureFont(vpath);
+            if(!g_font[i]->Error()) {
+#ifdef _DEBUG
+               fprintf(stderr, "Successfully loaded '%s'...\n", vpath);
+#endif
+                int iScale = 30;
+                if (strScaleFont && !strcmp(strScaleFont, g_cstrFont[i])) iScale = iScaleFont;
+                if(!g_font[i]->FaceSize(iScale))
+                {
+                    fprintf(stderr, "Failed to set size");
+                }
+
+                g_font[i]->Depth(3.);
+                g_font[i]->Outset(-.5f, 1.5f);
+
+                g_font[i]->CharMap(ft_encoding_unicode);
+                g_iFont = i;
+
+            }
+#ifdef _DEBUG
+             else {
+                fprintf(stderr, "Failed to load '%s'...\n", vpath);
+            }
+#endif
+        }
+    }  
+}
+
+// remove our objects?
+void ttf_cleanup()
+{
+    for (unsigned int i = 0; i < NUM_FONT; i++) {
+        if (g_font[i]) {
+            delete g_font[i];
+            g_font[i] = NULL;
+        }
+    }
+}
+
+
+void ttf_render_string(
+    const double& x,
+    const double& y,
+    const double& z,                // text position
+    const float& fscale,            // scale factor
+    const GLfloat* col,             // colour 4vf
+    const char* s,                  // string ptr
+    const int& iFont,               // font index
+    const float& fRotAngle,         // optional rotation angle
+    const float& fRotX,             // optional rotation vector for X
+    const float& fRotY,             // optional rotation vector for Y
+    const float& fRotZ,             // optional rotation vector for Z
+    const float& fRadius            // circular radius to draw along
+)
+{
+        // http://ftgl.sourceforge.net/docs/html/
+
+    // if requested font isn't available, find first one that is
+    //
+    unsigned int theFont = iFont;
+    while((theFont < NUM_FONT) && !g_font[theFont]) theFont++;
+	if((theFont >= NUM_FONT) || !g_font[theFont]) {
+        // bad font index
+        return;
+    }
+
+    int renderMode = FTGL::RENDER_FRONT; //ALL; //FRONT | FTGL::FTGL_RENDER_BACK;
+
+    glColor4fv(col);
+    glPushMatrix();
+
+    glTranslated(x, y, z);
+    glScaled(1.0f / fscale, 1.0f / fscale, 1.0f / fscale);
+    glEnable(GL_TEXTURE_2D);
+
+    if (fRotAngle != 0.0f) {
+        glRotatef(fRotAngle, fRotX, fRotY, fRotZ);
+    }
+
+    if (fRadius == 0.0f) {
+        g_font[theFont]->Render(s, -1, FTPoint(), FTPoint(), renderMode);
+    }
+    else {
+        int i = 0;
+        float fAdvance = 1.0f;
+        while ( *(s+i) ) {
+            fAdvance = g_font[theFont]->Advance((s+i), 1, FTPoint());
+            g_font[theFont]->Render((s+i), 1, FTPoint(), FTPoint(), renderMode);
+            glTranslated(fAdvance, 0.0f, 0.0f);
+            glRotatef(fRadius * fAdvance / (float) 20.0f, 0.0f, 0.0f, 1.0f);
+            i++;
+        }
+    }
+
+    glDisable(GL_TEXTURE_2D);
+
+    glPopMatrix();
+}
+
+}   // namespace
+
+
diff --git a/api/windows_opengl.cpp b/api/windows_opengl.cpp
index 12d4f7e..0242367 100644
--- a/api/windows_opengl.cpp
+++ b/api/windows_opengl.cpp
@@ -538,4 +538,4 @@ void win_graphics_event_loop() {
     SetEvent(hQuitEvent);        // Signal the worker thread that we're quitting
 }
 
-const char *BOINC_RCSID_462f482d81 = "$Id: windows_opengl.cpp 25393 2012-03-08 22:42:44Z davea $";
+const char *BOINC_RCSID_462f482d81 = "$Id$";
diff --git a/api/x_opengl.cpp b/api/x_opengl.cpp
index 057cab2..4e9cee0 100644
--- a/api/x_opengl.cpp
+++ b/api/x_opengl.cpp
@@ -673,4 +673,4 @@ void xwin_graphics_event_loop() {
 }
 
 
-const char *BOINC_RCSID_c457a14644 = "$Id: x_opengl.cpp 25906 2012-07-30 19:37:51Z romw $";
+const char *BOINC_RCSID_c457a14644 = "$Id$";
diff --git a/apps/1sec.cpp b/apps/1sec.cpp
index 56eccfa..4c88b1f 100644
--- a/apps/1sec.cpp
+++ b/apps/1sec.cpp
@@ -35,4 +35,4 @@ int main() {
     fclose(f);
 }
 
-const char *BOINC_RCSID_afc4016a8b = "$Id: 1sec.cpp 16068 2008-09-26 18:10:10Z davea $";
+const char *BOINC_RCSID_afc4016a8b = "$Id$";
diff --git a/apps/Makefile.am b/apps/Makefile.am
index 7fa90f5..858f403 100644
--- a/apps/Makefile.am
+++ b/apps/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 18378 2009-06-11 16:11:45Z davea $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/apps/concat.cpp b/apps/concat.cpp
index c4e04cc..4c24576 100644
--- a/apps/concat.cpp
+++ b/apps/concat.cpp
@@ -151,4 +151,4 @@ int main(int argc, char** argv) {
     return 0;
 }
 
-const char *BOINC_RCSID_8254ea59c3 = "$Id: concat.cpp 16068 2008-09-26 18:10:10Z davea $";
+const char *BOINC_RCSID_8254ea59c3 = "$Id$";
diff --git a/apps/error.cpp b/apps/error.cpp
index 2be4a4b..57bff23 100644
--- a/apps/error.cpp
+++ b/apps/error.cpp
@@ -35,4 +35,4 @@ int main() {
     fprintf(stderr, "APP: upper_case ending, wrote %d chars\n", n);
 }
 
-const char *BOINC_RCSID_130fd0309d = "$Id: error.cpp 16068 2008-09-26 18:10:10Z davea $";
+const char *BOINC_RCSID_130fd0309d = "$Id$";
diff --git a/apps/upper_case.cpp b/apps/upper_case.cpp
index 9629691..7852eba 100644
--- a/apps/upper_case.cpp
+++ b/apps/upper_case.cpp
@@ -305,5 +305,5 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR Args, int WinMode
 }
 #endif
 
-const char *BOINC_RCSID_33ac47a071 = "$Id: upper_case.cpp 23710 2011-06-12 20:58:43Z davea $";
+const char *BOINC_RCSID_33ac47a071 = "$Id$";
 
diff --git a/checkin_notes b/checkin_notes
index 65c4077..99b36c3 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -4342,7 +4342,6 @@ David  20 Aug 2012
     client/
         gpu_nvidia.cpp
 
-<<<<<<< .working
 Charlie 8 Sep 2012
     - client: work around a nasty bug which crashes OSX (!) on some 
         dual-gpu MacBooks with CUDA installed if we call cuInit() 
@@ -4425,3 +4424,315 @@ Rom    12 Sept 2012
     /
         configure.ac
         version.h
+
+Rom    13 Sept 2012
+    - client: Initialize the total mem size_t.
+    
+    client/
+        gpu_nvidia.cpp
+
+Rom    26 Oct 2012
+    - WINSETUP: Add the account manager auth logic from the 6.8 installer to current
+        generation installers.
+    - WINSETUP: Make whether or not to create start menu items configurable via the
+        command line.  Useful for mass deployment installs.
+
+    win_build\installerv2\
+        BOINC.ism
+        BOINCx64.ism
+
+David  19 Sept 2012
+    - Client/manager: if a GPU app is suspended because a GPU-exclusive
+        app is running, show an appropriate message.
+
+    clientgui/
+        sg_TaskPanel.cpp
+        MainDOcument.cpp
+    lib/
+        gui_rpc_client_ops.cpp
+        gui_rpc_client.h
+
+David  19 Sept 2012
+    - client: message tweak
+    client/
+        app.cpp
+        cs_prefs.cpp
+
+David  20 Sept 2012
+    - A bunch of tweaks from Steffen Moller, e.g. using MAXPATHLEN
+
+    various files
+
+Charlie 21 Sep 2012
+    - Mac: Fix build breaks introduced by above changes; path_to_error 
+        arg is modified by CheckNestedDirectories() so can't be const.
+
+    client/
+        check_security.cpp
+
+David  21 Sept 2012
+    - client: MAXPATHLEN tweak
+
+    client/
+        app.cpp
+
+David  21 Sept 2012
+    - Manager: fix "exclusive GPU app running" message logic.
+
+    clientgui/
+        MainDocument.cpp
+
+David  11 Oct 2012
+    - client and API: improve the way an app checks for the death of the client
+        Old: heartbeat mechanism
+        Problem: if the client is blocked for > 30 secs
+            (e.g. because it takes a long time to write the state file,
+            of because it's stopped in a debugger)
+            then apps exit.
+            This is bad is the app doesn't checkpoint and has been
+            running for a long time.
+        New: the client passes its PID to the app.
+            The app periodically (10 sec) checks that the process still exists.
+        Notes:
+        - For backward compatibility (e.g. new API w/ old client,
+            or vice versa) the client still sends heartbeats,
+            and the API checks heartbeats if the client doesn't pass a PID.
+        - The new mechanism works only if the client's PID isn't assigned
+            to a new process within 10 secs of the client exiting.
+            Windows 2000 reuses PIDs immediately, so check for Win2K
+            and don't use this mechanism if so.
+
+    TODO: For Unix multithread apps,
+        critical sections aren't currently being enforced.
+        Need to fix this by masking signals.
+
+    client/
+        hostinfo_win.cpp
+        app_start.cpp
+    lib/
+        app_ipc.cpp,h
+        proc_control.cpp
+
+David  11 Oct 2012
+	- Win compile fixes.
+		For now, include psapi.lib in various project properties.
+		Try to figure out a different way.
+
+	client/
+		app_start.cpp
+	lib/
+		boinc_win.h
+	win_build/
+		various .proj files
+
+Charlie 15 Oct 2012
+    - MGR: We don't save Simple View's width & height since it's 
+        window is not resizable, so don't try to read them back.
+    
+    clientgui/
+        BOINCGUIApp.cpp
+
+Charlie 17 Oct 2012
+    - MGR: Add Control-Shift_E shortcut (Command-Shift-E on Mac) to show Event 
+        Log in Simple View, for the convenience of tech suppport volunteers.
+    
+    clientgui/
+        sg_BoincSimpleFrame.cpp,.h
+
+David  17 Oct 2012
+    - client: maintain current and previous uptime,
+        and include them in scheduler RPC request.
+    
+    Note: this is to support a future feature where the scheduler will
+        send non-checkpointing jobs only clients likely to be able
+        to complete them.
+
+    client/
+        client_state.cpp,h
+        cs_scheduler.cpp
+        cs_statefile.cpp
+    lib/
+        gui_rpc_client_ops.cpp
+
+David  17 Oct 2012
+    - tweaks
+
+    client/
+        async_file.cpp
+    lib/
+        filesys.cpp,h
+    samples/atiopencl/
+        atiopencl.cpp
+
+Charlie 18 Oct 2012
+    - MGR: Fix bug which can cause Manager to quit when started in Simple View.
+    
+    clientgui/
+        sg_TaskPanel.cpp
+
+Rom    19 Oct 2012
+    - Add missing references to psapi.lib for various build configurations.
+
+    win_build\
+        boinc_ss.vcproj
+        example_app_multi_thread.vcproj
+        sleeper.vcproj
+        uc2.vcproj
+        uc2_graphics.vcproj
+        vboxwrapper.vcproj
+        wrapper.vcproj
+
+Charlie 18 Oct 2012
+    - lib: don't clear entire APP_VERSION struct in APP_VERSION::parse_coproc().
+    
+    lib/
+        gui_rpc_client_ops.cpp
+
+David  19 Oct 2012
+    - client: change work fetch policy to avoid starving GPUs
+        in situations where GPU exclusions are used.
+    - client: fix bug in round-robin simulation when GPU exclusions are used.
+
+    Note: this fixes a major problem (starvation)
+        with project-level GPU exclusion.
+        However, project-level GPU exclusion interferes with most of
+        the client's scheduling policies.
+        E.g., round-robin simulation doesn't take GPU exclusion into account,
+        and the resulting completion estimates and device shortfalls
+        can be wrong by an order of magnitude.
+
+        The only way I can see to fix this would be to model each
+        GPU instance as a separate resource,
+        and to associate each job with a particular GPU instance.
+        This would be a sweeping change in both client and server.
+
+    client/
+        log_flags.cpp
+        project.cpp,h
+        rr_sim.cpp
+        work_fetch.cpp,h
+    lib/
+        coproc.h
+
+Rom    22 Oct 2012
+    - SCR: Fix bug in X11 screensaver.
+      (From Michael Tughan)
+      
+    clientscr/
+        screensaver_x11.cpp
+
+Rom    23 Oct 2012
+    - SCR: Fix bug in X11 screensaver.
+      (From David Cross)
+      
+    clientscr/
+        screensaver_x11.cpp
+
+David  24 Oct 2012
+    - client: if an app's finish file has existed for 10 seconds, kill it;
+        it must be hung in boinc_finish().
+        This behavior has been seen with LHC at home and maybe other projects.
+
+    client/
+        app.cpp,h
+        cpp_control.cpp
+
+David  28 Oct 2012
+    - client: fix bug in handling proxy info in cc_config.file
+
+    client/
+        log_flags.cpp
+
+David  28 Oct 2012
+    - client: if exiting because of exit_after_finished flag,
+        write state file before exiting so we don't restart the job later.
+
+    client/
+        app.cpp
+        app_control.cpp
+
+David  28 Oct 2012
+    - client, Unix: make Curl sockets close-on-exec,
+        so that app processes don't inherit them.
+    - client: fix bug that makes client exit if a slot dir contains
+        finish file on startup
+
+    client/
+        app_control.cpp
+        http_curl.cpp
+
+David  29 Oct 2012
+    - GUI RPC: expose TIME_STATS info (e.g. on_frac) in
+        the binding of the get_state() RPC
+    - client: move client_start_time and previous_uptime
+        from CLIENT_STATE to TIME_STATS,
+        so that these are also visible in GUI RPC
+    - client: condition an RR simulation message on <rrsim_detail>
+
+    client/
+        client_state.cpp,h
+        cs_prefs.cpp
+        cs_scheduler.cpp
+        cs_statefile.cpp
+        rr_sim.cpp
+        time_stats.cpp,h
+    lib/
+        common_defs.h
+        gui_rpc_client.h
+        gui_rpc_client_ops.cpp
+        gui_rpc_client_print.cpp
+
+David  31 Oct 2012
+    - client: message tweaks for failed app startup
+
+    client/
+        app_start.cpp
+        client_state.cpp
+
+David  1 Nov 2012
+	- client/manager: move the conditional define of MAXPATHLEN
+		from boinc_win.h to filesys.h,
+		so that the client will hopefully build on Hurd,
+		which doesn't define MAXPATHLEN.
+
+	client/
+		http_curl.cpp
+	lib/
+		boinc_win.h
+		common_defs.h
+		filesys.h
+		gui_rpc_client.h
+
+David  1 Nov 2012
+    - fix a few unlikely but possible file-descriptor leaks
+
+    client/
+        cs_scheduler.cpp
+    lib/
+        cert_sig.cpp
+        mem_usage.cpp
+
+David  1 Nov 2012
+    - client: in checking reasons for not requesting work,
+        look at backoff last.
+        Otherwise the user can get a misleading message if they
+        update a project that's backed off
+
+    client/
+        work_fetch.cpp
+
+Rom    2 Nov 2012
+    - Tag for 7.0.37 release, all platforms
+      client_release_7_0_37
+
+    /
+        configure.ac
+        version.h
+
+Rom    2 Nov 2012
+    - Tag for 7.0.38 release, all platforms
+      client_release_7.0.38
+
+    /
+        configure.ac
+        version.h
diff --git a/client/Makefile.am b/client/Makefile.am
index 56194f3..cd58311 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 25782 2012-06-22 02:10:29Z charlief $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/client/Makefile.curl.am b/client/Makefile.curl.am
index 3d2303d..a96d3a6 100644
--- a/client/Makefile.curl.am
+++ b/client/Makefile.curl.am
@@ -1,5 +1,5 @@
 ## -*- mode: make; tab-width: 4 -*-
-## $Id: Makefile.curl.am 16069 2008-09-26 18:20:24Z davea $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/client/app.cpp b/client/app.cpp
index fae19c5..6e28172 100644
--- a/client/app.cpp
+++ b/client/app.cpp
@@ -131,6 +131,7 @@ ACTIVE_TASK::ACTIVE_TASK() {
     strcpy(web_graphics_url, "");
     strcpy(remote_desktop_addr, "");
     async_copy = NULL;
+    finish_file_time = 0;
 }
 
 // preempt this task;
@@ -231,6 +232,7 @@ void ACTIVE_TASK::cleanup_task() {
 #endif
 
     if (config.exit_after_finish) {
+        gstate.write_state_file();
         exit(0);
     }
 }
@@ -300,8 +302,9 @@ void ACTIVE_TASK_SET::get_memory_usage() {
     int retval;
     static bool first = true;
     static double last_cpu_time;
+    double diff=0;
 
-    double diff = gstate.now - last_mem_time;
+    diff = gstate.now - last_mem_time;
     if (diff < 0 || diff > MEMORY_USAGE_PERIOD + 10) {
         // user has changed system clock,
         // or there has been a long system sleep
@@ -413,7 +416,7 @@ void ACTIVE_TASK_SET::get_memory_usage() {
 // Move it from slot dir to project dir
 //
 int ACTIVE_TASK::move_trickle_file() {
-    char project_dir[256], new_path[MAXPATHLEN], old_path[MAXPATHLEN];
+    char project_dir[MAXPATHLEN], new_path[MAXPATHLEN], old_path[MAXPATHLEN];
     int retval;
 
     get_project_dir(result->project, project_dir, sizeof(project_dir));
@@ -886,7 +889,7 @@ void ACTIVE_TASK_SET::report_overdue() {
 //
 int ACTIVE_TASK::handle_upload_files() {
     std::string filename;
-    char buf[256], path[MAXPATHLEN];
+    char buf[MAXPATHLEN], path[MAXPATHLEN];
     int retval;
 
     DirScanner dirscan(slot_dir);
diff --git a/client/app.h b/client/app.h
index 557d91e..ca86325 100644
--- a/client/app.h
+++ b/client/app.h
@@ -112,7 +112,7 @@ struct ACTIVE_TASK {
     double bytes_received;
     char slot_dir[256];
         // directory where process runs (relative)
-    char slot_path[512];
+    char slot_path[MAXPATHLEN];
         // same, absolute
         // This is used only to run graphics apps
         // (that way don't have to worry about top-level dirs
@@ -154,6 +154,9 @@ struct ACTIVE_TASK {
     char web_graphics_url[256];
     char remote_desktop_addr[256];
     ASYNC_COPY* async_copy;
+    double finish_file_time;
+        // time when we saw finish file in slot dir.
+        // Used to kill apps that hang after writing finished file
 
     void set_task_state(int, const char*);
     inline int task_state() {
diff --git a/client/app_control.cpp b/client/app_control.cpp
index 7012a96..86e6d35 100644
--- a/client/app_control.cpp
+++ b/client/app_control.cpp
@@ -120,6 +120,23 @@ bool ACTIVE_TASK_SET::poll() {
         }
     }
 
+    // Check for finish files every 10 sec.
+    // If we already found a finish file, kill the app;
+    // it must be hung somewhere in boinc_finish();
+    //
+    static double last_finish_check_time = 0;
+    if (gstate.now - last_finish_check_time > 10) {
+        last_finish_check_time = gstate.now;
+        for (i=0; i<active_tasks.size(); i++) {
+            ACTIVE_TASK* atp = active_tasks[i];
+            if (atp->task_state() == PROCESS_UNINITIALIZED) continue;
+            if (atp->finish_file_time) {
+                atp->kill_task(false);
+            } else if (atp->finish_file_present()) {
+                atp->finish_file_time = gstate.now;
+            }
+        }
+    }
     if (action) {
         gstate.set_client_state_dirty("ACTIVE_TASK_SET::poll");
     }
@@ -520,10 +537,6 @@ void ACTIVE_TASK::handle_exited_app(int stat) {
 
     cleanup_task();
 
-    if (config.exit_after_finish) {
-        exit(0);
-    }
-
     if (!will_restart) {
         copy_output_files();
         int retval = read_stderr_file();
@@ -621,6 +634,8 @@ void ACTIVE_TASK_SET::send_heartbeats() {
     }
 }
 
+// send queued process-control messages; check for timeout
+//
 void ACTIVE_TASK_SET::process_control_poll() {
     unsigned int i;
     ACTIVE_TASK* atp;
diff --git a/client/app_start.cpp b/client/app_start.cpp
index 21b7399..50ee4cf 100644
--- a/client/app_start.cpp
+++ b/client/app_start.cpp
@@ -218,6 +218,17 @@ void ACTIVE_TASK::init_app_init_data(APP_INIT_DATA& aid) {
     relative_to_absolute("", aid.boinc_dir);
     strcpy(aid.authenticator, wup->project->authenticator);
     aid.slot = slot;
+#ifdef _WIN32
+    if (strstr(gstate.host_info.os_name, "Windows 2000")) {
+        // Win2K immediately reuses PIDs, so can't use this mechanism
+        //
+        aid.client_pid = 0;
+    } else {
+        aid.client_pid = GetCurrentProcessId();
+    }
+#else
+    aid.client_pid = getpid();
+#endif
     strcpy(aid.wu_name, wup->name);
     strcpy(aid.result_name, result->name);
     aid.user_total_credit = wup->project->user_total_credit;
@@ -507,7 +518,8 @@ int ACTIVE_TASK::start() {
             if (fip) {
                 snprintf(
                     buf, sizeof(buf),
-                    "Input file %s missing or invalid: %d", fip->name, retval
+                    "Input file %s missing or invalid: %s",
+                    fip->name, boincerror(retval)
                 );
             } else {
                 strcpy(buf, "Input file missing or invalid");
@@ -542,7 +554,7 @@ int ACTIVE_TASK::start() {
     init_app_init_data(aid);
     retval = write_app_init_file(aid);
     if (retval) {
-        sprintf(buf, "Can't write init file: %d", retval);
+        sprintf(buf, "Can't write init file: %s", boincerror(retval));
         goto error;
     }
 
@@ -785,7 +797,7 @@ int ACTIVE_TASK::start() {
     //
     retval = chdir(slot_dir);
     if (retval) {
-        sprintf(buf, "Can't change directory: %s", slot_dir, boincerror(retval));
+        sprintf(buf, "Can't change directory to %s: %s", slot_dir, boincerror(retval));
         goto error;
     }
 
@@ -807,7 +819,7 @@ int ACTIVE_TASK::start() {
     sprintf(buf, "../../%s", exec_path );
     pid = spawnv(P_NOWAIT, buf, argv);
     if (pid == -1) {
-        sprintf(buf, "Process creation failed: %s\n", buf, boincerror(retval));
+        sprintf(buf, "Process creation failed: %s\n", boincerror(retval));
         chdir(current_dir);
         retval = ERR_EXEC;
         goto error;
@@ -1051,7 +1063,7 @@ error:
     // Verify it to trigger another download.
     //
     gstate.input_files_available(result, true);
-    gstate.report_result_error(*result, "couldn't start %s: %d", buf, retval);
+    gstate.report_result_error(*result, "couldn't start app: %s", buf);
     if (log_flags.task_debug) {
         msg_printf(wup->project, MSG_INFO,
             "[task] couldn't start app: %s", buf
diff --git a/client/app_stats_mac.cpp b/client/app_stats_mac.cpp
new file mode 100644
index 0000000..8ce8960
--- /dev/null
+++ b/client/app_stats_mac.cpp
@@ -0,0 +1,713 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+// This file is adapted from code originally supplied by Apple Computer, Inc. 
+// The Berkeley Open Infrastructure for Network Computing project has modified 
+// the original code and made additions as of September 22, 2006.  The original 
+// Apple Public Source License statement appears below:
+
+/*
+ * Copyright (c) 2002-2004 Apple Computer, Inc.  All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+// app_stats_mac.C
+//
+
+// #define _DEBUG 1
+
+// Put a safety limit on recursion
+#define MAX_DESCENDANT_LEVEL 4
+
+// Totals for non_BOINC processes are not useful because most OSs don't
+// move idle processes out of RAM, so physical memory is always full
+#define GET_NON_BOINC_INFO 0
+
+// We don't need swap space info because
+// http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/Articles/AboutMemory.html says:
+//     Unlike most UNIX-based operating systems, Mac OS X does not use a 
+//     preallocated swap partition for virtual memory. Instead, it uses all
+//     of the available space on the machineÕs boot partition.
+// However, the associated overhead is not significant if we are examining 
+// only BOINC descendant processes.
+#define GET_SWAP_SIZE 1
+
+// The overhead for getting CPU times is not significant if we are 
+// examining only BOINC descendant processes.
+#define GET_CPU_TIMES 1
+
+
+#include <cerrno>
+#include <sys/types.h>
+#include <mach/shared_memory_server.h>
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <sys/sysctl.h>
+
+#include "procinfo.h"
+
+using std::vector;
+
+static int get_boinc_proc_info(int my_pid, int boinc_pid);
+static int build_proc_list (vector<PROCINFO>& pi, int boinc_pid);
+static void output_child_totals(PROCINFO& pinfo);
+static boolean_t appstats_task_update(task_t a_task, vector<PROCINFO>& piv);
+static void find_all_descendants(vector<PROCINFO>& piv, int pid, int rlvl);
+static void add_child_totals(PROCINFO& pi, vector<PROCINFO>& piv, int pid, int rlvl);
+//static void add_others(PROCINFO&, std::vector<PROCINFO>&);
+static void sig_pipe(int signo);
+
+#ifdef _DEBUG
+static void print_procinfo(PROCINFO& pinfo);
+static void vm_size_render(unsigned long long a_size);
+#endif
+
+// BOINC helper application to get info about each of the BOINC Client's 
+// child processes (including all its descendants) and also totals for 
+// all other processes. 
+// On the Mac, much of this information is accessible only by the super-user, 
+// so this helper application must be run setuid root. 
+
+int main(int argc, char** argv) {
+    int boinc_pid, my_pid;
+    int retval;
+    char buf[256];
+    
+    if (geteuid() != 0)             // This must be run setuid root
+        return EACCES;
+
+    my_pid = getpid();
+    boinc_pid = getppid();          // Assumes we were called by BOINC client
+
+    if (argc == 2)
+        boinc_pid = atoi(argv[1]);  // Pass in any desired valid pid for testing
+
+    if (signal(SIGPIPE, sig_pipe) == SIG_ERR) {
+        fprintf(stderr, "signal error");
+        return 0;
+    }
+    
+    setbuf(stdin, 0);
+    setbuf(stdout, 0);
+    
+    while (1) {
+        if (fgets(buf, sizeof(buf), stdin) == NULL)
+            return 0;
+        
+        if (feof(stdin))
+            return 0;
+
+        retval = get_boinc_proc_info(my_pid, boinc_pid);
+    }
+    
+    return 0;
+}
+
+static int get_boinc_proc_info(int my_pid, int boinc_pid) {    
+    int retval;
+    vector<PROCINFO> piv;
+    PROCINFO child_total;
+    unsigned int i;
+    
+
+    retval = build_proc_list(piv, boinc_pid);
+    if (retval)
+        return retval;
+
+    for (i=0; i<piv.size(); i++) {
+        PROCINFO& p = piv[i];
+        if (p.parentid == boinc_pid) {
+            if (p.id == my_pid)
+                continue;
+            
+            child_total = p;
+            p.is_boinc_app = true;
+#ifdef _DEBUG
+            printf("\n\nSumming info for process %d and its children:\n", child_total.id);
+            print_procinfo(child_total);
+#endif
+            // look for child processes
+         add_child_totals(child_total, piv, p.id, 0);
+#ifdef _DEBUG
+            printf("Totals for process %d and its children:\n", child_total.id);
+#endif
+            output_child_totals(child_total);
+        }
+    }
+    
+    memset(&child_total, 0, sizeof(child_total));
+#if 0
+#ifdef _DEBUG
+    printf("\n\nSumming info for all other processes\n");
+#endif
+    add_others(child_total, piv);
+#endif
+    output_child_totals(child_total);   // zero pid signals end of data
+    
+    return 0;
+}
+
+
+static void output_child_totals(PROCINFO& pinfo) {
+    printf("%d %d %.0lf %.0lf %lu %lf %lf\n", 
+                pinfo.id, pinfo.parentid, pinfo.working_set_size, pinfo.swap_size, 
+                pinfo.page_fault_count, pinfo.user_time, pinfo.kernel_time);
+//    fflush(stdout);
+}
+
+static int build_proc_list (vector<PROCINFO>& pi, int boinc_pid) {
+    boolean_t               retval = FALSE;
+    kern_return_t           error;
+        mach_port_t             appstats_port;
+    processor_set_t         *psets, pset;
+    task_t                  *tasks;
+    unsigned                i, j, pcnt, tcnt;
+        PROCINFO                pinfo;
+    int                     pid, mib[4];
+    struct kinfo_proc    kinfo;
+    size_t            kinfosize;
+        
+    appstats_port = mach_host_self();
+
+        // First, get a list of all tasks / processes
+
+    error = host_processor_sets(appstats_port, &psets, &pcnt);
+    if (error != KERN_SUCCESS) {
+        fprintf(stderr,
+            "Error in host_processor_sets(): %s",
+            mach_error_string(error));
+        retval = TRUE;
+        goto RETURN;
+    }
+
+    for (i = 0; i < pcnt; i++) {
+                if (retval)
+                        break;
+                
+        error = host_processor_set_priv(appstats_port, psets[i], &pset);
+        if (error != KERN_SUCCESS) {
+            fprintf(stderr, 
+                "Error in host_processor_set_priv(): %s",
+                mach_error_string(error));
+            retval = TRUE;
+            break;
+        }
+
+        error = processor_set_tasks(pset, &tasks, &tcnt);
+        if (error != KERN_SUCCESS) {
+            fprintf(stderr,
+                "Error in processor_set_tasks(): %s",
+                mach_error_string(error));
+            retval = TRUE;
+            break;
+        }
+
+        for (j = 0; j < tcnt; j++) {
+                        if (retval)
+                                break;
+                        
+                        memset(&pinfo, 0, sizeof(PROCINFO));
+
+                        /* Get pid for this task. */
+                        error = pid_for_task(tasks[j], &pid);
+                        if (error != KERN_SUCCESS) {
+                                /* Not a process, or the process is gone. */
+                                continue;
+                        }
+                        
+                        // Get parent pid for each process
+                        /* Get kinfo structure for this task. */
+                        kinfosize = sizeof(struct kinfo_proc);
+                        mib[0] = CTL_KERN;
+                        mib[1] = KERN_PROC;
+                        mib[2] = KERN_PROC_PID;
+                        mib[3] = pid;
+
+                        if (sysctl(mib, 4, &kinfo, &kinfosize, NULL, 0) == -1) {
+                                fprintf(stderr,
+                                    "%s(): Error in sysctl(): %s", __FUNCTION__,
+                                    strerror(errno));
+                                retval = TRUE;
+                                break;
+                        }
+
+                        if (kinfo.kp_proc.p_stat == 0) {
+                                /* Zombie process. */
+                                continue;
+                        }
+
+                        pinfo.id = pid;
+                        pinfo.parentid = kinfo.kp_eproc.e_ppid;
+
+                        pi.push_back(pinfo);
+                }
+        }
+        
+#if ! GET_NON_BOINC_INFO
+        // Next, find all BOINC's decendants and mark them for further study
+        if (! retval)
+                find_all_descendants(pi, boinc_pid, 0);
+#endif
+        
+        // Now get the process information for each descendant
+    for (i = 0; i < pcnt; i++) {
+        for (j = 0; j < tcnt; j++) {
+                        if (! retval)
+                            if (appstats_task_update(tasks[j], pi)) {
+                                    retval = TRUE;
+                                    goto RETURN;
+                            }
+
+            /* Delete task port if it isn't our own. */
+            if (tasks[j] != mach_task_self()) {
+                mach_port_deallocate(mach_task_self(),
+                    tasks[j]);
+            }
+        }
+
+        error = vm_deallocate((vm_map_t)mach_task_self(),
+            (vm_address_t)tasks, tcnt * sizeof(task_t));
+        if (error != KERN_SUCCESS) {
+                        if (!retval)
+                                fprintf(stderr,
+                                    "Error in vm_deallocate(): %s",
+                                    mach_error_string(error));
+            retval = TRUE;
+            goto RETURN;
+        }
+        if ((error = mach_port_deallocate(mach_task_self(),
+             pset)) != KERN_SUCCESS
+            || (error = mach_port_deallocate(mach_task_self(),
+            psets[i])) != KERN_SUCCESS) {
+                        if (!retval)
+                                fprintf(stderr,
+                                    "Error in mach_port_deallocate(): %s",
+                                    mach_error_string(error));
+            retval = TRUE;
+            goto RETURN;
+        }
+    }
+
+    error = vm_deallocate((vm_map_t)mach_task_self(),
+        (vm_address_t)psets, pcnt * sizeof(processor_set_t));
+    if (error != KERN_SUCCESS) {
+                if (!retval)
+                        fprintf(stderr,
+                            "Error in vm_deallocate(): %s",
+                            mach_error_string(error));
+        retval = TRUE;
+        goto RETURN;
+    }
+
+    RETURN:
+    return retval;
+
+}
+
+/* Update statistics for task a_task. */
+static boolean_t appstats_task_update(task_t a_task, vector<PROCINFO>& piv)
+{
+    boolean_t        retval;
+    kern_return_t        error;
+    mach_msg_type_number_t    count;
+    task_basic_info_data_t    ti;
+    vm_address_t        address;
+    mach_port_t        object_name;
+    vm_region_top_info_data_t info;
+    vm_size_t        size;
+    thread_array_t        thread_table;
+    unsigned int        table_size;
+    thread_basic_info_t    thi;
+    thread_basic_info_data_t thi_data;
+    unsigned        i;
+    task_events_info_data_t    events;
+        vm_size_t               vsize, rsize;
+        PROCINFO                *pinfo;
+        int                     pid;
+        
+    /* Get pid for this task. */
+    error = pid_for_task(a_task, &pid);
+    if (error != KERN_SUCCESS) {
+        /* Not a process, or the process is gone. */
+        retval = FALSE;
+        goto GONE;
+    }
+        
+        for (i=0; i<piv.size(); i++) {
+                pinfo = &piv[i];
+                if (pinfo->id == pid)
+                        break;
+        }
+
+        if (pinfo->id != pid) {
+        fprintf(stderr, "pid %d missing from list\n", pid);
+        retval = FALSE;
+        goto RETURN;
+    }
+        
+#if ! GET_NON_BOINC_INFO
+        if (!pinfo->is_boinc_app) {
+        retval = FALSE;
+        goto RETURN;
+    }
+#endif        
+    /*
+     * Get task_info, which is used for memory usage and CPU usage
+     * statistics.
+     */
+    count = TASK_BASIC_INFO_COUNT;
+    error = task_info(a_task, TASK_BASIC_INFO, (task_info_t)&ti, &count);
+    if (error != KERN_SUCCESS) {
+        retval = FALSE;
+        goto GONE;
+    }
+
+    /*
+     * Get memory usage statistics.
+     */
+
+    /*
+     * Set rsize and vsize; they require no calculation.  (Well, actually,
+     * we adjust vsize if traversing memory objects to not include the
+     * globally shared text and data regions).
+     */
+         rsize = ti.resident_size;
+#if GET_SWAP_SIZE
+         vsize = ti.virtual_size;
+            /*
+             * Iterate through the VM regions of the process and determine
+             * the amount of memory of various types it has mapped.
+             */
+            for (address = 0; ; address += size) {
+                    /* Get memory region. */
+                    count = VM_REGION_TOP_INFO_COUNT;
+                    if (vm_region(a_task, &address, &size,
+                        VM_REGION_TOP_INFO, (vm_region_info_t)&info, &count,
+                        &object_name) != KERN_SUCCESS) {
+                            /* No more memory regions. */
+                            break;
+                    }
+
+                    if (address >= GLOBAL_SHARED_TEXT_SEGMENT
+                        && address < (GLOBAL_SHARED_DATA_SEGMENT
+                        + SHARED_DATA_REGION_SIZE)) {
+                            /* This region is private shared. */
+
+                            /*
+                             * Check if this process has the globally shared
+                             * text and data regions mapped in.  If so, adjust
+                             * virtual memory size and exit loop.
+                             */
+                            if (info.share_mode == SM_EMPTY) {
+                                    vm_region_basic_info_data_64_t    b_info;
+
+                                    count = VM_REGION_BASIC_INFO_COUNT_64;
+                                    if (vm_region_64(a_task, &address,
+                                        &size, VM_REGION_BASIC_INFO,
+                                        (vm_region_info_t)&b_info, &count,
+                                        &object_name) != KERN_SUCCESS) {
+                                            break;
+                                    }
+
+                                    if (b_info.reserved) {
+                                        vsize -= (SHARED_TEXT_REGION_SIZE + SHARED_DATA_REGION_SIZE);
+                                        break;
+                                    }
+                            }
+                }
+        }
+#else
+        vsize = 0;
+#endif      // GET_SWAP_SIZE
+        pinfo->working_set_size = rsize;
+    pinfo->swap_size = vsize;
+
+    /*
+     * Get CPU usage statistics.
+     */
+
+        pinfo->user_time = (double)ti.user_time.seconds + (((double)ti.user_time.microseconds)/1000000.);
+        pinfo->kernel_time = (double)ti.system_time.seconds + (((double)ti.system_time.microseconds)/1000000.);
+
+    /* Get number of threads. */
+    error = task_threads(a_task, &thread_table, &table_size);
+    if (error != KERN_SUCCESS) {
+        retval = FALSE;
+        goto RETURN;
+    }
+
+#if GET_CPU_TIMES
+    /* Iterate through threads and collect usage stats. */
+    thi = &thi_data;
+    for (i = 0; i < table_size; i++) {
+        count = THREAD_BASIC_INFO_COUNT;
+        if (thread_info(thread_table[i], THREAD_BASIC_INFO,
+            (thread_info_t)thi, &count) == KERN_SUCCESS) {
+            if ((thi->flags & TH_FLAGS_IDLE) == 0) {
+                            pinfo->user_time += (double)thi->user_time.seconds + (((double)thi->user_time.microseconds)/1000000.);
+                            pinfo->kernel_time += (double)thi->system_time.seconds + (((double)thi->system_time.microseconds)/1000000.);
+            }
+        }
+        if (a_task != mach_task_self()) {
+            if ((error = mach_port_deallocate(mach_task_self(),
+                thread_table[i])) != KERN_SUCCESS) {
+                fprintf(stderr, 
+                    "Error in mach_port_deallocate(): %s",
+                    mach_error_string(error));
+                retval = TRUE;
+                goto RETURN;
+            }
+        }
+    }
+    if ((error = vm_deallocate(mach_task_self(), (vm_offset_t)thread_table,
+        table_size * sizeof(thread_array_t)) != KERN_SUCCESS)) {
+        fprintf(stderr,
+            "Error in vm_deallocate(): %s",
+            mach_error_string(error));
+        retval = TRUE;
+        goto RETURN;
+    }
+#endif GET_CPU_TIMES
+
+    /*
+     * Get event counters.
+     */
+
+    count = TASK_EVENTS_INFO_COUNT;
+    if (task_info(a_task, TASK_EVENTS_INFO,
+        (task_info_t)&events, &count) != KERN_SUCCESS) {
+        /* Error. */
+        retval = FALSE;
+        goto RETURN;
+    } else {
+            pinfo->page_fault_count = events.pageins;
+        }
+
+    retval = FALSE;
+    RETURN:
+    GONE:
+        
+    return retval;
+}
+
+// Scan the process table marking all the decendants of the parent 
+// process. Loop thru entire table as the entries aren't in order.  
+// Recurse at most 5 times to get additional child processes. 
+//
+static void find_all_descendants(vector<PROCINFO>& piv, int pid, int rlvl) {
+    unsigned int i;
+
+    if (rlvl > MAX_DESCENDANT_LEVEL) {
+        return;
+    }
+    for (i=0; i<piv.size(); i++) {
+        PROCINFO& p = piv[i];
+        if (p.parentid == pid) {
+            p.is_boinc_app = true;
+            // look for child process of this one
+            find_all_descendants(piv, p.id, rlvl+1); // recursion - woo hoo!
+        }
+    }
+}
+
+// Scan the process table adding in CPU time and mem usage. Loop
+// thru entire table as the entries aren't in order.  Recurse at
+// most 4 times to get additional child processes 
+//
+static void add_child_totals(PROCINFO& pi, vector<PROCINFO>& piv, int pid, int rlvl) {
+    unsigned int i;
+
+    if (rlvl > (MAX_DESCENDANT_LEVEL - 1)) {
+        return;
+    }
+    for (i=0; i<piv.size(); i++) {
+        PROCINFO& p = piv[i];
+        if (p.parentid == pid) {
+            pi.kernel_time += p.kernel_time;
+            pi.user_time += p.user_time;
+            pi.swap_size += p.swap_size;
+            pi.working_set_size += p.working_set_size;
+            pi.page_fault_count += p.page_fault_count;
+            p.is_boinc_app = true;
+#ifdef _DEBUG
+            print_procinfo(p);
+#endif
+            // look for child process of this one
+            add_child_totals(pi, piv, p.id, rlvl+1); // recursion - woo hoo!
+        }
+    }
+}
+
+#if 0
+static void add_others(PROCINFO& pi, vector<PROCINFO>& piv) {
+    unsigned int i;
+
+    memset(&pi, 0, sizeof(pi));
+    for (i=0; i<piv.size(); i++) {
+        PROCINFO& p = piv[i];
+        if (!p.is_boinc_app) {
+            pi.kernel_time += p.kernel_time;
+            pi.user_time += p.user_time;
+            pi.swap_size += p.swap_size;
+            pi.working_set_size += p.working_set_size;
+            pi.page_fault_count += p.page_fault_count;
+            p.is_boinc_app = true;
+#ifdef _DEBUG
+            print_procinfo(p);
+#endif
+        }
+    }
+}
+#endif
+
+static void sig_pipe(int signo)
+{
+    exit(1);
+}
+
+#ifdef _DEBUG
+static void print_procinfo(PROCINFO& pinfo) {
+    unsigned long long rsize, vsize;
+    
+    rsize = (unsigned long long)pinfo.working_set_size;
+    vsize = (unsigned long long)pinfo.swap_size;
+    printf("pid=%d, ppid=%d, rm=%llu=", pinfo.id, pinfo.parentid, rsize);
+    vm_size_render(rsize);
+    printf("=, vm=%llu=", vsize);
+    vm_size_render(vsize);
+    printf(", pageins=%lu, usertime=%lf, systime=%lf\n", pinfo.page_fault_count, pinfo.user_time, pinfo.kernel_time);
+}
+
+/*
+ * Render a memory size in units of B, K, M, or G, depending on the value.
+ *
+ * a_size is ULL, since there are places where VM sizes are capable of
+ * overflowing 32 bits, particularly when VM stats are multiplied by the
+ * pagesize.
+ */
+static void vm_size_render(unsigned long long a_size)
+{
+    if (a_size < 1024) {
+        /* 1023B. */
+        printf("%4lluB", a_size);
+    } else if (a_size < (1024ULL * 1024ULL)) {
+        /* K. */
+        if (a_size < 10ULL * 1024ULL) {
+            /* 9.99K */
+            printf("%1.2fK",
+                ((double)a_size) / 1024);
+        } else if (a_size < 100ULL * 1024ULL) {
+            /* 99.9K */
+            printf("%2.1fK",
+                ((double)a_size) / 1024);
+        } else {
+            /* 1023K */
+            printf("%4lluK",
+                a_size / 1024ULL);
+        }
+    } else if (a_size < (1024ULL * 1024ULL * 1024ULL)) {
+        /* M. */
+        if (a_size < 10ULL * 1024ULL * 1024ULL) {
+            /* 9.99M */
+            printf("%1.2fM",
+                ((double)a_size) / (1024 * 1024));
+        } else if (a_size < 100ULL * 1024ULL * 1024ULL) {
+            /* 99.9M */
+            printf("%2.1fM",
+                ((double)a_size) / (1024 * 1024));
+        } else {
+            /* 1023M */
+            printf("%4lluM",
+                a_size / (1024ULL * 1024ULL));
+        }
+    } else if (a_size < (1024ULL * 1024ULL * 1024ULL * 1024ULL)) {
+        /* G. */
+        if (a_size < 10ULL * 1024ULL * 1024ULL * 1024ULL) {
+            /* 9.99G. */
+            printf("%1.2fG",
+                ((double)a_size) / (1024 * 1024 * 1024));
+        } else if (a_size < 100ULL * 1024ULL * 1024ULL * 1024ULL) {
+            /* 99.9G. */
+            printf("%2.1fG",
+                ((double)a_size) / (1024 * 1024 * 1024));
+        } else {
+            /* 1023G */
+            printf("%4lluG",
+                a_size / (1024ULL * 1024ULL * 1024ULL));
+        }
+    } else if (a_size < (1024ULL * 1024ULL * 1024ULL * 1024ULL)) {
+        /* T. */
+        if (a_size < 10ULL * 1024ULL * 1024ULL * 1024ULL * 1024ULL) {
+            /* 9.99T. */
+            printf("%1.2fT",
+                 ((double)a_size) /
+                 (1024ULL * 1024ULL * 1024ULL * 1024ULL));
+        } else if (a_size < (100ULL * 1024ULL * 1024ULL * 1024ULL
+                     * 1024ULL)) {
+            /* 99.9T. */
+            printf("%2.1fT",
+                 ((double)a_size) /
+                 (1024ULL * 1024ULL * 1024ULL * 1024ULL));
+        } else {
+            /* 1023T */
+            printf("%4lluT",
+                 a_size /
+                 (1024ULL * 1024ULL * 1024ULL * 1024ULL));
+        }
+    } else {
+        /* P. */
+        if (a_size < (10ULL * 1024ULL * 1024ULL * 1024ULL * 1024ULL
+                  * 1024ULL)) {
+            /* 9.99P. */
+            printf("%1.2fP",
+                 ((double)a_size) /
+                 (1024ULL * 1024ULL * 1024ULL * 1024ULL
+                  * 1024ULL));
+        } else if (a_size < (100ULL * 1024ULL * 1024ULL * 1024ULL
+                     * 1024ULL)) {
+            /* 99.9P. */
+            printf("%2.1fP",
+                 ((double)a_size) /
+                 (1024ULL * 1024ULL * 1024ULL * 1024ULL
+                  * 1024ULL));
+        } else {
+            /* 1023P */
+            printf("%4lluP",
+                 a_size /
+                 (1024ULL * 1024ULL * 1024ULL * 1024ULL
+                  * 1024ULL));
+        }
+    }
+}
+#endif  // _DEBUG
diff --git a/client/async_file.cpp b/client/async_file.cpp
index 7067ef9..3fe3e9b 100644
--- a/client/async_file.cpp
+++ b/client/async_file.cpp
@@ -90,8 +90,8 @@ int ASYNC_COPY::copy_chunk() {
     unsigned char buf[BUFSIZE];
     int retval;
 
-    int n = fread(buf, 1, BUFSIZE, in);
-    if (n <= 0) {
+    size_t n = fread(buf, 1, BUFSIZE, in);
+    if (n == 0) {
         // copy done.  rename temp file
         //
         fclose(in);
@@ -122,7 +122,7 @@ int ASYNC_COPY::copy_chunk() {
         }
         return 1;       // tell caller we're done
     } else {
-        int m = fwrite(buf, 1, n, out);
+        size_t m = fwrite(buf, 1, n, out);
         if (m != n) {
             error(ERR_FWRITE);
             return 1;
diff --git a/client/check_security.cpp b/client/check_security.cpp
index e9daee3..b52062f 100644
--- a/client/check_security.cpp
+++ b/client/check_security.cpp
@@ -39,10 +39,11 @@
 bool IsUserInGroupBM();
 #endif
 
-static int CheckNestedDirectories(char * basepath, int depth, 
-                                    int use_sandbox, int isManager, 
-                                    char * path_to_error
-                                );
+static int CheckNestedDirectories(
+    char * basepath, int depth, 
+    int use_sandbox, int isManager, 
+    char * path_to_error
+);
 
 #if (! defined(__WXMAC__) && ! defined(_MAC_INSTALLER))
 static char * PersistentFGets(char *buf, size_t buflen, FILE *f);
@@ -500,7 +501,7 @@ saverName[2] = "Progress Thru Processors";
 }
 
 
-static int CheckNestedDirectories(char * basepath, int depth, 
+static int CheckNestedDirectories(char * basepath, int depth,
                                     int use_sandbox, int isManager, 
                                     char * path_to_error
                                 ) {
diff --git a/client/client_state.cpp b/client/client_state.cpp
index ad38a4e..64b0e03 100644
--- a/client/client_state.cpp
+++ b/client/client_state.cpp
@@ -300,7 +300,6 @@ int CLIENT_STATE::init() {
 
     srand((unsigned int)time(0));
     now = dtime();
-    client_start_time = now;
     scheduler_op->url_random = drand();
 
     notices.init();
@@ -1654,7 +1653,7 @@ int CLIENT_STATE::report_result_error(RESULT& res, const char* format, ...) {
     vsnprintf(err_msg, sizeof(err_msg), format, va);
     va_end(va);
 
-    sprintf(buf, "Unrecoverable error for task %s (%s)", res.name, err_msg);
+    sprintf(buf, "Unrecoverable error for task %s", res.name);
 #ifndef SIM
     scheduler_op->backoff(res.project, buf);
 #endif
diff --git a/client/client_state.h b/client/client_state.h
index 87b6187..ba895ee 100644
--- a/client/client_state.h
+++ b/client/client_state.h
@@ -92,7 +92,7 @@ struct CLIENT_STATE {
     GET_PROJECT_LIST_OP get_project_list_op;
     ACCT_MGR_OP acct_mgr_op;
 
-    TIME_STATS time_stats;
+    CLIENT_TIME_STATS time_stats;
     GLOBAL_PREFS global_prefs;
     NET_STATS net_stats;
     ACTIVE_TASK_SET active_tasks;
@@ -185,7 +185,6 @@ struct CLIENT_STATE {
         // this affects auto-update
     bool run_by_updater;
     double now;
-    double client_start_time;
     double last_wakeup_time;
     bool initialized;
     bool cant_write_state_file;
diff --git a/client/client_types.h b/client/client_types.h
index 0832e26..51cabf4 100644
--- a/client/client_types.h
+++ b/client/client_types.h
@@ -36,6 +36,7 @@
 #include "hostinfo.h"
 #include "coproc.h"
 #include "miofile.h"
+#include "filesys.h"
 #include "common_defs.h"
 #include "cc_config.h"
 
diff --git a/client/cs_prefs.cpp b/client/cs_prefs.cpp
index 8fb3aa7..ce3d670 100644
--- a/client/cs_prefs.cpp
+++ b/client/cs_prefs.cpp
@@ -144,7 +144,7 @@ void CLIENT_STATE::get_disk_shares() {
     if (log_flags.disk_usage_debug) {
         msg_printf(0, MSG_INFO,
             "[disk_usage] allowed %.2fMB used %.2fMB",
-            allowed, total_disk_usage
+            allowed/MEGA, total_disk_usage/MEGA
         );
     }
     for (i=0; i<projects.size(); i++) {
@@ -169,7 +169,7 @@ int CLIENT_STATE::check_suspend_processing() {
         return SUSPEND_REASON_BENCHMARKS;
     }
 
-    if (config.start_delay && now < client_start_time + config.start_delay) {
+    if (config.start_delay && now < time_stats.client_start_time + config.start_delay) {
         return SUSPEND_REASON_INITIAL_DELAY;
     }
 
diff --git a/client/cs_scheduler.cpp b/client/cs_scheduler.cpp
index c596836..133172e 100644
--- a/client/cs_scheduler.cpp
+++ b/client/cs_scheduler.cpp
@@ -369,6 +369,7 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
         fprintf(f, "<client_opaque>\n<![CDATA[\n");
         copy_stream(cof, f);
         fprintf(f, "\n]]>\n</client_opaque>\n");
+        fclose(cof);
     }
 
     fprintf(f, "</scheduler_request>\n");
diff --git a/client/cs_statefile.cpp b/client/cs_statefile.cpp
index 64cfc13..d0b84d3 100644
--- a/client/cs_statefile.cpp
+++ b/client/cs_statefile.cpp
@@ -499,6 +499,9 @@ int CLIENT_STATE::parse_state_file_aux(const char* fname) {
         if (xp.parse_string("newer_version", newer_version)) {
             continue;
         }
+        if (xp.parse_double("previous_uptime", time_stats.previous_uptime)) {
+            continue;
+        }
 #ifdef ENABLE_AUTO_UPDATE
         if (xp.match_tag("auto_update")) {
             if (!project) {
@@ -750,7 +753,8 @@ int CLIENT_STATE::write_state(MIOFILE& f) {
         "<user_network_request>%d</user_network_request>\n"
         "%s"
         "<new_version_check_time>%f</new_version_check_time>\n"
-        "<all_projects_list_check_time>%f</all_projects_list_check_time>\n",
+        "<all_projects_list_check_time>%f</all_projects_list_check_time>\n"
+        "<previous_uptime>%f</previous_uptime>\n",
         get_primary_platform(),
         core_client_version.major,
         core_client_version.minor,
@@ -762,7 +766,8 @@ int CLIENT_STATE::write_state(MIOFILE& f) {
         network_run_mode.get_perm(),
         cpu_benchmarks_pending?"<cpu_benchmarks_pending/>\n":"",
         new_version_check_time,
-        all_projects_list_check_time
+        all_projects_list_check_time,
+        now - time_stats.client_start_time
     );
     if (newer_version.size()) {
         f.printf("<newer_version>%s</newer_version>\n", newer_version.c_str());
@@ -865,7 +870,7 @@ int CLIENT_STATE::parse_app_info(PROJECT* p, FILE* in) {
                     _("File referenced in app_info.xml does not exist: ")
                 );
                 strcat(buf, fip->name);
-                msg_printf(p, MSG_USER_ALERT, buf);
+                msg_printf(p, MSG_USER_ALERT, "%s", buf);
                 delete fip;
                 continue;
             }
@@ -922,11 +927,6 @@ int CLIENT_STATE::write_state_gui(MIOFILE& f) {
 
     f.printf("<client_state>\n");
 
-#if 1
-    // NOTE: the following stuff is not in CC_STATE.
-    // However, BoincView (which does its own parsing) expects it
-    // to be in the get_state() reply, so leave it in for now
-    //
     retval = host_info.write(f, true, false);
     if (retval) return retval;
 
@@ -939,12 +939,18 @@ int CLIENT_STATE::write_state_gui(MIOFILE& f) {
         f.printf("<have_ati/>\n");
     }
 
-    retval = time_stats.write(f, false);
-    if (retval) return retval;
+#if 1
+    // NOTE: the following is not in CC_STATE.
+    // However, BoincView (which does its own parsing) expects it
+    // to be in the get_state() reply, so leave it in for now
+    //
     retval = net_stats.write(f);
     if (retval) return retval;
 #endif
 
+    retval = time_stats.write(f, true);
+    if (retval) return retval;
+
     for (j=0; j<projects.size(); j++) {
         PROJECT* p = projects[j];
         retval = p->write_state(f, true);
diff --git a/client/gpu_nvidia.cpp b/client/gpu_nvidia.cpp
index cc0a982..098dce8 100644
--- a/client/gpu_nvidia.cpp
+++ b/client/gpu_nvidia.cpp
@@ -286,7 +286,7 @@ void COPROC_NVIDIA::get(
 
     int j, itemp;
     unsigned int i;
-    size_t global_mem;
+    size_t global_mem = 0;
     COPROC_NVIDIA cc;
     string s;
     for (j=0; j<cuda_ndevs; j++) {
diff --git a/client/hostinfo_win.cpp b/client/hostinfo_win.cpp
index 57b0fea..1bd4452 100644
--- a/client/hostinfo_win.cpp
+++ b/client/hostinfo_win.cpp
@@ -478,8 +478,7 @@ int get_os_information(
                 strcat(os_name, "Windows 2000");
             }
 
-            if ( osvi.dwMajorVersion <= 4 )
-            {
+            if ( osvi.dwMajorVersion <= 4 ) {
                 strcat(os_name, "Windows NT");
             }
 
diff --git a/client/http_curl.cpp b/client/http_curl.cpp
index 0add2af..0e673c0 100644
--- a/client/http_curl.cpp
+++ b/client/http_curl.cpp
@@ -31,6 +31,7 @@
 #include <sys/stat.h>
 #include <cerrno>
 #include <unistd.h>
+#include <fcntl.h>
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -387,6 +388,14 @@ bool HTTP_OP::no_proxy_for_url(const char* url) {
     return false;
 }
 
+#ifndef _WIN32
+static int set_cloexec(void*, curl_socket_t fd, curlsocktype purpose) {
+    if (purpose != CURLSOCKTYPE_IPCXN) return 0;
+    fcntl(fd, F_SETFD, FD_CLOEXEC);
+    return 0;
+}
+#endif
+
 // the following will do an HTTP GET or POST using libcurl
 //
 int HTTP_OP::libcurl_exec(
@@ -520,10 +529,17 @@ int HTTP_OP::libcurl_exec(
     // bypass any signal handlers that curl may want to install
     //
     curl_easy_setopt(curlEasy, CURLOPT_NOSIGNAL, 1L);
+
     // bypass progress meter
     //
     curl_easy_setopt(curlEasy, CURLOPT_NOPROGRESS, 1L);
 
+#ifndef _WIN32
+    // arrange for a function to get called between socket() and connect()
+    // so that we can mark the socket as close-on-exec
+    //
+    curl_easy_setopt(curlEasy, CURLOPT_SOCKOPTFUNCTION, set_cloexec);
+#endif
     // setup timeouts
     //
     curl_easy_setopt(curlEasy, CURLOPT_TIMEOUT, 0L);
diff --git a/client/install-sh b/client/install-sh
deleted file mode 100644
index e9de238..0000000
--- a/client/install-sh
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	true
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=mkdir
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		true
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
-	fi
-
-	pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		true
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
-
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
diff --git a/client/log_flags.cpp b/client/log_flags.cpp
index ceab783..84798e6 100644
--- a/client/log_flags.cpp
+++ b/client/log_flags.cpp
@@ -366,7 +366,7 @@ int CONFIG::parse_options_client(XML_PARSER& xp) {
         if (xp.parse_bool("os_random_only", os_random_only)) continue;
 #ifndef SIM
         if (xp.match_tag("proxy_info")) {
-            retval = config_proxy_info.parse_config(xp);
+            retval = proxy_info.parse_config(xp);
             if (retval) {
                 msg_printf_notice(NULL, false, NULL,
                     "Can't parse <proxy_info> element in cc_config.xml"
@@ -469,6 +469,9 @@ int CONFIG::parse(FILE* f) {
     return parse(xp, log_flags);
 }
 
+// read config file, e.g. cc_config.xml
+// Called on startup and in response to GUI RPC requesting reread
+//
 int read_config_file(bool init, const char* fname) {
     if (!init) {
         msg_printf(NULL, MSG_INFO, "Re-reading %s", fname);
@@ -487,9 +490,10 @@ int read_config_file(bool init, const char* fname) {
         config.max_stdout_file_size, config.max_stderr_file_size
     );
 #endif
+    config_proxy_info = config.proxy_info;
+
     if (init) {
         coprocs = config.config_coprocs;
-        config_proxy_info = config.proxy_info;
         if (strlen(config.data_dir)) {
 #ifdef _WIN32
             _chdir(config.data_dir);
@@ -497,6 +501,8 @@ int read_config_file(bool init, const char* fname) {
             chdir(config.data_dir);
 #endif
         }
+    } else {
+        select_proxy_info();        // in case added or removed proxy info
     }
     return 0;
 }
@@ -516,6 +522,7 @@ void process_gpu_exclusions() {
         for (int k=1; k<coprocs.n_rsc; k++) {
             int n=0;
             COPROC& cp = coprocs.coprocs[k];
+            p->rsc_pwf[k].non_excluded_instances = (1<<cp.count)-1;  // all 1's
             for (j=0; j<config.exclude_gpus.size(); j++) {
                 EXCLUDE_GPU& eg = config.exclude_gpus[j];
                 if (strcmp(eg.url.c_str(), p->master_url)) continue;
@@ -524,14 +531,16 @@ void process_gpu_exclusions() {
                 if (eg.device_num >= 0) {
                     // exclusion may refer to nonexistent GPU
                     //
-                    if (cp.device_num_exists(eg.device_num)) {
+                    int ind = cp.device_num_index(eg.device_num);
+                    if (ind >= 0) {
                         n++;
+                        p->rsc_pwf[k].non_excluded_instances &= ~(1<<ind);
                     }
                 } else {
                     n = cp.count;
                 }
             }
-            p->ncoprocs_excluded[k] = n;
+            p->rsc_pwf[k].ncoprocs_excluded = n;
         }
     }
 
diff --git a/client/project.cpp b/client/project.cpp
index 8058b8b..fe4b01c 100644
--- a/client/project.cpp
+++ b/client/project.cpp
@@ -415,7 +415,7 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
         if (no_rsc_pref[j]) {
             out.printf("    <no_rsc_pref>%s</no_rsc_pref>\n", rsc_name(j));
         }
-        if (j>0 && gui_rpc && (ncoprocs_excluded[j] == rsc_work_fetch[j].ninstances)) {
+        if (j>0 && gui_rpc && (rsc_pwf[j].ncoprocs_excluded == rsc_work_fetch[j].ninstances)) {
             out.printf("    <no_rsc_config>%s</no_rsc_config>\n", rsc_name(j));
         }
     }
diff --git a/client/project.h b/client/project.h
index a325648..8e99360 100644
--- a/client/project.h
+++ b/client/project.h
@@ -238,8 +238,6 @@ struct PROJECT : PROJ_AM {
     //
     double rr_sim_cpu_share;
     bool rr_sim_active;
-    int ncoprocs_excluded[MAX_RSC];
-        // number of excluded instances per processor type
     bool operator<(const PROJECT& p) {
         return sched_priority > p.sched_priority;
     }
diff --git a/client/rr_sim.cpp b/client/rr_sim.cpp
index 552a8d7..f087596 100644
--- a/client/rr_sim.cpp
+++ b/client/rr_sim.cpp
@@ -74,6 +74,7 @@ struct RR_SIM {
         int rt = rp->avp->gpu_usage.rsc_type;
         if (rt) {
             rsc_work_fetch[rt].sim_nused += rp->avp->gpu_usage.usage;
+            rsc_work_fetch[rt].sim_used_instances |= p->rsc_pwf[rt].non_excluded_instances;
             p->rsc_pwf[rt].sim_nused += rp->avp->gpu_usage.usage;
         }
     }
@@ -169,10 +170,14 @@ void RR_SIM::init_pending_lists() {
     }
 }
 
-// pick jobs to run; put them in "active" list.
+// Pick jobs to run, putting them in "active" list.
 // Simulate what the job scheduler would do:
 // pick a job from the project P with highest scheduling priority,
-// then adjust P's scheduling priority
+// then adjust P's scheduling priority.
+//
+// This is called at the start of the simulation,
+// and again each time a job finishes.
+// In the latter case, some resources may be saturated.
 //
 void RR_SIM::pick_jobs_to_run(double reltime) {
     active.clear();
@@ -241,7 +246,18 @@ void RR_SIM::pick_jobs_to_run(double reltime) {
                 // check whether resource is saturated
                 //
                 if (rt) {
-                    if (rsc_work_fetch[rt].sim_nused >= coprocs.coprocs[rt].count - p->ncoprocs_excluded[rt]) break;
+                    if (rsc_work_fetch[rt].sim_nused >= coprocs.coprocs[rt].count) {
+                        break;
+                    }
+
+                    // if a GPU isn't saturated but this project is using
+                    // its max given exclusions, remove it from project heap
+                    //
+                    if (rsc_pwf.sim_nused >= coprocs.coprocs[rt].count - p->rsc_pwf[rt].ncoprocs_excluded) {
+                        pop_heap(project_heap.begin(), project_heap.end());
+                        project_heap.pop_back();
+                        continue;
+                    }
                 } else {
                     if (rsc_work_fetch[rt].sim_nused >= gstate.ncpus) break;
                 }
@@ -255,7 +271,7 @@ void RR_SIM::pick_jobs_to_run(double reltime) {
                 pop_heap(project_heap.begin(), project_heap.end());
                 project_heap.pop_back();
             } else if (!rp->rrsim_done) {
-                // Otherwise reshuffle the heap
+                // Otherwise reshuffle the project heap
                 //
                 make_heap(project_heap.begin(), project_heap.end());
             }
@@ -401,7 +417,9 @@ void RR_SIM::simulate() {
                 }
             }
         }
-        // adjust FLOPS left
+
+        // adjust FLOPS left of other active jobs
+        //
         for (unsigned int i=0; i<active.size(); i++) {
             rp = active[i];
             rp->rrsim_flops_left -= rp->rrsim_flops*delta_t;
@@ -464,6 +482,21 @@ void RR_SIM::simulate() {
         sim_now += delta_t;
     }
 
+    // identify GPU instances starved because of exclusions
+    //
+    for (int i=1; i<coprocs.n_rsc; i++) {
+        RSC_WORK_FETCH& rwf = rsc_work_fetch[i];
+        COPROC& cp = coprocs.coprocs[i];
+        int mask = (1<<cp.count)-1;
+        rwf.sim_excluded_instances = ~(rwf.sim_used_instances) & mask;
+        if (log_flags.rrsim_detail) {
+            msg_printf(0, MSG_INFO,
+                "[rrsim_detail] rsc %d: sim_used_inst %d mask %d sim_excluded_instances %d",
+                i, rwf.sim_used_instances, mask, rwf.sim_excluded_instances
+            );
+        }
+    }
+
     // if simulation ends before end of buffer, take the tail into account
     //
     if (sim_now < buf_end) {
diff --git a/client/sandbox.cpp b/client/sandbox.cpp
index 760e620..68e917f 100644
--- a/client/sandbox.cpp
+++ b/client/sandbox.cpp
@@ -185,7 +185,7 @@ int delete_project_owned_file(const char* path, bool retry) {
 // If an error occurs, delete as much as possible.
 //
 int client_clean_out_dir(const char* dirpath, const char* reason) {
-    char filename[256], path[MAXPATHLEN];
+    char filename[MAXPATHLEN], path[MAXPATHLEN];
     int retval, final_retval = 0;
     DIRREF dirp;
 
diff --git a/client/stream.cpp b/client/stream.cpp
deleted file mode 100644
index e17628e..0000000
--- a/client/stream.cpp
+++ /dev/null
@@ -1,331 +0,0 @@
-// This file is part of BOINC.
-// http://boinc.berkeley.edu
-// Copyright (C) 2008 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
-
-// Memory bandwidth benchmark derived from STREAM.  Original copyright
-// notice follows.  Notice that we cannot call our results "STREAM
-// benchmark results"
-// Original Copyright Notice:
-/*-----------------------------------------------------------------------*/
-/* Program: Stream                                                       */
-/* Revision: Id: stream.c,v 5.6 2005/10/04 00:19:59 mccalpin             */
-/* Original code developed by John D. McCalpin                           */
-/* Programmers: John D. McCalpin                                         */
-/*              Joe R. Zagar                                             */
-/*                                                                       */
-/* This program measures memory transfer rates in MB/s for simple        */
-/* computational kernels coded in C.                                     */
-/*-----------------------------------------------------------------------*/
-/* Copyright 1991-2005: John D. McCalpin                                 */
-/*-----------------------------------------------------------------------*/
-/* License:                                                              */
-/*  1. You are free to use this program and/or to redistribute           */
-/*     this program.                                                     */
-/*  2. You are free to modify this program for your own use,             */
-/*     including commercial use, subject to the publication              */
-/*     restrictions in item 3.                                           */
-/*  3. You are free to publish results obtained from running this        */
-/*     program, or from works that you derive from this program,         */
-/*     with the following limitations:                                   */
-/*     3a. In order to be referred to as "STREAM benchmark results",     */
-/*         published results must be in conformance to the STREAM        */
-/*         Run Rules, (briefly reviewed below) published at              */
-/*         http://www.cs.virginia.edu/stream/ref.html                    */
-/*         and incorporated herein by reference.                         */
-/*         As the copyright holder, John McCalpin retains the            */
-/*         right to determine conformity with the Run Rules.             */
-/*     3b. Results based on modified source code or on runs not in       */
-/*         accordance with the STREAM Run Rules must be clearly          */
-/*         labelled whenever they are published.  Examples of            */
-/*         proper labelling include:                                     */
-/*         "tuned STREAM benchmark results"                              */
-/*         "based on a variant of the STREAM benchmark code"             */
-/*         Other comparable, clear and reasonable labelling is           */
-/*         acceptable.                                                   */
-/*     3c. Submission of results to the STREAM benchmark web site        */
-/*         is encouraged, but not required.                              */
-/*  4. Use of this program or creation of derived works based on this    */
-/*     program constitutes acceptance of these licensing restrictions.   */
-/*  5. Absolutely no warranty is expressed or implied.                   */
-/*-----------------------------------------------------------------------*/
-# include <cstdio>
-# include <cmath>
-# include <float.h>
-# include <climits>
-# include <sys/time.h>
-# include <cstdlib>
-# include <algorithm>
-
-static int N=64;
-static const int NTIMES(10);
-static const int OFFSET(0);
-
-static double avgtime[4] = {0}, maxtime[4] = {0},
-                           mintime[4] = {FLT_MAX,FLT_MAX,FLT_MAX,FLT_MAX};
-
-static char *label[4] = {"Copy:      ", "Scale:     ",
-                         "Add:       ", "Triad:     "};
-
-static double bytes[4] = {
-                           2 * sizeof(double) * N,
-                           2 * sizeof(double) * N,
-                           3 * sizeof(double) * N,
-                           3 * sizeof(double) * N
-                         };
-
-extern double mysecond();
-extern double checktick();
-extern void checkSTREAMresults(double *a,double *b, double *c);
-
-void mem_bw(double &avg_bw, double &cache_size) {
-  avg_bw=0;
-  double  *a=(double *)malloc((N+OFFSET)*sizeof(double));
-  double  *b=(double *)malloc((N+OFFSET)*sizeof(double));
-  double  *c=(double *)malloc((N+OFFSET)*sizeof(double));
-  double   quantum=checktick();
-  int   BytesPerWord;
-  register int j, k;
-  double  scalar, t, times[4][NTIMES];
-  double rv=0;
-
-
-  double tt[30],t_max;
-  int cache_ratio=1,cache_level=1;
-  int i=0;
-
-  int check_cache=(cache_size==0);
-  do {
-    N*=2;
-    a=(double *)realloc(a,(N+OFFSET)*sizeof(double));
-    b=(double *)realloc(b,(N+OFFSET)*sizeof(double));
-    c=(double *)realloc(c,(N+OFFSET)*sizeof(double));
-    if ( !a || !b || !c ) return;
-
-    for (j=0; j<N; j++) {
-      a[j] = 1.0;
-      b[j] = 2.0;
-      c[j] = 0.0;
-    }
-
-    long transfer=0; 
-
-    // get as close to a clock boundary as possible
-    t = mysecond();
-    while ((t-mysecond())==0); // do nothing
-
-    double t0 = mysecond();
-    do {
-      for (j = 0; j < N; j++)
-        a[j] = 2.0E0 * a[j];
-      t = 1.0E6 * (mysecond() - t0);
-      transfer++;
-    } while (t < 10*quantum);  // run at least a 10 ticks.
-
-    t/=transfer; // change to "per run" time
-    tt[i++]=t;
-    t_max=std::max(N/t,t_max);
-    if (check_cache) {
-      if ((cache_ratio*N)<(t*t_max)) {
-        cache_size=N/2*sizeof(double);
-	cache_ratio*=2;
-//        printf("Level %d Cache Size = %f bytes\n",cache_level++,*cache_size);
-      }
-    }
-  } while (t<1e5);
-
-  bytes[0]=bytes[1]=2 * sizeof(double) * N;
-  bytes[2]=bytes[3]=3 * sizeof(double) * N;
-
-  /* --- MAIN LOOP --- repeat test cases NTIMES times --- */
-
-  scalar = 3.0;
-  for (k=0; k<NTIMES; k++) {
-    times[0][k] = mysecond();
-
-    for (j=0; j<N; j++)
-      c[j] = a[j];
-    times[0][k] = mysecond() - times[0][k];
-
-    times[1][k] = mysecond();
-
-    for (j=0; j<N; j++)
-      b[j] = scalar*c[j];
-
-    times[1][k] = mysecond() - times[1][k];
-
-    times[2][k] = mysecond();
-
-    for (j=0; j<N; j++)
-      c[j] = a[j]+b[j];
-
-    times[2][k] = mysecond() - times[2][k];
-
-    times[3][k] = mysecond();
-
-    for (j=0; j<N; j++)
-      a[j] = b[j]+scalar*c[j];
-
-    times[3][k] = mysecond() - times[3][k];
-  }
-
-  /* --- SUMMARY --- */
-
-  for (k=1; k<NTIMES; k++) /* note -- skip first iteration */
-  {
-    for (j=0; j<4; j++) {
-      avgtime[j] = avgtime[j] + times[j][k];
-      mintime[j] = std::min(mintime[j], times[j][k]);
-      maxtime[j] = std::max(maxtime[j], times[j][k]);
-    }
-  }
-
-  printf("Function      Rate (MB/s)   Avg time     Min time     Max time\n");
-  for (j=0; j<4; j++) {
-    avgtime[j] = avgtime[j]/(double)(NTIMES-1);
-
-    printf("%s%11.4f  %11.4f  %11.4f  %11.4f\n", label[j],
-           1.0E-06 * bytes[j]/mintime[j],
-           avgtime[j],
-           mintime[j],
-           maxtime[j]);
-
-    avg_bw+=(double)bytes[j]/mintime[j];
-  }
-  avg_bw/=4;
-
-  /* --- Check Results --- */
-  checkSTREAMresults(a,b,c);
-
-}
-
-# define M 20
-
-double checktick() {
-    int  i;
-    double minDelta, Delta;
-    double t1, t2, timesfound[M];
-
-    /*  Collect a sequence of M unique time values from the system. */
-
-    for (i = 0; i < M; i++) {
-      t1 = mysecond();
-      while( ((t2=mysecond()) - t1) < 1.0E-6 )
-	;
-      timesfound[i] = t1 = t2;
-    }
-
-    /*
-     * Determine the minimum difference between these M values.
-     * This result will be our estimate (in microseconds) for the
-     * clock granularity.
-     */
-
-    minDelta = 1000000;
-    for (i = 1; i < M; i++) {
-      Delta = ( 1.0E6 * (timesfound[i]-timesfound[i-1]));
-      minDelta = std::min(minDelta, std::max(Delta,0.0));
-    }
-
-    return(minDelta);
-  }
-
-
-
-  /* A gettimeofday routine to give access to the wall
-     clock timer on most UNIX-like systems.  */
-
-#include <sys/time.h>
-
-  double mysecond() {
-    struct timeval tp;
-    struct timezone tzp;
-    int i;
-
-    i = gettimeofday(&tp,&tzp);
-    return ( (double) tp.tv_sec + (double) tp.tv_usec * 1.e-6 );
-  }
-
-  void checkSTREAMresults (double *a, double *b, double *c) {
-    double aj,bj,cj,scalar;
-    double asum,bsum,csum;
-    double epsilon;
-    int j,k;
-
-    /* reproduce initialization */
-    aj = 1.0;
-    bj = 2.0;
-    cj = 0.0;
-    /* a[] is modified during timing check */
-    aj = 2.0E0 * aj;
-    /* now execute timing loop */
-    scalar = 3.0;
-    for (k=0; k<NTIMES; k++) {
-      cj = aj;
-      bj = scalar*cj;
-      cj = aj+bj;
-      aj = bj+scalar*cj;
-    }
-    aj = aj * (double) (N);
-    bj = bj * (double) (N);
-    cj = cj * (double) (N);
-
-    asum = 0.0;
-    bsum = 0.0;
-    csum = 0.0;
-    for (j=0; j<N; j++) {
-      asum += a[j];
-      bsum += b[j];
-      csum += c[j];
-    }
-#ifdef VERBOSE
-    printf ("Results Comparison: \n");
-    printf ("        Expected  : %f %f %f \n",aj,bj,cj);
-    printf ("        Observed  : %f %f %f \n",asum,bsum,csum);
-#endif
-
-#ifndef abs
-#define abs(a) ((a) >= 0 ? (a) : -(a))
-#endif
-    epsilon = 1.e-8;
-
-    if (abs(aj-asum)/asum > epsilon) {
-      printf ("Failed Validation on array a[]\n");
-      printf ("        Expected  : %f \n",aj);
-      printf ("        Observed  : %f \n",asum);
-    } else if (abs(bj-bsum)/bsum > epsilon) {
-      printf ("Failed Validation on array b[]\n");
-      printf ("        Expected  : %f \n",bj);
-      printf ("        Observed  : %f \n",bsum);
-    } else if (abs(cj-csum)/csum > epsilon) {
-      printf ("Failed Validation on array c[]\n");
-      printf ("        Expected  : %f \n",cj);
-      printf ("        Observed  : %f \n",csum);
-    } else {
-      printf ("Solution Validates\n");
-    }
-  }
-
-#ifdef STREAM_TEST
-
-int main() {
-  double cache_size=0;
-  double avg_bw=0;
-  mem_bw(avg_bw,cache_size);
-  printf("Average bandwidth=%f MB/s\n",avg_bw/1024/1024);
-  printf("Cache Size=%f kB\n",cache_size/1024);
-}
-
-#endif
diff --git a/client/test_fx_in b/client/test_fx_in
deleted file mode 100644
index 1aad27d..0000000
--- a/client/test_fx_in
+++ /dev/null
@@ -1 +0,0 @@
-blahblahblah
diff --git a/client/test_fx_out b/client/test_fx_out
deleted file mode 100644
index f448d51..0000000
--- a/client/test_fx_out
+++ /dev/null
@@ -1,1326 +0,0 @@
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <META http-equiv="Content-Type" CONTENT="text/html" CHARSET="UTF-8">
-    <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-    <STYLE TYPE="text/css" MEDIA="screen">
-            BODY, H2, H3, H4, P, UL, OL, DL
-            {
-            font-family: "Verdana", "Helvetica", "Arial", "sans-serif"
-            }
-
-            H1 {color: #0058a0; font-size: 20pt}
-	    H2 {color: #0058a0; font-size: 16pt}
-	    H3 {color: #0058a0; font-size: 14pt}
-	    H4 {color: #0058a0; font-size: 12pt}
-            
-            A:link, A:active, A:visited
-            {
-            color: #0058a0;
-            text-decoration: none
-            }
-
-            P, UL, OL, DL {margin-left: 10%; margin-right: 10%; font-size: 10pt}
-            DT {margin-bottom: 0.5em}
-            .offset {margin-left: 10%}
-            .afterskip {margin-bottom: 1em}
-            .afterhalf {margin-bottom: 0.5em}
-	    .example {margin-left: 10%; margin-right: 10%;
-	      border-color: #0058a0; border-style:solid; border-width: 1pt; padding: 1pt}
-            CODE {font-family: "Courier"}
-	    .comment {color: #0000ff}
-
-            P.offset {margin-left: 15%}
-            P.inner  {margin-left:  2%; width: 96%}
-            P.note   {margin-left: 10%; border-color: #0058a0;
-	      border-style:solid; border-width: 1pt;
-	      padding: 5pt; background-color:#e0e0e0 }
-	    
-	    PRE {font-size: 10pt; padding: 5pt}
-
-	  </STYLE>
-    <title>GAdoc - Sablotron 0.60</title>
-  </head>
-  <body bgcolor="#ffffff">
-    <h1 CLASS="afterskip">Sablotron 0.60</h1>
-    <DIV CLASS="afterskip">
-      <p>
-        <b>
-          <i>Tom Kaiser (Ginger Alliance)</i>
-        </b>
-      </p>
-      <p>
-        <i>June 17, 2001</i>
-      </p>
-    </DIV>
-    <h3>Abstract</h3>
-    <DIV CLASS="offset">This is a description of the current version of the
-  XSLT processor called Sablotron, including an overview of its
-  limitations as compared to the XSLT specification.
-  </DIV>
-    <h3>Contents</h3>
-<DIV STYLE="margin-left: 10%; margin-bottom: 2em; font-size: smaller">
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__25"></a> <a href="#i__25">
-          <b>1  This text</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__60"></a> <a href="#i__60">
-          <b>2  Changes from the last release</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__74"></a> <a href="#i__74">
-          <b>3  Introduction</b>
-        </a>
-        <DIV class="offset">  <a href="#i__81">3.1  XSLT</a>
-          <BR>  <a href="#i__154">3.2  On Sablotron</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__227"></a> <a href="#i__227">
-          <b>4  The sources</b>
-        </a>
-        <DIV class="offset">  <a href="#i__238">4.1  Getting the sources</a>
-          <BR>  <a href="#i__280">4.2  Joining the development</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__305"></a> <a href="#i__305">
-          <b>5  Implementation. Supported instructions and functions</b>
-        </a>
-        <DIV class="offset">  <a href="#i__343">5.1  Templates</a>
-          <BR>  <a href="#i__364">5.2  Conditional processing</a>
-          <BR>  <a href="#i__381">5.3  Loops</a>
-          <BR>  <a href="#i__398">5.4  Variables and parameters</a>
-          <BR>  <a href="#i__415">5.5  Element creation</a>
-          <BR>  <a href="#i__439">5.6  Global definitions</a>
-          <BR>  <a href="#i__476">5.7  Values and copying</a>
-          <BR>  <a href="#i__508">5.8  Namespace processing</a>
-          <BR>  <a href="#i__529">5.9  Sorting</a>
-          <BR> <a href="#i__577">5.10  Whitespace stripping</a>
-          <BR> <a href="#i__598">5.11  Includes</a>
-          <BR> <a href="#i__623">5.12  Other unimplemented instructions</a>
-          <BR> <a href="#i__654">5.13  Output conformance</a>
-          <BR> <a href="#i__686">5.14  XPath expressions</a>
-          <BR> <a href="#i__714">5.15  Built-in functions</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__804"></a> <a href="#i__804">
-          <b>6  Other implementation-related notes</b>
-        </a>
-        <DIV class="offset">  <a href="#i__811">6.1  Handlers</a>
-          <BR>  <a href="#i__859">6.2  Encodings</a>
-          <BR>  <a href="#i__887">6.3  Output methods</a>
-          <BR>  <a href="#i__915">6.4  URIs</a>
-          <BR>  <a href="#i__983">6.5  Named buffers</a>
-          <BR>  <a href="#i__1015">6.6  Error and log messages</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__1048"></a> <a href="#i__1048">
-          <b>7  The C interface</b>
-        </a>
-        <DIV class="offset">  <a href="#i__1065">7.1  Shortcuts</a>
-          <BR>  <a href="#i__1205">7.2  Basic functions</a>
-          <BR>  <a href="#i__1416">7.3  Generalized interface functions</a>
-          <BR>  <a href="#i__1578">7.4  The situation object</a>
-          <BR>  <a href="#i__1631">7.5  Document Object Model (DOM) functions</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__1870"></a> <a href="#i__1870">
-          <b>8  The command line interface</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__2013"></a> <a href="#i__2013">
-          <b>9  References</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__25"></a>
-      <h2>
-        <a href="#toc_i__25">1  This text</a>
-      </h2>
-      <DIV>
-        <p CLASS="">The HTML form of this description
-        was compiled by Sablotron from the XML source
-        Sablot-0-60.xml. 
-        </p>
-        <p CLASS="">
-        The material in the following sections includes:
-        </p>
-        <ul>
-          <li>some background information on XSLT and Sablotron,</li>
-          <li>a detailed comparison of the current version of
-          Sablotron to the XSLT spec,</li>
-          <li>Sablotron usage from the command line or as a
-          library.</li>
-        </ul>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__60"></a>
-      <h2>
-        <a href="#toc_i__60">2  Changes from the last release</a>
-      </h2>
-      <DIV>
-        <p CLASS="">Please see the RELEASE file.</p>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__74"></a>
-      <h2>
-        <a href="#toc_i__74">3  Introduction</a>
-      </h2>
-      <DIV>
-        <DIV class="afterskip">
-          <a name="i__81"></a>
-          <h3>
-            <a href="#toc_i__74">3.1  XSLT</a>
-          </h3>
-          <p CLASS="">XSLT is a language allowing to transform given XML data (the
-    <i>input</i>) according to a <i>stylesheet</i>. XSLT stylesheets
-    are themselves XML documents; that is, all instructions of the
-    language are expressed in the form of XML elements. The
-    <i>output</i>, i.e. the result of the processing, is typically a
-    XML document as well, although the syntactic requirements can be
-    relaxed to allow the creation of a HTML document (one that
-    contains unclosed tags and the like), or even plain text.
-    </p>
-          <p CLASS="">XSLT was designed by the World Wide Web Consortium (W3C) as
-      a part of the XSL stylesheet language, where it is complemented
-      by a powerful set of formatting instructions. The most precise
-      information about XSLT can be found in the W3C Recommendation <a href="#ref-xslt">[XSLT]</a>. In particular, Appendix B of the
-      Recommendation contains a handy syntax table. A good tutorial is
-      <a href="#ref-bible">[XMLBible14]</a>.
-    </p>
-          <p CLASS="">Other W3C Recommendations one often needs to consult are <a href="#ref-xml">[XML]</a> (for the definition of the XML
-      language) and <a href="#ref-xpath">[XPath]</a> (for details on
-      XPath, the language used to form expressions in XSLT and
-      elsewhere).
-    </p>
-          <p CLASS="">An excellent source of information about XSLT (indeed, about
-    anything related to XML and SGML) is <a href="#ref-rcover">[Cover]</a>; see also <a href="#ref-xslinfo">[XSLINFO]</a> and <a href="#ref-xmlorg">[XMLorg]</a>.
-    </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__154"></a>
-          <h3>
-            <a href="#toc_i__74">3.2  On Sablotron</a>
-          </h3>
-          <p CLASS="">Sablotron is a XSLT processor (though not quite conforming
-      yet..., see below) written in C++. Since the machines where it
-      is meant to run include various small mobile
-      clients, the main objectives of its design are the following:
-    </p>
-          <ul>
-      <li>portability,</li>
-      <li>compact code,</li>
-      <li>as much independence on other resources (Java etc.) as
-      possible.</li>
-    </ul>
-          <p CLASS="">Sablotron is a single shared library
-    (<code>sablot.dll</code> or <code>libsablot.so.0.60</code>). It can
-    also be used from the command line via the simple interface
-    called <code>sabcmd</code>. See <a href="#invocation">here</a> for
-    more information.
-    </p>
-          <p CLASS="">The only software Sablotron relies on is <b>expat</b>, the
-      XML parser by James Clark. See <a href="#expat">below</a> for
-      information on how to get expat.
-      </p>
-          <p CLASS="">For information on the available interfaces, e.g. for
-      Python, Perl and PHP, see <a href="http://www.gingerall.com">www.gingerall.com</a>. 
-      </p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__227"></a>
-      <h2>
-        <a href="#toc_i__227">4  The sources</a>
-      </h2>
-      <DIV>
-        <p CLASS="">
-      Sablotron is written in C++. The source files compile under
-      Win32 (using MS Visual C++ 6.0) and on Solaris and Linux (using
-      g++ 2.95.2) without change.</p>
-        <DIV class="afterskip">
-          <a name="i__238"></a>
-          <h3>
-            <a href="#toc_i__227">4.1  Getting the sources</a>
-          </h3>
-          <p CLASS="">The source or binary distributions of Sablotron can be downloaded
-      from <a href="http://www.gingerall.com">www.gingerall.com</a>. For
-      instructions on how to build the sources (if any), refer to the accompanying INSTALL file.
-      </p>
-          <p CLASS="">If you have access to the Ginger Alliance CVS server, you
-      can get the working version of Sablotron in the CVS module
-      <code>ga</code>. The access rights can be obtained on
-      request from <a href="mailto:cvsadmin at gingerall.com">the CVS admin</a>.
-      </p>
-          <p CLASS="">
-            <a name="expat"></a>
-      Since version 0.50, Sablotron uses expat 1.95.1, available from <a href="http://expat.sourceforge.org">SourceForge</a>.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__280"></a>
-          <h3>
-            <a href="#toc_i__227">4.2  Joining the development</a>
-          </h3>
-          <p CLASS="">
-      Sablotron is an open source project and all volunteers are most
-      welcome! The documentation of the sources is still somewhat
-      sparse but we will try to improve it. If you find the invitation
-      to work on Sablotron with us interesting, please <a href="mailto:sablotron at gingerall.com">contact us</a>. There is also
-      a mailing list available, see <a href="http://www.gingerall.com">www.gingerall.com</a>.
-      </p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__305"></a>
-      <h2>
-        <a href="#toc_i__305">5  Implementation. Supported instructions and functions</a>
-      </h2>
-      <DIV>
-        <p CLASS="">The instruction set supported by this version of Sablotron is
-    already sufficient for many transformation tasks (e.g. the task of
-    formatting this document). On the other
-    hand, a comparison of it to the XSLT specification <a href="#ref-xslt">[XSLT]</a> shows that much is still to be
-    done. The purpose of the
-    following sections is to describe the varying degree of support
-    for the elements of the XSLT language. </p>
-        <p CLASS="">It may be helpful to refer to the syntax table in Appendix B
-    of <a href="#ref-xslt">[XSLT]</a>. The instructions/attributes that
-    are not listed as unsupported should be implemented. The <a href="mailto:sablotron at gingerall.com">authors</a> will appreciate being
-    told about any omissions found in the following
-    description.</p>
-        <p CLASS="">For readability, I sometimes omit the <code>xsl:</code> prefix
-    from the instruction names.</p>
-        <DIV class="afterskip">
-          <a name="i__343"></a>
-          <h3>
-            <a href="#toc_i__305">5.1  Templates</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        template, apply-templates, call-template
-      </code>
-          </p>
-          <p CLASS="">
-        Fully implemented. <code>xsl:sort</code> is supported since release 0.50.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__364"></a>
-          <h3>
-            <a href="#toc_i__305">5.2  Conditional processing</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        if, choose, when, otherwise
-      </code>
-          </p>
-          <p CLASS="">Fully implemented.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__381"></a>
-          <h3>
-            <a href="#toc_i__305">5.3  Loops</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>for-each</code>
-          </p>
-          <p CLASS="">Fully implemented.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__398"></a>
-          <h3>
-            <a href="#toc_i__305">5.4  Variables and parameters</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>variable, param, with-param</code>
-          </p>
-          <p CLASS="">Fully implemented. Top-level variables and parameters are
-      read in the document order, so no forward references are
-      resolved. This is a minor deviation from the spec. </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__415"></a>
-          <h3>
-            <a href="#toc_i__305">5.5  Element creation</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>element, attribute, text, 
-      comment, processing-instruction, attribute-set</code>
-          </p>
-          <p CLASS="">
-            <code>xsl:attribute-set</code> is not implemented. For the
-      rest, <code>name</code> is the only recognized attribute (where
-      applicable). Literal result elements work.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__439"></a>
-          <h3>
-            <a href="#toc_i__305">5.6  Global definitions</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>stylesheet, transform, output</code>
-          </p>
-          <p CLASS="">For <code>stylesheet</code> and <code>transform</code>,
-        the only recognized attribute is
-        <code>version</code>. <code>xsl:output</code> should work
-        (see below for notes on the <code>encoding</code>
-        attribute). HTML indentation has been added in 0.60.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__476"></a>
-          <h3>
-            <a href="#toc_i__305">5.7  Values and copying</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>value-of, copy, copy-of</code>
-          </p>
-          <p CLASS="">
-            <code>copy-of</code> and <code>value-of</code> are fully
-      implemented. <code>copy</code> is implemented except for the
-      <code>use-attribute-sets</code> attribute.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__508"></a>
-          <h3>
-            <a href="#toc_i__305">5.8  Namespace processing</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>namespace-alias</code>
-          </p>
-          <p CLASS="">Namespaces should be processed correctly. The
-      <code>namespace-alias</code> instruction is now supported
-      (patch by Major).</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__529"></a>
-          <h3>
-            <a href="#toc_i__305">5.9  Sorting</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>sort</code>
-          </p>
-          <p CLASS="">
-            <code>xsl:sort</code> is implemented since 0.50. There are
-      minor limitations:
-      </p>
-          <ul>
-        <li>currently, the <code>lang</code> attribute may only
-        contain the values <code>"en"</code> or <code>"cz"</code>.</li>
-        <li>
-              <code>case-order</code> cannot be specified.</li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__577"></a>
-          <h3>
-            <a href="#toc_i__305">5.10  Whitespace stripping</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>strip-space, preserve-space</code>
-          </p>
-          <p CLASS="">Only the default whitespace stripping is done. That is,
-      all whitespace-only text nodes in any stylesheet, not appearing
-      inside a <code>xsl:text</code>, are removed. The two
-      instructions for whitespace stripping and preservation are
-      unsupported.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__598"></a>
-          <h3>
-            <a href="#toc_i__305">5.11  Includes</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>include, import, apply-imports</code>
-          </p>
-          <p CLASS="">Only <code>xsl:include</code> is implemented. Processing
-      involving multiple documents works, but has to get more testing,
-      eg. with respect to <code>generate-id()</code>.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__623"></a>
-          <h3>
-            <a href="#toc_i__305">5.12  Other unimplemented instructions</a>
-          </h3>
-          <ul>
-        <li>
-              <code>xsl:key,</code>
-            </li>
-        <li>
-              <code>xsl:number,</code>
-            </li>
-        <li>
-              <code>xsl:fallback.</code>
-            </li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__654"></a>
-          <h3>
-            <a href="#toc_i__305">5.13  Output conformance</a>
-          </h3>
-          <p CLASS="">The output mechanism is much closer to the spec than in
-      the versions prior to 0.4. The following issues remain for the
-      html method:</p>
-          <ul>
-        <li>Output the boolean attributes correctly.</li>
-        <li>Disable the escaping inside
-        <code><SCRIPT></code> and
-        <code><STYLE></code>
-            </li>.
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__686"></a>
-          <h3>
-            <a href="#toc_i__305">5.14  XPath expressions</a>
-          </h3>
-          <p CLASS="">Almost all features of XPath are fully implemented. This means
-      there should be no problems with expressions of any kind.</p>
-          <p CLASS="">One exception relates to axes. The <code>following</code> and
-      <code>preceding</code> axes haven't been implemented yet.</p>
-          <p CLASS="">Another possible exception may be numbers; we did not yet do a
-      thorough test of rounding, NaNs, infinity, etc.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__714"></a>
-          <h3>
-            <a href="#toc_i__305">5.15  Built-in functions</a>
-          </h3>
-          <p CLASS="">
-            <a name="corelib"></a>Only a few functions from the standard
-      function library remain
-      unimplemented:
-      </p>
-          <ul>
-      <li>
-              <code>id()</code>,</li>
-      <li>
-              <code>lang()</code> (accepted but always returns true),</li>
-      <li>
-              <code>key()</code>,</li>
-      <li>
-              <code>format-number()</code>,</li>
-      <li>
-              <code>unparsed-entity-uri()</code>.</li>
-      </ul>
-          <p CLASS="">As for the fuctions that <i>are</i> implemented, the
-      following is a list of differences from the spec:
-      </p>
-          <ul>
-        <li>
-              <code>document()</code> only accepts one argument, always
-        getting the base URI from the stylesheet URI.
-        </li>
-        <li>
-              <code>string-length()</code> returns the byte length of
-        the UTF-8 representation of the string. This will typically
-        differ from the actual length.
-        </li>
-        <li>
-              <code>generate-id()</code> might fail to generate unique identifiers
-        when several input documents are present (giving the same id to
-        nodes from different documents).
-        </li>
-      </ul>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__804"></a>
-      <h2>
-        <a href="#toc_i__804">6  Other implementation-related notes</a>
-      </h2>
-      <DIV>
-        <DIV class="afterskip">
-          <a name="i__811"></a>
-          <h3>
-            <a href="#toc_i__804">6.1  Handlers</a>
-          </h3>
-          <p CLASS="">It is possible for the user to supply the following
-      handlers to Sablotron:
-        <ul>
-          <li>message handler (to bypass the default way of displaying
-          error and warning messages and logging),</li>
-          <li>scheme handler (to retrieve documents whose URI use an
-          unsupported scheme),</li>
-          <li>streaming handler (an expat-like interface to the XML
-          document which is the result of the processing),</li>
-          <li>'miscellaneous' handler (which will probably server as a
-          collections of odd callbacks).</li>
-        </ul>
-      </p>
-          <p CLASS="">
-        The handlers are set using <code>SablotRegHandler()</code>
-        For details concerning the interface of these handlers,
-        consult the header files <code>sablot.h</code> and
-        <code>shandler.h</code>. 
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__859"></a>
-          <h3>
-            <a href="#toc_i__804">6.2  Encodings</a>
-          </h3>
-          <p CLASS="">
-        In version 0.52, the encoding conversion capabilities of
-        Sablotron have been much extended. The most important fact is the
-        following: if you have the iconv library installed on your system, you
-        can use any encoding it supports (that is, almost any encoding
-        whatsoever) for both the input and the output documents. Iconv
-        is available on most systems (it is a standard part of glibc2,
-        for instance). There are implementations for Win32 as well.
-      </p>
-          <p CLASS="">If iconv is not available, the encoding may still be supported internally by
-      Sablotron. At present, the list is of such encodings is rather
-      short: besides UTF-8, these are UTF-16, ASCII, iso-8859-1,
-      iso-8859-2 and windows-1250 on input, none on output. However,
-      we plan to implement a half independent light-weight
-      conversion library for use on systems without iconv,
-      extending the set of internally supported encodings
-      considerably. 
-      </p>
-          <p CLASS="">Lastly, the user has the option to implement a custom
-      encoding conversion handler, which will be asked to perform any unsupported
-      conversion. See the <code>shandler.h</code> header file for
-      details.
-      </p>
-          <p CLASS="">The default input and output encoding is in all cases UTF-8.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__887"></a>
-          <h3>
-            <a href="#toc_i__804">6.3  Output methods</a>
-          </h3>
-          <p CLASS="">In addition to the standard output methods (xml, html and
-      text), it is possible to output xhtml. Documents output using
-      this method obey the XHTML 1.0 rules (in particular, all empty
-      elements are closed). To choose the method, use
-      <code><xsl:output method='xhtml'></code>. <b>Please note</b>
-      that the name of this method will possibly be changed since the XSLT
-      spec requires any processor-specific methods to have qualified
-      names, say <code>sab:xhtml</code>. On the other hand, the name
-      <code>xhtml</code> is considered in the XSLT 2.0 working draft.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__915"></a>
-          <h3>
-            <a href="#toc_i__804">6.4  URIs</a>
-          </h3>
-          <p CLASS="">Sablotron can handle
-      two URI schemes natively: 'file' and 'arg' (see
-      below). Moreover, it is possible to use the function
-      <code>SablotRegSchemeHandler</code> to register an external scheme
-      handler which will receive requests in all other schemes. See
-      the documentation in <code>sablot.h</code> and
-      <code>shandler.h</code>.
-      </p>
-          <p CLASS="">Relative URI references are resolved in conformance to RFC
-      2396. The base URI is well defined when the relative reference appears
-      inside a XML document; when invoking sabcmd, the base URI is
-      taken to correspond to the current working directory.
-      </p>
-          <p CLASS="">
-            <a name="fname-rules"></a>When specifying filenames, the
-      following rules are in effect:
-      </p>
-          <ul>
-        <li>specify the "file:" scheme for any standard files,
-      i.e. refer to <code>stdin</code> as <code>file://stdin</code>
-      etc.</li>
-        <li>slashes and backslashes work equally fine, in Windows as
-      well as Linux.</li>
-        <li>to include a drive letter under Windows
-      (e.g. <code>C:\doc.xml</code>), it is necessary to say
-      <code>file://c:/doc.xml</code>. 
-        </li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__983"></a>
-          <h3>
-            <a href="#toc_i__804">6.5  Named buffers</a>
-          </h3>
-          <p CLASS="">
-            <a name="argscheme"></a>Sablotron introduces an URI scheme
-      'arg:' which enables one to use strings in named memory
-      buffers. The buffer names can have a tree-like structure so that
-      a relative reference from a document in a buffer can be resolved
-      as pointing to another buffer.
-      </p>
-          <p CLASS="">For instance, if we invoke Sablotron specifying that a
-      buffer named <code>/mybuf/1</code> contains the string
-      "&lt;a>contents&lt;/a>", then the expression
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-      document('arg:/mybuf/1')/a
-      </code>
-          </p>
-          <p CLASS="">has string-value "contents". If the document in arg:/mybuf/1
-      contained a relative URI reference "../theirbuf/2" then this
-      would be resolved as pointing to "arg:/theirbuf/2".</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1015"></a>
-          <h3>
-            <a href="#toc_i__804">6.6  Error and log messages</a>
-          </h3>
-          <p CLASS="">By default, Sablotron writes error and warning messages to
-      stderr, and does no logging. By a call to
-      <code>SablotSetLog()</code>, you can specify the name of the log
-      file to be used.</p>
-          <p CLASS="">Besides, you can use <code>SablotRegHandler()</code>
-      to override the default message handling. The handler you
-      register will receive all messages in a structured form that's
-      easy to process and filter. For details, see
-      the documentation in <code>sablot.h</code> and
-      <code>shandler.h</code>.</p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__1048"></a>
-      <h2>
-        <a href="#toc_i__1048">7  The C interface</a>
-      </h2>
-      <DIV>
-        <p CLASS="">
-          <a name="invocation"></a>
-        </p>
-        <p CLASS="">
-        This section describes the functions exported from the
-        Sablotron library.  All of them have a return type of 'int'
-        and return an error flag (nonzero signals an error). Errors
-        are reported to the user by Sablotron itself. 
-      </p>
-        <DIV class="afterskip">
-          <a name="i__1065"></a>
-          <h3>
-            <a href="#toc_i__1048">7.1  Shortcuts</a>
-          </h3>
-          <p CLASS="">
-        We'll first describe the 'shortcuts' that do the whole
-        processing in one call.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcess(char *sheetURI, char *inputURI, char *resultURI,
-        char **params, char **arguments, char **resultArg);
-      </code>
-          </p>
-          <p CLASS="">
-        This is the basic function. The first three of its arguments
-        are the URIs of the XSLT stylesheet, the XML source and the
-        resulting document, respectively. For some notes on specifying
-        file names, see <a href="#fname-rules">above</a>.
-      </p>
-          <p CLASS="">
-            <code>params</code> is an array of pointers to the names
-      and contents of the top-level stylesheet parameters. Thus,
-      <code>params[0]</code> is a pointer to the null-terminated name
-      of the first parameter, <code>params[1]</code> points to the
-      (null-terminated) contents of the first parameter. The following
-      two array items do the same for the second parameter, etc. The
-      whole array is terminated by a NULL pointer in place of the
-      name. If no parameters are to be passed, you can specify NULL
-      for <code>params</code> itself.
-      </p>
-          <p CLASS="">
-            <code>arguments</code> is a similar array of named buffers
-      to be passed to the stylesheet. (They can be referred to via the
-      'arg:' scheme, see <a href="#argscheme">above</a>.) Again, the
-      array is a sequence of (name, value) pairs terminated by NULL in
-      place of a name. If no named buffers are to be passed, you can
-      specify NULL for <code>arguments</code> itself.
-      </p>
-          <p CLASS="">
-            <code>resultArg</code> enables one to access the
-      resulting document in case the output went to a named buffer. In
-      that situation, <code>*resultArg</code> points to the resulting
-      null-terminated string, allocated by Sablotron. You can pass NULL
-      for <code>resultArg</code> if the output is sure to go to a
-      file. 
-      </p>
-          <p CLASS="">
-            <b>Note:</b>When you are done processing the string
-      pointed to by <code>*resultArg</code>, free it using <a href="#sablotfree">
-              <code>SablotFree()</code>
-            </a> - never use
-      <code>free()</code>. The latter is guaranteed to produce a
-      segmentation fault under Linux.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcessFiles(char *styleSheetName,
-        char *inputName,
-        char *resultName);
-      </code>
-          </p>
-          <p CLASS="">A wrapper for <code>SablotProcess()</code> working on
-      files. The parameters are the null-terminated file names of the
-      XSLT stylesheet, the XML input and the result,
-      respectively. Sablotron opens these files itself and closes them
-      after the processing is complete. Values like "file://stdin" are
-      allowed.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcessStrings(char *styleSheetStr, char *inputStr, char
-        **resultStr);
-      </code>
-          </p>
-          <p CLASS="">Another wrapper for <code>SablotProcess()</code>, this
-        time for accessing named buffers (i.e. user-allocated memory
-        blocks)only. Thus, the first parameter is a null-terminated
-        string containing the whole stylesheet; the second parameter
-        is a null-terminated string containing the XML
-        input. Sablotron allocates the buffer for the resulting string
-        and returns a pointer to it in resultStr. Hence, invoking
-        <code>puts(*resultStr)</code> after having called
-        <code>SablotProcessStrings</code> sends the result to
-        stdout. The buffer allocated <b>must</b> be freed by calling the
-        function <code>SablotFree</code> described next. 
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1205"></a>
-          <h3>
-            <a href="#toc_i__1048">7.2  Basic functions</a>
-          </h3>
-          <p CLASS="">The above shortcuts just call the basic, lower-level
-      functions described below. Note that if you need to set options
-      for logging etc., you may need to use the low-level
-      functions. </p>
-          <p CLASS="">A typical processing session may look like this:</p>
-          <p CLASS="">
-            <pre>
-          SablotHandle p;
-          char *my_buf;
-          SablotCreateProcessor(&p);
-          SablotSetLog(p, ...);
-          /* ...set other instance-specific options here... */
-          SablotRunProcessor(p, ...);
-          SablotGetResultArg(p, "arg:/somename", &my_buf)
-          /* ...do something with my_buf... */
-          /* can run the processor again if necessary */
-          SablotRunProcessor(p, ...);
-          SablotDestroyProcessor(p);
-      </pre>
-          </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotCreateProcessor(SablotHandle *processorPtr);
-      </code>
-          </p>
-          <p CLASS="">Creates an instance of Sablotron and returns a pointer to
-      it in *processorPtr. This pointer is passed on all subsequent
-      calls to this instance. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotDestroyProcessor(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Destroys an instance of the processor, deallocating all
-      the memory used up by it.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotRunProcessor(SablotHandle processor_,
-        char *sheetURI, 
-        char *inputURI, 
-        char *resultURI,
-        char **params, 
-        char **arguments);
-      </code>
-          </p>
-          <p CLASS="">Processes documents using the given processor instance and
-      given params and args definitions. See
-      <code>SablotProcess()</code>.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotGetResultArg(SablotHandle processor_,
-        char *argURI,
-        char **argValue);
-      </code>
-          </p>
-          <p CLASS="">Copies the result 'arg' buffer with the given URI,
-      returning a pointer to the newly-allocated block in
-      *argValue. If no such buffer exists, returns NULL in *argValue. 
-      </p>
-          <p CLASS="">This function is necessary, because if the result document
-      is output to memory, it would be lost when
-      <code>SablotDestroyProcessor()</code> is called. When
-      deallocating the copy obtained from
-      <code>SablotGetResultArg()</code>, use <code>SablotFree</code>
-      (never <code>free()</code>). </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotFreeResultArgs(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Removes the Sablotron-internal copies of the 'arg' buffers
-      from the last Sablotron run. Normally, there should be no reason
-      to call this function as it is called automatically on both
-      <code>SablotRunProcessor()</code> and
-      <code>SablotDestroyProcessor()</code>. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-              <a name="sablotfree"></a>
-        int SablotFree(char *resultBuf);
-      </code>
-          </p>
-          <p CLASS="">This function frees the buffer allocated on previous call
-        to <code>SablotProcessStrings</code>. Calling it with an
-        invalid pointer will cause a crash. 
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotRegHandler(
-        SablotHandle processor_, 
-        HandlerType type,   
-        void *handler, 
-        void *userData);
-      </code>
-          </p>
-          <p CLASS="">Registers an external handler. <code>type</code> can be
-        <code>HLR_MESSAGE</code>, <code>HLR_SCHEME</code>,
-        <code>HLR_SAX</code>, <code>HLR_MISC</code> or
-        <code>HLR_ENC</code>. 
-        <code>handler</code> points to the
-        callback vector of the appropriate type. <code>userData</code>
-        is a data item to passed to all callbacks of this particular
-        handler. For details, check the <code>sablot.h</code> and
-        <code>shandler.h</code> header files.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotUnregHandler(
-        SablotHandle processor_, 
-        HandlerType type,   
-        void *handler, 
-        void *userData);
-      </code>
-          </p>
-          <p CLASS="">Unregisters the given external handler. For details, check the
-      <code>sablot.h</code> and <code>shandler.h</code> header
-      files.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotSetLog(
-        SablotHandle processor_,
-        const char *logFilename, 
-        int logLevel);
-      </code>
-          </p>
-          <p CLASS="">Sets the log filename. The <code>logLevel</code> parameter
-      is currently not used. Pass NULL for <code>logFilename</code> to
-      turn logging off (default). </p>
-          <p CLASS="">The other functions published by sablot.h have been
-      included for experimental reasons or for compatibility, and it
-      is better not to use them.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotClearError(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Clears the 'pending error' flag for this instance of
-      Sablotron.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1416"></a>
-          <h3>
-            <a href="#toc_i__1048">7.3  Generalized interface functions</a>
-          </h3>
-          <p CLASS="">The implementation of the <a href="#dom">DOM interface</a>
-      brought the need to extend some of the functions described in
-      the previous section. This extension enables the user to:
-      </p>
-          <ul>
-        <li>process documents created by the DOM functions, and</li>
-        <li>process frequently used documents in pre-parsed form.</li>
-      </ul>
-          <p CLASS="">An object called <i>situation</i> is used to provide a
-persistent context for all calls to the DOM-related
-functions. Functions used to manipulate the situation are described in
-<a href="#situation">the following section</a>.</p>
-          <p CLASS="">
-            <b>Note:</b> If not specified otherwise, all these
-      functions return an error code. A positive value indicates an error.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotCreateDocument(SablotSituation S, 
-	    SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Creates an empty document. Typically followed by calls to
-      DOM functions to populate the document.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotDestroyDocument(SablotSituation S, 
-	    SDOM_Document D);
-      </code>
-          </p>
-          <p CLASS="">Destroys a document, freeing all the nodes it has created.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotParse(SablotSituation S, 
-        const char *uri, SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Reads in a document from the given URI.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotParseBuffer(SablotSituation S, 
-        const char *buffer, SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Reads in a document from the given in-memory buffer.</p>
-          <p CLASS="">These functions have variants to be used if the document
-      is to be interpreted as an XSLT stylesheet, namely
-      <code>SablotParseStylesheet</code> and
-      <code>SablotParseStylesheetBuffer</code>.</p>
-          <p CLASS="">The following functions generalize
-      <code>SablotRunProcessor</code> in that they make it possible to
-      utilize an extra kind of a source document: a DOM tree.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotRunProcessorGen(SablotSituation S,
-        void *processor_,
-        char *sheetURI, 
-        char *inputURI, 
-        char *resultURI);    
-      </code>
-          </p>
-          <p CLASS="">A key ingredient of the extended interface. Only the URIs
-      of the sources and of the result document are given to it. The
-      rest of the information passed to
-      <code>SablotRunProcessor</code> is conveyed through
-      <code>SablotAddArgBuffer,</code> <code>SablotAddArgTree</code>
-      and <code>SablotAddParam.</code> The scheme part of the
-      stylesheet URI or the input URI may be "arg:", in which
-      case they refer to a buffer or tree passed by these
-      functions. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddArgBuffer(SablotSituation S,
-        void *processor_,
-        const char *argName,
-        const char *bufferValue);
-</code>
-          </p>
-          <p CLASS="">Creates a named buffer for the next processor run. The
-      buffer's name and contents are passed as arguments. The name
-      is interpreted relative to the 'arg:/' scheme.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddArgTree(SablotSituation S,
-        void *processor_,
-        const char *argName,
-        SDOM_Document tree);
-</code>
-          </p>
-          <p CLASS="">Associates the given document with a name for the next
-      processor run. The document is <i>not</i> destroyed after the
-      run is finished. The name is interpreted relative to the 'arg:/'
-      scheme.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddParam(SablotSituation S,
-        void *processor_,
-        const char *paramName,
-        const char *paramValue);
-      </code>
-          </p>
-          <p CLASS="">Adds a global stylesheet parameter for the next processor
-      run.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1578"></a>
-          <h3>
-            <a href="#toc_i__1048">7.4  The situation object</a>
-          </h3>
-          <p CLASS="">
-            <a name="situation"></a>At present, the situation object primarily holds information on any pending errors. A
-situation is created using</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotCreateSituation(SablotSituation
-      *SP);</code>
-          </p>
-          <p CLASS="">and destroyed by</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotDestroySituation(SablotSituation
-      S);</code>
-          </p>
-          <p CLASS="">To clear the pending error flag in a situation, use</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotClearSituation(SablotSituation
-      S);</code>
-          </p>
-          <p CLASS="">The following self-explanatory functions extract parts of the error information
-      from the situation:</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        const char *SablotGetErrorURI(SablotSituation S);<br>
-        int SablotGetErrorLine(SablotSituation S);<br>
-        const char *SablotGetErrorMsg(SablotSituation S);
-     </code>
-          </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1631"></a>
-          <h3>
-            <a href="#toc_i__1048">7.5  Document Object Model (DOM) functions</a>
-          </h3>
-          <p CLASS="">
-            <a name="dom"></a>Starting with version 0.60, Sablotron implements
-      a major subset of the DOM Level 1 Core Specification <a href="#ref-dom">[DOM]</a>. A brief
-      description of the implemented interface follows; for more
-      details, please refer to the header file named
-      <code>sdom.h.</code>
-          </p>
-          <p CLASS="">All of the names related to the DOM interface start with
-      SDOM_ (for Sablot DOM).</p>
-          <p CLASS="">Major new types are <code>SDOM_Document</code> (a DOM tree) and
-      <code>SDOM_Node</code> (a node of the tree). A document can also be used in
-      place of a node. This reflects the fact in the DOM spec, 
-      Document is a subclass of Node. When used in this way, the
-      document represents its own root node (which is not the same as
-      the `root element').</p>
-          <p CLASS="">Other types include:</p>
-          <ul>
-        <li>
-              <code>SDOM_char:</code> a DOM character type. Currently, this is just
-        char. Note that the DOM spec requires that the DOM
-        implementations work with UTF-16. Sablotron deviates from this
-        by using UTF-8 instead. A separate set of functions taking
-        UTF-16 strings will be provided.</li>
-        <li>
-              <code>SDOM_NodeType:</code> a node type enum. Some of the values are
-        <code>SDOM_ELEMENT_NODE,</code> <code>SDOM_ATTRIBUTE_NODE</code> and <code>SDOM_TEXT_NODE.</code> See
-        <code>sdom.h</code> for the rest.</li>
-        <li>
-              <code>SDOM_NodeList:</code> a node list returned by some of the
-        functions.</li>
-        <li>
-              <code>SDOM_Exception:</code> DOM exception codes enum, with values such
-        as <code>SDOM_NOT_FOUND_ERR</code> or <code>SDOM_INVALID_NODE_TYPE</code>. See <code>sdom.h</code>
-        for details.</li>
-</ul>
-          <p CLASS="">The functions listed below are implemented more or less as defined in
-      the DOM Level 1 Specification, with two exceptions:
-      their names are prefixed with <code>SDOM_</code> and the first argument is
-      always a <code>SablotSituation.</code> All the functions return
-      a <code>SDOM_Exception.</code> </p>
-          <ul>
-<li>
-              <code>createElement, createAttribute, createTextNode,
-createCDATASection, createComment, createProcessingInstruction</code>
-            </li>
-<li>
-              <code>getNodeType, getNodeName, setNodeName, getNodeValue, setNodeValue</code>
-            </li>
-<li>
-              <code>getParentNode, getFirstChild, getLastChild, getPreviousSibling,
-getNextSibling, getOwnerDocument</code>
-            </li>
-<li>
-              <code>insertBefore, appendChild, removeChild, replaceChild</code>
-            </li>
-<li>
-              <code>cloneNode</code>
-            </li>
-<li>
-              <code>getAttribute, setAttribute, removeAttribute, getAttributeList</code>
-            </li>
-</ul>
-          <p CLASS="">Several functions have been added:</p>
-          <ul>
-<li>
-              <code>disposeNode</code> frees all memory used by the given node</li>
-<li>
-              <code>cloneForeignNode</code> clones a node from a different
-document</li>
-<li>
-              <code>docToString</code> serializes the document, returning the
-resulting string</li>
-<li>
-              <code>xql</code> performs an XPath query on the DOM tree,
-returning a list of the nodes satisfying it.</li>
-</ul>
-          <p CLASS="">In addition, there are some functions used to manipulate
-      the node lists returned by <code>xql</code> and
-      <code>getAttributeList</code>. These include
-      <code>getNodeListLength</code>, <code>getNodeListItem</code> and
-      <code>disposeNodeList</code>.</p>
-          <p CLASS="">Finally, there are functions to extract DOM
-      exception-related information from the situation object, namely
-      <code>getExceptionCode</code>, <code>getExceptionMessage</code>
-      and <code>getExceptionDetails</code>.</p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__1870"></a>
-      <h2>
-        <a href="#toc_i__1870">8  The command line interface</a>
-      </h2>
-      <DIV>
-        <p CLASS="">Sablotron comes with a command-line interface to the
-        shared library, which is a program named
-        <code>sabcmd</code>. At present, <code>sabcmd</code> is invoked
-        as follows:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      sabcmd [<i>options</i>] <i>stylesheet</i> [<i>input</i> [<i>result</i>]] [<i>assignments</i>]
-      </code>
-        </p>
-        <p CLASS="">The arguments are the URIs of the XSLT stylesheet, the
-      XML input document, and the resulting document, respectively. The
-      default for <code>
-            <i>input</i>
-          </code> is
-      <code>file://stdin</code> (meaning plain old stdin);
-      <code>
-            <i>result</i>
-          </code> defaults to
-      <code>file://stdout</code>. Filenames have to include the extension (if
-      any).</p>
-        <p CLASS="">You can display the list of available options by typing
-      <code>sabcmd --help</code>. Among the more useful ones are
-      <code>--log-file</code> (for setting the log file) and
-      <code>--measure</code> (measures and outputs the total
-      processing time).
-      </p>
-        <p CLASS="">
-          <a href="#fname-rules">The rules for filenames</a> are the same as
-      with <code>SablotProcess()</code>. 
-      </p>
-        <p CLASS="">
-          <code>assignments</code> is a series of definitions of the
-      form:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      name1=value1 name2=value2 ...
-      </code>
-        </p>
-        <p CLASS="">
-      assigning values to top-level stylesheet parameters and to named
-      buffers. These two cases are distinguished by a leading '$' in
-      the name of a stylesheet parameter. The names of the buffers do
-      <i>not</i> start with "arg:". They may start with a slash; if
-      they don't, the slash is prepended. 
-      </p>
-        <p CLASS="">
-          <b>Note:</b> In most cases, it will be necessary to quote
-      the individual assignments. Whether to use single or double
-      quotes may depend on the shell used (or may it?) Single quotes
-      work for bash, double quotes work in Windows.
-      </p>
-        <p CLASS="">If the result URI refers to a named buffer, the output
-      would normally remain buried in memory. Sabcmd dumps the buffer to standard
-      output instead.
-      </p>
-        <p CLASS="">To sum up and give an example, the following would be a
-      valid invocation of sabcmd:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      sabcmd sheet.xsl arg:/the_input "the_input=&lt;a/>"
-      "$use_defaults=1"
-      </code>
-        </p>
-        <p CLASS="">This processes the document passed in the buffer named
-      the_input, using a stylesheet found in file "sheet.xsl" in the
-      working directory. We assign 1 to the top-level parameter called
-      "use_defaults". The output goes to stdout by default.
-      </p>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__2013"></a>
-      <h2>
-        <a href="#toc_i__2013">9  References</a>
-      </h2>
-      <DIV>
-        <dl>
-      <dt>
-            <a name="ref-xslt"></a>[XSLT]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/1999/REC-xslt-19991116">
-          XSL Transformations (XSLT) Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-xpath"></a>[XPath]</dt>
-      <dd> 
-        <a href="http://www.w3.org/TR/1999/REC-xpath-19991116">
-          XML Path Language (XPath) Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-xml"></a>[XML]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/1998/REC-xml-19980210">
-          Extensible Markup Language (XML) 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-dom"></a>[DOM]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/REC-DOM-Level-1">
-          Document Object Model Level 1 Specification, Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-rcover"></a>[Cover]</dt>
-      <dd>
-        <a href="http://www.oasis-open.org/cover/sgml-xml.html">
-          The XML Cover Pages</a>
-      </dd>
-      
-      <dt>
-            <a name="ref-xmlorg"></a>[XMLorg]</dt>
-      <dd>
-        <a href="http://xml.org">XML.org</a>
-      </dd>
-
-      <dt>
-            <a name="ref-xslinfo"></a>[XSLINFO]</dt>
-      <dd>
-        <a href="http://www.xslinfo.com">XSLINFO.com</a>
-      </dd>
-
-      <dt>
-            <a name="ref-bible"></a>[XMLBible14]</dt>
-      <dd>
-        <a href="http://metalab.unc.edu/xml/books/bible/updates/14.html">
-          Harold, E. R.: XML Bible, Chapter 14 (online presentation)
-        </a>
-      </dd>
-    </dl>
-      </DIV>
-    </DIV>
-    <hr>
-    <p STYLE="font-style: italic; margin-left: 0">(c) 2000 Ginger Alliance s.r.o.</p>
-  </body>
-</html>
\ No newline at end of file
diff --git a/client/test_fx_out1 b/client/test_fx_out1
deleted file mode 100644
index 6c8e4f4..0000000
--- a/client/test_fx_out1
+++ /dev/null
@@ -1,42 +0,0 @@
-<title>my directory page</title>
-My pages:
-<ul>
-<li> <a href=http://setiathome.ssl.berkeley.edu>SETI at home</a>
-<li> <a href=http://milkyway.ssl.berkeley.edu/davea/>My home page</a>
-<li> <a href=http://alicemclerran.com>AliceMcLerran.com</a>
-<li> <a href=http://setiathome.berkeley.edu/davea/alice/>AliceMcLerran.com staging</a>
-<li> <a href=file:/home/david/tp/html/index.html>Teachpoint local</a>
-<li> <a href=file:/home/david/tp/html/index_dev_local.html>Teachpoint dev local</a>
-<li> <a href=http://www.teachpoint.com>Teachpoint</a>
-<li> <a href=http://www.teachpoint.com/index_dev.html>Teachpoint dev</a>
-<li> <a href=http://setiathome.ssl.berkeley.edu/davea/mx/>ISME</a>
-<li> <a href=https://mail.ud.com>email</a>
-<li> <a href=file:/home/david/papers/sciam/text.html>SciAm paper</a>
-</ul>
-Docs:
-<ul>
-<li><a href=file:/home/david/html/Sablot-0-60.html>Sablot</a>
-<li><a href=file:/home/david/software/expat-1.95.2/doc/reference.html>Expat</a>
-<li><a href=file:/home/david/software/xerces-c1_5_1-linux/doc/html/index.html>Xerces</a>
-<li><a href=file:/home/david/xslt.html>XSLT</a>
-<li><a href=file:/home/david/mysql/manual_toc.html>MySQL</a>
-<li><a href=http://www.garshol.priv.no/download/text/http-tut.html>HTTP explained</a>
-</ul>
-Other pages:
-<ul>
-<li><a href=http://lynnerutter.com>Lynne</a>
-</ul>
-Search:
-<ul>
-<li>
-<form action=http://google.com/search>Google: <input name=q><input type=submit></form>
-<li> <a href=
-http://www.home.zonnet.nl/robschluter/htmltaglist/index_old.html
->HTML tag list</a>
-<li> <a href=http://www.m-w.com/netdict.htm>Dictionary</a>
-<li> <a href=http://world.altavista.com/>translations</a>
-<li> <a href=http://www.whowhere.lycos.com/Phone>People find</a>
-<li> <a href=http://ameritrade.com>Ameritrade</a>
-<li> <a href=http://weather.yahoo.com/>weather</a>
-</ul>
-<p>
diff --git a/client/time_stats.cpp b/client/time_stats.cpp
index d0c90ef..2ccdee1 100644
--- a/client/time_stats.cpp
+++ b/client/time_stats.cpp
@@ -76,7 +76,7 @@ int get_connected_state() {
 const float ALPHA = (SECONDS_PER_DAY*10);
 //const float ALPHA = 60;   // for testing
 
-void TIME_STATS::init() {
+void CLIENT_TIME_STATS::init() {
     last_update = 0;
     first = true;
     on_frac = 1;
@@ -84,6 +84,8 @@ void TIME_STATS::init() {
     active_frac = 1;
     gpu_active_frac = 1;
     cpu_and_network_available_frac = 1;
+    client_start_time = gstate.now;
+    previous_uptime = 0;
     previous_connected_state = CONNECTED_STATE_UNINITIALIZED;
     inactive_start = 0;
     trim_stats_log();
@@ -92,7 +94,7 @@ void TIME_STATS::init() {
 
 // if log file is over a meg, discard everything older than a year
 //
-void TIME_STATS::trim_stats_log() {
+void CLIENT_TIME_STATS::trim_stats_log() {
 #ifndef SIM
     double size;
     char buf[256];
@@ -137,7 +139,7 @@ void send_log_after(const char* filename, double t, MIOFILE& mf) {
 
 // copy the log file after a given time
 //
-void TIME_STATS::get_log_after(double t, MIOFILE& mf) {
+void CLIENT_TIME_STATS::get_log_after(double t, MIOFILE& mf) {
     if (time_stats_log) {
         fclose(time_stats_log);     // win: can't open twice
     }
@@ -150,7 +152,7 @@ void TIME_STATS::get_log_after(double t, MIOFILE& mf) {
 // so these get written to disk only when other activities
 // cause this to happen.  Maybe should change this.
 //
-void TIME_STATS::update(int suspend_reason, int _gpu_suspend_reason) {
+void CLIENT_TIME_STATS::update(int suspend_reason, int _gpu_suspend_reason) {
     double dt, w1, w2;
 
     bool is_active = !(suspend_reason & ~SUSPEND_REASON_CPU_THROTTLE);
@@ -276,21 +278,29 @@ void TIME_STATS::update(int suspend_reason, int _gpu_suspend_reason) {
 
 // Write XML based time statistics
 //
-int TIME_STATS::write(MIOFILE& out, bool to_server) {
+int CLIENT_TIME_STATS::write(MIOFILE& out, bool to_remote) {
     out.printf(
         "<time_stats>\n"
         "    <on_frac>%f</on_frac>\n"
         "    <connected_frac>%f</connected_frac>\n"
         "    <cpu_and_network_available_frac>%f</cpu_and_network_available_frac>\n"
         "    <active_frac>%f</active_frac>\n"
-        "    <gpu_active_frac>%f</gpu_active_frac>\n",
+        "    <gpu_active_frac>%f</gpu_active_frac>\n"
+        "    <client_start_time>%f</client_start_time>\n"
+        "    <previous_uptime>%f</previous_uptime>\n",
         on_frac,
         connected_frac,
         cpu_and_network_available_frac,
         active_frac,
-        gpu_active_frac
+        gpu_active_frac,
+        client_start_time,
+        previous_uptime
     );
-    if (!to_server) {
+    if (to_remote) {
+        out.printf(
+            "    <now>%f</now>\n", gstate.now
+        );
+    } else {
         out.printf(
             "    <last_update>%f</last_update>\n",
             last_update
@@ -302,7 +312,7 @@ int TIME_STATS::write(MIOFILE& out, bool to_server) {
 
 // Parse XML based time statistics, usually from client_state.xml
 //
-int TIME_STATS::parse(XML_PARSER& xp) {
+int CLIENT_TIME_STATS::parse(XML_PARSER& xp) {
     double x;
 #ifdef SIM
     double on_lambda = 3600, connected_lambda = 3600;
@@ -392,27 +402,27 @@ int TIME_STATS::parse(XML_PARSER& xp) {
     return ERR_XML_PARSE;
 }
 
-void TIME_STATS::start() {
+void CLIENT_TIME_STATS::start() {
     time_stats_log = fopen(TIME_STATS_LOG, "a");
     if (time_stats_log) {
         setbuf(time_stats_log, 0);
     }
 }
 
-void TIME_STATS::quit() {
+void CLIENT_TIME_STATS::quit() {
     log_append("power_off", gstate.now);
 }
 
 #ifdef SIM
-void TIME_STATS::log_append(const char* , double ) {}
+void CLIENT_TIME_STATS::log_append(const char* , double ) {}
 #else
-void TIME_STATS::log_append(const char* msg, double t) {
+void CLIENT_TIME_STATS::log_append(const char* msg, double t) {
     if (!time_stats_log) return;
     fprintf(time_stats_log, "%f %s\n", t, msg);
 }
 #endif
 
-void TIME_STATS::log_append_net(int new_state) {
+void CLIENT_TIME_STATS::log_append_net(int new_state) {
     switch(new_state) {
     case CONNECTED_STATE_NOT_CONNECTED:
         log_append("net_not_connected", gstate.now);
diff --git a/client/time_stats.h b/client/time_stats.h
index 9abc4d3..dfc3fba 100644
--- a/client/time_stats.h
+++ b/client/time_stats.h
@@ -18,32 +18,16 @@
 #ifndef _TIME_STATS_
 #define _TIME_STATS_
 
-#include "miofile.h"
 #include <vector>
 
-struct TIME_STATS {
+#include "miofile.h"
+#include "common_defs.h"
+
+struct CLIENT_TIME_STATS : TIME_STATS {
     bool first;
     int previous_connected_state;
 
     double last_update;
-// we maintain an exponentially weighted average of these quantities:
-    double on_frac;
-        // the fraction of total time this host runs the client
-    double connected_frac;
-        // of the time this host runs the client,
-        // the fraction it is connected to the Internet,
-        // or -1 if not known
-    double cpu_and_network_available_frac;
-        // of the time this host runs the client,
-        // the fraction it is connected to the Internet
-        // AND network usage is allowed (by prefs and user toggle)
-        // AND CPU usage is allowed
-    double active_frac;
-        // of the time this host runs the client,
-        // the fraction it is enabled to use CPU
-        // (as determined by preferences, manual suspend/resume, etc.)
-    double gpu_active_frac;
-        // same, GPU
 
     FILE* time_stats_log;
     double inactive_start;
@@ -51,7 +35,7 @@ struct TIME_STATS {
     void update(int suspend_reason, int gpu_suspend_reason);
 
     void init();
-    int write(MIOFILE&, bool to_server);
+    int write(MIOFILE&, bool to_remote);
     int parse(XML_PARSER&);
 
     double availability_frac(int rsc_type) {
diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp
index e7384dc..e98bfed 100644
--- a/client/work_fetch.cpp
+++ b/client/work_fetch.cpp
@@ -187,6 +187,7 @@ void RSC_WORK_FETCH::rr_init() {
     deadline_missed_instances = 0;
     saturated_time = 0;
     busy_time_estimator.reset();
+    sim_used_instances = 0;
 }
 
 void RSC_WORK_FETCH::accumulate_shortfall(double d_time) {
@@ -204,6 +205,7 @@ void RSC_WORK_FETCH::accumulate_shortfall(double d_time) {
 
 void RSC_WORK_FETCH::update_saturated_time(double dt) {
     double idle = ninstances - sim_nused;
+    //msg_printf(0, MSG_INFO, "update_saturated rsc %d idle %f dt %f", rsc_type, idle, dt);
     if (idle < 1e-6) {
         saturated_time = dt;
     }
@@ -222,6 +224,10 @@ static bool wacky_dcf(PROJECT* p) {
 // If this resource is below min buffer level,
 // return the highest-priority project that may have jobs for it.
 //
+// It the resource has instanced starved because of exclusions,
+// return the highest-priority project that may have jobs
+// and doesn't exclude those instances.
+//
 // If strict is true, enforce hysteresis and backoff rules
 // (which are there to limit rate of scheduler RPCs).
 // Otherwise, we're going to do a scheduler RPC anyway
@@ -230,12 +236,21 @@ static bool wacky_dcf(PROJECT* p) {
 //
 PROJECT* RSC_WORK_FETCH::choose_project_hyst(bool strict) {
     PROJECT* pbest = NULL;
+    bool buffer_low = true;
     if (strict) {
-        if (saturated_time > gstate.work_buf_min()) return NULL;
+        if (saturated_time > gstate.work_buf_min()) buffer_low = false;
     } else {
-        if (saturated_time > gstate.work_buf_total()) return NULL;
+        if (saturated_time > gstate.work_buf_total()) buffer_low = false;
+    }
+
+    if (log_flags.work_fetch_debug) {
+        msg_printf(0, MSG_INFO,
+            "[work_fetch] buffer_low: %s; sim_excluded_instances %d\n",
+            buffer_low?"yes":"no", sim_excluded_instances
+        );
     }
-    if (saturated_time > gstate.work_buf_total()) return NULL;
+
+    if (!buffer_low && !sim_excluded_instances) return NULL;
 
     for (unsigned i=0; i<gstate.projects.size(); i++) {
         PROJECT* p = gstate.projects[i];
@@ -270,11 +285,11 @@ PROJECT* RSC_WORK_FETCH::choose_project_hyst(bool strict) {
         // computing shortfall etc. on a per-project basis
         //
         if (rsc_type) {
-            int n_not_excluded = ninstances - p->ncoprocs_excluded[rsc_type];
+            int n_not_excluded = ninstances - p->rsc_pwf[rsc_type].ncoprocs_excluded;
             if (n_not_excluded == 0) {
                 continue;
             }
-            if (p->ncoprocs_excluded[rsc_type]
+            if (p->rsc_pwf[rsc_type].ncoprocs_excluded
                 && p->rsc_pwf[rsc_type].n_runnable_jobs > n_not_excluded
             ) {
                 continue;
@@ -283,6 +298,16 @@ PROJECT* RSC_WORK_FETCH::choose_project_hyst(bool strict) {
 
         RSC_PROJECT_WORK_FETCH& rpwf = project_state(p);
         if (rpwf.anon_skip) continue;
+
+        // if we're sending work only because of exclusion starvation,
+        // make sure this project can use the starved instances
+        //
+        if (!buffer_low) {
+            if ((sim_excluded_instances & rpwf.non_excluded_instances) == 0) {
+                continue;
+            }
+        }
+
         if (pbest) {
             if (pbest->sched_priority > p->sched_priority) {
                 continue;
@@ -292,7 +317,11 @@ PROJECT* RSC_WORK_FETCH::choose_project_hyst(bool strict) {
     }
     if (!pbest) return NULL;
     work_fetch.clear_request();
-    work_fetch.set_all_requests_hyst(pbest, rsc_type);
+    if (buffer_low) {
+        work_fetch.set_all_requests_hyst(pbest, rsc_type);
+    } else {
+        set_request_excluded(pbest);
+    }
     return pbest;
 }
 
@@ -442,6 +471,29 @@ void RSC_WORK_FETCH::set_request(PROJECT* p) {
     }
 }
 
+// We're fetching work because some instances are starved because
+// of exclusions.
+// See how many N of these instances are not excluded for this project.
+// Ask for N instances and for N*work_buf_min seconds.
+//
+void RSC_WORK_FETCH::set_request_excluded(PROJECT* p) {
+    RSC_PROJECT_WORK_FETCH& pwf = project_state(p);
+
+    int inst_mask = sim_excluded_instances & pwf.non_excluded_instances;
+    int n = 0;
+    for (int i=0; i<ninstances; i++) {
+        if ((i<<i) & inst_mask) {
+            n++;
+        }
+    }
+    req_instances = n;
+    if (p->resource_share == 0 || config.fetch_minimal_work) {
+        req_secs = 1;
+    } else {
+        req_secs = n*gstate.work_buf_total();
+    }
+}
+
 void RSC_WORK_FETCH::print_state(const char* name) {
     msg_printf(0, MSG_INFO,
         "[work_fetch] %s: shortfall %.2f nidle %.2f saturated %.2f busy %.2f",
@@ -481,11 +533,14 @@ int PROJECT_WORK_FETCH::compute_cant_fetch_work_reason(PROJECT* p) {
     if (p->non_cpu_intensive) return CANT_FETCH_WORK_NON_CPU_INTENSIVE;
     if (p->suspended_via_gui) return CANT_FETCH_WORK_SUSPENDED_VIA_GUI;
     if (p->master_url_fetch_pending) return CANT_FETCH_WORK_MASTER_URL_FETCH_PENDING;
-    if (p->min_rpc_time > gstate.now) return CANT_FETCH_WORK_MIN_RPC_TIME;
     if (p->dont_request_more_work) return CANT_FETCH_WORK_DONT_REQUEST_MORE_WORK;
     if (p->some_download_stalled()) return CANT_FETCH_WORK_DOWNLOAD_STALLED;
     if (p->some_result_suspended()) return CANT_FETCH_WORK_RESULT_SUSPENDED;
     if (p->too_many_uploading_results) return CANT_FETCH_WORK_TOO_MANY_UPLOADS;
+
+    // this goes last
+    //
+    if (p->min_rpc_time > gstate.now) return CANT_FETCH_WORK_MIN_RPC_TIME;
     return 0;
 }
 
@@ -877,7 +932,7 @@ void WORK_FETCH::set_initial_work_request(PROJECT* p) {
         rsc_work_fetch[i].req_secs = 1;
         if (i) {
             RSC_WORK_FETCH& rwf = rsc_work_fetch[i];
-            if (rwf.ninstances ==  p->ncoprocs_excluded[i]) {
+            if (rwf.ninstances ==  p->rsc_pwf[i].ncoprocs_excluded) {
                 rsc_work_fetch[i].req_secs = 0;
             }
         }
diff --git a/client/work_fetch.h b/client/work_fetch.h
index 975d145..4f1a1d3 100644
--- a/client/work_fetch.h
+++ b/client/work_fetch.h
@@ -100,6 +100,11 @@ struct RSC_PROJECT_WORK_FETCH {
     int n_runnable_jobs;
     double sim_nused;
     double nused_total;     // sum of instances over all runnable jobs
+    int ncoprocs_excluded;
+        // number of excluded instances
+    int non_excluded_instances;
+        // bitmap of non-excluded instances
+        // (i.e. instances this project's jobs can run on)
     int deadlines_missed;
     int deadlines_missed_copy;
         // copy of the above used during schedule_cpus()
@@ -116,6 +121,8 @@ struct RSC_PROJECT_WORK_FETCH {
         n_runnable_jobs = 0;
         sim_nused = 0;
         nused_total = 0;
+        ncoprocs_excluded = 0;
+        non_excluded_instances = 0;
         deadlines_missed = 0;
         deadlines_missed_copy = 0;
     }
@@ -201,6 +208,11 @@ struct RSC_WORK_FETCH {
         // seconds of idle instances between now and now+work_buf_total()
     double nidle_now;
     double sim_nused;
+    int sim_used_instances;
+        // bitmap of instances used in simulation,
+        // taking into account GPU exclusions
+    int sim_excluded_instances;
+        // bitmap of instances not used (i.e. starved because of exclusion)
     double total_fetchable_share;
         // total RS of projects from which we could fetch jobs for this device
     double saturated_time;
@@ -241,6 +253,7 @@ struct RSC_WORK_FETCH {
     void print_state(const char*);
     void clear_request();
     void set_request(PROJECT*);
+    void set_request_excluded(PROJECT*);
     bool may_have_work(PROJECT*);
     RSC_WORK_FETCH() {
         rsc_type = 0;
diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp
index d9ef683..f8ab2d6 100644
--- a/clientgui/BOINCGUIApp.cpp
+++ b/clientgui/BOINCGUIApp.cpp
@@ -928,12 +928,19 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
             m_pConfig->SetPath(wxT("/Simple"));
             m_pConfig->Read(wxT("YPos"), &iTop, 30);
             m_pConfig->Read(wxT("XPos"), &iLeft, 30);
+
+            // We don't save Simple View's width & height since it's 
+            // window is not resizable, so don't try to read them
 #ifdef __WXMAC__
-            m_pConfig->Read(wxT("Width"), &iWidth, 409);
-            m_pConfig->Read(wxT("Height"), &iHeight, 561);
+//            m_pConfig->Read(wxT("Width"), &iWidth, 409);
+//            m_pConfig->Read(wxT("Height"), &iHeight, 561);
+            iWidth = 409;
+            iHeight = 561;
 #else
-            m_pConfig->Read(wxT("Width"), &iWidth, 416);
-            m_pConfig->Read(wxT("Height"), &iHeight, 570);
+//            m_pConfig->Read(wxT("Width"), &iWidth, 416);
+//            m_pConfig->Read(wxT("Height"), &iHeight, 570);
+            iWidth = 416;
+            iHeight = 570;
 #endif
         }
 
diff --git a/clientgui/BOINCListCtrl.cpp b/clientgui/BOINCListCtrl.cpp
index 7a6410d..c6c174b 100644
--- a/clientgui/BOINCListCtrl.cpp
+++ b/clientgui/BOINCListCtrl.cpp
@@ -267,7 +267,7 @@ wxListItemAttr* CBOINCListCtrl::OnGetItemAttr(long item) const {
 
 void CBOINCListCtrl::DrawProgressBars()
 {
-    long topItem, numItems, numVisibleItems, i, row;
+    long topItem, numItems, numVisibleItems, row;
     wxRect r, rr;
     int w = 0, x = 0, xx, yy, ww;
     int progressColumn = m_pParentView->GetProgressColumn();
@@ -300,7 +300,7 @@ void CBOINCListCtrl::DrawProgressBars()
         if (numItems <= (topItem + numVisibleItems)) numVisibleItems = numItems - topItem;
 
         x = 0;
-        for (i=0; i< progressColumn; i++) {
+        for (int i=0; i< progressColumn; i++) {
             x += GetColumnWidth(i);
         }
         w = GetColumnWidth(progressColumn);
diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp
index be3bbb8..3a2d763 100644
--- a/clientgui/MainDocument.cpp
+++ b/clientgui/MainDocument.cpp
@@ -906,8 +906,8 @@ void CMainDocument::RunPeriodicRPCs(int frameRefreshRate) {
         pFrame->AddPendingEvent(event);
         CTaskBarIcon* pTaskbar = wxGetApp().GetTaskBarIcon();
         if (pTaskbar) {
-            CTaskbarEvent event(wxEVT_TASKBAR_REFRESH, pTaskbar);
-            pTaskbar->AddPendingEvent(event);
+            CTaskbarEvent tbevent(wxEVT_TASKBAR_REFRESH, pTaskbar);
+            pTaskbar->AddPendingEvent(tbevent);
         }
         CDlgEventLog* eventLog = wxGetApp().GetEventLog();
         if (eventLog) {
@@ -1303,10 +1303,10 @@ PROJECT* CMainDocument::project(unsigned int i) {
 
 
 PROJECT* CMainDocument::project(char* url) {
-	for (unsigned int i=0; i< state.projects.size(); i++) {
-		PROJECT* tp = state.projects[i];
-		if (!strcmp(url, tp->master_url)) return tp;
-	}
+    for (unsigned int i=0; i< state.projects.size(); i++) {
+        PROJECT* tp = state.projects[i];
+        if (!strcmp(url, tp->master_url)) return tp;
+    }
     return NULL;
 }
 
@@ -1528,7 +1528,9 @@ int CMainDocument::WorkResume(char* url, char* name) {
 // 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(
+    RESULT* rp, int slot
+) {
     bool exited = false;
     std::vector<RUNNING_GFX_APP>::iterator gfx_app_iter;
     
@@ -1536,7 +1538,7 @@ RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(RESULT* result, int slot)
         gfx_app_iter != m_running_gfx_apps.end(); 
         gfx_app_iter++
     ) {
-         if ( (slot >= 0) && ((*gfx_app_iter).slot != slot) ) continue;
+         if ((slot >= 0) && ((*gfx_app_iter).slot != slot)) continue;
 
 #ifdef _WIN32
         unsigned long exit_code;
@@ -1551,8 +1553,9 @@ RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(RESULT* result, int slot)
         }
 #endif
         if (! exited) {
-            if ( (result->name == (*gfx_app_iter).name) &&
-                (result->project_url == (*gfx_app_iter).project_url) ) {
+            if ((rp->name == (*gfx_app_iter).name) &&
+                (rp->project_url == (*gfx_app_iter).project_url)
+            ) {
                 return &(*gfx_app_iter);
             }
     
@@ -1660,15 +1663,15 @@ void CMainDocument::KillGraphicsApp(int pid) {
 }
 #endif
 
-int CMainDocument::WorkShowGraphics(RESULT* result) {
+int CMainDocument::WorkShowGraphics(RESULT* rp) {
     int iRetVal = 0;
     
-    if (strlen(result->web_graphics_url)) {
-        wxString url(result->web_graphics_url, wxConvUTF8);
+    if (strlen(rp->web_graphics_url)) {
+        wxString url(rp->web_graphics_url, wxConvUTF8);
         wxLaunchDefaultBrowser(url);
         return 0;
     }
-    if (strlen(result->graphics_exec_path)) {
+    if (strlen(rp->graphics_exec_path)) {
         // V6 Graphics
         RUNNING_GFX_APP gfx_app;
         RUNNING_GFX_APP* previous_gfx_app;
@@ -1680,12 +1683,12 @@ int CMainDocument::WorkShowGraphics(RESULT* result) {
         int      id;
 #endif
 
-        p = strrchr((char*)result->slot_path, '/');
+        p = strrchr((char*)rp->slot_path, '/');
         if (!p) return ERR_INVALID_PARAM;
         slot = atoi(p+1);
         
         // See if we are already running the graphics application for this task
-        previous_gfx_app = GetRunningGraphicsApp(result, slot);
+        previous_gfx_app = GetRunningGraphicsApp(rp, slot);
 
 #ifndef __WXMSW__
         char* argv[4];
@@ -1709,13 +1712,13 @@ int CMainDocument::WorkShowGraphics(RESULT* result) {
         // exits with "RegisterProcess failed (error = -50)" unless 
         // we pass its full path twice in the argument list to execv.
         //
-        argv[1] = (char *)result->graphics_exec_path;
-        argv[2] = (char *)result->graphics_exec_path;
+        argv[1] = (char *)rp->graphics_exec_path;
+        argv[2] = (char *)rp->graphics_exec_path;
         argv[3] = 0;
     
          if (g_use_sandbox) {
             iRetVal = run_program(
-                result->slot_path,
+                rp->slot_path,
                "../../switcher/switcher",
                 3,
                 argv,
@@ -1724,8 +1727,8 @@ int CMainDocument::WorkShowGraphics(RESULT* result) {
             );
         } else {        
             iRetVal = run_program(
-                result->slot_path,
-                result->graphics_exec_path,
+                rp->slot_path,
+                rp->graphics_exec_path,
                 1,
                 &argv[2],
                 0,
@@ -1741,8 +1744,8 @@ int CMainDocument::WorkShowGraphics(RESULT* result) {
         argv[0] = 0;
         
         iRetVal = run_program(
-            result->slot_path,
-            result->graphics_exec_path,
+            rp->slot_path,
+            rp->graphics_exec_path,
             0,
             argv,
             0,
@@ -1751,8 +1754,8 @@ int CMainDocument::WorkShowGraphics(RESULT* result) {
 #endif
         if (!iRetVal) {
             gfx_app.slot = slot;
-            gfx_app.project_url = result->project_url;
-            gfx_app.name = result->name;
+            gfx_app.project_url = rp->project_url;
+            gfx_app.name = rp->name;
             gfx_app.pid = id;
             m_running_gfx_apps.push_back(gfx_app);
         }
@@ -1775,32 +1778,32 @@ int CMainDocument::WorkShowVMConsole(RESULT* result) {
         strCommand = wxT("rdesktop-vrdp ") + strConnection;
         wxExecute(strCommand);
 #elif defined(__WXMAC__)
-    FSRef theFSRef;
-    OSStatus status = noErr;
+        FSRef theFSRef;
+        OSStatus status = noErr;
 
-    // I have found no reliable way to pass the IP address and port to Microsoft's 
-    // Remote Desktop Connection application for the Mac, so I'm using CoRD.  
-    // Unfortunately, CoRD does not seem as reliable as I would like either.
-    //
-    // First try to find the CoRD application by Bundle ID and Creator Code
-    status = LSFindApplicationForInfo('RDC#', CFSTR("net.sf.cord"),   
+        // I have found no reliable way to pass the IP address and port to Microsoft's 
+        // Remote Desktop Connection application for the Mac, so I'm using CoRD.  
+        // Unfortunately, CoRD does not seem as reliable as I would like either.
+        //
+        // First try to find the CoRD application by Bundle ID and Creator Code
+        status = LSFindApplicationForInfo('RDC#', CFSTR("net.sf.cord"),   
                                         NULL, &theFSRef, NULL);
-    if (status != noErr) {
-        CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
-        if (pFrame) {
-            pFrame->ShowAlert(
-                _("Missing application"), 
-                _("Please download and install the CoRD application from http://cord.sourceforge.net"),
-                wxOK | wxICON_INFORMATION,
+        if (status != noErr) {
+            CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
+            if (pFrame) {
+                pFrame->ShowAlert(
+                    _("Missing application"), 
+                    _("Please download and install the CoRD application from http://cord.sourceforge.net"),
+                    wxOK | wxICON_INFORMATION,
                     false
                 );
-        } 
-        return ERR_FILE_MISSING;
-    }
+            } 
+            return ERR_FILE_MISSING;
+        }
 
-    strCommand = wxT("osascript -e 'tell application \"CoRD\"' -e 'activate' -e 'open location \"rdp://") + strConnection + wxT("\"' -e 'end tell'");
-    strCommand.Replace(wxT("localhost"), wxT("127.0.0.1"));
-    system(strCommand.char_str());
+        strCommand = wxT("osascript -e 'tell application \"CoRD\"' -e 'activate' -e 'open location \"rdp://") + strConnection + wxT("\"' -e 'end tell'");
+        strCommand.Replace(wxT("localhost"), wxT("127.0.0.1"));
+        system(strCommand.char_str());
 #endif
     }
 
@@ -2377,11 +2380,11 @@ int CMainDocument::GetSimpleGUIWorkCount() {
     CachedSimpleGUIUpdate();
     CachedStateUpdate();
 
-	for(i=0; i<results.results.size(); i++) {
-		if (results.results[i]->active_task) {
-			iCount++;
-		}
-	}
+    for(i=0; i<results.results.size(); i++) {
+        if (results.results[i]->active_task) {
+            iCount++;
+        }
+    }
     return iCount;
 }
 
@@ -2403,12 +2406,17 @@ wxString suspend_reason_wxstring(int reason) {
     return _("unknown reason");
 }
 
+bool uses_gpu(RESULT* r) {
+	// kludge.  But r->avp isn't populated.
+    return (strstr(r->resources, "GPU") != NULL);
+}
+
 wxString result_description(RESULT* result, bool show_resources) {
     CMainDocument* doc = wxGetApp().GetDocument();
     PROJECT* project;
     CC_STATUS       status;
     int             retval;
-	wxString strBuffer= wxEmptyString;
+    wxString strBuffer= wxEmptyString;
 
     strBuffer.Clear();
     retval = doc->GetCoreClientStatus(status);
@@ -2421,7 +2429,7 @@ wxString result_description(RESULT* result, bool show_resources) {
     }
 
     project = doc->state.lookup_project(result->project_url);
-	int throttled = status.task_suspend_reason & SUSPEND_REASON_CPU_THROTTLE;
+    int throttled = status.task_suspend_reason & SUSPEND_REASON_CPU_THROTTLE;
     switch(result->state) {
     case RESULT_NEW:
         strBuffer += _("New"); 
@@ -2449,6 +2457,13 @@ wxString result_description(RESULT* result, bool show_resources) {
             if (strlen(result->resources) && show_resources) {
                 strBuffer += wxString(wxT(" (")) + wxString(result->resources, wxConvUTF8) + wxString(wxT(")"));
             }
+        } else if (status.gpu_suspend_reason && uses_gpu(result)) {
+            strBuffer += _("GPU suspended - ");
+            strBuffer += suspend_reason_wxstring(status.gpu_suspend_reason);
+            if (strlen(result->resources) && show_resources) {
+                strBuffer += wxString(wxT(" (")) + wxString(result->resources, wxConvUTF8) + wxString(wxT(")"));
+            }
+        } else if (status.gpu_suspend_reason && uses_gpu(result)) {
         } else if (result->active_task) {
             if (result->too_large) {
                 strBuffer += _("Waiting for memory");
diff --git a/clientgui/Makefile.am b/clientgui/Makefile.am
index 5a9ed33..2be390c 100644
--- a/clientgui/Makefile.am
+++ b/clientgui/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 24510 2011-11-03 02:35:04Z romw $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/clientgui/ViewMessages.cpp b/clientgui/ViewMessages.cpp
index cb07fdf..41d397e 100644
--- a/clientgui/ViewMessages.cpp
+++ b/clientgui/ViewMessages.cpp
@@ -614,4 +614,4 @@ bool CViewMessages::CloseClipboard() {
 #endif
 
 
-const char *BOINC_RCSID_0be7149475 = "$Id: ViewMessages.cpp 21706 2010-06-08 18:56:53Z davea $";
+const char *BOINC_RCSID_0be7149475 = "$Id$";
diff --git a/clientgui/_wx_intellisense.h b/clientgui/_wx_intellisense.h
deleted file mode 100644
index 1913071..0000000
--- a/clientgui/_wx_intellisense.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * This file enables intellisense for wxWindows. It is included in the project,
- * but never actually included in any cpp source.
- *
- * It needs to be opened once to create the *.ncb file.
- * You can close this file now.
- * 
- * NOTE: To enable intellisense for your other projects, copy this file to the project
- * and include it in your workspace. Then open the file and close it again to give
- * Visual Studio the opportunity to parse the file and add its contents to intellisense.
- */
-#include <wx/msw/__wx_intellisense_inc.h>
-
diff --git a/clientgui/mac/CE_ss_logo.tiff b/clientgui/mac/CE_ss_logo.tiff
new file mode 100644
index 0000000..308454b
Binary files /dev/null and b/clientgui/mac/CE_ss_logo.tiff differ
diff --git a/clientgui/mac/MacAccessiblity.cpp b/clientgui/mac/MacAccessiblity.cpp
new file mode 100755
index 0000000..fca045f
--- /dev/null
+++ b/clientgui/mac/MacAccessiblity.cpp
@@ -0,0 +1,1902 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2009 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+//  macAccessiblity.cpp
+
+#include <Carbon/Carbon.h>
+
+#include "stdwx.h"
+#include "BOINCGUIApp.h"
+#include "BOINCBaseFrame.h"
+#include "BOINCBaseView.h"
+#include "DlgEventLog.h"
+#include "MainDocument.h"
+#include "AdvancedFrame.h"
+#include "BOINCListCtrl.h"
+#include "DlgEventLogListCtrl.h"
+#include "ProjectListCtrl.h"
+#include "NoticeListCtrl.h"
+#include "ViewStatistics.h"
+#include "wxPieCtrl.h"
+#include "sg_BoincSimpleGUI.h"
+#include "Events.h"
+#include "macAccessiblity.h"
+
+#define MAX_LIST_COL 100
+
+UInt64 makeElementIdentifier(SInt32 row, SInt32 col, Boolean isHeader) {
+    UInt64 id = (((row + 1) * MAX_LIST_COL) + (col + 1)) * 2;
+    if (isHeader) id |= 1;
+return id;
+}
+
+void parseElementIdentifier(UInt64 inIdentifier, SInt32& row, SInt32&col, Boolean& isHeader) {
+    isHeader = inIdentifier & 1;
+    row = (inIdentifier / (MAX_LIST_COL * 2)) - 1;
+    col = ((inIdentifier / 2) % MAX_LIST_COL) - 1;
+}
+
+void AccessibilityIgnoreAllChildren(HIViewRef parent, int recursionLevel) {
+    HIViewRef       child;
+    OSStatus        err;
+    
+    if (recursionLevel > 100) {
+        fprintf(stderr, "Error: AccessibilityIgnoreAllChildren recursion level > 100\n");
+        return;
+    }
+
+    child = HIViewGetFirstSubview(parent);
+    while (child) {
+        err = HIObjectSetAccessibilityIgnored((HIObjectRef)child, true);
+        AccessibilityIgnoreAllChildren(child, recursionLevel + 1);
+        child = HIViewGetNextView(child);
+    }
+}
+
+
+pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
+                                    EventRef inEvent, void* pData);
+
+pascal OSStatus HTMLListAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
+                                    EventRef inEvent, void* pData);
+
+    static EventTypeSpec myAccessibilityEvents[] = {
+                                    { kEventClassAccessibility, kEventAccessibleGetChildAtPoint },
+                                    { kEventClassAccessibility, kEventAccessibleGetFocusedChild },
+                                    { kEventClassAccessibility, kEventAccessibleGetAllAttributeNames },
+                                    { kEventClassAccessibility, kEventAccessibleGetAllParameterizedAttributeNames },
+                                    { kEventClassAccessibility, kEventAccessibleIsNamedAttributeSettable },
+                                    { kEventClassAccessibility, kEventAccessibleSetNamedAttribute },
+                                    { kEventClassAccessibility, kEventAccessibleGetNamedAttribute },
+                                    { kEventClassAccessibility, kEventAccessibleGetAllActionNames },			
+                                    { kEventClassAccessibility, kEventAccessibleGetNamedActionDescription },
+                                    { kEventClassAccessibility, kEventAccessiblePerformNamedAction }			
+                                };
+
+
+    static EventTypeSpec Simple_AccessibilityEvents[] = {
+                                    { kEventClassAccessibility, kEventAccessibleGetNamedAttribute }			
+                                };
+
+pascal OSStatus SimpleAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
+                                    EventRef inEvent, void* pData);
+
+pascal OSStatus PieCtrlAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
+                                    EventRef inEvent, void* pData);
+
+
+
+#if !USE_NATIVE_LISTCONTROL
+void CBOINCListCtrl::SetupMacAccessibilitySupport() {
+    HIViewRef                       listControlView;
+    HIViewRef                       headerView;
+    HIViewRef                       bodyView;
+    SInt32                          response;
+    Boolean                         snowLeopard;
+    OSErr                           err;
+
+    err = Gestalt(gestaltSystemVersion, &response);
+    snowLeopard = (err == noErr) && (response >= 0x1060);
+    
+    listControlView = (HIViewRef)GetHandle();
+    headerView = HIViewGetFirstSubview(listControlView);
+    bodyView = HIViewGetNextView(headerView);
+    err = HIViewSetEnabled(headerView, true);
+
+    accessibilityHandlerData.pList = (wxGenericListCtrl*)this;
+    accessibilityHandlerData.pView = m_pParentView;
+    accessibilityHandlerData.pEventLog = NULL;
+    accessibilityHandlerData.bodyView = bodyView;
+    accessibilityHandlerData.headerView = headerView;
+    accessibilityHandlerData.snowLeopard = snowLeopard;
+    
+    err = InstallHIObjectEventHandler((HIObjectRef)bodyView, NewEventHandlerUPP(BOINCListAccessibilityEventHandler), 
+                                sizeof(myAccessibilityEvents) / sizeof(EventTypeSpec), myAccessibilityEvents, 
+                                                        &accessibilityHandlerData, &m_pBodyAccessibilityEventHandlerRef); 
+
+    err = InstallHIObjectEventHandler((HIObjectRef)headerView, NewEventHandlerUPP(BOINCListAccessibilityEventHandler), 
+                                sizeof(myAccessibilityEvents) / sizeof(EventTypeSpec), myAccessibilityEvents, 
+                                                        &accessibilityHandlerData, &m_pHeaderAccessibilityEventHandlerRef); 
+}
+
+
+void CBOINCListCtrl::RemoveMacAccessibilitySupport() {
+    ::RemoveEventHandler(m_pBodyAccessibilityEventHandlerRef);
+    ::RemoveEventHandler(m_pHeaderAccessibilityEventHandlerRef);
+}
+#endif
+
+
+void CDlgEventLogListCtrl::SetupMacAccessibilitySupport() {
+#if !USE_NATIVE_LISTCONTROL
+    HIViewRef                       listControlView;
+    HIViewRef                       headerView;
+    HIViewRef                       bodyView;
+    SInt32                          response;
+    Boolean                         snowLeopard;
+    OSErr                           err;
+
+    err = Gestalt(gestaltSystemVersion, &response);
+    snowLeopard = (err == noErr) && (response >= 0x1060);
+
+    listControlView = (HIViewRef)GetHandle();
+     headerView = HIViewGetFirstSubview(listControlView);
+     bodyView = HIViewGetNextView(headerView);
+     err = HIViewSetEnabled(headerView, true);
+    
+    accessibilityHandlerData.pList = (wxGenericListCtrl*)this;
+    accessibilityHandlerData.pView = NULL;
+    accessibilityHandlerData.pEventLog = m_pParentView;
+    accessibilityHandlerData.bodyView = bodyView;
+    accessibilityHandlerData.headerView = headerView;
+    accessibilityHandlerData.snowLeopard = snowLeopard;
+
+    err = InstallHIObjectEventHandler((HIObjectRef)bodyView, NewEventHandlerUPP(BOINCListAccessibilityEventHandler), 
+                                sizeof(myAccessibilityEvents) / sizeof(EventTypeSpec), myAccessibilityEvents, 
+                                                        &accessibilityHandlerData, &m_pBodyAccessibilityEventHandlerRef); 
+
+    err = InstallHIObjectEventHandler((HIObjectRef)headerView, NewEventHandlerUPP(BOINCListAccessibilityEventHandler), 
+                                sizeof(myAccessibilityEvents) / sizeof(EventTypeSpec), myAccessibilityEvents, 
+                                                        &accessibilityHandlerData, &m_pHeaderAccessibilityEventHandlerRef); 
+#endif
+}
+
+
+void CDlgEventLogListCtrl::RemoveMacAccessibilitySupport() {
+#if !USE_NATIVE_LISTCONTROL
+    ::RemoveEventHandler(m_pBodyAccessibilityEventHandlerRef);
+    ::RemoveEventHandler(m_pHeaderAccessibilityEventHandlerRef);
+#endif
+}
+
+
+typedef struct {
+    CProjectListCtrlAccessible* pProjectListCtrlAccessible;
+    CNoticeListCtrlAccessible*  pNoticeListCtrlAccessible;
+} HTMLListAccessibilityHandlerData;
+
+
+void CProjectListCtrlAccessible::SetupMacAccessibilitySupport() {
+    static      HTMLListAccessibilityHandlerData userData;
+    OSErr       err;
+
+    CProjectListCtrl* pCtrl = wxDynamicCast(mp_win, CProjectListCtrl);
+    wxASSERT(pCtrl);
+    
+    if (pCtrl)
+    {
+        m_listView = (HIViewRef)pCtrl->GetHandle();
+        err = HIViewSetEnabled(m_listView, true);
+        userData.pProjectListCtrlAccessible = this;
+        userData.pNoticeListCtrlAccessible = NULL;
+    
+        err = InstallHIObjectEventHandler((HIObjectRef)m_listView, NewEventHandlerUPP(HTMLListAccessibilityEventHandler), 
+                                sizeof(myAccessibilityEvents) / sizeof(EventTypeSpec), myAccessibilityEvents, 
+                                                        &userData, &m_plistAccessibilityEventHandlerRef);
+    } else {
+        m_plistAccessibilityEventHandlerRef =  NULL;
+    }
+}
+
+
+void CProjectListCtrlAccessible::RemoveMacAccessibilitySupport() {
+    if (m_plistAccessibilityEventHandlerRef) {
+        ::RemoveEventHandler(m_plistAccessibilityEventHandlerRef);
+        m_plistAccessibilityEventHandlerRef = NULL;
+   }
+}
+
+
+void CNoticeListCtrlAccessible::SetupMacAccessibilitySupport() {
+    static      HTMLListAccessibilityHandlerData userData;
+    OSErr       err;
+
+    CNoticeListCtrl* pCtrl = wxDynamicCast(mp_win, CNoticeListCtrl);
+    wxASSERT(pCtrl);
+    
+    if (pCtrl)
+    {
+        m_listView = (HIViewRef)pCtrl->GetHandle();
+        err = HIViewSetEnabled(m_listView, true);
+        userData.pProjectListCtrlAccessible = NULL;
+        userData.pNoticeListCtrlAccessible = this;
+    
+        err = InstallHIObjectEventHandler((HIObjectRef)m_listView, NewEventHandlerUPP(HTMLListAccessibilityEventHandler), 
+                                sizeof(myAccessibilityEvents) / sizeof(EventTypeSpec), myAccessibilityEvents, 
+                                                        &userData, &m_plistAccessibilityEventHandlerRef);
+    } else {
+        m_plistAccessibilityEventHandlerRef =  NULL;
+    }
+}
+
+
+void CNoticeListCtrlAccessible::RemoveMacAccessibilitySupport() {
+    if (m_plistAccessibilityEventHandlerRef) {
+        ::RemoveEventHandler(m_plistAccessibilityEventHandlerRef);
+        m_plistAccessibilityEventHandlerRef = NULL;
+   }
+}
+
+
+void CSimplePanel::SetupMacAccessibilitySupport() {
+    OSStatus        err;
+    wxString        str = _("for accessibility support, please select advanced from the view menu or type command shift a");
+    HIViewRef       simple = (HIViewRef)GetHandle();
+    CFStringRef     description = CFStringCreateWithCString(NULL, str.char_str(), kCFStringEncodingUTF8);
+                                               
+    // Have the screen reader tell user to switch to advanced view.
+    HIObjectSetAuxiliaryAccessibilityAttribute((HIObjectRef)simple, 0, kAXDescriptionAttribute, description);
+    CFRelease( description );
+
+    err = InstallHIObjectEventHandler((HIObjectRef)simple, NewEventHandlerUPP(SimpleAccessibilityEventHandler), 
+                                sizeof(Simple_AccessibilityEvents) / sizeof(EventTypeSpec), Simple_AccessibilityEvents, 
+                                                        this, &m_pSGAccessibilityEventHandlerRef);
+}
+
+
+void CSimplePanel::RemoveMacAccessibilitySupport() {
+    if (m_pSGAccessibilityEventHandlerRef) {
+        ::RemoveEventHandler(m_pSGAccessibilityEventHandlerRef);
+        m_pSGAccessibilityEventHandlerRef = NULL;
+   }
+}
+
+
+void CTaskItemGroup::SetupMacAccessibilitySupport() {
+    OSStatus        err;
+    HIViewRef       boxView = (HIViewRef)m_pStaticBox->GetHandle();
+
+    if (m_pTaskGroupAccessibilityEventHandlerRef == NULL) {
+        err = InstallHIObjectEventHandler((HIObjectRef)boxView, NewEventHandlerUPP(SimpleAccessibilityEventHandler), 
+                                sizeof(Simple_AccessibilityEvents) / sizeof(EventTypeSpec), Simple_AccessibilityEvents, 
+                                                        this, &m_pTaskGroupAccessibilityEventHandlerRef);
+    }
+}
+
+
+void CTaskItemGroup::RemoveMacAccessibilitySupport() {
+    if (m_pTaskGroupAccessibilityEventHandlerRef) {
+        ::RemoveEventHandler(m_pTaskGroupAccessibilityEventHandlerRef);
+        m_pTaskGroupAccessibilityEventHandlerRef = NULL;
+   }
+}
+
+
+void CViewStatistics::SetupMacAccessibilitySupport() {
+    OSStatus        err;
+    HIViewRef       paintPanelView = (HIViewRef)m_PaintStatistics->GetHandle();
+    wxString        str = _("This panel contains graphs showing user totals for projects");
+    CFStringRef     description = CFStringCreateWithCString(NULL, str.char_str(), kCFStringEncodingUTF8);
+                                               
+    // Have the screen reader tell user to switch to advanced view.
+    HIObjectSetAuxiliaryAccessibilityAttribute((HIObjectRef)paintPanelView, 0, kAXDescriptionAttribute, description);
+    CFRelease( description );
+
+    err = InstallHIObjectEventHandler((HIObjectRef)paintPanelView, NewEventHandlerUPP(SimpleAccessibilityEventHandler), 
+                                sizeof(Simple_AccessibilityEvents) / sizeof(EventTypeSpec), Simple_AccessibilityEvents, 
+                                                        this, &m_pStatisticsAccessibilityEventHandlerRef);
+}
+
+
+void CViewStatistics::RemoveMacAccessibilitySupport() {
+    ::RemoveEventHandler(m_pStatisticsAccessibilityEventHandlerRef);
+}
+
+
+void wxPieCtrl::SetupMacAccessibilitySupport() {
+    OSStatus        err;
+    HIViewRef       pieControlView = (HIViewRef)GetHandle();
+
+    HIObjectSetAuxiliaryAccessibilityAttribute((HIObjectRef)pieControlView, 0, kAXDescriptionAttribute, CFSTR(""));
+
+    err = InstallHIObjectEventHandler((HIObjectRef)pieControlView, NewEventHandlerUPP(PieCtrlAccessibilityEventHandler), 
+                                sizeof(Simple_AccessibilityEvents) / sizeof(EventTypeSpec), Simple_AccessibilityEvents, 
+                                                        this, &m_pPieCtrlAccessibilityEventHandlerRef);
+}
+
+
+void wxPieCtrl::RemoveMacAccessibilitySupport() {
+    if (m_pPieCtrlAccessibilityEventHandlerRef) {
+        ::RemoveEventHandler(m_pPieCtrlAccessibilityEventHandlerRef);
+        m_pPieCtrlAccessibilityEventHandlerRef = NULL;
+   }
+}
+
+
+pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
+                                    EventRef inEvent, void* pData) {
+    const UInt32        eventClass = GetEventClass(inEvent);
+    const UInt32        eventKind = GetEventKind(inEvent);
+    OSStatus            err;
+    wxGenericListCtrl*  pList = ((ListAccessData*)pData)->pList;
+    CBOINCBaseView*     pView = ((ListAccessData*)pData)->pView;
+    HIViewRef           headerView = ((ListAccessData*)pData)->headerView;
+    HIViewRef           bodyView = ((ListAccessData*)pData)->bodyView;
+    CDlgEventLog*       pEventLog = ((ListAccessData*)pData)->pEventLog;
+    Boolean             snowLeopard = ((ListAccessData*)pData)->snowLeopard;
+
+    if (eventClass != kEventClassAccessibility) {
+        return eventNotHandledErr;
+    }
+
+    AXUIElementRef	element;
+    UInt64		inIdentifier = 0;
+    UInt64              outIdentifier = 0;
+    SInt32              row = 0;
+    SInt32              col = 0;
+    Boolean             isHeader;
+    HIObjectRef         obj = NULL;
+    
+    err = GetEventParameter (inEvent, kEventParamAccessibleObject, 
+                typeCFTypeRef, NULL, sizeof(typeCFTypeRef), NULL, &element);
+    if (err) return err;
+    
+    AXUIElementGetIdentifier( element, &inIdentifier );
+    obj = AXUIElementGetHIObject(element);
+    
+    parseElementIdentifier(inIdentifier, row, col, isHeader);
+    if (obj == (HIObjectRef)headerView) {
+        isHeader = true;
+    }
+
+    switch (eventKind) {
+#pragma mark kEventAccessibleGetChildAtPoint
+        case kEventAccessibleGetChildAtPoint:
+        {
+            CFTypeRef	child = NULL;
+            HIPoint		where;
+            long        theRow = wxNOT_FOUND;
+            long        ignored;
+            int         hitflags;
+            int         x = 0;
+            
+            // Only the whole view or rows can be tested since the cells don't have sub-parts.
+            if (col >= 0) {
+                return noErr;
+            }
+
+            err = GetEventParameter (inEvent, kEventParamMouseLocation, 
+                        typeHIPoint, NULL, sizeof(HIPoint), NULL, &where);
+            if (err) return err;
+
+            wxPoint     p((int)where.x, (int)where.y);
+            pList->ScreenToClient(&p.x, &p.y);
+
+            int xoff = pList->GetScrollPos(wxHORIZONTAL);
+            if (xoff) {
+                int ppux, ppuy;
+                wxScrolledWindow * win = ((CBOINCListCtrl*)pList)->GetMainWin();
+                win->GetScrollPixelsPerUnit(&ppux, &ppuy);
+                x -= (xoff * ppux);
+            }
+
+            // HitTest returns the column only on wxMSW
+            int n = pList->GetColumnCount();
+            for (col=0; col<n; col++) {
+                x += pList->GetColumnWidth(col);
+                if (p.x < x) break;
+            }
+            
+            if (col >= n) {
+                return noErr;
+            }
+            
+            if (isHeader) {
+                outIdentifier = makeElementIdentifier(-1, col, true);
+            } else {
+                theRow = pList->HitTest(p, hitflags, &ignored);
+                if (theRow == wxNOT_FOUND) {
+                    return noErr;
+                }
+                // Child of body is a row
+                outIdentifier = (theRow + 1) * MAX_LIST_COL;
+                outIdentifier = makeElementIdentifier(theRow, -1, false);
+                if (row >= 0) {
+                    // Child of row is a cell
+                    outIdentifier = makeElementIdentifier(theRow, col, false);
+                }
+           }
+
+            child = AXUIElementCreateWithHIObjectAndIdentifier(obj, outIdentifier );
+            if (child == NULL) {
+                return eventNotHandledErr;
+            }
+            
+            err = SetEventParameter (inEvent, kEventParamAccessibleChild, typeCFTypeRef, 
+                                        sizeof(typeCFTypeRef), &child);
+            if (err) {
+                return eventNotHandledErr;
+            }
+            
+            return noErr;
+        }
+        break;
+
+#pragma mark kEventAccessibleGetFocusedChild
+        case kEventAccessibleGetFocusedChild:
+            return noErr;
+        break;
+
+#pragma mark kEventAccessibleGetAllAttributeNames
+        case kEventAccessibleGetAllAttributeNames:
+        {
+            CFMutableArrayRef	namesArray;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleAttributeNames, 
+                    typeCFMutableArrayRef, NULL, sizeof(typeCFMutableArrayRef), NULL, &namesArray);
+            if (err) 
+                return err;
+
+            CallNextEventHandler( inHandlerCallRef, inEvent );
+            
+            if ( (row < 0) && (col < 0) ) { // the whole view
+                // col < 0 means an entire row.
+                // Let accessibility know that this view has children and can
+                // return a list of them.
+                CFArrayAppendValue( namesArray, kAXChildrenAttribute );
+                if (!isHeader) {
+                    if (snowLeopard) {
+                        CFArrayAppendValue( namesArray, kAXVisibleChildrenAttribute );
+                        CFArrayAppendValue( namesArray, kAXSelectedChildrenAttribute );
+                        CFArrayAppendValue( namesArray, kAXOrientationAttribute );
+                    } else {
+                        CFArrayAppendValue( namesArray, kAXVisibleRowsAttribute );
+                        CFArrayAppendValue( namesArray, kAXRowsAttribute );
+                        CFArrayAppendValue( namesArray, kAXSelectedRowsAttribute );
+                        CFArrayAppendValue( namesArray, kAXColumnsAttribute );
+                        CFArrayAppendValue( namesArray, kAXSelectedColumnsAttribute );
+                        CFArrayAppendValue( namesArray, kAXHeaderAttribute );
+                        CFArrayAppendValue( namesArray, kAXVisibleColumnsAttribute );
+                    }
+                }
+            } else {
+                if (isHeader) {
+                    if (pView) {
+                        // Sortable list
+                        CFArrayAppendValue( namesArray, kAXSubroleAttribute );
+                        CFArrayAppendValue( namesArray, kAXTitleAttribute );
+                        if (snowLeopard) {
+                            CFArrayAppendValue( namesArray, kAXSortDirectionAttribute );
+                        }
+                    }else {
+                        // Event Log is not sortable
+                        CFArrayAppendValue( namesArray, kAXValueAttribute );
+                    }
+                 } else {
+                    if (col < 0) {
+                        // Row has children
+                        CFArrayAppendValue( namesArray, kAXChildrenAttribute );
+                        CFArrayAppendValue( namesArray, kAXSelectedAttribute );
+                        CFArrayAppendValue( namesArray, kAXIndexAttribute );
+                        CFArrayAppendValue( namesArray, kAXVisibleChildrenAttribute );
+                        CFArrayAppendValue( namesArray, kAXSubroleAttribute );
+                    } else {
+                        CFArrayAppendValue( namesArray, kAXValueAttribute );
+                    }
+                }
+                // Let accessibility know that this view's children can return description,
+                // size, position, parent window, top level element and isFocused attributes.
+                CFArrayAppendValue( namesArray, kAXWindowAttribute );
+                CFArrayAppendValue( namesArray, kAXTopLevelUIElementAttribute );
+                CFArrayAppendValue( namesArray, kAXSizeAttribute );
+                CFArrayAppendValue( namesArray, kAXPositionAttribute );
+                CFArrayAppendValue( namesArray, kAXEnabledAttribute );
+            }
+            
+            CFArrayAppendValue( namesArray, kAXFocusedAttribute );
+            CFArrayAppendValue( namesArray, kAXRoleAttribute );
+            CFArrayAppendValue( namesArray, kAXRoleDescriptionAttribute );
+            CFArrayAppendValue( namesArray, kAXDescriptionAttribute );
+            CFArrayAppendValue( namesArray, kAXParentAttribute );
+
+            return noErr;
+        }
+        break;
+            
+#pragma mark kEventAccessibleGetAllParameterizedAttributeNames
+        case kEventAccessibleGetAllParameterizedAttributeNames:
+        {
+            CFMutableArrayRef	namesArray;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleAttributeNames, 
+                    typeCFMutableArrayRef, NULL, sizeof(typeCFMutableArrayRef), NULL, &namesArray);
+            if (err) return err;
+
+            return noErr;
+        }
+        break;
+            
+#pragma mark kEventAccessibleGetNamedAttribute (Entire list or entire header)
+        case kEventAccessibleGetNamedAttribute:
+        {
+            CFStringRef			attribute;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleAttributeName, 
+                        typeCFStringRef, NULL, sizeof(typeCFStringRef), NULL, &attribute);
+            if (err) return err;
+
+            if ( CFStringCompare( attribute, kAXFocusedAttribute, 0 ) == kCFCompareEqualTo ) {
+                // Return whether or not this part is focused.
+//TODO: Add real kAXFocusedAttribute support?
+                Boolean				focused = false;
+                
+                SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeBoolean, sizeof( focused ), &focused );
+                return noErr;
+            }
+
+            if ( (row < 0) && (col < 0) ) { // Entire list or entire header
+                // String compare the incoming attribute name and return the appropriate accessibility
+                // information as an event parameter.
+            
+                if ( CFStringCompare( attribute, kAXChildrenAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Create and return an array of AXUIElements describing the children of this view.
+                    CFMutableArrayRef	children;
+                    AXUIElementRef		child;
+
+                    if (isHeader) {
+                        int             c, n = pList->GetColumnCount();
+                        children = CFArrayCreateMutable( kCFAllocatorDefault, n, &kCFTypeArrayCallBacks );
+
+                        for ( c = 0; c < n; c++ ) {
+                            // Header item for each column
+                            outIdentifier = makeElementIdentifier(-1, c, true);
+                            child = AXUIElementCreateWithHIObjectAndIdentifier( obj, outIdentifier );
+                            CFArrayAppendValue( children, child );
+                            CFRelease( child );
+                        }
+                    } else {        // ! isHeader
+                        int             r, m = pList->GetItemCount();
+                        children = CFArrayCreateMutable( kCFAllocatorDefault, m, &kCFTypeArrayCallBacks );
+
+                        // Data rows are each children of entire list
+                        for ( r = 0; r < m; r++ ) {
+                        // For each row
+                            outIdentifier = makeElementIdentifier(r, -1, false);
+                            child = AXUIElementCreateWithHIObjectAndIdentifier( obj, outIdentifier );
+                            CFArrayAppendValue( children, child );
+                            CFRelease( child );
+                        }
+                    }
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( children ), &children );
+                    CFRelease( children );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXHeaderAttribute, 0 ) == kCFCompareEqualTo ) {
+                    AXUIElementRef		child;
+
+                    outIdentifier = makeElementIdentifier(-1, -1, true);
+                    child = AXUIElementCreateWithHIObjectAndIdentifier( (HIObjectRef)headerView, outIdentifier );
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( child ), &child );
+                    CFRelease( child );
+                    return noErr;
+ 
+                } else if ( CFStringCompare( attribute, kAXRowsAttribute, 0 ) == kCFCompareEqualTo ) {
+                    CFMutableArrayRef	children;
+                    AXUIElementRef		child;
+
+                    int             r, m = pList->GetItemCount();
+                    children = CFArrayCreateMutable( kCFAllocatorDefault, m, &kCFTypeArrayCallBacks );
+
+                    // Data rows are each children of entire list
+                    for ( r = 0; r < m; r++ ) {
+                    // For each row
+                        outIdentifier = makeElementIdentifier(r, -1, false);
+                        child = AXUIElementCreateWithHIObjectAndIdentifier( obj, outIdentifier );
+                        CFArrayAppendValue( children, child );
+                        CFRelease( child );
+                    }
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( children ), &children );
+                    CFRelease( children );
+                    return noErr; 
+
+                } else if (( CFStringCompare( attribute, kAXVisibleRowsAttribute, 0 ) == kCFCompareEqualTo ) 
+                            || ( CFStringCompare( attribute, kAXVisibleChildrenAttribute, 0 ) == kCFCompareEqualTo )) {
+                    CFMutableArrayRef	children;
+                    AXUIElementRef		child;
+                    int                 numItems, topItem, numVisibleItems, r;
+
+                    children = CFArrayCreateMutable( kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks );
+
+                    numItems = pList->GetItemCount();
+                    if (numItems) {
+                        topItem = pList->GetTopItem();     // Doesn't work properly for Mac Native control in wxMac-2.8.7
+
+                        numVisibleItems = pList->GetCountPerPage();
+                        ++numVisibleItems;
+
+                        if (numItems <= (topItem + numVisibleItems)) numVisibleItems = numItems - topItem;
+                        for ( r = 0; r < numVisibleItems; r++ ) {     // For each visible row
+                            outIdentifier = makeElementIdentifier(r, -1, false);
+                            child = AXUIElementCreateWithHIObjectAndIdentifier( obj, outIdentifier );
+                            CFArrayAppendValue( children, child );
+                            CFRelease( child );
+                        }
+                    }
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( children ), &children );
+                    CFRelease( children );
+                    return noErr;
+
+                } else if (( CFStringCompare( attribute, kAXSelectedChildrenAttribute, 0 ) == kCFCompareEqualTo ) 
+                			|| ( CFStringCompare( attribute, kAXSelectedRowsAttribute, 0 ) == kCFCompareEqualTo )) {
+                    CFMutableArrayRef	children;
+                    AXUIElementRef		child;
+                    int                 r;
+                    
+                    children = CFArrayCreateMutable( kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks );
+
+                    r = -1;
+                    while (1) {
+                        // Step through all selected items
+                        r = pList->GetNextItem(r, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
+                        if (r < 0) break;
+                        outIdentifier = makeElementIdentifier(r, -1, false);
+                        child = AXUIElementCreateWithHIObjectAndIdentifier( obj, outIdentifier );
+                        CFArrayAppendValue( children, child );
+                        CFRelease( child );
+                    }
+             
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( children ), &children );
+                    CFRelease( children );
+                    return noErr;
+
+                } else if (( CFStringCompare( attribute, kAXColumnsAttribute, 0 ) == kCFCompareEqualTo )
+                            || ( CFStringCompare( attribute, kAXSelectedColumnsAttribute, 0 ) == kCFCompareEqualTo )
+                            || ( CFStringCompare( attribute, kAXVisibleColumnsAttribute, 0 ) == kCFCompareEqualTo )
+                            ) {
+                    CFMutableArrayRef	children;
+                    
+                    // Tell system we don't have any columns
+                    children = CFArrayCreateMutable( kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks );
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( children ), &children );
+                    CFRelease( children );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXOrientationAttribute, 0 ) == kCFCompareEqualTo ) {
+                    CFStringRef		orientation = kAXVerticalOrientationValue;
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( orientation ), &orientation );
+                    return noErr;
+
+
+                } else if ( CFStringCompare( attribute, kAXRoleAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return a string indicating the role of this view. Using the table role doesn't work.
+                    CFStringRef		role = kAXGroupRole;
+                    if (!isHeader) {
+                    	role = snowLeopard ? kAXListRole : kAXOutlineRole;
+                    }
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( role ), &role );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXRoleDescriptionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return a string indicating the role of this part.
+
+                    CFStringRef		role = kAXGroupRole;
+                    if (!isHeader) {
+                    	role = snowLeopard ? kAXListRole : kAXOutlineRole;
+                    }
+                    CFStringRef roleDesc = HICopyAccessibilityRoleDescription( role, NULL );
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue , typeCFTypeRef, sizeof( roleDesc ), &roleDesc );
+                    CFRelease( roleDesc );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXDescriptionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return a string indicating the role of this part.
+                    wxString        str;
+                    int             n = pList->GetItemCount();
+
+                    if (isHeader) {
+                        str = _("list headers");
+                    } else {
+                        if (pEventLog) {
+                            // To allow localization, we can't just append string 
+                            // " is empty" because that assumes English word order.
+                            if (n) {
+                                str = _("list of events");
+                            } else {
+                                str = _("list of events is empty");
+                            }
+                        } else {
+                            if (pView) {
+                                if (n) {
+                                    str.Printf(_("list of %s"), pView->GetViewDisplayName().c_str());
+                                } else {
+                                    str.Printf(_("list of %s is empty"), pView->GetViewDisplayName().c_str());
+                                }
+                            }
+                        }
+                    }
+                    
+                    CFStringRef		description = CFStringCreateWithCString(NULL, str.char_str(), kCFStringEncodingUTF8);
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( description ), &description );
+                    CFRelease( description );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXParentAttribute, 0 ) == kCFCompareEqualTo ) {
+                    AXUIElementRef		parent;
+                    HIViewRef           parentView;
+                    
+                    parentView = (HIViewGetSuperview(isHeader ? headerView : bodyView));
+                    parent = AXUIElementCreateWithHIObjectAndIdentifier((HIObjectRef)parentView, 0);
+                    if (parent == NULL) {
+                        return eventNotHandledErr;
+                    }
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( parent ), &parent );
+                    CFRelease( parent );
+                    return noErr;
+                
+                } else if ( CFStringCompare( attribute, kAXSizeAttribute, 0 ) == kCFCompareEqualTo ) {
+                    HIRect          r;
+                    HISize          size;
+                    
+                    err = HIViewGetBounds(isHeader ? headerView : bodyView, &r);                    
+                    size = r.size;
+                    if (!isHeader) {
+                        size.height += pList->m_headerHeight;
+                    }
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeHISize, sizeof( HISize ), &size );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXPositionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    HIRect          r;
+                    HIPoint         pt;
+                    int             x, y;
+
+                    err = HIViewGetBounds(isHeader ? headerView : bodyView, &r);
+                    x = r.origin.x;
+                    y = r.origin.y;
+                    
+                    // Now convert to global coordinates
+                    pList->ClientToScreen(&x, &y);
+                    pt.x = x;
+                    pt.y = y - pList->m_headerHeight;
+
+                    SetEventParameter(inEvent, kEventParamAccessibleAttributeValue, typeHIPoint, sizeof(HIPoint), &pt);
+                    return noErr;
+
+                } else {
+                    return CallNextEventHandler( inHandlerCallRef, inEvent );
+
+                }
+                
+#pragma mark kEventAccessibleGetNamedAttribute (row or item)
+            } else {        // End if ( (row < 0) && (col < 0) )
+            
+                if ( CFStringCompare( attribute, kAXChildrenAttribute, 0 ) == kCFCompareEqualTo ) {
+                    if (col >= 0) {
+                        return eventNotHandledErr;
+                    }
+                    // Create and return an array of AXUIElements describing the children of this view.
+                    CFMutableArrayRef	children;
+                    AXUIElementRef		child;
+                    int                 c, n = pList->GetColumnCount();
+                    
+                    children = CFArrayCreateMutable( kCFAllocatorDefault, n, &kCFTypeArrayCallBacks );
+
+                    for ( c = 0; c < n; c++ ) {
+                        // For each column
+                        outIdentifier = makeElementIdentifier(row, c, isHeader);
+                        child = AXUIElementCreateWithHIObjectAndIdentifier( obj, outIdentifier );
+                        CFArrayAppendValue( children, child );
+                        CFRelease( child );
+                    }
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( children ), &children );
+                    CFRelease( children );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXDescriptionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    wxString        str, buf;
+                    int             rowCount;
+                    Boolean         isCurrentSortCol = false;
+
+                    if (isHeader) {
+                        wxListItem      headerItem;
+                        int             numCols = pList->GetColumnCount();
+
+                        pList->GetColumn(col, headerItem);
+                        if (pView) {
+                            if (col == pView->m_iSortColumn) {
+                                isCurrentSortCol = true;
+                            }
+                        }
+                        if (isCurrentSortCol) {
+                            if (pView->m_bReverseSort) {
+                                buf.Printf(_("; current sort column %d of %d; descending order; "), col+1, numCols);
+                            } else {
+                                buf.Printf(_("; current sort column %d of %d; ascending order; "), col+1, numCols);
+                            }
+                        } else {
+                            buf.Printf(_("; column %d of %d; "), col+1, numCols);
+                        }
+                        str = headerItem.GetText();
+                        str += buf;
+                    } else {    // ! isHeader
+                        rowCount = pList->GetItemCount();
+                        if (rowCount <= 0) {
+                            str = _("list is empty");                         
+                        } else {
+                            if (col < 0) {
+                                str.Printf(_("; row %d; "), row+1);
+                            } else {
+                                if (pList->GetItemState(row, wxLIST_STATE_SELECTED) & wxLIST_STATE_SELECTED) {
+                                    if (col == 0) {
+                                        buf.Printf(_("; selected row %d of %d; "), row+1, rowCount);
+                                    } else {
+                                        buf.Printf(_("; selected row %d ; "), row+1);
+                                    }
+                                } else {        // Row is not selected
+                                    if (col == 0) {
+                                        buf.Printf(_("; row %d of %d; "), row+1, rowCount);
+                                    } else {
+                                        buf.Printf(_("; row %d; "), row+1);
+                                    }
+                                }
+
+                                if (pEventLog) {
+                                    str = pEventLog->OnListGetItemText(row, col);
+                                } else {
+                                    str = pView->FireOnListGetItemText(row, col);
+                                }
+
+                                if (str.IsEmpty()) {
+                                    str = _("blank");
+                                }
+                                
+                                str += buf;
+                           }
+                        }
+                    }
+                    
+                    CFStringRef		description = CFStringCreateWithCString(NULL, str.char_str(), kCFStringEncodingUTF8);
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( description ), &description );
+                    CFRelease( description );
+                    return noErr;
+                    
+                } else if ( CFStringCompare( attribute, kAXValueAttribute, 0 ) == kCFCompareEqualTo ) {
+                    CFStringRef		value = CFSTR("");
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( value ), &value );
+                    CFRelease( value );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXParentAttribute, 0 ) == kCFCompareEqualTo ) {
+                    AXUIElementRef		parent;
+                    HIViewRef           parentView;
+
+                    parentView = isHeader ? headerView : bodyView;
+                    if (isHeader) {
+                        outIdentifier = 0;      // Parent is entire list
+                    } else {            // ! isHeader
+                        if (col < 0) {  // Data row
+                            outIdentifier = 0;      // Parent is entire list
+                        } else {
+                            outIdentifier = makeElementIdentifier(row, -1, isHeader);   // Parent of cell is data row
+                        }
+                    }
+                    parent = AXUIElementCreateWithHIObjectAndIdentifier((HIObjectRef)parentView, outIdentifier);
+                    if (parent == NULL) {
+                        return eventNotHandledErr;
+                    }
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( parent ), &parent );
+                    CFRelease( parent );
+                    return noErr;
+                
+                } else if ( CFStringCompare( attribute, kAXSubroleAttribute, 0 ) == kCFCompareEqualTo ) {
+                    CFStringRef		subRole;
+                    
+                    if (isHeader) {
+	                    if (pView) {
+                            subRole = kAXSortButtonSubrole;
+	                    } else {
+	                        return eventNotHandledErr;
+	                    }
+                    } else {    // ! isHeader
+                        if (col < 0) {
+                            subRole = kAXOutlineRowSubrole;     
+                        } else {
+                            return eventNotHandledErr;
+                        }
+                    }
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( subRole ), &subRole );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXRoleAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return a string indicating the role of this part. The parts of the view behave like
+                    // buttons, so use that system role.
+
+                    CFStringRef		role;
+
+                    if (isHeader) {
+                        if (pView) {
+                            role = kAXButtonRole;
+                        } else {
+                            role = kAXStaticTextRole;
+                        }
+                    } else if (col < 0) {
+                        role = kAXRowRole;
+                    } else {
+                        role = kAXStaticTextRole;
+                    }
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( role ), &role );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXRoleDescriptionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return a string describing the role of this part. Use the system description.
+                    CFStringRef		roleDesc;
+                    
+                    if (isHeader) {
+                        if (pView) {
+                                roleDesc = HICopyAccessibilityRoleDescription( kAXButtonRole, kAXSortButtonSubrole );
+                        } else {
+                            roleDesc = HICopyAccessibilityRoleDescription( kAXStaticTextRole, NULL );
+                        }
+                    } else {    // ! isHeader
+                        CFStringRef		role = kAXStaticTextRole;
+                        if (col < 0) {
+                            if (snowLeopard) {
+                                role = kAXRowRole;
+                            } else {
+                                role = kAXOutlineRowSubrole;
+                            }
+                        }
+                        roleDesc = HICopyAccessibilityRoleDescription( role, NULL );
+                    }
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( roleDesc ), &roleDesc );
+                    CFRelease( roleDesc );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXSortDirectionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    CFStringRef		sortDirection;
+
+                    if (col == pView->m_iSortColumn) {
+                        sortDirection = pView->m_bReverseSort ? kAXDescendingSortDirectionValue : kAXAscendingSortDirectionValue;
+                    } else {
+                        sortDirection = kAXUnknownSortDirectionValue;
+                    }
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( sortDirection ), &sortDirection );
+                    CFRelease( sortDirection );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXSizeAttribute, 0 ) == kCFCompareEqualTo ) {
+                    HISize          size;
+                    wxRect          r;
+                    
+                    // Return the size of this part as an HISize.
+                    size.width = pList->GetColumnWidth(col);
+                    if (isHeader) {
+                        size.height = pList->m_headerHeight;
+                    } else {    // ! isHeader
+                        pList->GetItemRect(row, r);
+                        size.height = r.height;
+                        if (col < 0) {
+                            size.width = r.width;
+                        }
+                    }
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeHISize, sizeof( HISize ), &size );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXPositionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    HIPoint         pt;
+                    wxRect          r;
+                    int             i, x = 0, y = 0, xoff = 0, ppux, ppuy;
+                    
+                    // Return the position of this part as an HIPoint.
+                    // First get the position relative to the ListCtrl
+                    for (i=0; i<col; i++) {
+                        x += pList->GetColumnWidth(i);
+                    }
+                    
+                    if (!isHeader) {
+                        pList->GetItemRect(row, r);
+                        y = r.y - 1;
+                        if (col < 0) {
+                            x = r.x;
+                        }
+                    }
+                    xoff = pList->GetScrollPos(wxHORIZONTAL);
+                    if (xoff) {
+                        wxScrolledWindow * win = ((CBOINCListCtrl*)pList)->GetMainWin();
+                        win->GetScrollPixelsPerUnit(&ppux, &ppuy);
+                        x -= (xoff * ppux);
+                    }
+                    // Now convert to global coordinates
+                    pList->ClientToScreen(&x, &y);
+                    pt.x = x;
+                    pt.y = y - pList->m_headerHeight;
+
+                    SetEventParameter(inEvent, kEventParamAccessibleAttributeValue, typeHIPoint, sizeof(HIPoint), &pt);
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXWindowAttribute, 0 ) == kCFCompareEqualTo
+                        || CFStringCompare( attribute, kAXTopLevelUIElementAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return the window or top level ui element for this part. They are both the same so re-use the code.
+                    AXUIElementRef		windOrTopUI;
+
+                    WindowRef win = GetControlOwner(bodyView);
+ 
+                    if (win == NULL) {
+                        return eventNotHandledErr;
+                    }
+                    
+                    windOrTopUI = AXUIElementCreateWithHIObjectAndIdentifier( (HIObjectRef)win, 0 );
+                    if (windOrTopUI == NULL) {
+                        return eventNotHandledErr;
+                    }
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( windOrTopUI ), &windOrTopUI );
+                    CFRelease( windOrTopUI );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXEnabledAttribute, 0 ) == kCFCompareEqualTo ) {
+                    Boolean				enabled = true;
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeBoolean, sizeof( enabled ), &enabled );
+                    return noErr;
+                
+//TODO: Add kAXFocusedAttribute support?
+#if 0
+                } else if ( CFStringCompare( attribute, kAXFocusedAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return whether or not this part is focused.
+                    Boolean				focused = false;
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeBoolean, sizeof( focused ), &focused );
+                    return noErr;
+#endif
+
+                } else if ( CFStringCompare( attribute, kAXSelectedAttribute, 0 ) == kCFCompareEqualTo ) {
+                    if (col >= 0) {
+                        return eventNotHandledErr;
+                    }
+                    Boolean isSelected = pList->GetItemState(row, wxLIST_STATE_SELECTED) & wxLIST_STATE_SELECTED;
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeBoolean, sizeof( isSelected ), &isSelected );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXIndexAttribute, 0 ) == kCFCompareEqualTo ) {
+                    if (col >= 0) {
+                        return eventNotHandledErr;
+                    }
+                    int theRow = row + 1;
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeInteger, sizeof( theRow ), &theRow );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXVisibleChildrenAttribute, 0 ) == kCFCompareEqualTo ) {
+//TODO: Actually determine which columns are visible
+                    // Create and return an array of AXUIElements describing the children of this view.
+                    CFMutableArrayRef	children;
+                    AXUIElementRef	child;
+                    int                 c, n = pList->GetColumnCount();
+                    
+                    children = CFArrayCreateMutable( kCFAllocatorDefault, n, &kCFTypeArrayCallBacks );
+
+                    if (col >= 0) {
+                        return eventNotHandledErr;
+                    }
+
+                    for ( c = 0; c < n; c++ ) {
+                        // For each column
+                        outIdentifier = makeElementIdentifier(row, c, isHeader);
+                        child = AXUIElementCreateWithHIObjectAndIdentifier( obj, outIdentifier );
+                        CFArrayAppendValue( children, child );
+                        CFRelease( child );
+                    }
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( children ), &children );
+                    CFRelease( children );
+                    return noErr;
+                
+                } else if ( CFStringCompare( attribute, kAXTitleAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return the item's text
+                    wxString        str;
+                    wxListItem      headerItem;
+
+                    if (pEventLog || !isHeader) {
+                        return eventNotHandledErr;
+                    }
+                    
+                    if (col < 0) {
+                        return eventNotHandledErr;
+                    }
+                    
+                    pList->GetColumn(col, headerItem);
+                    str = headerItem.GetText();
+                    
+                    CFStringRef		title = CFStringCreateWithCString(NULL, str.char_str(), kCFStringEncodingUTF8);
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( title ), &title );
+                    CFRelease( title );
+                    return noErr;
+
+                } else {
+                    return eventNotHandledErr;
+                }
+
+            } // End // End if (!( (row < 0) && (col < 0) ))
+        break;
+        }       // End case kEventAccessibleGetNamedAttribute:
+
+#pragma mark kEventAccessibleIsNamedAttributeSettable
+        case kEventAccessibleIsNamedAttributeSettable:
+        {
+            CFStringRef			attribute;
+            Boolean				isSettable = false;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleAttributeName, 
+                        typeCFStringRef, NULL, sizeof(typeCFStringRef), NULL, &attribute);
+            if (err) return err;
+
+            // The focused attribute is the only settable attribute for this view,
+            // and it can only be set on part (or subelements), not the whole view.
+            if ((row >= 0) || (col >= 0))
+            {
+                if ( CFStringCompare( attribute, kAXFocusedAttribute, 0 ) == kCFCompareEqualTo )
+                {
+                    isSettable = true;
+                }
+            }
+            SetEventParameter( inEvent, kEventParamAccessibleAttributeSettable, typeBoolean, sizeof( Boolean ), &isSettable );
+            return noErr;
+        }
+        break;
+
+#pragma mark kEventAccessibleSetNamedAttribute
+        case kEventAccessibleSetNamedAttribute:
+        {
+            return eventNotHandledErr;
+        }
+        break;
+
+#pragma mark kEventAccessibleGetAllActionNames
+        case kEventAccessibleGetAllActionNames:
+        {
+            CFMutableArrayRef	array;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleActionNames, 
+                        typeCFMutableArrayRef, NULL, sizeof(typeCFMutableArrayRef), NULL, &array);
+            if (err) return err;
+            
+            if (pEventLog && isHeader) {
+                return noErr;
+            } 
+            
+            if (isHeader && (col >= 0) ) {
+                // Sortable column header
+                CFArrayAppendValue( array, kAXPressAction );
+            }
+            return noErr;
+        }
+        break;
+        
+#pragma mark kEventAccessibleGetNamedActionDescription
+        case kEventAccessibleGetNamedActionDescription:
+        {
+            CFStringRef				action;
+            CFMutableStringRef		desc;
+            CFStringRef				selfDesc = NULL;
+            
+            if ( (row < 0) && (col < 0) ) {
+                return eventNotHandledErr;
+            }
+            
+            err = GetEventParameter (inEvent, kEventParamAccessibleActionName, 
+                        typeCFStringRef, NULL, sizeof(typeCFStringRef), NULL, &action);
+            if (err) return err;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleActionDescription, 
+                        typeCFMutableStringRef, NULL, sizeof(typeCFMutableStringRef), NULL, &desc);
+            if (err) return err;
+
+             selfDesc = HICopyAccessibilityActionDescription( action );
+
+            CFStringReplaceAll( desc, selfDesc );
+            CFRelease( selfDesc );
+            return noErr;
+        }
+        break;
+    
+#pragma mark kEventAccessiblePerformNamedAction
+        case kEventAccessiblePerformNamedAction:
+        {
+            CFStringRef				action;
+            wxWindowID              id = pList->GetId();
+                
+            if ( (row < 0) && (col < 0) ) {
+                return eventNotHandledErr;
+            }
+                
+            err = GetEventParameter (inEvent, kEventParamAccessibleActionName, 
+                        typeCFStringRef, NULL, sizeof(typeCFStringRef), NULL, &action);
+            if (err) return err;
+            
+            if ( CFStringCompare( action, kAXPressAction, 0 ) != kCFCompareEqualTo ) {
+                return eventNotHandledErr;
+            }
+            if (isHeader) {
+                wxListEvent event(wxEVT_COMMAND_LIST_COL_CLICK, id);
+                event.m_col = col;
+                pList->AddPendingEvent(event);
+            } else {
+                if (pView) {
+                    pView->ClearSelections();
+                }
+                pList->SetItemState(row,  wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
+            }
+            return noErr;
+        }
+        break;
+        
+        default:
+            return eventNotHandledErr;
+    }   // End switch(eventKind)
+    
+    return eventNotHandledErr;
+}
+
+
+pascal OSStatus HTMLListAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
+                                    EventRef inEvent, void* pData) {
+    const UInt32                eventClass = GetEventClass(inEvent);
+    const UInt32                eventKind = GetEventKind(inEvent);
+    CProjectListCtrlAccessible* pProjectListCtrlAccessible = NULL;
+    CProjectListCtrl*           pProjectListCtrl = NULL;
+    CNoticeListCtrlAccessible*  pNoticeListCtrlAccessible = NULL;
+    CNoticeListCtrl*            pNoticeListCtrl = NULL;
+    OSStatus                    err;
+    
+    pProjectListCtrlAccessible = ((HTMLListAccessibilityHandlerData*)pData)->pProjectListCtrlAccessible;
+    pNoticeListCtrlAccessible = ((HTMLListAccessibilityHandlerData*)pData)->pNoticeListCtrlAccessible;
+    if (pProjectListCtrlAccessible != NULL) {
+        pProjectListCtrl = wxDynamicCast(pProjectListCtrlAccessible->GetWindow(), CProjectListCtrl);
+        if (pProjectListCtrl == NULL) {
+            return eventNotHandledErr;
+        }
+    } else {
+        if (pNoticeListCtrlAccessible == NULL) {
+            return eventNotHandledErr;
+        }
+        pNoticeListCtrl = wxDynamicCast(pNoticeListCtrlAccessible->GetWindow(), CNoticeListCtrl);
+        if (pNoticeListCtrl == NULL) {
+            return eventNotHandledErr;
+        }
+    }
+    
+    if (eventClass != kEventClassAccessibility) {
+        return eventNotHandledErr;
+    }
+
+    AXUIElementRef		element;
+    UInt64				inIdentifier = 0;
+    UInt64              outIdentifier = 0;
+    SInt32              row = 0;
+    HIObjectRef         obj = NULL;
+    
+    err = GetEventParameter (inEvent, kEventParamAccessibleObject, 
+                typeCFTypeRef, NULL, sizeof(typeCFTypeRef), NULL, &element);
+    if (err) return err;
+    
+    AXUIElementGetIdentifier( element, &inIdentifier );
+    obj = AXUIElementGetHIObject(element);
+     
+    row = inIdentifier;
+
+    switch (eventKind) {
+#pragma mark kEventAccessibleGetChildAtPoint
+        case kEventAccessibleGetChildAtPoint:
+        {
+            CFTypeRef	child = NULL;
+            HIPoint		where;
+            int         hitRow;
+            
+            // Only the whole view can be tested since the parts don't have sub-parts.
+            if (inIdentifier != 0) {
+                return noErr;
+            }
+
+            err = GetEventParameter (inEvent, kEventParamMouseLocation, 
+                        typeHIPoint, NULL, sizeof(HIPoint), NULL, &where);
+            if (err) return err;
+
+            wxPoint     p((int)where.x, (int)where.y);
+            if (pProjectListCtrlAccessible) {
+                pProjectListCtrl->ScreenToClient(&p.x, &p.y);
+                err = pProjectListCtrlAccessible->HitTest(p, &hitRow, NULL);
+            } else {
+                pNoticeListCtrl->ScreenToClient(&p.x, &p.y);
+                err = pNoticeListCtrlAccessible->HitTest(p, &hitRow, NULL);
+            }
+            
+            if (err) {
+                return eventNotHandledErr;
+            }
+            
+            if (hitRow >= 0) {
+                outIdentifier = hitRow + 1;
+                child = AXUIElementCreateWithHIObjectAndIdentifier(obj, outIdentifier );
+                if (child == NULL) {
+                    return eventNotHandledErr;
+                }
+                
+                err = SetEventParameter (inEvent, kEventParamAccessibleChild, typeCFTypeRef, 
+                                            sizeof(typeCFTypeRef), &child);
+                if (err) {
+                    return eventNotHandledErr;
+                }
+            }
+            
+            return noErr;
+        }
+        break;
+
+#pragma mark kEventAccessibleGetFocusedChild
+        case kEventAccessibleGetFocusedChild:
+            return noErr;
+        break;
+
+#pragma mark kEventAccessibleGetAllAttributeNames
+        case kEventAccessibleGetAllAttributeNames:
+        {
+            CFMutableArrayRef	namesArray;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleAttributeNames, 
+                    typeCFMutableArrayRef, NULL, sizeof(typeCFMutableArrayRef), NULL, &namesArray);
+            if (err) 
+                return err;
+
+            CallNextEventHandler( inHandlerCallRef, inEvent );
+            
+            if ( inIdentifier == 0 )
+            {
+                // Identifier 0 means "the whole view".
+                // Let accessibility know that this view has children and can
+                // return a list of them.
+                CFArrayAppendValue( namesArray, kAXChildrenAttribute );
+            } else {
+                // Let accessibility know that this view's children can return description,
+                // size, position, parent window, top level element and isFocused attributes.
+                CFArrayAppendValue( namesArray, kAXWindowAttribute );
+                CFArrayAppendValue( namesArray, kAXTopLevelUIElementAttribute );
+                CFArrayAppendValue( namesArray, kAXDescriptionAttribute );
+                CFArrayAppendValue( namesArray, kAXSizeAttribute );
+                CFArrayAppendValue( namesArray, kAXPositionAttribute );
+                CFArrayAppendValue( namesArray, kAXTitleAttribute );
+                CFArrayAppendValue( namesArray, kAXEnabledAttribute );
+            }
+            
+            CFArrayAppendValue( namesArray, kAXFocusedAttribute );
+            CFArrayAppendValue( namesArray, kAXRoleAttribute );
+            CFArrayAppendValue( namesArray, kAXRoleDescriptionAttribute );
+            CFArrayAppendValue( namesArray, kAXParentAttribute );
+
+            return noErr;
+        }
+        break;
+            
+#pragma mark kEventAccessibleGetAllParameterizedAttributeNames
+        case kEventAccessibleGetAllParameterizedAttributeNames:
+        {
+            CFMutableArrayRef	namesArray;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleAttributeNames, 
+                    typeCFMutableArrayRef, NULL, sizeof(typeCFMutableArrayRef), NULL, &namesArray);
+            if (err) return err;
+
+            return noErr;
+        }
+        break;
+            
+#pragma mark kEventAccessibleGetNamedAttribute
+        case kEventAccessibleGetNamedAttribute:
+        {
+            CFStringRef			attribute;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleAttributeName, 
+                        typeCFStringRef, NULL, sizeof(typeCFStringRef), NULL, &attribute);
+            if (err) return err;
+
+            if ( CFStringCompare( attribute, kAXFocusedAttribute, 0 ) == kCFCompareEqualTo ) {
+                // Return whether or not this part is focused.
+//TODO: Add kAXFocusedAttribute support?
+                Boolean				focused = false;
+                
+                SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeBoolean, sizeof( focused ), &focused );
+                return noErr;
+                } else if ( CFStringCompare( attribute, kAXSizeAttribute, 0 ) == kCFCompareEqualTo ) {
+                    wxRect          r;
+                    HISize          theSize;
+                    
+                    if (pProjectListCtrlAccessible) {
+                        err = pProjectListCtrlAccessible->GetLocation(r, row);
+                    } else {
+                        err = pNoticeListCtrlAccessible->GetLocation(r, row);
+                    }
+                    if (err) {
+                        return eventNotHandledErr;
+                    }
+
+                    theSize.width = r.width;
+                    theSize.height = r.height;
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeHISize, sizeof( HISize ), &theSize );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXPositionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    wxRect          r;
+                    HIPoint         pt;
+                    
+                    if (pProjectListCtrlAccessible) {
+                        err = pProjectListCtrlAccessible->GetLocation(r, row);
+                    } else {
+                        err = pNoticeListCtrlAccessible->GetLocation(r, row);
+                    }
+                    if (err) {
+                        return eventNotHandledErr;
+                    }
+                    
+                    pt.x = r.x;
+                    pt.y = r.y;
+
+                    SetEventParameter(inEvent, kEventParamAccessibleAttributeValue, typeHIPoint, sizeof(HIPoint), &pt);
+                    return noErr;
+            }
+
+            if ( inIdentifier == 0 ) {
+                // String compare the incoming attribute name and return the appropriate accessibility
+                // information as an event parameter.
+            
+                if ( CFStringCompare( attribute, kAXChildrenAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Create and return an array of AXUIElements describing the children of this view.
+                    CFMutableArrayRef	children;
+                    AXUIElementRef		child;
+                    int                 i, n;
+
+                    if (pProjectListCtrlAccessible) {
+                        err = pProjectListCtrlAccessible->GetChildCount(&n);
+                    } else {
+                        err = pNoticeListCtrlAccessible->GetChildCount(&n);
+                    }
+                    children = CFArrayCreateMutable( kCFAllocatorDefault, n, &kCFTypeArrayCallBacks );
+
+                    for ( i = 0; i < n; i++ ) {
+                        outIdentifier = i+1;
+                        child = AXUIElementCreateWithHIObjectAndIdentifier( obj, outIdentifier );
+                        CFArrayAppendValue( children, child );
+                        CFRelease( child );
+                    }
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( children ), &children );
+                    CFRelease( children );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXRoleAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return a string indicating the role of this view. Using the table role doesn't work.
+                    CFStringRef		role = kAXListRole;
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( role ), &role );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXRoleDescriptionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return a string indicating the role of this part.
+//TODO: specify whether projects or account managers
+                    wxString        str;
+
+                    str = _("list of projects or account managers");
+                    CFStringRef		roleDesc = CFStringCreateWithCString(NULL, str.char_str(), kCFStringEncodingUTF8);
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( roleDesc ), &roleDesc );
+                    CFRelease( roleDesc );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXParentAttribute, 0 ) == kCFCompareEqualTo ) {
+                    AXUIElementRef		parent;
+                    HIViewRef           parentView;
+
+                    if (pProjectListCtrlAccessible) {
+                        parentView = HIViewGetSuperview(pProjectListCtrlAccessible->m_listView);
+                    } else {
+                        parentView = HIViewGetSuperview(pNoticeListCtrlAccessible->m_listView);
+                    }
+                    parent = AXUIElementCreateWithHIObjectAndIdentifier((HIObjectRef)parentView, 0);
+                    if (parent == NULL) {
+                        return eventNotHandledErr;
+                    }
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( parent ), &parent );
+                    CFRelease( parent );
+                    return noErr;
+                
+                } else {
+                    return CallNextEventHandler( inHandlerCallRef, inEvent );
+
+                }
+                
+            } else {        // End if ( inIdentifier == 0 )
+            
+                if ( CFStringCompare( attribute, kAXDescriptionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    wxString        str, buf;
+                    int             n;
+                    Boolean         selected = false;
+
+                    if (pProjectListCtrlAccessible) {
+                        err = pProjectListCtrlAccessible->GetChildCount(&n);
+                    } else {
+                        err = pNoticeListCtrlAccessible->GetChildCount(&n);
+                    }
+                    if (err) {
+                        return eventNotHandledErr;
+                    }
+
+                    if (pProjectListCtrl) {
+                        selected = pProjectListCtrl->IsSelected(row - 1);
+                    } else {
+                        selected = pNoticeListCtrl->IsSelected(row - 1);
+                    }
+
+                    if (selected) {
+                        str.Printf(_("selected row %d of %d; "), row, n);
+                    } else {
+                        str.Printf(_("row %d of %d; "), row, n);
+                    }
+
+                    if (pProjectListCtrlAccessible) {
+                        err = pProjectListCtrlAccessible->GetDescription(row, &buf);
+                    } else {
+                        err = pNoticeListCtrlAccessible->GetDescription(row, &buf);
+                    }
+                    if (err) {
+                        return eventNotHandledErr;
+                    }
+                    str += buf;
+                    
+                    CFStringRef		description = CFStringCreateWithCString(NULL, str.char_str(), kCFStringEncodingUTF8);
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( description ), &description );
+                    CFRelease( description );
+                    return noErr;
+                    
+                } else if ( CFStringCompare( attribute, kAXParentAttribute, 0 ) == kCFCompareEqualTo ) {
+                    AXUIElementRef		parent;
+                    HIViewRef           parentView;
+
+                    if (pProjectListCtrlAccessible) {
+                        parentView = pProjectListCtrlAccessible->m_listView;
+                    } else {
+                        parentView = pNoticeListCtrlAccessible->m_listView;
+                    }
+                    parent = AXUIElementCreateWithHIObjectAndIdentifier((HIObjectRef)parentView, 0);
+                    if (parent == NULL) {
+                        return eventNotHandledErr;
+                    }
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( parent ), &parent );
+                    CFRelease( parent );
+                    return noErr;
+                
+                } else if ( CFStringCompare( attribute, kAXSubroleAttribute, 0 ) == kCFCompareEqualTo ) {
+                    return eventNotHandledErr;
+
+                } else if ( CFStringCompare( attribute, kAXRoleAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return a string indicating the role of this part. The parts of the view behave like
+                    // buttons, so use that system role.
+
+                    CFStringRef		role = kAXStaticTextRole;       // kAXRowRole;
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( role ), &role );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXRoleDescriptionAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return a string describing the role of this part. Use the system description.
+                    CFStringRef		roleDesc = HICopyAccessibilityRoleDescription( kAXRowRole, NULL );
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( roleDesc ), &roleDesc );
+                    CFRelease( roleDesc );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXWindowAttribute, 0 ) == kCFCompareEqualTo
+                        || CFStringCompare( attribute, kAXTopLevelUIElementAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return the window or top level ui element for this part. They are both the same so re-use the code.
+                    AXUIElementRef		windOrTopUI;
+
+                    WindowRef win = GetControlOwner((HIViewRef)obj);
+                    if (win == NULL) {
+                        return eventNotHandledErr;
+                    }
+                    
+                    windOrTopUI = AXUIElementCreateWithHIObjectAndIdentifier( (HIObjectRef)win, 0 );
+                    if (windOrTopUI == NULL) {
+                        return eventNotHandledErr;
+                    }
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( windOrTopUI ), &windOrTopUI );
+                    CFRelease( windOrTopUI );
+                    return noErr;
+
+                } else if ( CFStringCompare( attribute, kAXEnabledAttribute, 0 ) == kCFCompareEqualTo ) {
+                    Boolean				enabled = true;
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeBoolean, sizeof( enabled ), &enabled );
+                    return noErr;
+                
+//TODO: Add kAXFocusedAttribute support?
+#if 0
+                } else if ( CFStringCompare( attribute, kAXFocusedAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return whether or not this part is focused.
+                    Boolean				focused = false;
+                    
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeBoolean, sizeof( focused ), &focused );
+                    return noErr;
+#endif
+
+                } else if ( CFStringCompare( attribute, kAXTitleAttribute, 0 ) == kCFCompareEqualTo ) {
+                    // Return the item's text
+                    wxString        str;
+                    wxListItem      headerItem;
+
+                    if (pProjectListCtrlAccessible) {
+                        pProjectListCtrlAccessible->GetName(row, &str);
+                    } else {
+                        pNoticeListCtrlAccessible->GetName(row, &str);
+                    }
+                    
+                    CFStringRef		title = CFStringCreateWithCString(NULL, str.char_str(), kCFStringEncodingUTF8);
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( title ), &title );
+                    CFRelease( title );
+                    return noErr;
+
+                } else {
+                    return eventNotHandledErr;
+                }
+
+            } // End if ( inIdentifier != 0 )
+        break;
+        }       // End case kEventAccessibleGetNamedAttribute:
+
+#pragma mark kEventAccessibleIsNamedAttributeSettable
+        case kEventAccessibleIsNamedAttributeSettable:
+        {
+            CFStringRef			attribute;
+            Boolean				isSettable = false;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleAttributeName, 
+                        typeCFStringRef, NULL, sizeof(typeCFStringRef), NULL, &attribute);
+            if (err) return err;
+
+            // The focused attribute is the only settable attribute for this view,
+            // and it can only be set on part (or subelements), not the whole view.
+            if (inIdentifier != 0)
+            {
+                if ( CFStringCompare( attribute, kAXFocusedAttribute, 0 ) == kCFCompareEqualTo )
+                {
+                    isSettable = true;
+                }
+            }
+            SetEventParameter( inEvent, kEventParamAccessibleAttributeSettable, typeBoolean, sizeof( Boolean ), &isSettable );
+            return noErr;
+        }
+        break;
+
+#pragma mark kEventAccessibleSetNamedAttribute
+        case kEventAccessibleSetNamedAttribute:
+        {
+            return eventNotHandledErr;
+        }
+        break;
+
+#pragma mark kEventAccessibleGetAllActionNames
+        case kEventAccessibleGetAllActionNames:
+        {
+            CFMutableArrayRef	array;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleActionNames, 
+                        typeCFMutableArrayRef, NULL, sizeof(typeCFMutableArrayRef), NULL, &array);
+            if (err) return err;
+            
+            if (inIdentifier != 0) {
+                CFArrayAppendValue( array, kAXPressAction );
+            }
+            return noErr;
+        }
+        break;
+        
+#pragma mark kEventAccessibleGetNamedActionDescription
+        case kEventAccessibleGetNamedActionDescription:
+        {
+            CFStringRef				action;
+            CFMutableStringRef		desc;
+            CFStringRef				selfDesc = NULL;
+            
+            if (inIdentifier == 0) {
+                return eventNotHandledErr;
+            }
+            
+            err = GetEventParameter (inEvent, kEventParamAccessibleActionName, 
+                        typeCFStringRef, NULL, sizeof(typeCFStringRef), NULL, &action);
+            if (err) return err;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleActionDescription, 
+                        typeCFMutableStringRef, NULL, sizeof(typeCFMutableStringRef), NULL, &desc);
+            if (err) return err;
+
+             selfDesc = HICopyAccessibilityActionDescription( action );
+
+            CFStringReplaceAll( desc, selfDesc );
+            CFRelease( selfDesc );
+            return noErr;
+        }
+        break;
+    
+#pragma mark kEventAccessiblePerformNamedAction
+        case kEventAccessiblePerformNamedAction:
+        {
+            CFStringRef				action;
+                
+            if (inIdentifier == 0) {
+                return eventNotHandledErr;
+            }
+                
+            err = GetEventParameter (inEvent, kEventParamAccessibleActionName, 
+                        typeCFStringRef, NULL, sizeof(typeCFStringRef), NULL, &action);
+            if (err) return err;
+            
+            if ( CFStringCompare( action, kAXPressAction, 0 ) != kCFCompareEqualTo ) {
+                return eventNotHandledErr;
+            }
+            if (pProjectListCtrlAccessible) {
+                err = pProjectListCtrlAccessible->DoDefaultAction(inIdentifier);
+            } else {
+                err = pNoticeListCtrlAccessible->DoDefaultAction(inIdentifier);
+            }
+            if (err) {
+                return eventNotHandledErr;
+            }
+            
+            return noErr;
+        }
+        break;
+        
+        default:
+            return eventNotHandledErr;
+    }   // End switch(eventKind)
+    
+    return eventNotHandledErr;
+}
+
+
+
+pascal OSStatus SimpleAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
+                                    EventRef inEvent, void* pData) {
+    const UInt32                eventClass = GetEventClass(inEvent);
+    const UInt32                eventKind = GetEventKind(inEvent);
+    OSStatus                    err;
+    
+    if (eventClass != kEventClassAccessibility) {
+        return eventNotHandledErr;
+    }
+
+    switch (eventKind) {
+
+#pragma mark kEventAccessibleGetNamedAttribute
+        case kEventAccessibleGetNamedAttribute:
+            CFStringRef			attribute;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleAttributeName, 
+                        typeCFStringRef, NULL, sizeof(typeCFStringRef), NULL, &attribute);
+            if (err) return err;
+
+            if ( CFStringCompare( attribute, kAXRoleAttribute, 0 ) == kCFCompareEqualTo ) {
+                    CFStringRef		role = kAXStaticTextRole;
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( role ), &role );
+                    return noErr;
+            }
+
+        return CallNextEventHandler( inHandlerCallRef, inEvent );
+        return eventNotHandledErr;
+    break;
+
+    
+    default:
+    return CallNextEventHandler( inHandlerCallRef, inEvent );
+
+        return eventNotHandledErr;
+    }
+    
+    return eventNotHandledErr;
+}
+
+
+pascal OSStatus PieCtrlAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
+                                    EventRef inEvent, void* pData) {
+    const UInt32                eventClass = GetEventClass(inEvent);
+    const UInt32                eventKind = GetEventKind(inEvent);
+    OSStatus                    err;
+    wxPieCtrl*                  pPieCtrl = (wxPieCtrl*)pData;
+
+    if (eventClass != kEventClassAccessibility) {
+        return eventNotHandledErr;
+    }
+
+    switch (eventKind) {
+
+#pragma mark kEventAccessibleGetNamedAttribute
+        case kEventAccessibleGetNamedAttribute:
+            CFStringRef			attribute;
+
+            err = GetEventParameter (inEvent, kEventParamAccessibleAttributeName, 
+                        typeCFStringRef, NULL, sizeof(typeCFStringRef), NULL, &attribute);
+            if (err) return err;
+
+            if ( CFStringCompare( attribute, kAXRoleAttribute, 0 ) == kCFCompareEqualTo ) {
+                    CFStringRef		role = kAXStaticTextRole;
+
+                    SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( role ), &role );
+                    return noErr;
+
+            } else if ( CFStringCompare( attribute, kAXDescriptionAttribute, 0 ) == kCFCompareEqualTo ) {
+                // Return a string indicating the role of this part.
+                wxString            str;
+                CFStringRef         description;
+                unsigned int        i;
+                
+                str = pPieCtrl->GetLabel();
+                for(i=0; i<pPieCtrl->m_Series.Count(); i++) {
+                    str += wxT("; ");
+                    str += pPieCtrl->m_Series[i].GetLabel();
+                }
+                
+                description = CFStringCreateWithCString(NULL, str.char_str(), kCFStringEncodingUTF8);
+                SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof( description ), &description );
+                CFRelease( description );
+                return noErr;
+            }
+
+        return CallNextEventHandler( inHandlerCallRef, inEvent );
+        return eventNotHandledErr;
+    break;
+
+    
+    default:
+    return CallNextEventHandler( inHandlerCallRef, inEvent );
+
+        return eventNotHandledErr;
+    }
+    
+    return eventNotHandledErr;
+}
+
diff --git a/clientgui/mac/MacAccessiblity.h b/clientgui/mac/MacAccessiblity.h
new file mode 100644
index 0000000..d835d49
--- /dev/null
+++ b/clientgui/mac/MacAccessiblity.h
@@ -0,0 +1,38 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2009 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+//  macAccessiblity.h
+
+#ifndef _MACACCESSIBILITY_H_ 
+#define _MACACCESSIBILITY_H_ 
+
+#include "BOINCBaseView.h"
+#include "DlgEventLog.h"
+#include "wx/generic/listctrl.h"
+
+typedef struct {
+    wxGenericListCtrl*  pList;
+    CBOINCBaseView*     pView;
+    CDlgEventLog*       pEventLog;
+    HIViewRef           headerView;
+    HIViewRef           bodyView;
+    Boolean             snowLeopard;
+} ListAccessData;
+
+void AccessibilityIgnoreAllChildren(HIViewRef parent, int recursionLevel);
+
+#endif
\ No newline at end of file
diff --git a/clientgui/mac/MacBitmapComboBox.cpp b/clientgui/mac/MacBitmapComboBox.cpp
new file mode 100644
index 0000000..5037d1a
--- /dev/null
+++ b/clientgui/mac/MacBitmapComboBox.cpp
@@ -0,0 +1,307 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "stdwx.h"
+#include "MacBitmapComboBox.h"
+
+#define POPUPBUTTONCONTROLHEIGHT 20
+
+// wxChoice uses CreatePopupButtonControl
+
+const wxChar CBOINCBitmapChoiceNameStr[] = wxT("popup");
+const wxChar CBOINCBitmapComboBoxNameStr[] = wxT("combo");
+
+IMPLEMENT_DYNAMIC_CLASS(CBOINCBitmapChoice, wxChoice)
+
+BEGIN_EVENT_TABLE(CBOINCBitmapChoice, wxChoice)
+    EVT_LEFT_DOWN(CBOINCBitmapChoice::OnMouseDown)
+END_EVENT_TABLE()
+
+CBOINCBitmapChoice::CBOINCBitmapChoice() {}
+
+CBOINCBitmapChoice::CBOINCBitmapChoice(wxWindow *parent, wxWindowID id,
+            const wxString& value, 
+            const wxPoint& pos,
+            const wxSize& size,
+            int n, const wxString choices[],
+            long style,
+            const wxValidator& validator,
+            const wxString& name)
+{
+    Create(parent, id, pos, size, n, choices, style, validator, name);
+
+    if (! value.IsEmpty()) {
+        SetStringSelection(value);
+    }
+}
+
+CBOINCBitmapChoice::~CBOINCBitmapChoice() {
+}
+
+void CBOINCBitmapChoice::SetItemBitmap(unsigned int n, const wxBitmap& bitmap) {
+    MenuHandle mhandle = (MenuHandle) m_macPopUpMenuHandle;
+    unsigned int index = n + 1;
+    
+    if ( mhandle == NULL || index == 0)
+        return ;
+
+    if ( bitmap.Ok() )
+    {
+        CGImageRef imageRef = (CGImageRef)( bitmap.CGImageCreate() ) ;
+        SetMenuItemIconHandle( mhandle , index ,
+                    kMenuCGImageRefType , (Handle) imageRef ) ;
+
+#if 0// wxUSE_BMPBUTTON
+        ControlButtonContentInfo info ;
+        wxMacCreateBitmapButton( &info , bitmap ) ;
+        if ( info.contentType != kControlNoContent )
+        {
+            if ( info.contentType == kControlContentIconRef )
+                SetMenuItemIconHandle( mhandle , index ,
+                    kMenuIconRefType , (Handle) info.u.iconRef ) ;
+            else if ( info.contentType == kControlContentCGImageRef )
+               SetMenuItemIconHandle( mhandle , index ,
+                    kMenuCGImageRefType , (Handle) info.u.imageRef ) ;
+        }
+        wxMacReleaseBitmapButton( &info ) ;
+#endif
+    }
+}
+void CBOINCBitmapChoice::OnMouseDown(wxMouseEvent& event) {
+    wxToolTip::Enable(false);
+    event.Skip();
+}
+
+
+
+
+
+IMPLEMENT_DYNAMIC_CLASS(CBOINCBitmapComboBox, wxPanel)
+
+BEGIN_EVENT_TABLE(CBOINCBitmapComboBox, wxPanel)
+//	EVT_ERASE_BACKGROUND(CBOINCBitmapComboBox::OnEraseBackground)
+    EVT_PAINT(CBOINCBitmapComboBox::OnPaint)
+//    EVT_CHOICE(CBOINCBitmapComboBox::OnSelection)
+END_EVENT_TABLE()
+
+CBOINCBitmapComboBox::CBOINCBitmapComboBox() {}
+
+CBOINCBitmapComboBox::CBOINCBitmapComboBox(wxWindow *parent, wxWindowID id,
+            const wxString& value, 
+            const wxPoint& pos,
+            const wxSize& size,
+            int n, const wxString choices[],
+            long style,
+            const wxValidator& validator,
+            const wxString& name) :
+            wxPanel( parent, id, pos, size, wxCLIP_CHILDREN | wxBORDER_NONE )
+{
+    int i;
+
+    m_ChoiceControl = new CBOINCBitmapChoice(this, id, value, wxDefaultPosition, wxSize(size.x, POPUPBUTTONCONTROLHEIGHT), n, choices, style, validator);
+    m_bHaveLargeBitmaps = (size.y > 0);
+	wxBoxSizer* bSizer1;
+	bSizer1 = new wxBoxSizer( wxVERTICAL );
+    int margin = m_bHaveLargeBitmaps ? (size.y - POPUPBUTTONCONTROLHEIGHT)/2 : 0;
+	bSizer1->Add( m_ChoiceControl, 1, wxTOP | wxBOTTOM | wxEXPAND, margin);
+	this->SetSizer( bSizer1 );
+    Layout();
+    if (m_bHaveLargeBitmaps) {
+        for (i=0; i<n; ++i) {
+            m_BitmapCache.push_back(wxNullBitmap);
+        }
+    }
+        Connect(id, wxEVT_COMMAND_CHOICE_SELECTED,
+        (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) &CBOINCBitmapComboBox::OnSelection
+    );
+
+}
+
+CBOINCBitmapComboBox::~CBOINCBitmapComboBox() {
+    Clear();
+}
+
+void CBOINCBitmapComboBox::SetItemBitmap(unsigned int n, const wxBitmap& bitmap) {
+    unsigned int cacheSize, i;
+
+    if (m_bHaveLargeBitmaps) {
+        cacheSize = m_BitmapCache.size();
+        for (i=cacheSize; i<n; ++i) {
+            m_BitmapCache.push_back(wxNullBitmap);
+        }
+#if 0
+        if (m_BitmapCache.at(n) != NULL) {
+            delete m_BitmapCache.at(n);
+            m_BitmapCache.at(n) = NULL;
+        }
+#endif
+        wxBitmap* bm = new wxBitmap(bitmap);
+        m_BitmapCache.at(n) = *bm;
+        delete bm;
+    }
+    
+    m_ChoiceControl->SetItemBitmap(n, bitmap);
+    if (n == (unsigned int)m_ChoiceControl->GetSelection()) {
+        Refresh();
+    }
+}
+
+
+void CBOINCBitmapComboBox::SetStringSelection(const wxString& text) {
+    m_ChoiceControl->SetStringSelection(text);
+    Refresh();
+}
+
+
+void CBOINCBitmapComboBox::SetSelection(int sel) {
+    m_ChoiceControl->SetSelection(sel);
+    Refresh();
+}
+
+
+int CBOINCBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap) {
+    if (m_bHaveLargeBitmaps) {
+        m_BitmapCache.push_back(bitmap);
+    }
+    
+    int n = m_ChoiceControl->Append(item);
+    SetItemBitmap(n, bitmap);
+    return n;
+}
+
+
+int CBOINCBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap, void *clientData) {
+    if (m_bHaveLargeBitmaps) {
+        m_BitmapCache.push_back(bitmap);
+    }
+
+    int n = m_ChoiceControl->Append(item, clientData);
+    SetItemBitmap(n, bitmap);
+    return n;
+}
+
+
+int CBOINCBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos) {
+    if (m_bHaveLargeBitmaps) {
+        std::vector<wxBitmap>::iterator insertionPoint = m_BitmapCache.begin();
+        wxBitmap* bm = new wxBitmap(bitmap);
+        m_BitmapCache.insert(insertionPoint + pos, *bm);
+        delete bm;
+    }
+    int n = m_ChoiceControl->Insert(item, pos);
+    SetItemBitmap(n, bitmap);
+    return n;
+}
+
+
+int CBOINCBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos, void *clientData) {
+    if (m_bHaveLargeBitmaps) {
+        std::vector<wxBitmap>::iterator insertionPoint = m_BitmapCache.begin();
+        wxBitmap* bm = new wxBitmap(bitmap);
+        m_BitmapCache.insert(insertionPoint + pos, *bm);
+        delete bm;
+    }
+    
+    int n = m_ChoiceControl->Insert(item, pos, clientData);
+    SetItemBitmap(n, bitmap);
+    return n;
+}
+
+
+void CBOINCBitmapComboBox::Delete(unsigned int n) {
+    if (n < m_ChoiceControl->GetCount()) {
+        if (m_bHaveLargeBitmaps) {
+            std::vector<wxBitmap>::iterator deletionPoint = m_BitmapCache.begin();
+            m_BitmapCache.erase(deletionPoint + n);
+        }
+        
+        m_ChoiceControl->Delete(n);
+        Refresh();
+    }
+}
+
+
+void CBOINCBitmapComboBox::Clear() {
+    m_BitmapCache.clear();
+    int count = GetCount();
+	for(int j = count-1; j >=0; --j) {
+        wxASSERT(!m_ChoiceControl->GetClientData(j));
+        m_ChoiceControl->SetClientData(j, NULL);
+    }
+    m_ChoiceControl->Clear();
+}
+
+
+void CBOINCBitmapComboBox::OnSelection(wxCommandEvent& event) {
+    Refresh();      // To draw the bitmap
+    event.Skip();
+}
+
+
+void CBOINCBitmapComboBox::OnPaint(wxPaintEvent& event) {
+    int x, y;
+	wxPaintDC myDC(this);
+    unsigned int i = GetSelection();
+    if (m_BitmapCache.size() <= i) {
+        return;
+    }
+    
+    wxPen oldPen = myDC.GetPen();
+    wxBrush oldBrush = myDC.GetBrush();
+    int oldMode = myDC.GetBackgroundMode();
+
+    myDC.SetPen(*wxMEDIUM_GREY_PEN);
+    myDC.SetBrush(*wxTRANSPARENT_BRUSH);
+    myDC.SetBackgroundMode(wxSOLID);
+
+    GetSize(&x, &y);
+    if ((m_BitmapCache.at(i)).Ok()) {
+        myDC.DrawBitmap(m_BitmapCache.at(i), 9, 1, false);
+        myDC.DrawRectangle(8, 0, y, y);
+    }
+    
+    // Restore Mode, Pen and Brush 
+    myDC.SetBackgroundMode(oldMode);
+    myDC.SetPen(oldPen);
+    myDC.SetBrush(oldBrush);
+}
+
+
+void CBOINCBitmapComboBox::EmptyBitmapCache() {
+#if 0
+    unsigned int i, cacheSize;
+    
+    cacheSize = m_BitmapCache.size();
+    for (i=0; i<cacheSize; i++) {
+        if (m_BitmapCache.at(i) != NULL) {
+            delete m_BitmapCache.at(i);
+            m_BitmapCache.at(i) = NULL;
+        }
+    }
+#endif
+    m_BitmapCache.clear();
+}
+
+
+void CBOINCBitmapComboBox::SetToolTip(wxString& s) {
+    m_ChoiceControl->SetToolTip(s);
+}
+
+
+void CBOINCBitmapComboBox::SetToolTip(wxToolTip* tip) {
+    m_ChoiceControl->SetToolTip(tip);
+}
diff --git a/clientgui/mac/MacBitmapComboBox.h b/clientgui/mac/MacBitmapComboBox.h
new file mode 100644
index 0000000..4f91118
--- /dev/null
+++ b/clientgui/mac/MacBitmapComboBox.h
@@ -0,0 +1,100 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef __MACBITMAPCOMBOBOX__
+#define __MACBITMAPCOMBOBOX__
+
+#include <wx/choice.h>
+
+WXDLLEXPORT_DATA(extern const wxChar) CBOINCBitmapChoiceNameStr[];
+WXDLLEXPORT_DATA(extern const wxChar) CBOINCBitmapComboBoxNameStr[];
+
+#define EVT_BOINCBITMAPCOMBOBOX EVT_CHOICE
+
+class CBOINCBitmapChoice : public wxChoice 
+{
+    DECLARE_DYNAMIC_CLASS(CBOINCBitmapChoice )
+    DECLARE_EVENT_TABLE()
+
+public:
+    CBOINCBitmapChoice() ;
+
+    virtual ~CBOINCBitmapChoice();
+
+    CBOINCBitmapChoice(wxWindow *parent, wxWindowID id,
+            const wxString& value = wxT(""), 
+            const wxPoint& pos = wxDefaultPosition,
+            const wxSize& size = wxDefaultSize,
+            int n = 0, const wxString choices[] = NULL,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = CBOINCBitmapChoiceNameStr);
+
+    void OnMouseDown(wxMouseEvent& event);
+    void SetItemBitmap(unsigned int n, const wxBitmap& bitmap);
+};
+
+class CBOINCBitmapComboBox : public wxPanel 
+{
+    DECLARE_DYNAMIC_CLASS( CBOINCBitmapComboBox )
+    DECLARE_EVENT_TABLE()
+
+public:
+    CBOINCBitmapComboBox() ;
+
+    virtual ~CBOINCBitmapComboBox();
+
+    CBOINCBitmapComboBox(wxWindow *parent, wxWindowID id,
+            const wxString& value = wxT(""), 
+            const wxPoint& pos = wxDefaultPosition,
+            const wxSize& size = wxDefaultSize,
+            int n = 0, const wxString choices[] = NULL,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = CBOINCBitmapComboBoxNameStr);
+
+    void SetItemBitmap(unsigned int n, const wxBitmap& bitmap);
+    void SetStringSelection(const wxString& text);
+    void SetSelection(int sel);
+    int GetCount() { return m_ChoiceControl->GetCount(); }
+    void * GetClientData(unsigned int n) const { return m_ChoiceControl->GetClientData(n); }
+    void SetClientData(unsigned int n, void *data) { m_ChoiceControl->SetClientData(n, data); }
+    int GetSelection() { return m_ChoiceControl->GetCurrentSelection(); }
+    wxString GetValue() { return m_ChoiceControl->GetStringSelection(); }
+    wxString GetString(unsigned int n) const { return m_ChoiceControl->GetString(n); }
+    wxString GetStringSelection() { return m_ChoiceControl->GetStringSelection(); }
+
+    int Append(const wxString& item, const wxBitmap& bitmap);
+    int Append(const wxString& item, const wxBitmap& bitmap, void *clientData);
+    int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos);
+    int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos, void *clientData);
+    void Delete(unsigned int n);
+    void Clear();
+    void SetToolTip(wxString& s);
+    void SetToolTip(wxToolTip* tip);
+    
+private:
+    void OnPaint(wxPaintEvent& event);
+    void OnSelection(wxCommandEvent& event);
+    void EmptyBitmapCache();
+
+    CBOINCBitmapChoice      *m_ChoiceControl;
+    bool                    m_bHaveLargeBitmaps;
+    std::vector<wxBitmap>   m_BitmapCache;
+};
+
+#endif //__MACBITMAPCOMBOBOX__
diff --git a/clientgui/mac/MacGUI.pch b/clientgui/mac/MacGUI.pch
new file mode 100644
index 0000000..eb470ad
--- /dev/null
+++ b/clientgui/mac/MacGUI.pch
@@ -0,0 +1,90 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2011 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef _MACGUI_H_
+#define _MACGUI_H_
+/*
+ *  MacGUI.pch
+ *  BOINCManager precompiled headers file for Mac
+ */
+
+// To use the Development (Debug) build of wxMac (allows stepping into wxMac 
+//   source code, enables debug, trace, Asserts, etc.):
+// (1) Set USE_DEBUG_WXMAC to 1 in this source file
+// (2) In the Project menu, set the Active Build Configuration to "Development"
+// (3) In the Project menu, set the Active Target to "mgr_boinc"
+// (4) In Xcode's main project window, control-click on the title "Groups & Files" at the 
+//      top of the left-hand pane and select "Target Membership" from the contextual menu.
+// (5) In the XCode project's Groups and Files column:
+//      uncheck "External Frameworks and Libraries/libwx_mac_static.a"
+// (6) In the XCode project's Groups and Files column:
+//      check "External Frameworks and Libraries/wxMac-BOINC.xcodeproj/libwx_mac_static.a"
+//
+// This will have no effect on the BOINC Manager Deployment build, which will still 
+//  use the wxMac Deployment build.
+//
+// To use the wxMac Deployment build even in BOINC Manager Development builds, reverse 
+// the above steps (setting USE_DEBUG_WXMAC to 0, etc.)
+
+#define USE_DEBUG_WXMAC 0
+ 
+#define WX_PRECOMP
+
+#define HAVE_SSIZE_T
+
+#include <wx/version.h> // For wxCHECK_VERSION
+
+#define TARGET_CARBON 1
+#define wxUSE_UNICODE 1
+#define HAVE_WCSLEN 1
+
+#include <wchar.h>
+
+#if ((defined(__i386__) || defined(__x86_64__)) && wxCHECK_VERSION(2,8,2))
+// platform.h erroneously #defines __POWERPC__, so we include platform.h first 
+// and then #undef __POWERPC__ before including the other wxMac header files.
+// It's unclear if this affects non-CodeWarrior builds, but do it to be safe.
+#include <wx/platform.h>
+#ifdef __POWERPC__
+#undef __POWERPC__
+#endif
+#endif
+
+#if (defined(_DEBUG) && (! USE_DEBUG_WXMAC))
+
+#undef _DEBUG       // so we can link with Deployment Wx libs
+#undef __WXDEBUG__
+
+#include "stdwx.h"
+
+#define  _DEBUG     // Redefine _DEBUG for the rest of the code
+#define __WXDEBUG__
+
+#else   // ! (defined(_DEBUG) && (! USE_DEBUG_WXMAC))
+
+#include "stdwx.h"
+
+#endif  // ! (defined(_DEBUG) && (! USE_DEBUG_WXMAC))
+
+#include "config.h"
+
+// Prototypes for Mac_GUI.cpp
+Boolean Mac_Authorize(void);
+void MacLocalizeBOINCMenu();
+Boolean IsWindowOnScreen(int iLeft, int iTop, int iWidth, int iHeight);
+
+#endif
diff --git a/clientgui/mac/MacSysMenu.cpp b/clientgui/mac/MacSysMenu.cpp
new file mode 100644
index 0000000..b4c6b41
--- /dev/null
+++ b/clientgui/mac/MacSysMenu.cpp
@@ -0,0 +1,453 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+#if defined(__GNUG__) && !defined(__APPLE__)
+#pragma implementation "MacSysMenu.h"
+#endif
+
+#include "stdwx.h"
+#include "BOINCGUIApp.h"
+#include "BOINCBaseFrame.h"
+#include "MainDocument.h"
+#include "MacSysMenu.h"
+#include "DlgAbout.h"
+#include "Events.h"
+#include "miofile.h"
+#include "SkinManager.h"
+
+pascal OSStatus SysMenuEventHandler( EventHandlerCallRef inHandlerCallRef,
+                                    EventRef inEvent, void* pData);
+
+    EventTypeSpec myEvents[] = { {kEventClassCommand, kEventCommandProcess},
+                                    { kEventClassApplication, kEventAppHidden},
+                                    { kEventClassApplication, kEventAppShown},
+                                    {kEventClassMenu, kEventMenuOpening} };
+
+
+#if wxCHECK_VERSION(2,8,0)
+
+// Class declarations copied from wxMac-2.8.0/src/mac/carbon/taskbar.cpp
+// We had to copy these because they are not in a header file.
+
+class wxTaskBarIconImpl
+{
+public:
+    wxTaskBarIconImpl(wxTaskBarIcon* parent);
+    virtual ~wxTaskBarIconImpl();
+
+    virtual bool IsIconInstalled() const = 0;
+    virtual bool SetIcon(const wxIcon& icon) = 0;
+    virtual bool RemoveIcon() = 0;
+    virtual bool PopupMenu(wxMenu *menu) = 0;
+
+    wxMenu * CreatePopupMenu()
+    { return m_parent->CreatePopupMenu(); }
+
+    wxTaskBarIcon *m_parent;
+    class wxTaskBarIconWindow *m_menuEventWindow;
+
+    DECLARE_NO_COPY_CLASS(wxTaskBarIconImpl)
+};
+
+//-----------------------------------------------------------------------------
+//
+//  wxTaskBarIconWindow
+//
+//  Event handler for menus
+//  NB: Since wxWindows in Mac HAVE to have parents we need this to be
+//  a top level window...
+//-----------------------------------------------------------------------------
+
+class wxTaskBarIconWindow : public wxTopLevelWindow
+{
+public:
+    wxTaskBarIconWindow(wxTaskBarIconImpl *impl)
+        : wxTopLevelWindow(NULL, wxID_ANY, wxEmptyString), m_impl(impl)
+    {
+        Connect(
+            -1, wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(wxTaskBarIconWindow::OnMenuEvent) );
+    }
+
+    void OnMenuEvent(wxCommandEvent& event)
+    {
+        m_impl->m_parent->ProcessEvent(event);
+    }
+
+private:
+    wxTaskBarIconImpl *m_impl;
+};
+
+class wxDockTaskBarIcon : public wxTaskBarIconImpl
+{
+public:
+    wxDockTaskBarIcon(wxTaskBarIcon* parent);
+    virtual ~wxDockTaskBarIcon();
+
+    virtual bool IsIconInstalled() const;
+    virtual bool SetIcon(const wxIcon& icon);
+    virtual bool RemoveIcon();
+    virtual bool PopupMenu(wxMenu *menu);
+
+    wxMenu* DoCreatePopupMenu();
+
+    EventHandlerRef     m_eventHandlerRef;
+    EventHandlerUPP     m_eventupp;
+    wxWindow           *m_eventWindow;
+    wxMenu             *m_pMenu;
+    MenuRef             m_theLastMenu;
+    bool                m_iconAdded;
+};
+
+#endif
+
+
+CMacSystemMenu::CMacSystemMenu(wxString title, wxIcon* icon, wxIcon* iconDisconnected, wxIcon* iconSnooze)
+                                : CTaskBarIcon(title, icon, iconDisconnected, iconSnooze) {
+     CFBundleRef	SysMenuBundle	= NULL;
+
+    m_bOpeningAboutDlg = false;
+    m_bNeedRebuildMenu = false;
+    
+    LoadPrivateFrameworkBundle( CFSTR("SystemMenu.bundle"), &SysMenuBundle );
+    if ( SysMenuBundle != NULL )
+    {
+        SetUpSystemMenu = (SetUpSystemMenuProc) 
+                            CFBundleGetFunctionPointerForName( SysMenuBundle, CFSTR("SetUpSystemMenu") );
+        SetSystemMenuIcon = (SetSystemMenuIconProc) 
+                            CFBundleGetFunctionPointerForName( SysMenuBundle, CFSTR("SetSystemMenuIcon") );
+        
+        BuildMenu();
+
+        // The base class wxTaskBarIcon will install the wxDockEventHandler for 
+        // each instance of the derived classes CTaskBarIcon and CMacSystemMenu.
+        // We remove that handler and substitute our own.
+#if wxCHECK_VERSION(2,8,0)
+        RemoveEventHandler((EventHandlerRef&)(((wxDockTaskBarIcon*)m_impl)->m_eventHandlerRef));
+        
+        InstallApplicationEventHandler(NewEventHandlerUPP(SysMenuEventHandler), 
+                                sizeof(myEvents) / sizeof(EventTypeSpec), myEvents, 
+                                                        this, (EventHandlerRef*)&(((wxDockTaskBarIcon*)m_impl)->m_eventHandlerRef)); 
+#else
+        RemoveEventHandler((EventHandlerRef&)m_pEventHandlerRef);
+
+        InstallApplicationEventHandler(NewEventHandlerUPP(SysMenuEventHandler), 
+                                sizeof(myEvents) / sizeof(EventTypeSpec), myEvents, 
+                                                        this, (EventHandlerRef*)&m_pEventHandlerRef); 
+#endif
+    }
+}
+
+
+CMacSystemMenu::~CMacSystemMenu() {
+    // Remove the System Menu (StatusItem) from menu bar
+    if (SetSystemMenuIcon != NULL )
+        SetSystemMenuIcon(NULL);
+}
+
+
+// Set the System Menu Icon from XPM data
+bool CMacSystemMenu::SetMacMenuIcon(const wxIcon& icon) {
+    wxBitmap theBits;
+
+    // For unknown reasons, menus won't work if we call BuildMenu() directly 
+    // from CTaskBarIcon::OnReloadSkin(), so it sets a flag to call it here
+    if (m_bNeedRebuildMenu) {
+        CMainDocument*     pDoc = wxGetApp().GetDocument();
+        wxASSERT(pDoc);
+        wxASSERT(wxDynamicCast(pDoc, CMainDocument));
+        if (pDoc->IsConnected() && m_bNeedRebuildMenu) {
+            // For unknown reasons, Menubar Icon menu doesn't work without this
+            BuildMenu();
+        }
+    }
+    m_bNeedRebuildMenu = false;
+    
+    theBits.CopyFromIcon(icon);
+    CGImageRef imageRef = (CGImageRef)theBits.CGImageCreate();
+    if ( (SetSystemMenuIcon != NULL) && (imageRef != NULL) ) { 
+        SetSystemMenuIcon(imageRef);
+        CGImageRelease( imageRef );
+        return true;
+    }
+    
+    if(imageRef != NULL) CGImageRelease( imageRef );
+                
+    return false;
+}
+
+
+void CMacSystemMenu::BuildMenu() {
+    wxBitmap theBits;
+    wxMenu *themenu;
+    CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
+
+    wxASSERT(pSkinAdvanced);
+    wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
+
+    m_iconTaskBarNormal = *pSkinAdvanced->GetApplicationIcon();
+    m_iconTaskBarDisconnected = *pSkinAdvanced->GetApplicationDisconnectedIcon();
+    m_iconTaskBarSnooze = *pSkinAdvanced->GetApplicationSnoozeIcon();
+
+    theBits.CopyFromIcon(m_iconTaskBarNormal);
+    CGImageRef imageRef = (CGImageRef)theBits.CGImageCreate();                
+    if ( (SetUpSystemMenu != NULL ) && (imageRef != NULL) ) {
+        // Currently, the system menu is the same as the Dock menu with the addition of 
+        // the Quit menu item.  If in the future you wish to make the system menu different 
+        // from the Dock menu, override CTaskBarIcon::BuildContextMenu() and 
+        // CTaskBarIcon::AdjustMenuItems().
+#if wxCHECK_VERSION(2,8,0)
+        delete ((wxDockTaskBarIcon*)m_impl)->m_pMenu;
+        ((wxDockTaskBarIcon*)m_impl)->m_pMenu = BuildContextMenu();
+        themenu = ((wxDockTaskBarIcon*)m_impl)->m_pMenu;
+#else
+        delete m_pMenu;
+        m_pMenu = BuildContextMenu();
+        themenu = m_pMenu;
+#endif
+
+        // These should appear in the Mac System Menu but not the Dock
+        themenu->AppendSeparator();
+        themenu->Append( wxID_EXIT, _("E&xit"), wxEmptyString );
+        
+        themenu->SetEventHandler(this);
+
+        SetUpSystemMenu((MenuRef)(themenu->GetHMenu()), imageRef);
+    }
+    if(imageRef != NULL) CGImageRelease( imageRef );
+}
+
+
+#if wxCHECK_VERSION(2,8,0)
+
+wxMenu* CMacSystemMenu::GetCurrentMenu() {
+    return ((wxDockTaskBarIcon*)m_impl)->m_pMenu;
+}
+
+#endif
+
+
+//	Utility routine to load a bundle from the application's Frameworks folder.
+//	i.e. : "BOINC.app/Contents/Frameworks/SystemMenu.bundle"
+void CMacSystemMenu::LoadPrivateFrameworkBundle( CFStringRef framework, CFBundleRef *bundlePtr ) {
+	CFURLRef	baseURL			= NULL;
+	CFURLRef	bundleURL		= NULL;
+	CFBundleRef	myAppsBundle	= NULL;
+
+	if ( bundlePtr == NULL )	goto Bail;
+	*bundlePtr = NULL;
+	
+	myAppsBundle	= CFBundleGetMainBundle();					//	Get our application's main bundle from Core Foundation
+	if ( myAppsBundle == NULL )	goto Bail;
+	
+	baseURL	= CFBundleCopyPrivateFrameworksURL( myAppsBundle );
+	if ( baseURL == NULL )	goto Bail;
+
+	bundleURL = CFURLCreateCopyAppendingPathComponent( kCFAllocatorSystemDefault, baseURL, framework, false );
+	if ( bundleURL == NULL )	goto Bail;
+
+	*bundlePtr = CFBundleCreate( kCFAllocatorSystemDefault, bundleURL );
+	if ( *bundlePtr == NULL )	goto Bail;
+
+	if ( ! CFBundleLoadExecutable( *bundlePtr ) )
+	{
+		CFRelease( *bundlePtr );
+		*bundlePtr	= NULL;
+	}
+
+Bail:															// Clean up.
+	if ( bundleURL != NULL )	CFRelease( bundleURL );
+	if ( baseURL != NULL )		CFRelease( baseURL );
+}
+
+
+pascal OSStatus SysMenuEventHandler( EventHandlerCallRef inHandlerCallRef,
+                                    EventRef inEvent, void* pData) {
+    HICommand command;
+    MenuRef baseMenuRef, sysMenuRef;
+    Str255 theMenuTitle;
+    short i, n, m;
+    CharParameter markChar;
+    const UInt32 eventClass = GetEventClass(inEvent);
+    const UInt32 eventKind = GetEventKind(inEvent);
+    CMacSystemMenu* pMSM;
+    wxMenu* baseMenu;
+    MenuCommand commandID;
+    MenuItemIndex menuItemIndex;
+    wxMenuItem* item = NULL;
+    OSStatus err;
+
+    switch (eventClass) {
+        case kEventClassCommand:
+            if (eventKind != kEventCommandProcess)
+                return eventNotHandledErr;
+            
+            GetEventParameter (inEvent, kEventParamDirectObject, 
+                                    typeHICommand, NULL, sizeof(HICommand), NULL, &command);
+
+            commandID = command.commandID;
+            if (commandID == 0)
+                return eventNotHandledErr;
+
+             pMSM = wxGetApp().GetMacSystemMenu();
+             if (!pMSM) break;
+                
+           // wxMac "helpfully" converts wxID_ABOUT to kHICommandAbout, wxID_EXIT to kHICommandQuit, 
+            //  wxID_PREFERENCES to kHICommandPreferences
+            switch (commandID) {
+            case kHICommandAbout:
+                commandID = wxID_ABOUT;
+                break;
+            case kHICommandPreferences:
+                {
+                    CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
+                    wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, ID_PREFERENCES);
+                    pFrame->AddPendingEvent(evt);
+                    return noErr ;
+                }
+            case kHICommandQuit:
+                if (wxGetApp().ConfirmExit()) {
+                    commandID = wxID_EXIT;
+                } else {
+                    commandID = 0;
+                    return noErr;
+                }
+                break;
+            }
+                
+            if (commandID == wxID_ABOUT)
+                pMSM->SetOpeningAboutDlg(true);
+                
+            // If not our system menu, pass event on to next event handler
+           if (command.menu.menuRef != (MenuRef)'BNC!') {           // Used only in OS 10.5
+                if (PLstrcmp("\pBOINC!", (GetMenuTitle((command.menu.menuRef), theMenuTitle) ))) {
+                    return eventNotHandledErr;
+                }
+            }
+            
+            // The following code is adapted from wxTaskBarIcon's wxDockEventHandler().
+            // Work with our base menu instead of the cloned System Menu
+            baseMenu = (pMSM->GetCurrentMenu());
+            baseMenuRef = (MenuRef)(baseMenu->GetHMenu());
+        
+            err = GetIndMenuItemWithCommandID(baseMenuRef, command.commandID, 1, NULL, &menuItemIndex);
+            if (err)
+                return eventNotHandledErr;  // Command not found in our menu
+                
+            GetMenuItemRefCon( baseMenuRef, menuItemIndex, (UInt32*) &item ) ;
+
+            if ( item )
+            {
+                if (item->IsCheckable())
+                    item->Check( !item->IsChecked() );
+
+                item->GetMenu()->SendEvent( commandID , item->IsCheckable() ? item->IsChecked() : -1 );
+                
+                // Under wxWidgets 2.8.0, the task bar icons must be deleted for app to 
+                // exit its main loop
+                // Note that if the main window is open, CBOINCBaseFrame::OnExit() will be 
+                // called and SysMenuEventHandler() (i.e., this code) will not be called.
+                if (commandID == wxID_EXIT) {
+                    wxGetApp().DeleteMacSystemMenu();
+                    wxGetApp().DeleteTaskBarIcon();
+                }
+                return noErr ;
+            }
+
+            return eventNotHandledErr;
+
+        case kEventClassMenu:
+            if (eventKind != kEventMenuOpening)
+                return eventNotHandledErr;
+
+            GetEventParameter (inEvent, kEventParamDirectObject, 
+                        typeMenuRef, NULL, sizeof(sysMenuRef), NULL, &sysMenuRef);
+
+            // If not our system menu, pass event on to next event handler
+            if (PLstrcmp("\pBOINC!", (GetMenuTitle((sysMenuRef), theMenuTitle) )))
+                return eventNotHandledErr;
+
+            pMSM = wxGetApp().GetMacSystemMenu();
+            baseMenu = (pMSM->GetCurrentMenu());
+            pMSM->AdjustMenuItems(baseMenu);
+            
+            // Copy checkmark and enabled status of each item from Dock menu
+            baseMenuRef = (MenuRef)(baseMenu->GetHMenu());
+            n = CountMenuItems(sysMenuRef);
+            m = CountMenuItems(baseMenuRef);
+            if (m < n)
+                n = m;
+            for (i=1; i<=n; i++)
+            {
+                GetMenuItemCommandID(baseMenuRef, i, &commandID);
+                SetMenuItemCommandID(sysMenuRef, i, commandID);
+                GetMenuItemText(baseMenuRef, i, theMenuTitle);
+                SetMenuItemText(sysMenuRef, i, theMenuTitle);
+                GetItemMark(baseMenuRef, i, &markChar);
+                SetItemMark(sysMenuRef, i, markChar);
+                if( IsMenuItemEnabled(baseMenuRef, i) )
+                    EnableMenuItem(sysMenuRef, i);
+                else
+                    DisableMenuItem(sysMenuRef, i);
+            }
+
+            return noErr;
+
+        // Event handling to open or close our main window when applicaiton 
+        // is shown or hidden.  This probably should go in BOINCGUIApp.cpp 
+        // or MainFrame.cpp, but it is more eficient to put it here since 
+        // we already have this Mac Event Handler installed.
+        case kEventClassApplication:
+            CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
+            pMSM = wxGetApp().GetMacSystemMenu();
+            switch (eventKind) {
+                case kEventAppHidden:
+                    if (pFrame)
+                        pFrame->Hide();
+                        pMSM->SetOpeningAboutDlg(false);
+                    break;
+
+                case kEventAppShown:
+                    // Don't open main window if "About" Dialog from task bar menu. 
+                    if (pMSM->IsOpeningAboutDlg()) {
+                        pMSM->SetOpeningAboutDlg(false);
+                        break;
+                    }
+                    if (ActiveNonFloatingWindow())  // Prevent infinite loop
+                        break;
+                    if (pFrame) {
+                        pFrame->Show();
+                        pFrame->SendSizeEvent();
+                    }
+                    // If a modal dialog was open, make sure it remains in front
+                    WindowRef win = GetWindowList();
+                    WindowModality modality = kWindowModalityNone;
+                    while (win) {
+                        GetWindowModality(win, &modality, NULL);
+                        if (modality == kWindowModalityAppModal)
+                            BringToFront(win);
+                        win = GetNextWindow(win);
+                    }
+                    break;
+            }
+            
+            return eventNotHandledErr;
+            
+    }   // End switch (eventClass)
+    
+    return eventNotHandledErr;
+}
diff --git a/clientgui/mac/MacSysMenu.h b/clientgui/mac/MacSysMenu.h
new file mode 100644
index 0000000..12fe479
--- /dev/null
+++ b/clientgui/mac/MacSysMenu.h
@@ -0,0 +1,62 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef _MACSYSMENU_H_
+#define _MACSYSMENU_H_
+
+#if defined(__GNUG__) && !defined(__APPLE__)
+#pragma interface "MacSysMenu.cpp"
+#endif
+
+#include <Carbon/Carbon.h>
+
+#include "BOINCTaskBar.h"
+
+class CMacSystemMenu : public CTaskBarIcon
+{
+public:
+    CMacSystemMenu(wxString title, wxIcon* icon, wxIcon* iconDisconnected, wxIcon* iconSnooze);
+    ~CMacSystemMenu();
+
+    bool SetMacMenuIcon(const wxIcon& icon);
+
+    void LoadPrivateFrameworkBundle( CFStringRef framework, CFBundleRef *bundlePtr );
+    //	Function pointer prototypes to the Mach-O Cocoa wrappers
+    typedef void	(*SetUpSystemMenuProc)(MenuRef menuToCopy, CGImageRef theIcon);
+    typedef void	(*SetSystemMenuIconProc)(CGImageRef theIcon);
+
+    SetUpSystemMenuProc         SetUpSystemMenu;
+    SetSystemMenuIconProc       SetSystemMenuIcon;
+    
+    bool                        IsOpeningAboutDlg() { return m_bOpeningAboutDlg; }
+    void                        SetOpeningAboutDlg(bool b) { m_bOpeningAboutDlg = b; }
+    void                        SetNeedToRebuildMenu() { m_bNeedRebuildMenu = true; }
+    void                        BuildMenu(void);
+#if wxCHECK_VERSION(2,8,0)
+    wxMenu                      *GetCurrentMenu();
+#endif
+
+private:
+    
+    bool                        m_bOpeningAboutDlg;
+    bool                        m_bNeedRebuildMenu;
+
+};
+
+
+#endif
+
diff --git a/clientgui/mac/Mac_GUI.cpp b/clientgui/mac/Mac_GUI.cpp
new file mode 100644
index 0000000..e867d8b
--- /dev/null
+++ b/clientgui/mac/Mac_GUI.cpp
@@ -0,0 +1,236 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2011 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+//  Mac_GUI.cpp
+
+#include <Security/Authorization.h>
+#include <Security/AuthorizationTags.h>
+
+#include <unistd.h>
+#include "sandbox.h"
+#include "miofile.h"
+#include "BOINCGUIApp.h"
+#include "SkinManager.h"
+
+using std::min;
+using std::max;
+
+
+// Determine if the currently logged-in user is auhorized to 
+// perform operations which have potential security risks.  
+// An example is "Attach to Project", where a dishonest user might
+// attach to a rogue project which could then read private files 
+// belonging to the user who owns the BOINC application.  This 
+// would be possible because the BOINC Manager runs with the 
+// effectve user ID of its owner on the Mac.
+
+Boolean Mac_Authorize()
+{
+    static Boolean      sIsAuthorized = false;
+    AuthorizationRef	ourAuthRef = NULL;
+    AuthorizationRights	ourAuthRights;
+    AuthorizationFlags	ourAuthFlags;
+    AuthorizationItem	ourAuthItem[1];
+    OSStatus		err = noErr;
+    
+    if (sIsAuthorized)
+        return true;
+        
+    // User is not the owner, so require admin authentication
+    ourAuthItem[0].name = kAuthorizationRightExecute;
+    ourAuthItem[0].value = NULL;
+    ourAuthItem[0].valueLength = 0;
+    ourAuthItem[0].flags = 0;
+
+    ourAuthRights.count = 1;
+    ourAuthRights.items = ourAuthItem;
+    
+    ourAuthFlags = kAuthorizationFlagInteractionAllowed | kAuthorizationFlagExtendRights;
+
+    err = AuthorizationCreate (&ourAuthRights, kAuthorizationEmptyEnvironment, ourAuthFlags, &ourAuthRef);
+
+    if (err == noErr) {
+        sIsAuthorized = true;
+        // We have authenticated user's credentials; we won't actually use the 
+        // privileges / rights so destroy / discard them.
+        err = AuthorizationFree(ourAuthRef, kAuthorizationFlagDestroyRights);
+    }
+        
+    return sIsAuthorized;
+}
+
+
+// Localize the items in the Mac's BOINC menu
+void MacLocalizeBOINCMenu() {
+    MenuRef BOINCMenu;
+    MenuItemIndex itemIndex;
+    wxString originalText = wxEmptyString;
+    char originalCharStr[1024];
+    CFStringRef localizedText;
+    CFStringRef menuItemString;
+    OSStatus err;
+    UInt16 count;
+    CSkinAdvanced*     pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
+    wxASSERT(pSkinAdvanced);
+    
+    const wxChar *shortName = pSkinAdvanced->GetApplicationShortName().c_str();
+    if (!shortName) return;     // Should never happen
+    
+    err = GetIndMenuItemWithCommandID(NULL, kHICommandAbout, 1, &BOINCMenu, &itemIndex);
+    if (!err) {
+        originalText.Printf(_("About %s"), shortName);
+        strlcpy(originalCharStr, originalText.utf8_str(), sizeof(originalCharStr));
+        if (originalCharStr[0]) {
+            localizedText = CFStringCreateWithCString(NULL, originalCharStr, kCFStringEncodingUTF8);
+            if (localizedText) {
+                SetMenuItemTextWithCFString(BOINCMenu, itemIndex, localizedText);
+                CFRelease( localizedText );
+            }
+        }
+    }
+    
+    originalText.Clear();
+    err = GetIndMenuItemWithCommandID(NULL, kHICommandPreferences, 1, &BOINCMenu, &itemIndex);
+    if (!err) {
+        originalText = _("Preferences…");
+        strlcpy(originalCharStr, originalText.utf8_str(), sizeof(originalCharStr));
+        if (originalCharStr[0]) {
+            localizedText = CFStringCreateWithCString(NULL, originalCharStr, kCFStringEncodingUTF8);
+            if (localizedText) {
+                SetMenuItemTextWithCFString(BOINCMenu, itemIndex, localizedText);
+                CFRelease( localizedText );
+            }
+        }
+    }
+    
+    originalText.Clear();
+    originalText = _("Services");
+        strlcpy(originalCharStr, originalText.utf8_str(), sizeof(originalCharStr));
+        if (originalCharStr[0]) {
+        localizedText = CFStringCreateWithCString(NULL, originalCharStr, kCFStringEncodingUTF8);
+        count = CountMenuItems(BOINCMenu);
+        if (localizedText) {
+            for (itemIndex=1; itemIndex<=count; ++itemIndex) {
+                err = CopyMenuItemTextAsCFString(BOINCMenu, itemIndex, &menuItemString);
+                if (err == noErr) {
+                    if (CFStringCompare(menuItemString, CFSTR("Services"), 0) == kCFCompareEqualTo) {
+                        SetMenuItemTextWithCFString(BOINCMenu, itemIndex, localizedText);
+                        break;
+                    }
+                }
+            }
+            CFRelease( localizedText );
+        }
+    }
+    
+    originalText.Clear();
+    err = GetIndMenuItemWithCommandID(NULL, kHICommandHide, 1, &BOINCMenu, &itemIndex);
+    if (!err) {
+        originalText.Printf(_("Hide %s"), shortName);
+        strlcpy(originalCharStr, originalText.utf8_str(), sizeof(originalCharStr));
+        if (originalCharStr[0]) {
+            localizedText = CFStringCreateWithCString(NULL, originalCharStr, kCFStringEncodingUTF8);
+            if (localizedText) {
+                SetMenuItemTextWithCFString(BOINCMenu, itemIndex, localizedText);
+                CFRelease( localizedText );
+            }
+        }
+    }
+
+    originalText.Clear();
+    err = GetIndMenuItemWithCommandID(NULL, kHICommandHideOthers, 1, &BOINCMenu, &itemIndex);
+    if (!err) {
+        originalText = _("Hide Others");
+        strlcpy(originalCharStr, originalText.utf8_str(), sizeof(originalCharStr));
+        if (originalCharStr[0]) {
+            localizedText = CFStringCreateWithCString(NULL, originalCharStr, kCFStringEncodingUTF8);
+            if (localizedText) {
+                SetMenuItemTextWithCFString(BOINCMenu, itemIndex, localizedText);
+                CFRelease( localizedText );
+            }
+        }
+    }
+    
+    originalText.Clear();
+    err = GetIndMenuItemWithCommandID(NULL, kHICommandShowAll, 1, &BOINCMenu, &itemIndex);
+    if (!err) {
+        originalText = _("Show All");
+        strlcpy(originalCharStr, originalText.utf8_str(), sizeof(originalCharStr));
+        if (originalCharStr[0]) {
+            localizedText = CFStringCreateWithCString(NULL, originalCharStr, kCFStringEncodingUTF8);
+            if (localizedText) {
+                SetMenuItemTextWithCFString(BOINCMenu, itemIndex, localizedText);
+                CFRelease( localizedText );
+            }
+        }
+    }
+    
+    originalText.Clear();
+    err = GetIndMenuItemWithCommandID(NULL, kHICommandQuit, 1, &BOINCMenu, &itemIndex);
+    if (!err) {
+        originalText.Printf(_("Quit %s"), shortName);
+        strlcpy(originalCharStr, originalText.utf8_str(), sizeof(originalCharStr));
+        if (originalCharStr[0]) {
+            localizedText = CFStringCreateWithCString(NULL, originalCharStr, kCFStringEncodingUTF8);
+            if (localizedText) {
+                SetMenuItemTextWithCFString(BOINCMenu, itemIndex, localizedText);
+                CFRelease( localizedText );
+            }
+        }
+    }
+}
+
+
+#define MAX_DISPLAYS 32
+
+// Returns true if at least a 5 X 5 pixel area of the 
+// window's title bar is entirely on the displays
+// Note: Arguments are Quickdraw-style coordinates, 
+// but CGDisplayBounds() sets top left corner as (0, 0)
+Boolean IsWindowOnScreen(int iLeft, int iTop, int iWidth, int iHeight) {
+    CGDirectDisplayID displays[MAX_DISPLAYS];
+    CGDisplayCount numDisplays;
+    CGDisplayCount i;
+    CGRect displayRect, intersectedRect;
+    CGFloat mBarHeight = GetMBarHeight();
+
+    CGRect titleRect = CGRectMake(iLeft, iTop, iWidth, 22);
+    // Make sure at least a 5X5 piece of title bar is visible
+    titleRect = CGRectInset(titleRect, 5, 5);   
+
+    CGGetActiveDisplayList (MAX_DISPLAYS, displays, &numDisplays);
+ 
+    // The geometries of windows and display arangements are such
+    // that even if the title bar spans multiple windows, a 5X5
+    // section is on-screen only if at least one 5X5 section is
+    // entirely on one or more displays, so this test is sufficient.
+    for (i = 0; i < numDisplays; i++)
+    {
+        displayRect = CGDisplayBounds(displays[i]);
+        if (i == 0) {   // CGDisplayBounds returns main display first
+            displayRect.origin.y += mBarHeight;
+            displayRect.size.height -= mBarHeight;
+        }
+    
+        intersectedRect = CGRectIntersection(displayRect, titleRect);
+        if (! CGRectIsNull(intersectedRect)) {
+            return true;
+        }
+    }
+
+    return false;
+}
diff --git a/clientgui/mac/ProgThruProc.tiff b/clientgui/mac/ProgThruProc.tiff
new file mode 100644
index 0000000..e1ec44c
Binary files /dev/null and b/clientgui/mac/ProgThruProc.tiff differ
diff --git a/clientgui/mac/SecurityUtility.cpp b/clientgui/mac/SecurityUtility.cpp
new file mode 100644
index 0000000..c0c586a
--- /dev/null
+++ b/clientgui/mac/SecurityUtility.cpp
@@ -0,0 +1,53 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+//  SecurityUtility.cpp
+
+#include <sys/param.h>  // for MAXPATHLEN
+#include <unistd.h>     // for getwd, getlogin
+
+#include <Carbon/Carbon.h>
+
+#include "SetupSecurity.h"
+
+// Standalone utility to set up BOINC security owners, groups, permissions
+
+int main(int argc, char *argv[]) {
+    OSStatus            err;
+    char boincPath[MAXPATHLEN];
+    
+    err = CreateBOINCUsersAndGroups();
+    if (err != noErr)
+        return err;
+
+    err = AddAdminUserToGroups(getlogin());
+    if (err != noErr)
+        return err;
+    
+    boincPath[0] = 0;
+    getwd(boincPath);
+    //ShowSecurityError("Current Working Directory is %s", wd);
+
+    strlcat(boincPath, "/BOINCManager.app", sizeof(boincPath));
+    err = SetBOINCAppOwnersGroupsAndPermissions(boincPath);
+    if (err != noErr)
+        return err;
+
+    err = SetBOINCDataOwnersGroupsAndPermissions();
+    return err;
+}
+
diff --git a/clientgui/mac/SetVersion.cpp b/clientgui/mac/SetVersion.cpp
new file mode 100644
index 0000000..8a7cd39
--- /dev/null
+++ b/clientgui/mac/SetVersion.cpp
@@ -0,0 +1,325 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/*
+ *  SetVersion.c
+ *  boinc
+ *
+ *  Created by Charlie Fenton on 3/29/05.
+ *
+ */
+
+// Set STAND_ALONE TRUE if testing as a separate applicaiton
+#define STAND_ALONE 0
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "version.h"
+
+int IsFileCurrent(char* filePath);
+int FixInfoPlistFile(char* myPath);
+int FixInfoPlist_Strings(char* myPath, char* name);
+int MakeBOINCPackageInfoPlistFile(char* myPath, char* brand);
+int MakeMetaPackageInfoPlistFile(char* myPath, char* brand);
+
+int main(int argc, char** argv) {
+    int retval = 0, err;
+
+#if STAND_ALONE
+    char myPath[1024];
+    getcwd(myPath, sizeof(myPath));
+    printf("%s\n", myPath);       // For debugging
+    err = chdir("../");
+    getcwd(myPath, sizeof(myPath));
+    printf("%s\n", myPath);       // For debugging
+#endif
+
+    // BOINC Manager
+    err = FixInfoPlist_Strings("./English.lproj/InfoPlist.strings", "BOINC Manager");
+    if (err) retval = err;
+    err = FixInfoPlistFile("./Info.plist");
+    if (err) retval = err;
+    
+    // BOINC Installer
+    err = FixInfoPlist_Strings("./English.lproj/Installer-InfoPlist.strings", "BOINC Installer");
+    if (err) retval = err;
+    err = FixInfoPlistFile("./Installer-Info.plist");
+    if (err) retval = err;
+    
+    // BOINC PostInstall app
+    err = FixInfoPlist_Strings("./English.lproj/PostInstall-InfoPlist.strings", "Install BOINC");
+    if (err) retval = err;
+    err = FixInfoPlistFile("./PostInstall-Info.plist");
+    if (err) retval = err;
+    
+    // BOINC Screen Saver
+    err = FixInfoPlist_Strings("./English.lproj/ScreenSaver-InfoPlist.strings", "BOINC Screen Saver");
+    if (err) retval = err;
+    err = FixInfoPlistFile("./ScreenSaver-Info.plist");
+    if (err) retval = err;
+    
+    // BOINC Uninstaller
+    err = FixInfoPlist_Strings("./English.lproj/Uninstaller-InfoPlist.strings", "Uninstall BOINC");
+    if (err) retval = err;
+    err = FixInfoPlistFile("./Uninstaller-Info.plist");
+    if (err) retval = err;
+    
+    err = FixInfoPlistFile("./SystemMenu-Info.plist");
+    if (err) retval = err;
+
+    // WaitPermissions is not currently used
+    err = FixInfoPlistFile("./WaitPermissions-Info.plist");
+    if (err) retval = err;
+    
+    err = MakeBOINCPackageInfoPlistFile("./Pkg-Info.plist", "BOINC Manager");
+    if (err) retval = err;
+    
+    err = MakeMetaPackageInfoPlistFile("./Mpkg-Info.plist", "BOINC Manager");
+    return retval;
+}
+
+
+int IsFileCurrent(char* filePath) {
+    FILE *f;
+    char *c, buf[1024];
+    
+    f = fopen(filePath, "r");
+    if (f == 0)
+        return false;
+    for (;;) {
+        c = fgets(buf, sizeof(buf), f);
+        if (c == NULL)
+            break;   // EOF reached without finding correct version string
+        c = strstr(buf, BOINC_VERSION_STRING);
+        if (c) {
+            fclose(f);
+            return true;  // File contains current version string
+        }
+    }
+    fclose(f);
+    return false;  // File does not contain current version string
+}
+
+
+int FixInfoPlist_Strings(char* myPath, char* name) {
+    int retval = 0;
+    FILE *f;
+    
+    if (IsFileCurrent(myPath))
+        return 0;
+
+    f = fopen(myPath, "w");
+    if (f)
+    {
+        fprintf(f, "/* Localized versions of Info.plist keys */\n\n");
+        fprintf(f, "CFBundleName = \"%s\";\n", name);
+        fprintf(f, "CFBundleShortVersionString = \"%s version %s\";\n", name, BOINC_VERSION_STRING);
+        fprintf(f, "CFBundleGetInfoString = \"%s version %s, Copyright 2012 University of California.\";\n", name, BOINC_VERSION_STRING);
+        fflush(f);
+        retval = fclose(f);
+    }
+    else {
+        puts("Error updating version number in file InfoPlist.strings\n");
+        retval = -1;
+    }
+        
+    return retval;
+}
+
+
+int FixInfoPlistFile(char* myPath) {
+    int retval = 0;
+    FILE *fin = NULL, *fout = NULL;
+    char *c, a, buf[1024];
+    
+    if (IsFileCurrent(myPath))
+        return 0;
+
+    rename(myPath, "./temp");
+//    sprintf(buf, "mv -f %s temp", myPath);
+//    retval = system(buf);
+
+    fin = fopen("temp", "r");
+    if (fin == NULL)
+        goto bail;
+
+    fout = fopen(myPath, "w");
+    if (fout == NULL) {
+        goto bail;
+    }
+
+    // Copy everything up to version number
+    for (;;) {
+        c = fgets(buf, sizeof(buf), fin);
+        if (c == NULL)
+            goto bail;   // EOF
+        c = strstr(buf, "CFBundleVersion</key>");
+        if (c)
+            break;  // Found "CFBundleVersion</key>"
+        fputs(buf, fout);
+    }
+        
+    c = strstr(buf, "<string>");
+    if (c == NULL) {
+        fputs(buf, fout);
+        c = fgets(buf, sizeof(buf), fin);
+        if (c == NULL)
+            goto bail;   // EOF
+        c = strstr(buf, "<string>");
+        if (c == NULL)
+            goto bail;   // "CFBundleVersion</key>" not followed by "<string>"
+    }
+    
+    a = *(c+8);
+    *(c+8) = '\0';                      // Put terminator after "<string>"
+    fputs(buf, fout);                   // Copy up to end of "<string>"
+    fputs(BOINC_VERSION_STRING, fout);  // Write the current version number
+    *(c+8) = a;                         // Undo terminator we inserted
+    c = strstr(buf, "</string>");       // Skip over old version number in input
+    fputs(c, fout);                     // Copy rest of input line
+
+    // Copy rest of file
+    for (;;) {
+        c = fgets(buf, sizeof(buf), fin);
+        if (c == NULL)
+            break;   // EOF
+        fputs(buf, fout);
+    }
+
+    fclose(fin);
+    fflush(fout);
+    fclose(fout);
+    
+    unlink("temp");
+    
+    return retval;
+
+bail:
+    if (fin)
+        fclose(fin);
+    if (fout)
+        fclose(fout);
+
+    rename("./temp", myPath);
+//    sprintf(buf, "mv -f temp %s", myPath);
+//    retval = system(buf);
+    
+    printf("Error updating version number in file %s\n", myPath);
+    return -1;
+}
+
+
+int MakeBOINCPackageInfoPlistFile(char* myPath, char* brand) {
+    int retval = 0;
+    FILE *f;
+    
+    if (IsFileCurrent(myPath))
+        return 0;
+
+    f = fopen(myPath, "w");
+    if (f)
+    {
+        fprintf(f, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+        fprintf(f, "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n");
+        fprintf(f, "<plist version=\"1.0\">\n<dict>\n");
+        fprintf(f, "\t<key>CFBundleGetInfoString</key>\n");
+        fprintf(f, "\t<string>%s %s</string>\n", brand, BOINC_VERSION_STRING);
+        fprintf(f, "\t<key>CFBundleIdentifier</key>\n\t<string>edu.berkeley.boinc</string>\n");
+        fprintf(f, "\t<key>CFBundleShortVersionString</key>\n");
+        fprintf(f, "\t<string>%s</string>\n", BOINC_VERSION_STRING);
+        fprintf(f, "\t<key>IFPkgFlagAllowBackRev</key>\n\t<integer>1</integer>\n");
+        fprintf(f, "\t<key>IFPkgFlagAuthorizationAction</key>\n\t<string>AdminAuthorization</string>\n");
+        fprintf(f, "\t<key>IFPkgFlagDefaultLocation</key>\n\t<string>/</string>\n");
+        fprintf(f, "\t<key>IFPkgFlagFollowLinks</key>\n\t<integer>0</integer>\n");
+        fprintf(f, "\t<key>IFPkgFlagInstallFat</key>\n\t<integer>0</integer>\n");
+        fprintf(f, "\t<key>IFPkgFlagInstalledSize</key>\n\t<integer>6680</integer>\n");
+        fprintf(f, "\t<key>IFPkgFlagIsRequired</key>\n\t<integer>0</integer>\n");
+        fprintf(f, "\t<key>IFPkgFlagOverwritePermissions</key>\n\t<integer>0</integer>\n");
+        fprintf(f, "\t<key>IFPkgFlagRelocatable</key>\n\t<integer>0</integer>\n");
+        fprintf(f, "\t<key>IFPkgFlagRestartAction</key>\n\t<string>NoRestart</string>\n");
+        fprintf(f, "\t<key>IFPkgFlagRootVolumeOnly</key>\n\t<integer>1</integer>\n");
+        fprintf(f, "\t<key>IFPkgFlagUpdateInstalledLanguages</key>\n\t<integer>0</integer>\n");
+        fprintf(f, "\t<key>IFPkgFormatVersion</key>\n\t<real>0.10000000149011612</real>\n");
+        fprintf(f, "</dict>\n</plist>\n");
+
+        fflush(f);
+        retval = fclose(f);
+    }
+    else {
+        puts("Error creating file Pkg-Info.plist\n");
+        retval = -1;
+    }
+        
+    return retval;
+}
+
+
+int MakeMetaPackageInfoPlistFile(char* myPath, char* brand) {
+    int retval = 0;
+    FILE *f;
+    
+    if (IsFileCurrent(myPath))
+        return 0;
+
+    f = fopen(myPath, "w");
+    if (f)
+    {
+        fprintf(f, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+        fprintf(f, "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n");
+        fprintf(f, "<plist version=\"1.0\">\n<dict>\n");
+        fprintf(f, "\t<key>CFBundleGetInfoString</key>\n");
+        fprintf(f, "\t<string>%s %s + VirtualBox</string>\n", brand, BOINC_VERSION_STRING);
+        fprintf(f, "\t<key>CFBundleIdentifier</key>\n\t<string>edu.berkeley.boinc+vbox</string>\n");
+        fprintf(f, "\t<key>CFBundleShortVersionString</key>\n");
+        fprintf(f, "\t<string>%s</string>\n", BOINC_VERSION_STRING);
+        fprintf(f, "\t<key>IFMajorVersion</key>\n\t<integer>%d</integer>\n", BOINC_MAJOR_VERSION);
+        fprintf(f, "\t<key>IFMinorVersion</key>\n\t<integer>%d</integer>\n", BOINC_MINOR_VERSION);
+        fprintf(f, "\t<key>IFPkgFlagAllowBackRev</key>\n\t<integer>1</integer>\n");
+        fprintf(f, "\t<key>IFPkgFlagAuthorizationAction</key>\n\t<string>RootAuthorization</string>\n");
+        fprintf(f, "\t<key>IFPkgFlagComponentDirectory</key>\n\t<string>../</string>\n");
+
+        fprintf(f, "\t<key>IFPkgFlagPackageList</key>\n");
+        
+        fprintf(f, "\t<array>\n");
+        fprintf(f, "\t\t<dict>\n");
+        fprintf(f, "\t\t\t<key>IFPkgFlagPackageLocation</key>\n\t\t\t<string>BOINC.pkg</string>\n");
+        fprintf(f, "\t\t\t<key>IFPkgFlagPackageSelection</key>\n\t\t\t<string>required</string>\n");
+        fprintf(f, "\t\t</dict>\n");
+
+        fprintf(f, "\t\t<dict>\n");
+        fprintf(f, "\t\t\t<key>IFPkgFlagPackageLocation</key>\n\t\t\t<string>VirtualBox.pkg</string>\n");
+        fprintf(f, "\t\t\t<key>IFPkgFlagPackageSelection</key>\n\t\t\t<string>selected</string>\n");
+        fprintf(f, "\t\t</dict>\n");
+        fprintf(f, "\t</array>\n");
+
+        fprintf(f, "\t<key>IFPkgFormatVersion</key>\n\t<real>0.10000000149011612</real>\n");
+        fprintf(f, "</dict>\n</plist>\n");
+
+        fflush(f);
+        retval = fclose(f);
+    }
+    else {
+        puts("Error creating file Mpkg-Info.plist\n");
+        retval = -1;
+    }
+        
+    return retval;
+}
+
+
diff --git a/clientgui/mac/SetupSecurity.cpp b/clientgui/mac/SetupSecurity.cpp
new file mode 100644
index 0000000..0ce4b72
--- /dev/null
+++ b/clientgui/mac/SetupSecurity.cpp
@@ -0,0 +1,1163 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+// SetupSecurity.cpp
+
+#include <Security/Authorization.h>
+#include <Security/AuthorizationTags.h>
+
+#include <grp.h>	// getgrname, getgrgid
+#include <pwd.h>	// getpwnam, getpwuid, getuid
+#include <unistd.h>     // usleep
+#include <sys/param.h>  // for MAXPATHLEN
+#include <sys/stat.h>
+#include <dirent.h>
+
+#include <Carbon/Carbon.h>
+
+#include "file_names.h"
+#include "SetupSecurity.h"
+
+static OSStatus UpdateNestedDirectories(char * basepath);
+static OSStatus MakeXMLFilesPrivate(char * basepath);
+static OSStatus GetAuthorization(void);
+OSStatus DoPrivilegedExec(const char *pathToTool, char *arg1, char *arg2, char *arg3, char *arg4, char *arg5, char *arg6);
+#ifndef __x86_64__
+static pascal Boolean ErrorDlgFilterProc(DialogPtr theDialog, EventRecord *theEvent, short *theItemHit);
+#endif
+static void SleepTicks(UInt32 ticksToSleep);
+#ifdef _DEBUG
+static OSStatus SetFakeMasterNames(void);
+#endif
+static OSStatus CreateUserAndGroup(char * user_name, char * group_name);
+static OSStatus ResynchSystem(void);
+
+static AuthorizationRef        gOurAuthRef = NULL;
+
+#define DELAY_TICKS 3
+#define DELAY_TICKS_R 10
+
+#define REAL_BOINC_MASTER_NAME "boinc_master"
+#define REAL_BOINC_PROJECT_NAME "boinc_project"
+
+#ifdef _DEBUG
+// GDB can't attach to applications which are running as a diferent user or group so 
+//  it ignores the S_ISUID and S_ISGID permisison bits when launching an application.
+// To work around this, the _DEBUG version uses the current user and group.
+//
+// NOTE: The Manager and Client call these routines only "#ifdef _DEBUG" (i.e., 
+// only from the DEVELOPMENT BUILD), never from the Deployment build.
+//
+static char boinc_master_user_name[64];
+static char boinc_master_group_name[64];
+static char boinc_project_user_name[64];
+static char boinc_project_group_name[64];
+#else
+#define boinc_master_user_name REAL_BOINC_MASTER_NAME
+#define boinc_master_group_name REAL_BOINC_MASTER_NAME
+#define boinc_project_user_name REAL_BOINC_PROJECT_NAME
+#define boinc_project_group_name REAL_BOINC_PROJECT_NAME
+#endif
+
+#define MIN_ID 501   /* Minimum user ID / Group ID to create */
+
+static char                    dsclPath[] = "/usr/bin/dscl";
+static char                    chmodPath[] = "/bin/chmod";
+static char                    chownPath[] = "/usr/sbin/chown";
+#define RIGHTS_COUNT 3          /* Count of the 3 above items */
+
+int CreateBOINCUsersAndGroups() {
+    OSStatus        err = noErr;
+
+    err = CreateUserAndGroup(REAL_BOINC_MASTER_NAME, REAL_BOINC_MASTER_NAME);
+    if (err != noErr)
+        return err;
+
+    err = CreateUserAndGroup(REAL_BOINC_PROJECT_NAME, REAL_BOINC_PROJECT_NAME);
+    if (err != noErr)
+        return err;
+        
+    err = ResynchSystem();
+    if (err != noErr)
+        return err;
+    
+    return noErr;
+}
+
+
+// Pass NULL for path when calling this routine from within BOINC Manager
+int SetBOINCAppOwnersGroupsAndPermissions(char *path) {
+    char                    fullpath[MAXPATHLEN];
+    char                    dir_path[MAXPATHLEN];
+    char                    buf1[80];
+    ProcessSerialNumber     ourPSN;
+    FSRef                   ourFSRef, ref;
+    char                    *p;
+    Boolean                 isDirectory;
+    OSStatus                err = noErr;
+    
+#define NUMBRANDS 3
+
+char *saverName[NUMBRANDS];
+
+saverName[0] = "BOINCSaver";
+saverName[1] = "GridRepublic";
+saverName[2] = "Progress Thru Processors";
+
+#ifdef _DEBUG
+    err = SetFakeMasterNames();
+    if (err)
+        return err;
+#endif
+
+    if (path == NULL) {        // NULL means we were called from within BOINC Manager
+        // Get the full path to this application's bundle (BOINC Manager's bundle)
+        err = GetCurrentProcess (&ourPSN);
+        if (err)
+            return err;          // Should never happen
+
+        err = GetProcessBundleLocation(&ourPSN, &ourFSRef);
+        if (err)
+            return err;          // Should never happen
+        
+        err = FSRefMakePath (&ourFSRef, (UInt8*)dir_path, sizeof(dir_path));
+        if (err)
+            return err;          // Should never happen
+    } else
+        strlcpy(dir_path, path, MAXPATHLEN);    // Path to BOINC Manager's bundle was passed as argument
+        
+    if (strlen(fullpath) >= (MAXPATHLEN-1)) {
+        ShowSecurityError("SetBOINCAppOwnersGroupsAndPermissions: path to Manager is too long");
+        return -1;
+    }
+
+    strlcpy(fullpath, dir_path, sizeof(fullpath));
+
+#ifdef _DEBUG
+    // chmod -R u=rwx,g=rwx,o=rx path/BOINCManager.app
+    // 0775 = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
+    // Set read, write permission for user;  read and execute permission for group and others
+    err = DoPrivilegedExec(chmodPath, "-R", "u=rwx,g=rwx,o=rx", fullpath, NULL, NULL, NULL);
+#else
+    // chmod -R u=rx,g=rx,o=rx path/BOINCManager.app
+    // 0555 = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
+    // Set read, write permission for user;  read and execute permission for group and others
+    err = DoPrivilegedExec(chmodPath, "-R", "u=rx,g=rx,o=rx", fullpath, NULL, NULL, NULL);
+#endif
+    if (err)
+        return err;
+
+    // Get the full path to BOINC Manager executable inside this application's bundle
+    strlcat(fullpath, "/Contents/MacOS/", sizeof(fullpath));
+    // To allow for branding, assume name of executable inside bundle is same as name of bundle
+    p = strrchr(dir_path, '/');         // Assume name of executable inside bundle is same as name of bundle
+    if (p == NULL)
+        p = dir_path - 1;
+    strlcat(fullpath, p+1, sizeof(fullpath));
+    p = strrchr(fullpath, '.');         // Strip off  bundle extension (".app")
+    if (p)
+        *p = '\0'; 
+
+    sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
+    // chown boinc_master:boinc_master path/BOINCManager.app/Contents/MacOS/BOINCManager
+    err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+    if (err)
+        return err;
+
+#ifdef _DEBUG
+        // chmod u=rwx,g=rwx,o=rx path/BOINCManager.app/Contents/MacOS/BOINCManager
+        // 0775 = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH
+        // Set read, write and execute permission for user & group, read & execute for others
+        err = DoPrivilegedExec(chmodPath, "u=rwx,g=rwx,o=rx", fullpath, NULL, NULL, NULL, NULL);
+#else
+        // chmod u=rx,g=rx,o=rx path/BOINCManager.app/Contents/MacOS/BOINCManager
+        // 0555 = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
+        // Set read and execute permission for user, group & others
+        err = DoPrivilegedExec(chmodPath, "u=rx,g=rx,o=rx", fullpath, NULL, NULL, NULL, NULL);
+#endif
+    if (err)
+        return err;
+
+    // Get the full path to BOINC Clients inside this application's bundle
+    strlcpy(fullpath, dir_path, sizeof(fullpath));
+    strlcat(fullpath, "/Contents/Resources/boinc", sizeof(fullpath));
+    if (strlen(fullpath) >= (MAXPATHLEN-1)) {
+        ShowSecurityError("SetBOINCAppOwnersGroupsAndPermissions: path to client is too long");
+        return -1;
+    }
+    
+    sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
+    // chown boinc_master:boinc_master path/BOINCManager.app/Contents/Resources/boinc
+    err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+    if (err)
+        return err;
+
+#ifdef _DEBUG
+        // chmod u=rwsx,g=rwsx,o=rx path/BOINCManager.app/Contents/Resources/boinc
+        // 06775 = S_ISUID | S_ISGID | S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH
+        // Set setuid-on-execution, setgid-on-execution plus read, write and execute permission for user & group, read & execute for others
+        err = DoPrivilegedExec(chmodPath, "u=rwsx,g=rwsx,o=rx", fullpath, NULL, NULL, NULL, NULL);
+#else
+        // chmod u=rsx,g=rsx,o=rx path/BOINCManager.app/Contents/Resources/boinc
+        // 06555 = S_ISUID | S_ISGID | S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
+        // Set setuid-on-execution, setgid-on-execution plus read and execute permission for user, group & others
+        err = DoPrivilegedExec(chmodPath, "u=rsx,g=rsx,o=rx", fullpath, NULL, NULL, NULL, NULL);
+#endif
+    if (err)
+        return err;
+
+    for (int i=0; i<NUMBRANDS; i++) {
+        // Version 6 screensaver has its own embedded switcher application, but older versions don't.
+        // We don't allow unauthorized users to run the switcher application in the BOINC Data directory 
+        // because they could use it to run as user & group boinc_project and damage project files.
+        // The screensaver's switcher application runs as user and group "nobody" to avoid this risk.
+
+        // Does switcher exist in screensaver bundle?
+        sprintf(fullpath, "/Library/Screen Savers/%s.saver/Contents/Resources/gfx_switcher", saverName[i]);
+        err = FSPathMakeRef((StringPtr)fullpath, &ref, &isDirectory);   // Does it exist?
+        if ((err == noErr) && (! isDirectory)) {
+#ifdef _DEBUG
+            sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
+            // chown boinc_master:boinc_master "/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_switcher"
+            err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+            if (err)
+                return err;
+
+            // chmod u=rwx,g=rwx,o=rx "/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_switcher"
+            // 0775 = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH
+            // Set read, write and execute permission for user & group;  read and execute permission for others
+            err = DoPrivilegedExec(chmodPath, "u=rwx,g=rwx,o=rx", fullpath, NULL, NULL, NULL, NULL);
+            if (err)
+                return err;
+#else
+            sprintf(buf1, "root:%s", boinc_master_group_name);
+            // chown root:boinc_master "/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_switcher"
+            err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+            if (err)
+                return err;
+
+            // chmod u=rsx,g=rx,o=rx "/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_switcher"
+            // 04555 = S_ISUID | S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
+            // Set setuid-on-execution plus read and execute permission for user, group & others
+            err = DoPrivilegedExec(chmodPath, "u=rsx,g=rx,o=rx", fullpath, NULL, NULL, NULL, NULL);
+            if (err)
+                return err;
+#endif
+        }
+    }
+    
+    return noErr;
+}
+
+
+int SetBOINCDataOwnersGroupsAndPermissions() {
+    FSRef           ref;
+    Boolean         isDirectory;
+    char            fullpath[MAXPATHLEN];
+    char            buf1[80];
+    OSStatus        err = noErr;
+    OSStatus        result;
+    char            *BOINCDataDirPath = "/Library/Application Support/BOINC Data";
+
+#ifdef _DEBUG
+    err = SetFakeMasterNames();
+    if (err)
+        return err;
+#endif
+    
+    strlcpy(fullpath, BOINCDataDirPath, MAXPATHLEN);
+
+    // Does BOINC Data directory exist?
+    result = FSPathMakeRef((StringPtr)BOINCDataDirPath, &ref, &isDirectory);
+    if ((result != noErr) || (! isDirectory))
+        return dirNFErr;                    // BOINC Data Directory does not exist
+
+    // Set owner and group of BOINC Data directory's contents
+    sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
+    // chown -R boinc_master:boinc_master "/Library/Application Support/BOINC Data"
+    err = DoPrivilegedExec(chownPath, "-R", buf1, BOINCDataDirPath, NULL, NULL, NULL);
+    if (err)
+        return err;
+
+#if 0   // Redundant if we already set BOINC Data directory to boinc_master:boinc_master
+    // Set owner and group of BOINC Data directory itself
+    sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
+    // chown boinc_master:boinc_master "/Library/Application Support/BOINC Data"
+    err = DoPrivilegedExec(chownPath, buf1, BOINCDataDirPath, NULL, NULL, NULL, NULL);
+    if (err)
+        return err;
+#endif
+
+    // Set permissions of BOINC Data directory's contents:
+    //   ss_config.xml is world-readable so screensaver coordinator can read it
+    //   all other *.xml are not world-readable to keep authenticators private
+    //   gui_rpc_auth.cfg is not world-readable to keep RPC password private
+    //   all other files are world-readable so default screensaver can read them
+    
+    // First make all files world-readable (temporarily)
+    // chmod -R u+rw,g+rw,o+r-w "/Library/Application Support/BOINC Data"
+    // 0661 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
+    // Set read and write permission for user and group, read-only for others (leaves execute bits unchanged)
+    err = DoPrivilegedExec(chmodPath, "-R", "u+rw,g+rw,o+r-w", BOINCDataDirPath, NULL, NULL, NULL);
+    if (err)
+        return err;
+    
+    // Next make gui_rpc_auth.cfg not world-readable to keep RPC password private
+    // Does gui_rpc_auth.cfg file exist?
+    strlcpy(fullpath, BOINCDataDirPath, MAXPATHLEN);
+    strlcat(fullpath, "/", MAXPATHLEN);
+    strlcat(fullpath, GUI_RPC_PASSWD_FILE, MAXPATHLEN);
+
+    result = FSPathMakeRef((StringPtr)fullpath, &ref, &isDirectory);
+    if ((result == noErr) && (! isDirectory)) {
+        // Make gui_rpc_auth.cfg file readable and writable only by user boinc_master and group boinc_master
+
+        // Set owner and group of gui_rpc_auth.cfg file
+        sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
+        // chown boinc_master:boinc_master "/Library/Application Support/BOINC Data/gui_rpc_auth.cfg"
+        err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+        // chmod u=rw,g=rw,o= "/Library/Application Support/BOINC Data/gui_rpc_auth.cfg"
+        // 0660 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
+        // Set read and write permission for user and group, no access for others
+        err = DoPrivilegedExec(chmodPath, "u=rw,g=rw,o=", fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+    }           // gui_rpc_auth.cfg
+
+    // Next make all *.xml files not world-readable to keep authenticators private
+    err = MakeXMLFilesPrivate(BOINCDataDirPath);
+    if (err)
+        return err;
+
+    // Next make ss_config.xml world-readable so screensaver coordinator can read it
+    // Does screensaver config file ss_config.xml exist?
+    strlcpy(fullpath, BOINCDataDirPath, MAXPATHLEN);
+    strlcat(fullpath, "/", MAXPATHLEN);
+    strlcat(fullpath, SS_CONFIG_FILE, MAXPATHLEN);
+
+    result = FSPathMakeRef((StringPtr)fullpath, &ref, &isDirectory);
+    if ((result == noErr) && (! isDirectory)) {
+        // Make ss_config.xml file world readable but writable only by user boinc_master and group boinc_master
+
+        // Set owner and group of ss_config.xml file
+        sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
+        // chown boinc_master:boinc_master "/Library/Application Support/BOINC Data/ss_config.xml"
+        err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+        // chmod u=rw,g=rw,o=r "/Library/Application Support/BOINC Data/ss_config.xml"
+        // 0664 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
+        // Set read and write permission for user and group, read-only for others
+        err = DoPrivilegedExec(chmodPath, "u=rw,g=rw,o=r", fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+    }           // ss_config.xml
+
+
+    // Set permissions of BOINC Data directory itself
+    // chmod u=rwx,g=rwx,o=x "/Library/Application Support/BOINC Data"
+    // 0771 = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IXOTH
+    // Set read, write and execute permission for user & group; execute-only permission for others
+    err = DoPrivilegedExec(chmodPath, "u=rwx,g=rwx,o=x", BOINCDataDirPath, NULL, NULL, NULL, NULL);
+    if (err)
+        return err;
+
+
+    // Does projects directory exist?
+    strlcpy(fullpath, BOINCDataDirPath, MAXPATHLEN);
+    strlcat(fullpath, "/", MAXPATHLEN);
+    strlcat(fullpath, PROJECTS_DIR, MAXPATHLEN);
+
+    result = FSPathMakeRef((StringPtr)fullpath, &ref, &isDirectory);
+    if ((result == noErr) && (isDirectory)) {
+        // Set owner and group of projects directory and it's contents
+        sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_project_group_name);
+        // chown -R boinc_master:boinc_project "/Library/Application Support/BOINC Data/projects"
+        err = DoPrivilegedExec(chownPath, "-Rh", buf1, fullpath, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+#if 0       // Redundant if the same as projects directory's contents
+        // Set owner and group of projects directory itself
+        sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_project_group_name);
+        // chown -R boinc_master:boinc_project "/Library/Application Support/BOINC Data/projects"
+        err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+#endif
+
+        // Set permissions of project directories' contents
+        // Contents of project directories must be world-readable so BOINC Client can read 
+        // files written by projects which have user boinc_project and group boinc_project
+        // chmod -R u+rw,g+rw,o+r-w "/Library/Application Support/BOINC Data/projects"
+        // 0664 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
+        // set read and write permission for user and group, no access for others (leaves execute bits unchanged)
+        err = DoPrivilegedExec(chmodPath, "-R", "u+rw,g+rw,o+r-w", fullpath, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+        // Set permissions for projects directory itself (not its contents)
+        // chmod u=rwx,g=rwx,o= "/Library/Application Support/BOINC Data/projects"
+        // 0770 = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP
+        // Set read, write and execute permission for user & group, no access for others
+        err = DoPrivilegedExec(chmodPath, "u=rwx,g=rwx,o=", fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+        // Set execute permissions for project subdirectories
+        err = UpdateNestedDirectories(fullpath);    // Sets execute for user, group and others
+        if (err)
+            return err;
+    }       // projects directory
+    
+    // Does slots directory exist?
+    strlcpy(fullpath, BOINCDataDirPath, MAXPATHLEN);
+    strlcat(fullpath, "/", MAXPATHLEN);
+    strlcat(fullpath, SLOTS_DIR, MAXPATHLEN);
+
+    result = FSPathMakeRef((StringPtr)fullpath, &ref, &isDirectory);
+    if ((result == noErr) && (isDirectory)) {
+        // Set owner and group of slots directory and it's contents
+        sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_project_group_name);
+        // chown -R boinc_master:boinc_project "/Library/Application Support/BOINC Data/slots"
+        err = DoPrivilegedExec(chownPath, "-Rh", buf1, fullpath, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+#if 0       // Redundant if the same as slots directory's contents
+        // Set owner and group of slots directory itself
+        sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_project_group_name);
+        // chown boinc_master:boinc_project "/Library/Application Support/BOINC Data/slots"
+        err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+#endif
+
+        // Set permissions of slot directories' contents
+        // Contents of slot directories must be world-readable so BOINC Client can read 
+        // files written by projects which have user boinc_project and group boinc_project
+        // chmod -R u+rw,g+rw,o+r-w "/Library/Application Support/BOINC Data/slots"
+        // 0664 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
+        // set read and write permission for user and group, no access for others (leaves execute bits unchanged)
+        err = DoPrivilegedExec(chmodPath, "-R", "u+rw,g+rw,o+r-w", fullpath, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+        // Set permissions for slots directory itself (not its contents)
+        // chmod u=rwx,g=rwx,o= "/Library/Application Support/BOINC Data/slots"
+        // 0770 = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP
+        // Set read, write and execute permission for user & group, no access for others
+        err = DoPrivilegedExec(chmodPath, "u=rwx,g=rwx,o=", fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+        // Set execute permissions for slot subdirectories
+        err = UpdateNestedDirectories(fullpath);    // Sets execute for user, group and others
+        if (err)
+            return err;
+    }       // slots directory
+
+    // Does locale directory exist?
+    strlcpy(fullpath, BOINCDataDirPath, MAXPATHLEN);
+    strlcat(fullpath, "/locale", MAXPATHLEN);
+
+    result = FSPathMakeRef((StringPtr)fullpath, &ref, &isDirectory);
+    if ((result == noErr) && (isDirectory)) {
+#if 0   // Redundant if we already set contents of BOINC Data directory to boinc_master:boinc_master
+        // Set owner and group of locale directory and all its contents
+        sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
+        // chown -R boinc_master:boinc_master "/Library/Application Support/BOINC Data/locale"
+        err = DoPrivilegedExec(chownPath, "-R", buf1, fullpath, NULL, NULL, NULL);
+        if (err)
+            return err;
+#endif
+
+        // chmod -R u+r-w,g+r-w,o+r-w "/Library/Application Support/BOINC Data/locale"
+        // 0550 = S_IRUSR | S_IXUSR | S_IRGRP | S_IXUSR | S_IROTH | S_IXOTH 
+        // Set execute permission for user, group, and others if it was set for any
+        err = DoPrivilegedExec(chmodPath, "-R", "+X", fullpath, NULL, NULL, NULL);
+        // Set read-only permission for user, group, and others (leaves execute bits unchanged)
+        err = DoPrivilegedExec(chmodPath, "-R", "u+r-w,g+r-w,o+r-w", fullpath, NULL, NULL, NULL);
+        if (err)
+            return err;
+    }       // locale directory
+    
+    // Does switcher directory exist?
+    strlcpy(fullpath, BOINCDataDirPath, MAXPATHLEN);
+    strlcat(fullpath, "/", MAXPATHLEN);
+    strlcat(fullpath, SWITCHER_DIR, MAXPATHLEN);
+
+    result = FSPathMakeRef((StringPtr)fullpath, &ref, &isDirectory);
+    if ((result == noErr) && (isDirectory)) {
+#if 0   // Redundant if we already set contents of BOINC Data directory to boinc_master:boinc_master
+        // Set owner and group of switcher directory
+        sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
+        // chown boinc_master:boinc_master "/Library/Application Support/BOINC Data/switcher"
+        err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+#endif
+
+        // chmod u=rx,g=rx,o= "/Library/Application Support/BOINC Data/switcher"
+        // 0550 = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP
+        // Set read and execute permission for user and group, no access for others
+        err = DoPrivilegedExec(chmodPath, "u=rx,g=rx,o=", fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+    }       // switcher directory
+
+    strlcat(fullpath, "/", MAXPATHLEN);
+    strlcat(fullpath, SWITCHER_FILE_NAME, MAXPATHLEN);
+        result = FSPathMakeRef((StringPtr)fullpath, &ref, &isDirectory);
+    if ((result == noErr) && (! isDirectory)) {
+        // Set owner and group of switcher application
+        sprintf(buf1, "root:%s", boinc_master_group_name);
+        // chown root:boinc_master "/Library/Application Support/BOINC Data/switcher/switcher"
+        err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+        // Set permissions of switcher application
+        // chmod u=s,g=rx,o= "/Library/Application Support/BOINC Data/switcher/switcher"
+        // 04050 = S_ISUID | S_IRGRP | S_IXGRP
+        // Set setuid-on-execution plus read and execute permission for group boinc_master only
+        err = DoPrivilegedExec(chmodPath, "u=s,g=rx,o=", fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+    }       // switcher application
+    
+    strlcpy(fullpath, BOINCDataDirPath, MAXPATHLEN);
+    strlcat(fullpath, "/", MAXPATHLEN);
+    strlcat(fullpath, SWITCHER_DIR, MAXPATHLEN);
+    strlcat(fullpath, "/", MAXPATHLEN);
+    strlcat(fullpath, SETPROJECTGRP_FILE_NAME, MAXPATHLEN);
+        result = FSPathMakeRef((StringPtr)fullpath, &ref, &isDirectory);
+    if ((result == noErr) && (! isDirectory)) {
+        // Set owner and group of setprojectgrp application
+        sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_project_group_name);
+        // chown boinc_master:boinc_project "/Library/Application Support/BOINC Data/switcher/setprojectgrp"
+        err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+        // Set permissions of setprojectgrp application
+        // chmod u=rx,g=s,o= "/Library/Application Support/BOINC Data/switcher/setprojectgrp"
+        // 02500 = S_ISGID | S_IRUSR | S_IXUSR
+        // Set setgid-on-execution plus read and execute permission for user only
+        err = DoPrivilegedExec(chmodPath, "u=rx,g=s,o=", fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+    }       // setprojectgrp application
+
+#ifdef __APPLE__
+#if 0       // AppStats is deprecated as of version 5.8.15
+    strlcpy(fullpath, BOINCDataDirPath, MAXPATHLEN);
+    strlcat(fullpath, "/", MAXPATHLEN);
+    strlcat(fullpath, SWITCHER_DIR, MAXPATHLEN);
+    strlcat(fullpath, "/", MAXPATHLEN);
+    strlcat(fullpath, APP_STATS_FILE_NAME, MAXPATHLEN);
+        result = FSPathMakeRef((StringPtr)fullpath, &ref, &isDirectory);
+    if ((result == noErr) && (! isDirectory)) {
+        // Set owner and group of AppStats application (must be setuid root)
+        sprintf(buf1, "root:%s", boinc_master_group_name);
+        // chown root:boinc_project "/Library/Application Support/BOINC Data/switcher/AppStats"
+        err = DoPrivilegedExec(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+        // Set permissions of AppStats application
+        // chmod u=rsx,g=rx,o= "/Library/Application Support/BOINC Data/switcher/AppStats"
+        // 04550 = S_ISUID | S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP
+        // Set setuid-on-execution plus read and execute permission for user and group
+        err = DoPrivilegedExec(chmodPath, "u=rsx,g=rx,o=", fullpath, NULL, NULL, NULL, NULL);
+        if (err)
+            return err;
+    }       // setprojectgrp application
+#endif
+#endif  // __APPLE__
+
+    return noErr;
+}
+
+
+// make all *.xml files not world-readable to keep authenticators private
+static OSStatus MakeXMLFilesPrivate(char * basepath) {
+    char            fullpath[MAXPATHLEN];
+    OSStatus        retval = 0;
+    DIR             *dirp;
+    int             len;
+    dirent          *dp;
+
+    dirp = opendir(basepath);
+    if (dirp == NULL)           // Should never happen
+        return -1;
+        
+    while (true) {
+        dp = readdir(dirp);
+        if (dp == NULL)
+            break;                  // End of list
+        
+        if (dp->d_name[0] == '.')
+            continue;               // Ignore names beginning with '.'
+        
+        len = strlen(dp->d_name);
+        if (len < 5)
+            continue;
+        
+        if (strcmp(dp->d_name+len-4, ".xml"))
+            continue;
+
+        strlcpy(fullpath, basepath, sizeof(fullpath));
+        strlcat(fullpath, "/", sizeof(fullpath));
+        strlcat(fullpath, dp->d_name, sizeof(fullpath));
+
+        // chmod u+rw,g+rw,o= "/Library/Application Support/BOINC Data/????.xml"
+        // 0660 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP0
+        // Set read and write permission for user and group, no access for others
+        retval = DoPrivilegedExec(chmodPath, "u+rw,g+rw,o=", fullpath, NULL, NULL, NULL, NULL);
+        if (retval)
+            break;
+    }       // End while (true)
+    
+    closedir(dirp);
+
+    return retval;
+}
+
+
+static OSStatus UpdateNestedDirectories(char * basepath) {
+    Boolean         isDirectory;
+    char            fullpath[MAXPATHLEN];
+    struct stat     sbuf;
+    OSStatus        retval = 0;
+    DIR             *dirp;
+    dirent          *dp;
+
+    dirp = opendir(basepath);
+    if (dirp == NULL)           // Should never happen
+        return -1;
+        
+    while (true) {
+        dp = readdir(dirp);
+        if (dp == NULL)
+            break;                  // End of list
+            
+        if (dp->d_name[0] == '.')
+            continue;               // Ignore names beginning with '.'
+
+        strlcpy(fullpath, basepath, sizeof(fullpath));
+        strlcat(fullpath, "/", sizeof(fullpath));
+        strlcat(fullpath, dp->d_name, sizeof(fullpath));
+
+        retval = stat(fullpath, &sbuf);
+        if (retval) {
+            if (lstat(fullpath, &sbuf) == 0) {
+                // A broken symlink in a slot directory may be OK if slot is no longer in use
+                if (S_ISLNK(sbuf.st_mode)) {
+                    retval = 0;
+                    continue;
+                }
+            }
+            break;              // Should never happen
+        }
+        isDirectory = S_ISDIR(sbuf.st_mode);
+
+        if (isDirectory) {
+            // chmod u=rwx,g=rwx,o=rx fullpath
+            // 0775 = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH
+            // Set read, write and execute permission for user & group;  read and execute permission for others
+            retval = DoPrivilegedExec(chmodPath, "u=rwx,g=rwx,o=rx", fullpath, NULL, NULL, NULL, NULL);
+            if (retval)
+                break;
+
+            retval = UpdateNestedDirectories(fullpath);
+            if (retval)
+                break;
+        } else {
+            // Since we are changing ownership from boinc_project to boinc_master, 
+            // make sure executable-by-group bit is set if executable-by-owner is set 
+            if ((sbuf.st_mode & 0110) == 0100) {    // If executable by owner but not by group
+                retval = DoPrivilegedExec(chmodPath, "g+x", fullpath, NULL, NULL, NULL, NULL);
+            }
+        }
+            
+    }       // End while (true)
+    
+    closedir(dirp);
+
+    return retval;
+}
+
+
+static OSStatus CreateUserAndGroup(char * user_name, char * group_name) {
+    OSStatus        err = noErr;
+    passwd          *pw = NULL;
+    group           *grp = NULL;
+    uid_t           userid = 0;
+    gid_t           groupid = 0;
+    gid_t           usergid = 0;
+    Boolean         userExists = false;
+    Boolean         groupExists = false;
+    short           i;
+    static short    start_id = MIN_ID;
+    char            buf1[80];
+    char            buf2[80];
+    char            buf3[80];
+    char            buf4[80];
+    SInt32          response;
+   
+    err = Gestalt(gestaltSystemVersion, &response);
+    if (err) return err;
+    
+    // OS 10.4 has problems with Accounts pane if we create uid or gid > 501
+    if (response < 0x1050) {
+        start_id = 25;
+    }
+    
+    pw = getpwnam(user_name);
+    if (pw) {
+        userid = pw->pw_uid;
+        userExists = true;
+    }
+
+    grp = getgrnam(group_name);
+    if (grp) {
+        groupid = grp->gr_gid;
+        groupExists = true;
+    }
+    
+    sprintf(buf1, "/groups/%s", group_name);
+    sprintf(buf2, "/users/%s", user_name);
+
+    if ( userExists && groupExists )
+        goto setRealName;       // User and group already exist
+
+    // If only user or only group exists, try to use the same ID for the one we create
+    if (userExists) {      // User exists but group does not
+        usergid = pw->pw_gid;
+        if (usergid) {
+            grp = getgrgid(usergid);
+            if (grp == NULL)    // Set the group ID = users existing group if this group ID is available
+                groupid = usergid;
+        }
+        if (groupid == 0) {
+            grp = getgrgid(userid);
+            if (grp == NULL)    // Set the group ID = user ID if this group ID is available
+                groupid = userid;
+        }
+    } else {
+        if (groupExists) {      // Group exists but user does not
+           pw = getpwuid(groupid);
+            if (pw == NULL)    // Set the user ID = group ID if this user ID is available
+                userid = groupid;
+        }
+    }
+    
+    // We need to find an available user ID, group ID, or both.  Find a value that is currently 
+    // neither a user ID or a group ID.
+    // If we need both a new user ID and a new group ID, finds a value that can be used for both.
+    if ( (userid == 0) || (groupid == 0) ) {
+        for(i=start_id; ; i++) {
+           if ((uid_t)i != userid) {
+                pw = getpwuid((uid_t)i);
+                if (pw)
+                    continue;               // Already exists as a user ID of a different user
+            }
+            
+            if ((gid_t)i != groupid) {
+                grp = getgrgid((gid_t)i);
+                if (grp)
+                    continue;               // Already exists as a group ID of a different group
+            }
+            
+            if (! userExists)
+                userid = (uid_t)i;
+            if (! groupExists)
+                groupid = (gid_t)i;
+
+            start_id = i + 1;               // Start with next higher value next time
+                
+            break;                          // Success!
+        }
+    }
+    
+    sprintf(buf3, "%d", groupid);
+    sprintf(buf4, "%d", userid);
+
+    if (! groupExists) {             // If we need to create group
+        // Something like "dscl . -create /groups/boinc_master"
+        err = DoPrivilegedExec(dsclPath, ".", "-create", buf1, NULL, NULL, NULL);
+        if (err)
+            return err;
+ 
+        // Something like "dscl . -create /groups/boinc_master gid 33"
+        err = DoPrivilegedExec(dsclPath, ".", "-create", buf1, "gid", buf3, NULL);
+        if (err)
+            return err;
+    }           // if (! groupExists)
+        
+    if (! userExists) {             // If we need to create user
+        // Something like "dscl . -create /users/boinc_master"
+        err = DoPrivilegedExec(dsclPath, ".", "-create", buf2, NULL, NULL, NULL);
+        if (err)
+            return err;
+
+        // Something like "dscl . -create /users/boinc_master uid 33"
+        err = DoPrivilegedExec(dsclPath, ".", "-create", buf2, "uid", buf4, NULL);
+        if (err)
+            return err;
+
+        // Prevent a security hole by not allowing a login from this user
+        // Something like "dscl . -create /users/boinc_master shell /usr/bin/false"
+        err = DoPrivilegedExec(dsclPath, ".", "-create", buf2, "shell", "/usr/bin/false", NULL);
+        if (err)
+            return err;
+
+        // Something like "dscl . -create /users/boinc_master home /var/empty"
+        err = DoPrivilegedExec(dsclPath, ".", "-create", buf2, "home", "/var/empty", NULL);
+        if (err)
+            return err;
+    }           // if (! userExists)
+
+    // Always set the user gid if we created either the user or the group or both
+    // Something like "dscl . -create /users/boinc_master gid 33"
+    err = DoPrivilegedExec(dsclPath, ".", "-create", buf2, "gid", buf3, NULL);
+    if (err)
+        return err;
+
+setRealName:
+    // Always set the RealName field to an empty string
+    // Note: create RealName with empty string fails under OS 10.7, but 
+    // creating it with non-empty string and changing to empty string does work.
+    //
+    // Something like "dscl . -create /users/boinc_master RealName tempName"
+    err = DoPrivilegedExec(dsclPath, ".", "-create", buf2, "RealName", user_name, NULL);
+    if (err)
+        return err;
+
+    // Something like 'dscl . -change /users/boinc_master RealName ""'
+    err = DoPrivilegedExec(dsclPath, ".", "-change", buf2, "RealName", user_name, "");
+    if (err)
+        return err;
+
+    err = ResynchSystem();
+    if (err != noErr)
+        return err;
+
+    SleepTicks(120);
+
+    return noErr;
+}
+
+
+int AddAdminUserToGroups(char *user_name, bool add_to_boinc_project) {        
+#ifndef _DEBUG
+    char            buf1[80];
+    OSStatus        err = noErr;
+
+    sprintf(buf1, "/groups/%s", boinc_master_group_name);
+
+    // "dscl . -merge /groups/boinc_master users user_name"
+    err = DoPrivilegedExec(dsclPath, ".", "-merge", buf1, "users", user_name, NULL);
+    if (err)
+        return err;
+
+    if (add_to_boinc_project)  {
+        sprintf(buf1, "/groups/%s", boinc_project_group_name);
+
+        // "dscl . -merge /groups/boinc_project users user_name"
+        err = DoPrivilegedExec(dsclPath, ".", "-merge", buf1, "users", user_name, NULL);
+        if (err)
+            return err;
+    }
+    
+    err = ResynchSystem();
+    if (err != noErr)
+        return err;
+
+#endif          // ! _DEBUG    
+    return noErr;
+}
+
+
+static OSStatus ResynchSystem() {
+    SInt32          response;
+    OSStatus        err = noErr;
+   
+    err = Gestalt(gestaltSystemVersion, &response);
+    if (err) return err;
+    
+    if (response >= 0x1050) {
+        // OS 10.5
+        err = system("dscacheutil -flushcache");
+        err = system("dsmemberutil flushcache");
+        return noErr;
+    }
+    
+    err = system("lookupd -flushcache");
+
+    err = Gestalt(gestaltSystemVersion, &response);
+    if ((err == noErr) && (response >= 0x1040))
+        err = system("memberd -r");           // Available only in OS 10.4
+
+    return noErr;
+}
+
+
+#ifdef _DEBUG
+// GDB can't attach to applications which are running as a diferent user or group so 
+//  it ignores the S_ISUID and S_ISGID permisison bits when launching an application.
+// To work around this, the _DEBUG version uses the current user and group.
+static OSStatus SetFakeMasterNames() {
+    passwd              *pw;
+    group               *grp;
+    gid_t               boinc_master_gid;
+    uid_t               boinc_master_uid;
+    long                response;
+    OSStatus            err = noErr;
+
+    boinc_master_uid = geteuid();
+    pw = getpwuid(boinc_master_uid);
+    if (pw == NULL)
+        return -1;      // Should never happen
+    strlcpy(boinc_master_user_name, pw->pw_name, sizeof(boinc_master_user_name));
+
+    boinc_master_gid = getegid();
+    grp = getgrgid(boinc_master_gid);
+    if (grp == NULL)
+        return -1;
+    strlcpy(boinc_master_group_name, grp->gr_name, sizeof(boinc_master_group_name));
+    
+    err = Gestalt(gestaltSystemVersion, (SInt32*)&response);
+#ifndef DEBUG_WITH_FAKE_PROJECT_USER_AND_GROUP
+    if ((err == noErr) && (response >= 0x1040)) {
+        // For better debugging of SANDBOX permissions logic
+        strlcpy(boinc_project_user_name, REAL_BOINC_PROJECT_NAME, sizeof(boinc_project_user_name));
+        strlcpy(boinc_project_group_name, REAL_BOINC_PROJECT_NAME, sizeof(boinc_project_group_name));
+    } else 
+#endif
+    {
+        // For easier debugging of project applications; required under OS 10.3.x
+        strlcpy(boinc_project_user_name, pw->pw_name, sizeof(boinc_project_user_name));
+        strlcpy(boinc_project_group_name, grp->gr_name, sizeof(boinc_project_group_name));
+     }
+     
+    return noErr;
+}
+#endif
+
+
+static OSStatus GetAuthorization (void) {
+    static Boolean              sIsAuthorized = false;
+    AuthorizationRights         ourAuthRights;
+    AuthorizationFlags          ourAuthFlags;
+    AuthorizationItem           ourAuthRightsItem[RIGHTS_COUNT];
+    AuthorizationEnvironment    ourAuthEnvironment;
+    AuthorizationItem           ourAuthEnvItem[1];
+    char                        prompt[] = "BOINC needs to have certain permissions set up.\n\n";
+    OSStatus                    err = noErr;
+
+    if (sIsAuthorized)
+        return noErr;
+        
+    ourAuthRights.count = 0;
+    ourAuthRights.items = NULL;
+
+    err = AuthorizationCreate (&ourAuthRights, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &gOurAuthRef);
+    if (err != noErr) {
+        ShowSecurityError("AuthorizationCreate returned error %d", err);
+        return err;
+    }
+     
+    ourAuthRightsItem[0].name = kAuthorizationRightExecute;
+    ourAuthRightsItem[0].value = dsclPath;
+    ourAuthRightsItem[0].valueLength = strlen (dsclPath);
+    ourAuthRightsItem[0].flags = 0;
+
+    ourAuthRightsItem[1].name = kAuthorizationRightExecute;
+    ourAuthRightsItem[1].value = chmodPath;
+    ourAuthRightsItem[1].valueLength = strlen (chmodPath);
+    ourAuthRightsItem[1].flags = 0;
+
+    ourAuthRightsItem[2].name = kAuthorizationRightExecute;
+    ourAuthRightsItem[2].value = chownPath;
+    ourAuthRightsItem[2].valueLength = strlen (chownPath);
+    ourAuthRightsItem[2].flags = 0;
+
+#if AUTHORIZE_LOOKUPD_MEMBERD
+    ourAuthRightsItem[3].name = kAuthorizationRightExecute;
+    ourAuthRightsItem[3].value = lookupdPath;
+    ourAuthRightsItem[3].valueLength = strlen (lookupdPath);
+    ourAuthRightsItem[3].flags = 0;
+
+    ourAuthRightsItem[4].name = kAuthorizationRightExecute;
+    ourAuthRightsItem[4].value = memberdPath;
+    ourAuthRightsItem[4].valueLength = strlen (memberdPath);
+    ourAuthRightsItem[4].flags = 0;
+#endif
+
+    ourAuthRights.count = RIGHTS_COUNT;
+    ourAuthRights.items = ourAuthRightsItem;
+
+    ourAuthEnvItem[0].name = kAuthorizationEnvironmentPrompt;
+    ourAuthEnvItem[0].value = prompt;
+    ourAuthEnvItem[0].valueLength = strlen (prompt);
+    ourAuthEnvItem[0].flags = 0;
+
+    ourAuthEnvironment.count = 1;
+    ourAuthEnvironment.items = ourAuthEnvItem;
+
+    
+    ourAuthFlags = kAuthorizationFlagInteractionAllowed | kAuthorizationFlagExtendRights;
+    
+    // When this is called from the installer, the installer has already authenticated.  
+    // In that case we are already running with full root privileges so AuthorizationCopyRights() 
+    // does not request a password from the user again.
+    err = AuthorizationCopyRights (gOurAuthRef, &ourAuthRights, &ourAuthEnvironment, ourAuthFlags, NULL);
+    
+    if (err == noErr)
+        sIsAuthorized = true;
+    
+    return err;
+}
+
+OSStatus DoPrivilegedExec(const char *pathToTool, char *arg1, char *arg2, char *arg3, char *arg4, char *arg5, char *arg6) {
+    short               i;
+    char                *args[8];
+    OSStatus            err;
+    FILE                *ioPipe = NULL;
+    char                *p, junk[256];
+
+    err = GetAuthorization();
+    if (err != noErr) {
+        if (err == errAuthorizationCanceled)
+            return err;
+        ShowSecurityError("GetAuthorization returned error %d", err);
+    } else {
+        for (i=0; i<5; i++) {       // Retry 5 times if error
+            args[0] = arg1;
+            args[1] = arg2;
+            args[2] = arg3;
+            args[3] = arg4;
+            args[4] = arg5;
+            args[5] = arg6;
+            args[6] = NULL;
+
+            err = AuthorizationExecuteWithPrivileges (gOurAuthRef, pathToTool, 0, args, &ioPipe);
+            if (ioPipe) {
+                // We use the pipe to signal us when the command has completed
+                do {
+                    p = fgets(junk, sizeof(junk), ioPipe);
+                } while (p);
+                
+                fclose (ioPipe);
+            }
+
+            // AuthorizationExecuteWithPrivileges() does a fork() and so 
+            // leaves a zombie process.  Clear these so we don't exceed 
+            // the system-imposed limit of processes per user (MAXUPRC).
+            while (waitpid(-1, 0, WNOHANG) > 0);
+#if 0
+            if (strcmp(arg2, "-R") == 0)
+                SleepTicks(DELAY_TICKS_R);
+            else
+                SleepTicks(DELAY_TICKS);
+#endif
+            if (err == noErr)
+                break;
+        }
+    }
+    if (err != noErr)
+        ShowSecurityError("\"%s %s %s %s %s %s\" returned error %d", pathToTool, 
+                            arg1 ? arg1 : "", arg2 ? arg2 : "", arg3 ? arg3 : "", 
+                            arg4 ? arg4 : "", arg5 ? arg5 : "", err);
+
+       return err;
+}
+
+
+
+void ShowSecurityError(const char *format, ...) {
+    va_list                 args;
+
+#ifdef __x86_64__
+    va_start(args, format);
+    vfprintf(stderr, format, args);
+    va_end(args);
+#else
+    char                    s[1024];
+    short                   itemHit;
+    AlertStdAlertParamRec   alertParams;
+    ModalFilterUPP          ErrorDlgFilterProcUPP;
+    
+    ProcessSerialNumber	ourProcess;
+
+    va_start(args, format);
+    s[0] = vsprintf(s+1, format, args);
+    va_end(args);
+
+    ErrorDlgFilterProcUPP = NewModalFilterUPP(ErrorDlgFilterProc);
+
+    alertParams.movable = true;
+    alertParams.helpButton = false;
+    alertParams.filterProc = ErrorDlgFilterProcUPP;
+    alertParams.defaultText = "\pOK";
+    alertParams.cancelText = NULL;
+    alertParams.otherText = NULL;
+    alertParams.defaultButton = kAlertStdAlertOKButton;
+    alertParams.cancelButton = 0;
+    alertParams.position = kWindowDefaultPosition;
+
+    ::GetCurrentProcess (&ourProcess);
+    ::SetFrontProcess(&ourProcess);
+
+    StandardAlert (kAlertStopAlert, (StringPtr)s, NULL, &alertParams, &itemHit);
+
+    DisposeModalFilterUPP(ErrorDlgFilterProcUPP);
+#endif
+}
+
+
+#ifndef __x86_64__
+static pascal Boolean ErrorDlgFilterProc(DialogPtr theDialog, EventRecord *theEvent, short *theItemHit) {
+    // We need this because this is a command-line application so it does not get normal events
+    if (Button()) {
+        *theItemHit = kStdOkItemIndex;
+        return true;
+    }
+    
+    return StdFilterProc(theDialog, theEvent, theItemHit);
+}
+#endif
+
+// Uses usleep to sleep for full duration even if a signal is received
+static void SleepTicks(UInt32 ticksToSleep) {
+    UInt32 endSleep, timeNow, ticksRemaining;
+
+    timeNow = TickCount();
+    ticksRemaining = ticksToSleep;
+    endSleep = timeNow + ticksToSleep;
+    while ( (timeNow < endSleep) && (ticksRemaining <= ticksToSleep) ) {
+        usleep(16667 * ticksRemaining);
+        timeNow = TickCount();
+        ticksRemaining = endSleep - timeNow;
+    } 
+}
diff --git a/clientgui/mac/SetupSecurity.h b/clientgui/mac/SetupSecurity.h
new file mode 100644
index 0000000..a17f174
--- /dev/null
+++ b/clientgui/mac/SetupSecurity.h
@@ -0,0 +1,31 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+// SetupSecurity.h
+
+#ifdef _DEBUG
+// Comment out this #define for easier debugging of project applications.
+// Make it active for better debugging of SANDBOX permissions logic.
+// #define DEBUG_WITH_FAKE_PROJECT_USER_AND_GROUP
+#endif
+
+
+int CreateBOINCUsersAndGroups(void);
+int SetBOINCAppOwnersGroupsAndPermissions(char *path);
+int SetBOINCDataOwnersGroupsAndPermissions(void);
+int AddAdminUserToGroups(char *user_name, bool add_to_boinc_project=true);
+void ShowSecurityError(const char *format, ...);
diff --git a/clientgui/mac/SystemMenu.m b/clientgui/mac/SystemMenu.m
new file mode 100644
index 0000000..2124164
--- /dev/null
+++ b/clientgui/mac/SystemMenu.m
@@ -0,0 +1,293 @@
+/* SystemMenu.m */
+
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/* Cocoa routines for BOINC Manager OS X System Icon Menu.
+    Written by Charlie Fenton for UC Berkeley Space Sciences Laboratory 2005
+    
+    Adapted from Apple Developer Tech Support sample code, including:
+      SpellingChecker-CarbonCocoa
+      MenuMadness
+*/
+
+#include <Carbon/Carbon.h>
+#include <Cocoa/Cocoa.h>
+
+ at interface SystemMenu : NSObject {
+}
+- (void)BuildSysMenu:(MenuRef)menuToCopy;
+- (void)postEvent:(id)sender;
+ at end
+
+
+
+
+SystemMenu *gSystemMenu = NULL;
+NSStatusItem *gStatusItem = NULL;
+
+void SetSystemMenuIcon(CGImageRef theIcon);
+static OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr);
+
+/*
+	Needed to make sure the Cocoa framework has a chance to initialize things in a Carbon app.
+	
+	NSApplicationLoad() is an API introduced in 10.2 which is a startup function to call when
+	running Cocoa code from a Carbon application.
+
+	Because NSApplicationLoad() is not available pre 10.2, we load the function pointer through
+	CFBundle.  If we encounter an error during this process, (i.e. it's not there), we fall back
+	to calling NSApplication *NSApp=[NSApplication sharedApplication];
+	The fallback method does have bugs with regard to window activation seen when hiding and showing
+	the main application.
+*/
+typedef BOOL (*NSApplicationLoadFuncPtr)( void );
+
+void	InitializeCocoa() {
+	CFBundleRef 				appKitBundleRef;
+	NSApplicationLoadFuncPtr                myNSApplicationLoad;
+	OSStatus				err;
+	
+	//	Load the "AppKit.framework" bundl to locate NSApplicationLoad
+	err = LoadFrameworkBundle( CFSTR("AppKit.framework"), &appKitBundleRef );
+	if (err != noErr) goto FallbackMethod;
+	
+	//	Manually load the Mach-O function pointers for the routines we will be using.
+	myNSApplicationLoad	= (NSApplicationLoadFuncPtr) CFBundleGetFunctionPointerForName( appKitBundleRef, CFSTR("NSApplicationLoad") );
+	if ( myNSApplicationLoad == NULL ) goto FallbackMethod;
+
+	(void) myNSApplicationLoad();
+	return;
+
+FallbackMethod:
+	{   /* NSApplication *NSApp = */ [NSApplication sharedApplication]; }
+}
+
+
+
+/*
+*/
+void	SetUpSystemMenu(MenuRef menuToCopy, CGImageRef theIcon) {
+    NSAutoreleasePool* pool;
+    
+    if (gSystemMenu == NULL)
+        InitializeCocoa();
+        
+    pool	= [[NSAutoreleasePool alloc] init];
+    
+    if (gSystemMenu)
+        [gSystemMenu release];
+        
+    gSystemMenu = [[SystemMenu alloc] init];
+    [gSystemMenu retain];
+    
+    [gSystemMenu BuildSysMenu:menuToCopy];
+//    [gStatusItem setImage: [NSImage imageNamed:@"Icon0"]];
+    SetSystemMenuIcon(theIcon);
+
+    [pool release];
+}
+
+
+ at implementation SystemMenu
+
+- (void)BuildSysMenu:(MenuRef)menuToCopy {
+    NSStatusBar *bar;
+    NSMenuItem *newItem;
+    NSMenu *sysMenu;
+    int i, n;
+    Str255 s;
+    CFStringRef CFText;
+    UInt32 tag;
+    OSErr err;
+
+    // Add the submenu
+    newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:@"BOINC!" action:NULL keyEquivalent:@""];
+    sysMenu = [[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:@"BOINC!"];
+    [newItem setSubmenu:sysMenu];
+
+    if (gStatusItem == NULL) {
+        bar = [NSStatusBar systemStatusBar];
+
+        gStatusItem = [bar statusItemWithLength:NSSquareStatusItemLength];
+        [gStatusItem retain];
+    }
+    
+    [gStatusItem setTitle: NSLocalizedString(@"",@"")];
+    [gStatusItem setHighlightMode:YES];
+    [gStatusItem setMenu:sysMenu];
+
+    [sysMenu release];
+    [newItem release];
+
+    n = CountMenuItems(menuToCopy);
+    // Add the items
+    for (i=1; i<=n; i++)
+    {
+        GetMenuItemText(menuToCopy, i, s); 
+        err = GetMenuItemCommandID(menuToCopy, i, &tag);
+        
+       if ((PLstrcmp(s, "\p-") == 0) || (tag == 0))
+        {
+            [sysMenu addItem:[NSMenuItem separatorItem]];
+            continue;
+        }
+        
+        CFText = CFStringCreateWithPascalString(kCFAllocatorDefault, s, kCFStringEncodingMacRoman);
+        if (CFText != NULL)
+        {
+            newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:(NSString*)CFText action:NULL keyEquivalent:@""];
+           if (err == noErr) {
+                [newItem setTarget:self];
+                [sysMenu addItem:newItem];
+                if( IsMenuItemEnabled(menuToCopy, i) )
+                    [newItem setEnabled:YES];
+                else
+                    [newItem setEnabled:NO];
+                
+                // setTag and setAction are needed only in OS 10.5
+                [newItem setTag:tag];
+                [newItem setAction:@selector(postEvent:)];
+
+            }
+            [newItem release];
+            CFRelease(CFText);
+        }
+    }
+    
+    [sysMenu setAutoenablesItems:NO];
+    return;
+}
+
+
+// postEvent is needed only in OS 10.5
+- (void)postEvent:(id)sender {
+    HICommand commandStruct;
+    EventRef theEvent;
+    OSStatus err;
+
+    // Build a kEventClassCommand CarbonEvent and set the CommandId 
+    //  to the value of the menu item's tag
+    err = CreateEvent(NULL, kEventClassCommand, kEventCommandProcess, 
+                                0, kEventAttributeUserEvent, &theEvent);
+    commandStruct.commandID = [sender tag];
+    commandStruct.attributes = kHICommandFromMenu;
+    commandStruct.menu.menuRef = (MenuRef)'BNC!';
+        
+    if (err == noErr)
+        err = SetEventParameter(theEvent, kEventParamDirectObject, 
+                                typeHICommand, sizeof(HICommand), &commandStruct);
+    if (err == noErr)
+        SendEventToEventTarget(theEvent, GetApplicationEventTarget());
+//    SysBeep(4);
+}
+
+
+void SetSystemMenuIcon(CGImageRef theIcon)
+{
+    if (theIcon == NULL) 
+    {
+        // A NULL icon handle is a request to remove the status item from the menu bar
+        [[gStatusItem statusBar] removeStatusItem:gStatusItem];
+        [gStatusItem release];
+        [gSystemMenu release];
+        gStatusItem = NULL;
+        gSystemMenu = NULL;
+        
+        return;
+    }
+        
+    NSRect imageRect = NSMakeRect(0.0, 0.0, 0.0, 0.0);
+    CGContextRef imageContext = nil;
+    NSImage* theImage = nil;
+ 
+    // Get the image dimensions.
+    imageRect.size.height = CGImageGetHeight(theIcon);
+    imageRect.size.width = CGImageGetWidth(theIcon);
+ 
+    // Create a new image to receive the Quartz image data.
+    theImage = [[NSImage alloc] initWithSize:imageRect.size];
+    [theImage lockFocus];
+ 
+    // Get the Quartz context and draw.
+    imageContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
+    CGContextDrawImage(imageContext, *(CGRect*)&imageRect, theIcon);
+    [theImage unlockFocus];
+
+    [gStatusItem setImage:theImage];
+    
+    [theImage release];
+    
+    return;
+}
+
+
+static OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr)
+{
+	OSStatus 	err;
+	FSRef 		frameworksFolderRef;
+	CFURLRef	baseURL;
+	CFURLRef	bundleURL;
+	
+	if ( bundlePtr == nil )	return( -1 );
+	
+	*bundlePtr = nil;
+	
+	baseURL = nil;
+	bundleURL = nil;
+	
+	err = FSFindFolder(kOnAppropriateDisk, kFrameworksFolderType, true, &frameworksFolderRef);
+	if (err == noErr) {
+		baseURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault, &frameworksFolderRef);
+		if (baseURL == nil) {
+			err = coreFoundationUnknownErr;
+		}
+	}
+	if (err == noErr) {
+		bundleURL = CFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault, baseURL, framework, false);
+		if (bundleURL == nil) {
+			err = coreFoundationUnknownErr;
+		}
+	}
+	if (err == noErr) {
+		*bundlePtr = CFBundleCreate(kCFAllocatorSystemDefault, bundleURL);
+		if (*bundlePtr == nil) {
+			err = coreFoundationUnknownErr;
+		}
+	}
+	if (err == noErr) {
+	    if ( ! CFBundleLoadExecutable( *bundlePtr ) ) {
+			err = coreFoundationUnknownErr;
+	    }
+	}
+
+	// Clean up.
+	if (err != noErr && *bundlePtr != nil) {
+		CFRelease(*bundlePtr);
+		*bundlePtr = nil;
+	}
+	if (bundleURL != nil) {
+		CFRelease(bundleURL);
+	}	
+	if (baseURL != nil) {
+		CFRelease(baseURL);
+	}	
+	
+	return err;
+}
+
+ at end
diff --git a/clientgui/mac/SystemMenu_Prefix.pch b/clientgui/mac/SystemMenu_Prefix.pch
new file mode 100644
index 0000000..dbe0747
--- /dev/null
+++ b/clientgui/mac/SystemMenu_Prefix.pch
@@ -0,0 +1,27 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+//
+// Prefix header for all source files of the 'SystemMenu' target in the 'BOINC' project.
+//
+
+#ifdef __OBJC__
+    #import <Foundation/Foundation.h>
+    #import <AppKit/AppKit.h>
+#endif
diff --git a/clientgui/mac/browser_safari.mm b/clientgui/mac/browser_safari.mm
new file mode 100644
index 0000000..7de262f
--- /dev/null
+++ b/clientgui/mac/browser_safari.mm
@@ -0,0 +1,82 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "str_util.h"
+#include "browser.h"
+
+#include <Cocoa/Cocoa.h>
+
+bool detect_cookie_safari(std::string& project_url, std::string& name, std::string& value)
+{    
+    NSHTTPCookieStorage *cookieStorage;
+    NSArray *theCookies;
+    NSHTTPCookie *aCookie;
+    NSURL *theURL;
+    NSString *theURLString, *theValueString, *theNameString;
+    NSDate *expirationDate;
+    unsigned int i, n;
+    bool retval = false;
+
+    NSAutoreleasePool* pool;
+    
+    pool = [[NSAutoreleasePool alloc] init];
+    
+    
+    theURLString = [ NSString stringWithCString:project_url.c_str() ];
+    
+    theURL = [ NSURL URLWithString:theURLString ];
+
+    cookieStorage = [ NSHTTPCookieStorage sharedHTTPCookieStorage ];
+    
+    if (cookieStorage == NULL)
+        goto bail;
+    
+    theCookies = [ cookieStorage cookiesForURL:theURL ];
+
+    if (theCookies == NULL)
+        goto bail;
+
+    n = [ theCookies count ];
+    for (i=0; i<n; i++) {
+        aCookie = (NSHTTPCookie*)[ theCookies objectAtIndex:i ];
+
+        // has the cookie expired?
+        expirationDate = [ aCookie expiresDate ];
+        if ([ expirationDate compare:[ NSDate date ]] == NSOrderedAscending)
+            continue;
+            
+        theNameString = [ aCookie name ];
+        // is this the right cookie?
+#ifdef cStringUsingEncoding     // Available only is OS 10.4 and later
+        if (!starts_with([ theNameString cStringUsingEncoding:NSMacOSRomanStringEncoding ], name.c_str()))
+            continue;
+        theValueString = [ aCookie value ];
+        value = [ theValueString cStringUsingEncoding:NSMacOSRomanStringEncoding ];
+#else
+        if (!starts_with([ theNameString cString ], name.c_str()))
+            continue;
+        theValueString = [ aCookie value ];
+        value = [ theValueString cString ];
+#endif
+        retval = true;
+    }
+
+bail:
+    [pool release];
+
+    return retval;
+}
\ No newline at end of file
diff --git a/clientgui/mac/config.h b/clientgui/mac/config.h
new file mode 100644
index 0000000..c902324
--- /dev/null
+++ b/clientgui/mac/config.h
@@ -0,0 +1,377 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/* config.h  - Prebuilt configuration info for Macintosh BOINC */
+/* Adapted from config.h generated by configure.  */
+
+
+/* double-inclusion protection for config.h */
+#ifndef BOINC_CONFIG_H
+#define BOINC_CONFIG_H
+
+/* Version defines are now in version.h */
+#include "version.h"
+
+
+
+/* Define to the type pointed to by the 5th parameter of getsockopt */
+#define BOINC_SOCKLEN_T socklen_t
+
+/* Use the Apple OpenGL framework. */
+#define HAVE_APPLE_OPENGL_FRAMEWORK 1
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `flock' function. */
+#define HAVE_FLOCK 1
+
+/* Define to 1 if you have the `getutent' function. */
+/* #undef HAVE_GETUTENT */
+
+/* Define to 1 if you have the <glaux.h> header file. */
+/* #undef HAVE_GLAUX_H */
+
+/* Define to 1 if you have the <GLUT/glut.h> header file. */
+#define HAVE_GLUT_GLUT_H 1
+
+/* Define to 1 if you have the <glut.h> header file. */
+/* #undef HAVE_GLUT_H */
+
+/* Define to 1 if you have the <glu.h> header file. */
+/* #undef HAVE_GLU_H */
+
+/* Define to 1 if you have the <GL/glaux.h> header file. */
+/* #undef HAVE_GL_GLAUX_H */
+
+/* Define to 1 if you have the <GL/glut.h> header file. */
+/* #undef HAVE_GL_GLUT_H */
+
+/* Define to 1 if you have the <GL/glu.h> header file. */
+/* #undef HAVE_GL_GLU_H */
+
+/* Define to 1 if you have the <GL/gl.h> header file. */
+/* #undef HAVE_GL_GL_H */
+
+/* Define to 1 if you have the <gl.h> header file. */
+/* #undef HAVE_GL_H */
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+/* #undef HAVE_IEEEFP_H */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the c library */
+#define HAVE_LIBC 1
+
+/* Define to 1 if you have the gcc library */
+#define HAVE_LIBGCC 1
+
+/* Define to 1 if you have the gcc_eh library */
+#define HAVE_LIBGCC_EH 1
+
+/* Define to 1 if you have the math library */
+#define HAVE_LIBM 1
+
+/* Define to 1 if you have the pthread library */
+#define HAVE_LIBPTHREAD 1
+
+/* Define to 1 if you have the stdc++ library */
+#define HAVE_LIBSTDC__ 1
+
+/* Define to 1 if you have the `lockf' function. */
+#define HAVE_LOCKF 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+/* #undef HAVE_MALLOC_H */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <MesaGL/glaux.h> header file. */
+/* #undef HAVE_MESAGL_GLAUX_H */
+
+/* Define to 1 if you have the <MesaGL/glut.h> header file. */
+/* #undef HAVE_MESAGL_GLUT_H */
+
+/* Define to 1 if you have the <MesaGL/glu.h> header file. */
+/* #undef HAVE_MESAGL_GLU_H */
+
+/* Define to 1 if you have the <MesaGL/gl.h> header file. */
+/* #undef HAVE_MESAGL_GL_H */
+
+/* Define if your C++ compiler supports namespaces */
+#define HAVE_NAMESPACES 1
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+#define HAVE_NETINET_TCP_H 1
+
+/* Define to 1 if you have the <OpenGL/glaux.h> header file. */
+/* #undef HAVE_OPENGL_GLAUX_H */
+
+/* Define to 1 if you have the <OpenGL/glut.h> header file. */
+/* #undef HAVE_OPENGL_GLUT_H */
+
+/* Define to 1 if you have the <OpenGL/glu.h> header file. */
+#define HAVE_OPENGL_GLU_H 1
+
+/* Define to 1 if you have the <OpenGL/gl.h> header file. */
+#define HAVE_OPENGL_GL_H 1
+
+/* Define to 1 if you have the <procfs.h> header file. */
+/* #undef HAVE_PROCFS_H */
+
+/* Define if you have POSIX threads libraries and header files. */
+#define HAVE_PTHREAD 1
+
+/* Define to 1 if you have the `setpriority' function. */
+#define HAVE_SETPRIORITY 1
+
+/* Define to 1 if you have the `setutent' function. */
+/* #undef HAVE_SETUTENT */
+
+/* Define to 1 if you have the `sigaction' function. */
+#define HAVE_SIGACTION 1
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if the system has the type `socklen_t'. */
+#define HAVE_SOCKLEN_T 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if locale is in namespace std:: */
+#define HAVE_STD_LOCALE 1
+
+/* Define to 1 if max is in namespace std:: */
+#define HAVE_STD_MAX 1
+
+/* Define to 1 if min is in namespace std:: */
+#define HAVE_STD_MIN 1
+
+/* Define to 1 if transform is in namespace std:: */
+#define HAVE_STD_TRANSFORM 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcat' function. */
+#define HAVE_STRLCAT 1
+
+/* Define to 1 if you have the `strlcpy' function. */
+#define HAVE_STRLCPY 1
+
+/* Define to 1 if you have the `strcasestr' function. */
+#define HAVE_STRCASESTR 1
+
+/* Define to 1 if you have the `strtoull' function. */
+#define HAVE_STRTOULL 1
+
+/* Define to 1 if `tm_zone' is member of `struct tm'. */
+#define HAVE_STRUCT_TM_TM_ZONE 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#define HAVE_SYS_FILE_H 1
+
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#define HAVE_SYS_IPC_H 1
+
+/* Define to 1 if you have the <sys/mount.h> header file. */
+#define HAVE_SYS_MOUNT_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/shm.h> header file. */
+#define HAVE_SYS_SHM_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/statfs.h> header file. */
+/* #undef HAVE_SYS_STATFS_H */
+
+/* Define to 1 if you have the <sys/statvfs.h> header file. */
+/* #undef HAVE_SYS_STATVFS_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/swap.h> header file. */
+/* #undef HAVE_SYS_SWAP_H */
+
+/* Define to 1 if you have the <sys/sysctl.h> header file. */
+#define HAVE_SYS_SYSCTL_H 1
+
+/* Define to 1 if you have the <sys/systeminfo.h> header file. */
+/* #undef HAVE_SYS_SYSTEMINFO_H */
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/utsname.h> header file. */
+#define HAVE_SYS_UTSNAME_H 1
+
+/* Define to 1 if you have the <sys/vmmeter.h> header file. */
+#define HAVE_SYS_VMMETER_H 1
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+   `HAVE_STRUCT_TM_TM_ZONE' instead. */
+#define HAVE_TM_ZONE 1
+
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+   `tzname'. */
+/* #undef HAVE_TZNAME */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <utmp.h> header file. */
+#define HAVE_UTMP_H 1
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the `wait3' system call. Deprecated, you should no
+   longer depend upon `wait3'. */
+#define HAVE_WAIT3 1
+
+/* Define to 1 if you have the `wait4' function. */
+#define HAVE_WAIT4 1
+
+/* Define to 1 if you have the <windows.h> header file. */
+/* #undef HAVE_WINDOWS_H */
+
+/* Define to 1 if /dev/kbd exists */
+/* #undef HAVE__DEV_KBD */
+
+/* Define to 1 if /dev/mouse exists */
+/* #undef HAVE__DEV_MOUSE */
+
+/* Define to 1 if /dev/tty1 exists */
+/* #undef HAVE__DEV_TTY1 */
+
+/* Define to 1 if /proc/meminfo exists */
+/* #undef HAVE__PROC_MEMINFO */
+
+/* Define to 1 if /proc/self/psinfo exists */
+/* #undef HAVE__PROC_SELF_PSINFO */
+
+/* Define to 1 if /proc/self/stat exists */
+/* #undef HAVE__PROC_SELF_STAT */
+
+/* Host for this compilation */
+/* "i686-apple-darwin", "x86_64-apple-darwin" or "powerpc-apple-darwin" determined at run time */
+#define HOSTTYPE ""
+
+/* "Define to 1 if largefile support causes missing symbols in C++" */
+/* #undef LARGEFILE_BREAKS_CXX */
+
+/* Define to the necessary symbol if this constant uses a non-standard name on
+   your system. */
+/* #undef PTHREAD_CREATE_JOINABLE */
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* utmp file location */
+#define UTMP_LOCATION "/var/run/utmp"
+
+/* Define to 1 if the X Window System is missing or not being used. */
+/* #undef X_DISPLAY_MISSING */
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+
+/* include fixes for the most common problems */
+#include "std_fixes.h"
+
+/* end double-inclusion protection for config.h */
+#endif /* #ifndef BOINC_CONFIG_H */
+
diff --git a/clientgui/mac/gridrepublic.tiff b/clientgui/mac/gridrepublic.tiff
new file mode 100644
index 0000000..c17d3e1
Binary files /dev/null and b/clientgui/mac/gridrepublic.tiff differ
diff --git a/clientgui/msw/taskbarex.cpp b/clientgui/msw/taskbarex.cpp
index 5a400af..86c9fce 100644
--- a/clientgui/msw/taskbarex.cpp
+++ b/clientgui/msw/taskbarex.cpp
@@ -5,7 +5,7 @@
 // Author:      Julian Smart
 // Modified by: Rom Walton
 // Created:     24/3/98
-// RCS-ID:      $Id: taskbarex.cpp 22547 2010-10-18 19:21:46Z romw $
+// RCS-ID:      $Id$
 // Copyright:   (c)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////
diff --git a/clientgui/msw/taskbarex.h b/clientgui/msw/taskbarex.h
index c1fcc4e..267ba65 100644
--- a/clientgui/msw/taskbarex.h
+++ b/clientgui/msw/taskbarex.h
@@ -5,7 +5,7 @@
 // Author:      Julian Smart
 // Modified by: Rom Walton
 // Created:     24/3/98
-// RCS-ID:      $Id: taskbarex.h 22547 2010-10-18 19:21:46Z romw $
+// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////
diff --git a/clientgui/res/templates/mess.bmp b/clientgui/res/templates/mess.bmp
deleted file mode 100644
index 1d0ecb4..0000000
Binary files a/clientgui/res/templates/mess.bmp and /dev/null differ
diff --git a/clientgui/res/templates/proj.bmp b/clientgui/res/templates/proj.bmp
deleted file mode 100644
index e7ebeeb..0000000
Binary files a/clientgui/res/templates/proj.bmp and /dev/null differ
diff --git a/clientgui/res/templates/result.bmp b/clientgui/res/templates/result.bmp
deleted file mode 100644
index e3ae204..0000000
Binary files a/clientgui/res/templates/result.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress01.bmp b/clientgui/res/templates/wizprogress01.bmp
deleted file mode 100644
index cff1c17..0000000
Binary files a/clientgui/res/templates/wizprogress01.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress02.bmp b/clientgui/res/templates/wizprogress02.bmp
deleted file mode 100644
index 55118e0..0000000
Binary files a/clientgui/res/templates/wizprogress02.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress03.bmp b/clientgui/res/templates/wizprogress03.bmp
deleted file mode 100644
index 82e53cd..0000000
Binary files a/clientgui/res/templates/wizprogress03.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress04.bmp b/clientgui/res/templates/wizprogress04.bmp
deleted file mode 100644
index e412a25..0000000
Binary files a/clientgui/res/templates/wizprogress04.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress05.bmp b/clientgui/res/templates/wizprogress05.bmp
deleted file mode 100644
index c1c68de..0000000
Binary files a/clientgui/res/templates/wizprogress05.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress06.bmp b/clientgui/res/templates/wizprogress06.bmp
deleted file mode 100644
index a23210e..0000000
Binary files a/clientgui/res/templates/wizprogress06.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress07.bmp b/clientgui/res/templates/wizprogress07.bmp
deleted file mode 100644
index 0fe91fe..0000000
Binary files a/clientgui/res/templates/wizprogress07.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress08.bmp b/clientgui/res/templates/wizprogress08.bmp
deleted file mode 100644
index ed9794a..0000000
Binary files a/clientgui/res/templates/wizprogress08.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress09.bmp b/clientgui/res/templates/wizprogress09.bmp
deleted file mode 100644
index e412a25..0000000
Binary files a/clientgui/res/templates/wizprogress09.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress10.bmp b/clientgui/res/templates/wizprogress10.bmp
deleted file mode 100644
index 82e53cd..0000000
Binary files a/clientgui/res/templates/wizprogress10.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress11.bmp b/clientgui/res/templates/wizprogress11.bmp
deleted file mode 100644
index 55118e0..0000000
Binary files a/clientgui/res/templates/wizprogress11.bmp and /dev/null differ
diff --git a/clientgui/res/templates/wizprogress12.bmp b/clientgui/res/templates/wizprogress12.bmp
deleted file mode 100644
index fa2fd85..0000000
Binary files a/clientgui/res/templates/wizprogress12.bmp and /dev/null differ
diff --git a/clientgui/res/templates/xfer.bmp b/clientgui/res/templates/xfer.bmp
deleted file mode 100644
index a082be1..0000000
Binary files a/clientgui/res/templates/xfer.bmp and /dev/null differ
diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp
old mode 100644
new mode 100755
index ea66f7f..8af24e3
--- a/clientgui/sg_BoincSimpleFrame.cpp
+++ b/clientgui/sg_BoincSimpleFrame.cpp
@@ -74,6 +74,7 @@ BEGIN_EVENT_TABLE(CSimpleFrame, CBOINCBaseFrame)
     EVT_MENU(ID_HELPBOINCMANAGER, CSimpleFrame::OnHelpBOINC)
     EVT_MENU(ID_HELPBOINCWEBSITE, CSimpleFrame::OnHelpBOINC)
     EVT_MENU(wxID_ABOUT, CSimpleFrame::OnHelpAbout)
+	EVT_MENU(ID_EVENTLOG, CSimpleFrame::OnEventLog)
 END_EVENT_TABLE()
 
 
@@ -271,6 +272,11 @@ CSimpleFrame::CSimpleFrame(wxString title, wxIcon* icon, wxIcon* icon32, wxPoint
 #endif
 
     m_Shortcuts[0].Set(wxACCEL_NORMAL, WXK_HELP, ID_HELPBOINCMANAGER);
+#ifdef __WXMAC__
+    m_Shortcuts[1].Set(wxACCEL_CMD|wxACCEL_SHIFT, (int)'E', ID_EVENTLOG);
+#else
+    m_Shortcuts[1].Set(wxACCEL_CTRL|wxACCEL_SHIFT, (int)'E', ID_EVENTLOG);
+#endif
     m_pAccelTable = new wxAcceleratorTable(2, m_Shortcuts);
 
     SetAcceleratorTable(*m_pAccelTable);
@@ -670,6 +676,15 @@ void CSimpleFrame::OnConnect(CFrameEvent& WXUNUSED(event)) {
 }
 
 
+void CSimpleFrame::OnEventLog(wxCommandEvent& WXUNUSED(event)) {
+    wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnEventLog - Function Begin"));
+
+    wxGetApp().DisplayEventLog();
+
+    wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnEventLog - Function End"));
+}
+
+
 IMPLEMENT_DYNAMIC_CLASS(CSimpleGUIPanel, wxPanel)
 
 BEGIN_EVENT_TABLE(CSimpleGUIPanel, wxPanel)
diff --git a/clientgui/sg_BoincSimpleFrame.h b/clientgui/sg_BoincSimpleFrame.h
index b0d329d..7e5b08f 100644
--- a/clientgui/sg_BoincSimpleFrame.h
+++ b/clientgui/sg_BoincSimpleFrame.h
@@ -124,7 +124,8 @@ public:
     void OnReloadSkin( CFrameEvent& event );
     void OnRefreshView( CFrameEvent& event );
     void OnNotification( CFrameEvent& event );
-
+    void OnEventLog(wxCommandEvent& event);
+    
 	void SetMsgsDlgOpen(CDlgMessages* newDlgPtr) { dlgMsgsPtr = newDlgPtr; }
     bool isMessagesDlgOpen() { return (dlgMsgsPtr != NULL); }
 
@@ -136,7 +137,7 @@ protected:
 
 	wxMenuBar*          m_pMenubar;
     wxMenu*             m_pSubmenuSkins;
-    wxAcceleratorEntry  m_Shortcuts[1];
+    wxAcceleratorEntry  m_Shortcuts[2];
     wxAcceleratorTable* m_pAccelTable;
 
 	CSimpleGUIPanel* m_pBackgroundPanel;
diff --git a/clientgui/sg_PanelBase.cpp b/clientgui/sg_PanelBase.cpp
old mode 100644
new mode 100755
diff --git a/clientgui/sg_ProjectPanel.cpp b/clientgui/sg_ProjectPanel.cpp
old mode 100644
new mode 100755
diff --git a/clientgui/sg_TaskPanel.cpp b/clientgui/sg_TaskPanel.cpp
old mode 100644
new mode 100755
index 5cd70a5..5ec5511
--- a/clientgui/sg_TaskPanel.cpp
+++ b/clientgui/sg_TaskPanel.cpp
@@ -789,11 +789,10 @@ void CSimpleTaskPanel::GetApplicationAndProjectNames(RESULT* result, wxString* a
             strAppBuffer = wxString(state_result->avp->app_name, wxConvUTF8);
         }
         
-        if (avp->ncudas) {
-            strGPUBuffer = wxString(" (NVIDIA GPU)", wxConvUTF8);
-        }
-        if (avp->natis) {
-            strGPUBuffer = wxString(" (ATI GPU)", wxConvUTF8);
+        char buf[256];
+        if (avp->gpu_type) {
+            sprintf(buf, " (%s)", proc_type_name(avp->gpu_type));
+            strGPUBuffer = wxString(buf, wxConvUTF8);
         }
 
         appName->Printf(
@@ -937,10 +936,17 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
     CMainDocument*      pDoc = wxGetApp().GetDocument();
     CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple();
 
+    static bool bAlreadyRunning = false;
+
     wxASSERT(pDoc);
     wxASSERT(pSkinSimple);
     wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple));
     
+    if (bAlreadyRunning) {
+        return;
+    }
+    bAlreadyRunning = true;
+    
     count = m_TaskSelectionCtrl->GetCount();
 	// Mark all inactive (this lets us loop only once)
     for (i=0; i<count; ++i) {
@@ -1109,6 +1115,9 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
     if (needRefresh) {
         m_TaskSelectionCtrl->Refresh();
     }
+
+    bAlreadyRunning = false;
+
     wxLogTrace(wxT("Function Start/End"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Function End"));
 }
 
diff --git a/clientgui/wizardex.cpp b/clientgui/wizardex.cpp
index f7be40f..38cfb0e 100644
--- a/clientgui/wizardex.cpp
+++ b/clientgui/wizardex.cpp
@@ -8,7 +8,7 @@
 //              3) Fixed ShowPage() bug on displaying bitmaps
 //              Robert Vazan (sizers)
 // Created:     15.08.99
-// RCS-ID:      $Id: wizardex.cpp 19603 2009-11-18 17:30:03Z romw $
+// RCS-ID:      $Id$
 // Copyright:   (c) 1999 Vadim Zeitlin <zeitlin at dptmaths.ens-cachan.fr>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/clientgui/wizardex.h b/clientgui/wizardex.h
index 822f1f8..b89e65d 100644
--- a/clientgui/wizardex.h
+++ b/clientgui/wizardex.h
@@ -9,7 +9,7 @@
 //              Added wxWIZARD_HELP event
 //              Robert Vazan (sizers)
 // Created:     15.08.99
-// RCS-ID:      $Id: wizardex.h 19588 2009-11-17 19:19:50Z romw $
+// RCS-ID:      $Id$
 // Copyright:   (c) 1999 Vadim Zeitlin <zeitlin at dptmaths.ens-cachan.fr>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/clientscr/Makefile.am b/clientscr/Makefile.am
index 7115ea7..51ed3cd 100644
--- a/clientscr/Makefile.am
+++ b/clientscr/Makefile.am
@@ -3,6 +3,7 @@
 
 include $(top_srcdir)/Makefile.incl
 
+AM_LDFLAGS += -lpthread
 if ENABLE_CLIENT_RELEASE
   AM_LDFLAGS += -static-libtool-libs
 ## for an entirely statically linked library, you may want to try
diff --git a/clientscr/progress/win/x64/boincscr.exe b/clientscr/progress/win/x64/boincscr.exe
new file mode 100644
index 0000000..b2357e2
Binary files /dev/null and b/clientscr/progress/win/x64/boincscr.exe differ
diff --git a/clientscr/progress/win/x86/boincscr.exe b/clientscr/progress/win/x86/boincscr.exe
new file mode 100644
index 0000000..3bd9de6
Binary files /dev/null and b/clientscr/progress/win/x86/boincscr.exe differ
diff --git a/clientscr/screensaver_x11.cpp b/clientscr/screensaver_x11.cpp
index a2e2649..2075f2a 100644
--- a/clientscr/screensaver_x11.cpp
+++ b/clientscr/screensaver_x11.cpp
@@ -23,7 +23,7 @@
 //
 // GL:  boincscr -root  \n\
 //
-// If your BOINC directory differs from /var/lib/boinc, you can use
+// If your BOINC directory differs from /var/lib/boinc-client, you can use
 // the -boinc_dir command line argument.
 //
 // When run, this screensaver connects to the BOINC client via RPC, asks for
@@ -63,8 +63,7 @@ extern "C" {
     It shows the text "screensaver loading" when redrwan.
     A client window may be xembedded into it, which will also be resized.
 */
-class scr_window
-{
+class scr_window {
 private:
   /// X server connection
   xcb_connection_t *con;
@@ -94,17 +93,15 @@ private:
   /// Small helper function to convert std::string to xcb_char2b_t*
   /** Remember to delete[] the returned string.
    */
-  xcb_char2b_t *char2b(std::string str)
-  {
+  xcb_char2b_t *char2b(std::string str) {
     xcb_char2b_t *s = new xcb_char2b_t[str.size()];
     if(!s) return NULL;
-    for(int c = 0; c < str.size(); c++)
-      {
+    for(int c = 0; c < str.size(); c++) {
         s[c].byte1 = '\0';
         s[c].byte2 = str[c];
-      }
+    }
     return s;
-  }
+}
 
 public:
   /// Constructs the screensaver window.
@@ -124,28 +121,24 @@ public:
     if(!parent) parent = scr->root;
 
     // use parent window size when not in windowed mode
-    if(!windowed)
-      {
-	xcb_get_geometry_cookie_t geo_cookie = xcb_get_geometry(con, parent);
-	xcb_get_geometry_reply_t *reply =
-	  xcb_get_geometry_reply(con, geo_cookie, &error);
-	if(error)
-	  {
-	    std::cerr << "Could not get parent window geometry." << std::endl;
-	    exit(1);
-	  }
-	width = reply->width;
-	height = reply->height;
-	free(reply);
-      }
-    else // use some defaults in windowed mode
-      {
-	width = 640;
-	height = 480;
-      }
+    if(!windowed) {
+        xcb_get_geometry_cookie_t geo_cookie = xcb_get_geometry(con, parent);
+        xcb_get_geometry_reply_t *reply =
+          xcb_get_geometry_reply(con, geo_cookie, &error);
+        if(error) {
+            std::cerr << "Could not get parent window geometry." << std::endl;
+            exit(1);
+        }
+        width = reply->width;
+        height = reply->height;
+        free(reply);
+    } else {
+        // use some defaults in windowed mode
+        width = 640;
+        height = 480;
+    }
 
-    if(windowed)
-      {
+    if(windowed) {
         // create a black maybe override-redirected window
         // and register for expose and resize events.
         mask = XCB_CW_BACK_PIXEL | XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK;
@@ -153,23 +146,22 @@ public:
         values[1] = !windowed; // only if in fullscreen mode, otherwise normal window
         values[2] = XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY;
         win = xcb_generate_id(con);
-        cookie = xcb_create_window_checked(con, XCB_COPY_FROM_PARENT, win,
-                                           parent, 0, 0, width, height, 0,
-                                           XCB_WINDOW_CLASS_INPUT_OUTPUT,
-                                           scr->root_visual, mask, values);
+        cookie = xcb_create_window_checked(
+            con, XCB_COPY_FROM_PARENT, win,
+            parent, 0, 0, width, height, 0,
+            XCB_WINDOW_CLASS_INPUT_OUTPUT,
+            scr->root_visual, mask, values
+        );
         error = xcb_request_check(con, cookie);
-        if(error)
-          {
+        if(error) {
             std::cerr << "Could not create window." << std::endl;
             exit(1);
-          }
+        }
 
         // map the window on the screen
         xcb_map_window(con, win);
         xcb_flush(con);
-      }
-    else
-      {
+    } else {
         // directly use the parent window
         win = parent;
 
@@ -181,12 +173,11 @@ public:
           xcb_change_window_attributes(con, win, mask, values);
 
         xcb_generic_error_t *error = xcb_request_check(con, cookie);
-        if(error)
-          {
+        if(error) {
             std::cerr << "Could not configure window." << std::endl;
             exit(1);
-          }
-      } 
+        }
+    } 
 
     // open a font. "fixed" should hopefully be available everywhere
     font = xcb_generate_id(con);
@@ -194,11 +185,10 @@ public:
     cookie = xcb_open_font_checked(con, font, font_name.size(),
                                    font_name.c_str());
     error = xcb_request_check(con, cookie);
-    if(error)
-      {
+    if(error) {
         std::cerr << "Could not open font " << font_name << "." << std::endl;
         exit(1);
-      }
+    }
 
     // allocate white text graphics context with above font
     txt_gc = xcb_generate_id(con);
@@ -207,30 +197,26 @@ public:
     values[1] = font;
     cookie = xcb_create_gc_checked(con, txt_gc, win, mask, values);
     error = xcb_request_check(con, cookie);
-    if(error)
-      {
+    if(error) {
         std::cerr << "Could not create graphics context." << std::endl;
         exit(1);
-      }
+    }
   }
 
   /// Destructor
-  ~scr_window()
-  {
+  ~scr_window() {
     // clean up
     xcb_unmap_window(con, win);
     xcb_destroy_window(con, win);
   }
 
   /// Returns the window id.
-  xcb_window_t get_window_id()
-  {
+  xcb_window_t get_window_id() {
     return win;
   }
 
   /// Sets the text to be drawn
-  void set_text(std::string txt)
-  {
+  void set_text(std::string txt) {
     text = txt;
     redraw();
   }
@@ -239,8 +225,7 @@ public:
   /** Draws a black background with white text.
       Should be calld when an expose event is received.
   */
-  void redraw()
-  {
+  void redraw() {
     // convert the text to be displayed.
     xcb_char2b_t *str = char2b(text);
 
@@ -269,14 +254,12 @@ public:
   /// Notifies the window on resizes and resizes the client, if any.
   /** Should be called when a configure notify event is received.
    */
-  void resize(uint16_t w, uint16_t h)
-  {
+  void resize(uint16_t w, uint16_t h) {
     width = w;
     height = h;
     
     // resize client window, if any.
-    if(client_win)
-      {
+    if(client_win) {
         // moving the client back to (0, 0) is required when maximizing
         uint32_t values[4] = { 0, 0, width, height };
         uint32_t mask = XCB_CONFIG_WINDOW_X |XCB_CONFIG_WINDOW_Y |
@@ -289,13 +272,12 @@ public:
           {
             std::cerr << "Could not resize client." << std::endl;
             exit(1);
-          }
-      }
-  }
+        }
+    }
+}
 
   /// Xembeds a X window
-  void xembed(xcb_window_t client)
-  {
+  void xembed(xcb_window_t client) {
     client_win = client;
     uint32_t values[4];
     uint32_t mask;
@@ -310,21 +292,19 @@ public:
     cookie = xcb_configure_window_checked(con, client_win, mask, values);
 
     error = xcb_request_check(con, cookie);
-    if(error)
-      {
+    if(error) {
         std::cerr << "Could not change client attributes." << std::endl;
         exit(1);
-      }
+    }
 
     // reparent client
     cookie = xcb_reparent_window_checked(con, client_win, win, 0, 0);
 
     error = xcb_request_check(con, cookie);
-    if(error)
-      {
+    if(error) {
         std::cerr << "Could not reparent client." << std::endl;
         exit(1);
-      }
+    }
     
     // move and resize client window
     values[0] = 0;
@@ -336,11 +316,10 @@ public:
     cookie = xcb_configure_window_checked(con, client_win, mask, values);
 
     error = xcb_request_check(con, cookie);
-    if(error)
-      {
+    if(error) {
         std::cerr << "Could not resize client." << std::endl;
         exit(1);
-      }
+    }
 
     // make client overwrite-redirected
     values[0] = true;
@@ -348,11 +327,10 @@ public:
     cookie = xcb_change_window_attributes(con, client_win, mask, values);
 
     error = xcb_request_check(con, cookie);
-    if(error)
-      {
+    if(error) {
         std::cerr << "Could not change client attributes." << std::endl;
         exit(1);
-      }
+    }
   }
 };
 
@@ -360,15 +338,12 @@ xcb_connection_t *con;
 scr_window *window;
 
 /// X event loop
-void *event_loop(void*)
-{
+void *event_loop(void*) {
   xcb_generic_event_t *event;
 
   // wait for X events and process them
-  while((event = xcb_wait_for_event(con)))
-    {
-      switch(event->response_type & ~0x80)
-        {
+  while((event = xcb_wait_for_event(con))) {
+      switch(event->response_type & ~0x80) {
         case XCB_EXPOSE:
           {
             xcb_expose_event_t *expose_event
@@ -376,7 +351,7 @@ void *event_loop(void*)
             
             // ignore the expose event, if there are more waiting.
             if(!expose_event->count && window && window->get_window_id() ==
-	       expose_event->window) window->redraw();
+               expose_event->window) window->redraw();
             break;
           }
         case XCB_CONFIGURE_NOTIFY:
@@ -395,27 +370,25 @@ void *event_loop(void*)
           break;
         }
       free(event);
-    }
-  pthread_exit(0);
+   }
+   pthread_exit(0);
 }
 
 /// Program entry point.
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
   unsigned long int window_id = 0;
   bool windowed = true;
-  std::string boinc_wd = "/var/lib/boinc";
+  std::string boinc_wd = "/var/lib/boinc-client";
 
   // parse command line
-  for(int c = 0; c < argc; c++)
-    {
+  for(int c = 0; c < argc; c++) {
       std::string option = argv[c];
       if(option == "-window-id" && argv[c+1])
-	sscanf(argv[++c], "%lx", &window_id);
+        sscanf(argv[++c], "%lx", &window_id);
       else if(option == "-root")
-	windowed = false;
+        windowed = false;
       else if (option == "-window")
-	windowed = true;
+        windowed = true;
       else if (option == "-boinc_dir")
         if(argv[++c])
           boinc_wd = argv[c];
@@ -423,30 +396,27 @@ int main(int argc, char *argv[])
 
   // if no -window-id command line argument is given,
   // look for the XSCREENSAVER_WINDOW environment variable
-  if(!window_id)
-    {
+  if(!window_id) {
       char *xssw = getenv("XSCREENSAVER_WINDOW");
-      if(xssw && *xssw)
-        {
+      if(xssw && *xssw) {
           unsigned long int id = 0;
           char c;
           if (sscanf(xssw, "0x%lx %c", &id, &c) == 1 ||
               sscanf(xssw, "%lu %c", &id, &c) == 1)
             window_id = id;
-        }
-    }
+      }
+  }
 
   // connect to the X server using $DISPLAY
   int screen_num = 0;
   con = xcb_connect(NULL, &screen_num);
 
-  if(!con)
-    {
+  if(!con) {
       std::cerr << "Cannot connect to your X server." << std::endl
                 << "Please check if it's running and whether your DISPLAY "
                 << "environment variable is set correctly." << std::endl;
       return 1;
-    }
+   }
 
   // get default screen
   xcb_screen_t *screen;
@@ -460,37 +430,33 @@ int main(int argc, char *argv[])
 
   // start the X event loop
   pthread_t thread;
-  if(pthread_create(&thread, NULL, event_loop, NULL))
-    {
+  if(pthread_create(&thread, NULL, event_loop, NULL)) {
       std::cerr << "Could not create a thread." << std::endl;
       exit(1);
-    }
+  }
 
   // try to connect
   RPC_CLIENT *rpc = new RPC_CLIENT;
-  if(rpc->init(NULL))
-    {
+  if(rpc->init(NULL)) {
       window->set_text("boinc not running");
       pthread_join(thread, NULL);
       return 0;
-    }
+  }
 
   // get results that support graphics
   RESULTS results;
-  while(true)
-    {
+  while(true) {
       int suspend_reason = 0;
       rpc->get_screensaver_tasks(suspend_reason, results);
       if(results.results.empty()) sleep(10);
       else break;
-    }
+  }
 
   srandom(time(NULL));
   std::string graphics_cmd = "graphics_app";
   // the loop skips projects that do not yet
   // support the graphics_app soft link.
-  while(graphics_cmd == "graphics_app")
-    {
+  while(graphics_cmd == "graphics_app") {
       // select a random result
       int n = random() % results.results.size();
       RESULT *result = results.results[n];
@@ -499,83 +465,79 @@ int main(int argc, char *argv[])
       std::stringstream stream;
       stream << boinc_wd << "/slots/" << result->slot << "/";
       std::string slot_dir = stream.str();
-      if(chdir(slot_dir.c_str()))
-        {
+      if(chdir(slot_dir.c_str())) {
           perror("chdir");
           exit(1);
-        }
+      }
 
       // resolve graphics_app soft link
       boinc_resolve_filename_s(graphics_cmd.c_str(), graphics_cmd);
-    }
+  }
 
   // fork and...
   pid_t pid = fork();
-  if(pid == -1)
-    {
+  if(pid == -1) {
       perror("fork");
       exit(1);
-    }
+  }
 
   // ...spawn graphics app
   if(!pid) // child
-    if(execl(graphics_cmd.c_str(), graphics_cmd.c_str(), NULL))
-      {
+    if(execl(graphics_cmd.c_str(), graphics_cmd.c_str(), NULL)) {
         perror("exec");
         exit(1);
-      }
+    }
 
   // look for our graphics app
   // do this 10 times, every 1/2 seconds, then give up.
+  //
   xcb_window_t client = 0;
-  for(int n = 0; n < 10; n++)
-    {
+  for(int n = 0; n < 10; n++) {
       // get list of x clients
-      xcb_atom_t NET_CLIENT_LIST = xcb_atom_get(con, "_NET_CLIENT_LIST");
+      xcb_intern_atom_cookie_t cookie0=xcb_intern_atom(
+            con, 0, strlen("_NET_CLIENT_LIST"), "_NET_CLIENT_LIST"
+      );
+      xcb_intern_atom_reply_t *reply0=xcb_intern_atom_reply(con, cookie0, NULL);
+
       xcb_get_property_cookie_t cookie =
-        xcb_get_property(con, 0, screen->root, NET_CLIENT_LIST, WINDOW, 0,
-                        std::numeric_limits<uint32_t>::max());
+        xcb_get_property(con, 0, screen->root, reply0->atom, XCB_ATOM_WINDOW, 0,
+                         std::numeric_limits<uint32_t>::max());
 
       xcb_generic_error_t  *error;
       xcb_get_property_reply_t *reply =
         xcb_get_property_reply(con, cookie, &error);
-      if(error)
-        {
+      if(error) {
           std::cerr << "Could not get client list." << std::endl;
           exit(1);
-        }
+      }
 
       xcb_window_t *clients =
         static_cast<xcb_window_t*>(xcb_get_property_value(reply));
 
       // check if one of them is our graphics app
-      for(int c = 0; c < reply->length; c++)
-        {
+      for(int c = 0; c < reply->length; c++) {
           xcb_get_property_reply_t *reply2;
 
           // check WM_COMMAND
-          cookie = xcb_get_property(con, 0, clients[c], WM_COMMAND, STRING,
+          cookie = xcb_get_property(con, 0, clients[c], XCB_ATOM_WM_COMMAND, XCB_ATOM_STRING,
                                     0, std::numeric_limits<uint32_t>::max());
           reply2 = xcb_get_property_reply(con, cookie, &error);
-          if(!error) // ignore errors
-            {
+          if(!error) {  // ignore errors 
               char *command = static_cast<char*>(xcb_get_property_value(reply2));
       
-              if(command && graphics_cmd == command)
-                {
+              if(command && graphics_cmd == command) {
                   client = clients[c];
                   break;
-                }
+              }
 
               free(reply2);
-            }
+          }
 
           // check WM_CLASS
-          cookie = xcb_get_property(con, 0, clients[c], WM_CLASS, STRING,
+          cookie = xcb_get_property(con, 0, clients[c], XCB_ATOM_WM_CLASS, XCB_ATOM_STRING,
                                     0, std::numeric_limits<uint32_t>::max());
           reply2 = xcb_get_property_reply(con, cookie, &error);
-          if(!error) // ignore errors
-            {
+          if(!error) {  // ignore errors 
               char *clas = static_cast<char*>(xcb_get_property_value(reply2));
 
               size_t pos = graphics_cmd.find_last_of('/');
@@ -583,25 +545,24 @@ int main(int argc, char *argv[])
               if(pos == std::string::npos) executable = graphics_cmd;
               else executable = graphics_cmd.substr(pos + 1);
 
-              if(clas && executable == clas)
-                {
+              if(clas && executable == clas) {
                   client = clients[c];
                   break;
                 }
               
               free(reply2);
-            }
+          }
 
           // More checks are possible, but a single method for all graphics
           // applications would be preferred, such as WM_CLASS = "BOINC".
-        }
+      }
 
       free(reply);
 
       if(client) break;
 
       usleep(500000);
-    }
+  }
 
   // if the client window was found, xembed it
   if(client)
diff --git a/configure.ac b/configure.ac
index 2f62716..37ba36d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,12 +1,12 @@
 dnl -*- autoconf -*-
 
-dnl $Id: configure.ac 26100 2012-09-12 22:12:12Z romw $
+dnl $Id$
 
 dnl not sure exactly what the minimum version is (but 2.13 wont work)
 AC_PREREQ(2.58)
 
 dnl Set the BOINC version here.  You can also use the set-version script.
-AC_INIT(BOINC, 7.0.36)
+AC_INIT(BOINC, 7.0.38)
 AC_CONFIG_MACRO_DIR([m4])
 LIBBOINC_VERSION=`echo ${PACKAGE_VERSION} | sed 's/\./:/g'`
 AC_SUBST([LIBBOINC_VERSION])
@@ -19,8 +19,8 @@ AM_INIT_AUTOMAKE(dist-zip)
 
 AC_CONFIG_SRCDIR(lib/shmem.cpp)
 
-AC_REVISION([$Revision: 26100 $]) 
-REV=`echo '$Revision: 26100 $' | awk "{print $2}"`
+AC_REVISION([$Revision$]) 
+REV=`echo '$Revision$' | awk "{print $2}"`
 RDATE=`date '+%Y.%m.%d'`
 if test -d .svn ; then
   REV=`svn info | grep Revision | awk '{print $2}'`
diff --git a/coprocs/NVIDIA/include/nvapi.h b/coprocs/NVIDIA/include/nvapi.h
new file mode 100644
index 0000000..f771221
--- /dev/null
+++ b/coprocs/NVIDIA/include/nvapi.h
@@ -0,0 +1,1915 @@
+ /***************************************************************************\
+|*                                                                           *|
+|*      Copyright 2005-2008 NVIDIA Corporation.  All rights reserved.        *|
+|*                                                                           *|     
+|*   NOTICE TO USER:                                                         *|                 
+|*                                                                           *|
+|*   This source code is subject to NVIDIA ownership rights under U.S.       *|
+|*   and international Copyright laws.  Users and possessors of this         *| 
+|*   source code are hereby granted a nonexclusive, royalty-free             *|
+|*   license to use this code in individual and commercial software.         *|
+|*                                                                           *|
+|*   NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE     *|
+|*   CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR         *|
+|*   IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH      *|
+|*   REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF         *|
+|*   MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR          *|
+|*   PURPOSE. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL,            *|
+|*   INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES          *|
+|*   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN      *|
+|*   AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING     *|
+|*   OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE      *| 
+|*   CODE.                                                                   *|
+|*                                                                           *|
+|*   U.S. Government End Users. This source code is a "commercial item"      *|
+|*   as that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting       *|
+|*   of "commercial computer  software" and "commercial computer software    *|
+|*   documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)   *|
+|*   and is provided to the U.S. Government only as a commercial end item.   *|
+|*   Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through        *|
+|*   227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the       *|
+|*   source code with only those rights set forth herein.                    *|
+|*                                                                           *|
+|*   Any use of this source code in individual and commercial software must  *| 
+|*   include, in the user documentation and internal comments to the code,   *| 
+|*   the above Disclaimer and U.S. Government End Users Notice.              *|
+|*                                                                           *|
+|*                                                                           *|
+ \***************************************************************************/
+///////////////////////////////////////////////////////////////////////////////
+//
+// Date: Aug 24, 2008
+// File: nvapi.h
+//
+// NvAPI provides an interface to NVIDIA devices. This file contains the 
+// interface constants, structure definitions and function prototypes.
+//
+// Target Profile: developer
+// Target OS-Arch: windows
+//
+///////////////////////////////////////////////////////////////////////////////
+#ifndef _NVAPI_H
+#define _NVAPI_H
+
+#pragma pack(push,8) // Make sure we have consistent structure packings
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ====================================================
+// Universal NvAPI Definitions
+// ====================================================
+#ifndef _WIN32
+#define __cdecl
+#endif
+
+#define NVAPI_INTERFACE extern NvAPI_Status __cdecl 
+
+/* 64-bit types for compilers that support them, plus some obsolete variants */
+#if defined(__GNUC__) || defined(__arm) || defined(__IAR_SYSTEMS_ICC__) || defined(__ghs__) || defined(_WIN64)
+typedef unsigned long long NvU64; /* 0 to 18446744073709551615          */
+#else
+typedef unsigned __int64   NvU64; /* 0 to 18446744073709551615              */
+#endif
+
+// mac os 32-bit still needs this
+#if (defined(macintosh) || defined(__APPLE__)) && !defined(__LP64__)
+typedef signed long        NvS32; /* -2147483648 to 2147483647               */
+#else
+typedef signed int         NvS32; /* -2147483648 to 2147483647               */
+#endif
+
+typedef unsigned long    NvU32;
+typedef unsigned short   NvU16;
+typedef unsigned char    NvU8;
+
+#define NV_DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
+
+// NVAPI Handles - These handles are retrieved from various calls and passed in to others in NvAPI
+//                 These are meant to be opaque types.  Do not assume they correspond to indices, HDCs,
+//                 display indexes or anything else.
+//
+//                 Most handles remain valid until a display re-configuration (display mode set) or GPU
+//                 reconfiguration (going into or out of SLI modes) occurs.  If NVAPI_HANDLE_INVALIDATED
+//                 is received by an app, it should discard all handles, and re-enumerate them.
+//
+NV_DECLARE_HANDLE(NvDisplayHandle);            // Display Device driven by NVIDIA GPU(s) (an attached display)
+NV_DECLARE_HANDLE(NvUnAttachedDisplayHandle);  // Unattached Display Device driven by NVIDIA GPU(s)
+NV_DECLARE_HANDLE(NvLogicalGpuHandle);         // One or more physical GPUs acting in concert (SLI)
+NV_DECLARE_HANDLE(NvPhysicalGpuHandle);        // A single physical GPU
+NV_DECLARE_HANDLE(NvEventHandle);              // A handle to an event registration instance
+
+#define NVAPI_DEFAULT_HANDLE        0
+
+#define NVAPI_GENERIC_STRING_MAX    4096
+#define NVAPI_LONG_STRING_MAX       256
+#define NVAPI_SHORT_STRING_MAX      64
+
+typedef struct 
+{
+    NvS32   sX;
+    NvS32   sY;
+    NvS32   sWidth;
+    NvS32   sHeight;
+} NvSBox;
+
+#define NVAPI_MAX_PHYSICAL_GPUS             64
+#define NVAPI_MAX_LOGICAL_GPUS              64
+#define NVAPI_MAX_AVAILABLE_GPU_TOPOLOGIES  256
+#define NVAPI_MAX_GPU_TOPOLOGIES            NVAPI_MAX_PHYSICAL_GPUS
+#define NVAPI_MAX_GPU_PER_TOPOLOGY          8
+#define NVAPI_MAX_DISPLAY_HEADS             2
+#define NVAPI_MAX_DISPLAYS                  NVAPI_MAX_PHYSICAL_GPUS * NVAPI_MAX_DISPLAY_HEADS
+
+#define NV_MAX_HEADS        4   // Maximum heads, each with NVAPI_DESKTOP_RES resolution
+#define NV_MAX_VID_STREAMS  4   // Maximum input video streams, each with a NVAPI_VIDEO_SRC_INFO
+#define NV_MAX_VID_PROFILES 4   // Maximum output video profiles supported
+
+typedef char NvAPI_String[NVAPI_GENERIC_STRING_MAX];
+typedef char NvAPI_LongString[NVAPI_LONG_STRING_MAX];
+typedef char NvAPI_ShortString[NVAPI_SHORT_STRING_MAX];
+
+// =========================================================================================
+// NvAPI Version Definition
+// Maintain per structure specific version define using the MAKE_NVAPI_VERSION macro.
+// Usage: #define NV_GENLOCK_STATUS_VER  MAKE_NVAPI_VERSION(NV_GENLOCK_STATUS, 1)
+// =========================================================================================
+#define MAKE_NVAPI_VERSION(typeName,ver) (NvU32)(sizeof(typeName) | ((ver)<<16))
+#define GET_NVAPI_VERSION(ver) (NvU32)((ver)>>16)
+#define GET_NVAPI_SIZE(ver) (NvU32)((ver) & 0xffff)
+
+// ====================================================
+// NvAPI Status Values
+//    All NvAPI functions return one of these codes.
+// ====================================================
+
+
+typedef enum 
+{
+    NVAPI_OK                                    =  0,      // Success
+    NVAPI_ERROR                                 = -1,      // Generic error
+    NVAPI_LIBRARY_NOT_FOUND                     = -2,      // nvapi.dll can not be loaded
+    NVAPI_NO_IMPLEMENTATION                     = -3,      // not implemented in current driver installation
+    NVAPI_API_NOT_INTIALIZED                    = -4,      // NvAPI_Initialize has not been called (successfully)
+    NVAPI_INVALID_ARGUMENT                      = -5,      // invalid argument
+    NVAPI_NVIDIA_DEVICE_NOT_FOUND               = -6,      // no NVIDIA display driver was found
+    NVAPI_END_ENUMERATION                       = -7,      // no more to enum
+    NVAPI_INVALID_HANDLE                        = -8,      // invalid handle
+    NVAPI_INCOMPATIBLE_STRUCT_VERSION           = -9,      // an argument's structure version is not supported
+    NVAPI_HANDLE_INVALIDATED                    = -10,     // handle is no longer valid (likely due to GPU or display re-configuration)
+    NVAPI_OPENGL_CONTEXT_NOT_CURRENT            = -11,     // no NVIDIA OpenGL context is current (but needs to be)
+    NVAPI_NO_GL_EXPERT                          = -12,     // OpenGL Expert is not supported by the current drivers
+    NVAPI_INSTRUMENTATION_DISABLED              = -13,     // OpenGL Expert is supported, but driver instrumentation is currently disabled
+    NVAPI_EXPECTED_LOGICAL_GPU_HANDLE           = -100,    // expected a logical GPU handle for one or more parameters
+    NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE          = -101,    // expected a physical GPU handle for one or more parameters
+    NVAPI_EXPECTED_DISPLAY_HANDLE               = -102,    // expected an NV display handle for one or more parameters
+    NVAPI_INVALID_COMBINATION                   = -103,    // used in some commands to indicate that the combination of parameters is not valid
+    NVAPI_NOT_SUPPORTED                         = -104,    // Requested feature not supported in the selected GPU
+    NVAPI_PORTID_NOT_FOUND                      = -105,    // NO port ID found for I2C transaction
+    NVAPI_EXPECTED_UNATTACHED_DISPLAY_HANDLE    = -106,    // expected an unattached display handle as one of the input param
+    NVAPI_INVALID_PERF_LEVEL                    = -107,    // invalid perf level 
+    NVAPI_DEVICE_BUSY                           = -108,    // device is busy, request not fulfilled
+    NVAPI_NV_PERSIST_FILE_NOT_FOUND             = -109,    // NV persist file is not found
+    NVAPI_PERSIST_DATA_NOT_FOUND                = -110,    // NV persist data is not found
+    NVAPI_EXPECTED_TV_DISPLAY                   = -111,    // expected TV output display
+    NVAPI_EXPECTED_TV_DISPLAY_ON_DCONNECTOR     = -112,    // expected TV output on D Connector - HDTV_EIAJ4120.
+    NVAPI_NO_ACTIVE_SLI_TOPOLOGY                = -113,    // SLI is not active on this device
+    NVAPI_SLI_RENDERING_MODE_NOTALLOWED         = -114,    // setup of SLI rendering mode is not possible right now
+    NVAPI_EXPECTED_DIGITAL_FLAT_PANEL           = -115,    // expected digital flat panel
+    NVAPI_ARGUMENT_EXCEED_MAX_SIZE              = -116,    // argument exceeds expected size
+    NVAPI_DEVICE_SWITCHING_NOT_ALLOWED          = -117,    // inhibit ON due to one of the flags in NV_GPU_DISPLAY_CHANGE_INHIBIT or SLI Active
+    NVAPI_TESTING_CLOCKS_NOT_SUPPORTED          = -118,    // testing clocks not supported
+    NVAPI_UNKNOWN_UNDERSCAN_CONFIG              = -119,    // the specified underscan config is from an unknown source (e.g. INF)
+    NVAPI_TIMEOUT_RECONFIGURING_GPU_TOPO        = -120,    // timeout while reconfiguring GPUs
+    NVAPI_DATA_NOT_FOUND                        = -121,    // Requested data was not found
+    NVAPI_EXPECTED_ANALOG_DISPLAY               = -122,    // expected analog display
+    NVAPI_NO_VIDLINK                            = -123,    // No SLI video bridge present
+    NVAPI_REQUIRES_REBOOT                       = -124,    // NVAPI requires reboot for its settings to take effect
+    NVAPI_INVALID_HYBRID_MODE                   = -125,    // the function is not supported with the current hybrid mode.
+    NVAPI_MIXED_TARGET_TYPES                    = -126,    // The target types are not all the same
+    NVAPI_SYSWOW64_NOT_SUPPORTED                = -127,    // the function is not supported from 32-bit on a 64-bit system
+    NVAPI_IMPLICIT_SET_GPU_TOPOLOGY_CHANGE_NOT_ALLOWED = -128,    //there is any implicit GPU topo active. Use NVAPI_SetHybridMode to change topology.
+    NVAPI_REQUEST_USER_TO_CLOSE_NON_MIGRATABLE_APPS = -129,      //Prompt the user to close all non-migratable apps.    
+    NVAPI_OUT_OF_MEMORY                         = -130,    // Could not allocate sufficient memory to complete the call
+    NVAPI_WAS_STILL_DRAWING                     = -131,    // The previous operation that is transferring information to or from this surface is incomplete
+    NVAPI_FILE_NOT_FOUND                        = -132,    // The file was not found
+    NVAPI_TOO_MANY_UNIQUE_STATE_OBJECTS         = -133,    // There are too many unique instances of a particular type of state object
+    NVAPI_INVALID_CALL                          = -134,    // The method call is invalid. For example, a method's parameter may not be a valid pointer
+    NVAPI_D3D10_1_LIBRARY_NOT_FOUND             = -135,    // d3d10_1.dll can not be loaded
+    NVAPI_FUNCTION_NOT_FOUND                    = -136,    // Couldn't find the function in loaded dll library
+} NvAPI_Status;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_Initialize
+//
+//   DESCRIPTION: Initializes NVAPI library. This must be called before any 
+//                other NvAPI_ function.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_ERROR            Something is wrong during the initialization process (generic error)
+//                NVAPI_LIBRARYNOTFOUND  Can not load nvapi.dll
+//                NVAPI_OK                  Initialized
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_Initialize();
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetErrorMessage
+//
+//   DESCRIPTION: converts an NvAPI error code into a null terminated string
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: null terminated string (always, never NULL)
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetErrorMessage(NvAPI_Status nr,NvAPI_ShortString szDesc);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetInterfaceVersionString
+//
+//   DESCRIPTION: Returns a string describing the version of the NvAPI library.
+//                Contents of the string are human readable.  Do not assume a fixed
+//                format.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: User readable string giving info on NvAPI's version
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetInterfaceVersionString(NvAPI_ShortString szDesc);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetDisplayDriverVersion
+//
+//   DESCRIPTION: Returns a struct that describes aspects of the display driver
+//                build.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_ERROR or NVAPI_OK
+//
+///////////////////////////////////////////////////////////////////////////////
+typedef struct 
+{
+    NvU32              version;             // Structure version
+    NvU32              drvVersion;           
+    NvU32              bldChangeListNum;     
+    NvAPI_ShortString  szBuildBranchString; 
+    NvAPI_ShortString  szAdapterString;
+} NV_DISPLAY_DRIVER_VERSION;
+#define NV_DISPLAY_DRIVER_VERSION_VER  MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_VERSION,1)
+NVAPI_INTERFACE NvAPI_GetDisplayDriverVersion(NvDisplayHandle hNvDisplay, NV_DISPLAY_DRIVER_VERSION *pVersion);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_EnumNvidiaDisplayHandle
+//
+//   DESCRIPTION: Returns the handle of the NVIDIA display specified by the enum 
+//                index (thisEnum). The client should keep enumerating until it
+//                returns NVAPI_END_ENUMERATION.
+//
+//                Note: Display handles can get invalidated on a modeset, so the calling applications need to 
+//                renum the handles after every modeset.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: either the handle pointer is NULL or enum index too big
+//                NVAPI_OK: return a valid NvDisplayHandle based on the enum index
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA device found in the system
+//                NVAPI_END_ENUMERATION: no more display device to enumerate.
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_EnumNvidiaDisplayHandle(NvU32 thisEnum, NvDisplayHandle *pNvDispHandle);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_EnumNvidiaUnAttachedDisplayHandle
+//
+//   DESCRIPTION: Returns the handle of the NVIDIA UnAttached display specified by the enum 
+//                index (thisEnum). The client should keep enumerating till it
+//                return error.
+//
+//                Note: Display handles can get invalidated on a modeset, so the calling applications need to 
+//                renum the handles after every modeset.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: either the handle pointer is NULL or enum index too big
+//                NVAPI_OK: return a valid NvDisplayHandle based on the enum index
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA device found in the system
+//                NVAPI_END_ENUMERATION: no more display device to enumerate.
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_EnumNvidiaUnAttachedDisplayHandle(NvU32 thisEnum, NvUnAttachedDisplayHandle *pNvUnAttachedDispHandle);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_EnumPhysicalGPUs
+//
+//   DESCRIPTION: Returns an array of physical GPU handles.
+//
+//                Each handle represents a physical GPU present in the system.
+//                That GPU may be part of a SLI configuration, or not be visible to the OS directly.
+//
+//                At least 1 GPU must be present in the system and running an NV display driver.
+//
+//                The array nvGPUHandle will be filled with physical GPU handle values.  The returned
+//                gpuCount determines how many entries in the array are valid.
+//
+//                Note: In drivers older than 105.00, all physical GPU handles get invalidated on a modeset. So the calling applications 
+//                      need to renum the handles after every modeset. 
+//                      With drivers 105.00 and up all physical GPU handles are constant.
+//                      Physical GPU handles are constant as long as the GPUs are not physically moved and the SBIOS VGA order is unchanged.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: nvGPUHandle or pGpuCount is NULL
+//                NVAPI_OK: one or more handles were returned
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_EnumPhysicalGPUs(NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_EnumLogicalGPUs
+//
+//   DESCRIPTION: Returns an array of logical GPU handles.
+//
+//                Each handle represents one or more GPUs acting in concert as a single graphics device.
+//
+//                At least 1 GPU must be present in the system and running an NV display driver.
+//
+//                The array nvGPUHandle will be filled with logical GPU handle values.  The returned
+//                gpuCount determines how many entries in the array are valid.
+//
+//                Note: All logical GPUs handles get invalidated on a GPU topology change, so the calling application is required to 
+//                renum the logical GPU handles to get latest physical handle mapping after every GPU topology change activated 
+//                by a call to NvAPI_SetGpuTopologies.
+//
+//                To detect if SLI rendering is enabled please use NvAPI_D3D_GetCurrentSLIState
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: nvGPUHandle or pGpuCount is NULL
+//                NVAPI_OK: one or more handles were returned
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_EnumLogicalGPUs(NvLogicalGpuHandle nvGPUHandle[NVAPI_MAX_LOGICAL_GPUS], NvU32 *pGpuCount);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetPhysicalGPUsFromDisplay
+//
+//   DESCRIPTION: Returns an array of physical GPU handles associated with the specified display.
+//
+//                At least 1 GPU must be present in the system and running an NV display driver.
+//
+//                The array nvGPUHandle will be filled with physical GPU handle values.  The returned
+//                gpuCount determines how many entries in the array are valid.
+//
+//                If the display corresponds to more than one physical GPU, the first GPU returned
+//                is the one with the attached active output.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hNvDisp is not valid; nvGPUHandle or pGpuCount is NULL
+//                NVAPI_OK: one or more handles were returned
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetPhysicalGPUsFromDisplay(NvDisplayHandle hNvDisp, NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetPhysicalGPUFromUnAttachedDisplay
+//
+//   DESCRIPTION: Returns a physical GPU handle associated with the specified unattached display.
+//
+//                At least 1 GPU must be present in the system and running an NV display driver.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hNvUnAttachedDisp is not valid or pPhysicalGpu is NULL.
+//                NVAPI_OK: one or more handles were returned
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetPhysicalGPUFromUnAttachedDisplay(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvPhysicalGpuHandle *pPhysicalGpu);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_CreateDisplayFromUnAttachedDisplay
+//
+//   DESCRIPTION: The unattached display handle is converted to a active attached display handle.
+//
+//                At least 1 GPU must be present in the system and running an NV display driver.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hNvUnAttachedDisp is not valid or pNvDisplay is NULL.
+//                NVAPI_OK: one or more handles were returned
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_CreateDisplayFromUnAttachedDisplay(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvDisplayHandle *pNvDisplay);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetLogicalGPUFromDisplay
+//
+//   DESCRIPTION: Returns the logical GPU handle associated with the specified display.
+//
+//                At least 1 GPU must be present in the system and running an NV display driver.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hNvDisp is not valid; pLogicalGPU is NULL
+//                NVAPI_OK: one or more handles were returned
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetLogicalGPUFromDisplay(NvDisplayHandle hNvDisp, NvLogicalGpuHandle *pLogicalGPU);
+ 
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetLogicalGPUFromPhysicalGPU
+//
+//   DESCRIPTION: Returns the logical GPU handle associated with specified physical GPU handle.
+//
+//                At least 1 GPU must be present in the system and running an NV display driver.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGPU is not valid; pLogicalGPU is NULL
+//                NVAPI_OK: one or more handles were returned
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetLogicalGPUFromPhysicalGPU(NvPhysicalGpuHandle hPhysicalGPU, NvLogicalGpuHandle *pLogicalGPU);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetPhysicalGPUsFromLogicalGPU
+//
+//   DESCRIPTION: Returns the physical GPU handles associated with the specified logical GPU handle.
+//
+//                At least 1 GPU must be present in the system and running an NV display driver.
+//
+//                The array hPhysicalGPU will be filled with physical GPU handle values.  The returned
+//                gpuCount determines how many entries in the array are valid.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hLogicalGPU is not valid; hPhysicalGPU is NULL
+//                NVAPI_OK: one or more handles were returned
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_LOGICAL_GPU_HANDLE: hLogicalGPU was not a logical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetPhysicalGPUsFromLogicalGPU(NvLogicalGpuHandle hLogicalGPU,NvPhysicalGpuHandle hPhysicalGPU[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
+   
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetAssociatedNvidiaDisplayHandle
+//
+//   DESCRIPTION: Returns the handle of the NVIDIA display that is associated
+//                with the display name given.  Eg: "\\DISPLAY1"
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: either argument is NULL
+//                NVAPI_OK: *pNvDispHandle is now valid
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA device maps to that display name
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayHandle(const char *szDisplayName, NvDisplayHandle *pNvDispHandle);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetAssociatedNvidiaDisplayName
+//
+//   DESCRIPTION: Returns the display name given.  Eg: "\\DISPLAY1" using the NVIDIA display handle
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: either argument is NULL
+//                NVAPI_OK: *pNvDispHandle is now valid
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA device maps to that display name
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayName(NvDisplayHandle NvDispHandle, NvAPI_ShortString szDisplayName);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetUnAttachedAssociatedDisplayName
+//
+//   DESCRIPTION: Returns the display name given.  Eg: "\\DISPLAY1" using the NVIDIA unattached display handle
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: either argument is NULL
+//                NVAPI_OK: *pNvDispHandle is now valid
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA device maps to that display name
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetUnAttachedAssociatedDisplayName(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvAPI_ShortString szDisplayName);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_EnableHWCursor
+//
+//   DESCRIPTION: Enable hardware cursor support
+//
+//  SUPPORTED OS: Windows XP
+//
+// RETURN STATUS: NVAPI_ERROR or NVAPI_OK
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_EnableHWCursor(NvDisplayHandle hNvDisplay);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_DisableHWCursor
+//
+//   DESCRIPTION: Disable hardware cursor support
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_ERROR or NVAPI_OK
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_DisableHWCursor(NvDisplayHandle hNvDisplay);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetVBlankCounter
+//
+//   DESCRIPTION: get vblank counter
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_ERROR or NVAPI_OK
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetVBlankCounter(NvDisplayHandle hNvDisplay, NvU32 *pCounter);
+
+///////////////////////////////////////////////////////////////////////////////
+// FUNCTION NAME: NvAPI_SetRefreshRateOverride
+//   DESCRIPTION: Override the refresh rate on the given  display/outputsMask.
+//                The new refresh rate can be applied right away in this API call or deferred to happen with the
+//                next OS modeset. The override is only good for one modeset (doesn't matter it's deferred or immediate).
+//
+//  SUPPORTED OS: Windows XP
+//               
+//
+//         INPUT: hNvDisplay - the NVIDIA display handle. It can be NVAPI_DEFAULT_HANDLE or a handle
+//                             enumerated from NvAPI_EnumNVidiaDisplayHandle().
+//                
+//                outputsMask - a set of bits that identify all target outputs which are associated with the NVIDIA 
+//                              display handle to apply the refresh rate override. Note when SLI is enabled,  the
+//                              outputsMask only applies to the GPU that is driving the display output.
+//
+//                refreshRate - the override value. "0.0" means cancel the override.
+//                              
+//
+//                bSetDeferred - "0": apply the refresh rate override immediately in this API call.
+//                               "1":  apply refresh rate at the next OS modeset.
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hNvDisplay or outputsMask is invalid
+//                NVAPI_OK: the refresh rate override is correct set
+//                NVAPI_ERROR: the operation failed
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_SetRefreshRateOverride(NvDisplayHandle hNvDisplay, NvU32 outputsMask, float refreshRate, NvU32 bSetDeferred);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetAssociatedDisplayOutputId
+//
+//   DESCRIPTION: Gets the active outputId associated with the display handle.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+//    PARAMETERS: hNvDisplay(IN) - NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle().
+//                outputId(OUT)  - The active display output id associated with the selected display handle hNvDisplay.
+//                                 The outputid will have only one bit set. In case of clone or span this  will indicate the display
+//                                 outputId of the primary display that the GPU is driving.
+// RETURN STATUS: NVAPI_OK: call successful.
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found.
+//                NVAPI_EXPECTED_DISPLAY_HANDLE: hNvDisplay is not a valid display handle.
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetAssociatedDisplayOutputId(NvDisplayHandle hNvDisplay, NvU32 *pOutputId);
+
+///////////////////////////////////////////////////////////////////////////////
+// FUNCTION NAME:   NvAPI_GetDisplayPortInfo
+//
+// DESCRIPTION:     This API returns the current DP related into on the specified device(monitor)
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// PARAMETERS:      hNvDisplay(IN) - NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle().
+//                  outputId(IN)   - The display output id. If it's "0" then the default outputId from NvAPI_GetAssociatedDisplayOutputId() will be used.
+//                  pInfo(OUT)     - The display port info
+//
+// RETURN STATUS: 
+//                  NVAPI_OK - completed request
+//                  NVAPI_ERROR - miscellaneous error occurred
+//                  NVAPI_INVALID_ARGUMENT: Invalid input parameter.
+//
+///////////////////////////////////////////////////////////////////////////////
+typedef enum
+{
+    NV_DP_1_62GBPS            = 6,
+    NV_DP_2_70GBPS            = 0xA,
+} NV_DP_LINK_RATE;
+
+typedef enum
+{
+    NV_DP_1_LANE              = 1,
+    NV_DP_2_LANE              = 2,
+    NV_DP_4_LANE              = 4,
+} NV_DP_LANE_COUNT;
+
+typedef enum
+{
+    NV_DP_COLOR_FORMAT_RGB     = 0,
+    NV_DP_COLOR_FORMAT_YCbCr422,
+    NV_DP_COLOR_FORMAT_YCbCr444,
+} NV_DP_COLOR_FORMAT;
+
+typedef enum
+{
+    NV_DP_COLORIMETRY_RGB = 0,
+    NV_DP_COLORIMETRY_YCbCr_ITU601,
+    NV_DP_COLORIMETRY_YCbCr_ITU709,
+} NV_DP_COLORIMETRY;
+
+typedef enum
+{
+    NV_DP_DYNAMIC_RANGE_VESA  = 0,
+    NV_DP_DYNAMIC_RANGE_CEA,
+} NV_DP_DYNAMIC_RANGE;
+
+typedef enum
+{
+    NV_DP_BPC_DEFAULT         = 0,
+    NV_DP_BPC_6,
+    NV_DP_BPC_8,
+    NV_DP_BPC_10,
+    NV_DP_BPC_12,
+    NV_DP_BPC_16,
+} NV_DP_BPC;
+
+typedef struct
+{
+    NvU32               version;                     // structure version
+    NvU32               dpcd_ver;                    // the DPCD version of the monitor
+    NV_DP_LINK_RATE     maxLinkRate;                 // the max supported link rate
+    NV_DP_LANE_COUNT    maxLaneCount;                // the max supported lane count
+    NV_DP_LINK_RATE     curLinkRate;                 // the current link rate
+    NV_DP_LANE_COUNT    curLaneCount;                // the current lane count
+    NV_DP_COLOR_FORMAT  colorFormat;                 // the current color format
+    NV_DP_DYNAMIC_RANGE dynamicRange;                // the dynamic range
+    NV_DP_COLORIMETRY   colorimetry;                 // ignored in RGB space
+    NV_DP_BPC           bpc;                         // the current bit-per-component;
+    NvU32               isDp                   : 1;  // if the monitor is driven by display port 
+    NvU32               isInternalDp           : 1;  // if the monitor is driven by NV Dp transmitter
+    NvU32               isColorCtrlSupported   : 1;  // if the color format change is supported
+    NvU32               is6BPCSupported        : 1;  // if 6 bpc is supported
+    NvU32               is8BPCSupported        : 1;  // if 8 bpc is supported    
+    NvU32               is10BPCSupported       : 1;  // if 10 bpc is supported
+    NvU32               is12BPCSupported       : 1;  // if 12 bpc is supported        
+    NvU32               is16BPCSupported       : 1;  // if 16 bpc is supported
+ } NV_DISPLAY_PORT_INFO; 
+
+#define NV_DISPLAY_PORT_INFO_VER   MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_INFO,1)
+
+NVAPI_INTERFACE NvAPI_GetDisplayPortInfo(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_INFO *pInfo);
+
+///////////////////////////////////////////////////////////////////////////////
+// FUNCTION NAME:   NvAPI_SetDisplayPort
+//
+// DESCRIPTION:     This API is used to setup DP related configurations.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// PARAMETERS:      hNvDisplay(IN) - NVIDIA display handle. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle().
+//                  outputId(IN)   - This display output ID, when it's "0" it means the default outputId generated from the return of NvAPI_GetAssociatedDisplayOutputId().
+//                  pCfg(IN)       - The display port config structure. If pCfg is NULL, it means to use the driver's default value to setup.
+//
+// RETURN STATUS: 
+//                  NVAPI_OK - completed request
+//                  NVAPI_ERROR - miscellaneous error occurred
+//                  NVAPI_INVALID_ARGUMENT: Invalid input parameter.
+///////////////////////////////////////////////////////////////////////////////
+typedef struct
+{
+    NvU32               version;                     // structure version - 2 is latest
+    NV_DP_LINK_RATE     linkRate;                    // the link rate
+    NV_DP_LANE_COUNT    laneCount;                   // the lane count
+    NV_DP_COLOR_FORMAT  colorFormat;                 // the color format to set
+    NV_DP_DYNAMIC_RANGE dynamicRange;                // the dynamic range
+    NV_DP_COLORIMETRY   colorimetry;                 // ignored in RGB space
+    NV_DP_BPC           bpc;                         // the current bit-per-component;
+    NvU32               isHPD               : 1;     // if CPL is making this call due to HPD
+    NvU32               isSetDeferred       : 1;     // requires an OS modeset to finalize the setup if set
+    NvU32               isChromaLpfOff      : 1;     // force the chroma low_pass_filter to be off
+    NvU32               isDitherOff         : 1;     // force to turn off dither
+} NV_DISPLAY_PORT_CONFIG;
+
+#define NV_DISPLAY_PORT_CONFIG_VER   MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,2)
+#define NV_DISPLAY_PORT_CONFIG_VER_1 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,1)
+#define NV_DISPLAY_PORT_CONFIG_VER_2 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,2)
+
+NVAPI_INTERFACE NvAPI_SetDisplayPort(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_CONFIG *pCfg);
+
+///////////////////////////////////////////////////////////////////////////////
+// FUNCTION NAME:   NvAPI_GetHDMISupportInfo
+//
+// DESCRIPTION:     This API returns the current infoframe data on the specified device(monitor)
+//
+//  SUPPORTED OS: Windows Vista and higher
+//
+// PARAMETERS:      hNvDisplay(IN) - NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle().
+//                  outputId(IN)   - The display output id. If it's "0" then the default outputId from NvAPI_GetAssociatedDisplayOutputId() will be used.
+//                  pInfo(OUT)     - The monitor and GPU's HDMI support info
+//
+// RETURN STATUS: 
+//                  NVAPI_OK - completed request
+//                  NVAPI_ERROR - miscellaneous error occurred
+//                  NVAPI_INVALID_ARGUMENT: Invalid input parameter.
+//
+///////////////////////////////////////////////////////////////////////////////
+typedef struct
+{
+    NvU32      version;                     // structure version
+    NvU32      isGpuHDMICapable       : 1;  // if the GPU can handle HDMI
+    NvU32      isMonUnderscanCapable  : 1;  // if the monitor supports underscan
+    NvU32      isMonBasicAudioCapable : 1;  // if the monitor supports basic audio
+    NvU32      isMonYCbCr444Capable   : 1;  // if YCbCr 4:4:4 is supported
+    NvU32      isMonYCbCr422Capable   : 1;  // if YCbCr 4:2:2 is supported
+    NvU32      isMonxvYCC601Capable   : 1;  // if xvYCC 601 is supported
+    NvU32      isMonxvYCC709Capable   : 1;  // if xvYCC 709 is supported
+    NvU32      isMonHDMI              : 1;  // if the monitor is HDMI (with IEEE's HDMI registry ID)
+    NvU32      EDID861ExtRev;               // the revision number of the EDID 861 extension
+ } NV_HDMI_SUPPORT_INFO; 
+
+#define NV_HDMI_SUPPORT_INFO_VER  MAKE_NVAPI_VERSION(NV_HDMI_SUPPORT_INFO,1)
+
+NVAPI_INTERFACE NvAPI_GetHDMISupportInfo(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_HDMI_SUPPORT_INFO *pInfo);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetAllOutputs
+//
+//   DESCRIPTION: Returns set of all GPU-output identifiers as a bitmask.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pOutputsMask is NULL
+//                NVAPI_OK: *pOutputsMask contains a set of GPU-output identifiers
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetAllOutputs(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pOutputsMask);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetConnectedOutputs
+//
+//   DESCRIPTION: Same as NvAPI_GPU_GetAllOutputs but returns only the set of GPU-output 
+//                identifiers that are connected to display devices.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pOutputsMask is NULL
+//                NVAPI_OK: *pOutputsMask contains a set of GPU-output identifiers
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetConnectedOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetConnectedSLIOutputs
+//
+//   DESCRIPTION: Same as NvAPI_GPU_GetConnectedOutputs but returns only the set of GPU-output 
+//                identifiers that can be selected in an SLI configuration. With SLI disabled
+//                this function matches NvAPI_GPU_GetConnectedOutputs
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pOutputsMask is NULL
+//                NVAPI_OK: *pOutputsMask contains a set of GPU-output identifiers
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetConnectedSLIOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetConnectedOutputsWithLidState
+//
+//   DESCRIPTION: Similar to NvAPI_GPU_GetConnectedOutputs this API returns the connected display identifiers that are connected 
+//                as a output mask but unlike NvAPI_GPU_GetConnectedOutputs this API "always" reflects the Lid State in the output mask.
+//                Thus if you expect the LID close state to be available in the connection mask use this API.
+//                If LID is closed then this API will remove the LID panel from the connected display identifiers. 
+//                If LID is open then this API will reflect the LID panel in the connected display identifiers. 
+//                Note:This API should be used on laptop systems and on systems where LID state is required in the connection output mask. 
+//                     On desktop systems the returned identifiers will match NvAPI_GPU_GetConnectedOutputs.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pOutputsMask is NULL
+//                NVAPI_OK: *pOutputsMask contains a set of GPU-output identifiers
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetConnectedOutputsWithLidState(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetConnectedSLIOutputsWithLidState
+//
+//   DESCRIPTION: Same as NvAPI_GPU_GetConnectedOutputsWithLidState but returns only the set of GPU-output 
+//                identifiers that can be selected in an SLI configuration. With SLI disabled
+//                this function matches NvAPI_GPU_GetConnectedOutputsWithLidState
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pOutputsMask is NULL
+//                NVAPI_OK: *pOutputsMask contains a set of GPU-output identifiers
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetConnectedSLIOutputsWithLidState(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetSystemType
+//
+//   DESCRIPTION: Returns information to identify if the GPU type is for a laptop system or a desktop system.
+//
+//  SUPPORTED OS: Windows XP and higher
+//                
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pOutputsMask is NULL
+//                NVAPI_OK: *pSystemType contains the GPU system type
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+typedef enum
+{
+    NV_SYSTEM_TYPE_UNKNOWN = 0,
+    NV_SYSTEM_TYPE_LAPTOP  = 1,
+    NV_SYSTEM_TYPE_DESKTOP = 2,
+
+} NV_SYSTEM_TYPE;
+
+NVAPI_INTERFACE NvAPI_GPU_GetSystemType(NvPhysicalGpuHandle hPhysicalGpu, NV_SYSTEM_TYPE *pSystemType);
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetActiveOutputs
+//
+//   DESCRIPTION: Same as NvAPI_GPU_GetAllOutputs but returns only the set of GPU-output 
+//                identifiers that are actively driving display devices.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pOutputsMask is NULL
+//                NVAPI_OK: *pOutputsMask contains a set of GPU-output identifiers
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetActiveOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetEDID
+//
+//   DESCRIPTION: Returns the EDID data for the specified GPU handle and connection bit mask.
+//                displayOutputId should have exactly 1 bit set to indicate a single display.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: pEDID is NULL; displayOutputId has 0 or > 1 bits set.
+//                NVAPI_OK: *pEDID contains valid data.
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found.
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle.
+//                NVAPI_DATA_NOT_FOUND: requested display does not contain an EDID
+//
+///////////////////////////////////////////////////////////////////////////////
+#define NV_EDID_V1_DATA_SIZE   256
+#define NV_EDID_DATA_SIZE      NV_EDID_V1_DATA_SIZE
+
+typedef struct
+{
+    NvU32   version;        //structure version
+    NvU8    EDID_Data[NV_EDID_DATA_SIZE];
+    NvU32   sizeofEDID;
+} NV_EDID;
+
+#define NV_EDID_VER         MAKE_NVAPI_VERSION(NV_EDID,2)
+
+NVAPI_INTERFACE NvAPI_GPU_GetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetOutputType
+//
+//   DESCRIPTION: Give a physical GPU handle and a single outputId (exactly 1 bit set), this API
+//                returns the output type.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu, outputId or pOutputsMask is NULL; or outputId has > 1 bit set
+//                NVAPI_OK: *pOutputType contains a NvGpuOutputType value
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+typedef enum _NV_GPU_OUTPUT_TYPE
+{
+    NVAPI_GPU_OUTPUT_UNKNOWN  = 0,
+    NVAPI_GPU_OUTPUT_CRT      = 1,     // CRT display device
+    NVAPI_GPU_OUTPUT_DFP      = 2,     // Digital Flat Panel display device
+    NVAPI_GPU_OUTPUT_TV       = 3,     // TV display device
+} NV_GPU_OUTPUT_TYPE;
+
+NVAPI_INTERFACE NvAPI_GPU_GetOutputType(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_OUTPUT_TYPE *pOutputType);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_ValidateOutputCombination
+//
+//   DESCRIPTION: This call is used to determine if a set of GPU outputs can be active 
+//                simultaneously.  While a GPU may have <n> outputs, they can not typically
+//                all be active at the same time due to internal resource sharing.
+//
+//                Given a physical GPU handle and a mask of candidate outputs, this call
+//                will return NVAPI_OK if all of the specified outputs can be driven
+//                simultaneously.  It will return NVAPI_INVALID_COMBINATION if they cannot.
+//                
+//                Use NvAPI_GPU_GetAllOutputs() to determine which outputs are candidates.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// RETURN STATUS: NVAPI_OK: combination of outputs in outputsMask are valid (can be active simultaneously)
+//                NVAPI_INVALID_COMBINATION: combination of outputs in outputsMask are NOT valid
+//                NVAPI_INVALID_ARGUMENT: hPhysicalGpu or outputsMask does not have at least 2 bits set
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_ValidateOutputCombination(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputsMask);
+
+typedef enum _NV_GPU_CONNECTOR_TYPE
+{
+    NVAPI_GPU_CONNECTOR_VGA_15_PIN                      = 0x00000000,
+    NVAPI_GPU_CONNECTOR_TV_COMPOSITE                    = 0x00000010,
+    NVAPI_GPU_CONNECTOR_TV_SVIDEO                       = 0x00000011,
+    NVAPI_GPU_CONNECTOR_TV_HDTV_COMPONENT               = 0x00000013,
+    NVAPI_GPU_CONNECTOR_TV_SCART                        = 0x00000014,
+    NVAPI_GPU_CONNECTOR_TV_COMPOSITE_SCART_ON_EIAJ4120  = 0x00000016,
+    NVAPI_GPU_CONNECTOR_TV_HDTV_EIAJ4120                = 0x00000017,
+    NVAPI_GPU_CONNECTOR_PC_POD_HDTV_YPRPB               = 0x00000018,
+    NVAPI_GPU_CONNECTOR_PC_POD_SVIDEO                   = 0x00000019,
+    NVAPI_GPU_CONNECTOR_PC_POD_COMPOSITE                = 0x0000001A,
+    NVAPI_GPU_CONNECTOR_DVI_I_TV_SVIDEO                 = 0x00000020,
+    NVAPI_GPU_CONNECTOR_DVI_I_TV_COMPOSITE              = 0x00000021,
+    NVAPI_GPU_CONNECTOR_DVI_I                           = 0x00000030,
+    NVAPI_GPU_CONNECTOR_DVI_D                           = 0x00000031,
+    NVAPI_GPU_CONNECTOR_ADC                             = 0x00000032,
+    NVAPI_GPU_CONNECTOR_LFH_DVI_I_1                     = 0x00000038,
+    NVAPI_GPU_CONNECTOR_LFH_DVI_I_2                     = 0x00000039,
+    NVAPI_GPU_CONNECTOR_SPWG                            = 0x00000040,
+    NVAPI_GPU_CONNECTOR_OEM                             = 0x00000041,
+    NVAPI_GPU_CONNECTOR_DISPLAYPORT_EXTERNAL            = 0x00000046,
+    NVAPI_GPU_CONNECTOR_DISPLAYPORT_INTERNAL            = 0x00000047,
+    NVAPI_GPU_CONNECTOR_HDMI_A                          = 0x00000061,
+    NVAPI_GPU_CONNECTOR_UNKNOWN                         = 0xFFFFFFFF,
+} NV_GPU_CONNECTOR_TYPE;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetFullName
+//
+//   DESCRIPTION: Retrieves the full GPU name as an ascii string.  Eg: "Quadro FX 1400"
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_ERROR or NVAPI_OK
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetFullName(NvPhysicalGpuHandle hPhysicalGpu, NvAPI_ShortString szName);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetPCIIdentifiers
+//
+//   DESCRIPTION: Returns the PCI identifiers associated with this GPU.
+//                  DeviceId - the internal PCI device identifier for the GPU.
+//                  SubSystemId - the internal PCI subsystem identifier for the GPU.
+//                  RevisionId - the internal PCI device-specific revision identifier for the GPU.
+//                  ExtDeviceId - the external PCI device identifier for the GPU.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or an argument is NULL
+//                NVAPI_OK: arguments are populated with PCI identifiers
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetPCIIdentifiers(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pDeviceId,NvU32 *pSubSystemId,NvU32 *pRevisionId,NvU32 *pExtDeviceId);
+    
+typedef enum _NV_GPU_TYPE
+{
+    NV_SYSTEM_TYPE_GPU_UNKNOWN     = 0, 
+    NV_SYSTEM_TYPE_IGPU            = 1, //integrated 
+    NV_SYSTEM_TYPE_DGPU            = 2, //discrete 
+} NV_GPU_TYPE; 
+
+/////////////////////////////////////////////////////////////////////////////// 
+// 
+// FUNCTION NAME: NvAPI_GPU_GetGPUType 
+// 
+// DESCRIPTION: Returns information to identify the GPU type 
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+// 
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu 
+// NVAPI_OK: *pGpuType contains the GPU type 
+// NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found 
+// NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle 
+// 
+///////////////////////////////////////////////////////////////////////////////     
+NVAPI_INTERFACE NvAPI_GPU_GetGPUType(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_TYPE *pGpuType);
+
+typedef enum _NV_GPU_BUS_TYPE
+{
+    NVAPI_GPU_BUS_TYPE_UNDEFINED    = 0,
+    NVAPI_GPU_BUS_TYPE_PCI          = 1,
+    NVAPI_GPU_BUS_TYPE_AGP          = 2,
+    NVAPI_GPU_BUS_TYPE_PCI_EXPRESS  = 3,
+    NVAPI_GPU_BUS_TYPE_FPCI         = 4,
+} NV_GPU_BUS_TYPE;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetBusType
+//
+//   DESCRIPTION: Returns the type of bus associated with this GPU.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pBusType is NULL
+//                NVAPI_OK: *pBusType contains bus identifier
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetBusType(NvPhysicalGpuHandle hPhysicalGpu,NV_GPU_BUS_TYPE *pBusType);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetBusId
+//
+//   DESCRIPTION: Returns the ID of bus associated with this GPU.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pBusId is NULL
+//                NVAPI_OK: *pBusId contains bus id
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetBusId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pBusId);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetBusSlotId
+//
+//   DESCRIPTION: Returns the ID of bus-slot associated with this GPU.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pBusSlotId is NULL
+//                NVAPI_OK: *pBusSlotId contains bus-slot id
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetBusSlotId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pBusSlotId);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetIRQ
+//
+//   DESCRIPTION: Returns the interrupt number associated with this GPU.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pIRQ is NULL
+//                NVAPI_OK: *pIRQ contains interrupt number
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetIRQ(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pIRQ);
+    
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetVbiosRevision
+//
+//   DESCRIPTION: Returns the revision of the video bios associated with this GPU.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pBiosRevision is NULL
+//                NVAPI_OK: *pBiosRevision contains revision number
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetVbiosRevision(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pBiosRevision);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetVbiosOEMRevision
+//
+//   DESCRIPTION: Returns the OEM revision of the video bios associated with this GPU.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pBiosRevision is NULL
+//                NVAPI_OK: *pBiosRevision contains revision number
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetVbiosOEMRevision(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pBiosRevision);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetVbiosVersionString
+//
+//   DESCRIPTION: Returns the full bios version string in the form of xx.xx.xx.xx.yy where
+//                the xx numbers come from NvAPI_GPU_GetVbiosRevision and yy comes from 
+//                NvAPI_GPU_GetVbiosOEMRevision.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu is NULL
+//                NVAPI_OK: szBiosRevision contains version string
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetVbiosVersionString(NvPhysicalGpuHandle hPhysicalGpu,NvAPI_ShortString szBiosRevision);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetAGPAperture
+//
+//   DESCRIPTION: Returns AGP aperture in megabytes
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: pSize is NULL
+//                NVAPI_OK: call successful
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetAGPAperture(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetCurrentAGPRate
+//
+//   DESCRIPTION: Returns the current AGP Rate (1 = 1x, 2=2x etc, 0 = AGP not present)
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: pRate is NULL
+//                NVAPI_OK: call successful
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetCurrentAGPRate(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pRate);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetCurrentPCIEDownstreamWidth
+//
+//   DESCRIPTION: Returns the number of PCIE lanes being used for the PCIE interface 
+//                downstream from the GPU.
+//
+//                On systems that do not support PCIE, the maxspeed for the root link
+//                will be zero.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: pWidth is NULL
+//                NVAPI_OK: call successful
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetCurrentPCIEDownstreamWidth(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pWidth);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetPhysicalFrameBufferSize
+//
+//   DESCRIPTION: Returns the physical size of framebuffer in Kb.  This does NOT include any
+//                system RAM that may be dedicated for use by the GPU.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: pSize is NULL
+//                NVAPI_OK: call successful
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetPhysicalFrameBufferSize(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GPU_GetVirtualFrameBufferSize
+//
+//   DESCRIPTION: Returns the virtual size of framebuffer in Kb.  This includes the physical RAM plus any
+//                system RAM that has been dedicated for use by the GPU.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: pSize is NULL
+//                NVAPI_OK: call successful
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
+//                NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetVirtualFrameBufferSize(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize);
+
+///////////////////////////////////////////////////////////////////////////////////
+//  Thermal API
+//  Provides ability to get temperature levels from the various thermal sensors associated with the GPU
+
+#define NVAPI_MAX_THERMAL_SENSORS_PER_GPU 3
+
+typedef enum 
+{
+    NVAPI_THERMAL_TARGET_NONE          = 0,
+    NVAPI_THERMAL_TARGET_GPU           = 1,
+    NVAPI_THERMAL_TARGET_MEMORY        = 2,
+    NVAPI_THERMAL_TARGET_POWER_SUPPLY  = 4,
+    NVAPI_THERMAL_TARGET_BOARD         = 8,
+    NVAPI_THERMAL_TARGET_ALL           = 15,
+    NVAPI_THERMAL_TARGET_UNKNOWN       = -1,
+} NV_THERMAL_TARGET;
+
+typedef enum
+{
+    NVAPI_THERMAL_CONTROLLER_NONE = 0,
+    NVAPI_THERMAL_CONTROLLER_GPU_INTERNAL,  
+    NVAPI_THERMAL_CONTROLLER_ADM1032,
+    NVAPI_THERMAL_CONTROLLER_MAX6649,       
+    NVAPI_THERMAL_CONTROLLER_MAX1617,      
+    NVAPI_THERMAL_CONTROLLER_LM99,      
+    NVAPI_THERMAL_CONTROLLER_LM89,         
+    NVAPI_THERMAL_CONTROLLER_LM64,         
+    NVAPI_THERMAL_CONTROLLER_ADT7473,
+    NVAPI_THERMAL_CONTROLLER_SBMAX6649,
+    NVAPI_THERMAL_CONTROLLER_VBIOSEVT,  
+    NVAPI_THERMAL_CONTROLLER_OS,    
+    NVAPI_THERMAL_CONTROLLER_UNKNOWN = -1,
+} NV_THERMAL_CONTROLLER;
+
+typedef struct
+{
+    NvU32   version;                //structure version 
+    NvU32   count;                  //number of associated thermal sensors with the selected GPU
+    struct 
+    {
+        NV_THERMAL_CONTROLLER       controller;         //internal, ADM1032, MAX6649...
+        NvU32                       defaultMinTemp;     //the min default temperature value of the thermal sensor in degrees centigrade 
+        NvU32                       defaultMaxTemp;    //the max default temperature value of the thermal sensor in degrees centigrade 
+        NvU32                       currentTemp;       //the current temperature value of the thermal sensor in degrees centigrade 
+        NV_THERMAL_TARGET           target;             //thermal senor targeted @ GPU, memory, chipset, powersupply, canoas...
+    } sensor[NVAPI_MAX_THERMAL_SENSORS_PER_GPU];
+
+} NV_GPU_THERMAL_SETTINGS;
+
+#define NV_GPU_THERMAL_SETTINGS_VER  MAKE_NVAPI_VERSION(NV_GPU_THERMAL_SETTINGS,1)
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME:   NvAPI_GPU_GetThermalSettings
+//
+// DESCRIPTION:     Retrieves the thermal information of all thermal sensors or specific thermal sensor associated with the selected GPU.
+//                  Thermal sensors are indexed 0 to NVAPI_MAX_THERMAL_SENSORS_PER_GPU-1.
+//                  To retrieve specific thermal sensor info set the sensorIndex to the required thermal sensor index. 
+//                  To retrieve info for all sensors set sensorIndex to NVAPI_THERMAL_TARGET_ALL. 
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// PARAMETERS :     hPhysicalGPU(IN) - GPU selection.
+//                  sensorIndex(IN)  - Explicit thermal sensor index selection. 
+//                  pThermalSettings(OUT) - Array of thermal settings.
+//
+// RETURN STATUS: 
+//    NVAPI_OK - completed request
+//    NVAPI_ERROR - miscellaneous error occurred
+//    NVAPI_INVALID_ARGUMENT - pThermalInfo is NULL
+//    NVAPI_HANDLE_INVALIDATED - handle passed has been invalidated (see user guide)
+//    NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE - handle passed is not a physical GPU handle
+//    NVAPI_INCOMPATIBLE_STRUCT_VERSION - the version of the INFO struct is not supported
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GPU_GetThermalSettings(NvPhysicalGpuHandle hPhysicalGpu, NvU32 sensorIndex, NV_GPU_THERMAL_SETTINGS *pThermalSettings);
+
+////////////////////////////////////////////////////////////////////////////////
+//NvAPI_TVOutput Information
+
+typedef enum _NV_DISPLAY_TV_FORMAT
+{
+    NV_DISPLAY_TV_FORMAT_NONE         = 0,
+    NV_DISPLAY_TV_FORMAT_SD_NTSCM     = 0x00000001,
+    NV_DISPLAY_TV_FORMAT_SD_NTSCJ     = 0x00000002,
+    NV_DISPLAY_TV_FORMAT_SD_PALM      = 0x00000004,
+    NV_DISPLAY_TV_FORMAT_SD_PALBDGH   = 0x00000008,
+    NV_DISPLAY_TV_FORMAT_SD_PALN      = 0x00000010,
+    NV_DISPLAY_TV_FORMAT_SD_PALNC     = 0x00000020,
+    NV_DISPLAY_TV_FORMAT_SD_576i      = 0x00000100,
+    NV_DISPLAY_TV_FORMAT_SD_480i      = 0x00000200,
+    NV_DISPLAY_TV_FORMAT_ED_480p      = 0x00000400,
+    NV_DISPLAY_TV_FORMAT_ED_576p      = 0x00000800,
+    NV_DISPLAY_TV_FORMAT_HD_720p      = 0x00001000,
+    NV_DISPLAY_TV_FORMAT_HD_1080i     = 0x00002000,
+    NV_DISPLAY_TV_FORMAT_HD_1080p     = 0x00004000,
+    NV_DISPLAY_TV_FORMAT_HD_720p50    = 0x00008000,
+    NV_DISPLAY_TV_FORMAT_HD_1080p24   = 0x00010000,
+    NV_DISPLAY_TV_FORMAT_HD_1080i50   = 0x00020000,
+    NV_DISPLAY_TV_FORMAT_HD_1080p50   = 0x00040000,
+
+} NV_DISPLAY_TV_FORMAT;
+
+///////////////////////////////////////////////////////////////////////////////////
+//  I2C API
+//  Provides ability to read or write data using I2C protocol.
+//  These APIs allow I2C access only to DDC monitors
+
+#define NVAPI_MAX_SIZEOF_I2C_DATA_BUFFER 256
+#define NVAPI_NO_PORTID_FOUND 5
+#define NVAPI_DISPLAY_DEVICE_MASK_MAX 24
+
+typedef struct 
+{
+    NvU32                   version;        //structure version 
+    NvU32                   displayMask;    //the Display Mask of the concerned display
+    NvU8                    bIsDDCPort;     //Flag indicating DDC port or a communication port
+    NvU8                    i2cDevAddress;  //the I2C target device address
+    NvU8*                   pbI2cRegAddress;//the I2C target register address  
+    NvU32                   regAddrSize;    //the size in bytes of target register address  
+    NvU8*                   pbData;         //The buffer of data which is to be read/written
+    NvU32                   cbSize;         //The size of Data buffer to be read.
+    NvU32                   i2cSpeed;       //The speed at which the transaction is be made(between 28kbps to 40kbps)
+} NV_I2C_INFO;
+
+#define NV_I2C_INFO_VER  MAKE_NVAPI_VERSION(NV_I2C_INFO,1)
+/***********************************************************************************/
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME:  NvAPI_I2CRead
+//
+// DESCRIPTION:    Read data buffer from I2C port
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// PARAMETERS:     hPhysicalGPU(IN) - GPU selection.
+//                 NV_I2C_INFO *pI2cInfo -The I2c data input structure
+//
+// RETURN STATUS: 
+//    NVAPI_OK - completed request
+//    NVAPI_ERROR - miscellaneous error occurred
+//    NVAPI_HANDLE_INVALIDATED - handle passed has been invalidated (see user guide)
+//    NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE - handle passed is not a physical GPU handle
+//    NVAPI_INCOMPATIBLE_STRUCT_VERSION - structure version is not supported
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_I2CRead(NvPhysicalGpuHandle hPhysicalGpu, NV_I2C_INFO *pI2cInfo);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME:  NvAPI_I2CWrite
+//
+// DESCRIPTION:    Writes data buffer to I2C port
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// PARAMETERS:     hPhysicalGPU(IN) - GPU selection.
+//                 NV_I2C_INFO *pI2cInfo -The I2c data input structure
+//
+// RETURN STATUS: 
+//    NVAPI_OK - completed request
+//    NVAPI_ERROR - miscellaneous error occurred
+//    NVAPI_HANDLE_INVALIDATED - handle passed has been invalidated (see user guide)
+//    NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE - handle passed is not a physical GPU handle
+//    NVAPI_INCOMPATIBLE_STRUCT_VERSION - structure version is not supported
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_I2CWrite(NvPhysicalGpuHandle hPhysicalGpu, NV_I2C_INFO *pI2cInfo);
+
+
+typedef struct
+{
+    NvU32               version;        //structure version
+    NvU32               vendorId;       //vendorId
+    NvU32               deviceId;       //deviceId
+    NvAPI_ShortString   szVendorName;   //vendor Name
+    NvAPI_ShortString   szChipsetName;  //device Name
+    NvU32               flags;          //Chipset info flags - obsolete
+    NvU32               subSysVendorId;     //subsystem vendorId
+    NvU32               subSysDeviceId;     //subsystem deviceId
+    NvAPI_ShortString   szSubSysVendorName; //subsystem vendor Name
+} NV_CHIPSET_INFO;
+
+#define NV_CHIPSET_INFO_VER     MAKE_NVAPI_VERSION(NV_CHIPSET_INFO,3)
+
+typedef enum
+{
+    NV_CHIPSET_INFO_HYBRID          = 0x00000001,
+} NV_CHIPSET_INFO_FLAGS;
+
+typedef struct
+{
+    NvU32               version;        //structure version
+    NvU32               vendorId;       //vendorId
+    NvU32               deviceId;       //deviceId
+    NvAPI_ShortString   szVendorName;   //vendor Name
+    NvAPI_ShortString   szChipsetName;  //device Name
+    NvU32               flags;          //Chipset info flags
+} NV_CHIPSET_INFO_v2;
+
+#define NV_CHIPSET_INFO_VER_2   MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v2,2)
+
+typedef struct
+{
+    NvU32               version;        //structure version
+    NvU32               vendorId;       //vendorId
+    NvU32               deviceId;       //deviceId
+    NvAPI_ShortString   szVendorName;   //vendor Name
+    NvAPI_ShortString   szChipsetName;  //device Name
+} NV_CHIPSET_INFO_v1;
+
+#define NV_CHIPSET_INFO_VER_1  MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v1,1)
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_SYS_GetChipSetInfo
+//
+//   DESCRIPTION: Returns information about the System's ChipSet
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_INVALID_ARGUMENT: pChipSetInfo is NULL
+//                NVAPI_OK: *pChipSetInfo is now set
+//                NVAPI_INCOMPATIBLE_STRUCT_VERSION - NV_CHIPSET_INFO version not compatible with driver
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_SYS_GetChipSetInfo(NV_CHIPSET_INFO *pChipSetInfo);
+
+typedef struct 
+{
+    NvU32 version;    // Structure version, constructed from macro below
+    NvU32 currentLidState;
+    NvU32 currentDockState;
+    NvU32 currentLidPolicy;
+    NvU32 currentDockPolicy;
+    NvU32 forcedLidMechanismPresent;
+    NvU32 forcedDockMechanismPresent;
+}NV_LID_DOCK_PARAMS;
+
+#define NV_LID_DOCK_PARAMS_VER  MAKE_NVAPI_VERSION(NV_LID_DOCK_PARAMS,1)
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_GetLidDockInfo
+//
+// DESCRIPTION: Returns current lid and dock information.
+//
+//  SUPPORTED OS: Mac OS X, Windows XP and higher
+//
+// RETURN STATUS: NVAPI_OK: now *pLidAndDock contains the returned lid and dock information.  
+//                NVAPI_ERROR:If any way call is not success.
+//                NVAPI_NOT_SUPPORTED:If any way call is not success.
+//                NVAPI_HANDLE_INVALIDATED:If nvapi escape result handle is invalid.
+//                NVAPI_API_NOT_INTIALIZED:If NVAPI is not initialized. 
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_SYS_GetLidAndDockInfo(NV_LID_DOCK_PARAMS *pLidAndDock);
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_OGL_ExpertModeSet[Get]
+//
+//   DESCRIPTION: Configure OpenGL Expert Mode, an API usage feedback and
+//                advice reporting mechanism. The effects of this call are
+//                applied only to the current context, and are reset to the
+//                defaults when the context is destroyed.
+//
+//                Note: This feature is valid at runtime only when GLExpert
+//                      functionality has been built into the OpenGL driver
+//                      installed on the system. All Windows Vista OpenGL
+//                      drivers provided by NVIDIA have this instrumentation
+//                      included by default. Windows XP, however, requires a
+//                      special display driver available with the NVIDIA
+//                      PerfSDK found at developer.nvidia.com.
+//
+//                Note: These functions are valid only for the current OpenGL
+//                      context. Calling these functions prior to creating a
+//                      context and calling MakeCurrent with it will result
+//                      in errors and undefined behavior.
+//
+//    PARAMETERS: expertDetailMask  Mask made up of NVAPI_OGLEXPERT_DETAIL bits,
+//                                  this parameter specifies the detail level in
+//                                  the feedback stream.
+//
+//                expertReportMask  Mask made up of NVAPI_OGLEXPERT_REPORT bits,
+//                                  this parameter specifies the areas of
+//                                  functional interest.
+//
+//                expertOutputMask  Mask made up of NVAPI_OGLEXPERT_OUTPUT bits,
+//                                  this parameter specifies the feedback output
+//                                  location.
+//
+//                expertCallback    Used in conjunction with OUTPUT_TO_CALLBACK,
+//                                  this is a simple callback function the user
+//                                  may use to obtain the feedback stream. The
+//                                  function will be called once per fully
+//                                  qualified feedback stream entry.
+//
+// RETURN STATUS: NVAPI_API_NOT_INTIALIZED         : NVAPI not initialized
+//                NVAPI_NVIDIA_DEVICE_NOT_FOUND    : no NVIDIA GPU found
+//                NVAPI_OPENGL_CONTEXT_NOT_CURRENT : no NVIDIA OpenGL context
+//                                                   which supports GLExpert
+//                                                   has been made current
+//                NVAPI_ERROR : OpenGL driver failed to load properly
+//                NVAPI_OK    : success
+//
+///////////////////////////////////////////////////////////////////////////////
+#define NVAPI_OGLEXPERT_DETAIL_NONE                 0x00000000
+#define NVAPI_OGLEXPERT_DETAIL_ERROR                0x00000001
+#define NVAPI_OGLEXPERT_DETAIL_SWFALLBACK           0x00000002
+#define NVAPI_OGLEXPERT_DETAIL_BASIC_INFO           0x00000004
+#define NVAPI_OGLEXPERT_DETAIL_DETAILED_INFO        0x00000008
+#define NVAPI_OGLEXPERT_DETAIL_PERFORMANCE_WARNING  0x00000010
+#define NVAPI_OGLEXPERT_DETAIL_QUALITY_WARNING      0x00000020
+#define NVAPI_OGLEXPERT_DETAIL_USAGE_WARNING        0x00000040
+#define NVAPI_OGLEXPERT_DETAIL_ALL                  0xFFFFFFFF
+
+#define NVAPI_OGLEXPERT_REPORT_NONE                 0x00000000
+#define NVAPI_OGLEXPERT_REPORT_ERROR                0x00000001
+#define NVAPI_OGLEXPERT_REPORT_SWFALLBACK           0x00000002
+#define NVAPI_OGLEXPERT_REPORT_PIPELINE_VERTEX      0x00000004
+#define NVAPI_OGLEXPERT_REPORT_PIPELINE_GEOMETRY    0x00000008
+#define NVAPI_OGLEXPERT_REPORT_PIPELINE_XFB         0x00000010
+#define NVAPI_OGLEXPERT_REPORT_PIPELINE_RASTER      0x00000020
+#define NVAPI_OGLEXPERT_REPORT_PIPELINE_FRAGMENT    0x00000040
+#define NVAPI_OGLEXPERT_REPORT_PIPELINE_ROP         0x00000080
+#define NVAPI_OGLEXPERT_REPORT_PIPELINE_FRAMEBUFFER 0x00000100
+#define NVAPI_OGLEXPERT_REPORT_PIPELINE_PIXEL       0x00000200
+#define NVAPI_OGLEXPERT_REPORT_PIPELINE_TEXTURE     0x00000400
+#define NVAPI_OGLEXPERT_REPORT_OBJECT_BUFFEROBJECT  0x00000800
+#define NVAPI_OGLEXPERT_REPORT_OBJECT_TEXTURE       0x00001000
+#define NVAPI_OGLEXPERT_REPORT_OBJECT_PROGRAM       0x00002000
+#define NVAPI_OGLEXPERT_REPORT_OBJECT_FBO           0x00004000
+#define NVAPI_OGLEXPERT_REPORT_FEATURE_SLI          0x00008000
+#define NVAPI_OGLEXPERT_REPORT_ALL                  0xFFFFFFFF
+
+#define NVAPI_OGLEXPERT_OUTPUT_TO_NONE              0x00000000
+#define NVAPI_OGLEXPERT_OUTPUT_TO_CONSOLE           0x00000001
+#define NVAPI_OGLEXPERT_OUTPUT_TO_DEBUGGER          0x00000004
+#define NVAPI_OGLEXPERT_OUTPUT_TO_CALLBACK          0x00000008
+#define NVAPI_OGLEXPERT_OUTPUT_TO_ALL               0xFFFFFFFF
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION TYPE: NVAPI_OGLEXPERT_CALLBACK
+//
+//   DESCRIPTION: Used in conjunction with OUTPUT_TO_CALLBACK, this is a simple 
+//                callback function the user may use to obtain the feedback 
+//                stream. The function will be called once per fully qualified 
+//                feedback stream entry.
+//
+//    PARAMETERS: categoryId   Contains the bit from the NVAPI_OGLEXPERT_REPORT 
+//                             mask that corresponds to the current message
+//                messageId    Unique Id for the current message
+//                detailLevel  Contains the bit from the NVAPI_OGLEXPERT_DETAIL
+//                             mask that corresponds to the current message
+//                objectId     Unique Id of the object that corresponds to the
+//                             current message
+//                messageStr   Text string from the current message
+//
+///////////////////////////////////////////////////////////////////////////////
+typedef void (* NVAPI_OGLEXPERT_CALLBACK) (unsigned int categoryId, unsigned int messageId, unsigned int detailLevel, int objectId, const char *messageStr);
+
+//  SUPPORTED OS: Windows XP and higher
+NVAPI_INTERFACE NvAPI_OGL_ExpertModeSet(NvU32 expertDetailLevel,
+                                        NvU32 expertReportMask,
+                                        NvU32 expertOutputMask,
+                     NVAPI_OGLEXPERT_CALLBACK expertCallback);
+
+
+//  SUPPORTED OS: Windows XP and higher
+NVAPI_INTERFACE NvAPI_OGL_ExpertModeGet(NvU32 *pExpertDetailLevel,
+                                        NvU32 *pExpertReportMask,
+                                        NvU32 *pExpertOutputMask,
+                     NVAPI_OGLEXPERT_CALLBACK *pExpertCallback);
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// FUNCTION NAME: NvAPI_OGL_ExpertModeDefaultsSet[Get]
+//
+//   DESCRIPTION: Configure OpenGL Expert Mode global defaults. These settings
+//                apply to any OpenGL application which starts up after these
+//                values are applied (i.e. these settings *do not* apply to
+//                currently running applications).
+//
+//    PARAMETERS: expertDetailLevel Value which specifies the detail level in
+//                                  the feedback stream. This is a mask made up
+//                                  of NVAPI_OGLEXPERT_LEVEL bits.
+//
+//                expertReportMask  Mask made up of NVAPI_OGLEXPERT_REPORT bits,
+//                                  this parameter specifies the areas of
+//                                  functional interest.
+//
+//                expertOutputMask  Mask made up of NVAPI_OGLEXPERT_OUTPUT bits,
+//                                  this parameter specifies the feedback output
+//                                  location. Note that using OUTPUT_TO_CALLBACK
+//                                  here is meaningless and has no effect, but
+//                                  using it will not cause an error.
+//
+// RETURN STATUS: NVAPI_ERROR or NVAPI_OK
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//  SUPPORTED OS: Windows XP and higher
+NVAPI_INTERFACE NvAPI_OGL_ExpertModeDefaultsSet(NvU32 expertDetailLevel,
+                                                NvU32 expertReportMask,
+                                                NvU32 expertOutputMask);
+
+//  SUPPORTED OS: Windows XP and higher
+NVAPI_INTERFACE NvAPI_OGL_ExpertModeDefaultsGet(NvU32 *pExpertDetailLevel,
+                                                NvU32 *pExpertReportMask,
+                                                NvU32 *pExpertOutputMask);
+
+#define NVAPI_MAX_VIEW_TARGET  2
+
+typedef enum _NV_TARGET_VIEW_MODE
+{
+    NV_VIEW_MODE_STANDARD  = 0,
+    NV_VIEW_MODE_CLONE     = 1,
+    NV_VIEW_MODE_HSPAN     = 2,
+    NV_VIEW_MODE_VSPAN     = 3,
+    NV_VIEW_MODE_DUALVIEW  = 4,
+    NV_VIEW_MODE_MULTIVIEW = 5,
+} NV_TARGET_VIEW_MODE;
+
+
+// Following definitions are used in NvAPI_SetViewEx.
+// Scaling modes
+typedef enum _NV_SCALING
+{
+    NV_SCALING_DEFAULT          = 0,        // No change
+    NV_SCALING_MONITOR_SCALING  = 1,
+    NV_SCALING_ADAPTER_SCALING  = 2,
+    NV_SCALING_CENTERED         = 3,
+    NV_SCALING_ASPECT_SCALING   = 5,
+    NV_SCALING_CUSTOMIZED       = 255       // For future use
+} NV_SCALING;
+
+// Rotate modes
+typedef enum _NV_ROTATE
+{
+    NV_ROTATE_0           = 0,
+    NV_ROTATE_90          = 1,
+    NV_ROTATE_180         = 2,
+    NV_ROTATE_270         = 3
+} NV_ROTATE;
+
+// Color formats
+typedef enum _NV_FORMAT
+{
+    NV_FORMAT_UNKNOWN       =  0,       // unknown. Driver will choose one as following value.
+    NV_FORMAT_P8            = 41,       // for 8bpp mode
+    NV_FORMAT_R5G6B5        = 23,       // for 16bpp mode
+    NV_FORMAT_A8R8G8B8      = 21,       // for 32bpp mode
+    NV_FORMAT_A16B16G16R16F = 113       // for 64bpp(floating point) mode.
+} NV_FORMAT;
+
+// TV standard
+
+
+///////////////////////////////////////////////////////////////////////////////
+// FUNCTION NAME:   NvAPI_SetView
+//
+// DESCRIPTION:     This API lets caller to modify target display arrangement for selected source display handle in any of the nview modes.
+//                  It also allows to modify or extend the source display in dualview mode.
+//
+//  SUPPORTED OS: Windows Vista and higher
+//
+// PARAMETERS:      hNvDisplay(IN) - NVIDIA Display selection. NVAPI_DEFAULT_HANDLE not allowed, it has to be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle().
+//                  pTargetInfo(IN) - Pointer to array of NV_VIEW_TARGET_INFO, specifying device properties in this view.
+//                                    The first device entry in the array is the physical primary.
+//                                    The device entry with the lowest source id is the desktop primary.
+//                  targetCount(IN) - Count of target devices specified in pTargetInfo.
+//                  targetView(IN) - Target view selected from NV_TARGET_VIEW_MODE.
+//
+// RETURN STATUS: 
+//                  NVAPI_OK - completed request
+//                  NVAPI_ERROR - miscellaneous error occurred
+//                  NVAPI_INVALID_ARGUMENT: Invalid input parameter.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+typedef struct
+{
+    NvU32 version;     // (IN) structure version
+    NvU32 count;       // (IN) target count
+    struct 
+    {
+        NvU32 deviceMask;   // (IN/OUT) device mask
+        NvU32 sourceId;     // (IN/OUT) source id
+        NvU32 bPrimary:1;   // (OUT) Indicates if this is the GPU's primary view target. This is not the desktop GDI primary.
+                            // NvAPI_SetView automatically selects the first target in NV_VIEW_TARGET_INFO index 0 as the GPU's primary view.
+        NvU32 bInterlaced:1;// (IN/OUT) Indicates if the timing being used on this monitor is interlaced
+        NvU32 bGDIPrimary:1;// (IN/OUT) Indicates if this is the desktop GDI primary.
+    } target[NVAPI_MAX_VIEW_TARGET];
+} NV_VIEW_TARGET_INFO; 
+
+#define NV_VIEW_TARGET_INFO_VER  MAKE_NVAPI_VERSION(NV_VIEW_TARGET_INFO,2)
+
+NVAPI_INTERFACE NvAPI_SetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargetInfo, NV_TARGET_VIEW_MODE targetView);
+
+///////////////////////////////////////////////////////////////////////////////
+// FUNCTION NAME:   NvAPI_GetView
+//
+// DESCRIPTION:     This API lets caller retrieve the target display arrangement for selected source display handle.
+//
+//  SUPPORTED OS: Windows Vista and higher
+//
+// PARAMETERS:      hNvDisplay(IN) - NVIDIA Display selection. NVAPI_DEFAULT_HANDLE not allowed, it has to be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle().
+//                  pTargetInfo(OUT) - User allocated storage to retrieve an array of  NV_VIEW_TARGET_INFO. Can be NULL to retrieve the targetCount.
+//                  targetMaskCount(IN/OUT) - Count of target device mask specified in pTargetMask.
+//                  targetView(OUT) - Target view selected from NV_TARGET_VIEW_MODE.
+//
+// RETURN STATUS: 
+//                  NVAPI_OK - completed request
+//                  NVAPI_ERROR - miscellaneous error occurred
+//                  NVAPI_INVALID_ARGUMENT: Invalid input parameter.
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargets, NvU32 *pTargetMaskCount, NV_TARGET_VIEW_MODE *pTargetView);
+
+///////////////////////////////////////////////////////////////////////////////
+// FUNCTION NAME:   NvAPI_SetViewEx
+//
+// DESCRIPTION:     This API lets caller to modify the display arrangement for selected source display handle in any of the nview modes.
+//                  It also allows to modify or extend the source display in dualview mode.
+//
+//  SUPPORTED OS: Windows Vista and higher
+//
+// PARAMETERS:      hNvDisplay(IN) - NVIDIA Display selection. NVAPI_DEFAULT_HANDLE not allowed, it has to be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle().
+//                  pPathInfo(IN)  - Pointer to array of NV_VIEW_PATH_INFO, specifying device properties in this view.
+//                                    The first device entry in the array is the physical primary.
+//                                    The device entry with the lowest source id is the desktop primary.
+//                  pathCount(IN)  - Count of paths specified in pPathInfo.
+//                  displayView(IN)- Display view selected from NV_TARGET_VIEW_MODE.
+//
+// RETURN STATUS: 
+//                  NVAPI_OK - completed request
+//                  NVAPI_ERROR - miscellaneous error occurred
+//                  NVAPI_INVALID_ARGUMENT: Invalid input parameter.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define NVAPI_MAX_DISPLAY_PATH  NVAPI_MAX_VIEW_TARGET
+
+typedef struct
+{
+    NvU32 version;     // (IN) structure version
+    NvU32 count;       // (IN) path count
+    struct 
+    {
+        NvU32                   deviceMask;     // (IN) device mask
+        NvU32                   sourceId;       // (IN) source id
+        NvU32                   bPrimary:1;     // (IN/OUT) Indicates if this is the GPU's primary view target. This is not the desktop GDI primary.
+                                                // NvAPI_SetViewEx automatically selects the first target in NV_DISPLAY_PATH_INFO index 0 as the GPU's primary view.
+        NV_GPU_CONNECTOR_TYPE   connector;      // (IN) Specify connector type. For TV only.
+        
+        // source mode information
+        NvU32                   width;          // (IN) width of the mode
+        NvU32                   height;         // (IN) height of the mode
+        NvU32                   depth;          // (IN) depth of the mode
+        NV_FORMAT               colorFormat;    //      color format if needs to specify. Not used now.
+        
+        //rotation setting of the mode
+        NV_ROTATE               rotation;       // (IN) rotation setting.
+      
+        // the scaling mode
+        NV_SCALING              scaling;        // (IN) scaling setting
+
+        // Timing info
+        NvU32                   refreshRate;    // (IN) refresh rate of the mode
+        NvU32                   interlaced:1;   // (IN) interlaced mode flag
+
+        NV_DISPLAY_TV_FORMAT    tvFormat;       // (IN) to choose the last TV format set this value to NV_DISPLAY_TV_FORMAT_NONE
+
+        // Windows desktop position
+        NvU32                   posx;           // (IN/OUT) x offset of this display on the Windows desktop
+        NvU32                   posy;           // (IN/OUT) y offset of this display on the Windows desktop
+        NvU32                   bGDIPrimary:1;  // (IN/OUT) Indicates if this is the desktop GDI primary.
+
+    } path[NVAPI_MAX_DISPLAY_PATH];
+} NV_DISPLAY_PATH_INFO; 
+
+#define NV_DISPLAY_PATH_INFO_VER  MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,2)
+
+NVAPI_INTERFACE NvAPI_SetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NV_TARGET_VIEW_MODE displayView);
+
+///////////////////////////////////////////////////////////////////////////////
+// FUNCTION NAME:   NvAPI_GetViewEx
+//
+// DESCRIPTION:     This API lets caller retrieve the target display arrangement for selected source display handle.
+//
+//  SUPPORTED OS: Windows Vista and higher
+//
+// PARAMETERS:      hNvDisplay(IN) - NVIDIA Display selection. NVAPI_DEFAULT_HANDLE not allowed, it has to be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle().
+//                  pPathInfo(IN/OUT) - count field should be set to NVAPI_MAX_DISPLAY_PATH. Can be NULL to retrieve just the pathCount.
+//                  pPathCount(IN/OUT) - Number of elements in array pPathInfo->path.
+//                  pTargetViewMode(OUT)- Display view selected from NV_TARGET_VIEW_MODE.
+//
+// RETURN STATUS: 
+//                  NVAPI_OK - completed request
+//                  NVAPI_API_NOT_INTIALIZED - NVAPI not initialized
+//                  NVAPI_ERROR - miscellaneous error occurred
+//                  NVAPI_INVALID_ARGUMENT - Invalid input parameter.
+//                  NVAPI_EXPECTED_DISPLAY_HANDLE - hNvDisplay is not a valid display handle.
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NvU32 *pPathCount, NV_TARGET_VIEW_MODE *pTargetViewMode);
+
+///////////////////////////////////////////////////////////////////////////////
+// FUNCTION NAME:   NvAPI_GetSupportedViews
+//
+// DESCRIPTION:     This API lets caller enumerate all the supported NVIDIA display views - nview and dualview modes.
+//
+//  SUPPORTED OS: Windows XP and higher
+//
+// PARAMETERS:      hNvDisplay(IN) - NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle().
+//                  pTargetViews(OUT) - Array of supported views. Can be NULL to retrieve the pViewCount first.
+//                  pViewCount(IN/OUT) - Count of supported views.
+//
+// RETURN STATUS: 
+//                  NVAPI_OK - completed request
+//                  NVAPI_ERROR - miscellaneous error occurred
+//                  NVAPI_INVALID_ARGUMENT: Invalid input parameter.
+//
+///////////////////////////////////////////////////////////////////////////////
+NVAPI_INTERFACE NvAPI_GetSupportedViews(NvDisplayHandle hNvDisplay, NV_TARGET_VIEW_MODE *pTargetViews, NvU32 *pViewCount);
+
+
+#ifdef __cplusplus
+}; //extern "C" {
+#endif
+
+#pragma pack(pop)
+
+#endif // _NVAPI_H
+
diff --git a/coprocs/NVIDIA/mswin/Win32/Debug/lib/nvapi.lib b/coprocs/NVIDIA/mswin/Win32/Debug/lib/nvapi.lib
new file mode 100644
index 0000000..6e88340
Binary files /dev/null and b/coprocs/NVIDIA/mswin/Win32/Debug/lib/nvapi.lib differ
diff --git a/coprocs/NVIDIA/mswin/Win32/Release/lib/nvapi.lib b/coprocs/NVIDIA/mswin/Win32/Release/lib/nvapi.lib
new file mode 100644
index 0000000..6e88340
Binary files /dev/null and b/coprocs/NVIDIA/mswin/Win32/Release/lib/nvapi.lib differ
diff --git a/coprocs/NVIDIA/mswin/x64/Debug/lib/nvapi.lib b/coprocs/NVIDIA/mswin/x64/Debug/lib/nvapi.lib
new file mode 100644
index 0000000..3d3dd25
Binary files /dev/null and b/coprocs/NVIDIA/mswin/x64/Debug/lib/nvapi.lib differ
diff --git a/coprocs/NVIDIA/mswin/x64/Release/lib/nvapi.lib b/coprocs/NVIDIA/mswin/x64/Release/lib/nvapi.lib
new file mode 100644
index 0000000..3d3dd25
Binary files /dev/null and b/coprocs/NVIDIA/mswin/x64/Release/lib/nvapi.lib differ
diff --git a/curl/ca-bundle.crt b/curl/ca-bundle.crt
new file mode 100644
index 0000000..d60b911
--- /dev/null
+++ b/curl/ca-bundle.crt
@@ -0,0 +1,4371 @@
+##
+## $Id$
+##
+##  ca-bundle.crt -- Bundle of CA Root Certificates
+##  Last Modified: Thu Mar  2 09:32:46 CET 2000
+##
+##  This is a bundle of X.509 certificates of public
+##  Certificate Authorities (CA). These were automatically
+##  extracted from Netscape Communicator 4.72's certificate database
+##  (the file `cert7.db'). It contains the certificates in both
+##  plain text and PEM format and therefore can be directly used
+##  with an Apache+mod_ssl webserver for SSL client authentication.
+##  Just configure this file as the SSLCACertificateFile.
+##
+##  (SKIPME)
+##
+
+ABAecom (sub., Am. Bankers Assn.) Root CA
+=========================================
+MD5 Fingerprint: 82:12:F7:89:E1:0B:91:60:A4:B6:22:9F:94:68:11:92
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID+DCCAuCgAwIBAgIRANAeQJAAACdLAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAw
+gYwxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIEwRVdGFoMRcwFQYDVQQHEw5TYWx0IExh
+a2UgQ2l0eTEYMBYGA1UEChMPWGNlcnQgRVogYnkgRFNUMRgwFgYDVQQDEw9YY2Vy
+dCBFWiBieSBEU1QxITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAe
+Fw05OTA3MTQxNjE0MThaFw0wOTA3MTExNjE0MThaMIGMMQswCQYDVQQGEwJVUzEN
+MAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxGDAWBgNVBAoT
+D1hjZXJ0IEVaIGJ5IERTVDEYMBYGA1UEAxMPWGNlcnQgRVogYnkgRFNUMSEwHwYJ
+KoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUA
+A4IBDwAwggEKAoIBAQCtVBjetL/3reh0qu2LfI/C1HUa1YS5tmL8ie/kl2GS+x24
+4VpHNJ6eBiL70+o4y7iLB/caoBd3B1owHNQpOCDXJ0DYUJNDv9IYoil2BXKqa7Zp
+mKt5Hhxl9WqL/MUWqqJy2mDtTm4ZJXoKHTDjUJtCPETrobAgHtsCfv49H7/QAIrb
+QHamGKUVp1e2UsIBF5h3j4qBxhq0airmr6nWAKzP2BVJfNsbof6B+of505DBAsD5
+0ELpkWglX8a/hznplQBgKL+DLMDnXrbXNhbnYId26OcnsiUNi3rlqh3lWc3OCw5v
+xsic4xDZhTnTt5v6xrp8dNJddVardKSiUb9SfO5xAgMBAAGjUzBRMA8GA1UdEwEB
+/wQFMAMBAf8wHwYDVR0jBBgwFoAUCCBsZuuBCmxc1bWmPEHdHJaRJ3cwHQYDVR0O
+BBYEFAggbGbrgQpsXNW1pjxB3RyWkSd3MA0GCSqGSIb3DQEBBQUAA4IBAQBah1iP
+Lat2IWtUDNnxQfZOzSue4x+boy1/2St9WMhnpCn16ezVvZY/o3P4xFs2fNBjLDQ5
+m0i4PW/2FMWeY+anNG7T6DOzxzwYbiOuQ5KZP5jFaTDxNjutuTCC1rZZFpYCCykS
+YbQRifcML5SQhZgonFNsfmPdc/QZ/0qB0bJSI/08SjTOWhvgUIrtT4GV2GDn5MQN
+u1g+WPdOaG8+Z8nLepcWJ+xCYRR2uwDF6wg9FX9LtiJdhzuQ9PPA/jez6dliDMDD
+Wa9gvR8N26E0HzDEPYutsB0Ek+1f1eS/IDAE9EjpMwHRLpAnUrOb3jocq6mXf5vr
+wo3CbezcE9NGxXl8
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            d0:1e:40:90:00:00:27:4b:00:00:00:01:00:00:00:04
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by DST/Email=ca at digsigtrust.com
+        Validity
+            Not Before: Jul 14 16:14:18 1999 GMT
+            Not After : Jul 11 16:14:18 2009 GMT
+        Subject: C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by DST/Email=ca at digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:54:18:de:b4:bf:f7:ad:e8:74:aa:ed:8b:7c:
+                    8f:c2:d4:75:1a:d5:84:b9:b6:62:fc:89:ef:e4:97:
+                    61:92:fb:1d:b8:e1:5a:47:34:9e:9e:06:22:fb:d3:
+                    ea:38:cb:b8:8b:07:f7:1a:a0:17:77:07:5a:30:1c:
+                    d4:29:38:20:d7:27:40:d8:50:93:43:bf:d2:18:a2:
+                    29:76:05:72:aa:6b:b6:69:98:ab:79:1e:1c:65:f5:
+                    6a:8b:fc:c5:16:aa:a2:72:da:60:ed:4e:6e:19:25:
+                    7a:0a:1d:30:e3:50:9b:42:3c:44:eb:a1:b0:20:1e:
+                    db:02:7e:fe:3d:1f:bf:d0:00:8a:db:40:76:a6:18:
+                    a5:15:a7:57:b6:52:c2:01:17:98:77:8f:8a:81:c6:
+                    1a:b4:6a:2a:e6:af:a9:d6:00:ac:cf:d8:15:49:7c:
+                    db:1b:a1:fe:81:fa:87:f9:d3:90:c1:02:c0:f9:d0:
+                    42:e9:91:68:25:5f:c6:bf:87:39:e9:95:00:60:28:
+                    bf:83:2c:c0:e7:5e:b6:d7:36:16:e7:60:87:76:e8:
+                    e7:27:b2:25:0d:8b:7a:e5:aa:1d:e5:59:cd:ce:0b:
+                    0e:6f:c6:c8:9c:e3:10:d9:85:39:d3:b7:9b:fa:c6:
+                    ba:7c:74:d2:5d:75:56:ab:74:a4:a2:51:bf:52:7c:
+                    ee:71
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+            X509v3 Authority Key Identifier: 
+                keyid:08:20:6C:66:EB:81:0A:6C:5C:D5:B5:A6:3C:41:DD:1C:96:91:27:77
+
+            X509v3 Subject Key Identifier: 
+                08:20:6C:66:EB:81:0A:6C:5C:D5:B5:A6:3C:41:DD:1C:96:91:27:77
+    Signature Algorithm: sha1WithRSAEncryption
+        5a:87:58:8f:2d:ab:76:21:6b:54:0c:d9:f1:41:f6:4e:cd:2b:
+        9e:e3:1f:9b:a3:2d:7f:d9:2b:7d:58:c8:67:a4:29:f5:e9:ec:
+        d5:bd:96:3f:a3:73:f8:c4:5b:36:7c:d0:63:2c:34:39:9b:48:
+        b8:3d:6f:f6:14:c5:9e:63:e6:a7:34:6e:d3:e8:33:b3:c7:3c:
+        18:6e:23:ae:43:92:99:3f:98:c5:69:30:f1:36:3b:ad:b9:30:
+        82:d6:b6:59:16:96:02:0b:29:12:61:b4:11:89:f7:0c:2f:94:
+        90:85:98:28:9c:53:6c:7e:63:dd:73:f4:19:ff:4a:81:d1:b2:
+        52:23:fd:3c:4a:34:ce:5a:1b:e0:50:8a:ed:4f:81:95:d8:60:
+        e7:e4:c4:0d:bb:58:3e:58:f7:4e:68:6f:3e:67:c9:cb:7a:97:
+        16:27:ec:42:61:14:76:bb:00:c5:eb:08:3d:15:7f:4b:b6:22:
+        5d:87:3b:90:f4:f3:c0:fe:37:b3:e9:d9:62:0c:c0:c3:59:af:
+        60:bd:1f:0d:db:a1:34:1f:30:c4:3d:8b:ad:b0:1d:04:93:ed:
+        5f:d5:e4:bf:20:30:04:f4:48:e9:33:01:d1:2e:90:27:52:b3:
+        9b:de:3a:1c:ab:a9:97:7f:9b:eb:c2:8d:c2:6d:ec:dc:13:d3:
+        46:c5:79:7c
+
+ANX Network CA by DST
+=====================
+MD5 Fingerprint: A8:ED:DE:EB:93:88:66:D8:2F:C3:BD:1D:BE:45:BE:4D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDTTCCAragAwIBAgIENm6ibzANBgkqhkiG9w0BAQUFADBSMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMR0wGwYDVQQL
+ExREU1QgKEFOWCBOZXR3b3JrKSBDQTAeFw05ODEyMDkxNTQ2NDhaFw0xODEyMDkx
+NjE2NDhaMFIxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVy
+ZSBUcnVzdCBDby4xHTAbBgNVBAsTFERTVCAoQU5YIE5ldHdvcmspIENBMIGdMA0G
+CSqGSIb3DQEBAQUAA4GLADCBhwKBgQC0SBGAWKDVpZkP9jcsRLZu0XzzKmueEbaI
+IwRccSWeahJ3EW6/aDllqPay9qIYsokVoGe3eowiSGv2hDQftsr3G3LL8ltI04ce
+InYTBLSsbJZ/5w4IyTJRMC3VgOghZ7rzXggkLAdZnZAa7kbJtaQelrRBkdR/0o04
+JrBvQ24JfQIBA6OCATAwggEsMBEGCWCGSAGG+EIBAQQEAwIABzB0BgNVHR8EbTBr
+MGmgZ6BlpGMwYTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0
+dXJlIFRydXN0IENvLjEdMBsGA1UECxMURFNUIChBTlggTmV0d29yaykgQ0ExDTAL
+BgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxNTQ2NDhagQ8yMDE4MTIw
+OTE1NDY0OFowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFIwWVXDMFgpTZMKlhKqz
+ZBdDP4I2MB0GA1UdDgQWBBSMFlVwzBYKU2TCpYSqs2QXQz+CNjAMBgNVHRMEBTAD
+AQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB
+AEklyWCxDF+pORDTxTRVfc95wynr3vnCQPnoVsXwL+z02exIUbhjOF6TbhiWhbnK
+UJykuOpmJmiThW9vTHHQvnoLPDG5975pnhDX0UDorBZxq66rOOFwscqSFuBdhaYY
+gAYAnOGmGEJRp2hoWe8mlF+tMQz+KR4XAYQ3W+gSMqNd
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913220207 (0x366ea26f)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DST (ANX Network) CA
+        Validity
+            Not Before: Dec  9 15:46:48 1998 GMT
+            Not After : Dec  9 16:16:48 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DST (ANX Network) CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b4:48:11:80:58:a0:d5:a5:99:0f:f6:37:2c:44:
+                    b6:6e:d1:7c:f3:2a:6b:9e:11:b6:88:23:04:5c:71:
+                    25:9e:6a:12:77:11:6e:bf:68:39:65:a8:f6:b2:f6:
+                    a2:18:b2:89:15:a0:67:b7:7a:8c:22:48:6b:f6:84:
+                    34:1f:b6:ca:f7:1b:72:cb:f2:5b:48:d3:87:1e:22:
+                    76:13:04:b4:ac:6c:96:7f:e7:0e:08:c9:32:51:30:
+                    2d:d5:80:e8:21:67:ba:f3:5e:08:24:2c:07:59:9d:
+                    90:1a:ee:46:c9:b5:a4:1e:96:b4:41:91:d4:7f:d2:
+                    8d:38:26:b0:6f:43:6e:09:7d
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DST (ANX Network) CA/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 15:46:48 1998 GMT, Not After: Dec  9 15:46:48 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:8C:16:55:70:CC:16:0A:53:64:C2:A5:84:AA:B3:64:17:43:3F:82:36
+
+            X509v3 Subject Key Identifier: 
+                8C:16:55:70:CC:16:0A:53:64:C2:A5:84:AA:B3:64:17:43:3F:82:36
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        49:25:c9:60:b1:0c:5f:a9:39:10:d3:c5:34:55:7d:cf:79:c3:
+        29:eb:de:f9:c2:40:f9:e8:56:c5:f0:2f:ec:f4:d9:ec:48:51:
+        b8:63:38:5e:93:6e:18:96:85:b9:ca:50:9c:a4:b8:ea:66:26:
+        68:93:85:6f:6f:4c:71:d0:be:7a:0b:3c:31:b9:f7:be:69:9e:
+        10:d7:d1:40:e8:ac:16:71:ab:ae:ab:38:e1:70:b1:ca:92:16:
+        e0:5d:85:a6:18:80:06:00:9c:e1:a6:18:42:51:a7:68:68:59:
+        ef:26:94:5f:ad:31:0c:fe:29:1e:17:01:84:37:5b:e8:12:32:
+        a3:5d
+
+American Express CA
+===================
+MD5 Fingerprint: 1C:D5:8E:82:BE:70:55:8E:39:61:DF:AD:51:DB:6B:A0
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICkDCCAfkCAgCNMA0GCSqGSIb3DQEBBAUAMIGPMQswCQYDVQQGEwJVUzEnMCUG
+A1UEChMeQW1lcmljYW4gRXhwcmVzcyBDb21wYW55LCBJbmMuMSYwJAYDVQQLEx1B
+bWVyaWNhbiBFeHByZXNzIFRlY2hub2xvZ2llczEvMC0GA1UEAxMmQW1lcmljYW4g
+RXhwcmVzcyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNOTgwODE0MjIwMTAwWhcN
+MDYwODE0MjM1OTAwWjCBjzELMAkGA1UEBhMCVVMxJzAlBgNVBAoTHkFtZXJpY2Fu
+IEV4cHJlc3MgQ29tcGFueSwgSW5jLjEmMCQGA1UECxMdQW1lcmljYW4gRXhwcmVz
+cyBUZWNobm9sb2dpZXMxLzAtBgNVBAMTJkFtZXJpY2FuIEV4cHJlc3MgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJ8kmS
+hcr9FSm1BrZE7PyIo/KGzv8UTyQckvnCI8HOQ99dNMi4FOzVKnCRSZXXVs2U8amT
+0Ggi3E19oApyKkfqJfCFAF82VGHPC/k3Wmed6R/pZD9wlWGn0DAC3iYopGYDBOkw
++48zB/lvYYeictvzaHhjZlmpybdm4RWySDYs+QIDAQABMA0GCSqGSIb3DQEBBAUA
+A4GBAGgXYrhzi0xs60qlPqvlnS7SzYoHV/PGWZd2Fxf4Uo4nk9hY2Chs9KIEeorC
+diSxArTfKPL386infiNIYYj0EWiuJl32oUtTJWrYKhQCDuCHIG6eGVxzkAsj4jGX
+Iz/VIqLTBnvaN/XXtUFEF3pFAtmFRWbWjsfwegyZYiJpW+3S
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 141 (0x8d)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Certificate Authority
+        Validity
+            Not Before: Aug 14 22:01:00 1998 GMT
+            Not After : Aug 14 23:59:00 2006 GMT
+        Subject: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:f2:49:92:85:ca:fd:15:29:b5:06:b6:44:ec:
+                    fc:88:a3:f2:86:ce:ff:14:4f:24:1c:92:f9:c2:23:
+                    c1:ce:43:df:5d:34:c8:b8:14:ec:d5:2a:70:91:49:
+                    95:d7:56:cd:94:f1:a9:93:d0:68:22:dc:4d:7d:a0:
+                    0a:72:2a:47:ea:25:f0:85:00:5f:36:54:61:cf:0b:
+                    f9:37:5a:67:9d:e9:1f:e9:64:3f:70:95:61:a7:d0:
+                    30:02:de:26:28:a4:66:03:04:e9:30:fb:8f:33:07:
+                    f9:6f:61:87:a2:72:db:f3:68:78:63:66:59:a9:c9:
+                    b7:66:e1:15:b2:48:36:2c:f9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        68:17:62:b8:73:8b:4c:6c:eb:4a:a5:3e:ab:e5:9d:2e:d2:cd:
+        8a:07:57:f3:c6:59:97:76:17:17:f8:52:8e:27:93:d8:58:d8:
+        28:6c:f4:a2:04:7a:8a:c2:76:24:b1:02:b4:df:28:f2:f7:f3:
+        a8:a7:7e:23:48:61:88:f4:11:68:ae:26:5d:f6:a1:4b:53:25:
+        6a:d8:2a:14:02:0e:e0:87:20:6e:9e:19:5c:73:90:0b:23:e2:
+        31:97:23:3f:d5:22:a2:d3:06:7b:da:37:f5:d7:b5:41:44:17:
+        7a:45:02:d9:85:45:66:d6:8e:c7:f0:7a:0c:99:62:22:69:5b:
+        ed:d2
+
+American Express Global CA
+==========================
+MD5 Fingerprint: 63:1B:66:93:8C:F3:66:CB:3C:79:57:DC:05:49:EA:DB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEBDCCAuygAwIBAgICAIUwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAlVT
+MScwJQYDVQQKEx5BbWVyaWNhbiBFeHByZXNzIENvbXBhbnksIEluYy4xJjAkBgNV
+BAsTHUFtZXJpY2FuIEV4cHJlc3MgVGVjaG5vbG9naWVzMTYwNAYDVQQDEy1BbWVy
+aWNhbiBFeHByZXNzIEdsb2JhbCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNOTgw
+ODE0MTkwNjAwWhcNMTMwODE0MjM1OTAwWjCBljELMAkGA1UEBhMCVVMxJzAlBgNV
+BAoTHkFtZXJpY2FuIEV4cHJlc3MgQ29tcGFueSwgSW5jLjEmMCQGA1UECxMdQW1l
+cmljYW4gRXhwcmVzcyBUZWNobm9sb2dpZXMxNjA0BgNVBAMTLUFtZXJpY2FuIEV4
+cHJlc3MgR2xvYmFsIENlcnRpZmljYXRlIEF1dGhvcml0eTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBAPAkJmYu++tKc3FTiUfLJjxTkpRMysKFtQ34w1e9
+Lyofahi3V68MABb6oLaQpvcaoS5mJsdoo4qTaWa1RlYtHYLqkAwKIsKJUI0F89Sr
+c0HwzxKsKLRvFJSWWUuekHWG3+JH6+HpT0N+h8onGGaetcFAZX38YW+tm3LPqV7Y
+8/nabpEQ+ky16n4g3qk5L/WI5IpvNcYgnCuGRjMK/DFVpWusFkDpzTVZbzIEw3u1
+D3t3cPNIuypSgs6vKW3xEW9t5gcAAe+a8yYNpnkTZ6/4qxx1rJG1a75AsN6cDLFp
+hRlxkRNFyt/R/eayypaDedvFuKpbepALeFY+xteflEgR9a0CAwEAAaNaMFgwEgYD
+VR0TAQH/BAgwBgEB/wIBBTAOBgNVHQ8BAf8EBAMCAQYwFwYDVR0gBBAwDjAMBgoq
+hkiG+Q8KAQUBMBkGA1UdDgQSBBBXRzV7NicRqAj8L0Yl6yRpMA0GCSqGSIb3DQEB
+BQUAA4IBAQDHYUWoinG5vjTpIXshzVYTmNUwY+kYqkuSFb8LHbvskmnFLsNhi+gw
+RcsQRsFzOFyLGdIr80DrfHKzLh4n43WVihybLsSVBYZy0FX0oZJSeVzb9Pjc5dcS
+sUDHPIbkMWVKyjfG3nZXGWlMRmn8Kq0WN3qTrPchSy3766lQy8HRQAjaA2mHpzde
+VcHF7cTjjgwml5tcV0ty4/IDBdACOyYDQJCevgtbSQx48dVMVSng9v1MA6lUAjLR
+V1qFrEPtWzsWX6C/NdtLnnvo/+cNPDuom0lBRvVzTv+SZSGDE1Vx60k8f4gawhIo
+JaFGS0E3l3/sjvHUoZbCILZerakcHhGg
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 133 (0x85)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Global Certificate Authority
+        Validity
+            Not Before: Aug 14 19:06:00 1998 GMT
+            Not After : Aug 14 23:59:00 2013 GMT
+        Subject: C=US, O=American Express Company, Inc., OU=American Express Technologies, CN=American Express Global Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:f0:24:26:66:2e:fb:eb:4a:73:71:53:89:47:cb:
+                    26:3c:53:92:94:4c:ca:c2:85:b5:0d:f8:c3:57:bd:
+                    2f:2a:1f:6a:18:b7:57:af:0c:00:16:fa:a0:b6:90:
+                    a6:f7:1a:a1:2e:66:26:c7:68:a3:8a:93:69:66:b5:
+                    46:56:2d:1d:82:ea:90:0c:0a:22:c2:89:50:8d:05:
+                    f3:d4:ab:73:41:f0:cf:12:ac:28:b4:6f:14:94:96:
+                    59:4b:9e:90:75:86:df:e2:47:eb:e1:e9:4f:43:7e:
+                    87:ca:27:18:66:9e:b5:c1:40:65:7d:fc:61:6f:ad:
+                    9b:72:cf:a9:5e:d8:f3:f9:da:6e:91:10:fa:4c:b5:
+                    ea:7e:20:de:a9:39:2f:f5:88:e4:8a:6f:35:c6:20:
+                    9c:2b:86:46:33:0a:fc:31:55:a5:6b:ac:16:40:e9:
+                    cd:35:59:6f:32:04:c3:7b:b5:0f:7b:77:70:f3:48:
+                    bb:2a:52:82:ce:af:29:6d:f1:11:6f:6d:e6:07:00:
+                    01:ef:9a:f3:26:0d:a6:79:13:67:af:f8:ab:1c:75:
+                    ac:91:b5:6b:be:40:b0:de:9c:0c:b1:69:85:19:71:
+                    91:13:45:ca:df:d1:fd:e6:b2:ca:96:83:79:db:c5:
+                    b8:aa:5b:7a:90:0b:78:56:3e:c6:d7:9f:94:48:11:
+                    f5:ad
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Certificate Policies: 
+                Policy: 1.2.840.113807.10.1.5.1
+
+            X509v3 Subject Key Identifier: 
+                57:47:35:7B:36:27:11:A8:08:FC:2F:46:25:EB:24:69
+    Signature Algorithm: sha1WithRSAEncryption
+        c7:61:45:a8:8a:71:b9:be:34:e9:21:7b:21:cd:56:13:98:d5:
+        30:63:e9:18:aa:4b:92:15:bf:0b:1d:bb:ec:92:69:c5:2e:c3:
+        61:8b:e8:30:45:cb:10:46:c1:73:38:5c:8b:19:d2:2b:f3:40:
+        eb:7c:72:b3:2e:1e:27:e3:75:95:8a:1c:9b:2e:c4:95:05:86:
+        72:d0:55:f4:a1:92:52:79:5c:db:f4:f8:dc:e5:d7:12:b1:40:
+        c7:3c:86:e4:31:65:4a:ca:37:c6:de:76:57:19:69:4c:46:69:
+        fc:2a:ad:16:37:7a:93:ac:f7:21:4b:2d:fb:eb:a9:50:cb:c1:
+        d1:40:08:da:03:69:87:a7:37:5e:55:c1:c5:ed:c4:e3:8e:0c:
+        26:97:9b:5c:57:4b:72:e3:f2:03:05:d0:02:3b:26:03:40:90:
+        9e:be:0b:5b:49:0c:78:f1:d5:4c:55:29:e0:f6:fd:4c:03:a9:
+        54:02:32:d1:57:5a:85:ac:43:ed:5b:3b:16:5f:a0:bf:35:db:
+        4b:9e:7b:e8:ff:e7:0d:3c:3b:a8:9b:49:41:46:f5:73:4e:ff:
+        92:65:21:83:13:55:71:eb:49:3c:7f:88:1a:c2:12:28:25:a1:
+        46:4b:41:37:97:7f:ec:8e:f1:d4:a1:96:c2:20:b6:5e:ad:a9:
+        1c:1e:11:a0
+
+BelSign Object Publishing CA
+============================
+MD5 Fingerprint: 8A:02:F8:DF:B8:E1:84:9F:5A:C2:60:24:65:D1:73:FB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAmygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBuzELMAkGA1UEBhMCQkUx
+ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTgwNgYDVQQL
+Ey9CZWxTaWduIE9iamVjdCBQdWJsaXNoaW5nIENlcnRpZmljYXRlIEF1dGhvcml0
+eTElMCMGA1UEAxMcQmVsU2lnbiBPYmplY3QgUHVibGlzaGluZyBDQTEjMCEGCSqG
+SIb3DQEJARYUd2VibWFzdGVyQGJlbHNpZ24uYmUwHhcNOTcwOTE5MjIwMzAwWhcN
+MDcwOTE5MjIwMzAwWjCBuzELMAkGA1UEBhMCQkUxETAPBgNVBAcTCEJydXNzZWxz
+MRMwEQYDVQQKEwpCZWxTaWduIE5WMTgwNgYDVQQLEy9CZWxTaWduIE9iamVjdCBQ
+dWJsaXNoaW5nIENlcnRpZmljYXRlIEF1dGhvcml0eTElMCMGA1UEAxMcQmVsU2ln
+biBPYmplY3QgUHVibGlzaGluZyBDQTEjMCEGCSqGSIb3DQEJARYUd2VibWFzdGVy
+QGJlbHNpZ24uYmUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMQuH7a/7oJA
+3fm3LkHVngWxWtAmfGJVA5v8y2HeS+/+6Jn+h7mIz5DaDwk8dt8Xl7bLPyVF/bS8
+WAC+sFq2FIeP7mdkrR2Ig7tnn2VhAFgIgFCfgMkx9iqQHC33SmwQ9iNDXTgJYIhX
+As0WbBj8zfuSKnfQnpOjXYhk0Mj4XVRRAgMBAAGjFTATMBEGCWCGSAGG+EIBAQQE
+AwIABzANBgkqhkiG9w0BAQQFAAOBgQBjdhd8lvBTpV0BHFPOKcJ+daxMDaIIc7Rq
+Mf0CBhSZ3FQEpL/IloafMUMyJVf2hfYluze+oXkjyVcGJXFrRU/49AJAFoIir1Tq
+Mij2De6ZuksIUQ9uhiMhTC0liIHELg7xEyw4ipUCJMM6lWPkk45IuwhHcl+u5jpa
+R9Zxxp6aUg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Object Publishing Certificate Authority, CN=BelSign Object Publishing CA/Email=webmaster at belsign.be
+        Validity
+            Not Before: Sep 19 22:03:00 1997 GMT
+            Not After : Sep 19 22:03:00 2007 GMT
+        Subject: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Object Publishing Certificate Authority, CN=BelSign Object Publishing CA/Email=webmaster at belsign.be
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c4:2e:1f:b6:bf:ee:82:40:dd:f9:b7:2e:41:d5:
+                    9e:05:b1:5a:d0:26:7c:62:55:03:9b:fc:cb:61:de:
+                    4b:ef:fe:e8:99:fe:87:b9:88:cf:90:da:0f:09:3c:
+                    76:df:17:97:b6:cb:3f:25:45:fd:b4:bc:58:00:be:
+                    b0:5a:b6:14:87:8f:ee:67:64:ad:1d:88:83:bb:67:
+                    9f:65:61:00:58:08:80:50:9f:80:c9:31:f6:2a:90:
+                    1c:2d:f7:4a:6c:10:f6:23:43:5d:38:09:60:88:57:
+                    02:cd:16:6c:18:fc:cd:fb:92:2a:77:d0:9e:93:a3:
+                    5d:88:64:d0:c8:f8:5d:54:51
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        63:76:17:7c:96:f0:53:a5:5d:01:1c:53:ce:29:c2:7e:75:ac:
+        4c:0d:a2:08:73:b4:6a:31:fd:02:06:14:99:dc:54:04:a4:bf:
+        c8:96:86:9f:31:43:32:25:57:f6:85:f6:25:bb:37:be:a1:79:
+        23:c9:57:06:25:71:6b:45:4f:f8:f4:02:40:16:82:22:af:54:
+        ea:32:28:f6:0d:ee:99:ba:4b:08:51:0f:6e:86:23:21:4c:2d:
+        25:88:81:c4:2e:0e:f1:13:2c:38:8a:95:02:24:c3:3a:95:63:
+        e4:93:8e:48:bb:08:47:72:5f:ae:e6:3a:5a:47:d6:71:c6:9e:
+        9a:52
+
+BelSign Secure Server CA
+========================
+MD5 Fingerprint: 3D:5E:82:C6:D9:AD:D9:8B:93:6B:0C:10:B9:49:0A:B1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC8zCCAlygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBszELMAkGA1UEBhMCQkUx
+ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTQwMgYDVQQL
+EytCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSEw
+HwYDVQQDExhCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ0ExIzAhBgkqhkiG9w0BCQEW
+FHdlYm1hc3RlckBiZWxzaWduLmJlMB4XDTk3MDcxNjIyMDA1NFoXDTA3MDcxNjIy
+MDA1NFowgbMxCzAJBgNVBAYTAkJFMREwDwYDVQQHEwhCcnVzc2VsczETMBEGA1UE
+ChMKQmVsU2lnbiBOVjE0MDIGA1UECxMrQmVsU2lnbiBTZWN1cmUgU2VydmVyIENl
+cnRpZmljYXRlIEF1dGhvcml0eTEhMB8GA1UEAxMYQmVsU2lnbiBTZWN1cmUgU2Vy
+dmVyIENBMSMwIQYJKoZIhvcNAQkBFhR3ZWJtYXN0ZXJAYmVsc2lnbi5iZTCBnzAN
+BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1gESeJL4BEJ/yccig/x8R3AwK0kLPjZA
+kCjaIXODU/LE0RZAwFP/rqbGJLMnbaWzPTl3XagG9ubpvGMRTgZlcAqdk/miQIt/
+SoQOjRax1swIZBIM4ChLyKWEkBf7EUYu1qeFGMsYrmOasFgG9ADP+MQJGjUMofnu
+Sv1t3v4mpTsCAwEAAaMVMBMwEQYJYIZIAYb4QgEBBAQDAgCgMA0GCSqGSIb3DQEB
+BAUAA4GBAGw9mcMF4h3K5S2qaIWLQDEgZhNo5lg6idCNdbLFYth9go/32TKBd/Y1
+W4UpzmeyubwrGXjP84f9RvGVdbIJVwMwwXrNckdxgMp9ncllPEcRIn36BwsoeKGT
+6AVFSOIyMko96FMcELfHc4wHUOH5yStTQfWDjeUJOUqOA2KqQGOL
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Secure Server Certificate Authority, CN=BelSign Secure Server CA/Email=webmaster at belsign.be
+        Validity
+            Not Before: Jul 16 22:00:54 1997 GMT
+            Not After : Jul 16 22:00:54 2007 GMT
+        Subject: C=BE, L=Brussels, O=BelSign NV, OU=BelSign Secure Server Certificate Authority, CN=BelSign Secure Server CA/Email=webmaster at belsign.be
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d6:01:12:78:92:f8:04:42:7f:c9:c7:22:83:fc:
+                    7c:47:70:30:2b:49:0b:3e:36:40:90:28:da:21:73:
+                    83:53:f2:c4:d1:16:40:c0:53:ff:ae:a6:c6:24:b3:
+                    27:6d:a5:b3:3d:39:77:5d:a8:06:f6:e6:e9:bc:63:
+                    11:4e:06:65:70:0a:9d:93:f9:a2:40:8b:7f:4a:84:
+                    0e:8d:16:b1:d6:cc:08:64:12:0c:e0:28:4b:c8:a5:
+                    84:90:17:fb:11:46:2e:d6:a7:85:18:cb:18:ae:63:
+                    9a:b0:58:06:f4:00:cf:f8:c4:09:1a:35:0c:a1:f9:
+                    ee:4a:fd:6d:de:fe:26:a5:3b
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL Client, S/MIME
+    Signature Algorithm: md5WithRSAEncryption
+        6c:3d:99:c3:05:e2:1d:ca:e5:2d:aa:68:85:8b:40:31:20:66:
+        13:68:e6:58:3a:89:d0:8d:75:b2:c5:62:d8:7d:82:8f:f7:d9:
+        32:81:77:f6:35:5b:85:29:ce:67:b2:b9:bc:2b:19:78:cf:f3:
+        87:fd:46:f1:95:75:b2:09:57:03:30:c1:7a:cd:72:47:71:80:
+        ca:7d:9d:c9:65:3c:47:11:22:7d:fa:07:0b:28:78:a1:93:e8:
+        05:45:48:e2:32:32:4a:3d:e8:53:1c:10:b7:c7:73:8c:07:50:
+        e1:f9:c9:2b:53:41:f5:83:8d:e5:09:39:4a:8e:03:62:aa:40:
+        63:8b
+
+Deutsche Telekom AG Root CA
+===========================
+MD5 Fingerprint: 77:DE:04:94:77:D0:0C:5F:A7:B1:F4:30:18:87:FB:55
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICjjCCAfegAwIBAgIBBjANBgkqhkiG9w0BAQQFADBtMQswCQYDVQQGEwJERTEc
+MBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEdMBsGA1UECxMUVGVsZVNlYyBU
+cnVzdCBDZW50ZXIxITAfBgNVBAMTGERldXRzY2hlIFRlbGVrb20gUm9vdCBDQTAe
+Fw05ODEyMDkwOTExMDBaFw0wNDEyMDkyMzU5MDBaMG0xCzAJBgNVBAYTAkRFMRww
+GgYDVQQKExNEZXV0c2NoZSBUZWxla29tIEFHMR0wGwYDVQQLExRUZWxlU2VjIFRy
+dXN0IENlbnRlcjEhMB8GA1UEAxMYRGV1dHNjaGUgVGVsZWtvbSBSb290IENBMIGf
+MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdBSz5BbO5EtdpcffqVjAIVxRDe7sa
+nG0vV2HX4vVEa+42QZb2ZM7hwbK5pBQEmFDocPiONZp9ScFhHVmu2gYYlX2tzuyp
+vtEYD0CRdiqj5f3+iRX0V/fgVdp1rQD0LME1zLRDJlViRC4BJZyKW/DB0AA1eP41
+3pRAZHiDocw5iQIDAQABoz4wPDAPBgNVHRMECDAGAQH/AgEFMA4GA1UdDwEB/wQE
+AwIBBjAZBgNVHQ4EEgQQLIdZH4sTgLL5hp0+En5YljANBgkqhkiG9w0BAQQFAAOB
+gQAP/nO1B4hvoAuJ6spQH5TelCsLJ15P9RyVJtqMllStGZE3Q12ryYuzzW+YOT3t
+3TXjcbftE5OD6IblKTMTE7w1e/0oL3BZ1dO0jSgTWTvI1XT5RcIHYKq4GFT5pWj/
+1wXVj7YFMS5BSvQQH2BHGguLGU2SVyDS71AZ6M3QcLy8Ng==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 6 (0x6)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, O=Deutsche Telekom AG, OU=TeleSec Trust Center, CN=Deutsche Telekom Root CA
+        Validity
+            Not Before: Dec  9 09:11:00 1998 GMT
+            Not After : Dec  9 23:59:00 2004 GMT
+        Subject: C=DE, O=Deutsche Telekom AG, OU=TeleSec Trust Center, CN=Deutsche Telekom Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:dd:05:2c:f9:05:b3:b9:12:d7:69:71:f7:ea:56:
+                    30:08:57:14:43:7b:bb:1a:9c:6d:2f:57:61:d7:e2:
+                    f5:44:6b:ee:36:41:96:f6:64:ce:e1:c1:b2:b9:a4:
+                    14:04:98:50:e8:70:f8:8e:35:9a:7d:49:c1:61:1d:
+                    59:ae:da:06:18:95:7d:ad:ce:ec:a9:be:d1:18:0f:
+                    40:91:76:2a:a3:e5:fd:fe:89:15:f4:57:f7:e0:55:
+                    da:75:ad:00:f4:2c:c1:35:cc:b4:43:26:55:62:44:
+                    2e:01:25:9c:8a:5b:f0:c1:d0:00:35:78:fe:35:de:
+                    94:40:64:78:83:a1:cc:39:89
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: 
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                2C:87:59:1F:8B:13:80:B2:F9:86:9D:3E:12:7E:58:96
+    Signature Algorithm: md5WithRSAEncryption
+        0f:fe:73:b5:07:88:6f:a0:0b:89:ea:ca:50:1f:94:de:94:2b:
+        0b:27:5e:4f:f5:1c:95:26:da:8c:96:54:ad:19:91:37:43:5d:
+        ab:c9:8b:b3:cd:6f:98:39:3d:ed:dd:35:e3:71:b7:ed:13:93:
+        83:e8:86:e5:29:33:13:13:bc:35:7b:fd:28:2f:70:59:d5:d3:
+        b4:8d:28:13:59:3b:c8:d5:74:f9:45:c2:07:60:aa:b8:18:54:
+        f9:a5:68:ff:d7:05:d5:8f:b6:05:31:2e:41:4a:f4:10:1f:60:
+        47:1a:0b:8b:19:4d:92:57:20:d2:ef:50:19:e8:cd:d0:70:bc:
+        bc:36
+
+Digital Signature Trust Co. Global CA 1
+=======================================
+MD5 Fingerprint: 25:7A:BA:83:2E:B6:A2:0B:DA:FE:F5:02:0F:08:D7:AD
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
+EwhEU1RDQSBFMTAeFw05ODEyMTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJ
+BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
+ETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQCg
+bIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJENySZ
+j9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlV
+Sn5JTe2io74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCG
+SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx
+JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI
+RFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMTAxODEw
+MjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFGp5
+fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i
++DAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG
+SIb3DQEBBQUAA4GBACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lN
+QseSJqBcNJo4cvj9axY+IO6CizEqkzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+
+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4RbyhkwS7hp86W0N6w4pl
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913315222 (0x36701596)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DSTCA E1
+        Validity
+            Not Before: Dec 10 18:10:23 1998 GMT
+            Not After : Dec 10 18:40:23 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DSTCA E1
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:a0:6c:81:a9:cf:34:1e:24:dd:fe:86:28:cc:de:
+                    83:2f:f9:5e:d4:42:d2:e8:74:60:66:13:98:06:1c:
+                    a9:51:12:69:6f:31:55:b9:49:72:00:08:7e:d3:a5:
+                    62:44:37:24:99:8f:d9:83:48:8f:99:6d:95:13:bb:
+                    43:3b:2e:49:4e:88:37:c1:bb:58:7f:fe:e1:bd:f8:
+                    bb:61:cd:f3:47:c0:99:a6:f1:f3:91:e8:78:7c:00:
+                    cb:61:c9:44:27:71:69:55:4a:7e:49:4d:ed:a2:a3:
+                    be:02:4c:00:ca:02:a8:ee:01:02:31:64:0f:52:2d:
+                    13:74:76:36:b5:7a:b4:2d:71
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DSTCA E1/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec 10 18:10:23 1998 GMT, Not After: Dec 10 18:10:23 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:6A:79:7E:91:69:46:18:13:0A:02:77:A5:59:5B:60:98:25:0E:A2:F8
+
+            X509v3 Subject Key Identifier: 
+                6A:79:7E:91:69:46:18:13:0A:02:77:A5:59:5B:60:98:25:0E:A2:F8
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        22:12:d8:7a:1d:dc:81:06:b6:09:65:b2:87:c8:1f:5e:b4:2f:
+        e9:c4:1e:f2:3c:c1:bb:04:90:11:4a:83:4e:7e:93:b9:4d:42:
+        c7:92:26:a0:5c:34:9a:38:72:f8:fd:6b:16:3e:20:ee:82:8b:
+        31:2a:93:36:85:23:88:8a:3c:03:68:d3:c9:09:0f:4d:fc:6c:
+        a4:da:28:72:93:0e:89:80:b0:7d:fe:80:6f:65:6d:18:33:97:
+        8b:c2:6b:89:ee:60:3d:c8:9b:ef:7f:2b:32:62:73:93:cb:3c:
+        e3:7b:e2:76:78:45:bc:a1:93:04:bb:86:9f:3a:5b:43:7a:c3:
+        8a:65
+
+Digital Signature Trust Co. Global CA 2
+=======================================
+MD5 Fingerprint: 6C:C9:A7:6E:47:F1:0C:E3:53:3B:78:4C:4D:C2:6A:C5
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID2DCCAsACEQDQHkCLAAACfAAAAAIAAAABMA0GCSqGSIb3DQEBBQUAMIGpMQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UE
+CxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDExITAfBgkqhkiG9w0B
+CQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODEyMDExODE4NTVaFw0wODExMjgx
+ODE4NTVaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMO
+U2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0
+IENvLjERMA8GA1UECxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDEx
+ITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBANLGJrbnpT3BxGjVUG9TxW9JEwm4ryxIjRRqoxdf
+WvnTLnUv2Chi0ZMv/E3Uq4flCMeZ55I/db3rJbQVwZsZPdJEjdd0IG03Ao9pk1uK
+xBmd9LIO/BZsubEFkoPRhSxglD5FVaDZqwgh5mDoO3TymVBRaNADLbGAvqPYUrBE
+zUNKcI5YhZXhTizWLUFv1oTnyJhEykfbLCSlaSbPa7gnYsP0yXqSI+0TZ4KuRS5F
+5X5yP4WdlGIQ5jyRoa13AOAV7POEgHJ6jm5gl8ckWRA0g1vhpaRptlc1HHhZxtMv
+OnNn7pTKBBMFYgZwI7P0fO5F2WQLW0mqpEPOJsREEmy43XkCAwEAATANBgkqhkiG
+9w0BAQUFAAOCAQEAojeyP2n714Z5VEkxlTMr89EJFEliYIalsBHiUMIdBlc+Legz
+ZL6bqq1fG03UmZWii5rJYnK1aerZWKs17RWiQ9a2vAd5ZWRzfdd5ynvVWlHG4VME
+lo04z6MXrDlxawHDi1M8Y+nuecDkvpIyZHqzH5eUYr3qsiAVlfuX8ngvYzZAOONG
+Dx3drJXK50uQe7FLqdTF65raqtWjlBRGjS0f8zrWkzr2Pnn86Oawde3uPclwx12q
+gUtGJRzHbBXjlU4PqjI3lAoXJJIThFjSY28r9+ZbYgsTF7ANUkz+/m9c4pFuHf2k
+Ytdo+o56T9II2pPc8JIRetDccpMMc5NihWjQ9A==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:02:7c:00:00:00:02:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X1, CN=DST RootCA X1/Email=ca at digsigtrust.com
+        Validity
+            Not Before: Dec  1 18:18:55 1998 GMT
+            Not After : Nov 28 18:18:55 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X1, CN=DST RootCA X1/Email=ca at digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d2:c6:26:b6:e7:a5:3d:c1:c4:68:d5:50:6f:53:
+                    c5:6f:49:13:09:b8:af:2c:48:8d:14:6a:a3:17:5f:
+                    5a:f9:d3:2e:75:2f:d8:28:62:d1:93:2f:fc:4d:d4:
+                    ab:87:e5:08:c7:99:e7:92:3f:75:bd:eb:25:b4:15:
+                    c1:9b:19:3d:d2:44:8d:d7:74:20:6d:37:02:8f:69:
+                    93:5b:8a:c4:19:9d:f4:b2:0e:fc:16:6c:b9:b1:05:
+                    92:83:d1:85:2c:60:94:3e:45:55:a0:d9:ab:08:21:
+                    e6:60:e8:3b:74:f2:99:50:51:68:d0:03:2d:b1:80:
+                    be:a3:d8:52:b0:44:cd:43:4a:70:8e:58:85:95:e1:
+                    4e:2c:d6:2d:41:6f:d6:84:e7:c8:98:44:ca:47:db:
+                    2c:24:a5:69:26:cf:6b:b8:27:62:c3:f4:c9:7a:92:
+                    23:ed:13:67:82:ae:45:2e:45:e5:7e:72:3f:85:9d:
+                    94:62:10:e6:3c:91:a1:ad:77:00:e0:15:ec:f3:84:
+                    80:72:7a:8e:6e:60:97:c7:24:59:10:34:83:5b:e1:
+                    a5:a4:69:b6:57:35:1c:78:59:c6:d3:2f:3a:73:67:
+                    ee:94:ca:04:13:05:62:06:70:23:b3:f4:7c:ee:45:
+                    d9:64:0b:5b:49:aa:a4:43:ce:26:c4:44:12:6c:b8:
+                    dd:79
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        a2:37:b2:3f:69:fb:d7:86:79:54:49:31:95:33:2b:f3:d1:09:
+        14:49:62:60:86:a5:b0:11:e2:50:c2:1d:06:57:3e:2d:e8:33:
+        64:be:9b:aa:ad:5f:1b:4d:d4:99:95:a2:8b:9a:c9:62:72:b5:
+        69:ea:d9:58:ab:35:ed:15:a2:43:d6:b6:bc:07:79:65:64:73:
+        7d:d7:79:ca:7b:d5:5a:51:c6:e1:53:04:96:8d:38:cf:a3:17:
+        ac:39:71:6b:01:c3:8b:53:3c:63:e9:ee:79:c0:e4:be:92:32:
+        64:7a:b3:1f:97:94:62:bd:ea:b2:20:15:95:fb:97:f2:78:2f:
+        63:36:40:38:e3:46:0f:1d:dd:ac:95:ca:e7:4b:90:7b:b1:4b:
+        a9:d4:c5:eb:9a:da:aa:d5:a3:94:14:46:8d:2d:1f:f3:3a:d6:
+        93:3a:f6:3e:79:fc:e8:e6:b0:75:ed:ee:3d:c9:70:c7:5d:aa:
+        81:4b:46:25:1c:c7:6c:15:e3:95:4e:0f:aa:32:37:94:0a:17:
+        24:92:13:84:58:d2:63:6f:2b:f7:e6:5b:62:0b:13:17:b0:0d:
+        52:4c:fe:fe:6f:5c:e2:91:6e:1d:fd:a4:62:d7:68:fa:8e:7a:
+        4f:d2:08:da:93:dc:f0:92:11:7a:d0:dc:72:93:0c:73:93:62:
+        85:68:d0:f4
+
+Digital Signature Trust Co. Global CA 3
+=======================================
+MD5 Fingerprint: 93:C2:8E:11:7B:D4:F3:03:19:BD:28:75:13:4A:45:4A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
+EwhEU1RDQSBFMjAeFw05ODEyMDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJ
+BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
+ETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC/
+k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGODVvso
+LeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3o
+TQPMx7JSxhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCG
+SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx
+JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI
+RFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxOTE3
+MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFB6C
+TShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5
+WzAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG
+SIb3DQEBBQUAA4GBAEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHR
+xdf0CiUPPXiBng+xZ8SQTGPdXqfiup/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVL
+B3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1mPnHfxsb1gYgAlihw6ID
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913232846 (0x366ed3ce)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DSTCA E2
+        Validity
+            Not Before: Dec  9 19:17:26 1998 GMT
+            Not After : Dec  9 19:47:26 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DSTCA E2
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bf:93:8f:17:92:ef:33:13:18:eb:10:7f:4e:16:
+                    bf:ff:06:8f:2a:85:bc:5e:f9:24:a6:24:88:b6:03:
+                    b7:c1:c3:5f:03:5b:d1:6f:ae:7e:42:ea:66:23:b8:
+                    63:83:56:fb:28:2d:e1:38:8b:b4:ee:a8:01:e1:ce:
+                    1c:b6:88:2a:22:46:85:fb:9f:a7:70:a9:47:14:3f:
+                    ce:de:65:f0:a8:71:f7:4f:26:6c:8c:bc:c6:b5:ef:
+                    de:49:27:ff:48:2a:7d:e8:4d:03:cc:c7:b2:52:c6:
+                    17:31:13:3b:b5:4d:db:c8:c4:f6:c3:0f:24:2a:da:
+                    0c:9d:e7:91:5b:80:cd:94:9d
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DSTCA E2/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 19:17:26 1998 GMT, Not After: Dec  9 19:17:26 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:1E:82:4D:28:65:80:3C:C9:41:6E:AC:35:2E:5A:CB:DE:EE:F8:39:5B
+
+            X509v3 Subject Key Identifier: 
+                1E:82:4D:28:65:80:3C:C9:41:6E:AC:35:2E:5A:CB:DE:EE:F8:39:5B
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        47:8d:83:ad:62:f2:db:b0:9e:45:22:05:b9:a2:d6:03:0e:38:
+        72:e7:9e:fc:7b:e6:93:b6:9a:a5:a2:94:c8:34:1d:91:d1:c5:
+        d7:f4:0a:25:0f:3d:78:81:9e:0f:b1:67:c4:90:4c:63:dd:5e:
+        a7:e2:ba:9f:f5:f7:4d:a5:31:7b:9c:29:2d:4c:fe:64:3e:ec:
+        b6:53:fe:ea:9b:ed:82:db:74:75:4b:07:79:6e:1e:d8:19:83:
+        73:de:f5:3e:d0:b5:de:e7:4b:68:7d:43:2e:2a:20:e1:7e:a0:
+        78:44:9e:08:f5:98:f9:c7:7f:1b:1b:d6:06:20:02:58:a1:c3:
+        a2:03
+
+Digital Signature Trust Co. Global CA 4
+=======================================
+MD5 Fingerprint: CD:3B:3D:62:5B:09:B8:09:36:87:9E:12:2F:71:64:BA
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID2DCCAsACEQDQHkCLAAB3bQAAAAEAAAAEMA0GCSqGSIb3DQEBBQUAMIGpMQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UE
+CxMIRFNUQ0EgWDIxFjAUBgNVBAMTDURTVCBSb290Q0EgWDIxITAfBgkqhkiG9w0B
+CQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODExMzAyMjQ2MTZaFw0wODExMjcy
+MjQ2MTZaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMO
+U2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0
+IENvLjERMA8GA1UECxMIRFNUQ0EgWDIxFjAUBgNVBAMTDURTVCBSb290Q0EgWDIx
+ITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBANx18IzAdZaawGIfJvfE4Zrq4FZzW5nNAUSoCLbV
+p9oaBBg5kkp4o4HC9Xd6ULRw/5qrxsfKboNPQpj7Jgva3G3WqZlVUmfpKAOS3OWw
+BZoPFflrWXJW8vo5/Kpo7g8fEIMv/J36F5bdguPmRX3AS4BEH+0s4IT9kVySVGkl
+5WJp3OXuAFK9MwutdQKFp2RQLcUZGTDAJtvJ0/0uma1ZtQtN1EGuhUhDWdy3qOKi
+3sOP17ihYqZoUFLkzzGnlIXan0YyF1bl8utmPRL/Q9uY73fPy4GNNLHGUEom0eQ+
+QVCvbK4iNC7Va26Dunm4dmVI2gkpZGMiuftHdoWMhkTLCdsCAwEAATANBgkqhkiG
+9w0BAQUFAAOCAQEAtTYOXeFhKFoRZcA/gwN5Tb4opgsHAlKFzfiR0BBstWogWxyQ
+2TA8xkieil5k+aFxd+8EJx8H6+Qm93N0yUQYGmbT4EOvkTvRyyzYdFQ6HE3K1GjN
+I3wdEJ5F6fYAbqbNGf9PLCmPV03Ed5K+4EwJ+11EhmYhqLkyolbV6YyDfFk/xPEL
+553snr2cGA4+wjl5KLcDDQjLxufZATdQEOzMYRZA1K8xdHv8PzGn0EdzMzkbzE5q
+10mDEQb+64JYMzJM8FasHpwvVpp7wUocpf1VNs78lk30sPDst2yC7S8xmUJMqbIN
+uBVd8d+6ybVK1GSYsyapMMj9puyrliGtf8J4tg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:77:6d:00:00:00:01:00:00:00:04
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X2, CN=DST RootCA X2/Email=ca at digsigtrust.com
+        Validity
+            Not Before: Nov 30 22:46:16 1998 GMT
+            Not After : Nov 27 22:46:16 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X2, CN=DST RootCA X2/Email=ca at digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:dc:75:f0:8c:c0:75:96:9a:c0:62:1f:26:f7:c4:
+                    e1:9a:ea:e0:56:73:5b:99:cd:01:44:a8:08:b6:d5:
+                    a7:da:1a:04:18:39:92:4a:78:a3:81:c2:f5:77:7a:
+                    50:b4:70:ff:9a:ab:c6:c7:ca:6e:83:4f:42:98:fb:
+                    26:0b:da:dc:6d:d6:a9:99:55:52:67:e9:28:03:92:
+                    dc:e5:b0:05:9a:0f:15:f9:6b:59:72:56:f2:fa:39:
+                    fc:aa:68:ee:0f:1f:10:83:2f:fc:9d:fa:17:96:dd:
+                    82:e3:e6:45:7d:c0:4b:80:44:1f:ed:2c:e0:84:fd:
+                    91:5c:92:54:69:25:e5:62:69:dc:e5:ee:00:52:bd:
+                    33:0b:ad:75:02:85:a7:64:50:2d:c5:19:19:30:c0:
+                    26:db:c9:d3:fd:2e:99:ad:59:b5:0b:4d:d4:41:ae:
+                    85:48:43:59:dc:b7:a8:e2:a2:de:c3:8f:d7:b8:a1:
+                    62:a6:68:50:52:e4:cf:31:a7:94:85:da:9f:46:32:
+                    17:56:e5:f2:eb:66:3d:12:ff:43:db:98:ef:77:cf:
+                    cb:81:8d:34:b1:c6:50:4a:26:d1:e4:3e:41:50:af:
+                    6c:ae:22:34:2e:d5:6b:6e:83:ba:79:b8:76:65:48:
+                    da:09:29:64:63:22:b9:fb:47:76:85:8c:86:44:cb:
+                    09:db
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        b5:36:0e:5d:e1:61:28:5a:11:65:c0:3f:83:03:79:4d:be:28:
+        a6:0b:07:02:52:85:cd:f8:91:d0:10:6c:b5:6a:20:5b:1c:90:
+        d9:30:3c:c6:48:9e:8a:5e:64:f9:a1:71:77:ef:04:27:1f:07:
+        eb:e4:26:f7:73:74:c9:44:18:1a:66:d3:e0:43:af:91:3b:d1:
+        cb:2c:d8:74:54:3a:1c:4d:ca:d4:68:cd:23:7c:1d:10:9e:45:
+        e9:f6:00:6e:a6:cd:19:ff:4f:2c:29:8f:57:4d:c4:77:92:be:
+        e0:4c:09:fb:5d:44:86:66:21:a8:b9:32:a2:56:d5:e9:8c:83:
+        7c:59:3f:c4:f1:0b:e7:9d:ec:9e:bd:9c:18:0e:3e:c2:39:79:
+        28:b7:03:0d:08:cb:c6:e7:d9:01:37:50:10:ec:cc:61:16:40:
+        d4:af:31:74:7b:fc:3f:31:a7:d0:47:73:33:39:1b:cc:4e:6a:
+        d7:49:83:11:06:fe:eb:82:58:33:32:4c:f0:56:ac:1e:9c:2f:
+        56:9a:7b:c1:4a:1c:a5:fd:55:36:ce:fc:96:4d:f4:b0:f0:ec:
+        b7:6c:82:ed:2f:31:99:42:4c:a9:b2:0d:b8:15:5d:f1:df:ba:
+        c9:b5:4a:d4:64:98:b3:26:a9:30:c8:fd:a6:ec:ab:96:21:ad:
+        7f:c2:78:b6
+
+Entrust Worldwide by DST
+========================
+MD5 Fingerprint: B4:65:22:0A:7C:AD:DF:41:B7:D5:44:D5:AD:FA:9A:75
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDRzCCArCgAwIBAgIENm3FGDANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRswGQYDVQQL
+ExJEU1QtRW50cnVzdCBHVEkgQ0EwHhcNOTgxMjA5MDAwMjI0WhcNMTgxMjA5MDAz
+MjI0WjBQMQswCQYDVQQGEwJVUzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUg
+VHJ1c3QgQ28uMRswGQYDVQQLExJEU1QtRW50cnVzdCBHVEkgQ0EwgZ0wDQYJKoZI
+hvcNAQEBBQADgYsAMIGHAoGBALYd90uNDxPjEvUJ/gYyDq9MQfV91Ec9KgrfgwXe
+3n3mAxb2UTrLRxpKrX7E/R20vnSKeN0Lg460hBPE+/htKa6h4Q8PQ+O1XmBp+oOU
+/Hnm3Hbt0UQrjv0Su/4XdxcMie2n71F9xO04wzujevviTaBgtfL9E2XTxuw/vjWc
+PSLvAgEDo4IBLjCCASowEQYJYIZIAYb4QgEBBAQDAgAHMHIGA1UdHwRrMGkwZ6Bl
+oGOkYTBfMQswCQYDVQQGEwJVUzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUg
+VHJ1c3QgQ28uMRswGQYDVQQLExJEU1QtRW50cnVzdCBHVEkgQ0ExDTALBgNVBAMT
+BENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkwMDAyMjRagQ8yMDE4MTIwOTAwMDIy
+NFowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFJOaRMrQeFOAKUkE38evMz+ZdV+u
+MB0GA1UdDgQWBBSTmkTK0HhTgClJBN/HrzM/mXVfrjAMBgNVHRMEBTADAQH/MBkG
+CSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GBAGSJzAOn
+3AryWCDn/RegKHLNh7DNmLUkR2MzMRAQsu+KV3KuTAPgZ5+sYEOEIsGpo+Wxp94J
+1M8NeEYjW49Je/4TIpeU6nJI4SwgeJbpZkUZywllY2E/0UmYsXYQVdVjSmZLpAdr
+3nt/ueaTWxoCW4AO3Y0Y1Iqjwmjxo+AY0U5M
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 913163544 (0x366dc518)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Digital Signature Trust Co., OU=DST-Entrust GTI CA
+        Validity
+            Not Before: Dec  9 00:02:24 1998 GMT
+            Not After : Dec  9 00:32:24 2018 GMT
+        Subject: C=US, O=Digital Signature Trust Co., OU=DST-Entrust GTI CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:1d:f7:4b:8d:0f:13:e3:12:f5:09:fe:06:32:
+                    0e:af:4c:41:f5:7d:d4:47:3d:2a:0a:df:83:05:de:
+                    de:7d:e6:03:16:f6:51:3a:cb:47:1a:4a:ad:7e:c4:
+                    fd:1d:b4:be:74:8a:78:dd:0b:83:8e:b4:84:13:c4:
+                    fb:f8:6d:29:ae:a1:e1:0f:0f:43:e3:b5:5e:60:69:
+                    fa:83:94:fc:79:e6:dc:76:ed:d1:44:2b:8e:fd:12:
+                    bb:fe:17:77:17:0c:89:ed:a7:ef:51:7d:c4:ed:38:
+                    c3:3b:a3:7a:fb:e2:4d:a0:60:b5:f2:fd:13:65:d3:
+                    c6:ec:3f:be:35:9c:3d:22:ef
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Digital Signature Trust Co./OU=DST-Entrust GTI CA/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Dec  9 00:02:24 1998 GMT, Not After: Dec  9 00:02:24 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:93:9A:44:CA:D0:78:53:80:29:49:04:DF:C7:AF:33:3F:99:75:5F:AE
+
+            X509v3 Subject Key Identifier: 
+                93:9A:44:CA:D0:78:53:80:29:49:04:DF:C7:AF:33:3F:99:75:5F:AE
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        64:89:cc:03:a7:dc:0a:f2:58:20:e7:fd:17:a0:28:72:cd:87:
+        b0:cd:98:b5:24:47:63:33:31:10:10:b2:ef:8a:57:72:ae:4c:
+        03:e0:67:9f:ac:60:43:84:22:c1:a9:a3:e5:b1:a7:de:09:d4:
+        cf:0d:78:46:23:5b:8f:49:7b:fe:13:22:97:94:ea:72:48:e1:
+        2c:20:78:96:e9:66:45:19:cb:09:65:63:61:3f:d1:49:98:b1:
+        76:10:55:d5:63:4a:66:4b:a4:07:6b:de:7b:7f:b9:e6:93:5b:
+        1a:02:5b:80:0e:dd:8d:18:d4:8a:a3:c2:68:f1:a3:e0:18:d1:
+        4e:4c
+
+Entrust.net Premium 2048 Secure Server CA
+=========================================
+MD5 Fingerprint: BA:21:EA:20:D6:DD:DB:8F:C1:57:8B:40:AD:A1:FC:FC
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
+RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
+bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
+IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0xOTEy
+MjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3
+LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp
+YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG
+A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq
+K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe
+sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX
+MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT
+XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/
+HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH
+4QIDAQABo3QwcjARBglghkgBhvhCAQEEBAMCAAcwHwYDVR0jBBgwFoAUVeSB0RGA
+vtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdERgL7YibkIozH5oSQJFrlwMB0G
+CSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEA
+WUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo
+oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQ
+h7A6tcOdBTcSo8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18
+f3v/rxzP5tsHrV7bhZ3QKw0z2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfN
+B/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjXOP/swNlQ8C5LWK5Gb9Auw2DaclVy
+vUxFnmG6v4SBkgPR0ml8xQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 946059622 (0x3863b966)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048)
+        Validity
+            Not Before: Dec 24 17:50:51 1999 GMT
+            Not After : Dec 24 18:20:51 2019 GMT
+        Subject: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048)
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:4d:4b:a9:12:86:b2:ea:a3:20:07:15:16:64:
+                    2a:2b:4b:d1:bf:0b:4a:4d:8e:ed:80:76:a5:67:b7:
+                    78:40:c0:73:42:c8:68:c0:db:53:2b:dd:5e:b8:76:
+                    98:35:93:8b:1a:9d:7c:13:3a:0e:1f:5b:b7:1e:cf:
+                    e5:24:14:1e:b1:81:a9:8d:7d:b8:cc:6b:4b:03:f1:
+                    02:0c:dc:ab:a5:40:24:00:7f:74:94:a1:9d:08:29:
+                    b3:88:0b:f5:87:77:9d:55:cd:e4:c3:7e:d7:6a:64:
+                    ab:85:14:86:95:5b:97:32:50:6f:3d:c8:ba:66:0c:
+                    e3:fc:bd:b8:49:c1:76:89:49:19:fd:c0:a8:bd:89:
+                    a3:67:2f:c6:9f:bc:71:19:60:b8:2d:e9:2c:c9:90:
+                    76:66:7b:94:e2:af:78:d6:65:53:5d:3c:d6:9c:b2:
+                    cf:29:03:f9:2f:a4:50:b2:d4:48:ce:05:32:55:8a:
+                    fd:b2:64:4c:0e:e4:98:07:75:db:7f:df:b9:08:55:
+                    60:85:30:29:f9:7b:48:a4:69:86:e3:35:3f:1e:86:
+                    5d:7a:7a:15:bd:ef:00:8e:15:22:54:17:00:90:26:
+                    93:bc:0e:49:68:91:bf:f8:47:d3:9d:95:42:c1:0e:
+                    4d:df:6f:26:cf:c3:18:21:62:66:43:70:d6:d5:c0:
+                    07:e1
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 Authority Key Identifier: 
+                keyid:55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70
+
+            X509v3 Subject Key Identifier: 
+                55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70
+            1.2.840.113533.7.65.0: 
+                0...V5.0:4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        59:47:ac:21:84:8a:17:c9:9c:89:53:1e:ba:80:85:1a:c6:3c:
+        4e:3e:b1:9c:b6:7c:c6:92:5d:18:64:02:e3:d3:06:08:11:61:
+        7c:63:e3:2b:9d:31:03:70:76:d2:a3:28:a0:f4:bb:9a:63:73:
+        ed:6d:e5:2a:db:ed:14:a9:2b:c6:36:11:d0:2b:eb:07:8b:a5:
+        da:9e:5c:19:9d:56:12:f5:54:29:c8:05:ed:b2:12:2a:8d:f4:
+        03:1b:ff:e7:92:10:87:b0:3a:b5:c3:9d:05:37:12:a3:c7:f4:
+        15:b9:d5:a4:39:16:9b:53:3a:23:91:f1:a8:82:a2:6a:88:68:
+        c1:79:02:22:bc:aa:a6:d6:ae:df:b0:14:5f:b8:87:d0:dd:7c:
+        7f:7b:ff:af:1c:cf:e6:db:07:ad:5e:db:85:9d:d0:2b:0d:33:
+        db:04:d1:e6:49:40:13:2b:76:fb:3e:e9:9c:89:0f:15:ce:18:
+        b0:85:78:21:4f:6b:4f:0e:fa:36:67:cd:07:f2:ff:08:d0:e2:
+        de:d9:bf:2a:af:b8:87:86:21:3c:04:ca:b7:94:68:7f:cf:3c:
+        e9:98:d7:38:ff:ec:c0:d9:50:f0:2e:4b:58:ae:46:6f:d0:2e:
+        c3:60:da:72:55:72:bd:4c:45:9e:61:ba:bf:84:81:92:03:d1:
+        d2:69:7c:c5
+
+Entrust.net Secure Personal CA
+==============================
+MD5 Fingerprint: 0C:41:2F:13:5B:A0:54:F5:96:66:2D:7E:CD:0E:03:F4
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIE7TCCBFagAwIBAgIEOAOR7jANBgkqhkiG9w0BAQQFADCByTELMAkGA1UEBhMC
+VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MUgwRgYDVQQLFD93d3cuZW50cnVzdC5u
+ZXQvQ2xpZW50X0NBX0luZm8vQ1BTIGluY29ycC4gYnkgcmVmLiBsaW1pdHMgbGlh
+Yi4xJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
+BAMTKkVudHJ1c3QubmV0IENsaWVudCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
+Fw05OTEwMTIxOTI0MzBaFw0xOTEwMTIxOTU0MzBaMIHJMQswCQYDVQQGEwJVUzEU
+MBIGA1UEChMLRW50cnVzdC5uZXQxSDBGBgNVBAsUP3d3dy5lbnRydXN0Lm5ldC9D
+bGllbnRfQ0FfSW5mby9DUFMgaW5jb3JwLiBieSByZWYuIGxpbWl0cyBsaWFiLjEl
+MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMq
+RW50cnVzdC5uZXQgQ2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0G
+CSqGSIb3DQEBAQUAA4GLADCBhwKBgQDIOpleMRffrCdvkHvkGf9FozTC28GoT/Bo
+6oT9n3V5z8GKUZSvx1cDR2SerYIbWtp/N3hHuzeYEpbOxhN979IMMFGpOZ5V+Pux
+5zDeg7K6PvHViTs7hbqqdCz+PzFur5GVbgbUB01LLFZHGARS2g4Qk79jkJvh34zm
+AqTmT173iwIBA6OCAeAwggHcMBEGCWCGSAGG+EIBAQQEAwIABzCCASIGA1UdHwSC
+ARkwggEVMIHkoIHhoIHepIHbMIHYMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50
+cnVzdC5uZXQxSDBGBgNVBAsUP3d3dy5lbnRydXN0Lm5ldC9DbGllbnRfQ0FfSW5m
+by9DUFMgaW5jb3JwLiBieSByZWYuIGxpbWl0cyBsaWFiLjElMCMGA1UECxMcKGMp
+IDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5uZXQg
+Q2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCyg
+KqAohiZodHRwOi8vd3d3LmVudHJ1c3QubmV0L0NSTC9DbGllbnQxLmNybDArBgNV
+HRAEJDAigA8xOTk5MTAxMjE5MjQzMFqBDzIwMTkxMDEyMTkyNDMwWjALBgNVHQ8E
+BAMCAQYwHwYDVR0jBBgwFoAUxPucKXuXzUyW/O5bs8qZdIuV6kwwHQYDVR0OBBYE
+FMT7nCl7l81MlvzuW7PKmXSLlepMMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA
+BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEEBQADgYEAP66K8ddmAwWePvrqHEa7
+pFuPeJoSSJn59DXeDDYHAmsQOokUgZwxpnyyQbJq5wcBoUv5nyU7lsqZwz6hURzz
+wy5E97BnRqqS5TvaHBkUODDV4qIxJS7x7EU47fgGWANzYrAQMY9Av2TgXD7FTx/a
+EkP/TOYGJqibGapEPHayXOw=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 939758062 (0x380391ee)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=Entrust.net, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Client Certification Authority
+        Validity
+            Not Before: Oct 12 19:24:30 1999 GMT
+            Not After : Oct 12 19:54:30 2019 GMT
+        Subject: C=US, O=Entrust.net, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Client Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c8:3a:99:5e:31:17:df:ac:27:6f:90:7b:e4:19:
+                    ff:45:a3:34:c2:db:c1:a8:4f:f0:68:ea:84:fd:9f:
+                    75:79:cf:c1:8a:51:94:af:c7:57:03:47:64:9e:ad:
+                    82:1b:5a:da:7f:37:78:47:bb:37:98:12:96:ce:c6:
+                    13:7d:ef:d2:0c:30:51:a9:39:9e:55:f8:fb:b1:e7:
+                    30:de:83:b2:ba:3e:f1:d5:89:3b:3b:85:ba:aa:74:
+                    2c:fe:3f:31:6e:af:91:95:6e:06:d4:07:4d:4b:2c:
+                    56:47:18:04:52:da:0e:10:93:bf:63:90:9b:e1:df:
+                    8c:e6:02:a4:e6:4f:5e:f7:8b
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Entrust.net/OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab./OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Client Certification Authority/CN=CRL1
+                URI:http://www.entrust.net/CRL/Client1.crl
+
+            X509v3 Private Key Usage Period: 
+                Not Before: Oct 12 19:24:30 1999 GMT, Not After: Oct 12 19:24:30 2019 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:C4:FB:9C:29:7B:97:CD:4C:96:FC:EE:5B:B3:CA:99:74:8B:95:EA:4C
+
+            X509v3 Subject Key Identifier: 
+                C4:FB:9C:29:7B:97:CD:4C:96:FC:EE:5B:B3:CA:99:74:8B:95:EA:4C
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: md5WithRSAEncryption
+        3f:ae:8a:f1:d7:66:03:05:9e:3e:fa:ea:1c:46:bb:a4:5b:8f:
+        78:9a:12:48:99:f9:f4:35:de:0c:36:07:02:6b:10:3a:89:14:
+        81:9c:31:a6:7c:b2:41:b2:6a:e7:07:01:a1:4b:f9:9f:25:3b:
+        96:ca:99:c3:3e:a1:51:1c:f3:c3:2e:44:f7:b0:67:46:aa:92:
+        e5:3b:da:1c:19:14:38:30:d5:e2:a2:31:25:2e:f1:ec:45:38:
+        ed:f8:06:58:03:73:62:b0:10:31:8f:40:bf:64:e0:5c:3e:c5:
+        4f:1f:da:12:43:ff:4c:e6:06:26:a8:9b:19:aa:44:3c:76:b2:
+        5c:ec
+
+Entrust.net Secure Server CA
+============================
+MD5 Fingerprint: DF:F2:80:73:CC:F1:E6:61:73:FC:F5:42:E9:C5:7C:EE
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
+VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
+ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
+KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u
+ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1
+MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE
+ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j
+b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
+bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg
+U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA
+A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/
+I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3
+wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC
+AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb
+oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5
+BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p
+dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk
+MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp
+b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
+dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
+MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
+E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
+MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
+hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
+95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd
+2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 927650371 (0x374ad243)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority
+        Validity
+            Not Before: May 25 16:09:40 1999 GMT
+            Not After : May 25 16:39:40 2019 GMT
+        Subject: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:cd:28:83:34:54:1b:89:f3:0f:af:37:91:31:ff:
+                    af:31:60:c9:a8:e8:b2:10:68:ed:9f:e7:93:36:f1:
+                    0a:64:bb:47:f5:04:17:3f:23:47:4d:c5:27:19:81:
+                    26:0c:54:72:0d:88:2d:d9:1f:9a:12:9f:bc:b3:71:
+                    d3:80:19:3f:47:66:7b:8c:35:28:d2:b9:0a:df:24:
+                    da:9c:d6:50:79:81:7a:5a:d3:37:f7:c2:4a:d8:29:
+                    92:26:64:d1:e4:98:6c:3a:00:8a:f5:34:9b:65:f8:
+                    ed:e3:10:ff:fd:b8:49:58:dc:a0:de:82:39:6b:81:
+                    b1:16:19:61:b9:54:b6:e6:43
+                Exponent: 3 (0x3)
+        X509v3 extensions:
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Entrust.net/OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority/CN=CRL1
+                URI:http://www.entrust.net/CRL/net1.crl
+
+            X509v3 Private Key Usage Period: 
+                Not Before: May 25 16:09:40 1999 GMT, Not After: May 25 16:09:40 2019 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:F0:17:62:13:55:3D:B3:FF:0A:00:6B:FB:50:84:97:F3:ED:62:D0:1A
+
+            X509v3 Subject Key Identifier: 
+                F0:17:62:13:55:3D:B3:FF:0A:00:6B:FB:50:84:97:F3:ED:62:D0:1A
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0
+..V4.0....
+    Signature Algorithm: sha1WithRSAEncryption
+        90:dc:30:02:fa:64:74:c2:a7:0a:a5:7c:21:8d:34:17:a8:fb:
+        47:0e:ff:25:7c:8d:13:0a:fb:e4:98:b5:ef:8c:f8:c5:10:0d:
+        f7:92:be:f1:c3:d5:d5:95:6a:04:bb:2c:ce:26:36:65:c8:31:
+        c6:e7:ee:3f:e3:57:75:84:7a:11:ef:46:4f:18:f4:d3:98:bb:
+        a8:87:32:ba:72:f6:3c:e2:3d:9f:d7:1d:d9:c3:60:43:8c:58:
+        0e:22:96:2f:62:a3:2c:1f:ba:ad:05:ef:ab:32:78:87:a0:54:
+        73:19:b5:5c:05:f9:52:3e:6d:2d:45:0b:f7:0a:93:ea:ed:06:
+        f9:b2
+
+Equifax Premium CA
+==================
+MD5 Fingerprint: A9:E9:A8:9D:0E:73:E3:B1:2F:37:0D:E8:48:3F:86:ED
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDIzCCAoygAwIBAgIENeHvHjANBgkqhkiG9w0BAQUFADBPMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEuMCwGA1UECxMlRXF1aWZheCBQcmVtaXVtIENl
+cnRpZmljYXRlIEF1dGhvcml0eTAeFw05ODA4MjQyMjU0MjNaFw0xODA4MjQyMjU0
+MjNaME8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFcXVpZmF4MS4wLAYDVQQLEyVF
+cXVpZmF4IFByZW1pdW0gQ2VydGlmaWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqGSIb3
+DQEBAQUAA4GNADCBiQKBgQDOoQaOBswIC8GGqN4g1Q0O0Q3En+pq2bPCMkdAb4qI
+pAm9OCwd5svmpPM269rrvPxkswf2Lbyqzp8ZSGhK/PWiRX4JEPWPs0lcIwY56hOL
+uAvNkR12X9k3oUT7X5DyZ7PNGJlDH3YSawLylYM4Q8L2YjTKyXhdX9LYupr/vhBg
+WwIDAQABo4IBCjCCAQYwcQYDVR0fBGowaDBmoGSgYqRgMF4xCzAJBgNVBAYTAlVT
+MRAwDgYDVQQKEwdFcXVpZmF4MS4wLAYDVQQLEyVFcXVpZmF4IFByZW1pdW0gQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIw
+MTgwODI0MjI1NDIzWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUFe6yKFmrbuX4
+z4uB9CThrj91G5gwHQYDVR0OBBYEFBXusihZq27l+M+LgfQk4a4/dRuYMAwGA1Ud
+EwQFMAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEB
+BQUAA4GBAL0LnCepA9so3JipS9DRjqeoGlqR4Jzx9xh8LiKeNh/JqLXNRkpu+jUH
+G4YI65/iqPmdQS06rlxctl80BOv8KmCw+3TkhellOJbuFcfGd2MSvYpoH6tsfdrK
+XBPO6snrCVzFc+cSAdXZUwee4A+W8Iu0u0VIn4bFGVWgy5bFA/xI
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 903999262 (0x35e1ef1e)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Equifax, OU=Equifax Premium Certificate Authority
+        Validity
+            Not Before: Aug 24 22:54:23 1998 GMT
+            Not After : Aug 24 22:54:23 2018 GMT
+        Subject: C=US, O=Equifax, OU=Equifax Premium Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ce:a1:06:8e:06:cc:08:0b:c1:86:a8:de:20:d5:
+                    0d:0e:d1:0d:c4:9f:ea:6a:d9:b3:c2:32:47:40:6f:
+                    8a:88:a4:09:bd:38:2c:1d:e6:cb:e6:a4:f3:36:eb:
+                    da:eb:bc:fc:64:b3:07:f6:2d:bc:aa:ce:9f:19:48:
+                    68:4a:fc:f5:a2:45:7e:09:10:f5:8f:b3:49:5c:23:
+                    06:39:ea:13:8b:b8:0b:cd:91:1d:76:5f:d9:37:a1:
+                    44:fb:5f:90:f2:67:b3:cd:18:99:43:1f:76:12:6b:
+                    02:f2:95:83:38:43:c2:f6:62:34:ca:c9:78:5d:5f:
+                    d2:d8:ba:9a:ff:be:10:60:5b
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Equifax/OU=Equifax Premium Certificate Authority/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not After: Aug 24 22:54:23 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:15:EE:B2:28:59:AB:6E:E5:F8:CF:8B:81:F4:24:E1:AE:3F:75:1B:98
+
+            X509v3 Subject Key Identifier: 
+                15:EE:B2:28:59:AB:6E:E5:F8:CF:8B:81:F4:24:E1:AE:3F:75:1B:98
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0...V3.0c....
+    Signature Algorithm: sha1WithRSAEncryption
+        bd:0b:9c:27:a9:03:db:28:dc:98:a9:4b:d0:d1:8e:a7:a8:1a:
+        5a:91:e0:9c:f1:f7:18:7c:2e:22:9e:36:1f:c9:a8:b5:cd:46:
+        4a:6e:fa:35:07:1b:86:08:eb:9f:e2:a8:f9:9d:41:2d:3a:ae:
+        5c:5c:b6:5f:34:04:eb:fc:2a:60:b0:fb:74:e4:85:e9:65:38:
+        96:ee:15:c7:c6:77:63:12:bd:8a:68:1f:ab:6c:7d:da:ca:5c:
+        13:ce:ea:c9:eb:09:5c:c5:73:e7:12:01:d5:d9:53:07:9e:e0:
+        0f:96:f0:8b:b4:bb:45:48:9f:86:c5:19:55:a0:cb:96:c5:03:
+        fc:48
+
+Equifax Secure CA
+=================
+MD5 Fingerprint: 67:CB:9D:C0:13:24:8A:82:9B:B2:17:1E:D1:1B:EC:D4
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
+MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
+dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
+BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
+cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
+AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
+MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
+ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
+IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
+MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
+A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
+7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
+1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 903804111 (0x35def4cf)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
+        Validity
+            Not Before: Aug 22 16:41:51 1998 GMT
+            Not After : Aug 22 16:41:51 2018 GMT
+        Subject: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c1:5d:b1:58:67:08:62:ee:a0:9a:2d:1f:08:6d:
+                    91:14:68:98:0a:1e:fe:da:04:6f:13:84:62:21:c3:
+                    d1:7c:ce:9f:05:e0:b8:01:f0:4e:34:ec:e2:8a:95:
+                    04:64:ac:f1:6b:53:5f:05:b3:cb:67:80:bf:42:02:
+                    8e:fe:dd:01:09:ec:e1:00:14:4f:fc:fb:f0:0c:dd:
+                    43:ba:5b:2b:e1:1f:80:70:99:15:57:93:16:f1:0f:
+                    97:6a:b7:c2:68:23:1c:cc:4d:59:30:ac:51:1e:3b:
+                    af:2b:d6:ee:63:45:7b:c5:d9:5f:50:d2:e3:50:0f:
+                    3a:88:e7:bf:14:fd:e0:c7:b9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 CRL Distribution Points: 
+                DirName:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority/CN=CRL1
+
+            X509v3 Private Key Usage Period: 
+                Not After: Aug 22 16:41:51 2018 GMT
+            X509v3 Key Usage: 
+                Certificate Sign, CRL Sign
+            X509v3 Authority Key Identifier: 
+                keyid:48:E6:68:F9:2B:D2:B2:95:D7:47:D8:23:20:10:4F:33:98:90:9F:D4
+
+            X509v3 Subject Key Identifier: 
+                48:E6:68:F9:2B:D2:B2:95:D7:47:D8:23:20:10:4F:33:98:90:9F:D4
+            X509v3 Basic Constraints: 
+                CA:TRUE
+            1.2.840.113533.7.65.0: 
+                0...V3.0c....
+    Signature Algorithm: sha1WithRSAEncryption
+        58:ce:29:ea:fc:f7:de:b5:ce:02:b9:17:b5:85:d1:b9:e3:e0:
+        95:cc:25:31:0d:00:a6:92:6e:7f:b6:92:63:9e:50:95:d1:9a:
+        6f:e4:11:de:63:85:6e:98:ee:a8:ff:5a:c8:d3:55:b2:66:71:
+        57:de:c0:21:eb:3d:2a:a7:23:49:01:04:86:42:7b:fc:ee:7f:
+        a2:16:52:b5:67:67:d3:40:db:3b:26:58:b2:28:77:3d:ae:14:
+        77:61:d6:fa:2a:66:27:a0:0d:fa:a7:73:5c:ea:70:f1:94:21:
+        65:44:5f:fa:fc:ef:29:68:a9:a2:87:79:ef:79:ef:4f:ac:07:
+        77:38
+
+GTE CyberTrust Global Root
+==========================
+MD5 Fingerprint: CA:3D:D3:68:F1:03:5C:D0:32:FA:B8:2B:59:E8:5A:DB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
+b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
+cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
+b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
+iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
+r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
+04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
+GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
+3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
+lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 421 (0x1a5)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Global Root
+        Validity
+            Not Before: Aug 13 00:29:00 1998 GMT
+            Not After : Aug 13 23:59:00 2018 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Global Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:95:0f:a0:b6:f0:50:9c:e8:7a:c7:88:cd:dd:17:
+                    0e:2e:b0:94:d0:1b:3d:0e:f6:94:c0:8a:94:c7:06:
+                    c8:90:97:c8:b8:64:1a:7a:7e:6c:3c:53:e1:37:28:
+                    73:60:7f:b2:97:53:07:9f:53:f9:6d:58:94:d2:af:
+                    8d:6d:88:67:80:e6:ed:b2:95:cf:72:31:ca:a5:1c:
+                    72:ba:5c:02:e7:64:42:e7:f9:a9:2c:d6:3a:0d:ac:
+                    8d:42:aa:24:01:39:e6:9c:3f:01:85:57:0d:58:87:
+                    45:f8:d3:85:aa:93:69:26:85:70:48:80:3f:12:15:
+                    c7:79:b4:1f:05:2f:3b:62:99
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        6d:eb:1b:09:e9:5e:d9:51:db:67:22:61:a4:2a:3c:48:77:e3:
+        a0:7c:a6:de:73:a2:14:03:85:3d:fb:ab:0e:30:c5:83:16:33:
+        81:13:08:9e:7b:34:4e:df:40:c8:74:d7:b9:7d:dc:f4:76:55:
+        7d:9b:63:54:18:e9:f0:ea:f3:5c:b1:d9:8b:42:1e:b9:c0:95:
+        4e:ba:fa:d5:e2:7c:f5:68:61:bf:8e:ec:05:97:5f:5b:b0:d7:
+        a3:85:34:c4:24:a7:0d:0f:95:93:ef:cb:94:d8:9e:1f:9d:5c:
+        85:6d:c7:aa:ae:4f:1f:22:b5:cd:95:ad:ba:a7:cc:f9:ab:0b:
+        7a:7f
+
+GTE CyberTrust Japan Root CA
+============================
+MD5 Fingerprint: DE:AB:FF:43:2A:65:37:06:9B:28:B5:7A:E8:84:D3:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICETCCAXoCAU4wDQYJKoZIhvcNAQEEBQAwUTELMAkGA1UEBhMCSlAxHzAdBgNV
+BAoTFkN5YmVyVHJ1c3QgSmFwYW4sIEluYy4xITAfBgNVBAMTGEN5YmVyVHJ1c3Qg
+SkFQQU4gUm9vdCBDQTAeFw05ODA4MDQwNzU3MDBaFw0wMzA4MDQyMzU5MDBaMFEx
+CzAJBgNVBAYTAkpQMR8wHQYDVQQKExZDeWJlclRydXN0IEphcGFuLCBJbmMuMSEw
+HwYDVQQDExhDeWJlclRydXN0IEpBUEFOIFJvb3QgQ0EwgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBALet/MpHEHaJ/Wes5HMGfIFLHda1fA5Hr+ymVHWoxP1lr+fI
+sbFsNDWN97lkVygLIVredP7ceC6GRhJMfxEf3JO9X75mmIa4t+xtSdOQ2eF5AFZo
+uq1sHyw7H8ksjEOwBELqgXOmzjN1RQ2KRXIvqldV5AfDQ+J1Og+8PNCEzrrvAgMB
+AAEwDQYJKoZIhvcNAQEEBQADgYEAt6ZkowyAPBzE2O5BO+WGpJ5gXdYBMqhqZC0g
+cEC6ck5m+gdlTgOOC/1W4K07IKcy+rISHoDfHuN6GMxX2+bJNGDvdesQFtCkLnDY
+JCO4pXdzQvkHOt0BbAiTBzUmECVgKf8J5WSfabkWSfNc3SRjRpMNsFM2dbxIILsZ
+to/QIv0=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 78 (0x4e)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Root CA
+        Validity
+            Not Before: Aug  4 07:57:00 1998 GMT
+            Not After : Aug  4 23:59:00 2003 GMT
+        Subject: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b7:ad:fc:ca:47:10:76:89:fd:67:ac:e4:73:06:
+                    7c:81:4b:1d:d6:b5:7c:0e:47:af:ec:a6:54:75:a8:
+                    c4:fd:65:af:e7:c8:b1:b1:6c:34:35:8d:f7:b9:64:
+                    57:28:0b:21:5a:de:74:fe:dc:78:2e:86:46:12:4c:
+                    7f:11:1f:dc:93:bd:5f:be:66:98:86:b8:b7:ec:6d:
+                    49:d3:90:d9:e1:79:00:56:68:ba:ad:6c:1f:2c:3b:
+                    1f:c9:2c:8c:43:b0:04:42:ea:81:73:a6:ce:33:75:
+                    45:0d:8a:45:72:2f:aa:57:55:e4:07:c3:43:e2:75:
+                    3a:0f:bc:3c:d0:84:ce:ba:ef
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        b7:a6:64:a3:0c:80:3c:1c:c4:d8:ee:41:3b:e5:86:a4:9e:60:
+        5d:d6:01:32:a8:6a:64:2d:20:70:40:ba:72:4e:66:fa:07:65:
+        4e:03:8e:0b:fd:56:e0:ad:3b:20:a7:32:fa:b2:12:1e:80:df:
+        1e:e3:7a:18:cc:57:db:e6:c9:34:60:ef:75:eb:10:16:d0:a4:
+        2e:70:d8:24:23:b8:a5:77:73:42:f9:07:3a:dd:01:6c:08:93:
+        07:35:26:10:25:60:29:ff:09:e5:64:9f:69:b9:16:49:f3:5c:
+        dd:24:63:46:93:0d:b0:53:36:75:bc:48:20:bb:19:b6:8f:d0:
+        22:fd
+
+GTE CyberTrust Japan Secure Server CA
+=====================================
+MD5 Fingerprint: DD:0D:0D:B4:78:4B:7D:CE:30:0A:A6:35:C6:AB:4C:88
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICIzCCAYwCAU8wDQYJKoZIhvcNAQEEBQAwWjELMAkGA1UEBhMCSlAxHzAdBgNV
+BAoTFkN5YmVyVHJ1c3QgSmFwYW4sIEluYy4xKjAoBgNVBAMTIUN5YmVyVHJ1c3Qg
+SkFQQU4gU2VjdXJlIFNlcnZlciBDQTAeFw05ODA4MDQwODA2MzJaFw0wMzA4MDQy
+MzU5MDBaMFoxCzAJBgNVBAYTAkpQMR8wHQYDVQQKExZDeWJlclRydXN0IEphcGFu
+LCBJbmMuMSowKAYDVQQDEyFDeWJlclRydXN0IEpBUEFOIFNlY3VyZSBTZXJ2ZXIg
+Q0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKwmo6G4b2rALBL52zEFkuf9
++tSBtLjVKtWQ+vBDZfwSFcrs27lh3jNjN0+vADx/kjcbGHPlnzyI8RoTRP558sMm
+lQ8L8J4UByFsV8Jdw+JRsM2LX81fhjj4eZc57Oi/Ui6xXqqprozt7tfIty4xi7Q5
+kjt8gScHGgFEL0lzILbJAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAaB17Eu5aeSkx
+ygGsi1CpJ5ksAPw4Ghz/wtXwE/4bpzn1gBTrUfrAjXuEG1musTVRbqE+1xvsoJ7f
+4KWCluOxP9io8ct5gI738ESZfhT1I6MR42hLBTZuiOOrhqo4UwNCO9O5+eC/BenT
+X8NKp7b9t12QSfiasq1mpoIAk65g/yA=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 79 (0x4f)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Secure Server CA
+        Validity
+            Not Before: Aug  4 08:06:32 1998 GMT
+            Not After : Aug  4 23:59:00 2003 GMT
+        Subject: C=JP, O=CyberTrust Japan, Inc., CN=CyberTrust JAPAN Secure Server CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ac:26:a3:a1:b8:6f:6a:c0:2c:12:f9:db:31:05:
+                    92:e7:fd:fa:d4:81:b4:b8:d5:2a:d5:90:fa:f0:43:
+                    65:fc:12:15:ca:ec:db:b9:61:de:33:63:37:4f:af:
+                    00:3c:7f:92:37:1b:18:73:e5:9f:3c:88:f1:1a:13:
+                    44:fe:79:f2:c3:26:95:0f:0b:f0:9e:14:07:21:6c:
+                    57:c2:5d:c3:e2:51:b0:cd:8b:5f:cd:5f:86:38:f8:
+                    79:97:39:ec:e8:bf:52:2e:b1:5e:aa:a9:ae:8c:ed:
+                    ee:d7:c8:b7:2e:31:8b:b4:39:92:3b:7c:81:27:07:
+                    1a:01:44:2f:49:73:20:b6:c9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        68:1d:7b:12:ee:5a:79:29:31:ca:01:ac:8b:50:a9:27:99:2c:
+        00:fc:38:1a:1c:ff:c2:d5:f0:13:fe:1b:a7:39:f5:80:14:eb:
+        51:fa:c0:8d:7b:84:1b:59:ae:b1:35:51:6e:a1:3e:d7:1b:ec:
+        a0:9e:df:e0:a5:82:96:e3:b1:3f:d8:a8:f1:cb:79:80:8e:f7:
+        f0:44:99:7e:14:f5:23:a3:11:e3:68:4b:05:36:6e:88:e3:ab:
+        86:aa:38:53:03:42:3b:d3:b9:f9:e0:bf:05:e9:d3:5f:c3:4a:
+        a7:b6:fd:b7:5d:90:49:f8:9a:b2:ad:66:a6:82:00:93:ae:60:
+        ff:20
+
+GTE CyberTrust Root 2
+=====================
+MD5 Fingerprint: BA:ED:17:57:9A:4B:FF:7C:F9:C9:1F:A2:CD:1A:D6:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICUDCCAbkCAgGbMA0GCSqGSIb3DQEBBAUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCAyMB4X
+DTk4MDgxMTExMzUwN1oXDTA4MDgxMTExMjIxNlowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDIw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANksTE4vaRoj41a6886EwAnAefFE
+XzMfFZF/iogouCRFzI8YzR900bWPcUzWMfZzloSUQMWpg2Akfa9vNLdLTMIJgDtF
+BJ7EPMQndXsADKFkR7UUXYJLUTpYu0RMPdPlBjjoYVyYeLuAs5zacoJioN+cX+v5
+T3fCzGAYAGs0giWzAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAo2SRbxDt526iQkCU
+eM74FAjR+kOF60bNkhTQ7y4tNjkY2brJJ4gp6UgXb/jBqshhbS39QC11QzCXOfgU
+ZL1v72OoK0LfsloNJex7N9jOkSmCFvnoYqLhdsQCfd0li5jh9g1gjPZZkEBRRNHC
++xkkHhc5a3QhFTPWVdeCHnAsJ6g=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 411 (0x19b)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 2
+        Validity
+            Not Before: Aug 11 11:35:07 1998 GMT
+            Not After : Aug 11 11:22:16 2008 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 2
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d9:2c:4c:4e:2f:69:1a:23:e3:56:ba:f3:ce:84:
+                    c0:09:c0:79:f1:44:5f:33:1f:15:91:7f:8a:88:28:
+                    b8:24:45:cc:8f:18:cd:1f:74:d1:b5:8f:71:4c:d6:
+                    31:f6:73:96:84:94:40:c5:a9:83:60:24:7d:af:6f:
+                    34:b7:4b:4c:c2:09:80:3b:45:04:9e:c4:3c:c4:27:
+                    75:7b:00:0c:a1:64:47:b5:14:5d:82:4b:51:3a:58:
+                    bb:44:4c:3d:d3:e5:06:38:e8:61:5c:98:78:bb:80:
+                    b3:9c:da:72:82:62:a0:df:9c:5f:eb:f9:4f:77:c2:
+                    cc:60:18:00:6b:34:82:25:b3
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        a3:64:91:6f:10:ed:e7:6e:a2:42:40:94:78:ce:f8:14:08:d1:
+        fa:43:85:eb:46:cd:92:14:d0:ef:2e:2d:36:39:18:d9:ba:c9:
+        27:88:29:e9:48:17:6f:f8:c1:aa:c8:61:6d:2d:fd:40:2d:75:
+        43:30:97:39:f8:14:64:bd:6f:ef:63:a8:2b:42:df:b2:5a:0d:
+        25:ec:7b:37:d8:ce:91:29:82:16:f9:e8:62:a2:e1:76:c4:02:
+        7d:dd:25:8b:98:e1:f6:0d:60:8c:f6:59:90:40:51:44:d1:c2:
+        fb:19:24:1e:17:39:6b:74:21:15:33:d6:55:d7:82:1e:70:2c:
+        27:a8
+
+GTE CyberTrust Root 3
+=====================
+MD5 Fingerprint: DB:81:96:57:AE:64:61:EF:77:A7:83:C4:51:24:3C:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICUDCCAbkCAgGXMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCAzMB4X
+DTk4MDgxMDE5NTkwOFoXDTA4MDgxMDE5MzYzOVowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDMw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHzsSsLztwU2TSXYlASVmOETFP6
+wIXP+sHdD955E39T+6oOYN3iYr/G7k6ZNKpoQzWZ+KP982O9AVRqnrI6lix7eCjG
+WrWNGhUY/eOMLqJQCVtx1g21GB8ZjgQpk5N4q18U53NC8gMMV6IbUDsLu1ngoDoD
+7icbWky5sAjKuRqJAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAheutlCAG6bKiazvy
+ZuvjS7gSJgXl9JGo3IfcmPSUwfRhvdWcbFFzlV7QvdfmRdw8z0aE1ee57ORnY24A
+KHdxXUoF6bl8hszCRLveKUja6t29F58dUQGo6BResVf3/9qPzpX+Le0yEnf/fGph
+la4xcgYI8PnzDY7i76hTXZEDg94=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 407 (0x197)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 3
+        Validity
+            Not Before: Aug 10 19:59:08 1998 GMT
+            Not After : Aug 10 19:36:39 2008 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e1:f3:b1:2b:0b:ce:dc:14:d9:34:97:62:50:12:
+                    56:63:84:4c:53:fa:c0:85:cf:fa:c1:dd:0f:de:79:
+                    13:7f:53:fb:aa:0e:60:dd:e2:62:bf:c6:ee:4e:99:
+                    34:aa:68:43:35:99:f8:a3:fd:f3:63:bd:01:54:6a:
+                    9e:b2:3a:96:2c:7b:78:28:c6:5a:b5:8d:1a:15:18:
+                    fd:e3:8c:2e:a2:50:09:5b:71:d6:0d:b5:18:1f:19:
+                    8e:04:29:93:93:78:ab:5f:14:e7:73:42:f2:03:0c:
+                    57:a2:1b:50:3b:0b:bb:59:e0:a0:3a:03:ee:27:1b:
+                    5a:4c:b9:b0:08:ca:b9:1a:89
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        85:eb:ad:94:20:06:e9:b2:a2:6b:3b:f2:66:eb:e3:4b:b8:12:
+        26:05:e5:f4:91:a8:dc:87:dc:98:f4:94:c1:f4:61:bd:d5:9c:
+        6c:51:73:95:5e:d0:bd:d7:e6:45:dc:3c:cf:46:84:d5:e7:b9:
+        ec:e4:67:63:6e:00:28:77:71:5d:4a:05:e9:b9:7c:86:cc:c2:
+        44:bb:de:29:48:da:ea:dd:bd:17:9f:1d:51:01:a8:e8:14:5e:
+        b1:57:f7:ff:da:8f:ce:95:fe:2d:ed:32:12:77:ff:7c:6a:61:
+        95:ae:31:72:06:08:f0:f9:f3:0d:8e:e2:ef:a8:53:5d:91:03:
+        83:de
+
+GTE CyberTrust Root 4
+=====================
+MD5 Fingerprint: 33:43:02:B1:B9:E0:73:B1:B1:20:CA:CB:C7:84:03:50
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDVTCCAj0CAgGoMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEeMBwGA1UEAxMVR1RFIEN5YmVyVHJ1c3QgUm9vdCA0MB4X
+DTk4MDgxMzEzNTEwMFoXDTEzMDgxMzIzNTkwMFowcDELMAkGA1UEBhMCVVMxGDAW
+BgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3Qg
+U29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDQw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6nSJuf9pmPDlCsaMqb9P3
+vK6sMVrXEZBHuZ0ZLvnzGyKgw+GnusT8XgqUS5haSybkH/Tc8/6OiNxsLXx3hyZQ
+wF5OqCih6hdpT03GAQ7amg0GViYVtqRdejWvje14Uob5OKuzAdPaBZaxtlCrwKGu
+F1P6QzkgcWUj223Etu2YRYPX0vbiqWv7+XXM78WrcZY16N+OkZuoEHUft84Tjmuz
+lneXGpEvxyxpmfAPKmgAmHZEG4wo0uuO9IO0f6QlXmw72cZo1WG41F4xB7VbkDVS
+V3sXIO0tuB6OiDk+Usvf8FyxZbulErSQY79xnTLB2r9QSpW+BjrEK+vNmHZETQvl
+AgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAEOvHIfJSbpliTRJPOoHO0eiedSgO5Bs
+3n+oVMPoTEAyvMjsHOXZrEC6/Iw/wnOc9GTq36ntTlvIAWDuOW1DJ/N/qgjS/k5v
+FDJNfeQ0gKU1xNZGULQ7oC1lH09lfjQoLcCndn0xyQ0zFvYgGSARULsDzHBtlrfv
+TKfaNhXPu03UltyITWyY7blz/ihXoO1k+AqBKXP29pcyhzm0ge/ZTRoHNPe6QjXe
+V9xc1vfF6wonDIGmwtBoTv2SW0iD9haKjzZb7TFsP0F6cfeSPzGkCkBM84biYcE8
+SYEtpbjvupcPvCsdm4ny0o4eTYbywqv2LZnAGyoNobZP+SxYTT19Nwo=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 424 (0x1a8)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 4
+        Validity
+            Not Before: Aug 13 13:51:00 1998 GMT
+            Not After : Aug 13 23:59:00 2013 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 4
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ba:9d:22:6e:7f:da:66:3c:39:42:b1:a3:2a:6f:
+                    d3:f7:bc:ae:ac:31:5a:d7:11:90:47:b9:9d:19:2e:
+                    f9:f3:1b:22:a0:c3:e1:a7:ba:c4:fc:5e:0a:94:4b:
+                    98:5a:4b:26:e4:1f:f4:dc:f3:fe:8e:88:dc:6c:2d:
+                    7c:77:87:26:50:c0:5e:4e:a8:28:a1:ea:17:69:4f:
+                    4d:c6:01:0e:da:9a:0d:06:56:26:15:b6:a4:5d:7a:
+                    35:af:8d:ed:78:52:86:f9:38:ab:b3:01:d3:da:05:
+                    96:b1:b6:50:ab:c0:a1:ae:17:53:fa:43:39:20:71:
+                    65:23:db:6d:c4:b6:ed:98:45:83:d7:d2:f6:e2:a9:
+                    6b:fb:f9:75:cc:ef:c5:ab:71:96:35:e8:df:8e:91:
+                    9b:a8:10:75:1f:b7:ce:13:8e:6b:b3:96:77:97:1a:
+                    91:2f:c7:2c:69:99:f0:0f:2a:68:00:98:76:44:1b:
+                    8c:28:d2:eb:8e:f4:83:b4:7f:a4:25:5e:6c:3b:d9:
+                    c6:68:d5:61:b8:d4:5e:31:07:b5:5b:90:35:52:57:
+                    7b:17:20:ed:2d:b8:1e:8e:88:39:3e:52:cb:df:f0:
+                    5c:b1:65:bb:a5:12:b4:90:63:bf:71:9d:32:c1:da:
+                    bf:50:4a:95:be:06:3a:c4:2b:eb:cd:98:76:44:4d:
+                    0b:e5
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        43:af:1c:87:c9:49:ba:65:89:34:49:3c:ea:07:3b:47:a2:79:
+        d4:a0:3b:90:6c:de:7f:a8:54:c3:e8:4c:40:32:bc:c8:ec:1c:
+        e5:d9:ac:40:ba:fc:8c:3f:c2:73:9c:f4:64:ea:df:a9:ed:4e:
+        5b:c8:01:60:ee:39:6d:43:27:f3:7f:aa:08:d2:fe:4e:6f:14:
+        32:4d:7d:e4:34:80:a5:35:c4:d6:46:50:b4:3b:a0:2d:65:1f:
+        4f:65:7e:34:28:2d:c0:a7:76:7d:31:c9:0d:33:16:f6:20:19:
+        20:11:50:bb:03:cc:70:6d:96:b7:ef:4c:a7:da:36:15:cf:bb:
+        4d:d4:96:dc:88:4d:6c:98:ed:b9:73:fe:28:57:a0:ed:64:f8:
+        0a:81:29:73:f6:f6:97:32:87:39:b4:81:ef:d9:4d:1a:07:34:
+        f7:ba:42:35:de:57:dc:5c:d6:f7:c5:eb:0a:27:0c:81:a6:c2:
+        d0:68:4e:fd:92:5b:48:83:f6:16:8a:8f:36:5b:ed:31:6c:3f:
+        41:7a:71:f7:92:3f:31:a4:0a:40:4c:f3:86:e2:61:c1:3c:49:
+        81:2d:a5:b8:ef:ba:97:0f:bc:2b:1d:9b:89:f2:d2:8e:1e:4d:
+        86:f2:c2:ab:f6:2d:99:c0:1b:2a:0d:a1:b6:4f:f9:2c:58:4d:
+        3d:7d:37:0a
+
+GTE CyberTrust Root 5
+=====================
+MD5 Fingerprint: 7D:6C:86:E4:FC:4D:D1:0B:00:BA:22:BB:4E:7C:6A:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDtjCCAp6gAwIBAgICAbYwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVVMx
+GDAWBgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1
+c3QgU29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290
+IDUwHhcNOTgwODE0MTQ1MDAwWhcNMTMwODE0MjM1OTAwWjBwMQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
+cnVzdCBTb2x1dGlvbnMsIEluYy4xHjAcBgNVBAMTFUdURSBDeWJlclRydXN0IFJv
+b3QgNTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALwSbj+KfHqXAewe
+uzlaAvR4RKJIG457SVJ6uHtHs6+Um2+7lvoramVcuByUc76/iQoigO5X/IwFu3Cf
+lzkE2qOHXKjlyq/AM5rVN1xLrOSA0KYjYPv9ci6UncfOwgQy73hgXe2thw9FZR48
+mgqavl0dmezn8tHGehfZrZtUln/EfGC/haoVNR1A2hG87FQhKC0joajwzy3N3fx+
+D17hZQdWywe00lboXjHMGGPEhtIthc+Tkqtt/mg5+95zvYb45EZ66p8My/QZ/mO8
+0Sx7iDM29uThnAxTgWAc2i6rlqkWiBNQmbK9Vd8VMH7o5Zj7cH5stQf8/Ea30O03
+ln4y/iECAwEAAaNaMFgwEgYDVR0TAQH/BAgwBgEB/wIBBTAOBgNVHQ8BAf8EBAMC
+AQYwFwYDVR0gBBAwDjAMBgoqhkiG+GMBAgEDMBkGA1UdDgQSBBB2CkkhOEyf3vjE
+ScdxcZGdMA0GCSqGSIb3DQEBBQUAA4IBAQBBOtQYW9q43iEc4Y4J5fFoNP/elvQH
+9ac886xKsZv6kvqb7eYyIapKdsXcTzjl39WG5NXIdn2Y17HNj021kSNsi4rr6nzv
+FJTExvAfSi0ycWMrY5EmAgm2gB3t4sy4f9uHY8jh0GwmsTUdQGYQG82VVBgzYewT
+T9oT95mvPtDPjqZyorPDBZrJJ32SzH5SjbOrcG2eiZ9N6xp1wpiq1QIW1wyKvyXk
+6y28mOlYOBl8uTf+2+KZCHMGx5eDan0QAS8yuRcFSmXmL86+XlOmgumaUwqEdC2D
+ysiUFnZflGEo8IWnObvXi9moshMdVAk0JH0ggX1mfqKQdFwQxr3sqxvC
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 438 (0x1b6)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 5
+        Validity
+            Not Before: Aug 14 14:50:00 1998 GMT
+            Not After : Aug 14 23:59:00 2013 GMT
+        Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Root 5
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:bc:12:6e:3f:8a:7c:7a:97:01:ec:1e:bb:39:5a:
+                    02:f4:78:44:a2:48:1b:8e:7b:49:52:7a:b8:7b:47:
+                    b3:af:94:9b:6f:bb:96:fa:2b:6a:65:5c:b8:1c:94:
+                    73:be:bf:89:0a:22:80:ee:57:fc:8c:05:bb:70:9f:
+                    97:39:04:da:a3:87:5c:a8:e5:ca:af:c0:33:9a:d5:
+                    37:5c:4b:ac:e4:80:d0:a6:23:60:fb:fd:72:2e:94:
+                    9d:c7:ce:c2:04:32:ef:78:60:5d:ed:ad:87:0f:45:
+                    65:1e:3c:9a:0a:9a:be:5d:1d:99:ec:e7:f2:d1:c6:
+                    7a:17:d9:ad:9b:54:96:7f:c4:7c:60:bf:85:aa:15:
+                    35:1d:40:da:11:bc:ec:54:21:28:2d:23:a1:a8:f0:
+                    cf:2d:cd:dd:fc:7e:0f:5e:e1:65:07:56:cb:07:b4:
+                    d2:56:e8:5e:31:cc:18:63:c4:86:d2:2d:85:cf:93:
+                    92:ab:6d:fe:68:39:fb:de:73:bd:86:f8:e4:46:7a:
+                    ea:9f:0c:cb:f4:19:fe:63:bc:d1:2c:7b:88:33:36:
+                    f6:e4:e1:9c:0c:53:81:60:1c:da:2e:ab:96:a9:16:
+                    88:13:50:99:b2:bd:55:df:15:30:7e:e8:e5:98:fb:
+                    70:7e:6c:b5:07:fc:fc:46:b7:d0:ed:37:96:7e:32:
+                    fe:21
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE, pathlen:5
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Certificate Policies: 
+                Policy: 1.2.840.113763.1.2.1.3
+
+            X509v3 Subject Key Identifier: 
+                76:0A:49:21:38:4C:9F:DE:F8:C4:49:C7:71:71:91:9D
+    Signature Algorithm: sha1WithRSAEncryption
+        41:3a:d4:18:5b:da:b8:de:21:1c:e1:8e:09:e5:f1:68:34:ff:
+        de:96:f4:07:f5:a7:3c:f3:ac:4a:b1:9b:fa:92:fa:9b:ed:e6:
+        32:21:aa:4a:76:c5:dc:4f:38:e5:df:d5:86:e4:d5:c8:76:7d:
+        98:d7:b1:cd:8f:4d:b5:91:23:6c:8b:8a:eb:ea:7c:ef:14:94:
+        c4:c6:f0:1f:4a:2d:32:71:63:2b:63:91:26:02:09:b6:80:1d:
+        ed:e2:cc:b8:7f:db:87:63:c8:e1:d0:6c:26:b1:35:1d:40:66:
+        10:1b:cd:95:54:18:33:61:ec:13:4f:da:13:f7:99:af:3e:d0:
+        cf:8e:a6:72:a2:b3:c3:05:9a:c9:27:7d:92:cc:7e:52:8d:b3:
+        ab:70:6d:9e:89:9f:4d:eb:1a:75:c2:98:aa:d5:02:16:d7:0c:
+        8a:bf:25:e4:eb:2d:bc:98:e9:58:38:19:7c:b9:37:fe:db:e2:
+        99:08:73:06:c7:97:83:6a:7d:10:01:2f:32:b9:17:05:4a:65:
+        e6:2f:ce:be:5e:53:a6:82:e9:9a:53:0a:84:74:2d:83:ca:c8:
+        94:16:76:5f:94:61:28:f0:85:a7:39:bb:d7:8b:d9:a8:b2:13:
+        1d:54:09:34:24:7d:20:81:7d:66:7e:a2:90:74:5c:10:c6:bd:
+        ec:ab:1b:c2
+
+GTE CyberTrust Root CA
+======================
+MD5 Fingerprint: C4:D7:F0:B2:A3:C5:7D:61:67:F0:04:CD:43:D3:BA:58
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv
+b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU
+cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv
+RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M
+ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5
+1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz
+dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl
+IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy
+bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 419 (0x1a3)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, O=GTE Corporation, CN=GTE CyberTrust Root
+        Validity
+            Not Before: Feb 23 23:01:00 1996 GMT
+            Not After : Feb 23 23:59:00 2006 GMT
+        Subject: C=US, O=GTE Corporation, CN=GTE CyberTrust Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b8:e6:4f:ba:db:98:7c:71:7c:af:44:b7:d3:0f:
+                    46:d9:64:e5:93:c1:42:8e:c7:ba:49:8d:35:2d:7a:
+                    e7:8b:bd:e5:05:31:59:c6:b1:2f:0a:0c:fb:9f:a7:
+                    3f:a2:09:66:84:56:1e:37:29:1b:87:e9:7e:0c:ca:
+                    9a:9f:a5:7f:f5:15:94:a3:d5:a2:46:82:d8:68:4c:
+                    d1:37:15:06:68:af:bd:f8:b0:b3:f0:29:f5:95:5a:
+                    09:16:61:77:0a:22:25:d4:4f:45:aa:c7:bd:e5:96:
+                    df:f9:d4:a8:8e:42:cc:24:c0:1e:91:27:4a:b5:6d:
+                    06:80:63:39:c4:a2:5e:38:03
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        12:b3:75:c6:5f:1d:e1:61:55:80:00:d4:81:4b:7b:31:0f:23:
+        63:e7:3d:f3:03:f9:f4:36:a8:bb:d9:e3:a5:97:4d:ea:2b:29:
+        e0:d6:6a:73:81:e6:c0:89:a3:d3:f1:e0:a5:a5:22:37:9a:63:
+        c2:48:20:b4:db:72:e3:c8:f6:d9:7c:be:b1:af:53:da:14:b4:
+        21:b8:d6:d5:96:e3:fe:4e:0c:59:62:b6:9a:4a:f9:42:dd:8c:
+        6f:81:a9:71:ff:f4:0a:72:6d:6d:44:0e:9d:f3:74:74:a8:d5:
+        34:49:e9:5e:9e:e9:b4:7a:e1:e5:5a:1f:84:30:9c:d3:9f:a5:
+        25:d8
+
+GlobalSign Partners CA
+======================
+MD5 Fingerprint: 3C:75:CD:4C:BD:A9:D0:8A:79:4F:50:16:37:84:F4:2B
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDnjCCAoagAwIBAgILAgAAAAAA1ni50a8wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMF8xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRQwEgYDVQQLEwtQYXJ0bmVycyBDQTEfMB0GA1UEAxMWR2xv
+YmFsU2lnbiBQYXJ0bmVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBANIs+DKsShJ6N8gpkaWujG4eDsA0M4jlM3EWHHiEaMMYNFAuFj6xlIJPsZqf
+APjGETXGaXuYAq0ABohs50wzKACIJ0Yfh7NxdWO8MruI3mYYDlAGk7T2vBQ3MD0i
+3z3/dX7ZChrFn7P80KyzCHqJ0wHoAFznSgs9TXsmordiBovaRt2TFz8/WwJLC7aI
+IBGSAK27xy7U40Wu9YlafI2krYVkMsAnjMbyioCShiRWWY10aKKDQrOePVBBhm8g
+bvb9ztMZ4zLMj+2aXm0fKPVSrG4YXvg90ZLlumwBiEsK8i3eZTMFQqBMqjF2vv2/
+gXj5cRxGXi0VlS0wWY5MQdFiqz0CAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgAGMB0G
+A1UdDgQWBBRDJI1wFQhiVZxPDEAXXYZeD6JM+zAfBgNVHSMEGDAWgBRge2YaRQ2X
+yolQL30EzTSo//z9SzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IB
+AQBm7bSIaRGZgiGDrKFti5uErQ8tyB6Mynt+rarUjt4H1p5Fx6W4nAc5YCVVGsBP
+GeXPFylJiRg1ZuXrKEBOV8mvs+S4IAWjO5VQkUmUKX0s5YhBpUWIXp2CJ/fS71u1
+T5++/jVlLFVkn+FR2iJhd7pYTo/GeVlZbjCAok+QbiELrdBoOZAQm+0iZW8eETjm
+f4zS8zltR9Uh6Op1OkHRrfYWnV0LIb3zH2MGJR3BHzVxLOsgGdXBsOw95W/tAgc/
+E3tmktZEwZj3X1CLelvCb22w0fjldKBAN6MlD+Q9ymQxk5BcMHu5OTGaXkzNuUFP
+UOQ9OK7IZtnHO11RR6ybq/Kt
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b9:d1:af
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Partners CA, CN=GlobalSign Partners CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d2:2c:f8:32:ac:4a:12:7a:37:c8:29:91:a5:ae:
+                    8c:6e:1e:0e:c0:34:33:88:e5:33:71:16:1c:78:84:
+                    68:c3:18:34:50:2e:16:3e:b1:94:82:4f:b1:9a:9f:
+                    00:f8:c6:11:35:c6:69:7b:98:02:ad:00:06:88:6c:
+                    e7:4c:33:28:00:88:27:46:1f:87:b3:71:75:63:bc:
+                    32:bb:88:de:66:18:0e:50:06:93:b4:f6:bc:14:37:
+                    30:3d:22:df:3d:ff:75:7e:d9:0a:1a:c5:9f:b3:fc:
+                    d0:ac:b3:08:7a:89:d3:01:e8:00:5c:e7:4a:0b:3d:
+                    4d:7b:26:a2:b7:62:06:8b:da:46:dd:93:17:3f:3f:
+                    5b:02:4b:0b:b6:88:20:11:92:00:ad:bb:c7:2e:d4:
+                    e3:45:ae:f5:89:5a:7c:8d:a4:ad:85:64:32:c0:27:
+                    8c:c6:f2:8a:80:92:86:24:56:59:8d:74:68:a2:83:
+                    42:b3:9e:3d:50:41:86:6f:20:6e:f6:fd:ce:d3:19:
+                    e3:32:cc:8f:ed:9a:5e:6d:1f:28:f5:52:ac:6e:18:
+                    5e:f8:3d:d1:92:e5:ba:6c:01:88:4b:0a:f2:2d:de:
+                    65:33:05:42:a0:4c:aa:31:76:be:fd:bf:81:78:f9:
+                    71:1c:46:5e:2d:15:95:2d:30:59:8e:4c:41:d1:62:
+                    ab:3d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                43:24:8D:70:15:08:62:55:9C:4F:0C:40:17:5D:86:5E:0F:A2:4C:FB
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        66:ed:b4:88:69:11:99:82:21:83:ac:a1:6d:8b:9b:84:ad:0f:
+        2d:c8:1e:8c:ca:7b:7e:ad:aa:d4:8e:de:07:d6:9e:45:c7:a5:
+        b8:9c:07:39:60:25:55:1a:c0:4f:19:e5:cf:17:29:49:89:18:
+        35:66:e5:eb:28:40:4e:57:c9:af:b3:e4:b8:20:05:a3:3b:95:
+        50:91:49:94:29:7d:2c:e5:88:41:a5:45:88:5e:9d:82:27:f7:
+        d2:ef:5b:b5:4f:9f:be:fe:35:65:2c:55:64:9f:e1:51:da:22:
+        61:77:ba:58:4e:8f:c6:79:59:59:6e:30:80:a2:4f:90:6e:21:
+        0b:ad:d0:68:39:90:10:9b:ed:22:65:6f:1e:11:38:e6:7f:8c:
+        d2:f3:39:6d:47:d5:21:e8:ea:75:3a:41:d1:ad:f6:16:9d:5d:
+        0b:21:bd:f3:1f:63:06:25:1d:c1:1f:35:71:2c:eb:20:19:d5:
+        c1:b0:ec:3d:e5:6f:ed:02:07:3f:13:7b:66:92:d6:44:c1:98:
+        f7:5f:50:8b:7a:5b:c2:6f:6d:b0:d1:f8:e5:74:a0:40:37:a3:
+        25:0f:e4:3d:ca:64:31:93:90:5c:30:7b:b9:39:31:9a:5e:4c:
+        cd:b9:41:4f:50:e4:3d:38:ae:c8:66:d9:c7:3b:5d:51:47:ac:
+        9b:ab:f2:ad
+
+GlobalSign Primary Class 1 CA
+=============================
+MD5 Fingerprint: 5C:AC:59:01:A4:86:53:CB:10:66:B5:D6:D6:71:FF:01
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni4N88wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MTUxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDEgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAxIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAvSA1R9Eo1gijEjkjRw29cCFSDlcxlaY0V2vsfkN5
+wwZSSM28taGZvdgfMrzP125ybS53IpCCTkuPmgwBQprZcFm2nR/mY9EMrR1O+IWB
++a7vn6ZSYUR5GnVF4GFWRW1CjD1yy6akErea9dZg0GBQs46mpuy09BLNf6jO77Ph
+hTD+csTm53eznlhB1lGDiAfGtmlPNt7RC0g/vdafIXRkbycGPkv9Dqabv6RIV4yQ
+7okYCwKBGL5n/lNgiCe6o3M0S1pWtN5zBe2Yll3sSudA/EsJYuvQ4zFPhdF6q1ln
+K/uID+uqg701/WEn7GYOQlf3acIM7/xqwm5J2o9BOK5IqQIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFPzgZvZaNZnrQB7SuB5DvJiOH4rDMB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAJujCETO8pCdcfMyswVqterPKZjeVT6gFn0GekTWr9L6
+E1iM+BzHqx20G+9paJhcCDmP4Pf7SMwh57gz2wWqNCRsSuXpe2Deg7MfCr5BdfzM
+MEi3wSYdBDOqtnjtKsu6VpcybvcxlS5G8hTuJ8f3Yom5XFrTOIpk9Te08bM0ctXV
+IT1L13iT1zFmNR6j2EdJbxyt4YB/+JgkbHOsDsIadwKjJge3x2tdvILVKkgdY89Q
+Mqb7HBhHFQpbDFw4JJoEmKgISF98NIdjqy2NTAB3lBt2uvUWGKMVry+U9ikAdsEV
+F9PpN0121MtLKVkkrNpKoOpj3l9Usfrz0UXLxWS0cyE=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:37:cf
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Sep 15 12:00:00 1998 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 1 CA, CN=GlobalSign Primary Class 1 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:bd:20:35:47:d1:28:d6:08:a3:12:39:23:47:0d:
+                    bd:70:21:52:0e:57:31:95:a6:34:57:6b:ec:7e:43:
+                    79:c3:06:52:48:cd:bc:b5:a1:99:bd:d8:1f:32:bc:
+                    cf:d7:6e:72:6d:2e:77:22:90:82:4e:4b:8f:9a:0c:
+                    01:42:9a:d9:70:59:b6:9d:1f:e6:63:d1:0c:ad:1d:
+                    4e:f8:85:81:f9:ae:ef:9f:a6:52:61:44:79:1a:75:
+                    45:e0:61:56:45:6d:42:8c:3d:72:cb:a6:a4:12:b7:
+                    9a:f5:d6:60:d0:60:50:b3:8e:a6:a6:ec:b4:f4:12:
+                    cd:7f:a8:ce:ef:b3:e1:85:30:fe:72:c4:e6:e7:77:
+                    b3:9e:58:41:d6:51:83:88:07:c6:b6:69:4f:36:de:
+                    d1:0b:48:3f:bd:d6:9f:21:74:64:6f:27:06:3e:4b:
+                    fd:0e:a6:9b:bf:a4:48:57:8c:90:ee:89:18:0b:02:
+                    81:18:be:67:fe:53:60:88:27:ba:a3:73:34:4b:5a:
+                    56:b4:de:73:05:ed:98:96:5d:ec:4a:e7:40:fc:4b:
+                    09:62:eb:d0:e3:31:4f:85:d1:7a:ab:59:67:2b:fb:
+                    88:0f:eb:aa:83:bd:35:fd:61:27:ec:66:0e:42:57:
+                    f7:69:c2:0c:ef:fc:6a:c2:6e:49:da:8f:41:38:ae:
+                    48:a9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                FC:E0:66:F6:5A:35:99:EB:40:1E:D2:B8:1E:43:BC:98:8E:1F:8A:C3
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        9b:a3:08:44:ce:f2:90:9d:71:f3:32:b3:05:6a:b5:ea:cf:29:
+        98:de:55:3e:a0:16:7d:06:7a:44:d6:af:d2:fa:13:58:8c:f8:
+        1c:c7:ab:1d:b4:1b:ef:69:68:98:5c:08:39:8f:e0:f7:fb:48:
+        cc:21:e7:b8:33:db:05:aa:34:24:6c:4a:e5:e9:7b:60:de:83:
+        b3:1f:0a:be:41:75:fc:cc:30:48:b7:c1:26:1d:04:33:aa:b6:
+        78:ed:2a:cb:ba:56:97:32:6e:f7:31:95:2e:46:f2:14:ee:27:
+        c7:f7:62:89:b9:5c:5a:d3:38:8a:64:f5:37:b4:f1:b3:34:72:
+        d5:d5:21:3d:4b:d7:78:93:d7:31:66:35:1e:a3:d8:47:49:6f:
+        1c:ad:e1:80:7f:f8:98:24:6c:73:ac:0e:c2:1a:77:02:a3:26:
+        07:b7:c7:6b:5d:bc:82:d5:2a:48:1d:63:cf:50:32:a6:fb:1c:
+        18:47:15:0a:5b:0c:5c:38:24:9a:04:98:a8:08:48:5f:7c:34:
+        87:63:ab:2d:8d:4c:00:77:94:1b:76:ba:f5:16:18:a3:15:af:
+        2f:94:f6:29:00:76:c1:15:17:d3:e9:37:4d:76:d4:cb:4b:29:
+        59:24:ac:da:4a:a0:ea:63:de:5f:54:b1:fa:f3:d1:45:cb:c5:
+        64:b4:73:21
+
+GlobalSign Primary Class 2 CA
+=============================
+MD5 Fingerprint: A9:A9:42:59:7E:BE:5A:94:E4:2C:C6:8B:1C:2A:44:B6
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni4jY0wDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDIgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAyIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAkoz+7/RFjhdBbvzYvyFvqwadUsEsAJ0/joW4f0qP
+vaBjKspJJ65agvR04lWS/8LRqnmitvrVnYIET8ayxl5jpzq62O7rim+ftrsoQcAi
++05IGgaS17/Xz7nZvThPOw1EblVB/vwJ29i/844h8egStfYTpdPGTJMisAL/7h0M
+xKhrT3VoVujcKBJQ96gknS4kOfsJBd7lo2RJIdBofnEwkbFg4Dn0UPh6TZgAa3x5
+uk7OSuK6Nh23xTYVlZxkQupfxLr1QAW+4TpZvYSnGbjeTVNQzgfR0lHT7w2BbObn
+bctdfD98zOxPgycl/3BQ9oNZdYQGZlgs3omNAKZJ+aVDdwIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFHznsrEs3rGna+l2DOGj/U5sx7n2MB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAGPdWc6KeaqYnU7FiWQ3foqTZy8Q6m8nw413bfJcVpQZ
+GmlgMEZdj/JtRTyONZd8L7hR4uiJvYjPJxwINFyIwWgk25GF5M/7+0ON6CUBG8QO
+9wBCSIYfJAhYWoyN8mtHLGiRsWlC/Q2NySbmkoamZG6Sxc4+PH1x4yOkq8fVqKnf
+gqc76IbVw08Y40TQ4NzzxWgu/qUvBYTIfkdCU2uHSv4y/14+cIy3qBXMF8L/RuzQ
+7C20bhIoqflA6evUZpdTqWlVwKmqsi7N0Wn0vvi7fGnuVKbbnvtapj7+mu+UUUt1
+7tjU4ZrxAlYTiQ6nQouWi4UMG4W+Jq6rppm8IvFz30I=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:8d:8d
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 2 CA, CN=GlobalSign Primary Class 2 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:92:8c:fe:ef:f4:45:8e:17:41:6e:fc:d8:bf:21:
+                    6f:ab:06:9d:52:c1:2c:00:9d:3f:8e:85:b8:7f:4a:
+                    8f:bd:a0:63:2a:ca:49:27:ae:5a:82:f4:74:e2:55:
+                    92:ff:c2:d1:aa:79:a2:b6:fa:d5:9d:82:04:4f:c6:
+                    b2:c6:5e:63:a7:3a:ba:d8:ee:eb:8a:6f:9f:b6:bb:
+                    28:41:c0:22:fb:4e:48:1a:06:92:d7:bf:d7:cf:b9:
+                    d9:bd:38:4f:3b:0d:44:6e:55:41:fe:fc:09:db:d8:
+                    bf:f3:8e:21:f1:e8:12:b5:f6:13:a5:d3:c6:4c:93:
+                    22:b0:02:ff:ee:1d:0c:c4:a8:6b:4f:75:68:56:e8:
+                    dc:28:12:50:f7:a8:24:9d:2e:24:39:fb:09:05:de:
+                    e5:a3:64:49:21:d0:68:7e:71:30:91:b1:60:e0:39:
+                    f4:50:f8:7a:4d:98:00:6b:7c:79:ba:4e:ce:4a:e2:
+                    ba:36:1d:b7:c5:36:15:95:9c:64:42:ea:5f:c4:ba:
+                    f5:40:05:be:e1:3a:59:bd:84:a7:19:b8:de:4d:53:
+                    50:ce:07:d1:d2:51:d3:ef:0d:81:6c:e6:e7:6d:cb:
+                    5d:7c:3f:7c:cc:ec:4f:83:27:25:ff:70:50:f6:83:
+                    59:75:84:06:66:58:2c:de:89:8d:00:a6:49:f9:a5:
+                    43:77
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                7C:E7:B2:B1:2C:DE:B1:A7:6B:E9:76:0C:E1:A3:FD:4E:6C:C7:B9:F6
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        63:dd:59:ce:8a:79:aa:98:9d:4e:c5:89:64:37:7e:8a:93:67:
+        2f:10:ea:6f:27:c3:8d:77:6d:f2:5c:56:94:19:1a:69:60:30:
+        46:5d:8f:f2:6d:45:3c:8e:35:97:7c:2f:b8:51:e2:e8:89:bd:
+        88:cf:27:1c:08:34:5c:88:c1:68:24:db:91:85:e4:cf:fb:fb:
+        43:8d:e8:25:01:1b:c4:0e:f7:00:42:48:86:1f:24:08:58:5a:
+        8c:8d:f2:6b:47:2c:68:91:b1:69:42:fd:0d:8d:c9:26:e6:92:
+        86:a6:64:6e:92:c5:ce:3e:3c:7d:71:e3:23:a4:ab:c7:d5:a8:
+        a9:df:82:a7:3b:e8:86:d5:c3:4f:18:e3:44:d0:e0:dc:f3:c5:
+        68:2e:fe:a5:2f:05:84:c8:7e:47:42:53:6b:87:4a:fe:32:ff:
+        5e:3e:70:8c:b7:a8:15:cc:17:c2:ff:46:ec:d0:ec:2d:b4:6e:
+        12:28:a9:f9:40:e9:eb:d4:66:97:53:a9:69:55:c0:a9:aa:b2:
+        2e:cd:d1:69:f4:be:f8:bb:7c:69:ee:54:a6:db:9e:fb:5a:a6:
+        3e:fe:9a:ef:94:51:4b:75:ee:d8:d4:e1:9a:f1:02:56:13:89:
+        0e:a7:42:8b:96:8b:85:0c:1b:85:be:26:ae:ab:a6:99:bc:22:
+        f1:73:df:42
+
+GlobalSign Primary Class 3 CA
+=============================
+MD5 Fingerprint: 98:12:A3:4B:95:A9:96:64:94:E7:50:8C:3E:E1:83:5A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDrDCCApSgAwIBAgILAgAAAAAA1ni41sMwDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05OTAxMjgxMjAw
+MDBaFw0wOTAxMjgxMjAwMDBaMG0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRswGQYDVQQLExJQcmltYXJ5IENsYXNzIDMgQ0ExJjAkBgNV
+BAMTHUdsb2JhbFNpZ24gUHJpbWFyeSBDbGFzcyAzIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAkV5WZdbAwAScv0fEXHt6MQH5WJaZ4xyEL9xWj631
+WYHVQ2ZdWpOMdcqp5xHBURAUYMks1HuvxneGq3onrm+VuQvKtkb7fhr0DRRt0slO
+sq7wVPZcQEw2SHToVIxlZhCnvSu3II0FSa14fdIkI1Dj8LR5mwE5/6870y3u4UmN
+jS88akFFL5vjPeES5JF1ns+gPjySgW+KLhjc4PKMjP2H2Qf0QJTJTk9D32dWb70D
+UHyZZ6S5PJFsAm6E1vxG98xvGD4X8O8LZBZX5qyG8UiqQ8HJJ3hzREXihX26/7Ph
++xsFpEs7mRIlAVAUaq9d6sgM7uTa7EuLXGgTldzDtTA61wIDAQABo2MwYTAOBgNV
+HQ8BAf8EBAMCAAYwHQYDVR0OBBYEFMw2zBe0RZEv7c87MEh3+7UUmb7jMB8GA1Ud
+IwQYMBaAFGB7ZhpFDZfKiVAvfQTNNKj//P1LMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEEBQADggEBAFeyVMy9lRdkYIm2U5EMRZLDPahsw8yyGPV4QXTYfaMn
+r3cNWT6UHWn6idMMvRoB9D/o4Hcagiha5mLXt+M2yQ6feuPC08xZiQzvFovwNnci
+yqS2t8FCZwFAY8znOGSHWxSWZnstFO69SW3/d9DiTlvTgMJND8q4nYGXpzRux+Oc
+SOW0qkX19mVMSPISwtKTjMIVJPMrUv/jCK64btYsEs85yxIq56l7X5g9o+HMpmOJ
+XH0xdfnV1l3y0NQ9355xqA7c5CCXeOZ/U6QNUU+OOwOuow1aTcN55zVYcELJXqFe
+tNkio0RTNaTQz3OAxc+fVph2+RRMd4eCydx+XTTVNnU=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b8:d6:c3
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Jan 28 12:00:00 1999 GMT
+            Not After : Jan 28 12:00:00 2009 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Primary Class 3 CA, CN=GlobalSign Primary Class 3 CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:91:5e:56:65:d6:c0:c0:04:9c:bf:47:c4:5c:7b:
+                    7a:31:01:f9:58:96:99:e3:1c:84:2f:dc:56:8f:ad:
+                    f5:59:81:d5:43:66:5d:5a:93:8c:75:ca:a9:e7:11:
+                    c1:51:10:14:60:c9:2c:d4:7b:af:c6:77:86:ab:7a:
+                    27:ae:6f:95:b9:0b:ca:b6:46:fb:7e:1a:f4:0d:14:
+                    6d:d2:c9:4e:b2:ae:f0:54:f6:5c:40:4c:36:48:74:
+                    e8:54:8c:65:66:10:a7:bd:2b:b7:20:8d:05:49:ad:
+                    78:7d:d2:24:23:50:e3:f0:b4:79:9b:01:39:ff:af:
+                    3b:d3:2d:ee:e1:49:8d:8d:2f:3c:6a:41:45:2f:9b:
+                    e3:3d:e1:12:e4:91:75:9e:cf:a0:3e:3c:92:81:6f:
+                    8a:2e:18:dc:e0:f2:8c:8c:fd:87:d9:07:f4:40:94:
+                    c9:4e:4f:43:df:67:56:6f:bd:03:50:7c:99:67:a4:
+                    b9:3c:91:6c:02:6e:84:d6:fc:46:f7:cc:6f:18:3e:
+                    17:f0:ef:0b:64:16:57:e6:ac:86:f1:48:aa:43:c1:
+                    c9:27:78:73:44:45:e2:85:7d:ba:ff:b3:e1:fb:1b:
+                    05:a4:4b:3b:99:12:25:01:50:14:6a:af:5d:ea:c8:
+                    0c:ee:e4:da:ec:4b:8b:5c:68:13:95:dc:c3:b5:30:
+                    3a:d7
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                CC:36:CC:17:B4:45:91:2F:ED:CF:3B:30:48:77:FB:B5:14:99:BE:E3
+            X509v3 Authority Key Identifier: 
+                keyid:60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        57:b2:54:cc:bd:95:17:64:60:89:b6:53:91:0c:45:92:c3:3d:
+        a8:6c:c3:cc:b2:18:f5:78:41:74:d8:7d:a3:27:af:77:0d:59:
+        3e:94:1d:69:fa:89:d3:0c:bd:1a:01:f4:3f:e8:e0:77:1a:82:
+        28:5a:e6:62:d7:b7:e3:36:c9:0e:9f:7a:e3:c2:d3:cc:59:89:
+        0c:ef:16:8b:f0:36:77:22:ca:a4:b6:b7:c1:42:67:01:40:63:
+        cc:e7:38:64:87:5b:14:96:66:7b:2d:14:ee:bd:49:6d:ff:77:
+        d0:e2:4e:5b:d3:80:c2:4d:0f:ca:b8:9d:81:97:a7:34:6e:c7:
+        e3:9c:48:e5:b4:aa:45:f5:f6:65:4c:48:f2:12:c2:d2:93:8c:
+        c2:15:24:f3:2b:52:ff:e3:08:ae:b8:6e:d6:2c:12:cf:39:cb:
+        12:2a:e7:a9:7b:5f:98:3d:a3:e1:cc:a6:63:89:5c:7d:31:75:
+        f9:d5:d6:5d:f2:d0:d4:3d:df:9e:71:a8:0e:dc:e4:20:97:78:
+        e6:7f:53:a4:0d:51:4f:8e:3b:03:ae:a3:0d:5a:4d:c3:79:e7:
+        35:58:70:42:c9:5e:a1:5e:b4:d9:22:a3:44:53:35:a4:d0:cf:
+        73:80:c5:cf:9f:56:98:76:f9:14:4c:77:87:82:c9:dc:7e:5d:
+        34:d5:36:75
+
+GlobalSign Root CA
+==================
+MD5 Fingerprint: AB:BF:EA:E3:6B:29:A6:CC:A6:78:35:99:EF:AD:2B:80
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDdTCCAl2gAwIBAgILAgAAAAAA1ni3lAUwDQYJKoZIhvcNAQEEBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
+MDBaFw0xNDAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
+aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
+jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
+xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
+1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
+snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
+U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
+9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIABjAdBgNVHQ4EFgQU
+YHtmGkUNl8qJUC99BM00qP/8/UswDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B
+AQQFAAOCAQEArqqf/LfSyx9fOSkoGJ40yWxPbxrwZKJwSk8ThptgKJ7ogUmYfQq7
+5bCdPTbbjwVR/wkxKh/diXeeDy5slQTthsu0AD+EAk2AaioteAuubyuig0SDH81Q
+gkwkr733pbTIWg/050deSY43lv6aiAU62cDbKYfmGZZHpzqmjIs8d/5GY6dT2iHR
+rH5Jokvmw2dZL7OKDrssvamqQnw1wdh/1acxOk5jQzmvCLBhNIzTmKlDNPYPhyk7
+ncJWWJh3w/cbrPad+D6qp1RF8PX51TFl/mtYnHGzHtdS6jIX/EBgHcl5JLL2bP2o
+Zg6C3ZjL2sJETy6ge/L3ayx2EYRGinij4w==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number:
+            02:00:00:00:00:00:d6:78:b7:94:05
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Validity
+            Not Before: Sep  1 12:00:00 1998 GMT
+            Not After : Jan 28 12:00:00 2014 GMT
+        Subject: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:da:0e:e6:99:8d:ce:a3:e3:4f:8a:7e:fb:f1:8b:
+                    83:25:6b:ea:48:1f:f1:2a:b0:b9:95:11:04:bd:f0:
+                    63:d1:e2:67:66:cf:1c:dd:cf:1b:48:2b:ee:8d:89:
+                    8e:9a:af:29:80:65:ab:e9:c7:2d:12:cb:ab:1c:4c:
+                    70:07:a1:3d:0a:30:cd:15:8d:4f:f8:dd:d4:8c:50:
+                    15:1c:ef:50:ee:c4:2e:f7:fc:e9:52:f2:91:7d:e0:
+                    6d:d5:35:30:8e:5e:43:73:f2:41:e9:d5:6a:e3:b2:
+                    89:3a:56:39:38:6f:06:3c:88:69:5b:2a:4d:c5:a7:
+                    54:b8:6c:89:cc:9b:f9:3c:ca:e5:fd:89:f5:12:3c:
+                    92:78:96:d6:dc:74:6e:93:44:61:d1:8d:c7:46:b2:
+                    75:0e:86:e8:19:8a:d5:6d:6c:d5:78:16:95:a2:e9:
+                    c8:0a:38:eb:f2:24:13:4f:73:54:93:13:85:3a:1b:
+                    bc:1e:34:b5:8b:05:8c:b9:77:8b:b1:db:1f:20:91:
+                    ab:09:53:6e:90:ce:7b:37:74:b9:70:47:91:22:51:
+                    63:16:79:ae:b1:ae:41:26:08:c8:19:2b:d1:46:aa:
+                    48:d6:64:2a:d7:83:34:ff:2c:2a:c1:6c:19:43:4a:
+                    07:85:e7:d3:7c:f6:21:68:ef:ea:f2:52:9f:7f:93:
+                    90:cf
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Key Usage: critical
+                Certificate Sign, CRL Sign
+            X509v3 Subject Key Identifier: 
+                60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        ae:aa:9f:fc:b7:d2:cb:1f:5f:39:29:28:18:9e:34:c9:6c:4f:
+        6f:1a:f0:64:a2:70:4a:4f:13:86:9b:60:28:9e:e8:81:49:98:
+        7d:0a:bb:e5:b0:9d:3d:36:db:8f:05:51:ff:09:31:2a:1f:dd:
+        89:77:9e:0f:2e:6c:95:04:ed:86:cb:b4:00:3f:84:02:4d:80:
+        6a:2a:2d:78:0b:ae:6f:2b:a2:83:44:83:1f:cd:50:82:4c:24:
+        af:bd:f7:a5:b4:c8:5a:0f:f4:e7:47:5e:49:8e:37:96:fe:9a:
+        88:05:3a:d9:c0:db:29:87:e6:19:96:47:a7:3a:a6:8c:8b:3c:
+        77:fe:46:63:a7:53:da:21:d1:ac:7e:49:a2:4b:e6:c3:67:59:
+        2f:b3:8a:0e:bb:2c:bd:a9:aa:42:7c:35:c1:d8:7f:d5:a7:31:
+        3a:4e:63:43:39:af:08:b0:61:34:8c:d3:98:a9:43:34:f6:0f:
+        87:29:3b:9d:c2:56:58:98:77:c3:f7:1b:ac:f6:9d:f8:3e:aa:
+        a7:54:45:f0:f5:f9:d5:31:65:fe:6b:58:9c:71:b3:1e:d7:52:
+        ea:32:17:fc:40:60:1d:c9:79:24:b2:f6:6c:fd:a8:66:0e:82:
+        dd:98:cb:da:c2:44:4f:2e:a0:7b:f2:f7:6b:2c:76:11:84:46:
+        8a:78:a3:e3
+
+National Retail Federation by DST
+=================================
+MD5 Fingerprint: AD:8E:0F:9E:01:6B:A0:C5:74:D5:0C:D3:68:65:4F:1E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEAjCCAuoCEQDQHkCKAAACfAAAAAMAAAABMA0GCSqGSIb3DQEBBQUAMIG+MQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEjMCEGA1UE
+CxMaTmF0aW9uYWwgUmV0YWlsIEZlZGVyYXRpb24xGTAXBgNVBAMTEERTVCAoTlJG
+KSBSb290Q0ExITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05
+ODEyMTExNjE0MTZaFw0wODEyMDgxNjE0MTZaMIG+MQswCQYDVQQGEwJ1czENMAsG
+A1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0Rp
+Z2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEjMCEGA1UECxMaTmF0aW9uYWwgUmV0
+YWlsIEZlZGVyYXRpb24xGTAXBgNVBAMTEERTVCAoTlJGKSBSb290Q0ExITAfBgkq
+hkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBANmsm3f6UNPM3LlArLlyagCHI/wPliHQJq/k4rVf+tOmfSEw
+LswXgo+YdPxnpKbfiJeiQin1p9sRk/teIzDCqrwi50Eb5e0l3sg/295XRXhARoOy
+1Ro93w9FbdVjAnXYL8Zuq5WRdDcNy00JXNHUWzra3Q7Ia5nY1TnM34VVxJJTAqPh
+94DJcKPa3DPEf6JHCBw1lh+hAxwwg/TEzP+Yw7BGRKLAv63b0oH2TJgsp14k84bK
+Y9W6ffCawErQG1ju7Klnz2kCbCLAYCws0cgg6sgt+92cu8tRTNznVwQ7VJsRpTJ0
+7HQB85AVWy98LJNluWZntIGINeWekRh/gahByMsCAwEAATANBgkqhkiG9w0BAQUF
+AAOCAQEAhF4LO+ygjRyb0DwdcWnkGn9kvoFlYcWMatd8AHTgemJV7SR84GHj8t0U
+5hFugw7h6qmegK2aIL/gV37V0LWEYy3ZGOS9GzUsXq5hdqpnhTs44TGBHzF/5tf4
+W9K7Y3mGxIzF3gqu19H8AXT/trYNYoFnHLsm+CSA4Fxe2KSKOo99y/+So/18qTJp
+B1hYYUKZUgOxOD3GcW9s8uh9BqrBfFPLGi2IT8mpp6xpb/ekH9h0gfVKv7FVt9N3
+OKdvwkrI4nOJ01dy4UMvcjz2H7f4BEpuwemUF+SXF/QOE4ZvjavoXy20/2zWorQf
+7LmUaqoSTxrd9Xe1JYzyigrx/FJbWA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8a:00:00:02:7c:00:00:00:03:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=National Retail Federation, CN=DST (NRF) RootCA/Email=ca at digsigtrust.com
+        Validity
+            Not Before: Dec 11 16:14:16 1998 GMT
+            Not After : Dec  8 16:14:16 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=National Retail Federation, CN=DST (NRF) RootCA/Email=ca at digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:d9:ac:9b:77:fa:50:d3:cc:dc:b9:40:ac:b9:72:
+                    6a:00:87:23:fc:0f:96:21:d0:26:af:e4:e2:b5:5f:
+                    fa:d3:a6:7d:21:30:2e:cc:17:82:8f:98:74:fc:67:
+                    a4:a6:df:88:97:a2:42:29:f5:a7:db:11:93:fb:5e:
+                    23:30:c2:aa:bc:22:e7:41:1b:e5:ed:25:de:c8:3f:
+                    db:de:57:45:78:40:46:83:b2:d5:1a:3d:df:0f:45:
+                    6d:d5:63:02:75:d8:2f:c6:6e:ab:95:91:74:37:0d:
+                    cb:4d:09:5c:d1:d4:5b:3a:da:dd:0e:c8:6b:99:d8:
+                    d5:39:cc:df:85:55:c4:92:53:02:a3:e1:f7:80:c9:
+                    70:a3:da:dc:33:c4:7f:a2:47:08:1c:35:96:1f:a1:
+                    03:1c:30:83:f4:c4:cc:ff:98:c3:b0:46:44:a2:c0:
+                    bf:ad:db:d2:81:f6:4c:98:2c:a7:5e:24:f3:86:ca:
+                    63:d5:ba:7d:f0:9a:c0:4a:d0:1b:58:ee:ec:a9:67:
+                    cf:69:02:6c:22:c0:60:2c:2c:d1:c8:20:ea:c8:2d:
+                    fb:dd:9c:bb:cb:51:4c:dc:e7:57:04:3b:54:9b:11:
+                    a5:32:74:ec:74:01:f3:90:15:5b:2f:7c:2c:93:65:
+                    b9:66:67:b4:81:88:35:e5:9e:91:18:7f:81:a8:41:
+                    c8:cb
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        84:5e:0b:3b:ec:a0:8d:1c:9b:d0:3c:1d:71:69:e4:1a:7f:64:
+        be:81:65:61:c5:8c:6a:d7:7c:00:74:e0:7a:62:55:ed:24:7c:
+        e0:61:e3:f2:dd:14:e6:11:6e:83:0e:e1:ea:a9:9e:80:ad:9a:
+        20:bf:e0:57:7e:d5:d0:b5:84:63:2d:d9:18:e4:bd:1b:35:2c:
+        5e:ae:61:76:aa:67:85:3b:38:e1:31:81:1f:31:7f:e6:d7:f8:
+        5b:d2:bb:63:79:86:c4:8c:c5:de:0a:ae:d7:d1:fc:01:74:ff:
+        b6:b6:0d:62:81:67:1c:bb:26:f8:24:80:e0:5c:5e:d8:a4:8a:
+        3a:8f:7d:cb:ff:92:a3:fd:7c:a9:32:69:07:58:58:61:42:99:
+        52:03:b1:38:3d:c6:71:6f:6c:f2:e8:7d:06:aa:c1:7c:53:cb:
+        1a:2d:88:4f:c9:a9:a7:ac:69:6f:f7:a4:1f:d8:74:81:f5:4a:
+        bf:b1:55:b7:d3:77:38:a7:6f:c2:4a:c8:e2:73:89:d3:57:72:
+        e1:43:2f:72:3c:f6:1f:b7:f8:04:4a:6e:c1:e9:94:17:e4:97:
+        17:f4:0e:13:86:6f:8d:ab:e8:5f:2d:b4:ff:6c:d6:a2:b4:1f:
+        ec:b9:94:6a:aa:12:4f:1a:dd:f5:77:b5:25:8c:f2:8a:0a:f1:
+        fc:52:5b:58
+
+TC TrustCenter, Germany, Class 1 CA
+===================================
+MD5 Fingerprint: 64:3F:F8:3E:52:14:4A:59:BA:93:56:04:0B:23:02:D1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDEgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTYzM1oX
+DTA1MTIzMTEzNTYzM1owgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAxIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAsCnrtHaz
+rte2W7Re573jsZxJBFdboavZfxMb/bphq9jncd8tAJRdUUh9I+91YoSQPAofWRF0
+L46Apf0wAj0pUs1yGkkhnLzLUo5IoWOWyBCFMGlXdEXAWobG1T3gaFd9MWokjUWX
+PjF+aGYybiRt7DI2yUHK8DFEyKNhyhugNh8CAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAx
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQAFQlImpAwn
+AUSsXCUowkRCVAi5HcU+bFlmxLNOUKf4+JZ1oZZ16BY4oM1dbvp5pxt7HR7DALlm
+vlrWYg/n8nu470zgwD9Zrjm3hAmeq/GpLmtp4q3M8up4CQUgOEJxGH7Hspfm1QIF
+BlajX/GqwsRP/vfvFg+d7KqFzz0pJPEEzQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 2 (0x2)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 1 CA/Email=certificate at trustcenter.de
+        Validity
+            Not Before: Mar  9 13:56:33 1998 GMT
+            Not After : Dec 31 13:56:33 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 1 CA/Email=certificate at trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b0:29:eb:b4:76:b3:ae:d7:b6:5b:b4:5e:e7:bd:
+                    e3:b1:9c:49:04:57:5b:a1:ab:d9:7f:13:1b:fd:ba:
+                    61:ab:d8:e7:71:df:2d:00:94:5d:51:48:7d:23:ef:
+                    75:62:84:90:3c:0a:1f:59:11:74:2f:8e:80:a5:fd:
+                    30:02:3d:29:52:cd:72:1a:49:21:9c:bc:cb:52:8e:
+                    48:a1:63:96:c8:10:85:30:69:57:74:45:c0:5a:86:
+                    c6:d5:3d:e0:68:57:7d:31:6a:24:8d:45:97:3e:31:
+                    7e:68:66:32:6e:24:6d:ec:32:36:c9:41:ca:f0:31:
+                    44:c8:a3:61:ca:1b:a0:36:1f
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 1 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        05:42:52:26:a4:0c:27:01:44:ac:5c:25:28:c2:44:42:54:08:
+        b9:1d:c5:3e:6c:59:66:c4:b3:4e:50:a7:f8:f8:96:75:a1:96:
+        75:e8:16:38:a0:cd:5d:6e:fa:79:a7:1b:7b:1d:1e:c3:00:b9:
+        66:be:5a:d6:62:0f:e7:f2:7b:b8:ef:4c:e0:c0:3f:59:ae:39:
+        b7:84:09:9e:ab:f1:a9:2e:6b:69:e2:ad:cc:f2:ea:78:09:05:
+        20:38:42:71:18:7e:c7:b2:97:e6:d5:02:05:06:56:a3:5f:f1:
+        aa:c2:c4:4f:fe:f7:ef:16:0f:9d:ec:aa:85:cf:3d:29:24:f1:
+        04:cd
+
+TC TrustCenter, Germany, Class 2 CA
+===================================
+MD5 Fingerprint: E1:E9:96:53:77:E1:F0:38:A0:02:AB:94:C6:95:7B:FC
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBAzANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTc0NFoX
+DTA1MTIzMTEzNTc0NFowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAyIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2jjo7TIA
+KXGDAQ2/jAHc2satOaSpii/Vi1xoX1DGYvVmvcqRIuyqHVHXPbNRsoNOXctJsPBM
+VeVrLceFCzAckk6C1MoC7fdvvtzg4xS4BVPymvRWi1qehZPRtIJWrk27qEtXFrz+
++Fie+CmNsHvNeMlPrItnDPGc+/xXm1dcTw0CAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAy
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCJG/Tv6Tji
+bAz2zW9JzinM+6YP+Y0+lUbW/EcyibLIBmF60ucNEwKUC9mLVkf0u+fFX3v0Y0yu
+fDTqDaKpsyyF8+P+J1QQkrCPksGYQhhwSNtOLOsNJGjk0fe+Cakph7vo2tw+o4hC
+MfXR43+u2I4AWnSYsE/G/yN7XHMAeMnbTg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 3 (0x3)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 2 CA/Email=certificate at trustcenter.de
+        Validity
+            Not Before: Mar  9 13:57:44 1998 GMT
+            Not After : Dec 31 13:57:44 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 2 CA/Email=certificate at trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:da:38:e8:ed:32:00:29:71:83:01:0d:bf:8c:01:
+                    dc:da:c6:ad:39:a4:a9:8a:2f:d5:8b:5c:68:5f:50:
+                    c6:62:f5:66:bd:ca:91:22:ec:aa:1d:51:d7:3d:b3:
+                    51:b2:83:4e:5d:cb:49:b0:f0:4c:55:e5:6b:2d:c7:
+                    85:0b:30:1c:92:4e:82:d4:ca:02:ed:f7:6f:be:dc:
+                    e0:e3:14:b8:05:53:f2:9a:f4:56:8b:5a:9e:85:93:
+                    d1:b4:82:56:ae:4d:bb:a8:4b:57:16:bc:fe:f8:58:
+                    9e:f8:29:8d:b0:7b:cd:78:c9:4f:ac:8b:67:0c:f1:
+                    9c:fb:fc:57:9b:57:5c:4f:0d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 2 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        89:1b:f4:ef:e9:38:e2:6c:0c:f6:cd:6f:49:ce:29:cc:fb:a6:
+        0f:f9:8d:3e:95:46:d6:fc:47:32:89:b2:c8:06:61:7a:d2:e7:
+        0d:13:02:94:0b:d9:8b:56:47:f4:bb:e7:c5:5f:7b:f4:63:4c:
+        ae:7c:34:ea:0d:a2:a9:b3:2c:85:f3:e3:fe:27:54:10:92:b0:
+        8f:92:c1:98:42:18:70:48:db:4e:2c:eb:0d:24:68:e4:d1:f7:
+        be:09:a9:29:87:bb:e8:da:dc:3e:a3:88:42:31:f5:d1:e3:7f:
+        ae:d8:8e:00:5a:74:98:b0:4f:c6:ff:23:7b:5c:73:00:78:c9:
+        db:4e
+
+TC TrustCenter, Germany, Class 3 CA
+===================================
+MD5 Fingerprint: 62:AB:B6:15:4A:B4:B0:16:77:FF:AE:CF:16:16:2B:8C
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBBDANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTEzNTg0OVoX
+DTA1MTIzMTEzNTg0OVowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyAzIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtrTBNQUu
+DY3soEBqHA4nplCSa1AbB94u53bM4Nr8hKhejGNqK03ZTgJ2EcEL8o15ygC28bAO
+1/ukFz2vq2l6lie/rzOhmipZqsS1NwjyEqUxtkP1MpZxKCirjSiG37vu4wx9MNbD
+UquPXSeca8Cj5wVrV0lEs27qZM/SjnpQd3cCAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyAz
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCEhlBieaAn
+4SW6CbE0DxMJ7S3Ko+aV+TCszRelzj2Xnex8jyZ/wGHKIveR3Tw2WZqbdfe85Mjt
+7AK2IqfzLPHIknhttu7FKOyAIE+5awjnL6eGHn2xCJ9UuQA3PKDYGsiWHPQyFJw5
+lbfu8ENJwl7oy3lvU7/7SYos2EvZVfIScA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 4 (0x4)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 3 CA/Email=certificate at trustcenter.de
+        Validity
+            Not Before: Mar  9 13:58:49 1998 GMT
+            Not After : Dec 31 13:58:49 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 3 CA/Email=certificate at trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:b4:c1:35:05:2e:0d:8d:ec:a0:40:6a:1c:0e:
+                    27:a6:50:92:6b:50:1b:07:de:2e:e7:76:cc:e0:da:
+                    fc:84:a8:5e:8c:63:6a:2b:4d:d9:4e:02:76:11:c1:
+                    0b:f2:8d:79:ca:00:b6:f1:b0:0e:d7:fb:a4:17:3d:
+                    af:ab:69:7a:96:27:bf:af:33:a1:9a:2a:59:aa:c4:
+                    b5:37:08:f2:12:a5:31:b6:43:f5:32:96:71:28:28:
+                    ab:8d:28:86:df:bb:ee:e3:0c:7d:30:d6:c3:52:ab:
+                    8f:5d:27:9c:6b:c0:a3:e7:05:6b:57:49:44:b3:6e:
+                    ea:64:cf:d2:8e:7a:50:77:77
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 3 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        84:86:50:62:79:a0:27:e1:25:ba:09:b1:34:0f:13:09:ed:2d:
+        ca:a3:e6:95:f9:30:ac:cd:17:a5:ce:3d:97:9d:ec:7c:8f:26:
+        7f:c0:61:ca:22:f7:91:dd:3c:36:59:9a:9b:75:f7:bc:e4:c8:
+        ed:ec:02:b6:22:a7:f3:2c:f1:c8:92:78:6d:b6:ee:c5:28:ec:
+        80:20:4f:b9:6b:08:e7:2f:a7:86:1e:7d:b1:08:9f:54:b9:00:
+        37:3c:a0:d8:1a:c8:96:1c:f4:32:14:9c:39:95:b7:ee:f0:43:
+        49:c2:5e:e8:cb:79:6f:53:bf:fb:49:8a:2c:d8:4b:d9:55:f2:
+        12:70
+
+TC TrustCenter, Germany, Class 4 CA
+===================================
+MD5 Fingerprint: BF:AF:EC:C4:DA:F9:30:F9:CA:35:CA:25:E4:3F:8D:89
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIENTCCA56gAwIBAgIBBTANBgkqhkiG9w0BAQQFADCBvDELMAkGA1UEBhMCREUx
+EDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxOjA4BgNVBAoTMVRD
+IFRydXN0Q2VudGVyIGZvciBTZWN1cml0eSBpbiBEYXRhIE5ldHdvcmtzIEdtYkgx
+IjAgBgNVBAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDQgQ0ExKTAnBgkqhkiG9w0B
+CQEWGmNlcnRpZmljYXRlQHRydXN0Y2VudGVyLmRlMB4XDTk4MDMwOTE0MDAyMFoX
+DTA1MTIzMTE0MDAyMFowgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJn
+MRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig
+U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVz
+dENlbnRlciBDbGFzcyA0IENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0
+cnVzdGNlbnRlci5kZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvy9j1jZ7
+sg3TVfVkbOYlXca0yBS6JTiD61ZipVWpZaP0I5nCS7nQzVRnpqOgo6kzK3bkva13
+su1cEnTDxbYPUppyk0OQYmYVD0Wl3eDduG9AblfBeXKjYKq6dh0SiVNa/AK+4QkT
+xUov3D2LGa3XiyRF+0z0zVw1HSlMUfPybFUCAwEAAaOCAUMwggE/MEAGCWCGSAGG
++EIBAwQzFjFodHRwczovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL2NoZWNr
+LXJldi5jZ2k/MEAGCWCGSAGG+EIBBAQzFjFodHRwczovL3d3dy50cnVzdGNlbnRl
+ci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2k/MDwGCWCGSAGG+EIBBwQvFi1odHRw
+czovL3d3dy50cnVzdGNlbnRlci5kZS9jZ2ktYmluL1JlbmV3LmNnaT8wPgYJYIZI
+AYb4QgEIBDEWL2h0dHA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvZ3VpZGVsaW5lcy9p
+bmRleC5odG1sMCgGCWCGSAGG+EIBDQQbFhlUQyBUcnVzdENlbnRlciBDbGFzcyA0
+IENBMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQCUaBQbJZ4p
+mbGyI9JEs5Wf0Z5VBN3jL4IzVZZ3GZ0rnmUc+orjx48l/LEeVUYPj/9PNy+kdlmm
+ZOvVFnC93ZUzDKQNJOtkULRDEfJDvg1xmCLsAa/s98dcccN1kVgZ6N2g9LTxvBBK
+85O0Bkm7H2bSvXRH4Zr569erbR+64R0s2g==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 5 (0x5)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 4 CA/Email=certificate at trustcenter.de
+        Validity
+            Not Before: Mar  9 14:00:20 1998 GMT
+            Not After : Dec 31 14:00:20 2005 GMT
+        Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 4 CA/Email=certificate at trustcenter.de
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bf:2f:63:d6:36:7b:b2:0d:d3:55:f5:64:6c:e6:
+                    25:5d:c6:b4:c8:14:ba:25:38:83:eb:56:62:a5:55:
+                    a9:65:a3:f4:23:99:c2:4b:b9:d0:cd:54:67:a6:a3:
+                    a0:a3:a9:33:2b:76:e4:bd:ad:77:b2:ed:5c:12:74:
+                    c3:c5:b6:0f:52:9a:72:93:43:90:62:66:15:0f:45:
+                    a5:dd:e0:dd:b8:6f:40:6e:57:c1:79:72:a3:60:aa:
+                    ba:76:1d:12:89:53:5a:fc:02:be:e1:09:13:c5:4a:
+                    2f:dc:3d:8b:19:ad:d7:8b:24:45:fb:4c:f4:cd:5c:
+                    35:1d:29:4c:51:f3:f2:6c:55
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            Netscape Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape CA Revocation Url: 
+                https://www.trustcenter.de/cgi-bin/check-rev.cgi?
+            Netscape Renewal Url: 
+                https://www.trustcenter.de/cgi-bin/Renew.cgi?
+            Netscape CA Policy Url: 
+                http://www.trustcenter.de/guidelines/index.html
+            Netscape Comment: 
+                TC TrustCenter Class 4 CA
+            Netscape Cert Type: 
+                SSL CA, S/MIME CA, Object Signing CA
+    Signature Algorithm: md5WithRSAEncryption
+        94:68:14:1b:25:9e:29:99:b1:b2:23:d2:44:b3:95:9f:d1:9e:
+        55:04:dd:e3:2f:82:33:55:96:77:19:9d:2b:9e:65:1c:fa:8a:
+        e3:c7:8f:25:fc:b1:1e:55:46:0f:8f:ff:4f:37:2f:a4:76:59:
+        a6:64:eb:d5:16:70:bd:dd:95:33:0c:a4:0d:24:eb:64:50:b4:
+        43:11:f2:43:be:0d:71:98:22:ec:01:af:ec:f7:c7:5c:71:c3:
+        75:91:58:19:e8:dd:a0:f4:b4:f1:bc:10:4a:f3:93:b4:06:49:
+        bb:1f:66:d2:bd:74:47:e1:9a:f9:eb:d7:ab:6d:1f:ba:e1:1d:
+        2c:da
+
+Thawte Personal Basic CA
+========================
+MD5 Fingerprint: E6:0B:D2:C9:CA:2D:88:DB:1A:71:0E:4B:78:EB:02:41
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDITCCAoqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCByzELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFBlcnNvbmFsIEJhc2lj
+IENBMSgwJgYJKoZIhvcNAQkBFhlwZXJzb25hbC1iYXNpY0B0aGF3dGUuY29tMB4X
+DTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgcsxCzAJBgNVBAYTAlpBMRUw
+EwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UE
+ChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy
+dmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQZXJzb25hbCBCYXNpYyBD
+QTEoMCYGCSqGSIb3DQEJARYZcGVyc29uYWwtYmFzaWNAdGhhd3RlLmNvbTCBnzAN
+BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvLyTU23AUE+CFeZIlDWmWr5vQvoPR+53
+dXLdjUmbllegeNTKP1GzaQuRdhciB5dqxFGTS+CN7zeVoQxN2jSQHReJl+A1OFdK
+wPQIcOk8RHtQfmGakOMj04gRRif1CwcOu93RfyAKiLlWCy4cgNrx454p7xS9CkT7
+G1sY0b8jkyECAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQF
+AAOBgQAt4plrsD16iddZopQBHyvdEktTwq1/qqcAXJFAVyVKOKqEcLnZgA+le1z7
+c8a914phXAPjLSeoF+CEhULcXpvGt7Jtu3Sv5D/Lp7ew4F2+eIMllNLbgQ95B21P
+9DkVWlIBe94y1k049hJcBlDfBVu9FEuh3ym6O0GN92NWod8isQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA/Email=personal-basic at thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA/Email=personal-basic at thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:bc:bc:93:53:6d:c0:50:4f:82:15:e6:48:94:35:
+                    a6:5a:be:6f:42:fa:0f:47:ee:77:75:72:dd:8d:49:
+                    9b:96:57:a0:78:d4:ca:3f:51:b3:69:0b:91:76:17:
+                    22:07:97:6a:c4:51:93:4b:e0:8d:ef:37:95:a1:0c:
+                    4d:da:34:90:1d:17:89:97:e0:35:38:57:4a:c0:f4:
+                    08:70:e9:3c:44:7b:50:7e:61:9a:90:e3:23:d3:88:
+                    11:46:27:f5:0b:07:0e:bb:dd:d1:7f:20:0a:88:b9:
+                    56:0b:2e:1c:80:da:f1:e3:9e:29:ef:14:bd:0a:44:
+                    fb:1b:5b:18:d1:bf:23:93:21
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        2d:e2:99:6b:b0:3d:7a:89:d7:59:a2:94:01:1f:2b:dd:12:4b:
+        53:c2:ad:7f:aa:a7:00:5c:91:40:57:25:4a:38:aa:84:70:b9:
+        d9:80:0f:a5:7b:5c:fb:73:c6:bd:d7:8a:61:5c:03:e3:2d:27:
+        a8:17:e0:84:85:42:dc:5e:9b:c6:b7:b2:6d:bb:74:af:e4:3f:
+        cb:a7:b7:b0:e0:5d:be:78:83:25:94:d2:db:81:0f:79:07:6d:
+        4f:f4:39:15:5a:52:01:7b:de:32:d6:4d:38:f6:12:5c:06:50:
+        df:05:5b:bd:14:4b:a1:df:29:ba:3b:41:8d:f7:63:56:a1:df:
+        22:b1
+
+Thawte Personal Freemail CA
+===========================
+MD5 Fingerprint: 1E:74:C3:86:3C:0C:35:C5:3E:C2:7F:EF:3C:AA:3C:D9
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDLTCCApagAwIBAgIBADANBgkqhkiG9w0BAQQFADCB0TELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVt
+YWlsIENBMSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUu
+Y29tMB4XDTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgdExCzAJBgNVBAYT
+AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEa
+MBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRp
+b24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBG
+cmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhh
+d3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1GnX1LCUZFtx6UfY
+DFG26nKRsIRefS0Nj3sS34UldSh0OkIsYyeflXtL734Zhx2G6qPduc6WZBrCFG5E
+rHzmj+hND3EfQDimAKOHePb5lIZererAXnbr2RSjXW56fAylS1V/Bhkpf56aJtVq
+uzgkCGqYx7Hao5iR/Xnb5VrEHLkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zAN
+BgkqhkiG9w0BAQQFAAOBgQDH7JJ+Tvj1lqVnYiqk8E0RYNBvjWBYYawmu1I1XAjP
+MPuoSpaKH2JCI4wXD/S6ZJwXrEcp352YXtJsYHFcoqzceePnbgBHH7UNKOgCneSa
+/RP0ptl8sfjcXyMmCZGAc9AUG95DqYMl8uacLxXK/qarigd1iwzdUYRr5PjRznei
+gQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA/Email=personal-freemail at thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA/Email=personal-freemail at thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d4:69:d7:d4:b0:94:64:5b:71:e9:47:d8:0c:51:
+                    b6:ea:72:91:b0:84:5e:7d:2d:0d:8f:7b:12:df:85:
+                    25:75:28:74:3a:42:2c:63:27:9f:95:7b:4b:ef:7e:
+                    19:87:1d:86:ea:a3:dd:b9:ce:96:64:1a:c2:14:6e:
+                    44:ac:7c:e6:8f:e8:4d:0f:71:1f:40:38:a6:00:a3:
+                    87:78:f6:f9:94:86:5e:ad:ea:c0:5e:76:eb:d9:14:
+                    a3:5d:6e:7a:7c:0c:a5:4b:55:7f:06:19:29:7f:9e:
+                    9a:26:d5:6a:bb:38:24:08:6a:98:c7:b1:da:a3:98:
+                    91:fd:79:db:e5:5a:c4:1c:b9
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        c7:ec:92:7e:4e:f8:f5:96:a5:67:62:2a:a4:f0:4d:11:60:d0:
+        6f:8d:60:58:61:ac:26:bb:52:35:5c:08:cf:30:fb:a8:4a:96:
+        8a:1f:62:42:23:8c:17:0f:f4:ba:64:9c:17:ac:47:29:df:9d:
+        98:5e:d2:6c:60:71:5c:a2:ac:dc:79:e3:e7:6e:00:47:1f:b5:
+        0d:28:e8:02:9d:e4:9a:fd:13:f4:a6:d9:7c:b1:f8:dc:5f:23:
+        26:09:91:80:73:d0:14:1b:de:43:a9:83:25:f2:e6:9c:2f:15:
+        ca:fe:a6:ab:8a:07:75:8b:0c:dd:51:84:6b:e4:f8:d1:ce:77:
+        a2:81
+
+Thawte Personal Premium CA
+==========================
+MD5 Fingerprint: 3A:B2:DE:22:9A:20:93:49:F9:ED:C8:D2:8A:E7:68:0D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBzzELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD
+VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
+ZXJ2aWNlcyBEaXZpc2lvbjEjMCEGA1UEAxMaVGhhd3RlIFBlcnNvbmFsIFByZW1p
+dW0gQ0ExKjAoBgkqhkiG9w0BCQEWG3BlcnNvbmFsLXByZW1pdW1AdGhhd3RlLmNv
+bTAeFw05NjAxMDEwMDAwMDBaFw0yMDEyMzEyMzU5NTlaMIHPMQswCQYDVQQGEwJa
+QTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAY
+BgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9u
+IFNlcnZpY2VzIERpdmlzaW9uMSMwIQYDVQQDExpUaGF3dGUgUGVyc29uYWwgUHJl
+bWl1bSBDQTEqMCgGCSqGSIb3DQEJARYbcGVyc29uYWwtcHJlbWl1bUB0aGF3dGUu
+Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJZtn4B0TPuYwu8KHvE0Vs
+Bd/eJxZRNkERbGw77f4QfRKe5ZtCmv5gMcNmt3M6SK5O0DI3lIi1DbbZ8/JE2dWI
+Et12TfIa/G8jHnrx2JhFTgcQ7xZC0EN1bUre4qrJMf8fAHB8Zs8QJQi6+u4A6UYD
+ZicRFTuqW/KY3TZCstqIdQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
+SIb3DQEBBAUAA4GBAGk2ifc0KjNyL2071CKyuG+axTZmDhs8obF1Wub9NdP4qPIH
+b4Vnjt4rueIXsDqg8A6iAJrf8xQVbrvIhVqYgPn/vnQdPfP+MCXRNzRn+qVxeTBh
+KXLA4CxM+1bkOqhv5TJZUtt1KFBZDPgLGeSs2a+WjS9Q2wfD6h+rM+D1KzGJ
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Premium CA/Email=personal-premium at thawte.com
+        Validity
+            Not Before: Jan  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Premium CA/Email=personal-premium at thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:66:d9:f8:07:44:cf:b9:8c:2e:f0:a1:ef:13:
+                    45:6c:05:df:de:27:16:51:36:41:11:6c:6c:3b:ed:
+                    fe:10:7d:12:9e:e5:9b:42:9a:fe:60:31:c3:66:b7:
+                    73:3a:48:ae:4e:d0:32:37:94:88:b5:0d:b6:d9:f3:
+                    f2:44:d9:d5:88:12:dd:76:4d:f2:1a:fc:6f:23:1e:
+                    7a:f1:d8:98:45:4e:07:10:ef:16:42:d0:43:75:6d:
+                    4a:de:e2:aa:c9:31:ff:1f:00:70:7c:66:cf:10:25:
+                    08:ba:fa:ee:00:e9:46:03:66:27:11:15:3b:aa:5b:
+                    f2:98:dd:36:42:b2:da:88:75
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        69:36:89:f7:34:2a:33:72:2f:6d:3b:d4:22:b2:b8:6f:9a:c5:
+        36:66:0e:1b:3c:a1:b1:75:5a:e6:fd:35:d3:f8:a8:f2:07:6f:
+        85:67:8e:de:2b:b9:e2:17:b0:3a:a0:f0:0e:a2:00:9a:df:f3:
+        14:15:6e:bb:c8:85:5a:98:80:f9:ff:be:74:1d:3d:f3:fe:30:
+        25:d1:37:34:67:fa:a5:71:79:30:61:29:72:c0:e0:2c:4c:fb:
+        56:e4:3a:a8:6f:e5:32:59:52:db:75:28:50:59:0c:f8:0b:19:
+        e4:ac:d9:af:96:8d:2f:50:db:07:c3:ea:1f:ab:33:e0:f5:2b:
+        31:89
+
+Thawte Premium Server CA
+========================
+MD5 Fingerprint: 06:9F:69:79:16:66:90:02:1B:8C:8C:A2:C3:07:6F:3A
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
+VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
+dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
+MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
+MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
+A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
+b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
+cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
+bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
+VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
+ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
+uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
+9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
+hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
+pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/Email=premium-server at thawte.com
+        Validity
+            Not Before: Aug  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/Email=premium-server at thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d2:36:36:6a:8b:d7:c2:5b:9e:da:81:41:62:8f:
+                    38:ee:49:04:55:d6:d0:ef:1c:1b:95:16:47:ef:18:
+                    48:35:3a:52:f4:2b:6a:06:8f:3b:2f:ea:56:e3:af:
+                    86:8d:9e:17:f7:9e:b4:65:75:02:4d:ef:cb:09:a2:
+                    21:51:d8:9b:d0:67:d0:ba:0d:92:06:14:73:d4:93:
+                    cb:97:2a:00:9c:5c:4e:0c:bc:fa:15:52:fc:f2:44:
+                    6e:da:11:4a:6e:08:9f:2f:2d:e3:f9:aa:3a:86:73:
+                    b6:46:53:58:c8:89:05:bd:83:11:b8:73:3f:aa:07:
+                    8d:f4:42:4d:e7:40:9d:1c:37
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        26:48:2c:16:c2:58:fa:e8:16:74:0c:aa:aa:5f:54:3f:f2:d7:
+        c9:78:60:5e:5e:6e:37:63:22:77:36:7e:b2:17:c4:34:b9:f5:
+        08:85:fc:c9:01:38:ff:4d:be:f2:16:42:43:e7:bb:5a:46:fb:
+        c1:c6:11:1f:f1:4a:b0:28:46:c9:c3:c4:42:7d:bc:fa:ab:59:
+        6e:d5:b7:51:88:11:e3:a4:85:19:6b:82:4c:a4:0c:12:ad:e9:
+        a4:ae:3f:f1:c3:49:65:9a:8c:c5:c8:3e:25:b7:94:99:bb:92:
+        32:71:07:f0:86:5e:ed:50:27:a6:0d:a6:23:f9:bb:cb:a6:07:
+        14:42
+
+Thawte Server CA
+================
+MD5 Fingerprint: C5:70:C4:A2:ED:53:78:0C:C8:10:53:81:64:CB:D0:1D
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
+VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
+MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
+MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
+DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
+dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
+cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
+DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
+gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
+yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
+L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
+EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
+7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
+QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
+qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/Email=server-certs at thawte.com
+        Validity
+            Not Before: Aug  1 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 2020 GMT
+        Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/Email=server-certs at thawte.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d3:a4:50:6e:c8:ff:56:6b:e6:cf:5d:b6:ea:0c:
+                    68:75:47:a2:aa:c2:da:84:25:fc:a8:f4:47:51:da:
+                    85:b5:20:74:94:86:1e:0f:75:c9:e9:08:61:f5:06:
+                    6d:30:6e:15:19:02:e9:52:c0:62:db:4d:99:9e:e2:
+                    6a:0c:44:38:cd:fe:be:e3:64:09:70:c5:fe:b1:6b:
+                    29:b6:2f:49:c8:3b:d4:27:04:25:10:97:2f:e7:90:
+                    6d:c0:28:42:99:d7:4c:43:de:c3:f5:21:6d:54:9f:
+                    5d:c3:58:e1:c0:e4:d9:5b:b0:b8:dc:b4:7b:df:36:
+                    3a:c2:b5:66:22:12:d6:87:0d
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:TRUE
+    Signature Algorithm: md5WithRSAEncryption
+        07:fa:4c:69:5c:fb:95:cc:46:ee:85:83:4d:21:30:8e:ca:d9:
+        a8:6f:49:1a:e6:da:51:e3:60:70:6c:84:61:11:a1:1a:c8:48:
+        3e:59:43:7d:4f:95:3d:a1:8b:b7:0b:62:98:7a:75:8a:dd:88:
+        4e:4e:9e:40:db:a8:cc:32:74:b9:6f:0d:c6:e3:b3:44:0b:d9:
+        8a:6f:9a:29:9b:99:18:28:3b:d1:e3:40:28:9a:5a:3c:d5:b5:
+        e7:20:1b:8b:ca:a4:ab:8d:e9:51:d9:e2:4c:2c:59:a9:da:b9:
+        b2:75:1b:f6:42:f2:ef:c7:f2:18:f9:89:bc:a3:ff:8a:23:2e:
+        70:47
+
+Thawte Universal CA Root
+========================
+MD5 Fingerprint: 17:AF:71:16:52:7B:73:65:22:05:29:28:84:71:9D:13
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIRIjCCCQoCAQAwDQYJKoZIhvcNAQEFBQAwVzEPMA0GA1UEChMGVGhhd3RlMSEw
+HwYDVQQLExhUaGF3dGUgVW5pdmVyc2FsIENBIFJvb3QxITAfBgNVBAMTGFRoYXd0
+ZSBVbml2ZXJzYWwgQ0EgUm9vdDAeFw05OTEyMDUxMzU2MDVaFw0zNzA0MDMxMzU2
+MDVaMFcxDzANBgNVBAoTBlRoYXd0ZTEhMB8GA1UECxMYVGhhd3RlIFVuaXZlcnNh
+bCBDQSBSb290MSEwHwYDVQQDExhUaGF3dGUgVW5pdmVyc2FsIENBIFJvb3Qwgggi
+MA0GCSqGSIb3DQEBAQUAA4IIDwAwgggKAoIIAQDiiQVtw3+tpok6/7vHzZ03seHS
+IR6bYSoV53tXT1U80Lv52T0+przstK1TmhYC6wty/Yryj0QFxevT5b22RDnm+0e/
+ap4KlRjiaOLWltYhrYj99Rf109pCpZDtKZWWdTrah6HU9dOH3gVipuNmdJLPpby7
+32j/cXVWQVk16zNaZlHy0qMKwYzOc1wRby2MlYyRsf3P5a1WlcyFkoOQVUHJwnft
++aN0QgpoCPPQ0WX9Zyw0/yR/53nIBzslV92kDJg9vuDMGWXb8lSir0LUneKuhCMl
+CTMStWoedsSL2UkAbF66H/Ib2mfKJ6qjRCMbg4LO8qsz7VSk3MmrWWXROA7BPhtn
+j9Z1AeBVIt12d+yO3fTPeSJtuVcD9ZkIpzw+NPvEF64jWM0k8yPKagIolAGBNLRs
+a66LGsOj0gk8FlT1Nl8k459KoeJkxhbDpoF6JDZHjsFeDvv5FXgE1g5Z2Z1YZmLS
+lCkyMsh4uWb2tVbhbMYUS5ZSWZECJGpVR9c/tiMaYHeXLuJAr54EV56tEcXJQ3Dv
+SLRerBxpLi6C1VuLvoK+GRRe5w0ix1Eb/x6b8TCPcTEGszQnj196ZoJPii0Tq0LP
+IVael45mNg+Wm+Ur9AKpKmqMLMTDuHAsLSkeP1B3Hm0qVORVCpE4ocW1ZqJ2Wu4P
+v7Rn4ShuD+E2oYLRv9R34cRnMpN4yOdUU/4jeeZozCaQ9hBjXSpvkS2kczJRIfK7
+Fd+qJAhIBt6hnia/uoO/fKTIoIy90v+8hGknEyQYxEUYIyZeGBTKLoiHYqNT5iG3
+uIV7moW7FSZy+Ln3anQPST+SvqkFt5knv78JF0uZTK0REHzfdDH2jyZfqoiuOFfI
+VS3T+9gbUZm+JRs6usB9G+3O0km5z/PFfYmQgdhpSCAQo/jvklEYMosRGMA/G4VW
+zlfJ8oJkxt8CCS5KES+xJ203UvDwFmHxZ43fh3Kvh9rP+1CUbtSUheuKLOoh9ZZK
+RNXgzmp0RE3QBdOHFe020KSLZlVwk+5HBsF+LqUYeWfzKIXxcPcOg6R+VJ5adjLL
+ZRu4zfvIKAPSVJHRp8WFQwgXdqXmL2cI2KGigi0M+MGvY9RQd21rRkpBhdWQX3kt
+xOzXEYdAiuFo4mT4VTL7b5Ms2nfZIcEX5TYsTn6Qf6yUKzJnvjhQdriuQbnXIcUJ
+TGDIo1HENJtXN9/LyTNXi+v7dp8ZTcVqHypFrivtL42npQDLBPolYi50SBvKKoy6
+27Z+9rsCfKnD21h4ob/w/hoQVRHO6GlOlmXGFwPWB2iMVIKuHCJVP/H0CZcowEb3
+TgslHfcH1wkdOhhXODvoMwbnj3hGHlv1BrbsuKYN8boTS9YYIN1pM0ozFa64yJiK
+JyyTvC377jO/ZuZNurabBlVgl0u8RM1+9KHYqi/AAighFmJ42whU8vz0NOPGjxxD
+V86QGkvcLjsokYk/eto1HY4s7kns9DOtyVOojJ8EUz4kHFLJEvliV6O87izrQHwg
+I3ArlflzF4rRwRxpprc4mmf3cB16WgxAz2IPhTzCAk5+tfbFKimEsx83KuGqckLE
+7Wsaj5IcXb7R8lvyq6qp0vW4pEErK5FuEkjKmNg3jcjtADC1tgROfpzahOzA+nvl
+HYikU0awlORcG6ElLA9IUneXCWzsWxgzgwLlgn7NhSEwEf0nT8/kHuw/pVds6Sow
+GSqI5cNpOKtvOXF/hOFBw+HMKokgUi6DD2w5P0stFqwt8CSsAHP0m7MGPwW4FIUf
+q55cPJ5inQ5tO4AJ/ALqopd0ysf541bhw8qlpprAkOAkElPSwovavu0CQ15n4YmY
+ee7LqsrDG9znpUalfGsWh7ZaKNfbJzxepb22Ud0fQ887Jsg6jSVhwUn0PBvJROqv
+HMIrlAEqDjDRW4srR+XD0QQDmw45LNYn1OZwWtl1zyrYyQAF5BOI7MM5+4dhMDZD
+A8ienKIGwi/F/PCAY7FUBKBMqS7G9XZ62NDk1JQR5RW1eAbcuICPmakgMz0QhUxl
+Cco+WF5gk5qqYl3AUQYcXWCgDZxLQ/anFiGkh6rywS7ukjC4nt/fEAGLhglw2Gyo
+t1AeFpa092f9NTohkCoyxwB7TQcQCbkvc9gYfmeZBE8G/FDHhZudQJ2zljf6pdyy
+ck7vTgks/ZH9Tfe7pqE+q3uiA0CmqVUn4vr5Gc6HdarxdTbz87iR+JHDi3UTjkxl
+mhY5auU06HqWWX81sAD9W2n8Qyb69Shu/ofZfiT7tKCCblSi/66/YrT0cgHCy5hH
+mOFMtReAgM6PpijuHkVq+9/xHfxaO9bq9GwdYklXO4qPhurwUwTOnBZo/7q5/IgP
+R/cCRHJAuMo7LVOd3DxWjFl7aBosjXG7bADHGs5vQJKxoy8P2UTyo3Aunu4OrjLQ
+Oz6LB+rmebNcKeJ9a6he+Vox6AiWoowDmEbxuH2QVCbtdmL+numabl7JScdcNFMp
+VNns5EbhgDt12d/7edWH8bqe6xnOTFJz5luHriVPOXnMxrj5EHvs8JtxpAWg0ynT
+Tn8f9C0oeMxVlXsekS/MVhhzi7LbvGkH5tDYT+2i/1iFo23gSlO3Z32NDFxbe3co
+AjVEegTTKEPIazAXXTK4KTW6dto7FEp2GFik+JI8nk0zb0ZrCNkxSGjd9PskVjSy
+z2lmvkjSimYizfJpzcJTE0UpQSLWXZgftqSyo8LuAi9RG9yDpOxwJajUCGEyb+Sh
+gS58Y3L6KWW8cETPXQIDAQABMA0GCSqGSIb3DQEBBQUAA4IIAQBVmjRqIgZpCUUz
+x66pXMcJTpuGvEGQ1JRS9s0jKZRLIs3ovf6dzVLyve2rh8mrq0YEtL2iPyIwR1DA
+S4x2DwP1ktKxLcR6NZzJc4frpp/eD3ON03+Z2LqPb8Tzvhqui6KUNpDi5euNBfT8
+Zd+V8cSUTRdW1588j1A853e/lYYmZPtq/8ba6YyuQrtp5TPG2OkNxlUhScEMtKP5
+m0tc3oNPQQPOKnloOH3wVEkg9bYQ/wjcM2aWm/8G3gCe185WQ5pR/HDN9vBRo7fN
+tFyFYs1xt8YrIyvdw25AQvo3/zcc9npXlIeFI9fUycdfwU0vyQ3XXOycJe6eMIKR
+lnK4dR34CWhXl7ItS+4l7HokKe5y1JwT26vcAwrYShTJCFdEXaG1U4A08hSXz1Le
+og6KEOkU79BgvmGh8SVd1RhzP5MQypbus0DS26NVz1dapQ5PdUff6veQmm31cC4d
+FBw3ZARZULDccoZvnDc9XSivc1Xv0u4kdHQT79zbMUn7P2P10wg+M6XnnQreUyxR
+jmfbm0FlQVC91KSWbIe8EuCUx9PA5MtzWACD4awnhdadU51cvQo+A0OcDJH1bXv4
+QHJ1qxF2kSvhxqofcGl2cBUJ/pPQ1i23FWqbZ1y0aZ8lpn2K+30iqXHyzk6MuCEt
+3v5BcQ3/nexzprsHT4gOWEcufqnCx3jdunqeTuAwTmNvhdQgQen6/kNF5/uverLO
+pAUdIppYht/kzkyp/tgWpW/72M5We/XWIO/kR81jJP+5vvFIo8EBcua9wK3tJg3K
+NJ/8Ai0gTwUgriE9DMIgPD/wBITcz4n9uSWRjtBD5rMgq1wt1UCeoEvY9LLMffFY
+Co6H7YisNpbkVqARivKa0LNXozS7Gas44XRrIsQxzgHVGzbjHjhMM5PfQONZV06s
+bnseWj3FHVusyBCCNQIisvx16BCRjcR9eJNHnhydrGtiAliM1hwj1q94woCcpKok
+VBS1FJjG+CsaJMtxMgrimw5pa91+jGTRLmPvDn+xPohMnVXlyW4XBLdB/72KQcsl
+MW9Edz9HsfyBiAeOBUkgtxHZaQMqA525M4Sa399640Zzo9iijFMZiFVMdLj2RIQr
+0RQtTjkukmj/afyFYhvrVU/vJYRiRZnW2E5vP1MIfR0GlYGAf09OdDaYteKHcJjc
+1/XcUhXmxtZ5ljl/j5XPq4BTrRsLRUAO1Bi9LN6Kd3b98kRHxiHQ5HTw2BgFyHww
+csff8bv8AjCp9EImWQ2TBYKhc+005ThdzVCQ/pT8E7y9/KiiiKdzxLKo0V2IxAKi
+evEEyf6MdMnvHWRBn6welmdkrKsoQced98CYG24HwmR9WoNmVig2nOf7HHcOKKDE
+92t5OQQghMdXk7wboOq860LlqBH+/KxlzP34KIj0pZrlc1HgqJsNA3dO5eCYs4ja
+febGnnwUZsEuU0qSBzegfuk9CeQVfM/9uEGl755mncReBx2H+EGt6ucv0kFjGDf5
+FONN0OX3Q/0V4/k2cwYm3wFPqcNO3iBGd5i0eiQrO3UrTliNm12kxxagvDKIP6GD
+8wDI+NhY6WNdTCu18HJB2Kt3N9ZydK62NpzIpoNJS+DJVgspvgAwy93WyEKKANns
+FdE0cfJbZIf2J9K364awkL8p2yGeNozjIC+VI1FsG8Kk1ebYAkNnoP6bUANEf7vk
+ctXR5NqPkhRk+10UEBJKlQbJZQgpyiGjJjgRySffcGcE/cpIMn9jskV0MVBPh9kg
+cNIhcLHWEJ0zXXiDkW1Vguza5GJjx4FG1xllcipDGZC41yNNTBzgRKlmZ6zucXkn
+Jnhtcg71XUsjtXx8ZekXxjoLDd1eHlHDhrjsf8cnSqVG6GotGcGHo8uZk4dkolUU
+TLdDpZPX59JOeUDKZZlGPT96gHqIaswe5WszRvRQwNUfCbjNii6hJ+tdc6foawrl
+V4IqsPziVFJW8KupEsYjlgcknOC8RqW0IATaCZNj5dQuwn7FMe21FXSGF7mz8yaK
+HQJq2ho/6LrxBG2UUVTiWrRZgx1g0C1zzAe1Joz518aIke+Az10PoWDLRdRCItGx
+cB390LcwkDrGSG1n5TLaj9vjqOMdICWiHOFMuaT2xj9cWA27xrJ3ARaRnxcGDbdA
+PsyPjpxL4J1+mx4Fq4gi+tMoG1cUZEo+JCw4TSFpAHMu0FUtdPIV6JRDPkAqxsa5
+alveoswYUFRdTiqFbPaSiykZfufqSuAiKyW892bPd5pBdPI8FA10afVQg83NLyHb
+IkaK0PdRGpVX8gWLGhntO0XoNsJufvtXIgAfBlOprpPGj3EqMUWS545t5pkiwIP8
+79xXZndPojYx+6ETjeXKo5V9AQxkcDtTQmiAx7udqAA1aZgMqGfYQ+Wqz5XgUZWk
+Fz9CnbgEztN5ecjTihYykuDXou7XN0wvrLh7vkX28RgznHs3piTZvECrAOnDN4ur
+2LbzXoFOsBRrBz4f7ML2RCKVu7Pmb9b5cGW6CoNlqg4TL4MTI1OLQBb6zi/8TQT4
+69isxTbCFVdIOOxVs7Qeuq3SQgYXDXPIV6a+lk2p8sD7eiEc9clwqYKQtfEM1HkQ
+voGm6VxhnHd5mqTDNyZXN8lSLPoI/9BfxmHA9Ha+/N5Oz6tRmXHH33701s8GVhkT
+UwttdFlIGZtTBS2dMlTT5SxTi2Q+1GR744AJFMz+FkZja3Fp+PnLJ/aIVLxFs84C
+yJTuQFv5QgLC/7DYLOsof17JJgGZpw==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 0 (0x0)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: O=Thawte, OU=Thawte Universal CA Root, CN=Thawte Universal CA Root
+        Validity
+            Not Before: Dec  5 13:56:05 1999 GMT
+            Not After : Apr  3 13:56:05 2037 GMT
+        Subject: O=Thawte, OU=Thawte Universal CA Root, CN=Thawte Universal CA Root
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (16384 bit)
+                Modulus (16384 bit):
+                    00:e2:89:05:6d:c3:7f:ad:a6:89:3a:ff:bb:c7:cd:
+                    9d:37:b1:e1:d2:21:1e:9b:61:2a:15:e7:7b:57:4f:
+                    55:3c:d0:bb:f9:d9:3d:3e:a6:bc:ec:b4:ad:53:9a:
+                    16:02:eb:0b:72:fd:8a:f2:8f:44:05:c5:eb:d3:e5:
+                    bd:b6:44:39:e6:fb:47:bf:6a:9e:0a:95:18:e2:68:
+                    e2:d6:96:d6:21:ad:88:fd:f5:17:f5:d3:da:42:a5:
+                    90:ed:29:95:96:75:3a:da:87:a1:d4:f5:d3:87:de:
+                    05:62:a6:e3:66:74:92:cf:a5:bc:bb:df:68:ff:71:
+                    75:56:41:59:35:eb:33:5a:66:51:f2:d2:a3:0a:c1:
+                    8c:ce:73:5c:11:6f:2d:8c:95:8c:91:b1:fd:cf:e5:
+                    ad:56:95:cc:85:92:83:90:55:41:c9:c2:77:ed:f9:
+                    a3:74:42:0a:68:08:f3:d0:d1:65:fd:67:2c:34:ff:
+                    24:7f:e7:79:c8:07:3b:25:57:dd:a4:0c:98:3d:be:
+                    e0:cc:19:65:db:f2:54:a2:af:42:d4:9d:e2:ae:84:
+                    23:25:09:33:12:b5:6a:1e:76:c4:8b:d9:49:00:6c:
+                    5e:ba:1f:f2:1b:da:67:ca:27:aa:a3:44:23:1b:83:
+                    82:ce:f2:ab:33:ed:54:a4:dc:c9:ab:59:65:d1:38:
+                    0e:c1:3e:1b:67:8f:d6:75:01:e0:55:22:dd:76:77:
+                    ec:8e:dd:f4:cf:79:22:6d:b9:57:03:f5:99:08:a7:
+                    3c:3e:34:fb:c4:17:ae:23:58:cd:24:f3:23:ca:6a:
+                    02:28:94:01:81:34:b4:6c:6b:ae:8b:1a:c3:a3:d2:
+                    09:3c:16:54:f5:36:5f:24:e3:9f:4a:a1:e2:64:c6:
+                    16:c3:a6:81:7a:24:36:47:8e:c1:5e:0e:fb:f9:15:
+                    78:04:d6:0e:59:d9:9d:58:66:62:d2:94:29:32:32:
+                    c8:78:b9:66:f6:b5:56:e1:6c:c6:14:4b:96:52:59:
+                    91:02:24:6a:55:47:d7:3f:b6:23:1a:60:77:97:2e:
+                    e2:40:af:9e:04:57:9e:ad:11:c5:c9:43:70:ef:48:
+                    b4:5e:ac:1c:69:2e:2e:82:d5:5b:8b:be:82:be:19:
+                    14:5e:e7:0d:22:c7:51:1b:ff:1e:9b:f1:30:8f:71:
+                    31:06:b3:34:27:8f:5f:7a:66:82:4f:8a:2d:13:ab:
+                    42:cf:21:56:9e:97:8e:66:36:0f:96:9b:e5:2b:f4:
+                    02:a9:2a:6a:8c:2c:c4:c3:b8:70:2c:2d:29:1e:3f:
+                    50:77:1e:6d:2a:54:e4:55:0a:91:38:a1:c5:b5:66:
+                    a2:76:5a:ee:0f:bf:b4:67:e1:28:6e:0f:e1:36:a1:
+                    82:d1:bf:d4:77:e1:c4:67:32:93:78:c8:e7:54:53:
+                    fe:23:79:e6:68:cc:26:90:f6:10:63:5d:2a:6f:91:
+                    2d:a4:73:32:51:21:f2:bb:15:df:aa:24:08:48:06:
+                    de:a1:9e:26:bf:ba:83:bf:7c:a4:c8:a0:8c:bd:d2:
+                    ff:bc:84:69:27:13:24:18:c4:45:18:23:26:5e:18:
+                    14:ca:2e:88:87:62:a3:53:e6:21:b7:b8:85:7b:9a:
+                    85:bb:15:26:72:f8:b9:f7:6a:74:0f:49:3f:92:be:
+                    a9:05:b7:99:27:bf:bf:09:17:4b:99:4c:ad:11:10:
+                    7c:df:74:31:f6:8f:26:5f:aa:88:ae:38:57:c8:55:
+                    2d:d3:fb:d8:1b:51:99:be:25:1b:3a:ba:c0:7d:1b:
+                    ed:ce:d2:49:b9:cf:f3:c5:7d:89:90:81:d8:69:48:
+                    20:10:a3:f8:ef:92:51:18:32:8b:11:18:c0:3f:1b:
+                    85:56:ce:57:c9:f2:82:64:c6:df:02:09:2e:4a:11:
+                    2f:b1:27:6d:37:52:f0:f0:16:61:f1:67:8d:df:87:
+                    72:af:87:da:cf:fb:50:94:6e:d4:94:85:eb:8a:2c:
+                    ea:21:f5:96:4a:44:d5:e0:ce:6a:74:44:4d:d0:05:
+                    d3:87:15:ed:36:d0:a4:8b:66:55:70:93:ee:47:06:
+                    c1:7e:2e:a5:18:79:67:f3:28:85:f1:70:f7:0e:83:
+                    a4:7e:54:9e:5a:76:32:cb:65:1b:b8:cd:fb:c8:28:
+                    03:d2:54:91:d1:a7:c5:85:43:08:17:76:a5:e6:2f:
+                    67:08:d8:a1:a2:82:2d:0c:f8:c1:af:63:d4:50:77:
+                    6d:6b:46:4a:41:85:d5:90:5f:79:2d:c4:ec:d7:11:
+                    87:40:8a:e1:68:e2:64:f8:55:32:fb:6f:93:2c:da:
+                    77:d9:21:c1:17:e5:36:2c:4e:7e:90:7f:ac:94:2b:
+                    32:67:be:38:50:76:b8:ae:41:b9:d7:21:c5:09:4c:
+                    60:c8:a3:51:c4:34:9b:57:37:df:cb:c9:33:57:8b:
+                    eb:fb:76:9f:19:4d:c5:6a:1f:2a:45:ae:2b:ed:2f:
+                    8d:a7:a5:00:cb:04:fa:25:62:2e:74:48:1b:ca:2a:
+                    8c:ba:db:b6:7e:f6:bb:02:7c:a9:c3:db:58:78:a1:
+                    bf:f0:fe:1a:10:55:11:ce:e8:69:4e:96:65:c6:17:
+                    03:d6:07:68:8c:54:82:ae:1c:22:55:3f:f1:f4:09:
+                    97:28:c0:46:f7:4e:0b:25:1d:f7:07:d7:09:1d:3a:
+                    18:57:38:3b:e8:33:06:e7:8f:78:46:1e:5b:f5:06:
+                    b6:ec:b8:a6:0d:f1:ba:13:4b:d6:18:20:dd:69:33:
+                    4a:33:15:ae:b8:c8:98:8a:27:2c:93:bc:2d:fb:ee:
+                    33:bf:66:e6:4d:ba:b6:9b:06:55:60:97:4b:bc:44:
+                    cd:7e:f4:a1:d8:aa:2f:c0:02:28:21:16:62:78:db:
+                    08:54:f2:fc:f4:34:e3:c6:8f:1c:43:57:ce:90:1a:
+                    4b:dc:2e:3b:28:91:89:3f:7a:da:35:1d:8e:2c:ee:
+                    49:ec:f4:33:ad:c9:53:a8:8c:9f:04:53:3e:24:1c:
+                    52:c9:12:f9:62:57:a3:bc:ee:2c:eb:40:7c:20:23:
+                    70:2b:95:f9:73:17:8a:d1:c1:1c:69:a6:b7:38:9a:
+                    67:f7:70:1d:7a:5a:0c:40:cf:62:0f:85:3c:c2:02:
+                    4e:7e:b5:f6:c5:2a:29:84:b3:1f:37:2a:e1:aa:72:
+                    42:c4:ed:6b:1a:8f:92:1c:5d:be:d1:f2:5b:f2:ab:
+                    aa:a9:d2:f5:b8:a4:41:2b:2b:91:6e:12:48:ca:98:
+                    d8:37:8d:c8:ed:00:30:b5:b6:04:4e:7e:9c:da:84:
+                    ec:c0:fa:7b:e5:1d:88:a4:53:46:b0:94:e4:5c:1b:
+                    a1:25:2c:0f:48:52:77:97:09:6c:ec:5b:18:33:83:
+                    02:e5:82:7e:cd:85:21:30:11:fd:27:4f:cf:e4:1e:
+                    ec:3f:a5:57:6c:e9:2a:30:19:2a:88:e5:c3:69:38:
+                    ab:6f:39:71:7f:84:e1:41:c3:e1:cc:2a:89:20:52:
+                    2e:83:0f:6c:39:3f:4b:2d:16:ac:2d:f0:24:ac:00:
+                    73:f4:9b:b3:06:3f:05:b8:14:85:1f:ab:9e:5c:3c:
+                    9e:62:9d:0e:6d:3b:80:09:fc:02:ea:a2:97:74:ca:
+                    c7:f9:e3:56:e1:c3:ca:a5:a6:9a:c0:90:e0:24:12:
+                    53:d2:c2:8b:da:be:ed:02:43:5e:67:e1:89:98:79:
+                    ee:cb:aa:ca:c3:1b:dc:e7:a5:46:a5:7c:6b:16:87:
+                    b6:5a:28:d7:db:27:3c:5e:a5:bd:b6:51:dd:1f:43:
+                    cf:3b:26:c8:3a:8d:25:61:c1:49:f4:3c:1b:c9:44:
+                    ea:af:1c:c2:2b:94:01:2a:0e:30:d1:5b:8b:2b:47:
+                    e5:c3:d1:04:03:9b:0e:39:2c:d6:27:d4:e6:70:5a:
+                    d9:75:cf:2a:d8:c9:00:05:e4:13:88:ec:c3:39:fb:
+                    87:61:30:36:43:03:c8:9e:9c:a2:06:c2:2f:c5:fc:
+                    f0:80:63:b1:54:04:a0:4c:a9:2e:c6:f5:76:7a:d8:
+                    d0:e4:d4:94:11:e5:15:b5:78:06:dc:b8:80:8f:99:
+                    a9:20:33:3d:10:85:4c:65:09:ca:3e:58:5e:60:93:
+                    9a:aa:62:5d:c0:51:06:1c:5d:60:a0:0d:9c:4b:43:
+                    f6:a7:16:21:a4:87:aa:f2:c1:2e:ee:92:30:b8:9e:
+                    df:df:10:01:8b:86:09:70:d8:6c:a8:b7:50:1e:16:
+                    96:b4:f7:67:fd:35:3a:21:90:2a:32:c7:00:7b:4d:
+                    07:10:09:b9:2f:73:d8:18:7e:67:99:04:4f:06:fc:
+                    50:c7:85:9b:9d:40:9d:b3:96:37:fa:a5:dc:b2:72:
+                    4e:ef:4e:09:2c:fd:91:fd:4d:f7:bb:a6:a1:3e:ab:
+                    7b:a2:03:40:a6:a9:55:27:e2:fa:f9:19:ce:87:75:
+                    aa:f1:75:36:f3:f3:b8:91:f8:91:c3:8b:75:13:8e:
+                    4c:65:9a:16:39:6a:e5:34:e8:7a:96:59:7f:35:b0:
+                    00:fd:5b:69:fc:43:26:fa:f5:28:6e:fe:87:d9:7e:
+                    24:fb:b4:a0:82:6e:54:a2:ff:ae:bf:62:b4:f4:72:
+                    01:c2:cb:98:47:98:e1:4c:b5:17:80:80:ce:8f:a6:
+                    28:ee:1e:45:6a:fb:df:f1:1d:fc:5a:3b:d6:ea:f4:
+                    6c:1d:62:49:57:3b:8a:8f:86:ea:f0:53:04:ce:9c:
+                    16:68:ff:ba:b9:fc:88:0f:47:f7:02:44:72:40:b8:
+                    ca:3b:2d:53:9d:dc:3c:56:8c:59:7b:68:1a:2c:8d:
+                    71:bb:6c:00:c7:1a:ce:6f:40:92:b1:a3:2f:0f:d9:
+                    44:f2:a3:70:2e:9e:ee:0e:ae:32:d0:3b:3e:8b:07:
+                    ea:e6:79:b3:5c:29:e2:7d:6b:a8:5e:f9:5a:31:e8:
+                    08:96:a2:8c:03:98:46:f1:b8:7d:90:54:26:ed:76:
+                    62:fe:9e:e9:9a:6e:5e:c9:49:c7:5c:34:53:29:54:
+                    d9:ec:e4:46:e1:80:3b:75:d9:df:fb:79:d5:87:f1:
+                    ba:9e:eb:19:ce:4c:52:73:e6:5b:87:ae:25:4f:39:
+                    79:cc:c6:b8:f9:10:7b:ec:f0:9b:71:a4:05:a0:d3:
+                    29:d3:4e:7f:1f:f4:2d:28:78:cc:55:95:7b:1e:91:
+                    2f:cc:56:18:73:8b:b2:db:bc:69:07:e6:d0:d8:4f:
+                    ed:a2:ff:58:85:a3:6d:e0:4a:53:b7:67:7d:8d:0c:
+                    5c:5b:7b:77:28:02:35:44:7a:04:d3:28:43:c8:6b:
+                    30:17:5d:32:b8:29:35:ba:76:da:3b:14:4a:76:18:
+                    58:a4:f8:92:3c:9e:4d:33:6f:46:6b:08:d9:31:48:
+                    68:dd:f4:fb:24:56:34:b2:cf:69:66:be:48:d2:8a:
+                    66:22:cd:f2:69:cd:c2:53:13:45:29:41:22:d6:5d:
+                    98:1f:b6:a4:b2:a3:c2:ee:02:2f:51:1b:dc:83:a4:
+                    ec:70:25:a8:d4:08:61:32:6f:e4:a1:81:2e:7c:63:
+                    72:fa:29:65:bc:70:44:cf:5d
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        55:9a:34:6a:22:06:69:09:45:33:c7:ae:a9:5c:c7:09:4e:9b:
+        86:bc:41:90:d4:94:52:f6:cd:23:29:94:4b:22:cd:e8:bd:fe:
+        9d:cd:52:f2:bd:ed:ab:87:c9:ab:ab:46:04:b4:bd:a2:3f:22:
+        30:47:50:c0:4b:8c:76:0f:03:f5:92:d2:b1:2d:c4:7a:35:9c:
+        c9:73:87:eb:a6:9f:de:0f:73:8d:d3:7f:99:d8:ba:8f:6f:c4:
+        f3:be:1a:ae:8b:a2:94:36:90:e2:e5:eb:8d:05:f4:fc:65:df:
+        95:f1:c4:94:4d:17:56:d7:9f:3c:8f:50:3c:e7:77:bf:95:86:
+        26:64:fb:6a:ff:c6:da:e9:8c:ae:42:bb:69:e5:33:c6:d8:e9:
+        0d:c6:55:21:49:c1:0c:b4:a3:f9:9b:4b:5c:de:83:4f:41:03:
+        ce:2a:79:68:38:7d:f0:54:49:20:f5:b6:10:ff:08:dc:33:66:
+        96:9b:ff:06:de:00:9e:d7:ce:56:43:9a:51:fc:70:cd:f6:f0:
+        51:a3:b7:cd:b4:5c:85:62:cd:71:b7:c6:2b:23:2b:dd:c3:6e:
+        40:42:fa:37:ff:37:1c:f6:7a:57:94:87:85:23:d7:d4:c9:c7:
+        5f:c1:4d:2f:c9:0d:d7:5c:ec:9c:25:ee:9e:30:82:91:96:72:
+        b8:75:1d:f8:09:68:57:97:b2:2d:4b:ee:25:ec:7a:24:29:ee:
+        72:d4:9c:13:db:ab:dc:03:0a:d8:4a:14:c9:08:57:44:5d:a1:
+        b5:53:80:34:f2:14:97:cf:52:de:a2:0e:8a:10:e9:14:ef:d0:
+        60:be:61:a1:f1:25:5d:d5:18:73:3f:93:10:ca:96:ee:b3:40:
+        d2:db:a3:55:cf:57:5a:a5:0e:4f:75:47:df:ea:f7:90:9a:6d:
+        f5:70:2e:1d:14:1c:37:64:04:59:50:b0:dc:72:86:6f:9c:37:
+        3d:5d:28:af:73:55:ef:d2:ee:24:74:74:13:ef:dc:db:31:49:
+        fb:3f:63:f5:d3:08:3e:33:a5:e7:9d:0a:de:53:2c:51:8e:67:
+        db:9b:41:65:41:50:bd:d4:a4:96:6c:87:bc:12:e0:94:c7:d3:
+        c0:e4:cb:73:58:00:83:e1:ac:27:85:d6:9d:53:9d:5c:bd:0a:
+        3e:03:43:9c:0c:91:f5:6d:7b:f8:40:72:75:ab:11:76:91:2b:
+        e1:c6:aa:1f:70:69:76:70:15:09:fe:93:d0:d6:2d:b7:15:6a:
+        9b:67:5c:b4:69:9f:25:a6:7d:8a:fb:7d:22:a9:71:f2:ce:4e:
+        8c:b8:21:2d:de:fe:41:71:0d:ff:9d:ec:73:a6:bb:07:4f:88:
+        0e:58:47:2e:7e:a9:c2:c7:78:dd:ba:7a:9e:4e:e0:30:4e:63:
+        6f:85:d4:20:41:e9:fa:fe:43:45:e7:fb:af:7a:b2:ce:a4:05:
+        1d:22:9a:58:86:df:e4:ce:4c:a9:fe:d8:16:a5:6f:fb:d8:ce:
+        56:7b:f5:d6:20:ef:e4:47:cd:63:24:ff:b9:be:f1:48:a3:c1:
+        01:72:e6:bd:c0:ad:ed:26:0d:ca:34:9f:fc:02:2d:20:4f:05:
+        20:ae:21:3d:0c:c2:20:3c:3f:f0:04:84:dc:cf:89:fd:b9:25:
+        91:8e:d0:43:e6:b3:20:ab:5c:2d:d5:40:9e:a0:4b:d8:f4:b2:
+        cc:7d:f1:58:0a:8e:87:ed:88:ac:36:96:e4:56:a0:11:8a:f2:
+        9a:d0:b3:57:a3:34:bb:19:ab:38:e1:74:6b:22:c4:31:ce:01:
+        d5:1b:36:e3:1e:38:4c:33:93:df:40:e3:59:57:4e:ac:6e:7b:
+        1e:5a:3d:c5:1d:5b:ac:c8:10:82:35:02:22:b2:fc:75:e8:10:
+        91:8d:c4:7d:78:93:47:9e:1c:9d:ac:6b:62:02:58:8c:d6:1c:
+        23:d6:af:78:c2:80:9c:a4:aa:24:54:14:b5:14:98:c6:f8:2b:
+        1a:24:cb:71:32:0a:e2:9b:0e:69:6b:dd:7e:8c:64:d1:2e:63:
+        ef:0e:7f:b1:3e:88:4c:9d:55:e5:c9:6e:17:04:b7:41:ff:bd:
+        8a:41:cb:25:31:6f:44:77:3f:47:b1:fc:81:88:07:8e:05:49:
+        20:b7:11:d9:69:03:2a:03:9d:b9:33:84:9a:df:df:7a:e3:46:
+        73:a3:d8:a2:8c:53:19:88:55:4c:74:b8:f6:44:84:2b:d1:14:
+        2d:4e:39:2e:92:68:ff:69:fc:85:62:1b:eb:55:4f:ef:25:84:
+        62:45:99:d6:d8:4e:6f:3f:53:08:7d:1d:06:95:81:80:7f:4f:
+        4e:74:36:98:b5:e2:87:70:98:dc:d7:f5:dc:52:15:e6:c6:d6:
+        79:96:39:7f:8f:95:cf:ab:80:53:ad:1b:0b:45:40:0e:d4:18:
+        bd:2c:de:8a:77:76:fd:f2:44:47:c6:21:d0:e4:74:f0:d8:18:
+        05:c8:7c:30:72:c7:df:f1:bb:fc:02:30:a9:f4:42:26:59:0d:
+        93:05:82:a1:73:ed:34:e5:38:5d:cd:50:90:fe:94:fc:13:bc:
+        bd:fc:a8:a2:88:a7:73:c4:b2:a8:d1:5d:88:c4:02:a2:7a:f1:
+        04:c9:fe:8c:74:c9:ef:1d:64:41:9f:ac:1e:96:67:64:ac:ab:
+        28:41:c7:9d:f7:c0:98:1b:6e:07:c2:64:7d:5a:83:66:56:28:
+        36:9c:e7:fb:1c:77:0e:28:a0:c4:f7:6b:79:39:04:20:84:c7:
+        57:93:bc:1b:a0:ea:bc:eb:42:e5:a8:11:fe:fc:ac:65:cc:fd:
+        f8:28:88:f4:a5:9a:e5:73:51:e0:a8:9b:0d:03:77:4e:e5:e0:
+        98:b3:88:da:7d:e6:c6:9e:7c:14:66:c1:2e:53:4a:92:07:37:
+        a0:7e:e9:3d:09:e4:15:7c:cf:fd:b8:41:a5:ef:9e:66:9d:c4:
+        5e:07:1d:87:f8:41:ad:ea:e7:2f:d2:41:63:18:37:f9:14:e3:
+        4d:d0:e5:f7:43:fd:15:e3:f9:36:73:06:26:df:01:4f:a9:c3:
+        4e:de:20:46:77:98:b4:7a:24:2b:3b:75:2b:4e:58:8d:9b:5d:
+        a4:c7:16:a0:bc:32:88:3f:a1:83:f3:00:c8:f8:d8:58:e9:63:
+        5d:4c:2b:b5:f0:72:41:d8:ab:77:37:d6:72:74:ae:b6:36:9c:
+        c8:a6:83:49:4b:e0:c9:56:0b:29:be:00:30:cb:dd:d6:c8:42:
+        8a:00:d9:ec:15:d1:34:71:f2:5b:64:87:f6:27:d2:b7:eb:86:
+        b0:90:bf:29:db:21:9e:36:8c:e3:20:2f:95:23:51:6c:1b:c2:
+        a4:d5:e6:d8:02:43:67:a0:fe:9b:50:03:44:7f:bb:e4:72:d5:
+        d1:e4:da:8f:92:14:64:fb:5d:14:10:12:4a:95:06:c9:65:08:
+        29:ca:21:a3:26:38:11:c9:27:df:70:67:04:fd:ca:48:32:7f:
+        63:b2:45:74:31:50:4f:87:d9:20:70:d2:21:70:b1:d6:10:9d:
+        33:5d:78:83:91:6d:55:82:ec:da:e4:62:63:c7:81:46:d7:19:
+        65:72:2a:43:19:90:b8:d7:23:4d:4c:1c:e0:44:a9:66:67:ac:
+        ee:71:79:27:26:78:6d:72:0e:f5:5d:4b:23:b5:7c:7c:65:e9:
+        17:c6:3a:0b:0d:dd:5e:1e:51:c3:86:b8:ec:7f:c7:27:4a:a5:
+        46:e8:6a:2d:19:c1:87:a3:cb:99:93:87:64:a2:55:14:4c:b7:
+        43:a5:93:d7:e7:d2:4e:79:40:ca:65:99:46:3d:3f:7a:80:7a:
+        88:6a:cc:1e:e5:6b:33:46:f4:50:c0:d5:1f:09:b8:cd:8a:2e:
+        a1:27:eb:5d:73:a7:e8:6b:0a:e5:57:82:2a:b0:fc:e2:54:52:
+        56:f0:ab:a9:12:c6:23:96:07:24:9c:e0:bc:46:a5:b4:20:04:
+        da:09:93:63:e5:d4:2e:c2:7e:c5:31:ed:b5:15:74:86:17:b9:
+        b3:f3:26:8a:1d:02:6a:da:1a:3f:e8:ba:f1:04:6d:94:51:54:
+        e2:5a:b4:59:83:1d:60:d0:2d:73:cc:07:b5:26:8c:f9:d7:c6:
+        88:91:ef:80:cf:5d:0f:a1:60:cb:45:d4:42:22:d1:b1:70:1d:
+        fd:d0:b7:30:90:3a:c6:48:6d:67:e5:32:da:8f:db:e3:a8:e3:
+        1d:20:25:a2:1c:e1:4c:b9:a4:f6:c6:3f:5c:58:0d:bb:c6:b2:
+        77:01:16:91:9f:17:06:0d:b7:40:3e:cc:8f:8e:9c:4b:e0:9d:
+        7e:9b:1e:05:ab:88:22:fa:d3:28:1b:57:14:64:4a:3e:24:2c:
+        38:4d:21:69:00:73:2e:d0:55:2d:74:f2:15:e8:94:43:3e:40:
+        2a:c6:c6:b9:6a:5b:de:a2:cc:18:50:54:5d:4e:2a:85:6c:f6:
+        92:8b:29:19:7e:e7:ea:4a:e0:22:2b:25:bc:f7:66:cf:77:9a:
+        41:74:f2:3c:14:0d:74:69:f5:50:83:cd:cd:2f:21:db:22:46:
+        8a:d0:f7:51:1a:95:57:f2:05:8b:1a:19:ed:3b:45:e8:36:c2:
+        6e:7e:fb:57:22:00:1f:06:53:a9:ae:93:c6:8f:71:2a:31:45:
+        92:e7:8e:6d:e6:99:22:c0:83:fc:ef:dc:57:66:77:4f:a2:36:
+        31:fb:a1:13:8d:e5:ca:a3:95:7d:01:0c:64:70:3b:53:42:68:
+        80:c7:bb:9d:a8:00:35:69:98:0c:a8:67:d8:43:e5:aa:cf:95:
+        e0:51:95:a4:17:3f:42:9d:b8:04:ce:d3:79:79:c8:d3:8a:16:
+        32:92:e0:d7:a2:ee:d7:37:4c:2f:ac:b8:7b:be:45:f6:f1:18:
+        33:9c:7b:37:a6:24:d9:bc:40:ab:00:e9:c3:37:8b:ab:d8:b6:
+        f3:5e:81:4e:b0:14:6b:07:3e:1f:ec:c2:f6:44:22:95:bb:b3:
+        e6:6f:d6:f9:70:65:ba:0a:83:65:aa:0e:13:2f:83:13:23:53:
+        8b:40:16:fa:ce:2f:fc:4d:04:f8:eb:d8:ac:c5:36:c2:15:57:
+        48:38:ec:55:b3:b4:1e:ba:ad:d2:42:06:17:0d:73:c8:57:a6:
+        be:96:4d:a9:f2:c0:fb:7a:21:1c:f5:c9:70:a9:82:90:b5:f1:
+        0c:d4:79:10:be:81:a6:e9:5c:61:9c:77:79:9a:a4:c3:37:26:
+        57:37:c9:52:2c:fa:08:ff:d0:5f:c6:61:c0:f4:76:be:fc:de:
+        4e:cf:ab:51:99:71:c7:df:7e:f4:d6:cf:06:56:19:13:53:0b:
+        6d:74:59:48:19:9b:53:05:2d:9d:32:54:d3:e5:2c:53:8b:64:
+        3e:d4:64:7b:e3:80:09:14:cc:fe:16:46:63:6b:71:69:f8:f9:
+        cb:27:f6:88:54:bc:45:b3:ce:02:c8:94:ee:40:5b:f9:42:02:
+        c2:ff:b0:d8:2c:eb:28:7f:5e:c9:26:01:99:a7
+
+UPS Document Exchange by DST
+============================
+MD5 Fingerprint: 78:A5:FB:10:4B:E4:63:2E:D2:6B:FB:F2:B6:C2:4B:8E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIID+DCCAuACEQDQHkCLAAACfAAAAAcAAAABMA0GCSqGSIb3DQEBBQUAMIG5MQsw
+CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp
+dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEeMBwGA1UE
+CxMVVW5pdGVkIFBhcmNlbCBTZXJ2aWNlMRkwFwYDVQQDExBEU1QgKFVQUykgUm9v
+dENBMSEwHwYJKoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wHhcNOTgxMjEw
+MDAyNTQ2WhcNMDgxMjA3MDAyNTQ2WjCBuTELMAkGA1UEBhMCdXMxDTALBgNVBAgT
+BFV0YWgxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MSQwIgYDVQQKExtEaWdpdGFs
+IFNpZ25hdHVyZSBUcnVzdCBDby4xHjAcBgNVBAsTFVVuaXRlZCBQYXJjZWwgU2Vy
+dmljZTEZMBcGA1UEAxMQRFNUIChVUFMpIFJvb3RDQTEhMB8GCSqGSIb3DQEJARYS
+Y2FAZGlnc2lndHJ1c3QuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEA7xfsrynm2SsnwNt7JJ9m9ASjwq0KyrDNhCuqN/OAoWDvQo/lXXdfV0JU3Svb
+YbJxXpN7b1/rJCvnpPLr8XOzC431Wdcy36yQjk4xuiVNtgym8eWvDOHlb1IDFcHf
+vn5KpqYYRnA/76dNqNz1dNlhekA8oZQo6sKUiMs3FQUZPJViuhwt+yiM0ciekjxb
+EVQ7eNlHO5stSuY+e2vf9PYFzyj2upg2AJ48N4UKnN63pIXFY/23YhRtFx7MioCF
+QjIRsCHinXfJgBZBnuvlFIl/t8O8T8Gfh5uW7GP2+ZBWDpWjIwqMZNqbuxx3sExd
+5sjo9X15LVckP8zjPSyYzxKfFwIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQC7OI4E
+IiZYDiFEVsy9WXwpaMtcD8iGVD+BeKetj8xG9xxUuHktW3IFaugh0OwdHf6kNFG+
+7u3OzJwWaOJddXMIQzGRahArEMJLafjJrZio/bjv9qvwXyHvy4VrCe0vSGa1YHLA
+6KDHmNsO9xtzjTQICnvFd2KqMCObsB6LgJhU3AWHs6liWfyLtxWarETszzUa9w8u
+XZJLAch77qA37eQdgg2ZQUMXrdTVyuP5fReiAdAwD0C53LkEgmmDtvkP+gaS96j0
+1hcc8F5/xCnI5uHi/zZoIVGu/6m6hJKtinsz2JDSwXltMzM5dKwbOHGfLAeQ6h3g
+04lfy+8UjSdUpb1G
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            d0:1e:40:8b:00:00:02:7c:00:00:00:07:00:00:00:01
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=United Parcel Service, CN=DST (UPS) RootCA/Email=ca at digsigtrust.com
+        Validity
+            Not Before: Dec 10 00:25:46 1998 GMT
+            Not After : Dec  7 00:25:46 2008 GMT
+        Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=United Parcel Service, CN=DST (UPS) RootCA/Email=ca at digsigtrust.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ef:17:ec:af:29:e6:d9:2b:27:c0:db:7b:24:9f:
+                    66:f4:04:a3:c2:ad:0a:ca:b0:cd:84:2b:aa:37:f3:
+                    80:a1:60:ef:42:8f:e5:5d:77:5f:57:42:54:dd:2b:
+                    db:61:b2:71:5e:93:7b:6f:5f:eb:24:2b:e7:a4:f2:
+                    eb:f1:73:b3:0b:8d:f5:59:d7:32:df:ac:90:8e:4e:
+                    31:ba:25:4d:b6:0c:a6:f1:e5:af:0c:e1:e5:6f:52:
+                    03:15:c1:df:be:7e:4a:a6:a6:18:46:70:3f:ef:a7:
+                    4d:a8:dc:f5:74:d9:61:7a:40:3c:a1:94:28:ea:c2:
+                    94:88:cb:37:15:05:19:3c:95:62:ba:1c:2d:fb:28:
+                    8c:d1:c8:9e:92:3c:5b:11:54:3b:78:d9:47:3b:9b:
+                    2d:4a:e6:3e:7b:6b:df:f4:f6:05:cf:28:f6:ba:98:
+                    36:00:9e:3c:37:85:0a:9c:de:b7:a4:85:c5:63:fd:
+                    b7:62:14:6d:17:1e:cc:8a:80:85:42:32:11:b0:21:
+                    e2:9d:77:c9:80:16:41:9e:eb:e5:14:89:7f:b7:c3:
+                    bc:4f:c1:9f:87:9b:96:ec:63:f6:f9:90:56:0e:95:
+                    a3:23:0a:8c:64:da:9b:bb:1c:77:b0:4c:5d:e6:c8:
+                    e8:f5:7d:79:2d:57:24:3f:cc:e3:3d:2c:98:cf:12:
+                    9f:17
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        bb:38:8e:04:22:26:58:0e:21:44:56:cc:bd:59:7c:29:68:cb:
+        5c:0f:c8:86:54:3f:81:78:a7:ad:8f:cc:46:f7:1c:54:b8:79:
+        2d:5b:72:05:6a:e8:21:d0:ec:1d:1d:fe:a4:34:51:be:ee:ed:
+        ce:cc:9c:16:68:e2:5d:75:73:08:43:31:91:6a:10:2b:10:c2:
+        4b:69:f8:c9:ad:98:a8:fd:b8:ef:f6:ab:f0:5f:21:ef:cb:85:
+        6b:09:ed:2f:48:66:b5:60:72:c0:e8:a0:c7:98:db:0e:f7:1b:
+        73:8d:34:08:0a:7b:c5:77:62:aa:30:23:9b:b0:1e:8b:80:98:
+        54:dc:05:87:b3:a9:62:59:fc:8b:b7:15:9a:ac:44:ec:cf:35:
+        1a:f7:0f:2e:5d:92:4b:01:c8:7b:ee:a0:37:ed:e4:1d:82:0d:
+        99:41:43:17:ad:d4:d5:ca:e3:f9:7d:17:a2:01:d0:30:0f:40:
+        b9:dc:b9:04:82:69:83:b6:f9:0f:fa:06:92:f7:a8:f4:d6:17:
+        1c:f0:5e:7f:c4:29:c8:e6:e1:e2:ff:36:68:21:51:ae:ff:a9:
+        ba:84:92:ad:8a:7b:33:d8:90:d2:c1:79:6d:33:33:39:74:ac:
+        1b:38:71:9f:2c:07:90:ea:1d:e0:d3:89:5f:cb:ef:14:8d:27:
+        54:a5:bd:46
+
+ValiCert Class 1 VA
+===================
+MD5 Fingerprint: 65:58:AB:15:AD:57:6C:1E:A8:A7:B5:69:AC:BF:FF:EB
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYy
+NTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9Y
+LqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+
+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8Y
+TfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0
+LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLW
+I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw
+nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 25 22:23:48 1999 GMT
+            Not After : Jun 25 22:23:48 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d8:59:82:7a:89:b8:96:ba:a6:2f:68:6f:58:2e:
+                    a7:54:1c:06:6e:f4:ea:8d:48:bc:31:94:17:f0:f3:
+                    4e:bc:b2:b8:35:92:76:b0:d0:a5:a5:01:d7:00:03:
+                    12:22:19:08:f8:ff:11:23:9b:ce:07:f5:bf:69:1a:
+                    26:fe:4e:e9:d1:7f:9d:2c:40:1d:59:68:6e:a6:f8:
+                    58:b0:9d:1a:8f:d3:3f:f1:dc:19:06:81:a8:0e:e0:
+                    3a:dd:c8:53:45:09:06:e6:0f:70:c3:fa:40:a6:0e:
+                    e2:56:05:0f:18:4d:fc:20:82:d1:73:55:74:8d:76:
+                    72:a0:1d:9d:1d:c0:dd:3f:71
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        50:68:3d:49:f4:2c:1c:06:94:df:95:60:7f:96:7b:17:fe:4f:
+        71:ad:64:c8:dd:77:d2:ef:59:55:e8:3f:e8:8e:05:2a:21:f2:
+        07:d2:b5:a7:52:fe:9c:b1:b6:e2:5b:77:17:40:ea:72:d6:23:
+        cb:28:81:32:c3:00:79:18:ec:59:17:89:c9:c6:6a:1e:71:c9:
+        fd:b7:74:a5:25:45:69:c5:48:ab:19:e1:45:8a:25:6b:19:ee:
+        e5:bb:12:f5:7f:f7:a6:8d:51:c3:f0:9d:74:b7:a9:3e:a0:a5:
+        ff:b6:49:03:13:da:22:cc:ed:71:82:2b:99:cf:3a:b7:f5:2d:
+        72:c8
+
+ValiCert Class 2 VA
+===================
+MD5 Fingerprint: A9:23:75:9B:BA:49:36:6E:31:C2:DB:F2:E7:66:BA:87
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
+NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
+dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
+WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
+v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
+UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
+IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
+W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 26 00:19:54 1999 GMT
+            Not After : Jun 26 00:19:54 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ce:3a:71:ca:e5:ab:c8:59:92:55:d7:ab:d8:74:
+                    0e:f9:ee:d9:f6:55:47:59:65:47:0e:05:55:dc:eb:
+                    98:36:3c:5c:53:5d:d3:30:cf:38:ec:bd:41:89:ed:
+                    25:42:09:24:6b:0a:5e:b3:7c:dd:52:2d:4c:e6:d4:
+                    d6:7d:5a:59:a9:65:d4:49:13:2d:24:4d:1c:50:6f:
+                    b5:c1:85:54:3b:fe:71:e4:d3:5c:42:f9:80:e0:91:
+                    1a:0a:5b:39:36:67:f3:3f:55:7c:1b:3f:b4:5f:64:
+                    73:34:e3:b4:12:bf:87:64:f8:da:12:ff:37:27:c1:
+                    b3:43:bb:ef:7b:6e:2e:69:f7
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        3b:7f:50:6f:6f:50:94:99:49:62:38:38:1f:4b:f8:a5:c8:3e:
+        a7:82:81:f6:2b:c7:e8:c5:ce:e8:3a:10:82:cb:18:00:8e:4d:
+        bd:a8:58:7f:a1:79:00:b5:bb:e9:8d:af:41:d9:0f:34:ee:21:
+        81:19:a0:32:49:28:f4:c4:8e:56:d5:52:33:fd:50:d5:7e:99:
+        6c:03:e4:c9:4c:fc:cb:6c:ab:66:b3:4a:21:8c:e5:b5:0c:32:
+        3e:10:b2:cc:6c:a1:dc:9a:98:4c:02:5b:f3:ce:b9:9e:a5:72:
+        0e:4a:b7:3f:3c:e6:16:68:f8:be:ed:74:4c:bc:5b:d5:62:1f:
+        43:dd
+
+ValiCert Class 3 VA
+===================
+MD5 Fingerprint: A2:6F:53:B7:EE:40:DB:4A:68:E7:FA:18:D9:10:4B:72
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYy
+NjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfD
+cnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs
+2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqY
+JJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliE
+Zwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ
+n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A
+PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 1 (0x1)
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Validity
+            Not Before: Jun 26 00:22:33 1999 GMT
+            Not After : Jun 26 00:22:33 2019 GMT
+        Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3 Policy Validation Authority, CN=http://www.valicert.com//Email=info@valicert.com
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e3:98:51:96:1c:e8:d5:b1:06:81:6a:57:c3:72:
+                    75:93:ab:cf:9e:a6:fc:f3:16:52:d6:2d:4d:9f:35:
+                    44:a8:2e:04:4d:07:49:8a:38:29:f5:77:37:e7:b7:
+                    ab:5d:df:36:71:14:99:8f:dc:c2:92:f1:e7:60:92:
+                    97:ec:d8:48:dc:bf:c1:02:20:c6:24:a4:28:4c:30:
+                    5a:76:6d:b1:5c:f3:dd:de:9e:10:71:a1:88:c7:5b:
+                    9b:41:6d:ca:b0:b8:8e:15:ee:ad:33:2b:cf:47:04:
+                    5c:75:71:0a:98:24:98:29:a7:49:59:a5:dd:f8:b7:
+                    43:62:61:f3:d3:e2:d0:55:3f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        56:bb:02:58:84:67:08:2c:df:1f:db:7b:49:33:f5:d3:67:9d:
+        f4:b4:0a:10:b3:c9:c5:2c:e2:92:6a:71:78:27:f2:70:83:42:
+        d3:3e:cf:a9:54:f4:f1:d8:92:16:8c:d1:04:cb:4b:ab:c9:9f:
+        45:ae:3c:8a:a9:b0:71:33:5d:c8:c5:57:df:af:a8:35:b3:7f:
+        89:87:e9:e8:25:92:b8:7f:85:7a:ae:d6:bc:1e:37:58:2a:67:
+        c9:91:cf:2a:81:3e:ed:c6:39:df:c0:3e:19:9c:19:cc:13:4d:
+        82:41:b5:8c:de:e0:3d:60:08:20:0f:45:7e:6b:a2:7f:a3:8c:
+        15:ee
+
+VeriSign Class 4 Primary CA
+===========================
+MD5 Fingerprint: 1B:D1:AD:17:8B:7F:22:13:24:F5:26:E2:5D:4E:B9:10
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICMTCCAZoCBQKmAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa
+Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln
+biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp
+Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0LJ1
+9njQrlpQ9OlQqZ+M1++RlHDo0iSQdomF1t+s5gEXMoDwnZNHvJplnR+Xrr/phnVj
+IIm9gFidBAydqMEk6QvlMXi9/C0MN2qeeIDpRnX57aP7E3vIwUzSo+/1PLBij0pd
+O92VZ48TucE81qcmm+zDO3rZTbxtm+gVAePwR6kCAwEAATANBgkqhkiG9w0BAQIF
+AAOBgQBT3dPwnCR+QKri/AAa19oM/DJhuBUNlvP6Vxt/M3yv6ZiaYch6s7f/sdyZ
+g9ysEvxwyR84Qu1E9oAuW2szaayc01znX1oYx7EteQSWQZGZQbE8DbqEOcY7l/Am
+yY7uvcxClf8exwI/VAx49byqYHwCaejcrOICdmHEPgPq0ook0Q==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:a6:00:00:01
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Dec 31 23:59:59 1999 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:d0:b2:75:f6:78:d0:ae:5a:50:f4:e9:50:a9:9f:
+                    8c:d7:ef:91:94:70:e8:d2:24:90:76:89:85:d6:df:
+                    ac:e6:01:17:32:80:f0:9d:93:47:bc:9a:65:9d:1f:
+                    97:ae:bf:e9:86:75:63:20:89:bd:80:58:9d:04:0c:
+                    9d:a8:c1:24:e9:0b:e5:31:78:bd:fc:2d:0c:37:6a:
+                    9e:78:80:e9:46:75:f9:ed:a3:fb:13:7b:c8:c1:4c:
+                    d2:a3:ef:f5:3c:b0:62:8f:4a:5d:3b:dd:95:67:8f:
+                    13:b9:c1:3c:d6:a7:26:9b:ec:c3:3b:7a:d9:4d:bc:
+                    6d:9b:e8:15:01:e3:f0:47:a9
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        53:dd:d3:f0:9c:24:7e:40:aa:e2:fc:00:1a:d7:da:0c:fc:32:
+        61:b8:15:0d:96:f3:fa:57:1b:7f:33:7c:af:e9:98:9a:61:c8:
+        7a:b3:b7:ff:b1:dc:99:83:dc:ac:12:fc:70:c9:1f:38:42:ed:
+        44:f6:80:2e:5b:6b:33:69:ac:9c:d3:5c:e7:5f:5a:18:c7:b1:
+        2d:79:04:96:41:91:99:41:b1:3c:0d:ba:84:39:c6:3b:97:f0:
+        26:c9:8e:ee:bd:cc:42:95:ff:1e:c7:02:3f:54:0c:78:f5:bc:
+        aa:60:7c:02:69:e8:dc:ac:e2:02:76:61:c4:3e:03:ea:d2:8a:
+        24:d1
+
+Verisign Class 1 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: 97:60:E8:57:5F:D3:50:47:E5:43:0C:94:36:8A:B0:62
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPTCCAaYCEQDNun9W8N/kvFT+IqyzcqpVMA0GCSqGSIb3DQEBAgUAMF8xCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh
+c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05
+NjAxMjkwMDAwMDBaFw0yODA4MDEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD
+VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJp
+bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB
+jQAwgYkCgYEA5Rm/baNWYS2ZSHH2Z965jeu3noaACpEO+jglr0aIguVzqKCbJF0N
+H8xlbgyw0FaEGIeaBpsQoXPftFg5a27B9hXVqKg/qhIGjTGsf7A01480Z4gJzRQR
+4k5FVmkfeAKA2txHkSm7NsljXMXg1y2He6G3MrB7MLoqLzGq7qNn2tsCAwEAATAN
+BgkqhkiG9w0BAQIFAAOBgQBMP7iLxmjf7kMzDl3ppssHhE16M/+SG/Q2rdiVIjZo
+EWx8QszznC7EBz8UsA9P/5CSdvnivErpj82ggAr3xSnxgiJduLHdgSOjeyUVRjB5
+FvjqBUuUfx3CHMjjt/QQQDwTw18fU+hI5Ia0e6E1sHslurjTjqs/OJ0ANACY89Fx
+lA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            cd:ba:7f:56:f0:df:e4:bc:54:fe:22:ac:b3:72:aa:55
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:e5:19:bf:6d:a3:56:61:2d:99:48:71:f6:67:de:
+                    b9:8d:eb:b7:9e:86:80:0a:91:0e:fa:38:25:af:46:
+                    88:82:e5:73:a8:a0:9b:24:5d:0d:1f:cc:65:6e:0c:
+                    b0:d0:56:84:18:87:9a:06:9b:10:a1:73:df:b4:58:
+                    39:6b:6e:c1:f6:15:d5:a8:a8:3f:aa:12:06:8d:31:
+                    ac:7f:b0:34:d7:8f:34:67:88:09:cd:14:11:e2:4e:
+                    45:56:69:1f:78:02:80:da:dc:47:91:29:bb:36:c9:
+                    63:5c:c5:e0:d7:2d:87:7b:a1:b7:32:b0:7b:30:ba:
+                    2a:2f:31:aa:ee:a3:67:da:db
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        4c:3f:b8:8b:c6:68:df:ee:43:33:0e:5d:e9:a6:cb:07:84:4d:
+        7a:33:ff:92:1b:f4:36:ad:d8:95:22:36:68:11:6c:7c:42:cc:
+        f3:9c:2e:c4:07:3f:14:b0:0f:4f:ff:90:92:76:f9:e2:bc:4a:
+        e9:8f:cd:a0:80:0a:f7:c5:29:f1:82:22:5d:b8:b1:dd:81:23:
+        a3:7b:25:15:46:30:79:16:f8:ea:05:4b:94:7f:1d:c2:1c:c8:
+        e3:b7:f4:10:40:3c:13:c3:5f:1f:53:e8:48:e4:86:b4:7b:a1:
+        35:b0:7b:25:ba:b8:d3:8e:ab:3f:38:9d:00:34:00:98:f3:d1:
+        71:94
+
+Verisign Class 1 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: F2:7D:E9:54:E4:A3:22:0D:76:9F:E7:0B:BB:B3:24:2B
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEDnKVIn+UCIy/jLZ2/sbhBkwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTE4MDUxODIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYK
+VdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSm
+Fc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAIv3GhDOdlwHq4OZ3BeAbzQ5XZg+a3Is4cei
+e0ApuXiIukzFo2penm574/ICQQxmvq37rqIUzpLzojSLtLK2JPLl1eDI5WJthHvL
+vrsDi3xXyvA3qZCviu4Dvh0onNkmdqDNxJ1O8K4HFtW+r1cIatCgQkJCHvQgzKV4
+gpUmOIpH
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            39:ca:54:89:fe:50:22:32:fe:32:d9:db:fb:1b:84:19
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : May 18 23:59:59 2018 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:aa:d0:ba:be:16:2d:b8:83:d4:ca:d2:0f:bc:76:
+                    31:ca:94:d8:1d:93:8c:56:02:bc:d9:6f:1a:6f:52:
+                    36:6e:75:56:0a:55:d3:df:43:87:21:11:65:8a:7e:
+                    8f:bd:21:de:6b:32:3f:1b:84:34:95:05:9d:41:35:
+                    eb:92:eb:96:dd:aa:59:3f:01:53:6d:99:4f:ed:e5:
+                    e2:2a:5a:90:c1:b9:c4:a6:15:cf:c8:45:eb:a6:5d:
+                    8e:9c:3e:f0:64:24:76:a5:cd:ab:1a:6f:b6:d8:7b:
+                    51:61:6e:a6:7f:87:c8:e2:b7:e5:34:dc:41:88:ea:
+                    09:40:be:73:92:3d:6b:e7:75
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        8b:f7:1a:10:ce:76:5c:07:ab:83:99:dc:17:80:6f:34:39:5d:
+        98:3e:6b:72:2c:e1:c7:a2:7b:40:29:b9:78:88:ba:4c:c5:a3:
+        6a:5e:9e:6e:7b:e3:f2:02:41:0c:66:be:ad:fb:ae:a2:14:ce:
+        92:f3:a2:34:8b:b4:b2:b6:24:f2:e5:d5:e0:c8:e5:62:6d:84:
+        7b:cb:be:bb:03:8b:7c:57:ca:f0:37:a9:90:af:8a:ee:03:be:
+        1d:28:9c:d9:26:76:a0:cd:c4:9d:4e:f0:ae:07:16:d5:be:af:
+        57:08:6a:d0:a0:42:42:42:1e:f4:20:cc:a5:78:82:95:26:38:
+        8a:47
+
+Verisign Class 1 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: B1:47:BC:18:57:D1:18:A0:78:2D:EC:71:E8:2A:95:73
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN2E1Lm0+afY8wR4
+nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/EbRrsC+MO
+8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjV
+ojYJrKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjb
+PG7PoBMAGrgnoeS+Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP2
+6KbqxzcSXKMpHgLZ2x87tNcPVkeBFQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vr
+n5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAq2aN17O6x5q25lXQBfGfMY1a
+qtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/Ny9Sn2WCVhDr4
+wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3
+ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrs
+pSCAaWihT37ha88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4
+E1Z5T21Q6huwtVexN2ZYI/PcD98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            8b:5b:75:56:84:54:85:0b:00:cf:af:38:48:ce:b1:a4
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 1 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 1 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:dd:84:d4:b9:b4:f9:a7:d8:f3:04:78:9c:de:3d:
+                    dc:6c:13:16:d9:7a:dd:24:51:66:c0:c7:26:59:0d:
+                    ac:06:08:c2:94:d1:33:1f:f0:83:35:1f:6e:1b:c8:
+                    de:aa:6e:15:4e:54:27:ef:c4:6d:1a:ec:0b:e3:0e:
+                    f0:44:a5:57:c7:40:58:1e:a3:47:1f:71:ec:60:f6:
+                    6d:94:c8:18:39:ed:fe:42:18:56:df:e4:4c:49:10:
+                    78:4e:01:76:35:63:12:36:dd:66:bc:01:04:36:a3:
+                    55:68:d5:a2:36:09:ac:ab:21:26:54:06:ad:3f:ca:
+                    14:e0:ac:ca:ad:06:1d:95:e2:f8:9d:f1:e0:60:ff:
+                    c2:7f:75:2b:4c:cc:da:fe:87:99:21:ea:ba:fe:3e:
+                    54:d7:d2:59:78:db:3c:6e:cf:a0:13:00:1a:b8:27:
+                    a1:e4:be:67:96:ca:a0:c5:b3:9c:dd:c9:75:9e:eb:
+                    30:9a:5f:a3:cd:d9:ae:78:19:3f:23:e9:5c:db:29:
+                    bd:ad:55:c8:1b:54:8c:63:f6:e8:a6:ea:c7:37:12:
+                    5c:a3:29:1e:02:d9:db:1f:3b:b4:d7:0f:56:47:81:
+                    15:04:4a:af:83:27:d1:c5:58:88:c1:dd:f6:aa:a7:
+                    a3:18:da:68:aa:6d:11:51:e1:bf:65:6b:9f:96:76:
+                    d1:3d
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        ab:66:8d:d7:b3:ba:c7:9a:b6:e6:55:d0:05:f1:9f:31:8d:5a:
+        aa:d9:aa:46:26:0f:71:ed:a5:ad:53:56:62:01:47:2a:44:e9:
+        fe:3f:74:0b:13:9b:b9:f4:4d:1b:b2:d1:5f:b2:b6:d2:88:5c:
+        b3:9f:cd:cb:d4:a7:d9:60:95:84:3a:f8:c1:37:1d:61:ca:e7:
+        b0:c5:e5:91:da:54:a6:ac:31:81:ae:97:de:cd:08:ac:b8:c0:
+        97:80:7f:6e:72:a4:e7:69:13:95:65:1f:c4:93:3c:fd:79:8f:
+        04:d4:3e:4f:ea:f7:9e:ce:cd:67:7c:4f:65:02:ff:91:85:54:
+        73:c7:ff:36:f7:86:2d:ec:d0:5e:4f:ff:11:9f:72:06:d6:b8:
+        1a:f1:4c:0d:26:65:e2:44:80:1e:c7:9f:e3:dd:e8:0a:da:ec:
+        a5:20:80:69:68:a1:4f:7e:e1:6b:cf:07:41:fa:83:8e:bc:38:
+        dd:b0:2e:11:b1:6b:b2:42:cc:9a:bc:f9:48:22:79:4a:19:0f:
+        b2:1c:3e:20:74:d9:6a:c3:be:f2:28:78:13:56:79:4f:6d:50:
+        ea:1b:b0:b5:57:b1:37:66:58:23:f3:dc:0f:df:0a:87:c4:ef:
+        86:05:d5:38:14:60:99:a3:4b:de:06:96:71:2c:f2:db:b6:1f:
+        a4:ef:3f:ee
+
+Verisign Class 2 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: B3:9C:25:B1:C3:2E:32:53:80:15:30:9D:4D:02:77:3E
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEC0b/EoXjaOR6+f/9YtFvgswDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAyIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQC2WoujDWojg4BrzzmH9CETMwZMJaLtVRKXxaeAufqDwSCg+i8VDXyh
+YGt+eSz6Bg86rvYbb7HS/y8oUl+DfUvEerf4Zh+AVPy3wo5ZShRXRtGak75BkQO7
+FYCTXOvnzAhsPz6zSvz/S2wj1VCCJkQZjiPDceoZJEcEnnW/yKYAHwIDAQABMA0G
+CSqGSIb3DQEBAgUAA4GBAIobK/o5wXTXXtgZZKJYSi034DNHD6zt96rbHuSLBlxg
+J8pFUs4W7z8GZOeUaHxgMxURaa+dYo2jA1Rrpr7l7gUYYAS/QoD90KioHgE796Nc
+r6Pc5iaAIzy4RHT3Cq5Ji2F4zCS/iIqnDupzGUH9TQPwiNHleI2lKk/2lw0Xd8rY
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            2d:1b:fc:4a:17:8d:a3:91:eb:e7:ff:f5:8b:45:be:0b
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:b6:5a:8b:a3:0d:6a:23:83:80:6b:cf:39:87:f4:
+                    21:13:33:06:4c:25:a2:ed:55:12:97:c5:a7:80:b9:
+                    fa:83:c1:20:a0:fa:2f:15:0d:7c:a1:60:6b:7e:79:
+                    2c:fa:06:0f:3a:ae:f6:1b:6f:b1:d2:ff:2f:28:52:
+                    5f:83:7d:4b:c4:7a:b7:f8:66:1f:80:54:fc:b7:c2:
+                    8e:59:4a:14:57:46:d1:9a:93:be:41:91:03:bb:15:
+                    80:93:5c:eb:e7:cc:08:6c:3f:3e:b3:4a:fc:ff:4b:
+                    6c:23:d5:50:82:26:44:19:8e:23:c3:71:ea:19:24:
+                    47:04:9e:75:bf:c8:a6:00:1f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        8a:1b:2b:fa:39:c1:74:d7:5e:d8:19:64:a2:58:4a:2d:37:e0:
+        33:47:0f:ac:ed:f7:aa:db:1e:e4:8b:06:5c:60:27:ca:45:52:
+        ce:16:ef:3f:06:64:e7:94:68:7c:60:33:15:11:69:af:9d:62:
+        8d:a3:03:54:6b:a6:be:e5:ee:05:18:60:04:bf:42:80:fd:d0:
+        a8:a8:1e:01:3b:f7:a3:5c:af:a3:dc:e6:26:80:23:3c:b8:44:
+        74:f7:0a:ae:49:8b:61:78:cc:24:bf:88:8a:a7:0e:ea:73:19:
+        41:fd:4d:03:f0:88:d1:e5:78:8d:a5:2a:4f:f6:97:0d:17:77:
+        ca:d8
+
+Verisign Class 2 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0Ns
+YXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
+MjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9y
+aXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazAe
+Fw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJVUzEX
+MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGlj
+IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMx
+KGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
+eTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjxnNuX6Zr8wgQGE75fUsjM
+HiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRCwiNPStjw
+DqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cC
+AwEAATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9ji
+nb3/7aHmZuovCfTK1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAX
+rXfMSTWqz9iP0b63GJZHc2pUIjRkLbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnIn
+jBJ7xUS0rg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            b9:2f:60:cc:88:9f:a1:7a:46:09:b8:5b:70:6c:8a:af
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:a7:88:01:21:74:2c:e7:1a:03:f0:98:e1:97:3c:
+                    0f:21:08:f1:9c:db:97:e9:9a:fc:c2:04:06:13:be:
+                    5f:52:c8:cc:1e:2c:12:56:2c:b8:01:69:2c:cc:99:
+                    1f:ad:b0:96:ae:79:04:f2:13:39:c1:7b:98:ba:08:
+                    2c:e8:c2:84:13:2c:aa:69:e9:09:f4:c7:a9:02:a4:
+                    42:c2:23:4f:4a:d8:f0:0e:a2:fb:31:6c:c9:e6:6f:
+                    99:27:07:f5:e6:f4:4c:78:9e:6d:eb:46:86:fa:b9:
+                    86:c9:54:f2:b2:c4:af:d4:46:1c:5a:c9:15:30:ff:
+                    0d:6c:f5:2d:0e:6d:ce:7f:77
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        72:2e:f9:7f:d1:f1:71:fb:c4:9e:f6:c5:5e:51:8a:40:98:b8:
+        68:f8:9b:1c:83:d8:e2:9d:bd:ff:ed:a1:e6:66:ea:2f:09:f4:
+        ca:d7:ea:a5:2b:95:f6:24:60:86:4d:44:2e:83:a5:c4:2d:a0:
+        d3:ae:78:69:6f:72:da:6c:ae:08:f0:63:92:37:e6:bb:c4:30:
+        17:ad:77:cc:49:35:aa:cf:d8:8f:d1:be:b7:18:96:47:73:6a:
+        54:22:34:64:2d:b6:16:9b:59:5b:b4:51:59:3a:b3:0b:14:f4:
+        12:df:67:a0:f4:ad:32:64:5e:b1:46:72:27:8c:12:7b:c5:44:
+        b4:ae
+
+Verisign Class 2 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: F8:BE:C4:63:22:C9:A8:46:74:8B:B8:1D:1E:4A:2B:F6
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVy
+aVNpZ24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24s
+IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNp
+Z24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
+eSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNTk1OVowgcoxCzAJBgNV
+BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNp
+Z24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIElu
+Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24g
+Q2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt
+IEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwoNwtUs22e5LeWU
+J92lvuCwTY+zYVY81nzD9M0+hsuiiOLh2KRpxbXiv8GmR1BeRjmL1Za6tW8UvxDO
+JxOeBUebMXoT2B/Z0wI3i60sR/COgQanDTAM6/c8DyAd3HJG7qUCyFvDyVZpTMUY
+wZF7C9UTAJu878NIPkZgIIUq1ZC2zYugzDLdt/1AVbJQHFauzI13TccgTacxdu9o
+koqQHgiBVrKtaaNS0MscxCM9H5n+TOgWY47GCI72MfbS+uV23bUckqNJzc0BzWjN
+qWm6o+sdDZykIKbBoMXRRkwXbdKsZj+WjOCE1Db/IlnF+RFgqF8EffIa9iVCYQ/E
+Srg+iQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA0JhU8wI1NQ0kdvekhktdmnLfe
+xbjQ5F1fdiLAJvmEOjr5jLX77GDx6M4EsMjdpwOPMPOY36TmpDHf0xwLRtxyID+u
+7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKU
+sQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RI
+sH/7NiXaldDxJBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTP
+cjnhsUPgKM+351psE2tJs//jGHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            61:70:cb:49:8c:5f:98:45:29:e7:b0:a6:d9:50:5b:7a
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 2 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 2 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:af:0a:0d:c2:d5:2c:db:67:b9:2d:e5:94:27:dd:
+                    a5:be:e0:b0:4d:8f:b3:61:56:3c:d6:7c:c3:f4:cd:
+                    3e:86:cb:a2:88:e2:e1:d8:a4:69:c5:b5:e2:bf:c1:
+                    a6:47:50:5e:46:39:8b:d5:96:ba:b5:6f:14:bf:10:
+                    ce:27:13:9e:05:47:9b:31:7a:13:d8:1f:d9:d3:02:
+                    37:8b:ad:2c:47:f0:8e:81:06:a7:0d:30:0c:eb:f7:
+                    3c:0f:20:1d:dc:72:46:ee:a5:02:c8:5b:c3:c9:56:
+                    69:4c:c5:18:c1:91:7b:0b:d5:13:00:9b:bc:ef:c3:
+                    48:3e:46:60:20:85:2a:d5:90:b6:cd:8b:a0:cc:32:
+                    dd:b7:fd:40:55:b2:50:1c:56:ae:cc:8d:77:4d:c7:
+                    20:4d:a7:31:76:ef:68:92:8a:90:1e:08:81:56:b2:
+                    ad:69:a3:52:d0:cb:1c:c4:23:3d:1f:99:fe:4c:e8:
+                    16:63:8e:c6:08:8e:f6:31:f6:d2:fa:e5:76:dd:b5:
+                    1c:92:a3:49:cd:cd:01:cd:68:cd:a9:69:ba:a3:eb:
+                    1d:0d:9c:a4:20:a6:c1:a0:c5:d1:46:4c:17:6d:d2:
+                    ac:66:3f:96:8c:e0:84:d4:36:ff:22:59:c5:f9:11:
+                    60:a8:5f:04:7d:f2:1a:f6:25:42:61:0f:c4:4a:b8:
+                    3e:89
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        34:26:15:3c:c0:8d:4d:43:49:1d:bd:e9:21:92:d7:66:9c:b7:
+        de:c5:b8:d0:e4:5d:5f:76:22:c0:26:f9:84:3a:3a:f9:8c:b5:
+        fb:ec:60:f1:e8:ce:04:b0:c8:dd:a7:03:8f:30:f3:98:df:a4:
+        e6:a4:31:df:d3:1c:0b:46:dc:72:20:3f:ae:ee:05:3c:a4:33:
+        3f:0b:39:ac:70:78:73:4b:99:2b:df:30:c2:54:b0:a8:3b:55:
+        a1:fe:16:28:cd:42:bd:74:6e:80:db:27:44:a7:ce:44:5d:d4:
+        1b:90:98:0d:1e:42:94:b1:00:2c:04:d0:74:a3:02:05:22:63:
+        63:cd:83:b5:fb:c1:6d:62:6b:69:75:fd:5d:70:41:b9:f5:bf:
+        7c:df:be:c1:32:73:22:21:8b:58:81:7b:15:91:7a:ba:e3:64:
+        48:b0:7f:fb:36:25:da:95:d0:f1:24:14:17:dd:18:80:6b:46:
+        23:39:54:f5:8e:62:09:04:1d:94:90:a6:9b:e6:25:e2:42:45:
+        aa:b8:90:ad:be:08:8f:a9:0b:42:18:94:cf:72:39:e1:b1:43:
+        e0:28:cf:b7:e7:5a:6c:13:6b:49:b3:ff:e3:18:7c:89:8b:33:
+        5d:ac:33:d7:a7:f9:da:3a:55:c9:58:10:f9:aa:ef:5a:b6:cf:
+        4b:4b:df:2a
+
+Verisign Class 3 Public Primary Certification Authority
+=======================================================
+MD5 Fingerprint: 10:FC:63:5D:F6:26:3E:0D:F3:25:BE:5F:79:CD:67:67
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
+BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
+I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
+CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
+lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
+AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            70:ba:e4:1d:10:d9:29:34:b6:38:ca:7b:03:cc:ba:bf
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
+        Validity
+            Not Before: Jan 29 00:00:00 1996 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:c9:5c:59:9e:f2:1b:8a:01:14:b4:10:df:04:40:
+                    db:e3:57:af:6a:45:40:8f:84:0c:0b:d1:33:d9:d9:
+                    11:cf:ee:02:58:1f:25:f7:2a:a8:44:05:aa:ec:03:
+                    1f:78:7f:9e:93:b9:9a:00:aa:23:7d:d6:ac:85:a2:
+                    63:45:c7:72:27:cc:f4:4c:c6:75:71:d2:39:ef:4f:
+                    42:f0:75:df:0a:90:c6:8e:20:6f:98:0f:f8:ac:23:
+                    5f:70:29:36:a4:c9:86:e7:b1:9a:20:cb:53:a5:85:
+                    e7:3d:be:7d:9a:fe:24:45:33:dc:76:15:ed:0f:a2:
+                    71:64:4c:65:2e:81:68:45:a7
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        bb:4c:12:2b:cf:2c:26:00:4f:14:13:dd:a6:fb:fc:0a:11:84:
+        8c:f3:28:1c:67:92:2f:7c:b6:c5:fa:df:f0:e8:95:bc:1d:8f:
+        6c:2c:a8:51:cc:73:d8:a4:c0:53:f0:4e:d6:26:c0:76:01:57:
+        81:92:5e:21:f1:d1:b1:ff:e7:d0:21:58:cd:69:17:e3:44:1c:
+        9c:19:44:39:89:5c:dc:9c:00:0f:56:8d:02:99:ed:a2:90:45:
+        4c:e4:bb:10:a4:3d:f0:32:03:0e:f1:ce:f8:e8:c9:51:8c:e6:
+        62:9f:e6:9f:c0:7d:b7:72:9c:c9:36:3a:6b:9f:4e:a8:ff:64:
+        0d:64
+
+Verisign Class 3 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: A2:33:9B:4C:74:78:73:D4:6C:E7:C1:F3:8D:CB:5C:E9
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4
+pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0
+13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk
+U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i
+F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY
+oJ2daZH9
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            7d:d9:fe:07:cf:a8:1e:b7:10:79:67:fb:a7:89:34:c6
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:cc:5e:d1:11:5d:5c:69:d0:ab:d3:b9:6a:4c:99:
+                    1f:59:98:30:8e:16:85:20:46:6d:47:3f:d4:85:20:
+                    84:e1:6d:b3:f8:a4:ed:0c:f1:17:0f:3b:f9:a7:f9:
+                    25:d7:c1:cf:84:63:f2:7c:63:cf:a2:47:f2:c6:5b:
+                    33:8e:64:40:04:68:c1:80:b9:64:1c:45:77:c7:d8:
+                    6e:f5:95:29:3c:50:e8:34:d7:78:1f:a8:ba:6d:43:
+                    91:95:8f:45:57:5e:7e:c5:fb:ca:a4:04:eb:ea:97:
+                    37:54:30:6f:bb:01:47:32:33:cd:dc:57:9b:64:69:
+                    61:f8:9b:1d:1c:89:4f:5c:67
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        51:4d:cd:be:5c:cb:98:19:9c:15:b2:01:39:78:2e:4d:0f:67:
+        70:70:99:c6:10:5a:94:a4:53:4d:54:6d:2b:af:0d:5d:40:8b:
+        64:d3:d7:ee:de:56:61:92:5f:a6:c4:1d:10:61:36:d3:2c:27:
+        3c:e8:29:09:b9:11:64:74:cc:b5:73:9f:1c:48:a9:bc:61:01:
+        ee:e2:17:a6:0c:e3:40:08:3b:0e:e7:eb:44:73:2a:9a:f1:69:
+        92:ef:71:14:c3:39:ac:71:a7:91:09:6f:e4:71:06:b3:ba:59:
+        57:26:79:00:f6:f8:0d:a2:33:30:28:d4:aa:58:a0:9d:9d:69:
+        91:fd
+
+Verisign Class 3 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: CD:68:B6:A7:C7:C4:CE:75:E0:1D:4F:57:44:61:92:09
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b
+N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t
+KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu
+kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm
+CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ
+Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu
+imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te
+2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe
+DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p
+F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt
+TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            9b:7e:06:49:a3:3e:62:b9:d5:ee:90:48:71:29:ef:57
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:cb:ba:9c:52:fc:78:1f:1a:1e:6f:1b:37:73:bd:
+                    f8:c9:6b:94:12:30:4f:f0:36:47:f5:d0:91:0a:f5:
+                    17:c8:a5:61:c1:16:40:4d:fb:8a:61:90:e5:76:20:
+                    c1:11:06:7d:ab:2c:6e:a6:f5:11:41:8e:fa:2d:ad:
+                    2a:61:59:a4:67:26:4c:d0:e8:bc:52:5b:70:20:04:
+                    58:d1:7a:c9:a4:69:bc:83:17:64:ad:05:8b:bc:d0:
+                    58:ce:8d:8c:f5:eb:f0:42:49:0b:9d:97:27:67:32:
+                    6e:e1:ae:93:15:1c:70:bc:20:4d:2f:18:de:92:88:
+                    e8:6c:85:57:11:1a:e9:7e:e3:26:11:54:a2:45:96:
+                    55:83:ca:30:89:e8:dc:d8:a3:ed:2a:80:3f:7f:79:
+                    65:57:3e:15:20:66:08:2f:95:93:bf:aa:47:2f:a8:
+                    46:97:f0:12:e2:fe:c2:0a:2b:51:e6:76:e6:b7:46:
+                    b7:e2:0d:a6:cc:a8:c3:4c:59:55:89:e6:e8:53:5c:
+                    1c:ea:9d:f0:62:16:0b:a7:c9:5f:0c:f0:de:c2:76:
+                    ce:af:f7:6a:f2:fa:41:a6:a2:33:14:c9:e5:7a:63:
+                    d3:9e:62:37:d5:85:65:9e:0e:e6:53:24:74:1b:5e:
+                    1d:12:53:5b:c7:2c:e7:83:49:3b:15:ae:8a:68:b9:
+                    57:97
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        11:14:96:c1:ab:92:08:f7:3f:2f:c9:b2:fe:e4:5a:9f:64:de:
+        db:21:4f:86:99:34:76:36:57:dd:d0:15:2f:c5:ad:7f:15:1f:
+        37:62:73:3e:d4:e7:5f:ce:17:03:db:35:fa:2b:db:ae:60:09:
+        5f:1e:5f:8f:6e:bb:0b:3d:ea:5a:13:1e:0c:60:6f:b5:c0:b5:
+        23:22:2e:07:0b:cb:a9:74:cb:47:bb:1d:c1:d7:a5:6b:cc:2f:
+        d2:42:fd:49:dd:a7:89:cf:53:ba:da:00:5a:28:bf:82:df:f8:
+        ba:13:1d:50:86:82:fd:8e:30:8f:29:46:b0:1e:3d:35:da:38:
+        62:16:18:4a:ad:e6:b6:51:6c:de:af:62:eb:01:d0:1e:24:fe:
+        7a:8f:12:1a:12:68:b8:fb:66:99:14:14:45:5c:ae:e7:ae:69:
+        17:81:2b:5a:37:c9:5e:2a:f4:c6:e2:a1:5c:54:9b:a6:54:00:
+        cf:f0:f1:c1:c7:98:30:1a:3b:36:16:db:a3:6e:ea:fd:ad:b2:
+        c2:da:ef:02:47:13:8a:c0:f1:b3:31:ad:4f:1c:e1:4f:9c:af:
+        0f:0c:9d:f7:78:0d:d8:f4:35:56:80:da:b7:6d:17:8f:9d:1e:
+        81:64:e1:fe:c5:45:ba:ad:6b:b9:0a:7a:4e:4f:4b:84:ee:4b:
+        f1:7d:dd:11
+
+Verisign Class 4 Public Primary Certification Authority - G2
+============================================================
+MD5 Fingerprint: 26:6D:2C:19:98:B6:70:68:38:50:54:19:EC:90:34:60
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEDKIjprS9esTR/h/xCA3JfgwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQC68OTP+cSuhVS5B1f5j8V/aBH4xBewRNzjMHPVKmIquNDM
+HO0oW369atyzkSTKQWI8/AIBvxwWMZQFl3Zuoq29YRdsTjCG8FE3KlDHqGKB3FtK
+qsGgtG7rL+VXxbErQHDbWk2hjh+9Ax/YA9SPTJlxvOKCzFjomDqG04Y48wApHwID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAIWMEsGnuVAVess+rLhDityq3RS6iYF+ATwj
+cSGIL4LcY/oCRaxFWdcqWERbt5+BO5JoPeI3JPV7bI92NZYJqFmduc4jq3TWg/0y
+cyfYaT5DdPauxYma51N86Xv2S/PBZYPejYqcPIiNOVn8qj8ijaHBZlCBckztImRP
+T8qAkbYp
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            32:88:8e:9a:d2:f5:eb:13:47:f8:7f:c4:20:37:25:f8
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Validity
+            Not Before: May 18 00:00:00 1998 GMT
+            Not After : Aug  1 23:59:59 2028 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1024 bit)
+                Modulus (1024 bit):
+                    00:ba:f0:e4:cf:f9:c4:ae:85:54:b9:07:57:f9:8f:
+                    c5:7f:68:11:f8:c4:17:b0:44:dc:e3:30:73:d5:2a:
+                    62:2a:b8:d0:cc:1c:ed:28:5b:7e:bd:6a:dc:b3:91:
+                    24:ca:41:62:3c:fc:02:01:bf:1c:16:31:94:05:97:
+                    76:6e:a2:ad:bd:61:17:6c:4e:30:86:f0:51:37:2a:
+                    50:c7:a8:62:81:dc:5b:4a:aa:c1:a0:b4:6e:eb:2f:
+                    e5:57:c5:b1:2b:40:70:db:5a:4d:a1:8e:1f:bd:03:
+                    1f:d8:03:d4:8f:4c:99:71:bc:e2:82:cc:58:e8:98:
+                    3a:86:d3:86:38:f3:00:29:1f
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        85:8c:12:c1:a7:b9:50:15:7a:cb:3e:ac:b8:43:8a:dc:aa:dd:
+        14:ba:89:81:7e:01:3c:23:71:21:88:2f:82:dc:63:fa:02:45:
+        ac:45:59:d7:2a:58:44:5b:b7:9f:81:3b:92:68:3d:e2:37:24:
+        f5:7b:6c:8f:76:35:96:09:a8:59:9d:b9:ce:23:ab:74:d6:83:
+        fd:32:73:27:d8:69:3e:43:74:f6:ae:c5:89:9a:e7:53:7c:e9:
+        7b:f6:4b:f3:c1:65:83:de:8d:8a:9c:3c:88:8d:39:59:fc:aa:
+        3f:22:8d:a1:c1:66:50:81:72:4c:ed:22:64:4f:4f:ca:80:91:
+        b6:29
+
+Verisign Class 4 Public Primary Certification Authority - G3
+============================================================
+MD5 Fingerprint: DB:C8:F2:27:2E:B1:EA:6A:29:23:5D:FE:56:3E:33:DF
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1
+GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ
++mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd
+U6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm
+NxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY
+ufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/
+ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1
+CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq
+g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
+fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c
+2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/
+bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            ec:a0:a7:8b:6e:75:6a:01:cf:c4:7c:cc:2f:94:5e:d7
+        Signature Algorithm: sha1WithRSAEncryption
+        Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary Certification Authority - G3
+        Validity
+            Not Before: Oct  1 00:00:00 1999 GMT
+            Not After : Jul 16 23:59:59 2036 GMT
+        Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary Certification Authority - G3
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (2048 bit)
+                Modulus (2048 bit):
+                    00:ad:cb:a5:11:69:c6:59:ab:f1:8f:b5:19:0f:56:
+                    ce:cc:b5:1f:20:e4:9e:26:25:4b:e0:73:65:89:59:
+                    de:d0:83:e4:f5:0f:b5:bb:ad:f1:7c:e8:21:fc:e4:
+                    e8:0c:ee:7c:45:22:19:76:92:b4:13:b7:20:5b:09:
+                    fa:61:ae:a8:f2:a5:8d:85:c2:2a:d6:de:66:36:d2:
+                    9b:02:f4:a8:92:60:7c:9c:69:b4:8f:24:1e:d0:86:
+                    52:f6:32:9c:41:58:1e:22:bd:cd:45:62:95:08:6e:
+                    d0:66:dd:53:a2:cc:f0:10:dc:54:73:8b:04:a1:46:
+                    33:33:5c:17:40:b9:9e:4d:d3:f3:be:55:83:e8:b1:
+                    89:8e:5a:7c:9a:96:22:90:3b:88:25:f2:d2:53:88:
+                    02:0c:0b:78:f2:e6:37:17:4b:30:46:07:e4:80:6d:
+                    a6:d8:96:2e:e8:2c:f8:11:b3:38:0d:66:a6:9b:ea:
+                    c9:23:5b:db:8e:e2:f3:13:8e:1a:59:2d:aa:02:f0:
+                    ec:a4:87:66:dc:c1:3f:f5:d8:b9:f4:ec:82:c6:d2:
+                    3d:95:1d:e5:c0:4f:84:c9:d9:a3:44:28:06:6a:d7:
+                    45:ac:f0:6b:6a:ef:4e:5f:f8:11:82:1e:38:63:34:
+                    66:50:d4:3e:93:73:fa:30:c3:66:ad:ff:93:2d:97:
+                    ef:03
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha1WithRSAEncryption
+        8f:fa:25:6b:4f:5b:e4:a4:4e:27:55:ab:22:15:59:3c:ca:b5:
+        0a:d4:4a:db:ab:dd:a1:5f:53:c5:a0:57:39:c2:ce:47:2b:be:
+        3a:c8:56:bf:c2:d9:27:10:3a:b1:05:3c:c0:77:31:bb:3a:d3:
+        05:7b:6d:9a:1c:30:8c:80:cb:93:93:2a:83:ab:05:51:82:02:
+        00:11:67:6b:f3:88:61:47:5f:03:93:d5:5b:0d:e0:f1:d4:a1:
+        32:35:85:b2:3a:db:b0:82:ab:d1:cb:0a:bc:4f:8c:5b:c5:4b:
+        00:3b:1f:2a:82:a6:7e:36:85:dc:7e:3c:67:00:b5:e4:3b:52:
+        e0:a8:eb:5d:15:f9:c6:6d:f0:ad:1d:0e:85:b7:a9:9a:73:14:
+        5a:5b:8f:41:28:c0:d5:e8:2d:4d:a4:5e:cd:aa:d9:ed:ce:dc:
+        d8:d5:3c:42:1d:17:c1:12:5d:45:38:c3:38:f3:fc:85:2e:83:
+        46:48:b2:d7:20:5f:92:36:8f:e7:79:0f:98:5e:99:e8:f0:d0:
+        a4:bb:f5:53:bd:2a:ce:59:b0:af:6e:7f:6c:bb:d2:1e:00:b0:
+        21:ed:f8:41:62:82:b9:d8:b2:c4:bb:46:50:f3:31:c5:8f:01:
+        a8:74:eb:f5:78:27:da:e7:f7:66:43:f3:9e:83:3e:20:aa:c3:
+        35:60:91:ce
+
+Verisign/RSA Commercial CA
+==========================
+MD5 Fingerprint: 5A:0B:DD:42:9E:B2:B4:62:97:32:7F:7F:0A:AA:9A:39
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw
+HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy
+Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05
+OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT
+ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o
+975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/
+touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE
+7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j
+9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI
+0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb
+MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU=
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:41:00:00:16
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=RSA Data Security, Inc., OU=Commercial Certification Authority
+        Validity
+            Not Before: Nov  4 18:58:34 1994 GMT
+            Not After : Nov  3 18:58:34 1999 GMT
+        Subject: C=US, O=RSA Data Security, Inc., OU=Commercial Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1000 bit)
+                Modulus (1000 bit):
+                    00:a4:fb:81:62:7b:ce:10:27:dd:e8:f7:be:6c:6e:
+                    c6:70:99:db:b8:d5:05:03:69:28:82:9c:72:7f:96:
+                    3f:8e:ec:ac:29:92:3f:8a:14:f8:42:76:be:bd:5d:
+                    03:b9:90:d4:d0:bc:06:b2:51:33:5f:c4:c2:bf:b6:
+                    8b:8f:99:b6:62:22:60:dd:db:df:20:82:b4:ca:a2:
+                    2f:2d:50:ed:94:32:de:e0:55:8d:d4:68:e2:e0:4c:
+                    d2:cd:05:16:2e:95:66:5c:61:52:38:1e:51:a8:82:
+                    a1:c4:ef:25:e9:0a:e6:8b:2b:8e:31:66:d9:f8:d9:
+                    fd:bd:3b:69:d9:eb
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        76:b5:b6:10:fe:23:f7:f7:59:62:4b:b0:5f:9c:c1:68:bc:49:
+        bb:b3:49:6f:21:47:5d:2b:9d:54:c4:00:28:3f:98:b9:f2:8a:
+        83:9b:60:7f:eb:50:c7:ab:05:10:2d:3d:ed:38:02:c1:a5:48:
+        d2:fe:65:a0:c0:bc:ea:a6:23:16:66:6c:1b:24:a9:f3:ec:79:
+        35:18:4f:26:c8:e3:af:50:4a:c7:a7:31:6b:d0:7c:18:9d:50:
+        bf:a9:26:fa:26:2b:46:9c:14:a9:bb:5b:30:98:42:28:b5:4b:
+        53:bb:43:09:92:40:ba:a8:aa:5a:a4:c6:b6:8b:57:4d:c5
+
+Verisign/RSA Secure Server CA
+=============================
+MD5 Fingerprint: 74:7B:82:03:43:F0:00:9E:6B:B3:EC:47:BF:85:A5:93
+PEM Data:
+-----BEGIN CERTIFICATE-----
+MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD
+VQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0
+MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV
+BAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy
+dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ
+ADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII
+0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI
+uR2nKRoTLkoRWZweFdVJVCxzOmmCsZc5nG1wZ0jl3S3WyB57AgMBAAEwDQYJKoZI
+hvcNAQECBQADfgBl3X7hsuyw4jrg7HFGmhkRuNPHoLQDQCYCPgmc4RKz0Vr2N6W3
+YQO2WxZpO8ZECAyIUwxrl0nHPjXcbLm7qt9cuzovk2C2qUtN8iD3zV9/ZHuO3ABc
+1/p3yjkWWW8O6tO1g39NTUJWdrTJXwT4OPjr0l91X817/OWOgHz8UA==
+-----END CERTIFICATE-----
+Certificate Ingredients:
+    Data:
+        Version: 1 (0x0)
+        Serial Number:
+            02:ad:66:7e:4e:45:fe:5e:57:6f:3c:98:19:5e:dd:c0
+        Signature Algorithm: md2WithRSAEncryption
+        Issuer: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority
+        Validity
+            Not Before: Nov  9 00:00:00 1994 GMT
+            Not After : Jan  7 23:59:59 2010 GMT
+        Subject: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (1000 bit)
+                Modulus (1000 bit):
+                    00:92:ce:7a:c1:ae:83:3e:5a:aa:89:83:57:ac:25:
+                    01:76:0c:ad:ae:8e:2c:37:ce:eb:35:78:64:54:03:
+                    e5:84:40:51:c9:bf:8f:08:e2:8a:82:08:d2:16:86:
+                    37:55:e9:b1:21:02:ad:76:68:81:9a:05:a2:4b:c9:
+                    4b:25:66:22:56:6c:88:07:8f:f7:81:59:6d:84:07:
+                    65:70:13:71:76:3e:9b:77:4c:e3:50:89:56:98:48:
+                    b9:1d:a7:29:1a:13:2e:4a:11:59:9c:1e:15:d5:49:
+                    54:2c:73:3a:69:82:b1:97:39:9c:6d:70:67:48:e5:
+                    dd:2d:d6:c8:1e:7b
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md2WithRSAEncryption
+        65:dd:7e:e1:b2:ec:b0:e2:3a:e0:ec:71:46:9a:19:11:b8:d3:
+        c7:a0:b4:03:40:26:02:3e:09:9c:e1:12:b3:d1:5a:f6:37:a5:
+        b7:61:03:b6:5b:16:69:3b:c6:44:08:0c:88:53:0c:6b:97:49:
+        c7:3e:35:dc:6c:b9:bb:aa:df:5c:bb:3a:2f:93:60:b6:a9:4b:
+        4d:f2:20:f7:cd:5f:7f:64:7b:8e:dc:00:5c:d7:fa:77:ca:39:
+        16:59:6f:0e:ea:d3:b5:83:7f:4d:4d:42:56:76:b4:c9:5f:04:
+        f8:38:f8:eb:d2:5f:75:5f:cd:7b:fc:e5:8e:80:7c:fc:50
diff --git a/db/Makefile.am b/db/Makefile.am
index c972523..a8bac3d 100644
--- a/db/Makefile.am
+++ b/db/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 25911 2012-07-30 19:52:51Z romw $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/db/boinc_db.cpp b/db/boinc_db.cpp
index 1944e98..9fcd91a 100644
--- a/db/boinc_db.cpp
+++ b/db/boinc_db.cpp
@@ -2406,4 +2406,4 @@ void DB_VDA_CHUNK_HOST::db_parse(MYSQL_ROW &r) {
     transfer_send_time = atof(r[i++]);
 }
 
-const char *BOINC_RCSID_ac374386c8 = "$Id: boinc_db.cpp 25356 2012-02-29 20:58:45Z davea $";
+const char *BOINC_RCSID_ac374386c8 = "$Id$";
diff --git a/db/db_base.cpp b/db/db_base.cpp
index 9b0bb45..5a9ccd7 100644
--- a/db/db_base.cpp
+++ b/db/db_base.cpp
@@ -525,4 +525,4 @@ void escape_mysql_like_pattern(const char* in, char* out) {
     }
 }
 
-const char *BOINC_RCSID_43d919556b = "$Id: db_base.cpp 25405 2012-03-12 21:45:29Z davea $";
+const char *BOINC_RCSID_43d919556b = "$Id$";
diff --git a/db/init_db b/db/init_db
deleted file mode 100755
index 353b195..0000000
--- a/db/init_db
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ -z "$1" ]; then
-    echo "syntax: $0 DB_NAME"
-    exit 1
-fi
-
-mysql $1 < schema.sql
diff --git a/doc/Makefile.am b/doc/Makefile.am
index a68199e..e5e82d5 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 15375 2008-06-08 22:18:52Z davea $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/doc/acct_mgt.png b/doc/acct_mgt.png
deleted file mode 100644
index b481f40..0000000
Binary files a/doc/acct_mgt.png and /dev/null differ
diff --git a/doc/acct_mgt.sxi b/doc/acct_mgt.sxi
deleted file mode 100644
index 4c2855f..0000000
Binary files a/doc/acct_mgt.sxi and /dev/null differ
diff --git a/doc/acct_mgt2.odg b/doc/acct_mgt2.odg
deleted file mode 100644
index ea640c3..0000000
Binary files a/doc/acct_mgt2.odg and /dev/null differ
diff --git a/doc/acct_mgt2.png b/doc/acct_mgt2.png
deleted file mode 100644
index 1a504d0..0000000
Binary files a/doc/acct_mgt2.png and /dev/null differ
diff --git a/doc/comm.png b/doc/comm.png
deleted file mode 100644
index 97827bb..0000000
Binary files a/doc/comm.png and /dev/null differ
diff --git a/doc/comm.sxd b/doc/comm.sxd
deleted file mode 100644
index ab6c140..0000000
Binary files a/doc/comm.sxd and /dev/null differ
diff --git a/doc/comm_simple.png b/doc/comm_simple.png
deleted file mode 100644
index 9ba60b5..0000000
Binary files a/doc/comm_simple.png and /dev/null differ
diff --git a/doc/comm_simple.sxd b/doc/comm_simple.sxd
deleted file mode 100644
index 2277264..0000000
Binary files a/doc/comm_simple.sxd and /dev/null differ
diff --git a/doc/credit.png b/doc/credit.png
deleted file mode 100644
index 8f2ae88..0000000
Binary files a/doc/credit.png and /dev/null differ
diff --git a/doc/credit.sxd b/doc/credit.sxd
deleted file mode 100644
index 04b4ba6..0000000
Binary files a/doc/credit.sxd and /dev/null differ
diff --git a/doc/debian_linux_install.txt b/doc/debian_linux_install.txt
deleted file mode 100644
index 8f4c71a..0000000
--- a/doc/debian_linux_install.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-Packages required for running the server:
-
-  mysql-server mysql-client libmysqlclient
-
-  apache, apache2, apache-ssl
-  php4-cgi (or php4 if running apache 1)
-
-  python-mysqldb, python-xml
-
-Packages required for compilation:
-
-  g++
-
-  libgl-dev libglu-dev
-    (these are virtual packages; one example of packages that provide these are:
-       mesag-dev xlibmesa-glu-dev
-    )
-
-  libmysqlclient-dev
-
-  libglutg3 libglut3-dev
- 
-  libgtk2.0 libgtk2.0-dev
-
-  libwxgtk2.2 libwxgtk2.2-dev
-    (Note: after installing these packages, you will still need to
-     download/compile/install a newer version. Make sure you end up
-     with a libwx_gtk-2.4.a as well as libwx_gtk-2.4.so. You'll need
-     to configure with the --disable-shared option to get the .a).
-    (Another Note: Depending on what gtk packages you have installed,
-     you may be missing the script "gtk-config" which wxwidgets needs
-     to configure (it uses the script to determine gtk version. At worst,
-     just make a script called gtk-config that spits out the version
-     number of GTK when called with the "--version" command line option,
-     i.e.:
-             # gtk-config --version
-             1.2.10
-    ).
-
-Packages required if you change makefiles:
-
-  autoconf (>= 2.59)
-  automake (>= 1.9.3)
-    (both are very easy to download from gnu and compile/install)
-
diff --git a/doc/fortran_numerics.txt b/doc/fortran_numerics.txt
deleted file mode 100644
index 71f0d56..0000000
--- a/doc/fortran_numerics.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-[ Notes from Eric McIntosh at CERN on how to
-  eliminate numerical discrepancies between platforms. ]
-
-First I found a problem with data input on Windows using
-an "old" Compaq Visual Fortran compiler. Approximately
-1000 out of 16 million magnet errors were one bit too big
-on the Windows system. This problem is apparently fixed with
-"more modern" compilers, and my colleague Flrent Denichin
-from Lyon says we could also have specified a larger number of
-decimal digits to avoid this........
-
-However I found that the Lahey Fortran compilers
-produce identical results on Linux and Windows.
-The company claims it strives for this but does
-not guarantee it. I use compatible releases
-of their compiler e.g. 5.7 on Windows and 6.1 on Linux
-but am now in production with 7.1.1 on Windows and 6.2 on Linux.
-The data input problem was thus resolved.
-
-It is very important to note that the compiler disables
-extended precision on Intel boxes and has an option to
-generate compatible code for any Pentium. Lahey do NOT use
-extended 80-bit precision, SSE, or Multiply/ADD in one
-instruction, with the appropriate compiler switch settings,
-and I make a statically linked executable. I also compile at 
-the same optimisation level of course to avoid
-differences due to different optimisation.
-
-Given all this I was delighted, until I started finding
-small numerical difference in a small percentage of runs.
-This was relatively easy to spot, as even a difference of
-1 in the least significant bit of the mantissa of an IEEE
-floating-point number, will be magnified as the SixTrack
-particles pass through ~10,000 computational steps of
-each of up to one million turns.
-
-To cut a long story short; I finally found that the culprits
-were the exp and log functions. Certain parameters to these
-functions produce a result which is 1 least significant bit different
-between an IA-32 and an ATHLON AMD64. A WEB search uncovered the
-crlibm, a library of Elementary functions developed at the
-Ecole Normale Sperieur in Lyon (just a couple of hours
-drive from Geneva!). I downloaded and tested this library,
-and developed a Fortran interface and converted it for
-Windows as well. (It had been developed using C on Linux.)
-The library provides, sin, cos, sinh, cosh, tan, atan, log, log10 and
-exp that I use. It offers rounding to nearest, or rounding up
-or down. It is also optimised in the sense that it computes a
-sufficient but minimum number of binary digits to produce
-a correctly rounded result.
-
-I also implemented some missing elementary functions in terms of
-the others they provide; namely acos_rn, asin_rn, atan2_rn in
-terms of atan_rn, where _rn implies round to nearest.
-
-This library GUARANTEES to deliver the correctly rounded double
-precision result on virtually any computer, and certainly on the
-IEEE IA-32, AMD64 machines I am using. The results are also proven 
-theoretically to be correct. This is a tremendous piece of work and to
-me represents an enormous step forward in the history of computing.
-The greatest advance since the invention of IEEE arithmetic itself.
-(I have not yet verified on the Intel IA-64 due to the pressure of
-work, but I will do, as soon as possible, and Lyon have certainly
-tested it.)
-
-My colleague Florent de Dinechen of ENS Lyon, whom we invited to CERN 
-afterwards to lecture on floating-point arithmetic, points you to
-http://lipforge.ens-lyon.fr/projects/crlibm/
-where their work is described.
-
-We shall make a joint presentation (I hope) at the
-19th International Symposium on Distributed Computing
-DISC 2005
-Krakow, Poland, September 25-29, 2005.
-
-and also at CHEP 06 in Mumbai.
diff --git a/doc/graphics.png b/doc/graphics.png
deleted file mode 100644
index a55a37a..0000000
Binary files a/doc/graphics.png and /dev/null differ
diff --git a/doc/graphics.sxd b/doc/graphics.sxd
deleted file mode 100644
index 18fb3c0..0000000
Binary files a/doc/graphics.sxd and /dev/null differ
diff --git a/doc/hpux.html b/doc/hpux.html
deleted file mode 100644
index 5d67bc1..0000000
--- a/doc/hpux.html
+++ /dev/null
@@ -1,382 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <meta content="text/html; charset=ISO-8859-1"
- http-equiv="content-type">
-  <title>boinc and seti at home quick install guide</title>
-</head>
-<body>
-              <big>
-
-<big style="font-weight: bold;"><big>BOINC and SETI at home quick install
-guide for HPUX</big></big></big><br>
-<br>
-From Lars Bausch
-<br>
-<big><br>
-<big>0. Releases </big></big><br>
-<br>
-There are some different depots for specifiy (optimized) plattforms
-available :<br>
-<br>
- - seti-boinc_parisc_32.depot.gz :  32 Bit PARISC (PARISC 1.1
-CPUs, aka PARISC <br>
-
-   7x00 and 2.0 8x00 CPUs (aka PARISC 2.0). Runs on 64 Bit
-also, The seti app <br>
-   is 20 % slower than the 64 bit optimized binary). Should
-also run on IA64 <br>
-   (Itanium), but very slow. HPUX 11.x (11.0, 11.11 (11i
-Version 1) and 11.23 (<br>
-   11i Version 2)<br>
-<br>
- - seti-boinc_parisc_64.depot.gz : 64 bit for PARISC 8x00 (aka
-PARISC 2.0). <br>
-   Should run slow on IA64. HPUX 11.x (11.0, 11.11 (11i
-Version 1) and 11.23 (<br>
-
-   11i Version 2)<br>
-<br>
- - seti-boinc_ia64_32.depot.gz : 32 bit for Itanium on HPUX 11.2x
-(11i Version <br>
-   1 and Version 2).<br>
-<br>
->From more informations about the defintion from
-workstation/server/model to <br>
-architecure and cpu version look at /usr/bin/sched.models.<br>
-<br>
-<br>
-<br>
-<big><big>1. Install the package</big></big><br>
-
-<br>
-<big>1.1 Install with swinstall</big><br>
-<br>
-Unzip the depot package : <br>
-        gunzip
-seti-boinc_32.depot.gz <br>
-<br>
-Swinstall the depot <br>
-        swinstall -s
-$PATH_TO_BOINC_DEPOT/seti-boinc_32.depot \*  <br>
-
-<br>
-Source your /etc/profile with the new entries required for boinc and
-seti : <br>
-        . /etc/profi<big>le<br>
-<br>
-<br>
-1.2 Install not via swinstall</big><br>
-<br>
-If you don't wan't to intstall the binaries with swinstall. i<br>
-
-<br>
-gunzip seti-boinc_parisc-64_1.4.depot.gz<br>
-<br>
-tar -xvf seti-boinc_parisc-64_1.4.depot<br>
-<br>
-cp -R seti-boinc_64/*/opt/boinc /opt/<br>
-<br>
-cp ./catalog/seti-boinc_64/SETI_BOINC-LIB/postinstall /opt/boinc<br>
-    -> now you can make a tar file for example, from
-the destination directory <br>
-       /opt/boinc to copy it to other
-sytems, or move wherever you want. <br>
-
-<br>
-Add this to /etc/profile, or the in the profile of the user  : <br>
-       
-SHLIB_PATH=$DESTINATION_DIR_FROM_BOINC/lib:$SHLIB_PATH<br>
-        -> for example
-SHLIB_PATH=/home/seti/lib <br>
-
-        export SHLIB-PATH<br>
-<br>
-Source your /etc/profile, with the new entries required for boinc and
-seti : <br>
-        . /etc/profile<br>
-
-<small><br>
-<br>
-</small><br>
-<big><big>2. add a group and a user</big> </big><br>
-<br>
-Don't run the boinc client and seti app as root !<br>
-<br>
-This steps require a root account :<br>
-<br>
-Add a group (groupadd -g $GROUPID $GROUPNAME ) : <br>
-        groupadd -g 200 seti<br>
-
-<br>
-Add a user (useradd -u $USERID -g $GROUPID  -d $HOMEDIRECTORY
-$USERNAME) : <br>
-        useradd -u 200 -g 200 
--d /opt/boinc seti<br>
-<br>
-Change the password for you new user (passwd $USERNAME):<br>
-        passwd seti<br>
-
-<br>
-Change the owner and group for the boinc directory, where the client is
-located (<br>
-chown $USERNAME:$GROUPNAME $SETIDIRECTORY)<br>
-        chown seti:seti /opt/boinc<br>
-<br>
-Feel free to change the directories, if you want... <br>
-<br>
-<br>
-<big><br>
-
-<big>3. Register your Account for seti at home</big></big><br>
-<br>
-You can use the standard registration mechanism within the client : <br>
-        ./boinc_client
--attach_project setiweb.berkeley.edu $ACCOUNT_KEY<br>
-<br>
-If this don't work, whis workaround helps :<br>
-<br>
-Change $ACCOUNT_KEY in the file
-/opt/boinc/account_setiathome.berkeley.edu.xml<br>
-in the key you get from email from the seti at home project. <br>
-Edit line 3, and do not set any blanks before or after the key. <br>
-
-<br>
-<account><br>
-   
-<master_url>http://setiathome.berkeley.edu/</master_url><br>
-   
-<authenticator>$ACCOUNT_KEY</authenticator><br>
-
-    <project_name>SETI at home</project_name><br>
-    <host_venue>home</host_venue><br>
-<project_preferences><br>
-
-</project_preferences><br>
-</account><br>
-<br>
-<br>
-<big><br>
-<big>4. Start client and seti app</big></big><br>
-<br>
-Login as your new user, and start the boinc_client : <br>
-<br>
-seti at windu:/opt/boinc # ./boinc_client<br>
-2005-06-08 08:53:22 [---] Starting BOINC client version 4.32 for
-hppa1.1-hp-hpux11.11<br>
-2005-06-08 08:53:22 [---] Data directory: /opt/boinc<br>
-2005-06-08 08:53:22 [SETI at home] Using your default project prefs<br>
-2005-06-08 08:53:22 [SETI at home] Found app_info.xml; using anonymous
-platform<br>
-2005-06-08 08:53:22 [SETI at home] Host ID not assigned yet<br>
-2005-06-08 08:53:22 [---] No general preferences found - using BOINC
-defaults<br>
-2005-06-08 08:53:22 [---] Running CPU benchmarks<br>
-2005-06-08 08:54:21 [---] Benchmark results:<br>
-2005-06-08 08:54:21 [---]    Number of CPUs: 1<br>
-2005-06-08 08:54:21 [---]    407 double precision MIPS
-(Whetstone) per CPU<br>
-2005-06-08 08:54:21 [---]    823 integer MIPS
-(Dhrystone) per CPU<br>
-2005-06-08 08:54:21 [---] Finished CPU benchmarks<br>
-2005-06-08 08:54:21 [---] Resuming computation and network activity<br>
-2005-06-08 08:54:21 [---] Insufficient work; requesting more<br>
-2005-06-08 08:54:26 [---] Insufficient work; requesting more<br>
-2005-06-08 08:54:26 [SETI at home] Requesting 8640.00 seconds of work<br>
-2005-06-08 08:54:26 [SETI at home] Sending request to scheduler:
-http://setiboinc.ssl.berkeley.edu/sah_cgi/cgi<br>
-2005-06-08 08:54:36 [SETI at home] Scheduler RPC to
-http://setiboinc.ssl.berkeley.edu/sah_cgi/cgi succeeded<br>
-2005-06-08 08:54:36 [SETI at home] General preferences have been updated<br>
-2005-06-08 08:54:36 [---] General prefs: from SETI at home (last modified
-2005-04-29 22:36:58)<br>
-2005-06-08 08:54:36 [---] General prefs: using your defaults<br>
-2005-06-08 08:54:37 [---] May run out of work in 2.00 days; requesting
-more<br>
-2005-06-08 08:54:37 [SETI at home] Requesting 104104.99 seconds of work<br>
-2005-06-08 08:54:37 [SETI at home] Sending request to scheduler:
-http://setiboinc.ssl.berkeley.edu/sah_cgi/cgi<br>
-2005-06-08 08:54:37 [SETI at home] Started download of
-10ja05aa.4505.3922.473568.100<br>
-2005-06-08 08:54:40 [SETI at home] Finished download of
-10ja05aa.4505.3922.473568.10<br>
-2005-06-08 08:54:40 [SETI at home] Throughput 6378 bytes/sec<br>
-2005-06-08 08:54:41 [SETI at home] Resuming computation for result
-10ja05aa.4505.3922.473568.10 using setiathome version 4.07<br>
-
-<br>
-If you get some SIGSEGV from the boinc_client or setiathome app at <br>
-HPUX 11.11(11i V.1), it could be, that you will need some additional
-patches. <br>
-Look at 6.2.<br>
-<br>
-<br>
-<big><big><br>
-5. Installation finished. </big></big><br>
-<br>
-If you have some problems, try a look in the forum of the setiathome
-website (<br>
-setiweb.berkeley.edu) or Paul Bucks excelent documentations
-(www.boinc-doc.net)<br>
-If you have some problems with the hpux binary, feel free, to contact
-me. <br>
-<br>
-
-<br>
-<br>
-<big><big>6. Additional Configurations </big> </big><br>
-<br>
-<big>6.1 Multi processor systems </big><br>
-<br>
-For muli processor systems, you need to setup the preferences on your
-account <br>
-page. If this is not configured, your multi processor system will only
-use one <br>
-cpu.<br>
-<br>
-At the seti homepage (setiweb.berkeley.edu) login with your account.<br>
-Click to "View or edit general preferences". Then to "Edit preferences"<br>
-Add in the section "On multiprocessors, use at most XX processors" the
-number <br>
-of CPUs your system have, and click to "Update preferences".<br>
-
-<br>
-Now, you need to update your client with the new preferences you made
-on the <br>
-website :<br>
-seti at windu:/opt/boinc # ./boinc_client -update_prefs
-http://setiathome.berkeley.edu<br>
-<br>
-You client will download some new work...<br>
-<br>
-<br>
-<big>6.2 Patches + OS Revisions</big><br>
-<br>
-You can dowload this patches and patchbundles at the HP IT Resource
-Centre (<br>
-itrc) at itrc.hp.com. <br>
-The registration at the itrc is for free and don't depends on any
-support<br>
-agreements.<br>
-<br>
-
-<br>
-<big>6.2.1 HPUX 11.0 </big><br>
-<br>
-Minimum Patches : Quality Pack (QPK) September 2003 and General Relase
-Patches<br>
-                 
-November 1999<br>
-
-<br>
-Recommended Patches : Quality Pack (QPK) and HardwareEnablement (HWE)
-patches <br>
-                     
-from June 2004, Required Patches June 2003<br>
-
-<br>
-<br>
-<big>6.2.2 HPUX 11.11 (11i Version 1)</big><br>
-<br>
-Minimum Patches : Gold Pack (GPK) and HardwareEnablement (HWE) patches
-from <br>
-                 
-Dec.2003. Required Patch Bundle June 2003 <br>
-
-<br>
-Recommended Patches : Gold Pack (GPK) and HardwareEnablement (HWE)
-patches from<br>
-                     
-Dec. 2004, and Required Patch Bunlde Dec.2004<br>
-
-<br>
-If you have some problems, that you get a SIGSEGV with the minimum or
-recommened patches,<br>
-please install this additional patches :<br>
-- PHCO_31903 (libc cumulative patch)<br>
-- PHKL_32806 (Cumulative VM patch)<br>
-- PHKL_32647 (Extending Physical I/O Addressing) <br>
-- PHSS_30970 (ld(1) and linker tools cumulative patch) <br>
-- PHKL_32204 (VM core(4) related changes)<br>
-<br>
-<br>
-<big>6.2.3 HPUX 11.23 (11i Version 2 at PARISC)</big><br>
-<br>
-Minimum Patches : Required Patch Bundle September 2004<br>
-<br>
-<big><br>
-6.2.4 HPUX 11.2x (11i Version 1 and Version 2 at Itanium (IA64))</big><br>
-
-<br>
-Minimum Patches : Required Patch Bundle September 2004<br>
-<br>
-<big><br>
-6.2.5 HPUX 10.20 </big><br>
-<br>
-Not tested, but the binaries should run successfull.<br>
-<br>
-<br>
-<big>6.3 Kernel Parameters</big><br>
-<br>
-The binaries will run with the default HPUX Kernel parameters. But if
-you wan't<br>
-to use more than one Application or have some special things running on
-your<br>
-system, you should have a look at your kernelparameters.<br>
-
-<br>
-Changing some kernelparameters will increase the perfomance of the
-whole system.<br>
-Some kernelparameters which should changed to increase performance :<br>
-maxfiles        1024<br>
-maxuprc         256 <br>
-maxdsiz_64bit   0X40000000<br>
-maxfiles        1024<br>
-maxssiz         0X4000000<br>
-maxssiz_64bit   0X4000000<br>
-maxtsiz         0X4000000<br>
-maxtsiz_64bit   0X40000000<br>
-shmmax          0X4000000<br>
-maxusers        128 or higher for
-Servers (256..512). But a good start for a <br>
-
-                   
-workstation) <br>
-
-<br>
-<br>
-<big>6.4 Startup script </big><br>
-<br>
-In /sbin/init.d is a script for start boinc at boot and stop for
-shutdown. <br>
-It's linked to /sbino/rc3.d/S990boinc. <br>
-It will also redirect stdout and stderr from the boinc client, redirect
-the <br>
-output from the boinc script /opt/boinc/boinc.sh to
-/opt/boinc/boinc.log. The <br>
-script will keep on boinc running in a look, and could mail you, if
-boinc was<br>
-terminated abnormaly.<br>
-This script is configurable by /etc/rc.config.d/boinc. For details how
-to <br>
-configure, please look into /etc/rc.config.d/boinc. <br>
-<br>
-<br>
-<br>
-
-<big><big>7. Additional notes</big></big><br>
-<br>
-This quick install guide is available as "readme" in the swpackage, and
-if you <br>
-have installed it under /opt/boinc/doc/install.<br>
-In /opt/boinc/doc there are some further readmes about the boinc client
-and <br>
-seti app.<br>
-<br>
-<br>
-<br>
-<br>
-<small><small><small>V.1.6, 31.7.05, Lars Bausch</small></small></small><br>
-
-</body>
-</html>
diff --git a/doc/manpages/Makefile.am b/doc/manpages/Makefile.am
index be32ad2..9349d4c 100644
--- a/doc/manpages/Makefile.am
+++ b/doc/manpages/Makefile.am
@@ -1,6 +1,6 @@
 ## -*- mode: makefile; tab-width: 4 -*-
 
-## $Id: Makefile.am 18938 2009-08-28 18:25:26Z davea $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/doc/mgroptionsgeneral.png b/doc/mgroptionsgeneral.png
deleted file mode 100644
index 219cac6..0000000
Binary files a/doc/mgroptionsgeneral.png and /dev/null differ
diff --git a/doc/mgroptionshttp.png b/doc/mgroptionshttp.png
deleted file mode 100644
index bc070e0..0000000
Binary files a/doc/mgroptionshttp.png and /dev/null differ
diff --git a/doc/mgroptionssocks.png b/doc/mgroptionssocks.png
deleted file mode 100644
index 0b0eed6..0000000
Binary files a/doc/mgroptionssocks.png and /dev/null differ
diff --git a/doc/mgrsystrayballoon.png b/doc/mgrsystrayballoon.png
deleted file mode 100644
index 9136399..0000000
Binary files a/doc/mgrsystrayballoon.png and /dev/null differ
diff --git a/doc/myers.txt b/doc/myers.txt
deleted file mode 100644
index f0a4d2b..0000000
--- a/doc/myers.txt
+++ /dev/null
@@ -1,146 +0,0 @@
-I'm working with my student, Kim Lefkowitz, on learning how to write
-BOINC applications.  We've been doing this both by reading the
-examples that come with the distribution and by trying to write our
-own simple programs.  As a result, we've come up with the simplest
-BOINC program, the "Hello, World!" program of BOINC.  It just opens a
-file and writes to it and the file is uploaded to the server.  
-
-We'd like to share this with anybody who might have to go through the
-whole process of learning to write BOINC apps.   And of course learn
-from any suggestions on making it even simpler or the comments clearer.
-
-A copy of the program is attached below (it's short, of course) but
-I've also packed it up with example workunit and result files, a
-Makefile for Unix and a .dsw for Windows.  These are all in the
-hello-boinc tarball at http://noether.vassar.edu/pub/myers/src/
-
-But you don't need the tarball, you can just put the code below in the
-file hello.C in the apps directory, and then edit the Makefile to
-change "1sec" to "hello" everywhere and it will build.
-
-[Suggestion: the 1sec app does not work.  We were initially distracted
-into trying to get it to run until we figured out that it does not use
-the API.  So how about replacing apps/1sec with this?  I see 1sec is
-mainly used for the test suite, so if it is to be kept then maybe move
-it to the test/ directory.]
-
-     -Eric Myers
-
-
-				 -*-*-
-
-/***********************************************************
- *  Hello, BOINC World!
- *  
- * This is the Hello World program for BOINC.  It is the simplest application
- * that one can write which uses the BOINC API and writes some output to a
- * file (called "out").   See the sample workunit and result templates to 
- * see how this file is mapped to a real file and how  it is uploaded.
- *
- * Eric Myers <myers at vassar.edu>  - 16 June 2004 (Unix) and 6 July 2004 (Win)
- * Department of Physics and Astronomy, Vassar College, Poughkeepsie, New York
- * @(#) Version: 3.12
- */
-
-
-//  Stuff we only need on Windows: 
-#ifdef _WIN32
-  #include "boinc_win.h"
-#endif
-
-#include "boinc_api.h"		// 
-#include "filesys.h"		// boinc_fopen(), etc...
-#include "util.h"               // parse_command_line(), boinc_sleep()
-
-
-
-int main(int argc, char **argv) {
-    int rc;
-    char resolved_name[512];
-    FILE* f;
-
-
-    // All BOINC applications must initialize the BOINC interface:
-
-    rc = boinc_init();
-    if (rc){
-      fprintf(stderr, "APP: boinc_init() failed.\n");
-      exit(rc);
-    }
-        
-
-    // input and output files need to be "resolved" from their logical name
-    // for the app to the actual path on the client disk
-
-    rc = boinc_resolve_filename("out", resolved_name, sizeof(resolved_name));
-    if (rc){
-      fprintf(stderr, "APP: cannot resolve output file name.\n");
-      exit(boinc_finish(rc));
-    }
-
-
-    // Then open the file with boinc_fopen() not just fopen()
-
-    f = boinc_fopen(resolved_name, "w");
-        
-
-    // Write some output to the file 
-
-    fprintf(f, "Hello, BOINC World!\n");
-
-
-    // Now run up a little credit..
-
-    { int j, num;
-      fprintf(f, "Stress test begins...\n");
-	  for (j=0;j<123456789;j++){ num=rand(); }
-      fprintf(f, "Stress test ends...\n");
-    }
-
-    fclose(f);
-
-    // All BOINC applications must exit via boinc_finish(rc), not merely exit
-
-    boinc_finish(0);       /* should not return */
-    return 47;
-}
-
-
-
-
-/* Dummy graphics API entry points */
-
-void app_graphics_init() {}
-void app_graphics_resize(int width, int height){}
-void app_graphics_render(int xs, int ys, double time_of_day) {}
-void app_graphics_reread_prefs() {}
-void boinc_app_mouse_move(int x, int y, bool left, bool middle, bool right ){}
-void boinc_app_mouse_button(int x, int y, int which, bool is_down){}
-void boinc_app_key_press(int, int){}
-void boinc_app_key_release(int, int){}
-
-
-
-/* Windows entry point WinMain() */
-
-#ifdef _WIN32 
-
-/*******************************************************
- * Windows:  Unix applications begin with main() while Windows applications
- * begin with WinMain, so this just makes WinMain() process the command line
- * and then invoke main()
- */
-
-int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
-                   LPSTR Args, int WinMode)
-{
-    LPSTR command_line;
-    char* argv[100];
-    int argc;
-    
-    command_line = GetCommandLine();
-    argc = parse_command_line( command_line, argv );
-    return main(argc, argv);
-}
-
-#endif
diff --git a/doc/pc.jpg b/doc/pc.jpg
deleted file mode 100644
index 2ee3b93..0000000
Binary files a/doc/pc.jpg and /dev/null differ
diff --git a/doc/project.fig b/doc/project.fig
deleted file mode 100644
index b0ed72d..0000000
--- a/doc/project.fig
+++ /dev/null
@@ -1,175 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-0 32 #c7b696
-0 33 #effbff
-0 34 #dfcba6
-0 35 #414141
-0 36 #868286
-0 37 #c7c3c7
-0 38 #e7e3e7
-0 39 #8e8e8e
-0 40 #aeaaae
-0 41 #515551
-0 42 #414141
-0 43 #868286
-0 44 #c7c3c7
-0 45 #868286
-0 46 #c7c3c7
-0 47 #e7e3e7
-0 48 #8e8e8e
-0 49 #8e8e8e
-0 50 #414141
-0 51 #868286
-0 52 #c7c3c7
-0 53 #e7e3e7
-0 54 #414141
-0 55 #868286
-0 56 #c7c3c7
-0 57 #e7e3e7
-0 58 #868286
-0 59 #c7c3c7
-0 60 #e7e3e7
-0 61 #c7b696
-0 62 #effbff
-0 63 #dfcba6
-0 64 #c7b696
-0 65 #effbff
-0 66 #dfcba6
-0 67 #aeaaae
-0 68 #515551
-0 69 #8e8e8e
-0 70 #414141
-0 71 #868286
-0 72 #c7c3c7
-0 73 #e7e3e7
-0 74 #414141
-0 75 #868286
-0 76 #c7c3c7
-0 77 #e7e3e7
-0 78 #868286
-0 79 #c7c3c7
-0 80 #e7e3e7
-0 81 #414141
-0 82 #868286
-0 83 #c7c3c7
-0 84 #414141
-0 85 #c7c3c7
-0 86 #e7e3e7
-0 87 #414141
-0 88 #868286
-0 89 #c7c3c7
-0 90 #8e8e8e
-0 91 #414141
-0 92 #868286
-0 93 #c7c3c7
-0 94 #e7e3e7
-0 95 #414141
-0 96 #868286
-0 97 #c7c3c7
-0 98 #e7e3e7
-0 99 #bebebe
-0 100 #515151
-0 101 #000049
-0 102 #797979
-0 103 #303430
-0 104 #414541
-0 105 #414141
-0 106 #868286
-0 107 #c7c3c7
-0 108 #e7e3e7
-6 2100 4050 2775 4800
-2 1 0 1 0 3 50 0 20 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2400 4575 2400 4050
-4 0 0 50 0 16 14 0.0000 4 120 630 2100 4800 server\001
--6
-6 2100 5250 2625 6075
-2 1 0 1 0 3 50 0 20 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2400 5550 2400 6075
-4 0 0 50 0 16 14 0.0000 4 165 510 2100 5475 client\001
--6
-6 3225 4050 4650 4725
-2 2 0 1 0 11 50 0 20 0.000 0 0 -1 0 0 5
-	 3225 4050 4650 4050 4650 4725 3225 4725 3225 4050
-4 0 0 50 0 18 14 0.0000 4 210 1155 3375 4350 scheduling\001
-4 0 0 50 0 18 14 0.0000 4 120 660 3600 4575 server\001
--6
-6 6975 3975 8100 4725
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6975 3975 8100 3975 8100 4725 6975 4725 6975 3975
-4 0 0 50 0 18 14 0.0000 4 120 780 7125 4575 servers\001
-4 0 0 50 0 18 14 0.0000 4 165 450 7275 4275 data\001
--6
-6 8475 4050 9900 4725
-2 2 0 1 0 11 50 0 20 0.000 0 0 -1 0 0 5
-	 8475 4050 9900 4050 9900 4725 8475 4725 8475 4050
-4 0 0 50 0 18 14 0.0000 4 165 465 9000 4350 Web\001
-4 0 0 50 0 18 14 0.0000 4 165 1020 8700 4575 interfaces\001
--6
-6 5175 2175 6150 3450
-5 1 0 1 -1 -1 0 0 -1 0.000 0 1 0 0 5625.000 2625.000 5175 3225 5625 3375 6075 3225
-1 2 0 1 -1 11 0 0 20 0.000 1 0.0000 5646 2394 450 150 5196 2394 6096 2394
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 5175 2400 5175 3225
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6075 2475 6075 3225
-4 1 -1 0 0 18 12 0.0000 6 135 600 5625 2850 BOINC\001
-4 1 -1 0 0 18 12 0.0000 6 135 270 5625 3075 DB\001
--6
-2 2 0 1 0 30 50 0 20 0.000 0 0 -1 0 0 5
-	 9825 750 10350 750 10350 1200 9825 1200 9825 750
-2 2 0 1 0 11 50 0 20 0.000 0 0 -1 0 0 5
-	 9825 1350 10350 1350 10350 1800 9825 1800 9825 1350
-2 1 0 1 0 3 50 0 20 0.000 0 0 -1 1 1 2
-	0 0 1.00 60.00 120.00
-	0 0 1.00 60.00 120.00
-	 5550 6675 5550 7200
-2 1 1 1 0 3 50 0 20 4.000 0 0 -1 0 0 2
-	 2700 5025 9600 5025
-2 2 0 1 0 11 50 0 20 0.000 0 0 -1 0 0 5
-	 4214 6300 6975 6300 6975 6675 4214 6675 4214 6300
-2 2 0 1 0 30 50 0 20 0.000 0 0 -1 0 0 5
-	 4214 5550 6975 5550 6975 6300 4214 6300 4214 5550
-2 2 0 1 0 11 50 0 20 0.000 0 0 -1 0 0 5
-	 3600 7200 8850 7200 8850 8100 3600 8100 3600 7200
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 7575 7200 7575 4725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 9900 6225 9225 4725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3900 7200 3900 4725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4200 4050 5325 3300
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 8850 4050 6075 3225
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5625 1650 5625 2250
-2 2 0 1 0 11 50 0 20 0.000 0 0 -1 0 0 5
-	 4350 1200 7650 1200 7650 1650 4350 1650 4350 1200
-2 2 0 1 0 30 50 0 20 0.000 0 0 -1 0 0 5
-	 4350 750 7650 750 7650 1200 4350 1200 4350 750
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 6825 1650 7500 4050
-4 0 0 50 0 16 14 0.0000 4 210 2775 10500 1200 project-specific components\001
-4 0 0 50 0 16 14 0.0000 4 210 1920 10500 1800 BOINC components\001
-4 0 0 50 0 18 14 0.0000 4 210 1785 4751 6000 application client\001
-4 0 0 50 0 18 14 0.0000 4 165 990 4981 6600 client API\001
-4 0 0 50 0 18 14 0.0000 4 165 1095 5550 7725 core client\001
-4 0 0 50 0 18 14 0.0000 4 210 1245 9450 6525 participants\001
-4 0 0 50 0 18 14 0.0000 4 210 2355 2325 3675 BOINC server complex\001
-4 0 0 50 0 18 14 0.0000 4 210 1740 2400 900 project back end\001
diff --git a/doc/result.fig b/doc/result.fig
deleted file mode 100644
index f1352d4..0000000
--- a/doc/result.fig
+++ /dev/null
@@ -1,37 +0,0 @@
-#FIG 2.1
-80 2
-6 244 79 534 364
-6 279 149 344 179
-2 2 0 1 -1 0 0 0 0.000 0 0 0
-	 344 179 344 149 279 149 279 179 344 179 9999 9999
-4 0 0 12 0 -1 0 0.00000 4 16 48 289 169 UNSENT
--6
-6 264 234 359 264
-2 2 0 1 -1 0 0 0 0.000 0 0 0
-	 359 264 359 234 264 234 264 264 359 264 9999 9999
-4 0 0 12 0 -1 0 0.00000 4 16 81 274 254 IN_PROGRESS
--6
-6 284 334 334 364
-2 2 0 1 -1 0 0 0 0.000 0 0 0
-	 334 364 334 334 284 334 284 364 334 364 9999 9999
-4 0 0 12 0 -1 0 0.00000 4 16 33 289 354 OVER
--6
-2 1 0 1 -1 0 0 0 0.000 -1 1 0
-	0 0 1.000 4.000 8.000
-	 309 79 309 149 9999 9999
-2 1 0 1 -1 0 0 0 0.000 -1 1 0
-	0 0 1.000 4.000 8.000
-	 309 179 309 234 9999 9999
-2 1 0 1 -1 0 0 0 0.000 -1 1 0
-	0 0 1.000 4.000 8.000
-	 309 264 309 334 9999 9999
-2 1 0 1 -1 0 0 0 0.000 -1 1 0
-	0 0 1.000 4.000 8.000
-	 279 164 244 164 244 349 284 349 9999 9999
-4 0 0 12 0 -1 0 0.00000 4 16 26 324 109 initial
-4 0 0 12 0 -1 0 0.00000 4 16 143 329 309 scheduler gets reply from host
-4 0 0 12 0 -1 0 0.00000 4 16 203 329 328 or now > report_deadline in timeout_check
-4 0 0 12 0 -1 0 0.00000 4 16 124 319 204 scheduler sends this result
--6
-4 0 0 12 0 -1 0 0.00000 4 16 152 84 269 or timeout_check: WU has error
-4 0 0 12 0 -1 0 0.00000 4 16 193 44 249 validate: got canonical result for this WU
diff --git a/doc/server.jpg b/doc/server.jpg
deleted file mode 100644
index 87ae9c2..0000000
Binary files a/doc/server.jpg and /dev/null differ
diff --git a/doc/setiathome.jpg b/doc/setiathome.jpg
deleted file mode 100644
index 75a032b..0000000
Binary files a/doc/setiathome.jpg and /dev/null differ
diff --git a/doc/ssl_client_release_instructions.txt b/doc/ssl_client_release_instructions.txt
deleted file mode 100644
index 0620587..0000000
--- a/doc/ssl_client_release_instructions.txt
+++ /dev/null
@@ -1,182 +0,0 @@
-Generating and releasing core client installers
-
-
-
-<verno> represents the new version number.
-At the time of this update, the latest version was 2.17,
-so the new version number would be 2.18.
-Substitute 2.18 everywhere you see <verno>
-
-Required:
-  Unix/Linux/Mac:
-    These machines should have everything you need by default, but make
-    sure you have the following:
-       gmake
-       gcc 3.3 - especially on the Mac
-       autoconf (v2.54 or greater)
-       screen - this is useful for managing the builds and tests on
-                all *nix platforms
-  Windows:
-    Visual C++ 7.0
-    InstallShield 5.5 Pro
-    InstallShield Package for the Web v2
-
-    boinc\win_build\installer\Media folder
-
-Administrivia:
-    do this on a unix machine:
-    (note: the make in your default path must be gmake
-    IN BOTH YOUR NORMAL SHELL AND SH
-    or else set-version will fail towards the end)
-
-    Check out a new copy of the BOINC source tree
-    Make an entry in checkin_notes w/ platforms, version#
-
-    Set the version number:
-        see clien/win/win_config.h to find last version#
-        (or look on web site)
-
-        % ./set-version <verno>
-        (this revises client/win/win_config.h, makefile.in's)
-        % cvs commit -m 'version <verno>'
-
-    Make a source tarball and zip:
-        % make dist
-            (if you have problems here, such as the make choking on
-            emacs save files, try "make -i dist")
-        % cp boinc-<verno>.tar.gz boinc-<verno>.zip ~davea/boinc/doc/source/
-
-Build
- Windows:
-    NOTE: currently we are distributing the debug version of the core client.
-    This is reflected in:
-        - where you copy dbghelp.dll to
-        - the "File Groups" tab of Installshield (link type)
-
-    Use the HP Kayak windows box (bart) in 329 or the Dell (skinner) in 325.
-
-    set up:
-        check out new source tree
-        copy Media.zip into win_build/installer; unzip
-        make sure "Media" is at top level of installer
-        Right-click on top BOINC folder;
-        CVS/preferences/policy; clear "prune empty folders" checkbox
-        copy "client/win/dbghelp.dll" to "win_build/Build/Debug"
-
-    Open 'BOINC'
-
-    Right click in the folder; select 'cvs update'
-    resolve any M(erge) problems
-
-    Open 'win_build'
-
-    Open 'BOINC.sln'  (or .dsw if VC6.0)
-
-    in the visual c++ menu, pick
-        Build->Clean solution
-        Build->build solution
-          the exe will be in win_build\Build\Debug
-
-    Open 'win_build/installer'
-
-    open 'BOINC.ipr' (installshield project)
-
-    in the installshield menu, pick
-        Build->Media->Build Default Media
-        [bonus: automate this process]
-    exit installshield
-    
-    open 'BOINC.pfw' (package for the web project)
-       build everything, changing only the version numbers
-       [note: there are nine screens to go through. the version
-              numbers are on screen #1 and screen #9. Do not
-              change anything else]
-       [bonus: automate this process]
-
-        The new windows installer (BOINC_<verno>_intelx86_windows.exe)
-        will be left in this folder when you exit Package for the Web
-
-    Do a CVS commit of win_build/installer/BOINC.pfw (to get version#, year)
-        (possibly)
-
-    SFTP to boincadm at koloth:
-
-    copy BOINC_<verno>_intelx86_windows.exe to the projects/AstroPulse_Beta/apps/boinc directory
-
-
- Linux/Solaris:
-    use these hosts:
-       Linux: milhouse
-       solaris2.7: milkyway
-
-    note 1: The solaris 2.7 build should be statically linked, and should support
-            solaris 2.7-2.9
-
-    do a clean check out; compile; copy to koloth:
-        % cd ~
-        % mkdir proj
-        % cd proj
-        % mkdir <platform name>
-        % cd <platform name>
-        % cvs co boinc
-        % cd boinc
-        % ./configure && make
-            (tee to a file if you want to look at logs later)
-        % scp client/boinc_<verno>_<platform>.gz boincadm at koloth:projects/AstroPulse_Beta/apps/boinc/
-
-    [bonus: automate this process]
-
- Mac OS X:
-    use the G3 OS X 10.2 mac in 329 (setisf2):
-
-    note:  The mac os x build is identical to the unix/linux builds, except that
-           the configure step requires the --build argument to set a generic
-           host type (see below). The mac os x client will run on either os x
-           10.2 or 10.3 [10.1 or earlier is not supported])
-
-    do a clean check out; compile; copy to koloth:
-        % cd ~
-        % mkdir proj
-        % cd proj
-        % cvs co boinc
-        % cd boinc
-        % ./configure --build=powerpc-apple-darwin
-        % make
-        % cd client
-        % rename  boinc_<verno>_<plat>.gz to b_<verno>_<plat>.gz
-            (to work around Mac IE 31-char filename bug)
-        % scp b_<verno>_*.gz boincadm at koloth:projects/AstroPulse_Beta/apps/boinc/
-
-    Note1: This same technique applies to building the setiathome application.
-    Note2: The .gz filename is longer than the maximum filename length imposed
-           by some macintosh browsers, such as IE and Safari (this limit was
-           left over from OS 9, and doesn't exist in OS X. Why the OS X browsers
-           continue to enforce it is a mystery). For the next release and going
-           forward, we should change the os x .gz file name to something shorter,
-           such as boinc_<verno>_OSX.gz (but leave the platform name the same
-           as before: powerpc-apple-darwin). This will solve a lot of download
-           problems for mac users.
-
-    [bonus: automate this process]
-
-Test
- Test the installer(s) and start the new version on each test machine:
-   Solaris 2.7 - milkyway
-   Solaris 2.8 - kodos
-   Solaris 2.9 - setisf1
-   Linux - shaggy
-   Mac OS X 10.2 - setisf2
-   Mac OS X 10.3 - seti2
-   WinXP - bart (329) or skinner (325)
-   Win2K - kent (Aaron's desk)
-   Win98 - marge [aka drake] (Matt's desk)
-
-If all is well...
-
-Update the server:
-    ssh boincadm at koloth
-    cd projects/Astropulse_Beta/bin
-    ./update_versions
-    ./stop
-    ./start
-
diff --git a/doc/stripchart.txt b/doc/stripchart.txt
deleted file mode 100644
index 75f5eb9..0000000
--- a/doc/stripchart.txt
+++ /dev/null
@@ -1,333 +0,0 @@
-Stripchart version 2.0
-----------------------
-Author: Matt Lebofsky
-        BOINC/SETI at home - University of California, Berkeley
-        mattl at ssl.berkeley.edu
-        
-Date of recent version: November 4, 2002
-
-Requirements:
-  * a gnuplot with the ability to generate gifs
-  * perl 
-  * apache or other cgi-enabled web browser
-
-Send all thoughts and queries to: mattl at ssl.berkeley.edu
-
-This software is free to edit, distribute and use by anybody, as long as
-I get credit for it in some form or another. Thanks.
-----------------------
-
-Contents:
-
-I. Some questions and answers
-II. So how does it work?
-III. Known bugs, things to do, etc.
-
-----------------------
-I. Some questions and answers
-
-Q: What is stripchart?
-
-A: Well, it's actually two relatively small perl programs:
-
-   1. stripchart
-   
-      stripchart reads in time-based user data and, depending on a flurry of
-      command line options, generates a web-friendly .gif plotting the data.
-      The user can supply the time range, the y axis range, even the color
-      scheme, and more.
-
-   2. stripchart.cgi
-
-      stripchart.cgi is a web-based GUI interface that allows users to easily
-      select multiple data sources and various parameters to plot, allowing
-      fast comparisons without having to deal with a command line interface.
-
-Q: Why do you bother writing this program?
-
-A: Working as a systems administrator (amongst other things) for SETI at home,
-   we kept finding ourselves in dire problem-solving situations, i.e. Why
-   did the database stop working? Why is load on our web server so high? 
-      
-   So we started collecting data in flat files, keeping track of server
-   loads, database checkpoint times, even CPU temperatures. When these files
-   grew too large and unwieldy, I found myself writing (and rewriting) simple
-   scripts to generate plots on this data. Sick of constant revision whenever
-   a new problem arose, I wrote stripchart version 1.0.
-
-   Its usefulness became immediately apparent when I added on stripchart.cgi.
-   I couldn't bear to teach everybody the many command line options to 
-   stripchart, so I wrote this CGI to do all the dirty work. Suddenly we were
-   able to line up several plots, look for causes and effects, or just enjoy
-   watching the counts in our database tables grow to impossibly high numbers.
-
-   The SETI at home network has proven to be a delicate system, and keeping track
-   of all the data server, user, and web statistics has proven to be quite a
-   life saver. So when BOINC came around we felt that any project aiming to
-   embark on a similar project may need this tool. So I rewrote stripchart to
-   be a bit more friendly and general. 
-
-Q: Why don't you make .pngs or .jpgs instead of .gifs? The latest gnuplot
-   doesn't support .gifs.
-
-A: Basically gnuplot support for other graphic file formats isn't as good. For
-   example, you cannot control exact window size, font size, and colors unless
-   you make .gifs. I'm not exactly sure why this is the case, but there you have it.
-   Anywho, you can find older gnuplot distributions out there - you'll need to
-   get the gd libs first, by the way.
-
-----------------------
-II. So how does it work?
-
-You can use stripchart as a stand alone command-line program to produce plots
-whenever you like, but we highly recommend using it in conjunction with the
-stripchart.cgi for ease of use. But here's how to do it both ways.
-
-stripchart (stand alone)
-
-Before anything, look at the section GLOBAL/DEFAULT VARS in the program
-stripchart and see if you need to edit anything (usually pathnames to
-executables and such).
-
-Let's just start with the usage (obtained by typing "stripchart -h"):
-
-stripchart: creates stripchart .gif graphic based on data in flat files
-options:
-  -i: input FILE      - name of input data file (mandatory)
-  -o: output FILE     - name of output .gif file (default: STDOUT)
-  -O: output FILE     - name of output .gif file and dump to STDOUT as well
-  -f: from TIME       - stripchart with data starting at TIME 
-                        (default: 24 hours ago)
-  -t: to TIME         - stripchart with data ending at TIME (default: now)
-  -r: range RANGE     - stripchart data centered around "from" time the size
-                        of RANGE (overrides -t)
-  -l: last LINES      - stripchart last number of LINES in data file
-                        (overrides -f and -t and -r)
-  -T: title TITLE     - title to put on graphic (default: FILE RANGE)
-  -x: column X        - time or "x" column (default: 2)
-  -y: column Y        - value or "y" column (default: 3)
-  -Y: column Y'       - overplot second "y" column (default: none)
-  -b: baseline VALUE  - overplot baseline of arbitrary value VALUE
-  -B: baseline-avg    - overrides -b, it plots baseline of computed average
-  -d: dump low VALUE  - ignore data less than VALUE
-  -D: dump high VALUE - ignore data higher than VALUE
-  -v: verbose         - puts verbose runtime output to STDERR
-  -L: log             - makes y axis log scale
-  -c: colors "COLORS" - set gnuplot colors for graph/axis/fonts/data (default:
-                        "xffffff x000000 xc0c0c0 x00a000 x0000a0 x2020c0"
-                        in order: bground, axis/fonts, grids, pointcolor1,2,3)
-  -C: cgi             - output CGI header to STDOUT if being called as CGI
-  -s: stats           - turn extra plot stats on (current, avg, min, max)
-  -j: julian times    - time columns is in local julian date (legacy stuff)
-
-notes:
-  * TIME either unix date, julian date, or civil date in the form:
-      YYYY:MM:DD:HH:MM (year, month, day, hour, minute)
-    If you enter something with colons, it assumes it is civil date
-    If you have a decimal point, it assumes it is julian date
-    If it is an integer, it assumes it is unix date (epoch seconds)
-    If it is a negative number, it is in decimal days from current time
-      (i.e. -2.5 = two and a half days ago)
-    * All times on command line are assumed to be "local" times
-    * All times in the data file must be in unix date (epoch seconds)
-  * RANGE is given in decimal days (i.e. 1.25 = 1 day, 6 hours)
-  * if LINES == 0, (i.e. -l 0) then the whole data file is read in
-  * columns (given with -x, -y, -Y flags) start at 1
-  * titles given with -T can contain the following key words which will
-    be converted:
-      FILE - basename of input file
-      RANGE - pretty civil date range (in local time zone)
-    the default title is: FILE RANGE
-
-...okay that's a lot to ingest, but it's really simple. Let's take a look at an
-example (you'll find in the samples directory two files get_load and crontab).
-
-You have a machine that you want to monitor it's load. Here's a script that
-will output a single line containing two fields for time and the third with the
-actual data. For example:
-
-2002:11:05:12:51 1036529480 0.25
-
-The first field is time in an arbitrary human readable format
-(year:month:day:hour:minute), the second in epoch seconds (standard
-unix time format - the number of seconds since 00:00 1/1/1970 GMT),
-and the third is the load at this time.
-
-And we'll start collecting data every five minutes on this particular machine
-by add such a line to the crontab:
-
-0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/stripchart/samples/get_load >> /disks/matt/data/machine_load
-
-So the file "machine_load" will quickly fill with lines such as the above.
-Now you may ask yourself - why two columns representing time in two different
-formats? Well sometime you just want to look at the data file itself, in which
-case the human-readable first column is quite handy to have around, but when
-making linear time plots, having time in epoch seconds is much faster to
-manipulate. So generally, we like to have at least the two time fields first,
-and the actual data in the third column. That's what stripchart expects by
-default.
-
-Note: stripchart will understand time in both epoch seconds and julian date.
-If the second time field is in julian date, you should supply the command line
-flag "-j" to warn stripchart so it knows how to handle it. 
-
-Okay. So you have this data file now. A very common thing to plot would be the
-data over the past 24 hours. Turns out that's the default! If you type on the
-command line:
-
-stripchart -i machine_load -o machine_load.gif
-
-you will quickly get a new file "machine_load.gif" with all the goods.
-
-Note: you always have to supply an input file via -i. If you don't supply
-an output file via "-o" it .gif gets dumped to stdout. If you supply an
-output file via "-O" the output is stored in both the file and to stdout.
-
-Now let's play with the time ranges. You can supply times in a variety of
-formats on the command line:
-
-   "civil date" i.e. 2002:11:05:12:51 (YYYY:MM:DD:hh:mm)
-   "epoch seconds" i.e. 1036529480
-   "julian date" i.e. 2452583.52345
-
-You can supply a date range using the -f and -t flags (from and to):
-
-stripchart -i machine_load -f 2002:11:01:00:00 -t 2002:11:04:00:00
-
-Usually the "to" time is right now, so you can quickly tell stripchart
-to plot starting at some arbitrary time "ago." This is done also via the
-"-f" flag - if it's negative it will assume you mean that many decimal
-days from now as a starting point. So "-f -3.5" will plot from 3 and a
-half days ago until now.
-
-You can also supply a "range" centered around the from time. For example,
-to plot the 24 hours centered around 2002:11:01:13:40:
-
-stripchart -i machine_load -f 2002:11:01:13:40 -r 1
-
-On some rare occasions you might want to plot the last number of lines
-in a file, regardless of what time they were. If you supply the number
-of lines via the "-l" flag, it overrides any time ranges you may have
-supplied.
-
-Moving on to some other useful flags in no particular order:
-
-To change the default title (which is the basename of the file and
-the time range being plotted), you can do so via the "-T" command.
-Make sure to put the title in quotes. Within the title string the
-all-uppercase string "FILE" will be replaced with the file basename,
-and the string "RANGE" will be replaced by the time range. So in
-essence, the default title string is "FILE RANGE".
-
-If you have data files in different formats, you can specify the data
-columns using the "-x" and "-y" flags. By default -x is 2 and -y is 3.
-Sometimes we have datafiles with many columns so we actively have to tell
-stripchart which is the correct data column.
-
-However, you might want to overplot one column on top of another. If your
-data file has a second data column, you can specify what that is via the
--Y flag, and this data will be overplotted onto the data from the first
-data column.
-
-Sometime you want to plot a horizontal rule or a "baseline". You can
-turn this feature on by specifying the value with the "-b" flag. If you
-use the "-B" flag (without any values) it automatically computes the
-average over the time range and plots that as the baseline. Simple!
-
-If you want to excise certain y values, you can do so with the dump
-flags, i.e. "-d" and "-D". In particular, any values lower than the one
-supplied with "-d" will be dumped, and any values higher supplied by
-"-D" will be dumped. 
-
-To log the y axis, use the "-L" flag. Quite straightforward.
-
-A very useful flag is "-s" which outputs a line of stats underneath
-the plot title. It shows the current value, and the minimum, maximum
-and average values during the plot range.
-
-For verbose output to stderr, use the "-v" flag. It may not make much
-sense, but it's useful for debugging.
-
-Using the "-C" flag causes stripchart to spit out the "Content-type"
-lines necessary for incorporating stripchart plots into CGIs. This
-doesn't work so well now, but there it is.
-
-Okay. That's enough about the flags, and hopefully enough to get you
-playing around with stripchart and plotting some stuff. Now onto:
-
-stripchart.cgi
-
-First and foremost, you need to do the following before running the
-CGI version of stripchart:
-
-1. Put stripchart.cgi in a cgi-enabled web-accessible directory
-2. Make a "lib" directory somewhere that the web server can read/write to
-3. Edit stripchart.cgi GLOBAL/DEFAULT VARS to point to proper paths, including
-   the files "querylist" and "datafiles" in the aforementioned "lib" directory.
-4. Edit the "lib/datafiles" file to contain entries for all your data files.
-   You can find an example datafiles in the samples directory. Follow the
-   instructions in the comment lines, adding your entries below the header.
-
-That should be it, I think. Now go to the URL wherever your stripchart.cgi
-is sitting. If all is well..
-
-You will be immediately presented with a web form. Ignore the "select query"
-pulldown menu for now. Underneath that you will see a line:
-
-Number of stripcharts: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
-
-By default stripchart.cgi presents you with the ability to plot 4 simultaneous
-stripcharts, but you can select any number 1-20 by clicking on those numbers.
-The less plots, the faster a web page gets generated.
-
-For each plot, you get a pull down menu which should contain all the entries
-you already put in "datafiles". Here you are selecting your data source.
-
-Then you can select the time of time range: last x hours, last x days, or
-an arbitrary date range. By default the last x hours radio button is selected -
-to pick another type of time range make sure you select the radio button
-before it. Then enter the range via the pull down menus.
-
-Then you get a simple list of checkbox/input options. You can check to log
-the y axis, baseline the average, baseline an arbitrary value (which you
-enter in the window, enter a y minimum, or enter a maximum. 
-
-When everything is selected, click on the "click here" button to plot.
-Depending on the speed of your machine, you should soon be presented with
-all the plots your desired, and the form underneath the plots which can
-edit to your heart's content. If you want to reset the form values, click
-on the "reset form" link.
-
-Note the "save images in /tmp" checkbox. If that is checked and you plot
-the stripcharts, numbered .gif files will be placed in /tmp on the web
-server machine so you can copy them elsewhere (files will be named:
-stripchart_plot_1.gif, etc.).
-
-On the topmost "click here" button you will note an "enter name to save
-query" balloon. If you enter a name here (any old string) this exact query
-will be saved into the "querylist" file which will then later appear in the
-pulldown menu at the top. That way if you have a favorite set of diagnostic
-plots which you check every morning, you don't have to enter the entire form
-every time.
-
-If you want to delete a query, enter the name in that same field but click
-the "delete" checkbox next to it. Next time you "click here" the query will
-be deleted.
-
-----------------------
-III. Known bugs, things to do, etc.
-
-* stripchart -C flag is kind of pointless and doesn't work in practice.
-* plots on data collected over small time ranges (points every few seconds, for
-  example) hasn't been tested.
-* plots that don't work via stripchart.cgi either show ugly broken image icons
-  or nothing at all - either way it's ungraceful.
-* pulldown menus and various plots sometimes need to be refreshed via a hard
-  refresh (i.e. shift-refresh). 
-* this readme kinda stinks.
-* and many many other issues I'm failing to detail now!
-
-If you have any problems using the product, feel free to e-mail me at:
-
-	mattl at ssl.berkeley.edu
-
diff --git a/doc/stripchart_data.php b/doc/stripchart_data.php
deleted file mode 100644
index 711b0d3..0000000
--- a/doc/stripchart_data.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-require_once("docutil.php");
-page_head("Stripchart data");
-echo "
-
-<ul>
-<li> CPU load
-<li> number of users
-<li> number of results
-<li> number of results sent
-<li> number of results returned
-<li> disk usage
-<li> connections/second
-<li> network bandwidth
-</ul>
-";
-page_tail();
-?>
diff --git a/doc/taufer.txt b/doc/taufer.txt
deleted file mode 100644
index 63438e9..0000000
--- a/doc/taufer.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-To start, unzip the file. You will find:
-
-app/sfe1    # containing the simple (silly) FORTRAN example sfi1
-       # cboincfinish.cpp, cboincinit.cpp and
-       # cboincresolvefilename.cpp are the wrappers
-       # sfe1.f90 and strlng.f90 are part of the example code. sfe1 call the
-       # wrappers listed above
-include       # containing *.h and the new file C_boinc.h
-lib           # containing the final BOINC libraries CBOINC.lib and
-              # CBOINC_D.lib (debug version)
-src           # containing the original BOINC source needed and C_boinc.cpp
-              # (my C API)
-win_BOINC/CBOINC/CBOINC.dsw   # project workspace with library source
-                              # and example source (START FROM HERE!!!)
-testSFE1      # test directory for testing the example (nothing important!)
-
-To compile, I used VS 6 and Intel Visual Fortran 7.1.
diff --git a/doc/ui.txt b/doc/ui.txt
deleted file mode 100644
index 3c154f3..0000000
--- a/doc/ui.txt
+++ /dev/null
@@ -1,316 +0,0 @@
-User setup experience
----------------------
-
-This document describes the user experience in
-the new BOINC setup procedure
-(i.e., setting up BOINC for the first time on a computer,
-or attaching to a project from a running client).
-
-The design has the following advantages
-relative to the old setup procedure:
-
-1) Simplicity.
-The user interaction is simpler in all cases.
-The user doesn't have to
-deal with the authenticator in the average case,
-there's no reliance on email,
-and no need to pre-create an account on a web site.
-
-2) Resolution of common problems up front.
-In particular, is a host uses a proxy,
-the setup process figures this out and
-tells the user what to do,
-rather than erroring out and requiring the
-user to figure out what's going on.
-
-This document does NOT describe the implementation.
-(that's in ui_impl.txt).
-I've used function notation here only because there is some overlap
-between the various cases.
-
-
-A) Project-specific installer case
---------------------------------
-
-- Get installer for project (PROJ_URL)
-	either by downloading from site or on project-specific CD-ROM
-
-- Run installer
-
-- Manager starts up, opens window
-
-- If there is not already an account for PROJ_URL
-	call attach_to_project(PROJECT_URL, false)
-
---------------------
-
-B) Generic installer case
-
-1) user gets generic installer from boinc.berkeley.edu
-	or on CD-ROM
-
-2) run installer
-
-3) manager starts up, opens window
-
-4) if there are no accounts
-	call get_url_and_attach()
-
-----------------------
-
-C) "Attach to new project" case
-
-1) call get_url_and_attach()
-
-=======================================================
-
-function get_url_and_attach()
-
-1) Dialog:
-
-Enter the URL of a BOINC-based project: _____________ (text field)
-
-For more information, and to see a list
-of some BOINC-based projects, go to
-http://boinc.berkeley.edu [link]
-
-OK [button]
-Cancel [button]
-
-2) if OK:
-call attach_to_project(PROJ_URL, true)
-
--------------------------
-
-function attach_to_project(PROJ_URL, bool user_supplied_url)
-
-1) Dialog ("query_key"):
-
-	Attaching to PROJ_URL.
-	Do you already have an account key for PROJ_URL?
-    (example:  0123abc...)
-
-	No - create new account key [button]
-	Yes [button]  paste account key here: ______________________ [text field]
-				  How to find an existing account key [button]
-    Cancel
-
-Dialog (how to find an existing account key):
-
-	Each account on PROJ_URL has an "account key".
-	An account key is a string of 32 random characters.  For example:
-		xxxx
-	There are two ways to find an account key:
-	1) On the computer where you created the account,
-		- run the BOINC Manager,
-		- select this project in the Projects tab,
-		- click on the Account Key button.
-	2) If you entered an email address for the account,
-		the account key was sent to you in an email message
-		(you can request another email by going
-        here [link to PROJ_URL/get_passwd.php]
-
-	Copying an account key by hand is prone to errors.
-	We recommend that you transfer the account key in a file or email message
-	to the computer where it is needed,
-	and then copy and paste it into the BOINC Manager.
-
-	Close [button] (closes dialog, returns to query_key)
-
-If answer to 1) is "no":
-
-OPTIONAL: dialog
-    "We will now create a new account for you.
-    This account will not inherit the credit from any
-    previous account you may have created.
-    If you're not sure if you already have an account,
-    click here for instructions on how to get its account key:
-    Instructions [button]
-
-    Otherwise click OK to continue.
-    OK [button]
-
-
-2) BOINC client tries to communicates with project, create account
-
-3) if succeed in creating account
-Dialog ("welcome"):
-
-	Welcome to PROJ_NAME
-	Your web browser should now show a
-	form for entering your name and email.
-	If you don't see this form, check your browser settings,
-	visit PROJ_URL [link] and click on My Account.
-
-	Close [button]
-
-Web page (foo.edu/welcome.php?auth=xxxxx)
-
-	Welcome to PROJ_NAME.
-
-	Your new account has a name and optional email address.
-	You can changes these if you like:
-	Name: xxx (the user's account name on host)
-	(this will be shown on our web site)
-	Email address:
-	(this will not be displayed or distributed)
-	OK to send periodic email newsletters [checkbox]
-	Update [button]
-
-	Foo at home will use processing time and disk space on your computer,
-	and will periodically make Internet connections.
-	You can control a number of 'settings' that limit these activities.
-	The default settings are OK for most people.
-	To view or modify your settings, click here [link]
-
-	You can also keep track of your computers and work totals,
-	find answers to common problems,
-	exchange messages with other users,
-	and create a "profile" of yourself
-	(including a picture, if you like)
-	that other participants can see.
-	To access these features,
-	go to the Foo at home home page [link]
-
-
-	Notes:
-		- update button goes to a "account info updated" page
-		- if email address already exists, show
-			"An account with that email address already exists.
-
-
-
-(User is done)
-
-
-4) if project replies with an error message:
-
-Dialog ("project_unavailable"):
-
-	PROJ_NAME is temporarily unavailable.
-	Please check PROJ_URL [link] for information.
-	To try again later, select the "Projects" tab,
-	and click on "Attach to new project".
-
-	OK [button]
-
-Go to Projects tab.
-user is done.
-
-5) If no connection failure or no reply
-	retry = network_failure()
-	if (retry) go to 2
-
-
-If answer to 4) is "yes":
-
-10) if account key is syntactically invalid
-
-Dialog ("invalid_key"):
-
-	The account key xxx is invalid.
-	Account keys are 32 characters, each of which is a-f or 0-9.
-	Please reenter the key.
-
-	OK [button]
-
-11) If project is up, and account key is verified
-
-Dialog ("valid_key"):
-	Account key is valid.
-	This computer is now participating in Foo at home.
-
-	OK [button]
-
-User is done.
-
-12) If project is up, and account key is not verified
-Dialog ("unrecognized_key"):
-	xxx is not the key of any existing account on Foo at home.
-	Account keys from other BOINC projects will not work on Foo at home.
-	Please check your account key.
-
-	OK [button]
-
-Go to 4
-
-13) if project replies with an error message:
-
-Dialog ("project_unavailable"):
-
-	Foo at home is temporarily unavailable.
-	Please check http://foo.edu [link] for information.
-	To try again later, select the "Projects" tab,
-	and click on "Attach to new project".
-
-	OK [button]
-
-Go to Projects tab.
-user is done.
-
-14) else (if no reply): call network_failure(user_supplied_url)
-
-----------------
-
-function network_failure(bool user_supplied_url):
-
-(called when an operation to a project failed to connect
-or got no reply.
-Returns true if we should retry the operation.)
-
-Dialog ("unable_to_contact"):
-
-	BOINC is unable to contact PROJ_URL
-	Possible reasons are:
-
-	1) You may need to tell BOINC your proxy settings.
-	We are opening a web page with instructions for how to do this.
-
-	Change proxy settings now [button]
-
-	2) You may be running network security software that is
-	blocking BOINC's network access.
-	Unblock BOINC and click Retry.
-
-	3) There may be a network problem
-	or the PROJ_URL servers may be down.
-	(In either case your web browser will show
-	an error for the proxy instruction page).
-	To try again later, select the "Projects" tab,
-	and click on "Attach to new project".
-
-if User_supplied_url is true, add
-
-	3) You may have entered the project URL incorrectly.
-
-	Retry [button]
-	Cancel [button]
-
-If chose "change proxy settings"
-	put up Options dialog
-
-If chose Retry
-	return true
-
-If chose Cancel
-	return false
-
-Web page (PROJ_URL/proxy_problems.php)
-
-	Some computers access the Internet via "proxies".
-	In this case BOINC must be told the names and types
-	of these proxies in order to work correctly.
-
-	Since you are able to see this page,
-	your web browser already has the right proxy settings.
-	You can find these settings as follows:
-	Mozilla/FireFox:
-		Select "Preferences" in the Edit menu.
-		Then select Advanced/Proxies
-	Internet Explorer:
-		Select "Internet Options" in the Tools menu.
-		Select the "Connections" tab.
-		Click "LAN Settings".
-
-	You can change BOINC's proxy setting by selecting
-	the Options item in the Tools menu.
diff --git a/doc/ui_impl.txt b/doc/ui_impl.txt
deleted file mode 100644
index 7bfff35..0000000
--- a/doc/ui_impl.txt
+++ /dev/null
@@ -1,158 +0,0 @@
-Implementation notes
-
-------------------------------------------
-project-specific installers
-
-These produce a file "start_project.xml" containing the URL
-(and possibly the name) of the starting project in the BOINC directory.
-This file tells the BOINC manager to attach to this project.
-
-The file could be produced either of two ways:
-
-1) The file is part of the install bundle.
-This would require projects to edit the installers
-released by BOINC, using ORCA or whatever tools are needed
-
-2) The project URL is encoded in the installer filename,
-and the installer runs a script that finds this name
-and creates the file.
-(Not sure how easy this is to do)
-
-------------------------------------------
-Database
-
-Allow nulls in the email_addr table.
-Make it non-unique.
-
-------------------------------------------
-Web interfaces
-
-- "get account key" page can now return
-	multiple accounts with same email address
-	(show creation time, credit in email message)
-- can possibly provide interface for merging accounts
-	(but this is tricky and can wait)
-
-welcome.php?auth=xxx
-	shows welcome page (see doc)
-	and returns cookie with account key
-
-create_account.php
-in:
-	name
-out:
-	status
-	account key
-
-verify_account.php
-in:
-	acct key
-out:
-	yes/no
-	if yes:
-		name
-
-------------------------------------------
-Scheduler
-------------------------------------------
-GUI RPCs
-
-create_account();
-	in: URL
-	Implementation:
-		fetches URL/create_account.php
-poll_create_account();
-	returns status:
-		in_progress,
-		success,
-			returns account key in this case
-		project_down,
-		no_reply
-
-verify_account()
-	in: URL, key
-
-poll_verify_account()
-	returns status:
-		in_progress,
-		success,
-			returns yes/no, name in this case
-		project_down,
-		no_reply
-------------------------------------------
-Manager
-
-On startup:
-If start_project.xml exists
-	attach_to_project(url, false)
-
-attach_to_project(url/name, user_supplied_url) {
-restart:
-	switch(show_dialog(query_key)) {
-	yes:
-		if (invalid_key) {
-			show_dialog(invalid_key)
-			goto restart
-		}
-		verify_account(URL, key)
-		while (1)
-			ret = poll_verify_account()
-			if (!in_progress) break
-			sleep(1);
-		}
-		switch(ret) {
-		success/yes:
-			show_dialog(valid_key);
-			return;
-		success/no:
-			show_dialog(unrecognized_key);
-			goto restart;
-		error:
-			show_dialog(project_unavailable)
-		no_reply:
-			retry = network_failure()
-			if (retry) goto restart;
-		}
-	no:
-		name = get local account name on host
-retry:
-		gui_rpc.create_account()
-		while (1)
-			ret = poll_create_account()
-			if !in_progress break;
-			sleep(1);
-		}
-		switch(ret) {
-		success:
-			show_web_page(welcome.php?auth=acct_key)
-			show_dialog(welcome)
-			set tab to projects
-		project_down:
-			show_dialog(project_unavailable")
-			set tab to projects
-		no_reply:
-			retry = network_failure();
-			if (goto retry)
-			set tab to projects
-		}
-	cancel:
-	}
-}
-
-bool network_failure(bool user_supplied_url) {
-	show_web_page(url/proxy_problems.php)
-	ret = show_dialog(unable_to_contact)	
-	switch (ret) {
-	change:
-		show_dialog(proxy_settings)
-	retry:
-		return true;
-	cancel:
-		return false;
-	}
-}
-
-Miscellaneous:
-- Add a "account key" button in the Projects tab.
-	When clicked, it shows the account key
-	in a way that can be cut/pasted.
diff --git a/doc/validate_logic.txt b/doc/validate_logic.txt
deleted file mode 100644
index f5a7175..0000000
--- a/doc/validate_logic.txt
+++ /dev/null
@@ -1,135 +0,0 @@
-int check_set(
-  vector<RESULT> results,
-  DB_WORKUNIT&   wu,
-  int&           canonicalid,
-  double&        credit,
-  bool&          retry
-);
-
-Define N := length of result vector, and let M := N.
-
-check_set() will ALWAYS be called with N>=wu.min_quorum.
-
-check_set() will ALWAYS be called with ALL results satisfying
-    result.outcome == RESULT_OUTCOME_SUCCESS
-    result.validate_state == VALIDATE_STATE_INIT
-
-check_set() should NEVER modify wu [although it is not declared
-    const]
-
-[1] Syntax pass (optional)
-
- for (all N results) {
-
-   if (one or more of the result's output files can be read
-       and one or more of those files contains erroneous or
-       invalid or incorrect output, i.e. bad file syntax)
-   {
-     set result.outcome=RESULT_OUTCOME_VALIDATE_ERROR; 
-     set result.validate_state=VALIDATE_STATE_INVALID;
-     decrement counter: M = M-1;
-   } // erroneous or incorrect or invalid output files
-
-   else if (result has a potentially recoverable error,
-	    i.e. NFS directory not mounted, server
-	    is unreachable, upload server unreachable)
-   {
-     dont not modify result.validate_state;
-     dont not modify result.outcome;
-     decrement counter M = M-1;
-     set retry=true;
-   } // recoverable error
-   
-   else if (every output file of the result is unreadable or
-	    fails to exist)
-   {
-     set result.outcome=RESULT_OUTCOME_VALIDATE_ERROR;
-     set result.validate_state=VALIDATE_STATE_INIT;
-     decrement counter: M = M-1;
-   } // all result output files unreadable or nonexistent
-   
- } // end of syntax pass loop over all N results
-
- Define REMAINING RESULTS to be those that do NOT fall into one of
- the three categories above. There are M of these. If the syntax pass
- has been skipped, then M == N.
-
- if (M < wu.min_quorum)
- {
-   don't modify canonicalid;
-   don't modify credit;
-   leave retry as set above;
-   leave result.outcome unchanged for M remaining results;
-   leave result.validate_state unchanged for M remaining results;
-   return 0;
- } // fewer than min_quorum results remain
-
- At any point in this process, if a major error occurs, check_set()
- should return nonzero.  This will cause the validator to exit.  If
- this happens, it does not matter how you have set or modified
- result.outcome, result.validate_state, retry, credit, or canonicalid.
-
-// END OF OPTIONAL SYNTAX PASS
-
-
-[2] Comparison pass (required).  We have
-    M>=wu.min_quorum REMAINING RESULTS results with
-      result.outcome == RESULT_OUTCOME_SUCCESS
-      result.validate_state == VALIDATE_STATE_INIT
-
-   All the output files of all of these results are
-   readable.  All of the output files for a given result
-   are, when taken "in isolation" apparently valid.  [If
-   these conditions are not met then you must do the
-   "syntax pass" above.]
-
-   if (one of these results is determined to be THE correct
-       [canonical] result)
-   {
-
-     for (correct result) {
-       set result.validate_state=VALIDATE_STATE_VALID;
-       set canonicalid=result.id;
-     } // canonical result
-
-     for (the REMAINING M - 1 results)
-     {
-       // NOTE: what is below can be done by calling
-       // check_pair(result, canonical_result)
-       if (result is correct, matches canonical)
-       {
-	 result.validate_state=VALIDATE_STATE_VALID;
-       }
-       else
-       {
-         result.validate_state=VALIDATE_STATE_INVALID;
-       }
-     } // loop over remaining M-1 results
-
-     set credit;
-
-     leave retry as set from the syntax pass above;
-
-     return 0;
-   } // found canonical result
-   else
-   {
-     // You are UNABLE to determine if one of the M REMAINING RESULTS
-     // is correct, so:
-    
-     do not modify result.outcome for ANY of M remaining results;
-     do not modify result.validate_state for ANY of M remaining results;
-     do not set credit;
-     do not set canonicalid;
-     leave retry as set from the syntax pass;
-     return 0;
-    
-   } // did not find canonical result
-    
- At any point in this process, if a major error occurs, check_set()
- should return nonzero.  This will cause the validator to exit.  If
- this happens, it does not matter how you have set result.outcome,
- result.validate_state, retry, credit, or canonicalid for ANY of the
- results.
-    
-// end of Comparison pass
diff --git a/find-working-cvs b/find-working-cvs
deleted file mode 100755
index 26255d6..0000000
--- a/find-working-cvs
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env python
-
-# $Id: find-working-cvs 2677 2003-11-25 01:49:39Z quarl $
-
-# Brute-force find at what point in time the automated tests stopped working.
-# You better be using ccache!
-
-# TODO: do a binary search instead of linear search.
-
-range = ['2003-10-01', '2003-11-10']
-
-import os, time
-
-def ptime(t):
-    return time.mktime(time.strptime(t, '%Y-%m-%d'))
-
-def doit(d):
-    print 'trying', d
-    dir = '/tmp/t.' + d
-    os.system('cvs co -D %s -d %s boinc' % (d,dir))
-    os.chdir(dir)
-    if 0 == os.system('./configure && make && cd test && ./test_uc.py'):
-        raise SystemExit('Woohoo! %s' %d)
-
-range = map(ptime, range)
-
-t = range[1]
-tmin = range[0]
-
-while t > tmin:
-    d = time.strftime('%Y-%m-%d', time.localtime(t))
-    doit(d)
-    t -= 86400
diff --git a/html/bt/inc/bdictionary.php b/html/bt/inc/bdictionary.php
index 2dc6df3..9c8b8b0 100644
--- a/html/bt/inc/bdictionary.php
+++ b/html/bt/inc/bdictionary.php
@@ -9,7 +9,7 @@
  * d3:cow3:moo4:spam4:eggse represents the dictionary { "cow" => "moo", "spam" => "eggs" } 
  */
 
-$cvs_version_tracker[]="\$Id: bdictionary.php 12886 2007-06-11 18:28:57Z jbk $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 class BDictionary {
     private function __construct(){
diff --git a/html/bt/inc/binteger.php b/html/bt/inc/binteger.php
index d6b737a..e939701 100755
--- a/html/bt/inc/binteger.php
+++ b/html/bt/inc/binteger.php
@@ -5,7 +5,7 @@
  * An integer starts with "i", has the value and then ends with "e".
  */
  
-$cvs_version_tracker[]="\$Id: binteger.php 12887 2007-06-11 18:29:23Z jbk $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
  
 class BInteger {
     private function __construct(){
diff --git a/html/bt/inc/blist.php b/html/bt/inc/blist.php
index eba51ed..86f45b3 100755
--- a/html/bt/inc/blist.php
+++ b/html/bt/inc/blist.php
@@ -5,7 +5,7 @@
  * In PHP lists are simply non-keyed (ie. standard keyed) arrays.
  */
  
-$cvs_version_tracker[]="\$Id: blist.php 12888 2007-06-11 18:29:40Z jbk $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
  
 class BList {
     private function __construct(){
diff --git a/html/bt/inc/bstring.php b/html/bt/inc/bstring.php
index 3298e01..3109ef4 100755
--- a/html/bt/inc/bstring.php
+++ b/html/bt/inc/bstring.php
@@ -5,7 +5,7 @@
  * Strings are native in PHP.
  */
 
-$cvs_version_tracker[]="\$Id: bstring.php 12889 2007-06-11 18:29:57Z jbk $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
  
 class BString {
     private function __construct(){
diff --git a/html/bt/inc/checks.php b/html/bt/inc/checks.php
index aad8560..9db9c94 100644
--- a/html/bt/inc/checks.php
+++ b/html/bt/inc/checks.php
@@ -3,7 +3,7 @@
  * Checks common to both the tracker and the scraping mechanism.
  */
 
-$cvs_version_tracker[]="\$Id: checks.php 13824 2007-10-10 21:04:20Z jbk $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 
 function isIPBanned($ip){
diff --git a/html/bt/inc/illegalargumentexception.php b/html/bt/inc/illegalargumentexception.php
index daa9d90..995f309 100755
--- a/html/bt/inc/illegalargumentexception.php
+++ b/html/bt/inc/illegalargumentexception.php
@@ -1,6 +1,6 @@
 <?php
 
-$cvs_version_tracker[]="\$Id: illegalargumentexception.php 12890 2007-06-11 18:30:19Z jbk $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 
 class IllegalArgumentException extends Exception {
diff --git a/html/bt/inc/torrent.php b/html/bt/inc/torrent.php
index fca43c6..8e058a7 100755
--- a/html/bt/inc/torrent.php
+++ b/html/bt/inc/torrent.php
@@ -8,7 +8,7 @@
  * simply download a .torrent for each file they want to fetch.
  */ 
 
-$cvs_version_tracker[]="\$Id: torrent.php 12884 2007-06-11 18:24:12Z jbk $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
  
 class Torrent {
     private $trackerURL; // String
diff --git a/html/inc/countries.inc b/html/inc/countries.inc
index 57ff050..1879199 100644
--- a/html/inc/countries.inc
+++ b/html/inc/countries.inc
@@ -1,5 +1,5 @@
 <?php
-// $Id: countries.inc 18397 2009-06-12 16:35:08Z boincadm $
+// $Id$
 // list of countries taken from http://www.cia.gov
 
 $countries = array(
diff --git a/html/inc/db_ops.inc b/html/inc/db_ops.inc
index 653f728..3589f76 100644
--- a/html/inc/db_ops.inc
+++ b/html/inc/db_ops.inc
@@ -1267,5 +1267,5 @@ function host_name_by_id($hostid) {
     }
 }
 
-$cvs_version_tracker[]="\$Id: db_ops.inc 25260 2012-02-14 21:12:57Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/inc/host.inc b/html/inc/host.inc
index 52e6b37..210cb24 100644
--- a/html/inc/host.inc
+++ b/html/inc/host.inc
@@ -722,6 +722,6 @@ function anonymize_hosts($user) {
     }
 }
 
-$cvs_version_tracker[]="\$Id: host.inc 24882 2011-12-24 02:01:54Z romw $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 ?>
diff --git a/html/inc/news.inc b/html/inc/news.inc
index c28baa9..881d256 100644
--- a/html/inc/news.inc
+++ b/html/inc/news.inc
@@ -114,5 +114,5 @@ function show_news($start, $count) {
     );
 }
 
-$cvs_version_tracker[]="\$Id: news.inc 23119 2011-02-28 19:02:59Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/inc/profile.inc b/html/inc/profile.inc
index b5b6775..c675689 100644
--- a/html/inc/profile.inc
+++ b/html/inc/profile.inc
@@ -270,6 +270,6 @@ function show_profile($user, $logged_in_user, $screen_mode = false) {
     }
 }
 
-$cvs_version_tracker[]="\$Id: profile.inc 24050 2011-08-26 18:30:13Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 ?>
diff --git a/html/inc/result.inc b/html/inc/result.inc
index 517fbe2..30cae97 100644
--- a/html/inc/result.inc
+++ b/html/inc/result.inc
@@ -711,6 +711,6 @@ function result_navigation($info, $where_clause) {
 	return $x;
 }
 
-$cvs_version_tracker[]="\$Id: result.inc 24964 2012-01-01 23:54:58Z romw $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 ?>
diff --git a/html/inc/stats_sites.inc b/html/inc/stats_sites.inc
index 3c803d1..29bb986 100644
--- a/html/inc/stats_sites.inc
+++ b/html/inc/stats_sites.inc
@@ -200,5 +200,5 @@ function site_list($sites) {
 $GLOBALS['cpid_stats_sites'] = $cpid_stats_sites;
 $GLOBALS['host_sites'] = $host_sites;
 
-$cvs_version_tracker[]="\$Id: stats_sites.inc 22859 2011-01-02 03:07:14Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/inc/team.inc b/html/inc/team.inc
index cda64bd..96c580b 100644
--- a/html/inc/team.inc
+++ b/html/inc/team.inc
@@ -571,6 +571,6 @@ function make_team(
     }
 }
 
-$cvs_version_tracker[]="\$Id: team.inc 24050 2011-08-26 18:30:13Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 ?>
diff --git a/html/inc/text_transform.inc b/html/inc/text_transform.inc
index bafb2f4..b370056 100644
--- a/html/inc/text_transform.inc
+++ b/html/inc/text_transform.inc
@@ -268,5 +268,5 @@ function highlight_terms($text, $terms) {
     }
 }
 
-$cvs_version_tracker[]="\$Id: text_transform.inc 24622 2011-11-20 17:26:32Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/inc/translation.inc b/html/inc/translation.inc
index 0b1ee39..6a74cbb 100644
--- a/html/inc/translation.inc
+++ b/html/inc/translation.inc
@@ -296,5 +296,5 @@ for ($i=0; $i<sizeof($client_languages); $i++) {
 
 $GLOBALS['languages_in_use'] = $languages_in_use;   // for Drupal
 
-$cvs_version_tracker[]="\$Id: translation.inc 21878 2010-07-06 23:31:26Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/inc/user.inc b/html/inc/user.inc
index 1231544..426689a 100644
--- a/html/inc/user.inc
+++ b/html/inc/user.inc
@@ -485,6 +485,6 @@ function make_user(
     }
 }
 
-$cvs_version_tracker[]="\$Id: user.inc 25504 2012-03-28 18:53:30Z romw $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 ?>
diff --git a/html/inc/util.inc b/html/inc/util.inc
index e98a04c..e2276b8 100644
--- a/html/inc/util.inc
+++ b/html/inc/util.inc
@@ -861,6 +861,6 @@ function credit_to_gflop_hours($c) {
     return $c/(200/24);
 }
 
-$cvs_version_tracker[]="\$Id: util.inc 25398 2012-03-09 21:40:57Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 ?>
diff --git a/html/inc/util_ops.inc b/html/inc/util_ops.inc
index 38e2bdd..17bbaf5 100644
--- a/html/inc/util_ops.inc
+++ b/html/inc/util_ops.inc
@@ -242,5 +242,5 @@ if (!isset($skip_auth_ops) && array_key_exists("SERVER_PORT", $_SERVER)) {
     auth_ops();
 }
 
-$cvs_version_tracker[]="\$Id: util_ops.inc 24969 2012-01-02 07:33:08Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/languages/translations/ca.po b/html/languages/translations/ca.po
index 4a065f7..383dd5b 100644
--- a/html/languages/translations/ca.po
+++ b/html/languages/translations/ca.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: ca.po 25435 2012-03-16 17:23:55Z romw $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
diff --git a/html/languages/translations/cs.po b/html/languages/translations/cs.po
index eef230d..904b1de 100644
--- a/html/languages/translations/cs.po
+++ b/html/languages/translations/cs.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: cs.po 25435 2012-03-16 17:23:55Z romw $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
diff --git a/html/languages/translations/da.po b/html/languages/translations/da.po
index 753be29..ac45bb4 100644
--- a/html/languages/translations/da.po
+++ b/html/languages/translations/da.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: da.po 25406 2012-03-12 22:50:41Z davea $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: BOINC Project (Generic) 6.x\n"
diff --git a/html/languages/translations/de.po b/html/languages/translations/de.po
index f09fb67..accd4e1 100644
--- a/html/languages/translations/de.po
+++ b/html/languages/translations/de.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: de.po 25406 2012-03-12 22:50:41Z davea $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: BOINC Project (Generic) 6.x\n"
diff --git a/html/languages/translations/es.po b/html/languages/translations/es.po
index 0831f05..854ae33 100644
--- a/html/languages/translations/es.po
+++ b/html/languages/translations/es.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: es.po 25406 2012-03-12 22:50:41Z davea $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
@@ -7007,7 +7007,7 @@ msgstr "(todas las aplicaciones)"
 
 # #########################################
 # Language: Spanish (Spain)
-# FileID  : $Id: es.po 25406 2012-03-12 22:50:41Z davea $
+# FileID  : $Id$
 # Author  : Janus Kristensen (Translator: Alejandro Martín Covarrubias)
 # Email   : jbk at visualgroup.dk (alex.covarrubias at gmail.com)
 # For more information please see:
@@ -7059,7 +7059,7 @@ msgstr "(todas las aplicaciones)"
 # "Your account" page (home.php)
 # #########################################
 # Language: Spanish (Spain)
-# FileID  : $Id: es.po 25406 2012-03-12 22:50:41Z davea $
+# FileID  : $Id$
 # Author  : Janus Kristensen (Translator: Alejandro Martín Covarrubias)
 # Email   : jbk at visualgroup.dk (alex.covarrubias at gmail.com)
 # For more information please see:
diff --git a/html/languages/translations/it.po b/html/languages/translations/it.po
index d975191..0786493 100644
--- a/html/languages/translations/it.po
+++ b/html/languages/translations/it.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: it.po 25435 2012-03-16 17:23:55Z romw $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
diff --git a/html/languages/translations/ja.po b/html/languages/translations/ja.po
index 3fba6a3..f10b7d7 100644
--- a/html/languages/translations/ja.po
+++ b/html/languages/translations/ja.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: ja.po 25406 2012-03-12 22:50:41Z davea $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
diff --git a/html/languages/translations/ko.po b/html/languages/translations/ko.po
index 6b2361e..35bb99f 100644
--- a/html/languages/translations/ko.po
+++ b/html/languages/translations/ko.po
@@ -3,7 +3,7 @@
 #
 # This file is distributed under the same license as BOINC.
 #
-# FileID  : $Id: ko.po 25406 2012-03-12 22:50:41Z davea $
+# FileID  : $Id$
 #
 msgid ""
 msgstr ""
diff --git a/html/languages/translations/lt.po b/html/languages/translations/lt.po
index 753a45e..7e81497 100644
--- a/html/languages/translations/lt.po
+++ b/html/languages/translations/lt.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: lt.po 25435 2012-03-16 17:23:55Z romw $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
@@ -6747,7 +6747,7 @@ msgstr ""
 
 # #########################################
 # Language: Lithuanian
-# FileID  : $Id: lt.po 25435 2012-03-16 17:23:55Z romw $
+# FileID  : $Id$
 # Author  : Rytis Slatkevičius
 # Email   : rytis.s at gmail.com
 # For more information please see:
diff --git a/html/languages/translations/pl.po b/html/languages/translations/pl.po
index 7baf7f0..00ef852 100644
--- a/html/languages/translations/pl.po
+++ b/html/languages/translations/pl.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: pl.po 25406 2012-03-12 22:50:41Z davea $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
@@ -6795,7 +6795,7 @@ msgstr ""
 
 # ###################################
 # Language: Polish [rev. 1.40 (12.09.2007/18:15)]
-# FileID  : $Id: pl.po 25406 2012-03-12 22:50:41Z davea $
+# FileID  : $Id$
 # Author  : Bartosz Kaszubowski
 # Email   : gosimek at gmail.com
 # #########################################
diff --git a/html/languages/translations/ru.po b/html/languages/translations/ru.po
index 01a85f6..1573af5 100644
--- a/html/languages/translations/ru.po
+++ b/html/languages/translations/ru.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: ru.po 25435 2012-03-16 17:23:55Z romw $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
diff --git a/html/languages/translations/zh_CN.po b/html/languages/translations/zh_CN.po
index 19f41b1..dbcc695 100644
--- a/html/languages/translations/zh_CN.po
+++ b/html/languages/translations/zh_CN.po
@@ -1,7 +1,7 @@
 # BOINC web translation
 # Copyright (C) 2008 University of California
 # This file is distributed under the same license as BOINC.
-# FileID  : $Id: zh_CN.po 25406 2012-03-12 22:50:41Z davea $
+# FileID  : $Id$
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
diff --git a/html/ops/cancel_wu_action.php b/html/ops/cancel_wu_action.php
index f331e59..c17c1cc 100644
--- a/html/ops/cancel_wu_action.php
+++ b/html/ops/cancel_wu_action.php
@@ -81,5 +81,5 @@ if (cancel_wu($wuid1, $wuid2)) {
 echo " cancelling workunits $wuid1 <= WUID <= $wuid2</h2>";
 
 admin_page_tail();
-$cvs_version_tracker[]="\$Id: cancel_wu_action.php 20594 2010-02-16 18:38:39Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/cancel_wu_form.php b/html/ops/cancel_wu_form.php
index 6e8615d..cb8e20f 100644
--- a/html/ops/cancel_wu_form.php
+++ b/html/ops/cancel_wu_form.php
@@ -50,5 +50,5 @@ echo "
     </form>
 ";
 admin_page_tail();
-$cvs_version_tracker[]="\$Id: cancel_wu_form.php 19053 2009-09-15 18:14:37Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/clear_host.php b/html/ops/clear_host.php
index 21efd2c..b1b852e 100644
--- a/html/ops/clear_host.php
+++ b/html/ops/clear_host.php
@@ -29,5 +29,5 @@ mysql_query("update host set rpc_time=0 where id='$hostid'");
 echo "Host RPC time cleared for host ID: $hostid\n";
 
 admin_page_tail();
-$cvs_version_tracker[]="\$Id: clear_host.php 20745 2010-02-26 21:34:20Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/create_forums.php b/html/ops/create_forums.php
index 4b7cd7a..967bfeb 100644
--- a/html/ops/create_forums.php
+++ b/html/ops/create_forums.php
@@ -67,5 +67,5 @@ create_forum($catid, 4, "Preferences", "Using preferences");
 create_forum($catid, 5, "Wish list", "What new features would you like to see?");
 create_forum($catid, 6, "Web site", "Issues involving this web site");
 
-$cvs_version_tracker[]="\$Id: create_forums.php 19949 2009-12-16 22:35:08Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/db_action.php b/html/ops/db_action.php
index 8b98fc8..7291902 100644
--- a/html/ops/db_action.php
+++ b/html/ops/db_action.php
@@ -228,5 +228,5 @@ if ($result) {
 }
 
 admin_page_tail();
-$cvs_version_tracker[]="\$Id: db_action.php 24857 2011-12-21 18:29:11Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/db_form.php b/html/ops/db_form.php
index e9d324c..41b6f34 100644
--- a/html/ops/db_form.php
+++ b/html/ops/db_form.php
@@ -102,5 +102,5 @@ echo "</form>\n";
 print_describe_table($table, 4);
 
 admin_page_tail();
-$cvs_version_tracker[]="\$Id: db_form.php 15975 2008-09-07 07:40:56Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/errorwus.php b/html/ops/errorwus.php
index 59c7f23..ddd1488 100644
--- a/html/ops/errorwus.php
+++ b/html/ops/errorwus.php
@@ -111,5 +111,5 @@ echo " entries\n";
 admin_page_tail();
 
 end_cache($cache_sec);
-$cvs_version_tracker[]="\$Id: errorwus.php 15758 2008-08-05 22:43:14Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/failure_result_summary_by_host.php b/html/ops/failure_result_summary_by_host.php
index 68e279c..33f5a94 100644
--- a/html/ops/failure_result_summary_by_host.php
+++ b/html/ops/failure_result_summary_by_host.php
@@ -85,5 +85,5 @@ end_table();
 
 admin_page_tail();
 
-$cvs_version_tracker[]="\$Id: failure_result_summary_by_host.php 25171 2012-01-31 07:21:42Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/failure_result_summary_by_platform.php b/html/ops/failure_result_summary_by_platform.php
index a964a23..ff502f6 100644
--- a/html/ops/failure_result_summary_by_platform.php
+++ b/html/ops/failure_result_summary_by_platform.php
@@ -82,5 +82,5 @@ end_table();
 
 admin_page_tail();
 
-$cvs_version_tracker[]="\$Id: failure_result_summary_by_platform.php 25171 2012-01-31 07:21:42Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/index.php b/html/ops/index.php
index 2bf96f7..5925074 100644
--- a/html/ops/index.php
+++ b/html/ops/index.php
@@ -232,5 +232,5 @@ echo "<h3>Periodic or special tasks</h3>
 
 admin_page_tail();
 
-$cvs_version_tracker[]="\$Id: index.php 25171 2012-01-31 07:21:42Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/list_new_users.php b/html/ops/list_new_users.php
index 978a7b7..c00a168 100644
--- a/html/ops/list_new_users.php
+++ b/html/ops/list_new_users.php
@@ -117,5 +117,5 @@ end_table();
 
 admin_page_tail();
 
-$cvs_version_tracker[]="\$Id: list_new_users.php 15758 2008-08-05 22:43:14Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/make_emails_lowercase.php b/html/ops/make_emails_lowercase.php
index d3b7990..5eb5528 100644
--- a/html/ops/make_emails_lowercase.php
+++ b/html/ops/make_emails_lowercase.php
@@ -109,5 +109,5 @@ if ($confirm != "yes" && $update_needed) {
 mysql_free_result($result);
 
 admin_page_tail();
-$cvs_version_tracker[]="\$Id: make_emails_lowercase.php 19230 2009-10-02 18:32:40Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/manage_app_versions.php b/html/ops/manage_app_versions.php
index ebbb2ff..bac7094 100644
--- a/html/ops/manage_app_versions.php
+++ b/html/ops/manage_app_versions.php
@@ -25,7 +25,7 @@
  * Some of the fields can be changed.
  *
  * Eric Myers <myers at spy-hill.net>  - 4 June 2006
- * @(#) $Id: manage_app_versions.php 25115 2012-01-21 00:04:54Z davea $
+ * @(#) $Id$
 \***********************************************************************/
 
 // TODO: rewrite this using the new DB interface
@@ -199,5 +199,5 @@ echo "</form><P>\n";
 admin_page_tail();
 
 //Generated automatically - do not edit
-$cvs_version_tracker[]="\$Id: manage_app_versions.php 25115 2012-01-21 00:04:54Z davea $"; 
+$cvs_version_tracker[]="\$Id$"; 
 ?>
diff --git a/html/ops/manage_apps.php b/html/ops/manage_apps.php
index 3cb8faf..955e5cd 100644
--- a/html/ops/manage_apps.php
+++ b/html/ops/manage_apps.php
@@ -25,7 +25,7 @@
  * Some of the fields can be changed.
  *
  * Eric Myers <myers at spy-hill.net>  - 4 June 2006
- * @(#) $Id: manage_apps.php 25115 2012-01-21 00:04:54Z davea $
+ * @(#) $Id$
 \***********************************************************************/
 
 // TODO - code cleanup and use new DB interface
@@ -249,5 +249,5 @@ echo "</form><p>\n";
 admin_page_tail();
 
 //Generated automatically - do not edit
-$cvs_version_tracker[]="\$Id: manage_apps.php 25115 2012-01-21 00:04:54Z davea $";
+$cvs_version_tracker[]="\$Id$";
 ?>
diff --git a/html/ops/manage_special_users.php b/html/ops/manage_special_users.php
index 9c6d1ab..cb12448 100644
--- a/html/ops/manage_special_users.php
+++ b/html/ops/manage_special_users.php
@@ -69,5 +69,5 @@ end_table();
 
 admin_page_tail();
 
-$cvs_version_tracker[]="\$Id: manage_special_users.php 21143 2010-04-07 22:21:44Z boincadm $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/manage_special_users_action.php b/html/ops/manage_special_users_action.php
index e23e719..82d1f8b 100644
--- a/html/ops/manage_special_users_action.php
+++ b/html/ops/manage_special_users_action.php
@@ -50,5 +50,5 @@ echo "Query was: $query</center>";
 
 admin_page_tail();
 
-$cvs_version_tracker[]="\$Id: manage_special_users_action.php 16132 2008-10-05 12:45:33Z jbk $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/manage_user.php b/html/ops/manage_user.php
index 95a33d3..2ff10ff 100644
--- a/html/ops/manage_user.php
+++ b/html/ops/manage_user.php
@@ -395,5 +395,5 @@ if ($q) {
 admin_page_tail();
 
 $cvs_version_tracker[]=        //Generated automatically - do not edit
-    "\$Id: manage_user.php 24050 2011-08-26 18:30:13Z davea $"; 
+    "\$Id$"; 
 ?>
diff --git a/html/ops/pass_percentage_by_platform.php b/html/ops/pass_percentage_by_platform.php
index 1c771e5..e15f81d 100644
--- a/html/ops/pass_percentage_by_platform.php
+++ b/html/ops/pass_percentage_by_platform.php
@@ -180,5 +180,5 @@ echo "</form>\n";
 
 admin_page_tail();
 
-$cvs_version_tracker[]="\$Id: pass_percentage_by_platform.php 25175 2012-01-31 20:25:26Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/problem_host.php b/html/ops/problem_host.php
index ee5ec16..d54bd85 100644
--- a/html/ops/problem_host.php
+++ b/html/ops/problem_host.php
@@ -137,5 +137,5 @@ if (!$hostid) {
 }
 
 admin_page_tail();
-$cvs_version_tracker[]="\$Id: problem_host.php 15758 2008-08-05 22:43:14Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/profile_screen_action.php b/html/ops/profile_screen_action.php
index ca0be26..225f6fc 100644
--- a/html/ops/profile_screen_action.php
+++ b/html/ops/profile_screen_action.php
@@ -51,5 +51,5 @@ echo "
 
 admin_page_tail();
 
-$cvs_version_tracker[]="\$Id: profile_screen_action.php 16243 2008-10-21 18:55:17Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/profile_screen_form.php b/html/ops/profile_screen_form.php
index 17c8762..b91d1f9 100644
--- a/html/ops/profile_screen_form.php
+++ b/html/ops/profile_screen_form.php
@@ -93,5 +93,5 @@ echo "
 ";
 
 admin_page_tail();
-$cvs_version_tracker[]="\$Id: profile_screen_form.php 22197 2010-08-11 18:52:11Z boincadm $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/result_summary.php b/html/ops/result_summary.php
index 36b9a90..ceb783a 100644
--- a/html/ops/result_summary.php
+++ b/html/ops/result_summary.php
@@ -26,5 +26,5 @@ admin_page_head("Result summary");
 show_result_summary();
 
 admin_page_tail();
-$cvs_version_tracker[]="\$Id: result_summary.php 19053 2009-09-15 18:14:37Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/ops/white.css b/html/ops/white.css
deleted file mode 100644
index 7da7715..0000000
--- a/html/ops/white.css
+++ /dev/null
@@ -1,108 +0,0 @@
-a:link {
-	color: blue;
-}
-
-a:visited {
-	color: blue;
-}
-
-a:active {
-	color: blue;
-}
-
-body , table , input , select {
-	font-family: Verdana, Arial, Sans Serif;
-	font-size: small;
-}
-
-body {
-	background-color: white;
-    color: black;
-}
-
-table {
-    border: 0px;
-}
-
-table.bordered {
-      border: 1px solid black;
-}
-
-th {
-	background-color: #ffffcc;
-	font-weight: bold;
-}
-
-td {
-    border: 1px solid white;
-}
-
-td.bordered {
-        border: 1px solid grey;
-}
-
-td.indent {
-         border-left: 4px solid white;
-}
-
-td.heading {
-        background-color: rgb(217,217,217);
-	    font-weight: bold;
-}
-
-td.fieldname {
-        background-color: rgb(237,237,237);
-}
-
-td.category {
-        border: 1px solid black;
-}
-
-tr.row0 {
-        background-color: rgb(217,217,217);
-}
-
-tr.row1 {
-        background-color: rgb(237,237,237);
-}
-
-tr.subtitle {
-	background-color: white;
-	color: black;
-	font-weight: bold;
-}
-
-tr.message {
-    background-color:#E0E0EF;
-}
-
-input , select {
-	vertical-align: middle;
-}
-
-h1 , h2 {
-	color: black;
-	font-size: x-large;
-	font-weight: normal;
-	margin-top: 10px;
-}
-
-h3 , h4 {
-	color: black;
-	font-size: small;
-	font-weight: bold;
-}
-
-img {
-    border: 0px;
-}
-
-.title {
-	font-size: small;
-	font-weight: bold;
-}
-
-.description {
-	font-size: 80%;
-	font-weight: normal;
-}
diff --git a/html/project.sample/project_specific_prefs.inc b/html/project.sample/project_specific_prefs.inc
index 6e61789..1f4b491 100644
--- a/html/project.sample/project_specific_prefs.inc
+++ b/html/project.sample/project_specific_prefs.inc
@@ -219,6 +219,6 @@ function project_specific_prefs_parse($prefs_xml) {
     return $prefs;
 }
 
-$cvs_version_tracker[]="\$Id: project_specific_prefs.inc 24555 2011-11-09 07:41:49Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 ?>
diff --git a/html/user/add_venue.php b/html/user/add_venue.php
index fc26ae0..9a9bdcd 100644
--- a/html/user/add_venue.php
+++ b/html/user/add_venue.php
@@ -93,5 +93,5 @@ if ($action) {
     print_prefs_form("add", $subset, $venue, $user, $prefs, $columns);
 }
 page_tail();
-$cvs_version_tracker[]="\$Id: add_venue.php 24124 2011-09-02 21:45:13Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/boinc_logo_trans.gif b/html/user/boinc_logo_trans.gif
deleted file mode 100644
index de7b471..0000000
Binary files a/html/user/boinc_logo_trans.gif and /dev/null differ
diff --git a/html/user/create_account_form.php b/html/user/create_account_form.php
index 3bd7135..e184624 100644
--- a/html/user/create_account_form.php
+++ b/html/user/create_account_form.php
@@ -131,6 +131,6 @@ echo "
     </form>
 ";
 
-$cvs_version_tracker[]="\$Id: create_account_form.php 25335 2012-02-24 16:42:38Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 page_tail();
 ?>
diff --git a/html/user/edit_forum_preferences_form.php b/html/user/edit_forum_preferences_form.php
index 1813b23..ce833e7 100644
--- a/html/user/edit_forum_preferences_form.php
+++ b/html/user/edit_forum_preferences_form.php
@@ -180,5 +180,5 @@ row2(tra("Or click here to reset preferences to the defaults"),
 end_table();
 page_tail();
 
-$cvs_version_tracker[]="\$Id: edit_forum_preferences_form.php 24048 2011-08-25 22:12:48Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/forum_edit.php b/html/user/forum_edit.php
index bea7484..debd611 100644
--- a/html/user/forum_edit.php
+++ b/html/user/forum_edit.php
@@ -151,5 +151,5 @@ echo "</form>";
 
 page_tail();
 
-$cvs_version_tracker[]="\$Id: forum_edit.php 24048 2011-08-25 22:12:48Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/forum_help_desk.php b/html/user/forum_help_desk.php
index 6633bf2..5264065 100644
--- a/html/user/forum_help_desk.php
+++ b/html/user/forum_help_desk.php
@@ -79,5 +79,5 @@ echo "
 
 page_tail();
 
-$cvs_version_tracker[]="\$Id: forum_help_desk.php 24048 2011-08-25 22:12:48Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/forum_index.php b/html/user/forum_index.php
index 5f210d2..b139270 100644
--- a/html/user/forum_index.php
+++ b/html/user/forum_index.php
@@ -140,5 +140,5 @@ page_tail();
 flush();
 BoincForumLogging::cleanup();
 
-$cvs_version_tracker[]="\$Id: forum_index.php 24048 2011-08-25 22:12:48Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/forum_moderate_post_action.php b/html/user/forum_moderate_post_action.php
index 3ec32f8..807cce0 100644
--- a/html/user/forum_moderate_post_action.php
+++ b/html/user/forum_moderate_post_action.php
@@ -144,5 +144,5 @@ send_moderation_email($forum, $post, $thread, $explanation, $action_name);
 
 header('Location: forum_thread.php?id='.$thread->id);
 
-$cvs_version_tracker[]="\$Id: forum_moderate_post_action.php 24048 2011-08-25 22:12:48Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/forum_post.php b/html/user/forum_post.php
index 857b81a..9988482 100644
--- a/html/user/forum_post.php
+++ b/html/user/forum_post.php
@@ -136,5 +136,5 @@ echo "</form>\n";
 
 page_tail();
 
-$cvs_version_tracker[]="\$Id: forum_post.php 24048 2011-08-25 22:12:48Z davea $";
+$cvs_version_tracker[]="\$Id$";
 ?>
diff --git a/html/user/forum_rate.php b/html/user/forum_rate.php
index 92c84ba..fd6e551 100644
--- a/html/user/forum_rate.php
+++ b/html/user/forum_rate.php
@@ -89,5 +89,5 @@ function show_result_page($success, $post, $thread, $choice) {
     exit;
 }
 
-$cvs_version_tracker[]="\$Id: forum_rate.php 24048 2011-08-25 22:12:48Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/forum_reply.php b/html/user/forum_reply.php
index 2959f44..6a38cf7 100644
--- a/html/user/forum_reply.php
+++ b/html/user/forum_reply.php
@@ -166,5 +166,5 @@ function quote_text($text) {
     return $text;
 }
 
-$cvs_version_tracker[]="\$Id: forum_reply.php 24048 2011-08-25 22:12:48Z davea $";
+$cvs_version_tracker[]="\$Id$";
 ?>
diff --git a/html/user/forum_search.php b/html/user/forum_search.php
index 06c8ed4..8d3405f 100644
--- a/html/user/forum_search.php
+++ b/html/user/forum_search.php
@@ -91,5 +91,5 @@ end_table();
 
 page_tail();
 
-$cvs_version_tracker[]="\$Id: forum_search.php 24129 2011-09-06 04:34:29Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/forum_search_action.php b/html/user/forum_search_action.php
index bed806c..7e722ac 100644
--- a/html/user/forum_search_action.php
+++ b/html/user/forum_search_action.php
@@ -224,5 +224,5 @@ if (!count($thread) && !count($posts)){
 echo "<p><a href=\"forum_search.php\">".tra("Perform another search")."</a></p>";
 page_tail();
 
-$cvs_version_tracker[]="\$Id: forum_search_action.php 24129 2011-09-06 04:34:29Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/forum_thread.php b/html/user/forum_thread.php
index a041f3d..9893ef7 100644
--- a/html/user/forum_thread.php
+++ b/html/user/forum_thread.php
@@ -289,5 +289,5 @@ case 1:
 $thread->update("views=views+1");
 
 page_tail();
-$cvs_version_tracker[]="\$Id: forum_thread.php 25006 2012-01-06 22:22:02Z davea $";
+$cvs_version_tracker[]="\$Id$";
 ?>
diff --git a/html/user/head.jpg b/html/user/head.jpg
deleted file mode 100644
index 3450f5f..0000000
Binary files a/html/user/head.jpg and /dev/null differ
diff --git a/html/user/head.png b/html/user/head.png
deleted file mode 100644
index 2b34648..0000000
Binary files a/html/user/head.png and /dev/null differ
diff --git a/html/user/img/emphasized_post.png b/html/user/img/emphasized_post.png
deleted file mode 100644
index 876493e..0000000
Binary files a/html/user/img/emphasized_post.png and /dev/null differ
diff --git a/html/user/img/filtered_post.png b/html/user/img/filtered_post.png
deleted file mode 100644
index cc44577..0000000
Binary files a/html/user/img/filtered_post.png and /dev/null differ
diff --git a/html/user/img/flags/da.png b/html/user/img/flags/da.png
deleted file mode 100644
index 045552f..0000000
Binary files a/html/user/img/flags/da.png and /dev/null differ
diff --git a/html/user/img/rate_negative.png b/html/user/img/rate_negative.png
deleted file mode 100644
index 5ae3414..0000000
Binary files a/html/user/img/rate_negative.png and /dev/null differ
diff --git a/html/user/img/rate_positive.png b/html/user/img/rate_positive.png
deleted file mode 100644
index b261639..0000000
Binary files a/html/user/img/rate_positive.png and /dev/null differ
diff --git a/html/user/img/report_post.png b/html/user/img/report_post.png
deleted file mode 100644
index aff8baf..0000000
Binary files a/html/user/img/report_post.png and /dev/null differ
diff --git a/html/user/img/sticky_post.png b/html/user/img/sticky_post.png
deleted file mode 100644
index e5b5bb4..0000000
Binary files a/html/user/img/sticky_post.png and /dev/null differ
diff --git a/html/user/img/unread_post.png b/html/user/img/unread_post.png
deleted file mode 100644
index 103ef00..0000000
Binary files a/html/user/img/unread_post.png and /dev/null differ
diff --git a/html/user/img/unread_sticky.png b/html/user/img/unread_sticky.png
deleted file mode 100644
index 9629bf0..0000000
Binary files a/html/user/img/unread_sticky.png and /dev/null differ
diff --git a/html/user/info.php b/html/user/info.php
index b6814ee..c0cc330 100644
--- a/html/user/info.php
+++ b/html/user/info.php
@@ -58,5 +58,5 @@ echo "
     <p>".tra("These other projects are not associated with %1, and we cannot vouch for their security practices or the nature of their research. Join them at your own risk.", PROJECT);
 }
 page_tail();
-$cvs_version_tracker[]="\$Id: info.php 23010 2011-02-09 22:11:34Z davea $";
+$cvs_version_tracker[]="\$Id$";
 ?>
diff --git a/html/user/languages.txt b/html/user/languages.txt
deleted file mode 100644
index 75a4750..0000000
--- a/html/user/languages.txt
+++ /dev/null
@@ -1,188 +0,0 @@
-Abkhazian
-Afar
-Afrikaans
-Albanian
-Amharic
-Arabic
-Armenian
-Assamese
-Aymara
-Azebaijani
-Bahasa Indonesia
-Bangla
-Bashkir
-Basque
-Bengali
-Bhutanese
-Bhutani
-Bihari
-Bislama
-Breton
-Bulgarian
-Burmese
-Byelorussian
-Cambodian
-Catalan
-Chinese
-chiShona
-Choson-o
-Corsican
-Croat
-Croatian
-Czech
-Danish
-Dutch
-English
-Esperanto
-Estonian
-Faeroese
-Faroese
-Fiji
-Fijian
-Finnish
-French
-Frisian
-Scots
-Gaelic
-Galician
-Galla
-Georgian
-German
-Greek
-Greenlandic
-Guaraní
-Gujarati
-Gujerati
-Hausa
-Hebrew
-Hindi
-Hungarian
-Icelandic
-Indonesian
-Interlingua
-Interlingue
-Inupiak
-Inuktitut
-Irish
-isiXhosa
-isiZulu
-Italian
-Japanese
-Javanese
-Kannada
-Kashmiri
-Kazakh
-kinyaRuanda
-Kinyarwanda
-Kirghiz
-Kirundi
-kiRundi
-kiSwahili
-Korean
-Kurdish
-Lao
-Laothian
-Latin
-Latvian
-Lettish
-Lingala
-liNgala
-Lithuanian
-Macedonian
-Malagasy 
-Malay
-Malayalam
-Magyar
-Mahrati
-Maltese
-Maori
-Marathi
-Moldavian
-Mongolian
-Nauru
-Nepalese
-Nepali
-Nihongo
-Norwegian
-Occitan
-Oriya
-(Afan)Oromo
-Pashto
-Persian
-Pha Xa Lao
-Polish
-Portuguese
-Punjabi
-Pushto
-Pushtu
-Quechua
-Rhaeto-Romance
-Rhaeto-Romanic
-Romanian
-Romansch
-Rumanian
-Russian
-Samoan
-Sangho
-Sango-Ngbandi
-Sanskrit
-Scots Gaelic
-Serbian
-Serbo-Croatian
-Sesotho
-Setswana
-Shona
-Sindhi inghalese
-Sinhalese
-siSuthu
-Siswati
-siSwati
-Slovak
-Slovene
-Slovenian
-Somali
-Spanish
-Sundanese
-Suomi
-Swahili
-Swedish
-Tagalog
-Tajik
-Tajiki
-Tamil
-Tartar
-Tatar
-Telegu
-Telugu
-Thai
-Tibetan
-Tigrinya
-Tonga
-Tshi
-Tsonga
-Turcoman
-Turkish
-Turkmen
-Turkoman
-Twi
-Uigur
-Uighur
-Ukrainian
-Urdu
-Usbeg
-Usbek
-Uyghur
-Uzbeg
-Uzbek
-Vietnamese
-Volapük
-Welsh
-Wolof
-Xhosa
-Xosa
-Yiddish
-Yoruba
-Zhuang
-Zimany Kurdy
-Zulu
-Other
diff --git a/html/user/pending.php b/html/user/pending.php
index 3037057..d3ceb36 100644
--- a/html/user/pending.php
+++ b/html/user/pending.php
@@ -80,5 +80,5 @@ if ($format == "xml") {
     page_tail();
 }
 
-$cvs_version_tracker[]="\$Id: pending.php 24885 2011-12-24 05:19:21Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/prefs.php b/html/user/prefs.php
index a2f42b9..bd055e6 100644
--- a/html/user/prefs.php
+++ b/html/user/prefs.php
@@ -47,5 +47,5 @@ if ($subset == "global") {
 }
 page_tail();
 
-$cvs_version_tracker[]="\$Id: prefs.php 23010 2011-02-09 22:11:34Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/prefs_edit.php b/html/user/prefs_edit.php
index 1239ef6..6f24707 100644
--- a/html/user/prefs_edit.php
+++ b/html/user/prefs_edit.php
@@ -110,5 +110,5 @@ if ($action) {
 echo "<a href=prefs.php?subset=$subset$c>".tra("Back to preferences")."</a>\n";
 page_tail();
 
-$cvs_version_tracker[]="\$Id: prefs_edit.php 24109 2011-09-01 20:54:49Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/prefs_remove.php b/html/user/prefs_remove.php
index 5bf3f9e..27a2728 100644
--- a/html/user/prefs_remove.php
+++ b/html/user/prefs_remove.php
@@ -58,5 +58,5 @@ if ($confirmed) {
     page_tail();
 }
 
-$cvs_version_tracker[]="\$Id: prefs_remove.php 23030 2011-02-14 19:49:30Z boincadm $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/profile_alpha.html b/html/user/profile_alpha.html
deleted file mode 100644
index c128507..0000000
--- a/html/user/profile_alpha.html
+++ /dev/null
@@ -1 +0,0 @@
-<a href=user_profile/profile_A_1.html>A</a> <a href=user_profile/profile_B_1.html>B</a> C D <a href=user_profile/profile_E_1.html>E</a> <a href=user_profile/profile_F_1.html>F</a> G <a href=user_profile/profile_H_1.html>H</a> I <a href=user_profile/profile_J_1.html>J</a> K L M N O <a href=user_profile/profile_P_1.html>P</a> Q R <a href=user_profile/profile_S_1.html>S</a> <a href=user_profile/profile_T_1.html>T</a> U V <a href=user_profile/profile_W_1.html>W</a> X Y Z 0 1 2 3 4 5 6 7 8 9 
\ No newline at end of file
diff --git a/html/user/profile_menu.php b/html/user/profile_menu.php
index 62cd049..144c37f 100644
--- a/html/user/profile_menu.php
+++ b/html/user/profile_menu.php
@@ -108,5 +108,5 @@ function select_profile($cmd) {
     }
 }
 
-$cvs_version_tracker[]="\$Id: profile_menu.php 24324 2011-10-03 17:11:45Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/project_specific_prefs.inc.sample b/html/user/project_specific_prefs.inc.sample
index 278f144..94adb8a 100644
--- a/html/user/project_specific_prefs.inc.sample
+++ b/html/user/project_specific_prefs.inc.sample
@@ -1,5 +1,5 @@
 <?php
-$cvs_version_tracker[]="\$Id: project_specific_prefs.inc.sample 11356 2006-10-25 21:15:08Z boincadm $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 // Place your version in project_specific/project_specific_prefs.inc
 
 // Functions to display and edit project-specific prefs go here
diff --git a/html/user/sample_robots.txt b/html/user/sample_robots.txt
deleted file mode 100644
index 56e044d..0000000
--- a/html/user/sample_robots.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-User-agent: *
-Disallow: /account
-Disallow: /add_venue
-Disallow: /am_
-Disallow: /bug_report
-Disallow: /edit_
-Disallow: /host_
-Disallow: /prefs_
-Disallow: /result
-Disallow: /team
-Disallow: /workunit
diff --git a/html/user/show_user.php b/html/user/show_user.php
index cb9ac20..4d3e937 100644
--- a/html/user/show_user.php
+++ b/html/user/show_user.php
@@ -23,7 +23,7 @@
 // Object-caching and full-file caching is used to speed up queries
 // for data from this page.
 
-$cvs_version_tracker[]="\$Id: show_user.php 24708 2011-12-01 18:44:19Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 require_once("../inc/cache.inc");
 require_once("../inc/util.inc");
diff --git a/html/user/team_change_founder_form.php b/html/user/team_change_founder_form.php
index 9dab8ab..3a0c64d 100644
--- a/html/user/team_change_founder_form.php
+++ b/html/user/team_change_founder_form.php
@@ -113,5 +113,5 @@ if ($navailable_users > 0) {
 echo "</form>";
 page_tail();
 
-$cvs_version_tracker[]="\$Id: team_change_founder_form.php 23010 2011-02-09 22:11:34Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/team_email_list.php b/html/user/team_email_list.php
index eb92197..33145a5 100644
--- a/html/user/team_email_list.php
+++ b/html/user/team_email_list.php
@@ -79,5 +79,5 @@ if (!$plain) {
     page_tail();
 }
 
-$cvs_version_tracker[]="\$Id: team_email_list.php 23010 2011-02-09 22:11:34Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/team_founder_transfer_action.php b/html/user/team_founder_transfer_action.php
index e7ec1e0..4feb56c 100644
--- a/html/user/team_founder_transfer_action.php
+++ b/html/user/team_founder_transfer_action.php
@@ -138,6 +138,6 @@ echo "<a href='team_display.php?teamid=$team->id'>".tra("Return to team page")."
 
 page_tail();
 
-$cvs_version_tracker[]="\$Id: team_founder_transfer_action.php 23941 2011-08-06 07:11:17Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 
 ?>
diff --git a/html/user/team_founder_transfer_form.php b/html/user/team_founder_transfer_form.php
index 609fc4d..8d874ff 100644
--- a/html/user/team_founder_transfer_form.php
+++ b/html/user/team_founder_transfer_form.php
@@ -84,5 +84,5 @@ echo "<p><a href=\"team_display.php?teamid=".$team->id."\">".tra("Return to team
 
 page_tail();
 
-$cvs_version_tracker[]="\$Id: team_founder_transfer_form.php 23010 2011-02-09 22:11:34Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/team_join_action.php b/html/user/team_join_action.php
index 28a529d..040f508 100644
--- a/html/user/team_join_action.php
+++ b/html/user/team_join_action.php
@@ -46,5 +46,5 @@ if ($user->teamid == $team->id) {
 
 page_tail();
 
-$cvs_version_tracker[]="\$Id: team_join_action.php 23010 2011-02-09 22:11:34Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/team_join_form.php b/html/user/team_join_form.php
index 3b45cc0..766d9f9 100644
--- a/html/user/team_join_form.php
+++ b/html/user/team_join_form.php
@@ -47,5 +47,5 @@ echo "
 ";
 page_tail();
 
-$cvs_version_tracker[]="\$Id: team_join_form.php 23010 2011-02-09 22:11:34Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/team_quit_action.php b/html/user/team_quit_action.php
index a86c391..985a1cc 100644
--- a/html/user/team_quit_action.php
+++ b/html/user/team_quit_action.php
@@ -37,5 +37,5 @@ if ($user->teamid == $team->id) {
 
 page_tail();
 
-$cvs_version_tracker[]="\$Id: team_quit_action.php 23023 2011-02-11 18:32:47Z boincadm $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/html/user/team_quit_form.php b/html/user/team_quit_form.php
index da01a2a..de2f6ad 100644
--- a/html/user/team_quit_form.php
+++ b/html/user/team_quit_form.php
@@ -44,5 +44,5 @@ echo "<input type=\"hidden\" name=\"id\" value=\"$team->id\">
 ";
 page_tail();
 
-$cvs_version_tracker[]="\$Id: team_quit_form.php 23010 2011-02-09 22:11:34Z davea $";  //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
 ?>
diff --git a/lib/Makefile.am b/lib/Makefile.am
index fa12ffb..afe2537 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 25269 2012-02-16 00:08:40Z davea $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/lib/app_ipc.cpp b/lib/app_ipc.cpp
index d32908c..a6520c3 100644
--- a/lib/app_ipc.cpp
+++ b/lib/app_ipc.cpp
@@ -100,6 +100,7 @@ void APP_INIT_DATA::copy(const APP_INIT_DATA& a) {
     teamid                        = a.teamid;
     hostid                        = a.hostid;
     slot                          = a.slot;
+    client_pid                    = a.client_pid;
     user_total_credit             = a.user_total_credit;
     user_expavg_credit            = a.user_expavg_credit;
     host_total_credit             = a.host_total_credit;
@@ -192,6 +193,7 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
 #endif
     fprintf(f,
         "<slot>%d</slot>\n"
+        "<client_pid>%d</client_pid>\n"
         "<wu_cpu_time>%f</wu_cpu_time>\n"
         "<starting_elapsed_time>%f</starting_elapsed_time>\n"
         "<using_sandbox>%d</using_sandbox>\n"
@@ -213,6 +215,7 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
         "<rsc_disk_bound>%f</rsc_disk_bound>\n"
         "<computation_deadline>%f</computation_deadline>\n",
         ai.slot,
+        ai.client_pid,
         ai.wu_cpu_time,
         ai.starting_elapsed_time,
         ai.using_sandbox?1:0,
@@ -263,6 +266,7 @@ void APP_INIT_DATA::clear() {
     strcpy(result_name, "");
     strcpy(authenticator, "");
     slot = 0;
+    client_pid = 0;
     user_total_credit = 0;
     user_expavg_credit = 0;
     host_total_credit = 0;
@@ -367,6 +371,7 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) {
         if (xp.parse_int("shm_key", ai.shmem_seg_name)) continue;
 #endif
         if (xp.parse_int("slot", ai.slot)) continue;
+        if (xp.parse_int("client_pid", ai.client_pid)) continue;
         if (xp.parse_double("user_total_credit", ai.user_total_credit)) continue;
         if (xp.parse_double("user_expavg_credit", ai.user_expavg_credit)) continue;
         if (xp.parse_double("host_total_credit", ai.host_total_credit)) continue;
diff --git a/lib/app_ipc.h b/lib/app_ipc.h
index 911d601..241b4d9 100644
--- a/lib/app_ipc.h
+++ b/lib/app_ipc.h
@@ -167,6 +167,7 @@ struct APP_INIT_DATA {
     char result_name[256];
     char authenticator[256];
     int slot;
+    int client_pid;
     double user_total_credit;
     double user_expavg_credit;
     double host_total_credit;
diff --git a/lib/boinc_win.h b/lib/boinc_win.h
index 99a20c1..f51ff3d 100644
--- a/lib/boinc_win.h
+++ b/lib/boinc_win.h
@@ -22,10 +22,6 @@
 #ifndef _BOINC_WIN_
 #define _BOINC_WIN_
 
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 4096
-#endif
-
 #ifndef __CYGWIN32__
 
 // Windows C Runtime Library
@@ -96,6 +92,7 @@
 #include <shlobj.h>
 #include <userenv.h>
 #include <aclapi.h>
+#include <psapi.h>
 #include <iphlpapi.h>
 
 #if !defined(__CYGWIN32__) || defined(USE_WINSOCK)
diff --git a/lib/cert_sig.cpp b/lib/cert_sig.cpp
index cfbe202..41ddf6d 100644
--- a/lib/cert_sig.cpp
+++ b/lib/cert_sig.cpp
@@ -149,6 +149,7 @@ int CERT_SIGS::parse_file(const char* filename) {
     mf.init_file(f);
     XML_PARSER xp(&mf);
     if (!xp.parse_start("signatures")) {
+        fclose(f);
         return ERR_XML_PARSE;
     }
     retval = this->parse(xp);
diff --git a/lib/common_defs.h b/lib/common_defs.h
index da1bbc2..78f8c02 100644
--- a/lib/common_defs.h
+++ b/lib/common_defs.h
@@ -19,6 +19,7 @@
 #define _COMMON_DEFS_
 
 #include "miofile.h"
+#include "parse.h"
 
 // #defines or enums that are shared by more than one BOINC component
 // (e.g. client, server, Manager, etc.)
@@ -168,6 +169,36 @@ enum SUSPEND_REASON {
 #define RPC_REASON_INIT             6
 #define RPC_REASON_PROJECT_REQ      7
 
+struct TIME_STATS {
+// we maintain an exponentially weighted average of these quantities:
+    double now;
+        // the client's time of day
+    double on_frac;
+        // the fraction of total time this host runs the client
+    double connected_frac;
+        // of the time this host runs the client,
+        // the fraction it is connected to the Internet,
+        // or -1 if not known
+    double cpu_and_network_available_frac;
+        // of the time this host runs the client,
+        // the fraction it is connected to the Internet
+        // AND network usage is allowed (by prefs and user toggle)
+        // AND CPU usage is allowed
+    double active_frac;
+        // of the time this host runs the client,
+        // the fraction it is enabled to use CPU
+        // (as determined by preferences, manual suspend/resume, etc.)
+    double gpu_active_frac;
+        // same, GPU
+    double client_start_time;
+    double previous_uptime;
+        // duration of previous session
+
+    void write(MIOFILE&);
+    int parse(XML_PARSER&);
+    void print();
+};
+
 struct VERSION_INFO {
     int major;
     int minor;
@@ -191,5 +222,4 @@ struct VERSION_INFO {
 #define DEFAULT_SS_EXECUTABLE       "boincscr"
 #endif
 
-
 #endif
diff --git a/lib/coproc.h b/lib/coproc.h
index 5f011c7..2eb84b3 100644
--- a/lib/coproc.h
+++ b/lib/coproc.h
@@ -260,11 +260,11 @@ struct COPROC {
     COPROC() {
         clear();
     }
-    bool device_num_exists(int n) {
+    int device_num_index(int n) {
         for (int i=0; i<count; i++) {
-            if (device_nums[i] == n) return true;
+            if (device_nums[i] == n) return i;
         }
-        return false;
+        return -1;
     }
     void merge_opencl(
         std::vector<OPENCL_DEVICE_PROP> &opencls, 
diff --git a/lib/crypt.cpp b/lib/crypt.cpp
index 348efba..621a54e 100644
--- a/lib/crypt.cpp
+++ b/lib/crypt.cpp
@@ -345,7 +345,9 @@ int check_file_signature(
     clear_signature.len = MD5_LEN;
     retval = decrypt_public(key, signature, clear_signature);
     if (retval) {
-        fprintf(stderr, "check_file_signature: decrypt_public error %d\n", retval);
+        fprintf(stderr,
+            "check_file_signature: decrypt_public error %d\n", retval
+        );
         return retval;
     }
     answer = !strncmp(md5_buf, clear_buf, n);
diff --git a/lib/crypt_prog.cpp b/lib/crypt_prog.cpp
index d017411..3d45361 100644
--- a/lib/crypt_prog.cpp
+++ b/lib/crypt_prog.cpp
@@ -400,4 +400,4 @@ int main(int argc, char** argv) {
     return 0;
 }
 
-const char *BOINC_RCSID_6633b596b9 = "$Id: crypt_prog.cpp 25244 2012-02-13 08:41:48Z davea $";
+const char *BOINC_RCSID_6633b596b9 = "$Id$";
diff --git a/lib/diagnostics_win.cpp b/lib/diagnostics_win.cpp
index da571f5..edb47c8 100644
--- a/lib/diagnostics_win.cpp
+++ b/lib/diagnostics_win.cpp
@@ -330,7 +330,7 @@ int diagnostics_get_process_information(PVOID* ppBuffer, PULONG pcbBuffer) {
     do {
         *ppBuffer = HeapAlloc(hHeap, HEAP_ZERO_MEMORY, *pcbBuffer);
         if (*ppBuffer == NULL) {
-            retval = ERROR_NOT_ENOUGH_MEMORY;
+            return ERROR_NOT_ENOUGH_MEMORY;
         }
 
         Status = pNTQSI(
@@ -1630,17 +1630,27 @@ int diagnostics_dump_exception_record(PEXCEPTION_POINTERS pExPtrs) {
             break;
         case EXCEPTION_ACCESS_VIOLATION:
             strcpy(status, "Access Violation");
+            strcpy(substatus, "");
             if (pExPtrs->ExceptionRecord->NumberParameters == 2) {
                 switch(pExPtrs->ExceptionRecord->ExceptionInformation[0]) {
                 case 0: // read attempt
-                    sprintf(substatus, "read attempt to address 0x%8.8X", pExPtrs->ExceptionRecord->ExceptionInformation[1]);
+                    sprintf(substatus,
+                        "read attempt to address 0x%8.8X",
+                        pExPtrs->ExceptionRecord->ExceptionInformation[1]
+                    );
                     break;
                 case 1: // write attempt
-                    sprintf(substatus, "write attempt to address 0x%8.8X", pExPtrs->ExceptionRecord->ExceptionInformation[1]);
+                    sprintf(substatus,
+                        "write attempt to address 0x%8.8X",
+                        pExPtrs->ExceptionRecord->ExceptionInformation[1]
+                    );
                     break;
                 }
             }
-            fprintf(stderr, "Reason: %s (0x%x) at address 0x%p %s\n\n", status, exception_code, exception_address, substatus);
+            fprintf(stderr,
+                "Reason: %s (0x%x) at address 0x%p %s\n\n",
+                status, exception_code, exception_address, substatus
+            );
             break;
         case EXCEPTION_DATATYPE_MISALIGNMENT:
             diagnostics_dump_generic_exception("Data Type Misalignment", exception_code, exception_address);
diff --git a/lib/filesys.cpp b/lib/filesys.cpp
index a9c84d2..9020300 100644
--- a/lib/filesys.cpp
+++ b/lib/filesys.cpp
@@ -412,7 +412,7 @@ int dir_size(const char* dirpath, double& size, bool recurse) {
     } while (FindNextFileA(hFind, &findData));
 	::FindClose(hFind);
 #else
-    char filename[1024], subdir[1024];
+    char filename[MAXPATHLEN], subdir[MAXPATHLEN];
     int retval=0;
     DIRREF dirp;
     double x;
@@ -541,7 +541,7 @@ int boinc_copy(const char* orig, const char* newf) {
     }
     return 0;
 #elif defined(__EMX__)
-    char cmd[1024];
+    char cmd[2*MAXPATHLEN];
     sprintf(cmd, "copy \"%s\" \"%s\"", orig, newf);
     return system(cmd);
 #else
@@ -652,11 +652,11 @@ int boinc_chown(const char* path, gid_t gid) {
 // create directories dirpath/a, dirpath/a/b etc.
 //
 int boinc_make_dirs(const char* dirpath, const char* filepath) {
-    char buf[1024], oldpath[1024], newpath[1024];
+    char buf[MAXPATHLEN], oldpath[MAXPATHLEN], newpath[MAXPATHLEN];
     int retval;
     char *p, *q;
 
-    if (strlen(filepath) + strlen(dirpath) > 1023) return ERR_BUFFER_OVERFLOW;
+    if (strlen(filepath) + strlen(dirpath) > MAXPATHLEN-1) return ERR_BUFFER_OVERFLOW;
     strcpy(buf, filepath);
     strcpy(oldpath, dirpath);
 
@@ -804,31 +804,3 @@ int get_filesystem_info(double &total_space, double &free_space, char* path) {
 #endif
     return 0;
 }
-
-#ifndef _WIN32
-
-int get_file_dir(char* filename, char* dir) {
-    char buf[8192], *p, path[MAXPATHLEN];
-    struct stat sbuf;
-    int retval;
-
-    p = getenv("PATH");
-    if (!p) return ERR_NOT_FOUND;
-    strcpy(buf, p);
-
-    p = strtok(buf, ":");
-    while (p) {
-        sprintf(path, "%s/%s", p, filename);
-        retval = stat(path, &sbuf);
-        if (!retval && (sbuf.st_mode & 0111)) {
-            strcpy(dir, p);
-            return 0;
-        }
-        p = strtok(0, ":");
-    }
-    return ERR_NOT_FOUND;
-}
-
-
-#endif
-
diff --git a/lib/filesys.h b/lib/filesys.h
index 25a7555..9c7fa4e 100644
--- a/lib/filesys.h
+++ b/lib/filesys.h
@@ -18,12 +18,8 @@
 #ifndef _FILESYS_
 #define _FILESYS_
 
-#define FILE_RETRY_INTERVAL 5
-    // On Windows, retry for this period of time, since some other program
-    // (virus scan, defrag, index) may have the file open.
-
-
 #if defined(_WIN32) && !defined(__CYGWIN32__)
+#include "boinc_win.h"
 #else
 #include <dirent.h>
 #include <grp.h>
@@ -33,12 +29,15 @@
 #ifdef __cplusplus
 #include <string>
 #endif
+#endif /* !WIN32 */
 
 #ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
+#define MAXPATHLEN 4096
 #endif
 
-#endif /* !WIN32 */
+#define FILE_RETRY_INTERVAL 5
+    // On Windows, retry for this period of time, since some other program
+    // (virus scan, defrag, index) may have the file open.
 
 #ifdef __cplusplus
 extern "C" {
@@ -126,15 +125,6 @@ struct FILE_LOCK {
     int unlock(const char* filename);
 };
 
-#ifndef _WIN32
-
-// search PATH, find the directory that a program is in, if any
-//
-extern int get_file_dir(char* filename, char* dir);
-
-#endif
-
-
 #endif /* c++ */
 
 #endif /* double-inclusion protection */
diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h
index 4900429..f3b2e7f 100644
--- a/lib/gui_rpc_client.h
+++ b/lib/gui_rpc_client.h
@@ -33,13 +33,14 @@
 #include <locale.h>
 #endif
 
-#include "miofile.h"
-#include "prefs.h"
-#include "hostinfo.h"
+#include "cc_config.h"
 #include "common_defs.h"
-#include "notice.h"
+#include "filesys.h"
+#include "hostinfo.h"
+#include "miofile.h"
 #include "network.h"
-#include "cc_config.h"
+#include "notice.h"
+#include "prefs.h"
 
 struct GUI_URL {
     std::string name;
@@ -199,7 +200,9 @@ struct APP_VERSION {
     char platform[64];
     char plan_class[64];
     double avg_ncpus;
-    double ncudas;
+    int gpu_type;
+        // PROC_TYPE_xx
+    double gpu_usage;
     double natis;
     double gpu_ram;
     double flops;
@@ -367,6 +370,9 @@ struct GR_PROXY_INFO {
     void clear();
 };
 
+// Represents the entire client state.
+// Call get_state() infrequently.
+//
 struct CC_STATE {
     std::vector<PROJECT*> projects;
     std::vector<APP*> apps;
@@ -376,11 +382,12 @@ struct CC_STATE {
     std::vector<std::string> platforms;
         // platforms supported by client
     GLOBAL_PREFS global_prefs;  // working prefs, i.e. network + override
-    VERSION_INFO version_info;  // populated only if talking to pre-5.6 CC
+    VERSION_INFO version_info;  // populated only if talking to pre-5.6 client
     bool executing_as_daemon;   // true if client is running as a service / daemon
     HOST_INFO host_info;
-    bool have_nvidia;           // redundant; include for compat (set by <have_cuda/>)
-    bool have_ati;              // redundant; include for compat
+    TIME_STATS time_stats;
+    bool have_nvidia;           // deprecated; include for compat (set by <have_cuda/>)
+    bool have_ati;              // deprecated; include for compat
 
     CC_STATE();
     ~CC_STATE();
diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp
index 38892ad..86474ca 100644
--- a/lib/gui_rpc_client_ops.cpp
+++ b/lib/gui_rpc_client_ops.cpp
@@ -76,6 +76,22 @@ using std::string;
 using std::vector;
 using std::sort;
 
+int TIME_STATS::parse(XML_PARSER& xp) {
+    memset(this, 0, sizeof(TIME_STATS));
+    while (!xp.get_tag()) {
+        if (xp.match_tag("/time_stats")) return 0;
+        if (xp.parse_double("now", now)) continue;
+        if (xp.parse_double("on_frac", on_frac)) continue;
+        if (xp.parse_double("connected_frac", connected_frac)) continue;
+        if (xp.parse_double("cpu_and_network_available_frac", cpu_and_network_available_frac)) continue;
+        if (xp.parse_double("active_frac", active_frac)) continue;
+        if (xp.parse_double("gpu_active_frac", gpu_active_frac)) continue;
+        if (xp.parse_double("client_start_time", client_start_time)) continue;
+        if (xp.parse_double("previous_uptime", previous_uptime)) continue;
+    }
+    return ERR_XML_PARSE;
+}
+
 int DAILY_XFER::parse(XML_PARSER& xp) {
     while (!xp.get_tag()) {
         if (xp.match_tag("/dx")) return 0;
@@ -477,20 +493,12 @@ APP_VERSION::~APP_VERSION() {
 }
 
 int APP_VERSION::parse_coproc(XML_PARSER& xp) {
-    char type_buf[256];
-    double count = 0;
-
     while (!xp.get_tag()) {
         if (xp.match_tag("/coproc")) {
-            if (!strcmp(type_buf, "CUDA")) {
-                ncudas = count;
-            } else if (!strcmp(type_buf, GPU_TYPE_ATI)) {
-                natis = count;
-            }
             return 0;
         }
-        if (xp.parse_str("type", type_buf, sizeof(type_buf))) continue;
-        if (xp.parse_double("count", count)) continue;
+        if (xp.parse_int("gpu_type", gpu_type)) continue;
+        if (xp.parse_double("gpu_usage", gpu_usage)) continue;
     }
     return ERR_XML_PARSE;
 }
@@ -948,6 +956,10 @@ int CC_STATE::parse(XML_PARSER& xp) {
             host_info.parse(xp);
             continue;
         }
+        if (xp.match_tag("time_stats")) {
+            time_stats.parse(xp);
+            continue;
+        }
         if (xp.parse_bool("have_cuda", have_nvidia)) continue;
         if (xp.parse_bool("have_ati", have_ati)) continue;
     }
@@ -1048,7 +1060,7 @@ RESULT* CC_STATE::lookup_result(PROJECT* project, const char* name) {
 RESULT* CC_STATE::lookup_result(const char* url, const char* name) {
     unsigned int i;
     for (i=0; i<results.size(); i++) {
-        if (strcmp(results[i]->project->master_url, url)) continue;
+        if (strcmp(results[i]->project_url, url)) continue;
         if (!strcmp(results[i]->name, name)) return results[i];
     }
     return 0;
diff --git a/lib/gui_rpc_client_print.cpp b/lib/gui_rpc_client_print.cpp
index 2d0d4c6..a9e7fd5 100644
--- a/lib/gui_rpc_client_print.cpp
+++ b/lib/gui_rpc_client_print.cpp
@@ -210,6 +210,17 @@ void SIMPLE_GUI_INFO::print() {
     }
 }
 
+void TIME_STATS::print() {
+    printf("  now: %f\n", now);
+    printf("  on_frac: %f\n", on_frac);
+    printf("  connected_frac: %f\n", connected_frac);
+    printf("  cpu_and_network_available_frac: %f\n", cpu_and_network_available_frac);
+    printf("  active_frac: %f\n", active_frac);
+    printf("  gpu_active_frac: %f\n", gpu_active_frac);
+    printf("  client_start_time: %f\n", client_start_time);
+    printf("  previous_uptime: %f\n", previous_uptime);
+}
+
 void CC_STATE::print() {
     unsigned int i;
     printf("======== Projects ========\n");
@@ -237,6 +248,8 @@ void CC_STATE::print() {
         printf("%d) -----------\n", i+1);
         results[i]->print();
     }
+    printf("\n======== Time stats ========\n");
+    time_stats.print();
 }
 
 void print_status(
diff --git a/lib/mac/QBacktrace.c b/lib/mac/QBacktrace.c
new file mode 100644
index 0000000..af09f66
--- /dev/null
+++ b/lib/mac/QBacktrace.c
@@ -0,0 +1,2531 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/*
+ *  QBacktrace.c
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames below.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QBacktrace.c
+
+    Contains:   Code for generating backtraces.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QBacktrace.c,v $
+Revision 1.2  2007/03/02 13:00:08         
+Quieten some warnings.
+
+Revision 1.1  2007/03/02 12:19:49         
+First checked in.
+
+
+*/
+
+/////////////////////////////////////////////////////////////////
+
+// Compatibility with OS 10.5 SDK and later
+#ifdef __DARWIN_UNIX03
+#undef __DARWIN_UNIX03
+#endif
+#define _NONSTD_SOURCE 1
+#define __DARWIN_UNIX03 0
+
+// Our Prototypes
+
+#include "QBacktrace.h"
+
+// Mac OS Interfaces
+
+#include <TargetConditionals.h>
+#include <AvailabilityMacros.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <pthread.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <mach-o/arch.h>
+
+#if defined(__cplusplus)
+	extern "C" {
+#endif
+
+// Some extra Mach interfaces that we don't need in the public header.
+// Again, we need C++ guards.
+
+// We want both PowerPC and Intel thread state information.
+// By default, the system only gives us the one that's appropriate 
+// for our machine.  So we include both here.
+
+
+#if TARGET_CPU_PPC
+#include <mach/ppc/thread_status.h>
+#endif
+#include <mach/i386/thread_status.h>
+
+#if defined(__cplusplus)
+	}
+#endif
+
+#include "QSymbols.h"
+
+/////////////////////////////////////////////////////////////////
+
+// A new architecture will require substantial changes to this file.
+
+#if ! (TARGET_CPU_PPC || TARGET_CPU_PPC64 || TARGET_CPU_X86 || TARGET_CPU_X86_64)
+	#error QBacktrace: What architecture?
+#endif
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Architecture Specification
+
+// This is an extra flag for the flags field of the QBTFrame structure.
+// It is true if the symbol field of that structure was allocated by 
+// QBacktrace and should be disposed by QBacktraceDisposeSymbols.
+
+enum {
+    kQBTFrameSymbolNeedsDisposeMask = 0x0100
+};
+
+typedef struct QBTContext QBTContext;
+	// forward declaration
+
+// Architecture Callbacks -- Called by the core to do architecture-specific tasks.
+
+typedef int  (*QBTHandleLeafProc)(QBTContext *context, QTMAddr *pcPtr, QTMAddr *fpPtr);
+	// This callback is called by the core to start a backtrace. 
+	// It should extract the first PC and frame from the thread state 
+	// in the context and return them to the core.  Also, if the 
+	// routine detects a frameless leaf routine, it should add a 
+	// dummy frame for that routine (by calling AddFrame).
+	//
+	// On entry, context will be a valid context (as determined by QBTContextIsValid).
+	// On entry, pcPtr will not be NULL.
+	// On entry, fpPtr will not be NULL.
+	// Returns an errno-style error code.
+	// On success, *pcPtr must be the PC of the first non-leaf frame.
+	// On success, *fpPtr must be the frame pointer of the first non-leaf frame.
+
+typedef bool (*QBTValidPCProc)(QBTContext *context, QTMAddr pc);
+	// This callback is called by the core to check whether a PC address 
+	// is valid.  This is architecture-specific; for example, on PowerPC a 
+	// PC value must be a multiple of 4, whereas an Intel an instruction 
+	// can start at any address.
+	//
+	// At a minimum, an implementation is expected to check the PC's alignment 
+	// and read the instruction at the PC.
+	//
+	// IMPORTANT:
+	// The core code assumes that (QTMAddr) -1 is never a valid PC. 
+	// If that isn't true for your architecture, you'll need to eliminate 
+	// that assumption from the core.
+	// 
+	// On entry, context will be a valid context (as determined by QBTContextIsValid).
+	// On entry, pc can be any value.
+	// Returns true if the PC looks reasonably valid, false otherwise.
+
+typedef int  (*QBTGetFrameNextPCProc)(QBTContext *context, QTMAddr thisFrame, QTMAddr nextFrame, QTMAddr *nextPCPtr);
+	// This callback is called by the core to get the PC associated with 
+	// the next frame.  This is necessary because different architectures 
+	// store the PC in different places.  Specifically, PowerPC stores 
+	// the PC of a frame in that frame, whereas Intel stores the PC of 
+	// a frame in the previous frame (that is, the PC value in the frame 
+	// is actually a return address).
+	//
+	// On entry, context will be a valid context (as determined by QBTContextIsValid).
+	// On entry, thisFrame will be a valid frame.
+	// On entry, nextFrame will be the valid frame following thisFrame.
+	// On entry, nextPCPtr will not be NULL.
+	// Returns an errno-style error code.
+	// On success, *nextPCPtr must be the PC associated with nextFrame.
+
+typedef int  (*QBTCrossSignalFrameProc)(QBTContext *context, QTMAddr thisFrame, QTMAddr *nextPCPtr, QTMAddr *nextFramePtr);
+	// This callback is called by the core when it detects a cross signal 
+	// frame and wants to cross that frame in an architecture-specific 
+	// manner.  The code gets a pointer to the cross-signal handler frame 
+	// and is expected to return the PC and frame pointer of the first 
+	// non-leaf frame on the other side.  Furthermore, it must detect if 
+	// the first frame on the other side is a leaf frame and add a 
+	// dummy frame for that routine (by calling AddFrame) before returning.
+	//
+	// An implementation does not have to check the validity of the 
+	// returned PC and frame.  The core will do that for you.
+	// 
+	// On entry, context will be a valid context (as determined by QBTContextIsValid).
+	// On entry, thisFrame will be a valid cross-signal handler frame.
+	// On entry, nextPCPtr will not be NULL.
+	// On entry, nextFramePtr will not be NULL.
+	// Returns an errno-style error code.
+	// On success, *nextPCPtr must be the PC of the next non-leaf frame.
+	// On success, *nextFramePtr must be the PC of the next non-leaf frame.
+
+// Architecture Specification Structure -- Aggregates all of the information 
+// associated with a particular architecture.
+
+struct QBTArchInfo {
+    const char *                name;                       // just for debugging
+
+	// Information to identify the architecture
+	
+    cpu_type_t					cputype;					// per NXGetLocalArchInfo in <mach-o/arch.h>
+    cpu_subtype_t				cpusubtype;					// per NXGetLocalArchInfo in <mach-o/arch.h>, 0 for wildcard
+	bool						is64Bit;
+
+	// Misc information about the architecture
+	
+	QTMAddr                     frameAlignMask;				// mask to detect frame misalignment
+															// FP & frameAlignMask must be 0 for a valid frame
+	// Architecture-specific backtrace callbacks
+	
+	QBTHandleLeafProc           handleLeaf;					// described in detail above
+	QBTValidPCProc              validPC;					// described in detail above
+	QBTGetFrameNextPCProc       getFrameNextPC;				// described in detail above
+	QBTCrossSignalFrameProc     crossSignalFrame;			// described in detail above
+	
+	// Specification of how to call thread_get_state
+	
+	thread_state_flavor_t		stateFlavor;
+	mach_msg_type_number_t		stateCount;
+};
+typedef struct QBTArchInfo QBTArchInfo;
+
+static const QBTArchInfo kArchitectures[];
+	// forward declaration
+
+static const QBTArchInfo * GetTaskArch(QMOImageRef qmoImage)
+	// Returns a pointer to the architecture associated with the specific 
+	// task, or NULL if it's an architecture we don't know about. 
+{
+	const QBTArchInfo *     result;
+    const QBTArchInfo *     thisArch;
+    bool                    is64Bit;
+    cpu_type_t              cputype;
+    cpu_subtype_t           cpusubtype;
+	
+    assert(qmoImage != NULL);
+    
+	result = NULL;
+
+    // Get the architecture characteristics from the image.
+    
+    is64Bit    = QMOImageIs64Bit(qmoImage);
+    cputype    = QMOImageGetCPUType(qmoImage);
+    cpusubtype = QMOImageGetCPUSubType(qmoImage);
+
+    // Look through the architecture array for an architecture that matches the 
+    // target architecture.  Also, we prefer architectures with an exact CPU 
+    // subtype match, but we'll accept those with a 0 CPU subtype.
+    
+    thisArch = &kArchitectures[0];
+    while ( (thisArch->cputype != 0) && (result == NULL) ) {
+        if (   (thisArch->cputype == cputype)
+            && ((thisArch->cpusubtype == 0) || (thisArch->cpusubtype == cpusubtype))
+            && (thisArch->is64Bit == is64Bit) 
+           ) {
+            result = thisArch;
+        } else {
+            thisArch += 1;
+        }
+    }
+
+	return result;
+}
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Backtrace Core
+
+// Memory Read Callback
+
+typedef int (*QBTReadBytesProc)(QBTContext *context, QTMAddr src, void *dst, size_t size);
+	// This function pointer is called by the core backtrace code 
+	// when it needs to read memory.  The callback should do a safe 
+	// read of size bytes from src into the buffer specified by 
+	// dst.  By "safe" we mean that the routine should return an error 
+	// if the read can't be done (typically because src is a pointer to 
+	// unmapped memory).  It does not need to do any word size adjustment 
+    // or byte swapping.
+	//
+	// On entry, context will be a valid context (as determined by QBTContextIsValid).
+	// On entry, src can be any value.
+	// On entry, dst will not be NULL.
+	// On entry, size will be greater than 0.
+	// Returns an errno-style error code.
+	// On success, the routine has copied size bytes of data from the address src 
+	// in the remote task to the address dst in the local task.
+	// On error, the value at dst is unspecified.
+	//
+	// Note:
+	// In previous versions of QBacktrace, I supported alternative ways to 
+	// read bytes from the target.  For example, I could use the Carbon 
+	// exception handler mechanism <CoreServices/MachineExceptions.h> to read 
+	// data from the current task in a safe fashion.  This was useful because 
+	// it would work on both Mac OS X and traditional Mac OS.  Now that I 
+	// require Mac OS X and Mach-O, I can just use the Mach routines to do 
+	// my reading.  However, I've left the abstraction layer in place, 
+	// Just In Case (tm).
+
+struct QBTContext {
+
+	// Internal parameters that are set up by the caller 
+	// of the core backtrace code.
+	
+	const QBTArchInfo *		arch;                   // architecture specific info
+	task_t					task;                   // target task
+    QSymbolsRef             symRef;                 // symbols object for target task
+    bool                    createdSymRef;          // true if we created the symbols object
+	thread_state_flavor_t	threadStateFlavor;		// flavor of thread state
+	const void *            threadState;			// architecture-specific current thread state
+														// for example, on Intel this is x86_thread_state32_t
+	size_t					threadStateSize;		// size of threadState
+	QBTReadBytesProc		readBytes;				// described in detail above
+
+	// Stuff worked out internally by MachInitContextFromTask.
+	
+	bool					swapBytes;				// true if target and current task have different byte orders
+	QTMAddr					sigTrampLowerBound;		// bounds of _sigtramp in target task
+	QTMAddr					sigTrampUpperBound;
+	
+	// Parameters from client.
+	
+	QTMAddr                 stackBottom;            // bounds of stack in target task
+	QTMAddr                 stackTop;
+	QBTFrame *              frameArray;				// array contents filled out by core
+	size_t			        frameArrayCount;        // size of frameArray
+	size_t			        frameCountOut;			// returned by core
+};
+
+#if ! defined(NDEBUG)
+
+    // Because QBTContextIsValid is only referenced by assert macros, and these 
+    // are disabled by NDEBUG, we have to conditionalise this code based on 
+    // NDEBUG lest we get a "defined but not used" warning.
+
+    static bool QBTContextIsValid(const QBTContext *context)
+    {
+        return (context != NULL)
+            && (context->arch != NULL)
+            && (context->task != MACH_PORT_NULL)
+            && (context->symRef != NULL)
+            && ( (context->threadState == NULL) == (context->threadStateSize == 0) )
+            && (context->readBytes != NULL)
+            && (context->sigTrampLowerBound != 0)
+            && (context->sigTrampLowerBound < context->sigTrampUpperBound)
+            && (context->stackBottom <= context->stackTop)
+            && ((context->frameArrayCount == 0) || (context->frameArray != NULL));
+    }
+
+#endif
+
+static int BacktraceAdorn(QBTContext *context)
+    // Add symbols to all of the backtrace frames referenced by the context. 
+    // Uses the 'bulk' symbols-to-address routine, in the hope that this will 
+    // be faster one day.  Also uses the kQBTFrameSymbolNeedsDisposeMask flag 
+    // to tag each frame to indicate whether the client needs to dispose it.
+    //
+    // Note that failing to find symbol information for a particular address 
+    // will not cause this routine to fail.  Rather, the only causes of failure 
+    // are really bad things, like running out of memory.
+{
+    int                 err;
+    size_t              frameCount;
+    size_t              frameIndex;
+    QTMAddr *           addrs;
+    QSymSymbolInfo *    infos;
+    
+    assert(context != NULL);
+    assert(context->symRef != NULL);
+    assert(context->frameArray != NULL);
+    assert(context->frameArrayCount != 0);
+    assert(context->frameCountOut != 0);
+
+    // Only do the frames that actually exist.
+    
+    frameCount = context->frameCountOut;
+    if (frameCount > context->frameArrayCount) {
+        frameCount = context->frameArrayCount;
+    }
+    assert(frameCount > 0);         // because of our pre-conditions
+    
+    // Allocate arrays for call QSymGetSymbolsForAddresses.
+    
+    addrs = (QTMAddr *)        calloc(frameCount, sizeof(*addrs));
+    infos = (QSymSymbolInfo *) calloc(frameCount, sizeof(*infos));
+    err = 0;
+    if ((addrs == NULL) || (infos == NULL)) {
+        err = ENOMEM;
+    }
+
+    // Set up the addrs array and call QSymGetSymbolsForAddresses.
+    
+    if (err == 0) {
+        for (frameIndex = 0; frameIndex < frameCount; frameIndex++) {
+            addrs[frameIndex] = context->frameArray[frameIndex].pc;
+        }
+        
+        err = QSymGetSymbolsForAddresses(
+            context->symRef,
+            frameCount,
+            addrs,
+            infos
+        );
+    }
+    
+    // Place the symbol information into the output frames.
+    //
+    // For error handling to work, you must not error past this point.  Otherwise 
+    // we break the post-condition that the user doesn't need to do anything on 
+    // error.
+    
+    if (err == 0) {
+        for (frameIndex = 0; frameIndex < frameCount; frameIndex++) {
+            if (infos[frameIndex].symbolType != kQSymNoSymbol) {
+                if (context->createdSymRef) {
+                    const char *    libName;
+                    
+                    // Within this block, we ignore any failures; they just leave 
+                    // the relevant string NULL, which the dispose routine can 
+                    // handle.
+                    
+                    context->frameArray[frameIndex].symbol  = strdup(infos[frameIndex].symbolName);
+                    
+                    libName = QMOImageGetFilePath(infos[frameIndex].symbolImage);
+                    if (libName != NULL) {
+                        context->frameArray[frameIndex].library = strdup(libName);
+                    }
+
+                    // Tell the dispose routine that we need to look at this frame.
+                    
+                    context->frameArray[frameIndex].flags |= kQBTFrameSymbolNeedsDisposeMask;
+                } else {
+                    assert(infos[frameIndex].symbolImage != NULL);
+                    context->frameArray[frameIndex].symbol  = infos[frameIndex].symbolName;
+                    context->frameArray[frameIndex].library = QMOImageGetFilePath(infos[frameIndex].symbolImage);
+                }
+                context->frameArray[frameIndex].offset = infos[frameIndex].symbolOffset;
+            }
+        }
+    }
+    
+    // Clean up.
+    
+    free(addrs);
+    free(infos);
+    
+    return err;
+}
+
+static int ReadAddr(QBTContext *context, QTMAddr addr, QTMAddr *valuePtr)
+	// Reads an address (that is, a pointer) from the target task, 
+	// returning an error if the memory is unmapped.
+	//
+	// On entry, context will be a valid context (as determined by QBTContextIsValid).
+	// On entry, addr can be any value.
+	// On entry, valuePtr must not be NULL.
+	// Returns an errno-style error code.
+	// On success, *valuePtr will be the value of the pointer stored at addr in 
+	// the target task.
+{
+	int			err;
+	QTMAddr     value;
+	
+	assert(QBTContextIsValid(context));
+	assert(valuePtr != NULL);
+	
+	if (context->arch->is64Bit) {
+
+		// Read directly into value, and then swap all 8 bytes.
+		
+		err = context->readBytes(context, addr, &value, sizeof(value));
+		if (err == 0) {
+			if (context->swapBytes) {
+				value = OSSwapInt64(value);
+			}
+		}
+	} else {
+		uint32_t	tmpAddr;
+		
+		// Read into a temporary address, swap 4 bytes, then copy that 
+		// into value.  tmpAddr is unsigned, so we zero fill the top 
+		// 32 bits.
+		
+		err = context->readBytes(context, addr, &tmpAddr, sizeof(tmpAddr));
+		if (err == 0) {
+			if (context->swapBytes) {
+				tmpAddr = OSSwapInt32(tmpAddr);
+			}
+			value = tmpAddr;
+		}
+	}
+	if (err == 0) {
+		*valuePtr = value;
+	}
+	
+	return err;
+}
+
+static void AddFrame(QBTContext *context, QTMAddr pc, QTMAddr fp, QBTFlags flags)
+	// Adds a frame to the end of the output array with the 
+	// value specified by pc, fp, and flags.
+	//
+	// On entry, context will be a valid context (as determined by QBTContextIsValid).
+{
+	// Only actually output the frame if the client supplied an array 
+	// and we we haven't filled it up yet.
+	
+	assert(QBTContextIsValid(context));
+	
+	if ( (context->frameArray != NULL) && (context->frameCountOut < context->frameArrayCount) ) {
+		QBTFrame *	frameOutPtr;
+
+		frameOutPtr = &context->frameArray[context->frameCountOut];
+		frameOutPtr->pc    = pc;
+		frameOutPtr->fp    = fp;
+		frameOutPtr->flags = flags;
+	}
+	
+	// Always increment the frame count.
+	
+	context->frameCountOut += 1;	
+}
+
+static int BacktraceCore(QBTContext *context, size_t *frameCountPtr)
+	// The core backtrace code.  This routine is called by all of the various 
+	// exported routines.  It implements the core backtrace functionality. 
+	// All of the parameters to this routine are contained within 
+	// the context.  This routine traces back through the stack (using the 
+	// readBytes callback in the context to actually read memory) creating 
+	// a backtrace.
+{
+	int			err;
+	QTMAddr		thisPC;
+	QTMAddr		thisFrame;
+	QTMAddr		lowerBound;
+	QTMAddr		upperBound;
+	bool		stopNow;
+	
+	assert(QBTContextIsValid(context));
+
+    // Check that the contents of the frame array, if any, are all zero.
+    // MachInitContextFromTask did this for us.  We need this to be done 
+    // to maintain our post-condition, and it would be wasteful to do it twice.
+    
+    #if ! defined(NDEBUG)
+        if (context->frameArray != NULL) {
+            size_t          byteCount;
+            size_t          byteIndex;
+            const char *    byteBase;
+            
+            byteCount = context->frameArrayCount * sizeof(*context->frameArray);
+            byteBase  = (const char *) context->frameArray;
+            for (byteIndex = 0; byteIndex < byteCount; byteIndex++) {
+                assert(byteBase[byteIndex] == 0);
+            }
+        }
+    #endif
+	
+	lowerBound = context->stackBottom;
+	upperBound = context->stackTop;
+	if (upperBound == 0) {
+		if (context->arch->is64Bit) {
+			// This actually generates a theoretical off-by-one error (a fp of 
+			// 0xFFFFFFFF FFFFFFFF is falsely considered invalid), but that's 
+			// not a problem in practice.
+			upperBound = (QTMAddr)0xFFFFFFFFFFFFFFFFLL;
+		} else {
+			upperBound = (QTMAddr)0x0000000100000000LL;
+		}
+	}
+	
+	// If you supply bounds, they must make sense.
+	
+	assert(upperBound >= lowerBound);
+
+	// Handle any leaf frames, and also return to us the initial 
+	// PC and FP.  A failure here is worthy of being reported as a total 
+    // failure of the routine, so we allow err to propagate.
+
+	assert(context->frameCountOut == 0);			// set up by memset in MachInitContextFromTask
+	err = context->arch->handleLeaf(context, &thisPC, &thisFrame);
+	
+	// Handle the normal frames.
+	
+	if (err == 0) {
+		stopNow = false;
+		do {
+			QBTFrame *  frameOutPtr;
+			QBTFrame	tmpFrameOut;
+			QTMAddr 	nextFrame;
+			QTMAddr 	nextPC;
+			
+			// Output to a tmpFrameOut unless the client has supplied 
+			// a buffer and there's sufficient space left in it.
+			//
+			// IMPORTANT:
+			// You can't just add the frame information (possibly by calling 
+			// AddFrame) at the end of this loop, because the crossSignalFrame 
+			// callback may add its own frame, and we have to make sure that 
+			// this frame is allocated before that one.
+			
+			if ( (context->frameArray != NULL) && (context->frameCountOut < context->frameArrayCount) ) {
+				frameOutPtr = &context->frameArray[context->frameCountOut];
+			} else {
+				frameOutPtr = &tmpFrameOut;
+			}
+
+			// Record this entry.
+			
+			frameOutPtr->pc    = thisPC;
+			frameOutPtr->fp    = thisFrame;
+			frameOutPtr->flags = 0;
+			
+			// Now set the flags to indicate the validity of specific information. 
+			
+			// Check the validity of the PC.  Don't set the err here; a bad PC value 
+			// does not cause us to quit the backtrace.
+			
+			if ( ! context->arch->validPC(context, thisPC) ) {
+				frameOutPtr->flags |= kQBTPCBadMask;
+			} else {
+				// On PowerPC I used to report the address of the call, 
+				// rather than the return address.  That was easy: I just 
+				// decremented the returned PC by 4.  However, this is 
+				// much harder on Intel, where instructions are of variable 
+				// length.  So, I decided to do what Apple's tools do, 
+				// and just report the return address.
+			}
+			
+			// Check the validity of the frame pointer.  A bad frame pointer *does* 
+			// cause us to stop tracing.
+			
+			if (	(thisFrame == 0) 
+				 || (thisFrame & context->arch->frameAlignMask) 
+				 || (thisFrame < lowerBound) 
+				 || (thisFrame >= upperBound) 
+			   ) {
+				frameOutPtr->flags |= kQBTFrameBadMask;
+				stopNow = true;
+			}
+
+			if ( ! stopNow ) {
+
+				// Move to the next frame, either by crossing a signal handler frame 
+				// or by the usual mechanism.
+				
+				if (	!(frameOutPtr->flags & kQBTPCBadMask) 
+					  && ( thisPC >= context->sigTrampLowerBound ) 
+					  && ( thisPC <  context->sigTrampUpperBound ) 
+				   ) {
+
+					// If this frame is running in _sigtramp, get nextPC and nextFrame 
+					// by delving into the signal handler stack block.
+                    
+                    // While developing the various per-architecture cross signal 
+                    // frame handlers, there are many cases where I want to look at 
+                    // the stack in detail.  In these circumstances, running under 
+                    // the debugger can be difficult because, for signals like 
+                    // SIGSEGV, GDB will catch the signal and not let you continue 
+                    // into the handler.  So I typically stop in the signal handler 
+                    // and then attach with GDB.  This code let's me do it without 
+                    // have to recompile.
+
+#if 0       // Added for BOINC
+                    #if !defined(NDEBUG)
+                        {
+                            static bool     sInited;
+                            static bool     sStop;
+                            const char *    envVar;
+                            
+                            if ( ! sInited ) {
+                                envVar = getenv("QBACKTRACE_STOP_FOR_SIGNALS");
+                                sStop = ( (envVar != NULL) && (atoi(envVar) != 0) );
+                                sInited = true;
+                            }
+                            if (sStop) {
+                                fprintf(stderr, "BacktraceCore: Waiting for debugger, pid = %ld\n", (long) getpid());
+                                pause();
+                            }
+                        }
+                    #endif
+#endif
+					frameOutPtr->flags |= kQBTSignalHandlerMask;
+					err = context->arch->crossSignalFrame(context, thisFrame, &nextPC, &nextFrame);
+                    
+                    // If we get an error crossing the signal frame, we just stop. 
+                    // The trace up to this point is probably OK.
+                    
+                    if (err != 0) {
+                        stopNow = true;
+                        err = 0;
+                    }
+				} else {
+				
+					// Read the next frame pointer.  A failure here causes us to quit 
+					// backtracing.  Note that we set kQBTFrameBadMask in frameOutPtr 
+					// because, if we can't read the contents of the frame pointer, the 
+					// frame pointer itself must be bad.
+					
+					err = ReadAddr(context, thisFrame, &nextFrame);
+					if (err != 0) {
+						frameOutPtr->flags |= kQBTFrameBadMask;
+						nextFrame = (QTMAddr) -1;
+                        
+                        stopNow = true;
+                        err = 0;
+					}
+					
+					// Also get the PC of the next frame, or set it to dummy value if 
+					// there is no next frame or we can't get the PC from that frame.
+
+					if (	(frameOutPtr->flags & kQBTFrameBadMask) 
+						 || (context->arch->getFrameNextPC(context, thisFrame, nextFrame, &nextPC) != 0) 
+					   ) {
+						nextPC = (QTMAddr) -1;		// an odd value, to trigger above check on next iteration
+					}
+				}
+
+				// Set up for the next iteration.
+				
+				if ( (err == 0) && ! stopNow ) {
+                                        context->frameCountOut += 1;
+                                        
+					lowerBound = thisFrame;
+					thisPC     = nextPC;
+					thisFrame  = nextFrame;
+				}
+			}
+		} while ( (err == 0) && ! stopNow );
+	}
+
+    // Adorn the backtrace with symbol information.
+    
+    if ( (err == 0) && (context->frameArray != NULL) && (context->frameArrayCount != 0) && (context->frameCountOut != 0) ) {
+        err = BacktraceAdorn(context);
+    }
+
+    // Clean up.
+    
+    if (err != 0) {
+        QBacktraceDisposeSymbols(context->frameArray, context->frameArrayCount);
+        if (context->frameArray != NULL) {
+            memset(context->frameArray, 0, context->frameArrayCount * sizeof(*context->frameArray));
+        }
+        context->frameCountOut = 0;
+    }
+    *frameCountPtr = context->frameCountOut;
+
+	assert(QBTContextIsValid(context));
+	
+	return err;
+}
+
+#pragma mark ***** Mach Infrastructure
+
+static int MachReadBytes(QBTContext *context, QTMAddr src, void *dst, size_t size)
+	// A memory read callback for Mach.  This simply calls through to our 
+    // QTaskMemory abstraction layer, which in turns calls mach_vm_read_overwrite.
+	//
+	// See the description of QBTReadBytesProc for information about 
+	// the parameters.
+{
+	assert(QBTContextIsValid(context));
+	assert(dst != NULL);
+	assert(size > 0);
+
+	return QTMRead(context->task, src, size, dst);
+}
+
+static void MachTermContext(QBTContext *context)
+    // Clean up after a MachInitContext.  It's safe to call this even 
+    // if MachInitContext fails.
+{
+    assert(context != NULL);
+    
+    if (context->createdSymRef) {
+        QSymDestroy(context->symRef);
+    }
+}
+
+static int MachInitContextFromTask(
+	QBTContext *			context,
+	task_t					task,
+    cpu_type_t              cputype,
+	QTMAddr                 stackBottom, 
+	QTMAddr                 stackTop,
+    QSymbolsRef             symRef,
+	QBTFrame *              frameArray, 
+	size_t					frameArrayCount
+)
+    // Initialise the backtrace context from numerous parameters, mostly supplied 
+    // by the client.  Even if this fails, it's safe to call MachTermContext.
+{
+    int             err;
+    QMOImageRef     qmoImage = 0;
+    
+    assert(context != NULL);
+    assert(task != MACH_PORT_NULL);
+	assert( ((stackBottom == 0) && (stackBottom == stackTop)) || (stackBottom < stackTop) );
+	assert( (frameArrayCount == 0) || (frameArray != NULL) );
+    
+    // Clear the context first, to make it safe to call MachTermContext.
+    
+	memset(context, 0, sizeof(*context));
+
+    // Stuff that can't fail
+    
+    // Zap the input array; the BacktraceCore requires this to make error 
+    // handling easier.
+    
+    if (frameArray != NULL) {
+        memset(frameArray, 0, frameArrayCount * sizeof(*frameArray));
+    }
+    
+    // General stuff
+    
+	context->stackBottom     = stackBottom;
+	context->stackTop        = stackTop;
+	context->frameArray      = frameArray;
+	context->frameArrayCount = frameArrayCount;
+
+    // Platform specific stuff
+    
+	context->readBytes       = MachReadBytes;
+	context->task            = task;
+
+    // Stuff that might fail.
+    
+    // Create a symbols object for the task, if necessary, and use that to get 
+    // some basic information about it.
+    
+    err = 0;
+    if (symRef == NULL) {
+        context->createdSymRef = true;
+        err = QSymCreateFromTask(context->task, (context->task != mach_task_self()), cputype, &context->symRef);
+    } else {
+        context->symRef = symRef;
+    }
+    if (err == 0) {
+        qmoImage = QSymGetExecutableImage(context->symRef);
+        if (qmoImage == NULL) {
+            err = EINVAL;
+        }
+    }
+    if (err == 0) {
+        context->swapBytes = QMOImageIsByteSwapped(qmoImage);
+
+        context->arch = GetTaskArch(qmoImage);
+        if (context->arch == NULL) {
+            err = EINVAL;
+        }
+    }
+    
+    // Determine the address of _sigtramp.
+    
+    if (err == 0) {
+        QSymSymbolInfo symInfo;
+        QSymSymbolInfo nextSymInfo;
+        
+        err = QSymGetAddressForSymbol(context->symRef, "/usr/lib/libSystem.B.dylib", "__sigtramp", &symInfo);
+        if (err == 0) {
+            context->sigTrampLowerBound = symInfo.symbolValue;
+        }
+        if (err == 0) {
+            err = QSymGetNextSymbol(context->symRef, &symInfo, &nextSymInfo);
+            if (err == 0) {
+                context->sigTrampUpperBound = nextSymInfo.symbolValue;
+            } else {
+                // If QSymGetNextSymbol fails, just take a guess.
+                
+                context->sigTrampUpperBound = context->sigTrampLowerBound + 256;
+                err = 0;
+            }
+        }
+    }
+
+	assert( (err != 0) || QBTContextIsValid(context) );
+
+    return err;
+}
+
+#pragma mark ***** CPU Specific
+
+#if TARGET_CPU_PPC
+
+#pragma mark - PowerPC
+
+/*	PowerPC Stack Frame Basics
+	--------------------------
+	
+	
+						Offset	Size	Purpose
+						------	----	-------
+	low memory
+	fp == sp == r1 ->	0		X		pointer to next frame
+						X		X		place to save CR
+						2X		X		place to save LR
+						3X		2X		reserved
+						5X		X		place to save TOC (CFM only)
+	high memory
+	
+						where X is the address size (4 bytes for 32-bits, 
+						8 bytes for 64-bits)
+					
+	To get from one frame to the next, you have to indirect an offset 
+	of 0.  To extract the PC from a frame (which, notably, is the 
+	address of the code running in that frame, not a return address), you 
+	have to indirect an offset of 2X bytes (8 or 16).
+	
+	There's enough commonality between 32- and 64-bit PowerPC architectures 
+	that it's easy to handle them both with the same code.
+*/
+
+static bool PowerPCIsSystemCall(QBTContext *context, QTMAddr pc)
+	// Using the PC from the thread state, walk back through 
+	// the code stream for 3 instructions looking for a "sc" instruction. 
+	// If we find one, it's almost certain that we're in a system call 
+	// frameless leaf routine.
+{
+	int			err;
+	bool		isSystemCall;
+	int			count;
+	uint8_t		inst[4];
+	
+	isSystemCall = false;
+	count = 0;
+	do {
+		err = context->readBytes(context, pc, &inst, sizeof(inst));
+		if (err == 0) {
+			isSystemCall = (inst[0] == 0x44)		// PPC "sc" instruction
+			            && (inst[1] == 0x00)		// PPC instructions are always big 
+						&& (inst[2] == 0x00)		// endian, so we compare it byte at 
+						&& (inst[3] == 0x02);		// time for endian neutrality
+						
+		}
+		if ( (err == 0) && ! isSystemCall ) {
+			count += 1;
+			pc -= sizeof(inst);
+		}
+	} while ( (err == 0) && ! isSystemCall && (count < 3) );
+	err = 0;
+	
+	return isSystemCall;
+}
+
+static int PowerPCHandleLeaf(QBTContext *context, QTMAddr *pcPtr, QTMAddr *framePtr)
+	// This is the handleLeaf routine for the PowerPC 
+	// architecture.  See the description of QBTHandleLeafProc 
+	// for a detailed discussion of its parameters.
+	//
+	// The top most frame may be in a weird state because of the 
+	// possible variations in the routine prologue.  There are a 
+	// variety of combinations, such as:
+	//
+	// 1. a normal routine, with its return address stored in 
+	//    its caller's stack frame
+	//
+	// 2. a system call routine, which is a leaf routine with 
+	//    no frame and the return address is in LR
+	//
+	// 3. a leaf routine with no frame, where the return address 
+	//    is in LR
+	//
+	// 4. a leaf routine with no frame that accesses a global, where 
+	//    the return address is in r0
+	//
+	// 5. a normal routine that was stopped midway through 
+	//    constructing its prolog, where the return address is 
+	//    typically in r0
+	//
+	// Of these, 1 and 2 are most common, and they're the cases I 
+	// handle.  General support for all of the cases requires the 
+	// ability to accurately determine the start of the routine 
+	// which is not something that I can do with my current 
+	// infrastructure.
+	//
+	// Note that don't handle any cases where the return address is 
+	// in r0, although r0 is available as part of the threadState 
+	// if I need it in the future.
+{
+#ifdef __LP64__
+    return EINVAL;
+#else
+	int		err;
+	QTMAddr	pc;
+	QTMAddr	lr;
+    QTMAddr r1;
+	
+	// Get the pc and lr from the thread state.
+	
+    err = 0;
+    switch (context->threadStateFlavor) {
+        case PPC_THREAD_STATE:
+            pc = ((const ppc_thread_state_t *) context->threadState)->srr0;
+            lr = ((const ppc_thread_state_t *) context->threadState)->lr;
+            r1 = ((const ppc_thread_state_t *) context->threadState)->r1;
+            break;
+        case PPC_THREAD_STATE64:
+            pc = ((const ppc_thread_state64_t *) context->threadState)->srr0;
+            lr = ((const ppc_thread_state64_t *) context->threadState)->lr;
+            r1 = ((const ppc_thread_state64_t *) context->threadState)->r1;
+            break;
+
+        default:
+            err = EINVAL;
+            break;
+    }
+
+	// If we find that we're in a system call frameless leaf routine, 
+	// add a dummy stack frame (with no frame, because the frame actually 
+	// belows to frameArray[1]).
+
+    if (err == 0) {
+        if ( PowerPCIsSystemCall(context, pc) ) {
+
+            AddFrame(context, pc, 0, kQBTFrameBadMask);
+
+            pc = lr;
+        }
+
+        // Pass the initial pc and frame back to the caller.
+        
+        *pcPtr    = pc;
+        *framePtr = r1;
+    }
+
+	return err;
+#endif
+}
+
+static bool  PowerPCValidPC(QBTContext *context, QTMAddr pc)
+	// This is the validPC routine for the PowerPC 
+	// architecture.  See the description of 
+	// QBTValidPCProc for a detailed discussion 
+	// of its parameters.
+	//
+	// PowerPC instructions must be word aligned.  Also, I check that 
+	// it's possible to read the instruction.  I don't do anything 
+	// clever like check that the resulting value is a valid instruction.
+{
+	uint32_t	junkInst;
+	
+	return ((pc & 0x03) == 0) && (context->readBytes(context, pc, &junkInst, sizeof(junkInst)) == 0);
+}
+
+static int PowerPCGetFrameNextPC(QBTContext *context, QTMAddr thisFrame, QTMAddr nextFrame, QTMAddr *nextPCPtr)
+	// This is the getFrameNextPC routine for the PowerPC 
+	// architecture.  See the description of 
+	// QBTGetFrameNextPCProc for a detailed discussion 
+	// of its parameters.
+{
+    #pragma unused(thisFrame)
+    #pragma unused(nextFrame)
+	QTMAddr	offset;
+	
+	if ( context->arch->is64Bit ) {
+		offset = 16;
+	} else {
+		offset = 8;
+	}
+	
+	return ReadAddr(context, nextFrame + offset, nextPCPtr);
+}
+
+/*	PowerPC Signal Stack Frames
+	---------------------------
+	In the current Mac OS X architecture, there is no guaranteed reliable 
+	way to backtrace a PowerPC signal stack frame.  The problem is that the 
+	kernel pushes a variable amount of data on to the stack when it invokes the 
+	user space signal trampoline (_sigtramp), and the only handle to the 
+	information about how much data was pushed is passed in a register 
+	parameter to _sigtramp.  _sigtramp stashes that value away in a 
+	non-volatile register.  So, when _sigtramp calls the user-supplied 
+	signal handler, there's no way to work out where that register 
+	ends up being saved.
+	
+	Thus, we devolve into guesswork.  It turns out that the offset from 
+	the stack of the kernel data to the information we need (the place 
+	where the interrupted thread's registers were stored) is a (relatively) 
+	constant for any given system release.  So, we can just simply add the 
+	appropriate offset to the frame pointer and grab the data we need.
+	
+	On recent systems (10.3 and later) this fails if the signal handle 
+	requests 'dual contexts', that is, it requests both 32- and 64-bit 
+	PowerPC registers.  In that case, the size of the pushed data changes, 
+	and that affects the relative alignment of the data and the stack 
+	pointer, and things break.  I don't know of any way to work around 
+	this <rdar://problem/4411774>.
+	
+	Finally, these constant vary from release to release. 
+	This code handles the significant cases that I know about (Mac OS X 10.1.x 
+	and earlier, Mac OS X 10.2, and Mac OS 10.3 and later), but there's no 
+	guarantee that this offset won't change again in the future.
+
+	When the kernel invokes the user space signal trampoline, it pushes 
+	the following items on to the stack.
+	
+	Mac OS X 10.1.x
+	---------------
+					Size	Purpose
+					----	-------
+	low memory
+					0x030   bytes for C linkage
+					0x040 	bytes for saving PowerPC parameters
+					0x0c0	ppc_saved_state
+					0x110	ppc_float_state
+					0x018	struct sigcontext
+					0x0e0	red zone
+	high memory
+					The previous frame's SP is at offset 0x00C within 
+					ppc_saved_state, which makes it equal to 
+					0x030 + 0x040 + 0x00C, or 0x07C.  The offset to 
+					the previous PC (0x84) follows from that.
+				                   			 
+	Mac OS X 10.2.x
+	---------------
+					Size	Purpose
+					----	-------
+	low memory
+					0x030   bytes for C linkage
+					0x040 	bytes for saving PowerPC parameters
+					0x008	alignment padding
+					0x408   struct mcontext, comprised of:
+								 0x020 ppc_exception_state_t
+								 0x0A0 ppc_thread_state_t
+								 0x108 ppc_float_state_t
+								 0x240 ppc_vector_state_t
+					0x040	siginfo_t
+					0x020	ucontext
+					0x0e0	red zone
+	high memory	
+					The previous frame's SP is at offset 0x00C within 
+					ppc_thread_state_t, which it equal to 
+					0x030 + 0x040 + 0x008 + 0x020 + 0x00C, or 0x0A4. 
+					The offsets to the previous PC and LR (0x98 and 0x128) 
+					follow from that.
+
+	Mac OS X 10.3.x and 10.4.x
+	--------------------------
+                    
+                    Size (process/hardware/requested)               Purpose
+                    ---------------------------------               -------
+					32/32/x     32/64/32    32/64/64    64/64/x
+					------- 	--------	--------    -----
+	low memory
+					align16     align16     align16     align32		alignment
+					0x030       0x030       0x030       0x030		bytes for C linkage
+					0x040       0x040       0x040       0x040		bytes for saving PowerPC parameters
+					0x008       0x000       0x008       0x018       pad
+					0x040       0x040       0x040       0x068		[user_]siginfo_t
+					0x020       0x020       0x020       0x038		ucontext64
+					0x408       0x408       -           -           mcontext
+				    -           0x498       0x498       0x498		mcontext64
+				    align16     align16     align16     align32		alignment
+                    ?           ?           ?           ?           pad
+					0x0e0       0x0e0       0x0e0       0x140		red zone
+	high memory	
+					Some things to note about the above diagram:
+                    
+                    o The number and type of mcontexts depends on:
+                      - whether the process is 32- or 64-bit
+                      - whether the process is running on 32- or 64-bit hardware
+                      - whether the process requests 64-bit registers when it 
+                        installs its signal handler (the SA_64REGSET flag)
+                    
+                    o This, in turns, affects the amount of pad inserted to 
+                      get the proper alignment.
+
+					o For a 64-bit process, the kernel aligns the stack to a 
+					  32 byte boundary, even though the runtime architecture 
+					  only requires a 16 byte boundary.
+					  
+					o The final alignment is done last, but the pad that it 
+					  creates is effectively created between the parameter save 
+					  area and the [user_]siginfo_t because the C linkage area 
+					  and param save areas are both defined to be a fixed offset 
+					  from the frame pointer.
+					
+                    o This means that we have to use some heuristics to find the 
+                      amount of pad.  These heuristics generally involve looking 
+                      into the mcontext[64] to see if the registers in there 
+                      match the registers in the [user_]siginfo_t.  However, 
+                      this is further complicated by the fact that the mcontext 
+                      might be an mcontext64, even on a 32-bit process.
+                      
+                    o The pad size is highly constrained.  This is because the 
+                      kernel aligns the frame as part of setting up the red 
+                      zone and again to set up the linkage.  Thus, the only cause 
+                      of misalignment is the amount of data between the two alignments 
+                      operations.  For a 64-bit process, there's no variation, 
+                      so the pad size is always 0x018.  For a 32-bit system, 
+                      there's also no variability; the pad size is always 0x008.  
+                      The issues arise for 32-bit code on a 64-bit system, 
+                      where the pad size can be either 0x000 or 0x000.
+*/
+
+static bool PPCCheckFrameStyle(
+    QBTContext *context, 
+    QTMAddr     nextFrame, 
+    QTMAddr     sigInfoFPOffset,
+    QTMAddr     sigInfoSize,
+    QTMAddr     ucontextSize,
+    QTMAddr     padSize,
+    QTMAddr     mcontextFPOffset
+)
+    // Returns true if it seems that we're looking at the frame in the right way.  
+    // That is, for the signal crossing frame at nextFrame, return true if it 
+    // can be interpreted correctly the specified padSize and mcontextFPOffset.
+    //
+    // To check whether we're interpreting the frame correctly, we check that:
+    //
+    // 1. the uc_mcontext64 field of the ucontext points to the mcontext[64]
+    // 2. the FP we get from the mcontext[64] matches the FP we get from the 
+    //    sigInfo (stored in the pad[0] field at sigInfoFPOffset)
+{
+    int         err;
+    bool        result;
+    QTMAddr     sigInfo;
+    QTMAddr     ucontext;
+    QTMAddr     mcontext;
+    QTMAddr     mcontextFromUContext;
+    QTMAddr     preSignalFP;
+    QTMAddr     preSignalFPFromMContext;
+
+    assert(context != NULL);
+    assert( ! context->arch->is64Bit);
+    
+    result = false;
+    
+    // Get the sigInfo, ucontext and mcontext addresses.  This is, of course, 
+    // all provisional, based on the padSize.
+    
+    sigInfo  = nextFrame + 0x030 + 0x040 + padSize;
+    ucontext = sigInfo + sigInfoSize;
+    mcontext = ucontext + ucontextSize;
+
+    // Read the uc_mcontext64 field from the ucontext.
+    
+    err = ReadAddr(context, ucontext + 0x01c, &mcontextFromUContext);
+    
+    // Read the FP from the pad[0] of the siginfo_t.
+    
+    if (err == 0) {
+        err = ReadAddr(context, sigInfo + sigInfoFPOffset, &preSignalFP);
+    }
+    
+    // Read the FP from the mcontext[64].
+    
+    if (err == 0) {
+		err = ReadAddr(context, mcontext + mcontextFPOffset, &preSignalFPFromMContext);
+    }
+    
+    // Return true if the mcontext is where we expected and the FPs match.
+    
+    if (err == 0) {
+        result = (mcontext == mcontextFromUContext)
+              && (preSignalFP == preSignalFPFromMContext);
+    }
+    
+    return result;
+}
+
+static int PowerPCCrossSignalFrame(QBTContext *context, QTMAddr thisFrame, QTMAddr *nextPCPtr, QTMAddr *nextFramePtr)
+	// This is the crossSignalFrame routine for the PowerPC 
+	// architecture.  See the description of QBTCrossSignalFrameProc 
+	// for a detailed discussion of its parameters.
+{
+	int         err;
+    int         major;
+	QTMAddr     nextFrame;
+    QTMAddr     padSize = 0;
+    QTMAddr     sigInfoSize = 0;
+    QTMAddr     sigInfoFPOffset = 0;
+    QTMAddr     ucontextSize = 0;
+    QTMAddr     mcontextPCOffset = 0;
+    QTMAddr     mcontextFPOffset = 0;
+    QTMAddr     mcontextLROffset = 0;
+    QTMAddr     sigInfo;
+    QTMAddr     ucontext;
+    QTMAddr     mcontext;
+    QTMAddr     preSignalFP;
+    QTMAddr     preSignalFPFromMContext;
+    QTMAddr     preSignalPCFromMContext;
+    QTMAddr     preSignalLRFromMContext;
+
+    // The code depends on the version of the OS.  *sigh*
+    
+    err = QTMGetDarwinOSRelease(&major, NULL, NULL);
+
+    // Read the address of the frame below the _sigtramp frame, because 
+    // that where all the action is.
+
+    if (err == 0) {
+        err = ReadAddr(context, thisFrame, &nextFrame);
+    }
+	
+    // Sniff the frame to see which type it is:
+    
+    if (err == 0) {
+        if (context->arch->is64Bit) {
+            // For 64-bit processes, everything is easy.
+            
+            padSize          = 0x018;
+            sigInfoSize      = 0x068;
+            sigInfoFPOffset  = 0x030;
+            ucontextSize     = 0x038;
+            mcontextPCOffset = 0x020 + 0x000;
+            mcontextFPOffset = 0x020 + 0x018;
+            mcontextLROffset = 0x020 + 0x11c;
+        } else if (major < kQTMDarwinOSMajorForMacOSX103) {
+            #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3
+                #warning QBacktrace has not been tested properly on pre-10.3 systems.
+            #endif
+            /*
+                I used to have code (that was a lot more naive) that supported 
+                pre-10.3 systems.  I've abandoned these systems for my new code.
+                However, I've left the following information around in case I 
+                ever contemplate resurrecting the support for older systems.
+                
+                Some random numbers from the old pre-10.3 code:
+                
+                o 10.0 through 10.1.x
+                    offsetToPC = 0x84;
+                    offsetToFP = 0x7c;
+                    offsetToLR = 0;            
+                o 10.2.x
+                    offsetToPC = 0x98;
+                    offsetToFP = 0xa4;
+                    offsetToLR = 0x128;
+                  but G5-based 10.2.x systems are more like 10.3 (probably).
+            */
+            assert(false);
+            err = ENOTSUP;
+        } else {
+            // For 32-bit processes on 10.3 and later, things are much trickier.
+            
+            // padSize needs to be worked out
+            sigInfoSize      = 0x040;
+            sigInfoFPOffset  = 0x024;
+            ucontextSize     = 0x020;
+            // mcontextPCOffset needs to be worked out
+            // mcontextFPOffset needs to be worked out
+            // mcontextLROffset needs to be worked out
+            
+            // Try all three frame style...
+            
+            // 1. Start with the 32/64/64 case.
+            
+            padSize = 8;
+            // mcontext64 offsets
+            mcontextPCOffset = 0x020 + 0x004;
+            mcontextFPOffset = 0x020 + 0x01c;
+            mcontextLROffset = 0x020 + 0x120;
+            
+            // IMPORTANT:
+            // The above offsets are 4 larger than the equivalent offsets for a 
+            // 64-bit process.  That's because we'll read them using ReadAddr, 
+            // and ReadAddr will only read a 32-bits word on a 32-bit process.
+            // Thus, we have to make sure it reads the bottom 32-bits of the 
+            // mcontext64 field, which means we add 4 to the offset.
+            
+            if ( ! PPCCheckFrameStyle(context, nextFrame, sigInfoFPOffset, sigInfoSize, ucontextSize, padSize, mcontextFPOffset) ) {
+                // 2. OK, it's not that, let's try 32/32/x.
+                
+                // mcontext offsets
+                mcontextPCOffset = 0x020 + 0x000;
+                mcontextFPOffset = 0x020 + 0x00c;
+                mcontextLROffset = 0x020 + 0x090;
+
+                if ( ! PPCCheckFrameStyle(context, nextFrame, sigInfoFPOffset, sigInfoSize, ucontextSize, padSize, mcontextFPOffset) ) {
+                    // 3. OK, third time is a charm.  Let's try 32/64/32.
+
+                    padSize = 0;
+                    
+                    if ( ! PPCCheckFrameStyle(context, nextFrame, sigInfoFPOffset, sigInfoSize, ucontextSize, padSize, mcontextFPOffset) ) {
+                        err = EINVAL;
+                    }
+                }
+            }
+        }
+    }
+    
+    // Grab the pre-signal FP from the siginfo_t and the pre-signal FP, PC and LR 
+    // from the mcontext and use them to set up the results for the client.
+
+	mcontext = 0;		// quieten a warning
+    if (err == 0) {
+        sigInfo  = nextFrame + 0x030 + 0x040 + padSize;
+        ucontext = sigInfo + sigInfoSize;
+        mcontext = ucontext + ucontextSize;
+
+		err = ReadAddr(context, sigInfo + sigInfoFPOffset, &preSignalFP);
+    }
+    if (err == 0) {
+		err = ReadAddr(context, mcontext + mcontextFPOffset, &preSignalFPFromMContext);
+    }
+    if (err == 0) {
+		err = ReadAddr(context, mcontext + mcontextPCOffset, &preSignalPCFromMContext);
+    }
+    if (err == 0) {
+		err = ReadAddr(context, mcontext + mcontextLROffset, &preSignalLRFromMContext);
+    }
+    if (err == 0) {
+        assert(preSignalFPFromMContext == preSignalFP);
+        
+        *nextFramePtr = preSignalFP;
+        *nextPCPtr    = preSignalPCFromMContext;
+    }
+    	
+	// If the PC is a system call, add a dummy leaf for that PC 
+	// and then get the next frame's PC from LR.
+	
+	if ( (err == 0) && PowerPCIsSystemCall(context, *nextPCPtr) ) {
+		AddFrame(context, *nextPCPtr, 0, kQBTFrameBadMask);
+		
+        *nextPCPtr = preSignalLRFromMContext;
+	}
+	
+	return err;
+}
+#endif //TARGET_CPU_PPC
+
+#pragma mark - Intel
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+
+/*	Intel Stack Frame Basics
+	------------------------
+	
+                        Offset	Size	Purpose
+                        ------	----	-------
+	low memory
+	sp == ESP/RSP ->    -??     ??		general work area
+                        -??		??		local variables
+	fp == EBP/RBP ->	0		X		pointer to next frame
+                        X		X		return address
+                        -??		??		parameters
+	high memory
+
+                    where X is the address size (4 bytes for 32-bits, 
+                    8 bytes for 64-bits)
+
+	The stack frame on Intel is remarkably traditional.  Two registers 
+	are used to manage the stack: ESP/RSP points to the bottom of the stack, 
+	and EBP/RBP points to the stack frame itself.  The memory at offset 0 
+	off the frame stores the address of the next stack frame.  The memory at 
+	offset X stores the saved PC for the next stack frame (that is, the return 
+	address for this stack frame).
+*/
+
+static bool IntelIsSystemCall(QBTContext *context, QTMAddr pc)
+	// Using the PC from the thread state, look back in the code 
+	// stream to see if the previous bytes look something like a 
+	// system call.  This is a heuristic rather than solid design. 
+	// Because Intel instructions are of variable length, there's no 
+	// guarantee that these bytes are part of some other instruction. 
+	// Still, it works most of the time.
+	//
+	// For 64-bit, all systems calls are done via SYSCALL.  Nice!
+    //
+    // For 32-bit, we need to look for two instructions:
+	//
+	// o INT 81 -- used for Mach system calls
+	// o sysenter -- used by BSD system calls
+	// 
+	// We detect INT 81 simply by looking for its bytes.  It's no 
+	// so easy to detect sysenter, because the PC we get is an 
+	// address in the specific system call, which actually calls 
+	// another routine (_sysenter_trap) to do the sysenter.  
+	// We look for the CALL disp32 instruction and, if we see, 
+	// work out the address that it calls.  We then get the 
+	// instructions from that address.  If that looks like a 
+	// sysenter, we're probably looking at a system call.
+{
+	int	err;
+	bool		isSystemCall;
+	uint8_t		buf[5];
+	uint32_t	sysEnterOffset;
+
+	isSystemCall = false;
+	err = context->readBytes(context, pc - sizeof(buf), buf, sizeof(buf));
+	if (err == 0) {
+        if (context->arch->is64Bit) {
+            isSystemCall = ( buf[3] == 0x0f && buf [4] == 0x05 );           // syscall
+        } else {
+            isSystemCall = ( buf[3] == 0xcd && buf[4] == 0x81);				// INT 81
+            
+            if ( ! isSystemCall && (buf[0] == 0xe8) ) {						// CALL disp32
+                // Get the disp32.
+                
+                sysEnterOffset = (buf[1] | (buf[2] << 8) | (buf[3] << 16) | (buf[4] << 24));
+
+                // Read the instructions at that offset from the PC and see if they're 
+                // the standard _sysenter_trap code.
+                //
+                // It's a happy coincidence that the size of the _sysenter_trap code is 
+                // 5 bytes, which is also the size of the buffer that I have lying around 
+                // to read the instructions in front of the PC.  The upshot is that I can 
+                // reuse buf rather than needing a second one.
+                
+                err = context->readBytes(context, pc + sysEnterOffset, buf, sizeof(buf));
+                if (err == 0) {
+                    isSystemCall = (buf[0] == 0x5a)								// pop      %edx
+                                && (buf[1] == 0x89)	&& (buf[2] == 0xe1)			// mov      %esp,%ecx
+                                && (buf[3] == 0x0f) && (buf[4] == 0x34);		// sysenter
+                }
+            }
+        }
+	}
+	return isSystemCall;
+}
+
+static int IntelHandleLeaf(QBTContext *context, QTMAddr *pcPtr, QTMAddr *framePtr)
+	// This is the handleLeaf routine for the Intel architecture.  See the 
+    // description of QBTHandleLeafProc for a detailed discussion of its 
+    // parameters.
+	// 
+	// I don't have the experience or the time to fully analyse 
+	// the leaf routine problem for Intel.  Rather, I just implemented 
+	// a simple system call check, much like I did on PowerPC.  This 
+	// seems to be effective in the cases that I care about.
+{
+	int		err;
+	QTMAddr	pc;
+	QTMAddr	sp;
+	QTMAddr	fp;
+	
+    err = 0;
+    switch (context->threadStateFlavor) {
+#ifdef __LP64__
+        case x86_THREAD_STATE64:
+
+            pc = ((const x86_thread_state64_t *) context->threadState)->rip;
+            sp = ((const x86_thread_state64_t *) context->threadState)->rsp;
+            fp = ((const x86_thread_state64_t *) context->threadState)->rbp;
+            break;
+        case x86_THREAD_STATE32:
+            pc = ((const x86_thread_state32_t *) context->threadState)->eip;
+            sp = ((const x86_thread_state32_t *) context->threadState)->esp;
+            fp = ((const x86_thread_state32_t *) context->threadState)->ebp;
+            break;
+#else
+        case x86_THREAD_STATE64:
+
+            pc = ((const x86_thread_state64_t *) context->threadState)->rip;
+            sp = ((const x86_thread_state64_t *) context->threadState)->rsp;
+            fp = ((const x86_thread_state64_t *) context->threadState)->rbp;
+            break;
+        case x86_THREAD_STATE32:
+            pc = ((const x86_thread_state32_t *) context->threadState)->eip;
+            sp = ((const x86_thread_state32_t *) context->threadState)->esp;
+            fp = ((const x86_thread_state32_t *) context->threadState)->ebp;
+            break;
+#endif
+        default:
+            err = EINVAL;
+    }
+
+	// If the PC is a system call, add a dummy leaf for that PC 
+	// and then get the next frame's PC from the top of stack.
+
+	if (err == 0) {
+        if ( IntelIsSystemCall(context, pc) ) {
+            AddFrame(context, pc, 0, kQBTFrameBadMask);
+
+            err = ReadAddr(context, sp, &pc);
+        }
+        if (err == 0) {
+            *pcPtr    = pc;
+            *framePtr = fp;
+        }
+    }
+	
+	return err;
+}
+
+static bool  IntelValidPC(QBTContext *context, QTMAddr pc)
+	// This is the validPC routine for the Intel 
+	// architecture.  See the description of 
+	// QBTValidPCProc for a detailed discussion 
+	// of its parameters.
+	//
+	// Intel instructions are not aligned in any way.  All, I can do 
+	// is check for known bad values ((QTMAddr) -1 is used as a 
+	// known bad value by the core) and check that I can read at least 
+	// byte of instruction from the address.
+{
+	uint8_t	junkInst;
+	
+	return (pc != (QTMAddr) -1) && (context->readBytes(context, pc, &junkInst, sizeof(junkInst)) == 0);
+}
+
+static int IntelGetFrameNextPC(QBTContext *context, QTMAddr thisFrame, QTMAddr nextFrame, QTMAddr *nextPCPtr)
+	// This is the getFrameNextPC routine for the Intel architecture.  See the 
+    // description of QBTGetFrameNextPCProc for a detailed discussion of its 
+	// parameters.
+	//
+	// This is very easy on Intel, because it's the return address, which is at a 
+    // fixed offset in the frame.
+{
+    #pragma unused(nextFrame)
+	QTMAddr	offset;
+	
+	if ( context->arch->is64Bit ) {
+		offset = 8;
+	} else {
+		offset = 4;
+	}
+	
+	return ReadAddr(context, thisFrame + offset, nextPCPtr);
+}
+
+#endif
+
+#if TARGET_CPU_X86
+
+/*	Intel 32-Bit Signal Stack Frames
+	--------------------------------
+	Cross signal stack frames is much more reliable on Intel.  The parameters 
+	to _sigtramp are stored on the stack, and you can reliably pick them up 
+	from there.
+
+					Size	Purpose
+					----	-------
+	low memory
+	
+	frame  ->		0x004	pre-signal frame pointer
+					0x018	struct sigframe32
+					0x020?	pad
+					0x258	struct mcontext
+								0x00c	x86_exception_state32_t
+								0x040	x86_thread_state32_t
+								0x20c	x86_float_state32_t
+					0x040	siginfo_t
+					0x020	struct ucontext
+	high memory
+	
+	As for other architectures, the kernel aligns the stack such that the catcher 
+    field of the (struct sigframe32) is aligned on a 16 byte boundary.  This means 
+    that there's a variable amount of pad between the (struct sigframe32) and the 
+    other fields.  However, for x86 this isn't a problem because the 
+    (struct sigframe32) contains pointers to the other structures that we need.
+    
+    Another thing to note is that SA_64REGSET flag isn't significant on x86.  
+    A 32-bit process will always get 32-bit structures and a 64-bit process will 
+    always get 64-bit structures.  This makes things somewhat easier than on 
+    PowerPC.
+    
+    The three values we need to get are:
+    
+    o pre-signal FP -- This is easy.  It's always pointed to by the current FP.
+    
+    o pre-signal PC -- This is hard because the obvious place that it's stored 
+      (the si_addr field of the siginfo_t) isn't reliable.  Specifically, for 
+      SIGBUS and SIGSEGV, this field holds the faulting address, not the faulting 
+      instruction's address.  *sigh*  So, we get this value by following the 
+      (struct sigframe32) to the (struct ucontext) to the (struct mcontext) to 
+      the (x86_thread_state32_t) to the ebp field.  *phew*
+    
+    o pre-signal SP -- The kernel stores this in the pad[0] field of the siginfo_t, 
+      so we use that.  We also check it against the esp from the thread state, 
+      just 'cause that's easy.
+    
+	The sinfo field of the sigframe32 structure is at offset 0x10 and the uctx 
+    field is at offset 0x14.  Once you account for the pre-signal frame pointer 
+    that's pushed on to the stack by _sigtramp, you need to go 0x14 bytes up the 
+    frame to get the sinfo field, which is a pointer to a siginfo_t structure.  
+    The kernel places the pre-signal PC and SP in fields in that structure (si_addr 
+    and pad[0], offset 0x18 and 0x24 respectively). 
+    
+	Finally, if we detect a frameless leaf routine past the signal frame, 
+	we extract its return address from the top of stack.
+*/
+
+static int Intel32CrossSignalFrame(QBTContext *context, QTMAddr thisFrame, QTMAddr *nextPCPtr, QTMAddr *nextFramePtr)
+	// This is the crossSignalFrame routine for the Intel 
+	// architecture.  See the description of 
+	// QBTCrossSignalFrameProc for a detailed discussion 
+	// of its parameters.
+{
+	int         err;
+    QTMAddr     sigFrame;
+	QTMAddr     sigInfo;
+	QTMAddr     ucontext;
+    QTMAddr     mcontext;
+    QTMAddr     threadState;
+	QTMAddr     preSignalFP;
+	QTMAddr     preSignalSP;
+    QTMAddr     preSignalFPFromMContext;
+    QTMAddr     preSignalSPFromMContext;
+    QTMAddr     preSignalPCFromMContext;
+    
+    sigFrame = thisFrame + 4;
+    
+	// Get the pre-signal FP by simply reading from the frame pointer. 
+	// Because of the way __sigtramp works, this ends up being correct.
+	
+    err = ReadAddr(context, thisFrame, &preSignalFP);
+	
+	// Get the siginfo_t pointer from the parameters to _sigtramp 
+	// (the sinfo field of sigframe32).
+	
+	if (err == 0) {
+        err = ReadAddr(context, sigFrame + 0x10, &sigInfo);
+	}
+	
+    // Get the pre-signal SP from the pad[0] field of the siginfo_t.
+
+    if (err == 0) {
+		err = ReadAddr(context, sigInfo + 0x24, &preSignalSP);
+    }
+
+	// Get the ucontext address from the parameters to _sigtramp 
+    // (the uctx field of the sigframe32).
+	
+	if (err == 0) {
+		err = ReadAddr(context, sigFrame + 0x14, &ucontext);
+	}
+    
+    // Get the mcontext address from the uc_mcontext field of the ucontext.
+    
+    if (err == 0) {
+		err = ReadAddr(context, ucontext + 0x1c, &mcontext);
+    }
+    
+    // Get the address of the ss field of the mcontext.  This is the 
+    // x86_thread_state_32_t.  Then extract the ebp, esp, and eip fields from 
+    // that.
+    
+    if (err == 0) {
+        threadState = mcontext + 0x0c;
+        
+        err = ReadAddr(context, threadState + 0x18, &preSignalFPFromMContext);
+        if (err == 0) {
+            err = ReadAddr(context, threadState + 0x1c, &preSignalSPFromMContext);
+        }
+        if (err == 0) {
+            err = ReadAddr(context, threadState + 0x28, &preSignalPCFromMContext);
+        }
+    }
+    if (err == 0) {
+        assert(preSignalFPFromMContext == preSignalFP);
+        assert(preSignalSPFromMContext == preSignalSP);
+        
+        *nextFramePtr = preSignalFP;
+        *nextPCPtr    = preSignalPCFromMContext;
+    }
+    
+	// Finally, if we detect a leaf routine, add a dummy frame for it 
+	// and then get the pre-signal SP and, assuming that the top word on 
+    // the stack is a return address, use it for the next PC.
+	
+	if ( (err == 0) && IntelIsSystemCall(context, *nextPCPtr) ) {
+		AddFrame(context, *nextPCPtr, 0, kQBTFrameBadMask);
+		
+        err = ReadAddr(context, preSignalSP, nextPCPtr);
+	}
+	
+	return err;
+}
+
+#endif
+
+#if TARGET_CPU_X86_64
+
+/*
+	Intel 64-Bit Signal Stack Frames
+	--------------------------------
+    Like PowerPC, x86-64 passes most parameters in registers.  This makes it 
+    hard to cross signal stack frames successfully.  However, like PowerPC, some 
+    heuristics get us there most of the time.
+    
+					Size	Purpose
+					----	-------
+	low memory
+	
+	frame  ->		0x008	pre-signal frame pointer
+                    0x008   space for return address (unused)
+					0x014?  alignment padding (typically 0x014 or 0x01c)
+					0x2c4	struct mcontext64
+								0x010	x86_exception_state64_t
+								0x0A8	x86_thread_state64_t
+								0x20c	x86_float_state64_t
+					0x068	user_siginfo_t
+					0x038	struct user_ucontext64
+                    0x080   red zone
+	high memory
+
+	Things to note about the above:
+	
+	o The kernel places the pre-signal SP in the pad[0] field (offset 0x30) of 
+      the user_siginfo_t structure.
+    
+    o Most of the time the kernel puts the pre-signal PC in the si_addr field
+      of the same structure.  However, for SIGBUS and SIGSEGV this is actually 
+      the address of the fault itself, so that doesn't help us.
+	
+	o The kernel aligns the stack such that the start of the alignment padding 
+      is on a 16 byte boundary.  This means that there's a variable amount of pad 
+      (from 0x10 through 0x1c) between the current frame and the user_siginfo_t.  
+      Argh!
+
+    o The reason why this alignment padding is typically either 0x014 or 0x01c is 
+      that the (struct mcontext64) is 0x2c4 bytes.  So, if the stack was reasonably 
+      aligned (that is, to an 8 byte boundary) when the signal occurs, by the time 
+      we've deducted space for all our junk (0x080 + 0x038 + 0x068 + 0x2c4) we've 
+      pushed the alignment to a 4 byte boundary.  To bring it back, we have to 
+      pad to with either 0x014 or 0x01c.
+    
+      However, rather than just guess, I actually try all possible alignments 
+      (0x000 through 0x01c) and see which one makes sense.
+
+    Another thing to note is that SA_64REGSET flag isn't significant on x86.  
+    A 32-bit process will always get 32-bit structures and a 64-bit process will 
+    always get 64-bit structures.  This makes things somewhat easier than on 
+    PowerPC.
+
+	Finally, if we detect a frameless leaf routine past the signal frame, 
+	we extract its return address from the top of stack.
+*/
+
+static int Intel64CrossSignalFrame(QBTContext *context, QTMAddr thisFrame, QTMAddr *nextPCPtr, QTMAddr *nextFramePtr)
+	// This is the crossSignalFrame routine for the 64-bit Intel  
+	// architecture.  See the description of 
+	// QBTCrossSignalFrameProc for a detailed discussion 
+	// of its parameters.
+{
+	int         err;
+	QTMAddr     sigInfo;
+    QTMAddr     ucontext;
+    QTMAddr     mcontext;
+    QTMAddr     threadState;
+	QTMAddr     preSignalFP;
+    QTMAddr     preSignalSP;
+	QTMAddr     preSignalFPFromMContext;
+    QTMAddr     preSignalSPFromMContext;
+    QTMAddr     align;
+    
+	// Get the previous frame by simply reading from the frame pointer. 
+	// Because of the way things work, this ends up being correct.
+
+    err = ReadAddr(context, thisFrame, &preSignalFP);
+    
+    if (err == 0) {        
+        // Now try various alignments to see which one yields a valid result.
+        
+        for (align = 0x010; align < 0x020; align += 4) {
+            // Use the 'Hail Mary (tm)' algorithm to get a pointer to the user_siginfo_t 
+            // and the (struct user_ucontext64) that immediately follows it.
+            
+            sigInfo = thisFrame + 0x008 + 0x08 + align + 0x2c4;
+            ucontext = sigInfo + 0x068;
+            
+            // Now check whether it makes sense...
+            
+            // Get the previous SP from the pad[0] field of the user_siginfo_t.
+            
+            err = ReadAddr(context, sigInfo + 0x030, &preSignalSP);
+            
+            // Get the uc_mcontext64 field of the (struct user_ucontext64) that 
+            // immediately follows the user_siginfo_t.  This results in a pointer 
+            // to our (struct mcontext64).
+            
+            if (err == 0) {
+                err = ReadAddr(context, ucontext + 0x030, &mcontext);
+            }
+            
+            // Calculate the start of the x86_thread_state64_t structure at a fixed 
+            // offset from the start of the (struct mcontext64) and get the 
+            // pre-signal FP and SP from that.
+            
+            if (err == 0) {
+                threadState = mcontext + 0x10;
+                err = ReadAddr(context, threadState + 6 * 0x08, &preSignalFPFromMContext);
+            }
+            if (err == 0) {
+                err = ReadAddr(context, threadState + 7 * 0x08, &preSignalSPFromMContext);
+            }
+            
+            if ( (err == 0) 
+              && (preSignalFP == preSignalFPFromMContext) 
+              && (preSignalSP == preSignalSPFromMContext) ) {
+                break;
+            }
+        }
+        
+        // At this point we throw away any error status from the above code.
+
+        err = 0;
+        
+        // If none of the alignments worked, just take a guess.  This is 
+        // sufficienly bad that we want to know about it in the debug version.
+        
+        if (align == 0x020) {
+            assert(false);
+            align = 0x014;
+        }
+    }
+
+    // Get the address of the sigInfo using the alignment calculated above 
+    // and then use it to set the result.
+    
+    if (err == 0) {
+        // This value is /always/ right, so we copy it out to the client immediately.
+        
+        *nextFramePtr = preSignalFP;
+
+        sigInfo  = thisFrame + 0x008 + 0x08 + align + 0x2c4;
+        ucontext = sigInfo + 0x068;
+
+        // Get the pre-signal SP and mcontext as before.
+        
+		err = ReadAddr(context, sigInfo + 0x030, &preSignalSP);
+        if (err == 0) {
+            err = ReadAddr(context, ucontext + 0x030, &mcontext);
+        }
+        
+        // And from that the thread state and the previous PC.
+        
+        if (err == 0) {
+            threadState = mcontext + 0x10;
+            err = ReadAddr(context, threadState + 16 * 0x08, nextPCPtr);
+        }
+	}
+	
+	// Finally, if we detect a leaf routine, add a dummy frame for it 
+	// and then get the pre-signal SP and, assuming that the top word on 
+    // the stack is a return address, use it for the next PC.
+	
+	if ( (err == 0) && IntelIsSystemCall(context, *nextPCPtr) ) {
+		AddFrame(context, *nextPCPtr, 0, kQBTFrameBadMask);
+
+        err = ReadAddr(context, preSignalSP, nextPCPtr);
+	}
+	
+	return err;
+}
+
+#endif
+
+// kArchitectures is an array of all the architectures we support.  
+// Things to notes:
+//
+// o GetTaskArch processes this in a forward direction.  If you 
+//   list a more-specific architecture, you should list it before 
+//   the less-specific one.
+//
+// o The table is terminated by a NULL architecture, signified by 
+//   a 0 in the cputype field.
+//
+// See the comments near QBTArchInfo for a detailed description of 
+// each field.
+
+static const QBTArchInfo kArchitectures[] = {
+#if TARGET_CPU_PPC
+	{	// PowerPC
+        "ppc",                      // name
+		CPU_TYPE_POWERPC,			// cputype
+		0,							// subcputype
+		false,						// is64Bit
+		15,							// frameAlignMask
+		PowerPCHandleLeaf,			// handleLeaf
+		PowerPCValidPC,				// validPC
+		PowerPCGetFrameNextPC,		// getFrameNextPC
+		PowerPCCrossSignalFrame,	// crossSignalFrame
+		PPC_THREAD_STATE,			// stateFlavor
+		PPC_THREAD_STATE_COUNT		// stateCount
+	},
+#endif  // TARGET_CPU_PPC
+
+#if 0       // Not supported by BOINC
+	{	// PowerPC64
+        "ppc64",                    // name
+		CPU_TYPE_POWERPC64,			// cputype
+		0,							// subcputype
+		true,						// is64Bit
+		15,							// frameAlignMask
+		PowerPCHandleLeaf,			// handleLeaf
+		PowerPCValidPC,				// validPC
+		PowerPCGetFrameNextPC,		// getFrameNextPC
+		PowerPCCrossSignalFrame,	// crossSignalFrame
+		PPC_THREAD_STATE64,			// stateFlavor
+		PPC_THREAD_STATE64_COUNT	// stateCount
+	},
+#endif
+
+#if TARGET_CPU_X86
+	{	// Intel
+        "x86",                      // name
+		CPU_TYPE_X86,				// cputype
+		0,							// subcputype
+		false,						// is64Bit
+		3,							// frameAlignMask
+									// Apple's x86 ABI requires that the stack be 16 byte aligned, 
+									// but it says nothing about the frame.  It turns out that the 
+									// frame is typically 8 byte aligned, but I can't find any 
+							// documentation that requires that, so I'm only checking 4 byte 
+									// alignment.
+		IntelHandleLeaf,			// handleLeaf
+		IntelValidPC,				// validPC
+		IntelGetFrameNextPC,		// getFrameNextPC
+		Intel32CrossSignalFrame,    // crossSignalFrame
+		x86_THREAD_STATE32,			// stateFlavor
+		x86_THREAD_STATE32_COUNT    // stateCount
+	},
+#endif
+
+#if TARGET_CPU_X86_64
+	{	// x86-64
+        "x86-64",                   // name
+		CPU_TYPE_X86_64,			// cputype
+		0,							// subcputype
+		true,						// is64Bit
+		3,							// frameAlignMask
+									// Apple's x86 ABI requires that the stack be 16 byte aligned, 
+									// but it says nothing about the frame.  It turns out that the 
+									// frame is typically 8 byte aligned, but I can't find any 
+									// documentation that requires that, so I'm only checking 4 byte 
+									// alignment.
+		IntelHandleLeaf,			// handleLeaf
+		IntelValidPC,				// validPC
+		IntelGetFrameNextPC,		// getFrameNextPC
+		Intel64CrossSignalFrame,	// crossSignalFrame
+		x86_THREAD_STATE64,			// stateFlavor
+		x86_THREAD_STATE64_COUNT    // stateCount
+	},
+#endif
+
+	{ /* null terminator */
+	}
+};
+
+#pragma mark ***** Public Interface
+
+#if ! defined(NDEBUG)
+
+    static bool FrameArrayNeedsDispose(const QBTFrame *frameArray, size_t frameArrayCount)
+        // We want to make sure that we don't leak symbol strings if we fail 
+        // with an error.  So, for debugging, we check that the output frame 
+        // array has no strings that need disposing.
+    {
+        bool        needsDispose;
+        size_t      frameIndex;
+        
+        needsDispose = false;
+        for (frameIndex = 0; frameIndex < frameArrayCount; frameIndex++) {
+            if (frameArray[frameIndex].flags & kQBTFrameSymbolNeedsDisposeMask) {
+                needsDispose = true;
+            }
+        }
+        
+        return needsDispose;
+    }
+
+#endif
+
+extern int QBacktraceMachSelf(
+    QSymbolsRef symRef,
+	QBTFrame *	frameArray, 
+	size_t		frameArrayCount, 
+	size_t *	frameCountPtr
+)
+	// See comments in header.
+{
+	int                     err;
+    QBTContext              context;
+    uintptr_t               stackBottom;
+    uintptr_t               stackTop;
+    uintptr_t               stackPtr;
+    thread_state_flavor_t   stateFlavor;
+    void *                  state;
+    size_t                  stateSize;
+
+	assert( (frameArrayCount == 0) || (frameArray != NULL) );
+	assert( frameCountPtr != NULL );
+
+    state = NULL;
+    stateSize = 0;
+
+    // Ask pthreads for our stack bounds.
+    
+    stackTop    = (uintptr_t) pthread_get_stackaddr_np( pthread_self() );
+    stackBottom =  stackTop - pthread_get_stacksize_np( pthread_self() );
+    stackPtr    = (uintptr_t) &context;
+
+    // Due to a bug <rdar://problem/5007494>, the above calls can return bogus 
+    // results.  Specifically, you get bogus results for the main thread on 
+    // pre-Leopard systems when running 64-bit code.
+    //
+    // So, if the results are clearly bogus (because a known good stack address 
+    // (the address of one of our locals) is out of bounds), we just ignore 
+    // the values we set up and use zeroes instead.
+    
+    if ( (stackPtr < stackBottom) || (stackPtr >= stackTop) ) {
+        stackBottom = 0;
+        stackTop    = 0;
+    }
+
+	assert( ((stackBottom == 0) && (stackBottom == stackTop)) || (stackBottom < stackTop) );
+
+	// Get the thread state for the current thread.
+
+    err = QBTCreateThreadStateSelf(&stateFlavor, &state, &stateSize);
+    
+	// Do the backtrace.
+	
+	if (err == 0) {
+        err = QBacktraceMachThreadState(
+            mach_task_self(),
+            stateFlavor,
+            state,
+            stateSize,
+            QMOGetLocalCPUType(),
+            symRef,
+            stackBottom,
+            stackTop,
+            frameArray,
+            frameArrayCount,
+            frameCountPtr
+        );
+	}
+	
+	// Clean up.
+	
+    free(state);
+
+    // Post condition
+
+    assert( (err == 0) || ! FrameArrayNeedsDispose(frameArray, frameArrayCount) );
+    assert( (err == 0) == (*frameCountPtr != 0) );
+	
+	return err;
+}
+
+extern int QBacktraceMachThread(
+	task_t		task, 
+	thread_t	thread,
+    cpu_type_t  cputype,
+    QSymbolsRef symRef,
+	QTMAddr		stackBottom, 
+	QTMAddr		stackTop,
+	QBTFrame *	frameArray, 
+	size_t		frameArrayCount, 
+	size_t *	frameCountPtr
+)
+	// See comments in header.
+{
+    int                     err;
+    thread_state_flavor_t   stateFlavor;
+    void *                  state;
+    size_t                  stateSize;
+    
+	assert(task != MACH_PORT_NULL);
+	assert(thread != MACH_PORT_NULL);
+	assert( ((stackBottom == 0) && (stackBottom == stackTop)) || (stackBottom < stackTop) );
+	assert( (frameArrayCount == 0) || (frameArray != NULL) );
+	assert( frameCountPtr != NULL );
+
+    state = NULL;
+    stateSize = 0;
+    
+	// Get the thread state for the target thread.
+
+    if (thread == mach_thread_self()) {
+        assert(task == mach_task_self());
+        
+        err = QBTCreateThreadStateSelf(
+            &stateFlavor,
+            &state,
+            &stateSize
+        );
+    } else {
+        err = QBTCreateThreadState(
+            task,
+            thread,
+            cputype,
+            symRef,
+            &stateFlavor,
+            &state,
+            &stateSize
+        );
+    }
+    
+	// Do the backtrace.
+
+    if (err == 0) {
+        err = QBacktraceMachThreadState(
+            task,
+            stateFlavor,
+            state,
+            stateSize,
+            cputype,
+            symRef,
+            stackBottom,
+            stackTop,
+            frameArray,
+            frameArrayCount,
+            frameCountPtr
+        );
+    }
+    
+	// Clean up.
+	
+    free(state);
+
+    // Post condition
+
+    assert( (err == 0) || ! FrameArrayNeedsDispose(frameArray, frameArrayCount) );
+    assert( (err == 0) == (*frameCountPtr != 0) );
+
+    return err;
+}
+
+extern int QBacktraceMachThreadState(
+	task_t                  task, 
+	thread_state_flavor_t	stateFlavor,
+	const void *			state,
+	size_t					stateSize,
+    cpu_type_t              cputype,
+    QSymbolsRef				symRef,
+	QTMAddr					stackBottom, 
+	QTMAddr					stackTop,
+	QBTFrame *				frameArray, 
+	size_t					frameArrayCount, 
+	size_t *				frameCountPtr
+)
+	// See comments in header.
+{
+	int             err;
+    QBTContext      context;
+
+	assert(task != MACH_PORT_NULL);
+	assert(state != NULL);
+	assert(stateSize != 0);
+	assert( ((stackBottom == 0) && (stackBottom == stackTop)) || (stackBottom < stackTop) );
+	assert( (frameArrayCount == 0) || (frameArray != NULL) );
+	assert( frameCountPtr != NULL );
+
+    // Initialise the context from the task.
+    
+    err = MachInitContextFromTask(
+        &context, 
+        task, 
+        cputype, 
+        stackBottom, 
+        stackTop, 
+        symRef, 
+        frameArray, 
+        frameArrayCount
+    );
+    
+    // Initialise the thread state from the input arguments.
+    
+    if (err == 0) {
+        context.threadStateFlavor = stateFlavor;
+        context.threadState       = state;
+        context.threadStateSize   = stateSize;
+    }
+	
+	// Do the backtrace.
+	
+	if (err == 0) {
+        err = BacktraceCore(&context, frameCountPtr);
+	}
+	
+	// Clean up.
+	
+    MachTermContext(&context);
+
+    // Post condition
+
+    assert( (err == 0) || ! FrameArrayNeedsDispose(frameArray, frameArrayCount) );
+    assert( (err == 0) == (*frameCountPtr != 0) );
+	
+	return err;
+}
+
+extern void QBacktraceDisposeSymbols(QBTFrame frameArray[], size_t frameCount)
+    // See comments in header.
+{
+    size_t  frameIndex;
+    
+    if (frameArray != NULL) {
+        for (frameIndex = 0; frameIndex < frameCount; frameIndex++) {
+            if (frameArray[frameIndex].flags & kQBTFrameSymbolNeedsDisposeMask) {
+                free( (void *) frameArray[frameIndex].symbol );
+                free( (void *) frameArray[frameIndex].library );
+            }
+            frameArray[frameIndex].symbol = NULL;
+        }
+    }
+}
+
+extern int QBTCreateThreadState(
+	task_t                  task, 
+	thread_t                thread,
+    cpu_type_t              cputype,
+    QSymbolsRef             symRef,
+    thread_state_flavor_t * stateFlavorPtr,
+    void **                 statePtr,
+    size_t *                stateSizePtr
+)
+    // See comments in header.
+{
+    int                     err;
+    kern_return_t           kr;
+    void *                  state;
+    QMOImageRef             dyld;
+    bool                    didCreateDyld;
+    const QBTArchInfo *     arch = NULL;
+
+    assert(task != MACH_PORT_NULL);
+    assert(thread != MACH_PORT_NULL);
+    // cputype can be anything
+    // symRef may be NULL
+    assert(stateFlavorPtr != NULL);
+    assert( statePtr != NULL);
+    assert(*statePtr == NULL);
+    assert( stateSizePtr != NULL);
+    assert(*stateSizePtr == 0);
+
+    state = NULL;
+    dyld = NULL;
+    didCreateDyld = false;
+    
+    // If the client supplied us with a sym, use it to get dyld.  Otherwise 
+    // get dyld directly from the QMachOImage module.
+    
+    if (symRef == NULL) {
+        err = QMOImageCreateFromTaskDyld(task, cputype, &dyld);
+        didCreateDyld = true;
+    } else {
+        dyld = QSymGetDyldImage(symRef);
+        err = 0;
+    }
+    
+    // Use the dyld to get the architecture.
+    
+    if (err == 0) {
+        arch = GetTaskArch(dyld);
+        if (arch == NULL) {
+            err = EINVAL;
+        }
+    }
+    
+    // Use the parameters from the architecture to allocate and initialise the 
+    // thread state buffer.
+    
+    if (err == 0) {
+        state = calloc(arch->stateCount, sizeof(integer_t));
+        if (state == NULL) {
+            err = ENOMEM;
+        }
+    }
+    if (err == 0) {
+        mach_msg_type_number_t  stateCount;
+
+        stateCount = arch->stateCount;
+        kr = thread_get_state(thread, arch->stateFlavor, (thread_state_t) state, &stateCount);
+        err = QTMErrnoFromMachError(kr);
+    }
+    if (err == 0) {
+        *statePtr = state;
+        state = NULL;           // so it's not freed below
+        *stateFlavorPtr = arch->stateFlavor;
+        *stateSizePtr   = arch->stateCount * sizeof(integer_t);
+    }
+    
+    // Clean up.
+    
+    free(state);
+    if (didCreateDyld) {
+        QMOImageDestroy(dyld);
+    }
+    
+    assert( (err == 0) == (*statePtr != NULL) );
+    assert( (err == 0) == (*stateSizePtr != 0) );
+
+    return err;
+}
+
+extern int QBTCreateThreadStateSelf(
+    thread_state_flavor_t * stateFlavorPtr,
+    void **                 statePtr,
+    size_t *                stateSizePtr
+)
+    // See comments in header.
+    //
+    // I used to do this with a bundle of assembly language gunk, but now I take 
+    // advantage of GCC's built-in functions.
+{
+    int         err;
+    void *      pc;
+    void *      fp;
+    thread_state_flavor_t   flavor;
+    
+    assert(stateFlavorPtr != NULL);
+    assert( statePtr != NULL);
+    assert(*statePtr == NULL);
+    assert( stateSizePtr != NULL);
+    assert(*stateSizePtr == 0);
+    
+    // Use GCC intrinsics to get the information we need.
+    
+    pc = __builtin_return_address(0);
+    fp = __builtin_frame_address(1);
+
+    // Use CPU-specific code to allocate and initialise a thread state buffer.
+    
+    // *** Could do the allocation using information from the kArchitectures
+    // array, but GetTaskArch needs an image object, which we don't have handy.
+    
+    #if TARGET_CPU_PPC
+        ppc_thread_state_t *    state;
+        
+        flavor = PPC_THREAD_STATE;
+        state = (ppc_thread_state_t *) calloc(1, sizeof(*state));
+        if (state != NULL) {
+            state->srr0 = (uintptr_t) pc;
+            state->r1   = (uintptr_t) fp;
+        }
+    #elif TARGET_CPU_PPC64
+        ppc_thread_state64_t *  state;
+        
+        flavor = PPC_THREAD_STATE64;
+        state = (ppc_thread_state64_t *) calloc(1, sizeof(*state));
+        if (state != NULL) {
+            state->srr0 = (uintptr_t) pc;
+            state->r1    = (uintptr_t) fp;
+        }
+    #elif TARGET_CPU_X86
+        x86_thread_state32_t *  state;
+        
+        flavor = x86_THREAD_STATE32;
+        state = (x86_thread_state32_t *) calloc(1, sizeof(*state));
+        if (state != NULL) {
+            state->eip = (uintptr_t) pc;
+            state->ebp = (uintptr_t) fp;
+        }
+    #elif TARGET_CPU_X86_64
+        x86_thread_state64_t *  state;
+        
+        flavor = x86_THREAD_STATE64;
+        state = (x86_thread_state64_t *) calloc(1, sizeof(*state));
+        if (state != NULL) {
+#ifdef __LP64__
+            state->rip = (uintptr_t) pc;
+            state->rbp = (uintptr_t) fp;
+#else
+            state->rip = (uintptr_t) pc;
+            state->rbp = (uintptr_t) fp;
+#endif
+        }
+    #else
+        #error What architecture?
+    #endif
+
+    // Pass the information back to our client.
+    
+    if (state == NULL) {
+        err = ENOMEM;
+    } else {
+        *stateFlavorPtr = flavor;
+        *statePtr       = state;
+        *stateSizePtr   = sizeof(*state);
+        err = 0;
+    }
+
+    assert( (err == 0) == (*statePtr != NULL) );
+    assert( (err == 0) == (*stateSizePtr != 0) );
+
+    return err;
+}
+
diff --git a/lib/mac/QBacktrace.h b/lib/mac/QBacktrace.h
new file mode 100644
index 0000000..26e048a
--- /dev/null
+++ b/lib/mac/QBacktrace.h
@@ -0,0 +1,754 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+/*
+ *  QBacktrace.h
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QBacktrace.h
+
+    Contains:   Code for generating backtraces.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QBacktrace.h,v $
+Revision 1.1  2007/03/02 12:19:53         
+First checked in.
+
+
+*/
+
+#ifndef _QBACKTRACE_H
+#define _QBACKTRACE_H
+
+/////////////////////////////////////////////////////////////////
+
+// System Interfaces
+
+// Put <mach/mach.h> inside extern "C" guards for the C++ build 
+// because the Mach header files don't always have them.
+
+#if defined(__cplusplus)
+	extern "C" {
+#endif
+
+#include <mach/mach.h>
+
+#if defined(__cplusplus)
+	}
+#endif
+
+// Our interfaces
+
+#include "QTaskMemory.h"
+#include "QSymbols.h"
+
+/////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/////////////////////////////////////////////////////////////////
+
+/*!
+    @header         QBacktrace.h
+    
+    @abstract       Comprehensive backtrace generation.
+
+    @discussion     This module implements a number of backtrace routines: 
+                    
+                      o QBacktraceMachSelf does a backtrace of the current thread. 
+                      o QBacktraceMachThread does a backtrace of an arbitrary thread 
+                        within an arbitrary process.
+                    
+                    All of the routines are implemented in terms of a common core. 
+                    The code is structured in a very generic way.  For example, 
+                    on an Intel-based Macintosh computer, it's possible to 
+                    backtrace a PowerPC program (run using Rosetta) from a Intel 
+                    program, and vice versa.
+                    
+                    Backtraces are inherently processor-specific.  Internal to this 
+                    module is a ISA layer than adapts the backtrace for various ISA. 
+                    Currently it supports PowerPC (32-bit), PowerPC (64-bit), 
+                    Intel (32-bit), and Intel (64-bit).
+                    
+                    If you're curious about how stack frames work for each ISA, 
+                    check out the comments in the implementation file.  The comments 
+                    in the header focus on how you use these routines.
+                    
+                    The core of this module is also (mostly) independent of the 
+                    technology that you use to read the address space of the 
+                    process that you're backtracing.  The current implementation 
+                    uses Mach APIs to do this, but it is relatively simple to 
+                    retarget it to use some other API (a previous version of the 
+                    code read the memory directly and used the Carbon 
+                    Exception Manager to catch any exceptions that this triggered). 
+                    However, as we're currently quite wedded to Mach, I've only 
+                    retained the Mach functionality.
+                    
+                    If you used a previous version of this code (known as 
+                    MoreBacktrace), please note the following changes:
+                    
+                    o Everything has changed (-:
+                    
+                    I completely rewrote this code to support multiple architectures. 
+                    By including support for 64-bit ISA, I was forced to 
+                    eliminate my dependencies on CoreServices (which isn't available 
+                    to 64-bit programs on Mac OS X 10.4.x), which means now I depend 
+                    solely on the System framework.  Also, because I had to support 
+                    Intel, which requires Mach-O, I decided to drop support for CFM. 
+                    My theory is that anyone who wants to adopt the new version of 
+                    this module is doing so because they're porting to Intel, and 
+                    those folks have to leave their CFM build behind.
+                    
+                    The good news is that the new implementation is very similar 
+                    in spirit to the old, and it should be very easy for you to 
+                    adopt the new code.
+                    
+                    There are a number of approaches for using the routines exported 
+                    by this module.
+                    
+                    o If you just want a simple backtrace, create an array of N 
+                      QBTFrame structures and just pass that into the function. 
+                      You'll get information about the N frames on the top of 
+                      the stack.  Simple and easy.
+                    
+                    o If you want to get all of the frames, you can first call 
+                      the routine with a NULL frame array.  This will return 
+                      you the number of frames in the backtrace.  You can use 
+                      that value to allocate a QBTFrame array with the appropriate 
+                      number of elements and then call the function again to 
+                      get the actual backtrace.
+                    
+                    o You can also use a hybrid of these approaches.  Start by 
+                      allocating an array with N entries, where N is likely to be 
+                      enough to accomodate a typical backtrace.  Then call the 
+                      backtrace function.  If it indicates that you missed some 
+                      elements, grow the array and call the backtrace function 
+                      again.
+                    
+                    The backtrace functions generally don't fail with an error. 
+                    In general, if the chain of frames on the stack runs off the 
+                    rails, the backtrace function just returns a truncated backtrace. 
+                    The two situations where the backtrace function do return an 
+                    error are a) if it can't even start the backtrace, or 
+                    b) if something wacky happens, like it can't allocate memory, 
+                    or manipulate the target task, or find the target thread, and 
+                    so on.
+                    
+                    If the backtrace function succeeds, you may need to dispose 
+                    of the symbol and library strings that it allocated by calling 
+                    QBacktraceDisposeSymbols.  This is necessary when all of the 
+                    following are true:
+                    
+                    o The backtrace function succeeds.
+                    
+                    o You pass NULL to the symRef parameter.
+                    
+                    o You pass a non-zero value to the frameArrayCount parameter 
+                      (and thus passed a non-NULL value to the frameArray 
+                      parameter).
+                    
+                    To make things simpler, it's generally easiest to always 
+                    call QBacktraceDisposeSymbols.  The module know which symbol 
+                    and library strings it allocated, and won't try to free anything 
+                    that it doesn't own.  The QBacktraceDisposeSymbols is very 
+                    flexible about the parameters it accepts, which makes it easy 
+                    for you to call in all circumstances.  See the function description 
+                    for more details.
+
+                    The lifetime of the symbol and library strings returned by the 
+                    backtrace depends on the symRef parameter.  If this is NULL, the 
+                    strings persist until you call QBacktraceDisposeSymbols.  If it 
+                    is not NULL, the strings persist until you dispose of the symbols 
+                    object itself.
+                    
+                    This module assumes that the state of the target task is stable; 
+                    if the task is still running, you may experienc odd artifacts 
+                    (as, for example, we take a backtrace of a thread then try 
+                    to find its symbols, only to determine that the Mach-O image 
+                    has been unloaded in the interim).  The best way to prevent this 
+                    from happening is to suspend the task while you're accessing it.  
+                    The Mach routine task_suspend is very useful in this situation.
+*/
+
+/*!
+    @enum           QBTFlags
+    
+    @abstract       Flags for a frame within a backtrace.
+    
+    @discussion     These flags provide information about a specific frame in 
+                    a backtrace.
+
+                    Note: The code also uses this field to store some internal 
+                    flags.  Do not be alarmed if you see bit other than the 
+                    ones shown below set in a QBTFlags value.
+
+    @constant kQBTFrameBadMask
+                    The frame pointer of this frame is bad (for example, no 
+                    frame could be found or the frame pointer is misaligned or 
+                    outside of the stack or references unmapped memory).
+
+                    IMPORTANT: This flag is set for the last frame in the 
+                    backtrace (where we've run off the end of the stack), but it 
+                    can also be set for intermediate frames (where we've detected 
+                    a frameless leaf routine, either at the top of the stack or 
+                    as part of crossing a signal frame).
+                    
+    @constant kQBTPCBadMask
+                    The program counter of this frame is bad (for example, the 
+                    PC is misaligned or references unmapped memory).
+                    
+    @constant kQBTSignalHandlerMask
+                    This frame represents the invocation of a signal handler.
+*/
+typedef int QBTFlags;
+#define kQBTFrameBadMask        0x0001
+#define kQBTPCBadMask           0x0002
+#define kQBTSignalHandlerMask   0x0004
+#if 0
+enum QBTFlags {
+	kQBTFrameBadMask      = 0x0001,
+	kQBTPCBadMask         = 0x0002,
+	kQBTSignalHandlerMask = 0x0004
+};
+#endif
+
+/*!
+    @struct         QBTFrame
+    
+    @abstract       Describes a frame within a backtrace.
+    
+    @discussion     The end result of a backtrace is an array of QBTFrame 
+                    structures describing a particular frame in the backtrace.  
+
+                    IMPORTANT:  The PC points to the code that's using the frame.  
+                    It is not the return address for that code.  On architectures 
+                    where the frame holds the return address (Intel, but not 
+                    PowerPC), we do the appropriate corrections.
+                    
+    @field pc       The PC for this function invocation.
+
+    @field fp       The frame pointer for this function invocation.
+
+    @field flags    Various flags; see QBTFlags above.
+
+    @field symbol   Name of the symbol containing this PC.  May be NULL.
+    
+                    IMPORTANT: The lifetime of this string is controlled by 
+                    various factors; see the discussion above for details.
+
+    @field library  File path of the library containing this PC.  May be NULL.
+    
+                    IMPORTANT: The lifetime of this string is controlled by 
+                    various factors; see the discussion above for details.
+
+    @field offset   Offset from the symbol to the PC.  Only valid if symbol 
+                    is not NULL.
+*/
+struct QBTFrame {
+	QTMAddr         pc;
+	QTMAddr         fp;
+	QBTFlags        flags;
+    const char *    symbol;
+    const char *    library;
+    QTMOffset       offset;
+};
+typedef struct QBTFrame QBTFrame;
+
+/*!
+    @function       QBacktraceMachSelf
+    
+    @abstract       Returns a backtrace of the current thread.
+    
+    @discussion     Returns a backtrace of the current thread in the array 
+                    described by frameArray and frameArrayCount.  The number 
+                    of valid frames is returned in *frameCountPtr; this may 
+                    be larger than frameArrayCount.
+
+                    IMPORTANT: You may need to call QBacktraceDisposeSymbols 
+                    on the resulting frames.  See the detailed discussion of this 
+                    above.
+
+    @param symRef   A symbols object for doing symbol to address translation 
+                    (and vice versa).  This may be NULL, in which case the routine 
+                    will internally create the symbols object.
+                    
+                    IMPORTANT: This parameter affects the lifecycle of the strings 
+                    returned in the frames array.  See the discussion above for details.
+
+    @param frameArray
+                    A pointer to an array of frame structures; this routine places 
+                    the backtrace into this array with the first element being the 
+                    most recent function invocation.
+                    
+                    On entry, frameArray must not be NULL unless frameArrayCount 
+                    is zero.
+                    
+                    On entry, if frameArray is not NULL, the contents of the array 
+                    are ignored.  
+                    
+                    On success, if frameArray is not NULL, then 
+                    MIN(frameArrayCount, *frameCountPtr) elements of the array 
+                    contain information.  You must clean up these elements by 
+                    calling QBacktraceDisposeSymbols.
+                    
+                    On error, you do not need to clean up this array.
+
+    @param frameArrayCount
+                    The size of this array pointed to be frameArray.  If this 
+                    is zero, frameArray may be NULL.
+
+    @param frameCountPtr
+                    Returns the number of frames in the backtrace.  On entry, 
+                    frameCountPtr must not be NULL and *frameCountPtr is ignored. 
+                    On success, *frameCountPtr contains the number frames in the 
+                    backtrace; this will not be zero.  On error, *frameCountPtr 
+                    will be zero.
+                    
+                    IMPORTANT: On success, *frameCountPtr may be greater than 
+                    frameArrayCount, in which case the backtrace contains more 
+                    frames than can be returned in frameArray.  If you want to 
+                    get all of the frames, you can allocate a bigger frame array 
+                    and call this function again.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QBacktraceMachSelf(
+    QSymbolsRef symRef,
+	QBTFrame *	frameArray, 
+	size_t		frameArrayCount, 
+	size_t *	frameCountPtr
+);
+
+/*!
+    @function       QBacktraceMachThread
+    
+    @abstract       Returns a backtrace of an arbitrary thread in an arbitrary process.
+    
+    @discussion     Returns a backtrace of the specified thread in the specified 
+                    process.  Places the backtrace in the array described by 
+                    frameArray and frameArrayCount.  The number of valid frames 
+                    is returned in *frameCountPtr; this may be larger than 
+                    frameArrayCount.
+
+                    IMPORTANT: You may need to call QBacktraceDisposeSymbols 
+                    on the resulting frames.  See the detailed discussion of this 
+                    above.
+
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the process to inspect; mach_task_self is just fine.
+                    
+                    If you do pass in mach_task_self, this routine automatically 
+                    enables some nice optimisations.
+
+    @param thread   Must be the name of a valid send right for the thread control 
+                    port of the thread to inspect.  Passing in mach_thread_self is  
+                    just fine, although you'd probably be better off calling 
+                    QBacktraceMachSelf instead.
+
+    @param cputype  The CPU type of the dynamic linker from which you want to get 
+                    the symbols.  Typically you would pass CPU_TYPE_ANY to use 
+                    the first dynamic linker that's discovered.  See 
+                    QMOImageCreateFromTaskDyld for a detailed discussion of this 
+                    value.
+
+    @param symRef   A symbols object for doing symbol to address translation 
+                    (and vice versa).  This may be NULL, in which case the routine 
+                    will internally create the symbols object.
+                    
+                    IMPORTANT: This parameter affects the lifecycle of the strings 
+                    returned in the frames array.  See the discussion above for details.
+
+    @param stackBottom
+                    This parameter, along with stackTop, defines the extent of the 
+                    stack you are tracing.  If this information isn't handy, supply 
+                    0 for both parameters.  Supplying meaningful values can reduce 
+                    the number of bogus frames reported if the stack is corrupt.
+
+                    stackBottom and stackTop must both be zero, or stackBottom 
+                    must be strictly less than stackTop.	
+
+    @param stackTop See the discussion of stackBottom.
+
+    @param frameArray
+                    A pointer to an array of frame structures; this routine places 
+                    the backtrace into this array with the first element being the 
+                    most recent function invocation.
+                    
+                    On entry, frameArray must not be NULL unless frameArrayCount 
+                    is zero.
+                    
+                    On entry, if frameArray is not NULL, the contents of the array 
+                    are ignored.  
+                    
+                    On success, if frameArray is not NULL, then 
+                    MIN(frameArrayCount, *frameCountPtr) elements of the array 
+                    contain information.  You must clean up these elements by 
+                    calling QBacktraceDisposeSymbols.
+
+                    On error, you do not need to clean up this array.
+
+    @param frameArrayCount
+                    The size of this array pointed to be frameArray.  If this 
+                    is zero, frameArray may be NULL.
+
+    @param frameCountPtr
+                    Returns the number of frames in the backtrace.  On entry, 
+                    frameCountPtr must not be NULL and *frameCountPtr is ignored. 
+                    On success, *frameCountPtr contains the number frames in the 
+                    backtrace; this will not be zero.  On error, *frameCountPtr 
+                    will be zero.
+                    
+                    IMPORTANT: On success, *frameCountPtr may be greater than 
+                    frameArrayCount, in which case the backtrace contains more 
+                    frames than can be returned in frameArray.  If you want to 
+                    get all of the frames, you can allocate a bigger frame array 
+                    and call this function again.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QBacktraceMachThread(
+	task_t		task, 
+	thread_t	thread,
+    cpu_type_t  cputype,
+    QSymbolsRef symRef,
+	QTMAddr		stackBottom, 
+	QTMAddr		stackTop,
+	QBTFrame *	frameArray, 
+	size_t		frameArrayCount, 
+	size_t *	frameCountPtr
+);
+
+/*!
+    @function       QBacktraceMachThreadState
+    
+    @abstract       Returns a backtrace of a thread state within an arbitrary process.
+    
+    @discussion     Returns a backtrace of the specified thread state in the specified 
+                    process.  Places the backtrace in the array described by 
+                    frameArray and frameArrayCount.  The number of valid frames 
+                    is returned in *frameCountPtr; this may be larger than 
+                    frameArrayCount.
+
+                    IMPORTANT: You may need to call QBacktraceDisposeSymbols 
+                    on the resulting frames.  See the detailed discussion of this 
+                    above.
+
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the process to inspect; mach_task_self is just fine.
+                    
+                    If you do pass in mach_task_self, this routine automatically 
+                    enables some nice optimisations.
+
+    @param stateFlavor
+                    The thread state flavor of the thread state.  For example, 
+                    you might pass in PPC_THREAD_STATE or x86_THREAD_STATE64.
+
+    @param state    A pointer to a block of memory containing the thread state.
+                    For example, if stateFlavor is PPC_THREAD_STATE, this would 
+                    point to a ppc_thread_state_t.
+
+    @param stateSize
+                    The size of the thread state pointed to by the state parameter.
+                    For example, if stateFlavor is PPC_THREAD_STATE, you could 
+                    pass in sizeof(ppc_thread_state_t).  Equivalently, you could 
+                    pass in PPC_THREAD_STATE_COUNT * sizeof(integer_t).
+
+    @param cputype  The CPU type of the dynamic linker from which you want to get 
+                    the symbols.  Typically you would pass CPU_TYPE_ANY to use 
+                    the first dynamic linker that's discovered.  See 
+                    QMOImageCreateFromTaskDyld for a detailed discussion of this 
+                    value.
+
+    @param symRef   A symbols object for doing symbol to address translation 
+                    (and vice versa).  This may be NULL, in which case the routine 
+                    will internally create the symbols object.
+                    
+                    IMPORTANT: This parameter affects the lifecycle of the strings 
+                    returned in the frames array.  See the discussion above for details.
+
+    @param stackBottom
+                    This parameter, along with stackTop, defines the extent of the 
+                    stack you are tracing.  If this information isn't handy, supply 
+                    0 for both parameters.  Supplying meaningful values can reduce 
+                    the number of bogus frames reported if the stack is corrupt.
+
+                    stackBottom and stackTop must both be zero, or stackBottom 
+                    must be strictly less than stackTop.	
+
+    @param stackTop See the discussion of stackBottom.
+
+    @param frameArray
+                    A pointer to an array of frame structures; this routine places 
+                    the backtrace into this array with the first element being the 
+                    most recent function invocation.
+                    
+                    On entry, frameArray must not be NULL unless frameArrayCount 
+                    is zero.
+                    
+                    On entry, if frameArray is not NULL, the contents of the array 
+                    are ignored.  
+                    
+                    On success, if frameArray is not NULL, then 
+                    MIN(frameArrayCount, *frameCountPtr) elements of the array 
+                    contain information.  You must clean up these elements by 
+                    calling QBacktraceDisposeSymbols.
+
+                    On error, you do not need to clean up this array.
+
+    @param frameArrayCount
+                    The size of this array pointed to be frameArray.  If this 
+                    is zero, frameArray may be NULL.
+
+    @param frameCountPtr
+                    Returns the number of frames in the backtrace.  On entry, 
+                    frameCountPtr must not be NULL and *frameCountPtr is ignored. 
+                    On success, *frameCountPtr contains the number frames in the 
+                    backtrace; this will not be zero.  On error, *frameCountPtr 
+                    will be zero.
+                    
+                    IMPORTANT: On success, *frameCountPtr may be greater than 
+                    frameArrayCount, in which case the backtrace contains more 
+                    frames than can be returned in frameArray.  If you want to 
+                    get all of the frames, you can allocate a bigger frame array 
+                    and call this function again.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QBacktraceMachThreadState(
+	task_t					task, 
+	thread_state_flavor_t	stateFlavor,
+	const void *			state,
+	size_t					stateSize,
+    cpu_type_t				cputype,
+    QSymbolsRef				symRef,
+	QTMAddr					stackBottom, 
+	QTMAddr					stackTop,
+	QBTFrame *				frameArray, 
+	size_t					frameArrayCount, 
+	size_t *				frameCountPtr
+);
+
+/*!
+    @function       QBacktraceDisposeSymbols
+    
+    @abstract       Disposes of the symbol and library strings in a frame array.  
+                    It is safe to call this function on a frame array that is all 
+                    zeroes.  It is safe to call this function on a frame array 
+                    that has been passed to any of the backtrace routines, 
+                    regardless of whether they succeeded or not.
+    
+    @discussion     Disposes of the symbol and library strings in the specified 
+                    frame array.
+
+    @param frameArray
+                    A pointer to an array of frames with frameCount elements. 
+                    You may pass NULL, in which case the routine does nothing.
+
+    @param frameCount
+                    The size of the array pointed to be frameArray.
+*/
+extern void QBacktraceDisposeSymbols(QBTFrame frameArray[], size_t frameCount); 
+
+/*!
+    @function       QBTCreateThreadState
+    
+    @abstract       Gets the thread state of the specified thread.
+    
+    @discussion     Allocates a memory block and stores the thread state of the 
+                    specified thread into it.
+                    
+                    To get this information, the routine must inspect the task 
+                    to see what architecture it's running.  Doing this requires a 
+                    reference to an image object within the task.  If you pass 
+                    in a symbols object, the routine will get it from that.  
+                    Otherwise, it will create its own temporary image object 
+                    internally, and to do that it needs you to tell it what 
+                    CPU type you're interested in.
+
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the process containing the thread; mach_task_self is 
+                    just fine.
+
+    @param thread   Must be the name of a valid send right for the thread control 
+                    port of the thread whose state you want.  Passing mach_thread_self 
+                    will work, although it won't yield useful results (because 
+                    the thread state will be for the thread as it entered the 
+                    kernel in the thread_get_state call, and that state is no 
+                    longer useful; specifically, the frames that the state refers 
+                    to have already been destroyed).
+
+    @param cputype  This parameter is only consulted if the symRef is parameter 
+                    is NULL.  In that case, the routine has to create an image 
+                    object for some Mach-O image inside the task and this value 
+                    controls which dynamic linker it finds.  Typically you would 
+                    pass CPU_TYPE_ANY to use the first dynamic linker that's discovered.  
+                    See QMOImageCreateFromTaskDyld for a detailed discussion of this 
+                    value.
+
+    @param symRef   A symbols object from which the routine can get an image object 
+                    for the dynamic linker within the task.  This may be NULL, 
+                    in which case the routine will internally create its own 
+                    temporary image object.
+
+    @param stateFlavorPtr
+                    Must not be NULL.  On success, *stateFlavorPtr will contain 
+                    the thread state flavor for the thread state that's being 
+                    returned.
+
+    @param statePtr
+                    Must not be NULL.  On entry, *statePtr must be NULL.  On 
+                    success, *statePtr will contain a pointer to a newly allocated 
+                    thread state block.  The caller is responsible for freeing 
+                    that memory.
+                    
+                    On error, *statePtr will be NULL.
+
+    @param stateSizePtr
+                    Must not be NULL.  On success, *stateSizePtr will contain 
+                    the size of the thread state that's being returned.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QBTCreateThreadState(
+	task_t                  task, 
+	thread_t                thread,
+    cpu_type_t              cputype,
+    QSymbolsRef             symRef,
+    thread_state_flavor_t * stateFlavorPtr,
+    void **                 statePtr,
+    size_t *                stateSizePtr
+);
+
+/*!
+    @function       QBTCreateThreadStateSelf
+    
+    @abstract       Gets the thread state of the current thread.
+    
+    @discussion     Allocates a memory block and stores the thread state of the 
+                    current thread into it.  This state contains only the 
+                    information needed to do a backtrace; this is architecture 
+                    dependent, but it is typically the stack pointer, frame pointer 
+                    and program counter.  These correspond to the frame of the 
+                    caller of this routine.
+                    
+                    IMPORTANT: This routine has the no-inline attribute because, 
+                    if you inlined it, you'd break its semantics.
+
+    @param stateFlavorPtr
+                    Must not be NULL.  On success, *stateFlavorPtr will contain 
+                    the thread state flavor for the thread state that's being 
+                    returned.
+
+    @param statePtr
+                    Must not be NULL.  On entry, *statePtr must be NULL.  On 
+                    success, *statePtr will contain a pointer to a newly allocated 
+                    thread state block.  The caller is responsible for freeing 
+                    that memory.
+                    
+                    On error, *statePtr will be NULL.
+
+    @param stateSizePtr
+                    Must not be NULL.  On success, *stateSizePtr will contain 
+                    the size of the thread state that's being returned.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QBTCreateThreadStateSelf(
+    thread_state_flavor_t * stateFlavorPtr,
+    void **                 statePtr,
+    size_t *                stateSizePtr
+)  __attribute__((noinline));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/mac/QCrashReport.c b/lib/mac/QCrashReport.c
new file mode 100644
index 0000000..e44a012
--- /dev/null
+++ b/lib/mac/QCrashReport.c
@@ -0,0 +1,1613 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/*
+ *  QCrashReport.c
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QCrashReport.c
+
+    Contains:   Code for generating crash reports.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QCrashReport.c,v $
+Revision 1.1  2007/03/02 12:19:57         
+First checked in.
+
+
+*/
+
+/////////////////////////////////////////////////////////////////
+
+// Compatibility with OS 10.5 SDK and later
+#ifdef __DARWIN_UNIX03
+#undef __DARWIN_UNIX03
+#endif
+#define _NONSTD_SOURCE 1
+#define __DARWIN_UNIX03 0
+
+#include "config.h"
+#include "QCrashReport.h"
+#include "mac_backtrace.h"
+#include "filesys.h"
+
+// System interfaces
+
+#include <TargetConditionals.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+// Put Mach includes inside extern "C" guards for the C++ build 
+// because the Mach header files don't always have them.
+
+#if defined(__cplusplus)
+	extern "C" {
+#endif
+
+#include <servers/bootstrap.h>
+
+// We want both PowerPC and Intel thread state information.
+// By default, the system only gives us the one that's appropriate 
+// for our machine.  So we include both here.
+
+#if TARGET_CPU_PPC
+#include <mach/ppc/thread_status.h>
+#endif
+#include <mach/i386/thread_status.h>
+
+#if defined(__cplusplus)
+	}
+#endif
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Crash Report Object
+
+// Each crash report maintains an array of QCRThread records, one per thread 
+// in the target task.
+
+struct QCRThread {
+    thread_t                thread;             // name of send right for thread control port
+
+    bool                    stateOverridden;    // true if thread state was explicitly set via QCRSetThreadStateAtIndex
+    thread_state_flavor_t   stateFlavor;        // flavor of thread state
+    void *                  state;              // thread state, may be NULL if not yet been fetched
+    size_t                  stateSize;          // size of thread state
+    
+    QBTFrame *              frames;             // backtrace associated with thread state, may be NULL if not yet fetched
+    size_t                  frameCount;         // number of elements of frames array
+};
+typedef struct QCRThread QCRThread;
+
+// QCrashReport represents the crash report itself.  It's the backing for 
+// the exported QCrashReportRef type.
+
+struct QCrashReport {
+    task_t                  task;               // target task
+    cpu_type_t              requestedCPUType;   // taken from cputype parameter of QCRCreateFromTask
+    cpu_type_t              actualCPUType;      // CPU type from main executable of target task
+    QSymbolsRef             symRef;             // symbols object for target task
+    QMOImageRef             executable;         // main executable of target task
+
+    size_t                  threadCount;        // number of elements of threads array
+    QCRThread *             threads;            // threads array, one element per thread
+
+    size_t                  crashedThreadIndex; // index of crashed thread, kQCRNoThread
+};
+typedef struct QCrashReport QCrashReport;
+
+#if ! defined(NDEBUG)
+
+    static bool QCRIsValid(QCrashReportRef crRef)
+        // Returns true if crRef looks like a valid crash report object.
+    {
+        bool    success;
+        size_t  threadIndex;
+        
+        success = true
+            && (crRef != NULL)
+            && (crRef->task != MACH_PORT_NULL)
+            && (crRef->actualCPUType != CPU_TYPE_ANY)
+            && (crRef->symRef != NULL)
+            && (crRef->executable != NULL)
+            && (crRef->threadCount > 0)
+            && (crRef->threads != NULL)
+            && ((crRef->crashedThreadIndex == kQCRNoThread) || (crRef->crashedThreadIndex < crRef->threadCount))
+            ;
+        if (success) {
+            for (threadIndex = 0; threadIndex < crRef->threadCount; threadIndex++) {
+                const QCRThread *   thisThread;
+
+                // Note: A frame count of 0 can happen with a NULL backtrace (we 
+                // haven't attempted the backtrace yet) or with a non-NULL backtrace 
+                // (we did it and it returned zero frames).
+                
+                thisThread = &crRef->threads[threadIndex];
+                success = true
+                    && (thisThread->thread != MACH_PORT_NULL)
+                    && ( (thisThread->state == NULL) == (thisThread->stateSize == 0) )
+                    && ((thisThread->frameCount == 0) || (thisThread->frames != NULL))
+                    ;
+            }
+        }
+        return success;
+    }
+
+#endif
+
+#pragma mark - Create and Destroy
+
+extern int QCRCreateFromTask(
+    task_t              task, 
+    bool                suspend, 
+    thread_t            crashedThread, 
+    cpu_type_t          cputype, 
+    QCrashReportRef *   crRefPtr
+)
+    // See comment in header.
+    //
+    // This does less than you might think.  A lot of the work, like getting the 
+    // state and backtrace for each thread, is done lazily.  The goal is to make 
+    // it relatively cheap to create a crash report object, only paying the 
+    // penality for things like getting the backtrace if you actually need them.
+{
+    int                     err;
+    kern_return_t           kr;
+    kern_return_t           krJunk;
+    QCrashReportRef         crRef;
+    size_t                  threadIndex;
+    
+    assert(task != MACH_PORT_NULL);
+    // crashedThread may be MACH_PORT_NULL
+    assert( crRefPtr != NULL);
+    assert(*crRefPtr == NULL);
+    
+    // Allocate the memory and start filling it out.
+    
+    err = 0;
+    crRef = (QCrashReportRef) calloc(1, sizeof(*crRef));
+    if (crRef == NULL) {
+        err = ENOMEM;
+    }
+    if (err == 0) {
+        crRef->task               = task;
+        crRef->crashedThreadIndex = kQCRNoThread;
+        crRef->requestedCPUType   = cputype;
+        
+        err = QSymCreateFromTask(task, suspend, crRef->requestedCPUType, &crRef->symRef);
+    }
+    if (err == 0) {
+        crRef->executable = QSymGetExecutableImage(crRef->symRef);
+        if (crRef->executable == NULL) {
+            err = EINVAL;
+        }
+        if (err == 0) {
+            crRef->actualCPUType = QMOImageGetCPUType(crRef->executable);
+            // If we didn't get the CPU type we requested, that's very weird.
+            assert( (crRef->requestedCPUType == CPU_TYPE_ANY) || (crRef->requestedCPUType == crRef->actualCPUType) );
+        }
+    }
+    
+    // Fill out the threads array.
+    
+    if (err == 0) {
+        thread_act_array_t      threadsTmp;
+        mach_msg_type_number_t  threadCountTmp;
+        
+        threadsTmp = NULL;
+        
+        kr = task_threads(crRef->task, &threadsTmp, &threadCountTmp);
+        err = QTMErrnoFromMachError(kr);
+        
+        if (err == 0) {
+            crRef->threadCount = threadCountTmp;
+            
+            crRef->threads = (QCRThread *) calloc(crRef->threadCount, sizeof(*crRef->threads));
+            if (crRef->threads == NULL) {
+                err = ENOMEM;
+            }
+            
+            // Regardless of whether the calloc succeeded, we need to run the 
+            // following loop.  It either records the thread send rights we got 
+            // back, or disposes of them.  We need this silliness because we 
+            // can't get a thread count (to calloc the array) without also 
+            // getting rights at the same time, and we have to make sure that 
+            // those rights get cleaned up if calloc fais.
+
+            for (threadIndex = 0; threadIndex < crRef->threadCount; threadIndex++) {
+                if (crRef->threads == NULL) {
+                    krJunk = mach_port_deallocate(mach_task_self(), threadsTmp[threadIndex]);
+                    assert(krJunk == KERN_SUCCESS);
+                } else {
+                    crRef->threads[threadIndex].thread = threadsTmp[threadIndex];
+                }
+            }
+        }
+        
+        if (threadsTmp != NULL) {
+            krJunk = vm_deallocate(mach_task_self(), (vm_address_t) threadsTmp, sizeof(*threadsTmp) * threadCountTmp);
+            assert(krJunk == KERN_SUCCESS);
+        }
+    }
+
+    // Calculate index of crashed thread.  It's an error if we fail to 
+    // find the thread in our thread list.
+
+    if ( (err == 0) && (crashedThread != MACH_PORT_NULL) ) {
+        err = EINVAL;
+        for (threadIndex = 0; threadIndex < crRef->threadCount; threadIndex++) {
+            if (crRef->threads[threadIndex].thread == crashedThread) {
+                err = QCRSetCrashedThreadIndex(crRef, threadIndex);
+                break;
+            }
+        }
+    }
+    
+    // Clean up.
+	    
+    if (err != 0) {
+        QCRDestroy(crRef);
+        crRef = NULL;
+    }
+    *crRefPtr = crRef;
+    
+    assert( (err == 0) == (*crRefPtr != NULL) );
+    assert( (*crRefPtr == NULL) || QCRIsValid(crRef) );
+    
+    return err;
+}
+
+extern int QCRCreateFromSelf(QCrashReportRef *crRefPtr)
+    // See comment in header.
+{
+    assert( crRefPtr != NULL);
+    assert(*crRefPtr == NULL);
+
+    return QCRCreateFromTask(mach_task_self(), false, mach_thread_self(), QMOGetLocalCPUType(), crRefPtr);
+}
+
+extern void QCRDestroy(QCrashReportRef crRef)
+    // See comment in header.
+{
+    kern_return_t   krJunk;
+    size_t          threadIndex;
+    
+    if (crRef != NULL) {
+        if (crRef->threads != NULL) {
+            for (threadIndex = 0; threadIndex < crRef->threadCount; threadIndex++) {
+                QCRThread * thisThread;
+                
+                thisThread = &crRef->threads[threadIndex];
+                
+                if (thisThread->thread != MACH_PORT_NULL) {
+                    krJunk = mach_port_deallocate(mach_task_self(), thisThread->thread);
+                    assert(krJunk == KERN_SUCCESS);
+                }
+                
+                free(thisThread->state);
+                free(thisThread->frames);
+            }
+        }
+        QSymDestroy(crRef->symRef);
+        free(crRef);
+    }
+}
+
+#pragma mark - Accessors
+
+extern QSymbolsRef QCRGetSymbols(QCrashReportRef crRef)
+    // See comment in header.
+{
+    assert( QCRIsValid(crRef) );
+    return crRef->symRef;
+}
+
+extern size_t QCRGetThreadCount(QCrashReportRef crRef)
+    // See comment in header.
+{
+    assert( QCRIsValid(crRef) );
+    return crRef->threadCount;
+}
+
+extern thread_t QCRGetThreadAtIndex(QCrashReportRef crRef, size_t threadIndex)
+    // See comment in header.
+{
+    assert( QCRIsValid(crRef) );
+    return crRef->threads[threadIndex].thread;
+}
+
+extern void QCRGetImages(
+    QCrashReportRef     crRef, 
+    QMOImageRef **      imageArrayPtr,
+    size_t *            imageCountPtr
+)
+    // See comment in header.
+{
+    assert( QCRIsValid(crRef) );
+    assert(imageArrayPtr != NULL);
+    assert(imageCountPtr != NULL);
+    
+    QSymGetImages(crRef->symRef, imageArrayPtr, imageCountPtr);
+}
+
+static void ClearBacktraceAtIndex(
+    QCrashReportRef     crRef, 
+    size_t              threadIndex
+)
+    // For a given thread, clean its backtrace.  This reset the thread to the 
+    // point before a backtrace was ever taken.
+{
+    assert( QCRIsValid(crRef) );
+    assert( threadIndex < crRef->threadCount );
+
+    free(crRef->threads[threadIndex].frames);
+    crRef->threads[threadIndex].frames = NULL;
+    crRef->threads[threadIndex].frameCount = 0;
+
+    assert( QCRIsValid(crRef) );
+}
+
+static void ClearThreadStateAndBacktraceAtIndex(
+    QCrashReportRef     crRef, 
+    size_t              threadIndex
+)
+    // For a given thread, clean its thread state.  This reset the thread to the 
+    // point before a thread state was ever fetched.  This also clears the 
+    // backtrace because the backtrace was based on the old thread state.
+{
+    assert( QCRIsValid(crRef) );
+    assert( threadIndex < crRef->threadCount );
+
+    // Any backtrace based on the thread state is now going to be bogus, so 
+    // clear it out.
+    
+    ClearBacktraceAtIndex(crRef, threadIndex);
+    
+    free(crRef->threads[threadIndex].state);
+    crRef->threads[threadIndex].stateFlavor = 0;
+    crRef->threads[threadIndex].state = NULL;
+    crRef->threads[threadIndex].stateSize = 0;
+
+    assert( QCRIsValid(crRef) );
+}
+
+extern int QCRGetThreadStateAtIndex(
+    QCrashReportRef         crRef,
+    size_t                  threadIndex,
+    cpu_type_t *            cpuTypePtr,
+    thread_state_flavor_t * threadStateFlavorPtr,
+    const void **           threadStatePtr,
+    size_t *                threadStateSizePtr
+)
+    // See comment in header.
+{
+    int             err;
+
+    assert( QCRIsValid(crRef) );
+    // Any combination of cpuTypePtr, threadStateFlavorPtr, threadStatePtr, and 
+    // threadStateSizePtr may be NULL.  This is useful because it allows other 
+    // parts of the module to call QCRGetThreadStateAtIndex to populate the cache 
+    // without having to provide any dummy parameters.
+    
+    if (threadIndex >= crRef->threadCount) {
+        err = EINVAL;
+    } else {
+        // If we haven't already cached a thread's state, go get one now.  This code 
+        // is carefully written so as to not commit any results to the QCRThread 
+        // structure until we're guaranteed success.
+        
+        err = 0;
+        
+        if (crRef->threads[threadIndex].state == NULL) {
+            assert(crRef->threads[threadIndex].stateSize == 0);
+
+            err = QBTCreateThreadState(
+                crRef->task,
+                crRef->threads[threadIndex].thread,
+                crRef->actualCPUType,
+                crRef->symRef,
+                &crRef->threads[threadIndex].stateFlavor,
+                &crRef->threads[threadIndex].state,
+                &crRef->threads[threadIndex].stateSize
+            );
+            
+            // QBTCreateThreadState is required to either error (and leave these 
+            // fields alone) or succeed (and set them up).
+            
+            assert( (err == 0) == (crRef->threads[threadIndex].state  != NULL) );
+            assert( (err == 0) == (crRef->threads[threadIndex].stateSize != 0) );
+        }
+            
+        // Regardless of whether the above succeeded or failed, the QCRThread 
+        // should still be valid.  The QCRIsValid checks that.
+        
+        assert( QCRIsValid(crRef) );
+        
+        if (err == 0) {
+            if (cpuTypePtr != NULL) {
+                *cpuTypePtr = crRef->actualCPUType;
+            }
+            if (threadStateFlavorPtr != NULL) {
+                *threadStateFlavorPtr = crRef->threads[threadIndex].stateFlavor;
+            }
+            if (threadStatePtr != NULL) {
+                *threadStatePtr       = crRef->threads[threadIndex].state;
+            }
+            if (threadStateSizePtr != NULL) {
+                *threadStateSizePtr   = crRef->threads[threadIndex].stateSize;
+            }
+        }
+    }
+
+    assert( QCRIsValid(crRef) );
+    
+    return err;
+}
+
+extern int QCRSetThreadStateAtIndex(
+    QCrashReportRef         crRef,
+    size_t                  threadIndex,
+    thread_state_flavor_t   threadStateFlavor,
+    const void *            threadState,
+    size_t                  threadStateSize
+)
+    // See comment in header.
+{
+    int     err;
+    void *  state;
+    
+    assert( QCRIsValid(crRef) );
+    assert(threadState != NULL);
+    assert(threadStateSize > 0);
+    assert((threadStateSize % sizeof(integer_t)) == 0);
+    
+	state = NULL;
+	
+    err = 0;
+	if (threadIndex >= crRef->threadCount) {
+		err = EINVAL;
+	}
+    
+    // Allocate a buffer to hold our copy of the thread state.
+    
+	if (err == 0) {
+		state = malloc(threadStateSize);
+		if (state == NULL) {
+			err = ENOMEM;
+		} else {
+            memcpy(state, threadState, threadStateSize);
+        }
+	}
+    
+    // Replace the thread's current state, if any, with the copy.
+    
+    if (err == 0) {
+		// Clear out the cached thread state for the thread, and any associated 
+        // backtrace.  That way the backtrace will be recalculated based on the 
+		// new thread state.
+
+        ClearThreadStateAndBacktraceAtIndex(crRef, threadIndex);
+        
+        assert(crRef->threads[threadIndex].state == NULL);
+        crRef->threads[threadIndex].stateOverridden = true;
+        crRef->threads[threadIndex].stateFlavor     = threadStateFlavor;
+        crRef->threads[threadIndex].state           = state;
+        crRef->threads[threadIndex].stateSize       = threadStateSize;
+    }
+
+    assert( QCRIsValid(crRef) );
+
+    return err;
+}
+
+extern int QCRGetBacktraceAtIndex(
+    QCrashReportRef     crRef, 
+    size_t              threadIndex, 
+    const QBTFrame **   frameArrayPtr, 
+    size_t *            frameCountPtr
+)
+    // See comment in header.
+{
+    int     err;
+    
+    assert( QCRIsValid(crRef) );
+    assert(frameArrayPtr != NULL);
+    assert(frameCountPtr != NULL);
+    
+    err = 0;
+    if (threadIndex >= crRef->threadCount) {
+        err = EINVAL;
+    }
+    
+    // If we're been asked to get a backtrace of the current thread and the 
+    // thread state hasn't been explicitly set, clear any cached copy of the 
+    // thread state and the backtrace, and then get the thread state right now. 
+    // This ensures that we always return the current backtrace if we're 
+    // called by the current thread for the current thread.
+    
+    if ( (err == 0) 
+      && (crRef->threads[threadIndex].thread == mach_thread_self()) 
+      && ! crRef->threads[threadIndex].stateOverridden ) {
+        ClearThreadStateAndBacktraceAtIndex(crRef, threadIndex);
+        
+        assert(crRef->threads[threadIndex].state == NULL);
+        
+        err = QBTCreateThreadStateSelf(
+            &crRef->threads[threadIndex].stateFlavor,
+            &crRef->threads[threadIndex].state,
+            &crRef->threads[threadIndex].stateSize
+        );
+    }
+    
+    // Get the thread state (if we haven't already).
+    
+    if (err == 0) {
+        err = QCRGetThreadStateAtIndex(crRef, threadIndex, NULL, NULL, NULL, NULL);
+    }
+
+    // If we haven't already got a backtrace for this thread, go get one.
+    
+    if ( (err == 0) && (crRef->threads[threadIndex].frames == NULL) ) {
+        bool        done;
+        int         retries;
+        QBTFrame *  frames;
+        size_t      frameToAllocate;
+        size_t      frameCount;
+
+        // Start with 50 frames, which is pretty generous (QBTFrame structures are 
+        // small) but certainly not always going to work.
+        
+        retries = 0;
+        done = false;
+        frameToAllocate = 50;
+        do {
+            frames = (QBTFrame *) calloc(frameToAllocate, sizeof(QBTFrame));
+            if (frames == NULL) {
+                err = ENOMEM;
+            }
+            if (err == 0) {
+                err = QBacktraceMachThreadState(
+                    crRef->task,
+                    crRef->threads[threadIndex].stateFlavor,
+                    crRef->threads[threadIndex].state,
+                    crRef->threads[threadIndex].stateSize,
+                    crRef->actualCPUType,
+                    crRef->symRef,
+                    0,
+                    0,
+                    frames,
+                    frameToAllocate,
+                    &frameCount
+                );
+            }
+            if (err == 0) {
+                if (frameCount <= frameToAllocate) {
+                    assert(crRef->threads[threadIndex].frames == NULL);
+                    crRef->threads[threadIndex].frames     = frames;
+                    crRef->threads[threadIndex].frameCount = frameCount;
+                    frames = NULL;      // to prevent it being freed
+                    done = true;
+                } else {
+                    frameToAllocate = frameCount;
+                    
+                    retries += 1;
+                    if (retries > 10) {
+                        assert(false);
+                        err = EINVAL;
+                    }
+                }
+            }
+            // We don't need to call QBacktraceDisposeSymbols because we passed 
+            // a symbols object into QBacktraceMachThreadState.  Thus, the symbol 
+            // strings are owned by the symbols object, and we don't need to clean 
+            // them up here.
+            free(frames);
+        } while ( (err == 0) && ! done );
+    }
+
+    // Return the backtrace (either one we've cached from a previous call, or one 
+    // we just got) to the caller
+    
+    if (err == 0) {
+        *frameArrayPtr = crRef->threads[threadIndex].frames;
+        *frameCountPtr = crRef->threads[threadIndex].frameCount;
+    }
+    
+    assert( (err != 0) || (*frameArrayPtr != NULL) );
+    assert( QCRIsValid(crRef) );
+    
+    return err;
+}
+
+extern size_t QCRGetCrashedThreadIndex(QCrashReportRef crRef)
+    // See comment in header.
+{
+    assert( QCRIsValid(crRef) );
+    
+    return crRef->crashedThreadIndex;
+}
+
+extern int QCRSetCrashedThreadIndex(QCrashReportRef crRef, size_t threadIndex)
+    // See comment in header.
+{
+    int err;
+    
+    assert( QCRIsValid(crRef) );
+
+    err = 0;
+    if ( (threadIndex != kQCRNoThread) && (threadIndex >= crRef->threadCount) ) {
+        err = EINVAL;
+    }
+    if ( (err == 0) && (threadIndex != crRef->crashedThreadIndex) ) {
+        crRef->crashedThreadIndex = threadIndex;
+    }
+    
+    assert( QCRIsValid(crRef) );
+    
+    return err;
+}
+
+#pragma mark - Text Rendering
+
+extern void QCRPrintBacktraces(QCrashReportRef crRef, FILE *f)
+    // See comment in header.
+{
+    int             err;
+    bool            is64Bit;
+    size_t          threadIndex;
+    const QBTFrame *frames;
+    size_t          frameCount;
+    size_t          frameIndex;
+    char *          library;
+    char            libraryName[36];
+    char *          libraryNamePtr;
+    char            offsetStr[32];
+    QTMAddr         pc = 0;
+    size_t          startframe = 0;     // Added for BOINC
+    char            atosPipeBuf[1024];
+    char            nameBuf[256], pathToThisProcess[1024];
+    char            outBuf[1024];
+    char            *sourceSymbol, *symbolEnd;
+    FILE            *atosPipe = NULL;
+    FILE            *cppfiltPipe = NULL;
+    char            saved_env[128], *env = NULL;
+    bool            atosExists = false, cppfiltExists = false;
+   
+    assert( QCRIsValid(crRef) );
+    assert( f != NULL );
+    
+    is64Bit = QMOImageIs64Bit(crRef->executable);
+
+    GetNameOfAndPathToThisProcess(nameBuf, sizeof(nameBuf), pathToThisProcess, sizeof(pathToThisProcess));
+
+    atosExists = boinc_file_exists("/usr/bin/atos");
+    cppfiltExists = boinc_file_exists("/usr/bin/atos");
+    if (atosExists || cppfiltExists) {
+        // The bidirectional popen only works if the NSUnbufferedIO environment 
+        // variable is set, so we save and restore its current value.
+        env = getenv("NSUnbufferedIO");
+        if (env) {
+            strlcpy(saved_env, env, sizeof(saved_env));
+        }
+        setenv("NSUnbufferedIO", "YES", 1);
+    }
+    
+    if (atosExists) {
+        // The backtrace_symbols() and backtrace_symbols() APIs are limited to 
+        // external symbols only, so we also use the atos command-line utility  
+        // which gives us debugging symbols when available.
+        //
+        // For some reason, using the -p option with the value from getpid() 
+        // fails here but the -o option with a path does work.
+#ifdef __x86_64__
+        snprintf(atosPipeBuf, sizeof(atosPipeBuf), "/usr/bin/atos -o \"%s\" -arch x86_64", pathToThisProcess);
+#elif defined (__i386__)
+        snprintf(atosPipeBuf, sizeof(atosPipeBuf), "/usr/bin/atos -o \"%s\" -arch i386", pathToThisProcess);
+#else
+        snprintf(atosPipeBuf, sizeof(atosPipeBuf), "/usr/bin/atos -o \"%s\" -arch ppc", pathToThisProcess);
+#endif
+
+        atosPipe = popen(atosPipeBuf, "r+");
+        if (atosPipe) {
+            setbuf(atosPipe, 0);
+        }
+    }
+
+    if (cppfiltExists) {
+        cppfiltPipe = popen("/usr/bin/c++filt -s gnu-v3 -n", "r+");
+        if (cppfiltPipe) {
+            setbuf(cppfiltPipe, 0);
+        }
+    }
+        
+    for (threadIndex = 0; threadIndex < crRef->threadCount; threadIndex++) {
+        fprintf(f, "Thread %zd%s:\n", threadIndex, (threadIndex == crRef->crashedThreadIndex) ? " Crashed" : "");
+
+        err = QCRGetBacktraceAtIndex(crRef, threadIndex, &frames, &frameCount);
+        if (err == 0) {
+
+        // If this is the thread that crashed, skip frames after the one that generated the signal. (Added for BOINC)
+        startframe = 0;
+        
+        if (threadIndex == crRef->crashedThreadIndex)
+            for (frameIndex = 0; frameIndex < frameCount; frameIndex++) {
+                if ((frames[frameIndex-1].flags & kQBTSignalHandlerMask))
+                    startframe = frameIndex;
+            }
+            
+            for (frameIndex = startframe; frameIndex < frameCount; frameIndex++) {
+
+                // The way that CrashReporter prints the library name is pretty 
+                // wacky, and would require me to use functions that aren't 
+                // available to 64-bit code on 10.4.x.  So I've adopted a simple 
+                // solution of just printing the path to the library, trimmed 
+                // to fit the field.  I trim at the front because the interesting 
+                // stuff (most notably, the framework name) is at the end.
+                //
+                // Note that the field with is 35 and 32 is the field width 
+                // minus the three dots that mark the truncation.
+                
+                library = (char *)frames[frameIndex].library;
+                if (library == NULL) {
+                    libraryName[0] = 0;
+                } else {
+                    libraryNamePtr = strrchr(library, (int)'/');
+                    if (libraryNamePtr == NULL) {
+                        libraryNamePtr = library;
+                    } else {
+                        ++libraryNamePtr;
+                    }
+                    
+                    if (strlen(libraryNamePtr) > 35) {
+                        snprintf(libraryName, sizeof(libraryName), "...%s", libraryNamePtr + strlen(libraryNamePtr) - 32);
+                    } else {
+                        strlcpy(libraryName, libraryNamePtr, sizeof(libraryName));
+                    }
+                }
+                
+				pc = frames[frameIndex].pc;
+				if ( ! is64Bit ) {
+					// Without this, a value of ((QTMAddr) -1), which is generated 
+					// by the backtrace code, will cause us to print an 16 digit 
+					// hex number.
+					pc = pc & 0x00000000FFFFFFFFLL;
+				}
+
+                // OTOH, it's easy to emulate the symbol rendering.  Note that 
+                // I deliberately include the leading underscore.  The fact 
+                // that CrashReporter strips it out is a poor decision IMHO.
+                
+                if (frames[frameIndex].symbol == NULL) {
+                    outBuf[0] = 0;
+                    offsetStr[0] = 0;
+                } else {
+                    strlcpy(outBuf, frames[frameIndex].symbol, sizeof(outBuf));
+                    if (cppfiltPipe) {
+                        if (outBuf[0] == '_') {
+                            fprintf(cppfiltPipe, "%s\n", outBuf+1);
+                        } else {
+                            fprintf(cppfiltPipe, "%s\n", outBuf);
+                        }
+                        BT_PersistentFGets(outBuf, sizeof(outBuf), cppfiltPipe);
+                        symbolEnd = strchr(outBuf, (int)'\n');
+                        if (symbolEnd) {
+                            *symbolEnd = '\0';
+                        }
+                    }
+                    snprintf(offsetStr, sizeof(offsetStr), " + %llu", (unsigned long long) frames[frameIndex].offset);
+                    strlcat(outBuf, offsetStr, sizeof(outBuf));
+
+                    if (atosPipe) {
+                        fprintf(atosPipe, "%#llx\n", (QTMAddr)pc);
+                        BT_PersistentFGets(atosPipeBuf, sizeof(atosPipeBuf), atosPipe);
+                        sourceSymbol = strrchr(atosPipeBuf, (int)':');
+                        if (sourceSymbol) {
+                            if (*--sourceSymbol != ':') {
+                                sourceSymbol = strrchr(atosPipeBuf, (int)'(');
+                                if (sourceSymbol) {
+                                    strlcat(outBuf, sourceSymbol-1, sizeof(outBuf));
+                                    symbolEnd = strchr(outBuf, (int)'\n');
+                                    if (symbolEnd) {
+                                        *symbolEnd = '\0';
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+
+                fprintf(
+                    f, 
+                    "%-3d %-35s %#0*llx %s\n", 
+                    (int) (frameIndex - startframe),            // startframe added for BOINC
+                    libraryName,
+                    is64Bit ? 18 : 10,
+                    pc,
+                    outBuf
+                );
+            }
+        }
+        
+        fprintf(f, "\n");
+    }
+
+    if (atosPipe) {
+        pclose(atosPipe);
+    }
+    
+    if (cppfiltPipe) {
+        pclose(cppfiltPipe);
+    }
+
+    if (atosExists || cppfiltExists) {
+        if (env) {
+            setenv("NSUnbufferedIO", saved_env, 1);
+        } else {
+            unsetenv("NSUnbufferedIO");
+        }
+    }
+}
+
+#if TARGET_CPU_PPC
+static void PrintPowerPCThreadState(
+    QCrashReportRef crRef, 
+    const char *    threadID, 
+    FILE *          f
+)
+    // Prints a PowerPC 32-bit thread state based on the thread state of the crashed 
+    // thread.
+    //
+    // I'm really not happy with this.  For a start, there's a whole bunch code  
+    // that's shared between the various CPU architecture printing routines that 
+    // could be factored out.  However, doing that nicely would require me to 
+    // strike a difficult balance between flexibility and complexity.
+    // 
+    // Secondly, it would be nice if this routine was explicitly passed the 
+    // thread state so that it could work on things other than the crashed 
+    // thread.  And that has implications for the API that wraps this up 
+    // (QCRPrintThreadState).
+    //
+    // Hmmm, what to do.  Nothing at the moment.  Also spent way too much time 
+    // on this code.
+{
+    const ppc_thread_state_t *      state;
+    const unsigned int *            regBase;
+    int                             reg;
+    char                            regName[32];
+    
+    assert( QCRIsValid(crRef) );
+    assert(crRef->crashedThreadIndex != kQCRNoThread);
+    assert( crRef->threads[crRef->crashedThreadIndex].state != NULL );
+    assert( crRef->threads[crRef->crashedThreadIndex].stateFlavor == PPC_THREAD_STATE );
+    
+    if (crRef->threads[crRef->crashedThreadIndex].stateSize == (PPC_THREAD_STATE_COUNT * sizeof(integer_t))) {
+        state = (const ppc_thread_state_t *) crRef->threads[crRef->crashedThreadIndex].state;
+/*
+Thread 0 crashed with PPC Thread State:
+  srr0: 0x01be8f98 srr1: 0x0200f030                vrsave: 0x00000000
+   xer: 0x20000000   lr: 0x01be49bc  ctr: 0x00000000   mq: 0x00000000
+    r0: 0x01be49b4   r1: 0xbffff630   r2: 0x0188e250   r3: 0xffffffff
+    r4: 0x00000052   r5: 0x00000004   r6: 0x00000000   r7: 0xbffff7cf
+    r8: 0xbffffcc7   r9: 0x0000000b  r10: 0xa0000d84  r11: 0xa00041f4
+   r12: 0x0188e3a4  r13: 0x00000000  r14: 0x00000000  r15: 0x00000000
+   r16: 0x00000000  r17: 0x00000000  r18: 0x00000000  r19: 0x00000000
+   r20: 0x00ca0275  r21: 0xbffffa00  r22: 0xbffffcce  r23: 0xbffffccc
+   r24: 0xbffffcc4  r25: 0xbffffb20  r26: 0xbffffcc4  r27: 0xbffffcc4
+   r28: 0x0188d650  r29: 0x01be92d8  r30: 0xbffff900  r31: 0x01be92e0
+*/
+        fprintf(f, "%s crashed with PPC Thread State:\n", threadID);
+#ifndef __LP64__
+        fprintf(f, "  srr0: 0x%08x srr1: 0x%08x                vrsave: 0x%08x\n", state->srr0, state->srr1, state->vrsave);
+        fprintf(f, "   xer: 0x%08x   lr: 0x%08x  ctr: 0x%08x   mq: 0x%08x\n", state->xer, state->lr, state->ctr, state->mq);
+
+        regBase = (const unsigned int *) &state->r0;
+#else
+        fprintf(f, "  srr0: 0x%08x srr1: 0x%08x                vrsave: 0x%08x\n", state->srr0, state->srr1, state->vrsave);
+        fprintf(f, "   xer: 0x%08x   lr: 0x%08x  ctr: 0x%08x   mq: 0x%08x\n", state->xer, state->lr, state->ctr, state->mq);
+
+        regBase = (const unsigned int *) &state->r0;
+#endif
+        for (reg = 0; reg < 32; reg++) {
+            if ((reg % 4) == 0) {
+                fprintf(f, " ");
+            }
+            snprintf(regName, sizeof(regName), "r%d", reg);
+            fprintf(f, "%4s: 0x%08x", regName, regBase[reg]);
+            
+            if ((reg % 4) == 3) {
+                fprintf(f, "\n");
+            }
+        }
+        fprintf(f, "\n");
+    }
+
+}
+
+static void PrintPowerPC64ThreadState(
+    QCrashReportRef crRef, 
+    const char *    threadID, 
+    FILE *          f
+)
+    // Prints a PowerPC 64-bit thread state based on the thread state of the 
+    // crashed thread.
+    //
+    // See PrintPowerPCThreadState for comments about the overall approach.
+{
+    const ppc_thread_state64_t *    state;
+    const unsigned long long *      regBase;
+    int                             reg;
+    char                            regName[32];
+    
+    assert( QCRIsValid(crRef) );
+    assert(crRef->crashedThreadIndex != kQCRNoThread);
+    assert( crRef->threads[crRef->crashedThreadIndex].state != NULL );
+    assert( crRef->threads[crRef->crashedThreadIndex].stateFlavor == PPC_THREAD_STATE64 );
+    
+    if (crRef->threads[crRef->crashedThreadIndex].stateSize == (PPC_THREAD_STATE64_COUNT * sizeof(integer_t))) {
+        state = (const ppc_thread_state64_t *) crRef->threads[crRef->crashedThreadIndex].state;
+
+/*
+Thread 0 crashed with PPC Thread State 64:
+  srr0: 0x0000000000000000 srr1: 0x000000004000d030                        vrsave: 0x0000000000000000
+    cr: 0x44022282          xer: 0x0000000020000004   lr: 0x000000009000b15c  ctr: 0x000000009000b200
+    r0: 0x00000000ffffffe1   r1: 0x00000000bfffeb10   r2: 0x00000000a073cdec   r3: 0x0000000010004005
+    r4: 0x0000000003000006   r5: 0x0000000000000000   r6: 0x0000000000000450   r7: 0x0000000000001203
+    r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000003  r11: 0x00000000a0006a2c
+   r12: 0x000000009000b200  r13: 0x0000000000000000  r14: 0x0000000000000001  r15: 0x0000000000000001
+   r16: 0x0000000000000000  r17: 0x0000000000000000  r18: 0x000000000000430f  r19: 0x0000000000000000
+   r20: 0x00000000101a6e8a  r21: 0x00000000f8bd9d7f  r22: 0x0000000000310808  r23: 0x00000000bfffebe0
+   r24: 0x0000000000000450  r25: 0x0000000000001203  r26: 0x0000000000000000  r27: 0x0000000000000000
+   r28: 0x0000000000000000  r29: 0x0000000003000006  r30: 0x0000000003000006  r31: 0x000000009075cdec
+*/
+
+        fprintf(f, "%s crashed with PPC Thread State:\n", threadID);
+#ifndef __LP64__
+        fprintf(f, "  srr0: 0x%016llx srr1: 0x%016llx                        vrsave: 0x%016x\n", state->srr0, state->srr1, state->vrsave);
+        fprintf(f, "    cr: 0x%08x          xer: 0x%016llx   lr: 0x%016llx  ctr: 0x%016llx\n", state->cr, state->xer, state->lr, state->ctr);
+
+        regBase = (const unsigned long long *) &state->r0;
+#else
+        fprintf(f, "  srr0: 0x%016llx srr1: 0x%016llx                        vrsave: 0x%016x\n", state->srr0, state->srr1, state->vrsave);
+        fprintf(f, "    cr: 0x%08x          xer: 0x%016llx   lr: 0x%016llx  ctr: 0x%016llx\n", state->cr, state->xer, state->lr, state->ctr);
+
+        regBase = (const unsigned long long *) &state->r0;
+#endif
+        for (reg = 0; reg < 32; reg++) {
+            if ((reg % 4) == 0) {
+                fprintf(f, " ");
+            }
+            snprintf(regName, sizeof(regName), "r%d", reg);
+            fprintf(f, "%4s: 0x%016llx", regName, regBase[reg]);
+            
+            if ((reg % 4) == 3) {
+                fprintf(f, "\n");
+            }
+        }
+        fprintf(f, "\n");
+    }
+}
+#endif // TARGET_CPU_PPC
+
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+
+static void PrintX86ThreadState(
+    QCrashReportRef crRef, 
+    const char *    threadID, 
+    FILE *          f
+)
+    // Prints a x86 32-bit thread state based on the thread state of the 
+    // crashed thread.
+    //
+    // See PrintPowerPCThreadState for comments about the overall approach.
+{
+    const x86_thread_state32_t *    state;
+    const unsigned int *            regBase;
+    int                             reg;
+    static const char * kRegNames[16] = {
+        "eax", "ebx", "ecx", "edx",
+        "edi", "esi", "ebp", "esp",
+        "ss",  "efl", "eip", "cs", 
+        "ds",  "es",  "fs",  "gs"
+    };
+    
+    assert( QCRIsValid(crRef) );
+    assert(crRef->crashedThreadIndex != kQCRNoThread);
+    assert( crRef->threads[crRef->crashedThreadIndex].state != NULL );
+    assert( crRef->threads[crRef->crashedThreadIndex].stateFlavor == x86_THREAD_STATE32 );
+    
+    if (crRef->threads[crRef->crashedThreadIndex].stateSize == (x86_THREAD_STATE32_COUNT * sizeof(integer_t))) {
+        state = (const x86_thread_state32_t *) crRef->threads[crRef->crashedThreadIndex].state;
+
+/*
+Thread 0 crashed with X86 Thread State (32-bit):
+  eax: 0x00000000    ebx: 0x908156b2 ecx: 0xbfffee2c edx: 0x00000000
+  edi: 0x0031efa0    esi: 0x00000000 ebp: 0xbfffee98 esp: 0xbfffee70
+   ss: 0x0000001f    efl: 0x00010282 eip: 0x908156b5  cs: 0x00000017
+   ds: 0x0000001f     es: 0x0000001f  fs: 0x00000000  gs: 0x00000037
+*/
+        fprintf(f, "%s crashed with X86 Thread State (32-bit):\n", threadID);
+#ifndef __LP64__
+        regBase = (const unsigned int *) &state->eax;
+#else
+        regBase = (const unsigned int *) &state->eax;
+#endif
+        for (reg = 0; reg < 16; reg++) {
+            if ((reg % 4) == 0) {
+                fprintf(f, " ");
+            }
+            fprintf(f, "%4s: 0x%08x", kRegNames[reg], regBase[reg]);
+            
+            if ((reg % 4) == 3) {
+                fprintf(f, "\n");
+            }
+        }
+        fprintf(f, "\n");
+    }
+}
+
+static void PrintX86_64ThreadState(
+    QCrashReportRef crRef, 
+    const char *    threadID, 
+    FILE *          f
+)
+    // Prints a x86 64-bit thread state based on the thread state of the 
+    // crashed thread.
+    //
+    // See PrintPowerPCThreadState for comments about the overall approach.
+{
+    const x86_thread_state64_t *    state;
+    const unsigned long long *      regBase;
+    int                             reg;
+    static const char * kRegNames[18] = {
+        "rax", "rbx", "rcx", "rdx",
+        "rdi", "rsi", "rbp", "rsp",
+        "r8",  "r9",  "r10", "r11",
+        "r12", "r13", "r14", "r15",
+        "rip", "rfl" 
+    };
+    
+    assert( QCRIsValid(crRef) );
+    assert(crRef->crashedThreadIndex != kQCRNoThread);
+    assert( crRef->threads[crRef->crashedThreadIndex].state != NULL );
+    assert( crRef->threads[crRef->crashedThreadIndex].stateFlavor == x86_THREAD_STATE64 );
+    
+    if (crRef->threads[crRef->crashedThreadIndex].stateSize == (x86_THREAD_STATE64_COUNT * sizeof(integer_t))) {
+        state = (const x86_thread_state64_t *) crRef->threads[crRef->crashedThreadIndex].state;
+/*
+Unknown thread crashed with X86 Thread State (64-bit):
+  rax: 0x0000000000000000  rbx: 0x00007fff5fbffb98  rcx: 0x000000000000003a  rdx: 0x0000000000000000
+  rdi: 0x0000000000000002  rsi: 0x00007fff5fbfedd0  rbp: 0x00007fff5fbffab0  rsp: 0x00007fff5fbff5f0
+   r8: 0x0000000000000e03   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000246
+  r12: 0x00007fff5fbffb78  r13: 0x00007fff5fbffc18  r14: 0x0000000000000003  r15: 0x0000000000000000
+  rip: 0x000000010000f1fe  rfl: 0x0000000000010202
+*/
+        fprintf(f, "%s crashed with X86 Thread State (64-bit):\n", threadID);
+#ifndef __LP64__
+        regBase = (const unsigned long long *) &state->rax;
+#else
+        regBase = (const unsigned long long *) &state->rax;
+#endif
+        for (reg = 0; reg < 18; reg++) {
+            fprintf(f, "%5s: 0x%08llx", kRegNames[reg], regBase[reg]);
+            
+            if ((reg % 4) == 3) {
+                fprintf(f, "\n");
+            }
+        }
+        fprintf(f, "\n");
+        fprintf(f, "\n");
+    }
+}
+
+#endif
+
+extern void QCRPrintThreadState(QCrashReportRef crRef, FILE *f)
+    // See comment in header.
+{
+    int     err;
+    char    threadID[32];
+    
+    assert( QCRIsValid(crRef) );
+    assert( f != NULL );
+    
+    // Get the thread state, if we haven't already.
+    
+    err = QCRGetThreadStateAtIndex(crRef, crRef->crashedThreadIndex, NULL, NULL, NULL, NULL);
+    if (err == 0) {
+        snprintf(threadID, sizeof(threadID), "Thread %zu", crRef->crashedThreadIndex);
+
+        // Dispatch to the printing routine.
+        //
+        // Each CPU type has its own thread state flavor namespace, although it's 
+        // shared by the 32- and 64-bit variants.
+        switch (crRef->actualCPUType) {
+#if TARGET_CPU_PPC
+            case CPU_TYPE_POWERPC:
+#if 0       // BOINC does not support 64-bit PowerPC
+            case CPU_TYPE_POWERPC64:
+#endif
+                switch (crRef->threads[crRef->crashedThreadIndex].stateFlavor) {
+                    case PPC_THREAD_STATE:
+                        PrintPowerPCThreadState(crRef, threadID, f);
+                        break;
+                    case PPC_THREAD_STATE64:
+                        PrintPowerPC64ThreadState(crRef, threadID, f);
+                        break;
+                    default:
+                        assert(false);
+                        break;
+                }
+                break;
+#endif  // TARGET_CPU_PPC
+
+
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+            case CPU_TYPE_X86:
+            case CPU_TYPE_X86_64:
+                switch (crRef->threads[crRef->crashedThreadIndex].stateFlavor) {
+                    case x86_THREAD_STATE32:
+                        PrintX86ThreadState(crRef, threadID, f);
+                        break;
+                    case x86_THREAD_STATE64:
+                        PrintX86_64ThreadState(crRef, threadID, f);
+                        break;
+                    default:
+                        assert(false);
+                        break;
+                }
+                break;
+#endif
+            default:
+                assert(false);
+                break;
+        }
+    }
+}
+
+extern void QCRPrintImages(QCrashReportRef crRef, FILE *f)
+    // See comment in header.
+{
+    int                         err;
+    int                         width;
+    QMOImageRef *               images;
+    size_t                      imageCount;
+    size_t                      imageIndex;
+    struct segment_command_64   seg;
+    const char *                filePath;
+    QTMAddr                     imageStart;
+    QTMAddr                     imageEnd;
+
+    assert( QCRIsValid(crRef) );
+    assert( f != NULL );
+
+    fprintf(f, "Binary Images Description:\n");
+
+    width = QMOImageIs64Bit(crRef->executable) ? 18 : 10;
+
+    QCRGetImages(crRef, &images, &imageCount);
+    for (imageIndex = 0; imageIndex < imageCount; imageIndex++) {
+        QMOImageRef thisImage;
+        
+        thisImage = images[imageIndex];
+        
+        err = QMOImageGetSegmentByName(thisImage, "__TEXT", NULL, &seg);
+        assert(err == 0);
+        
+        if (err == 0) {
+            filePath = QMOImageGetFilePath(thisImage);
+            if (filePath == NULL) {
+                filePath = "";
+            }
+            
+            // Currently we just print the path to the library.  CrashReporter 
+            // has all sorts of wacky code to print the bundle ID and version 
+            // numbers.  This isn't easy to replicate in code that can only 
+            // link with libSystem.
+            
+            imageStart = seg.vmaddr + QMOImageGetSlide(thisImage);
+            imageEnd   = imageStart + seg.vmsize - 1;
+            fprintf(f, "%#*llx - %#*llx %s\n", width, imageStart, width, imageEnd, filePath);
+        }
+    }
+    fprintf(f, "\n");
+}
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Tool Helpers
+
+#if 0       // Not used by BOINC
+
+// Declare the standard C environ variable.  I never understood why this 
+// global isn't declared in some public prototype.
+
+extern char **environ;
+
+static int ForkExecWithBootstrap(const char *toolArgs[], mach_port_t newBootstrap, pid_t *childPIDPtr)
+    // Runs a process with the specified bootstrap namespace.  toolArgs is a 
+    // NULL terminated list of argument for the tool.  The first entry must be 
+    // the path to the tool.  newBootstrap is the name of a send right to the 
+    // new bootstrap namespace.  childPIDPtr must not be NULL.  On entry, 
+    // *childPIDPtr is ignored.  On success, *childPIDPtr is the process ID 
+    // of the new process.  On error, *childPIDPtr is -1.
+    //
+    // IMPORTANT: This routine is not thread safe.  On current systems the only 
+    // reliable way to set the bootstrap port of a child process is for the 
+    // process to inherit it.  Thus, this routine works by setting the current 
+    // process's bootstrap, forking the child, and then resetting the current 
+    // process's bootstrap back to its previous value.  If some other thread 
+    // calls fork while we're doing this, it's child is going to run in the 
+    // wrong namespace.  Go team!
+    //
+    // You can solve this problem using posix_spawn, but it's not available on 
+    // current systems.
+{
+    int             err;
+    kern_return_t   kr;
+    kern_return_t   junk;
+    mach_port_t     oldBootstrap;
+    pid_t           childPID;
+    
+    assert(toolArgs != NULL);
+    assert(toolArgs[0] != NULL);
+    assert(newBootstrap != MACH_PORT_NULL);
+    assert( childPIDPtr != NULL);
+    
+    oldBootstrap = MACH_PORT_NULL;
+    childPID = -1;
+    
+    // Get the old bootstrap and set the new bootstrap.
+    
+    kr = task_get_bootstrap_port(mach_task_self(), &oldBootstrap);
+    if (kr == KERN_SUCCESS) {
+        kr = task_set_bootstrap_port(mach_task_self(), newBootstrap);
+    }
+    
+    // Do the standard fork/exec dance.
+    
+    if (kr == KERN_SUCCESS) {
+        childPID = fork();
+        switch (childPID) {
+            case -1:
+                err = errno;
+                break;
+            case 0:
+                (void) execve(toolArgs[0], (char **) toolArgs, environ);
+                _exit(EXIT_FAILURE);
+                break;
+            default:
+                // parent execution continues below
+                err = 0;
+                break;
+        }
+        
+        // In the parent, restore the bootstrap.
+        
+        junk = task_set_bootstrap_port(mach_task_self(), oldBootstrap);
+        assert(junk == KERN_SUCCESS);
+    } else {
+        err = QTMErrnoFromMachError(kr);
+    }
+    
+    // Clean up.
+    
+    *childPIDPtr = childPID;
+    if (oldBootstrap != MACH_PORT_NULL) {
+        junk = mach_port_deallocate(mach_task_self(), oldBootstrap);
+        assert(junk == KERN_SUCCESS);
+    }
+    
+    assert( (err == 0) == (*childPIDPtr != -1) );
+
+    return err;
+}
+
+#pragma mark - On task_for_pid and Task Control Ports
+
+/*
+    On task_for_pid and Task Control Ports
+    --------------------------------------
+    When writing an external crash reporting tool, you really need to be able to 
+    get at the memory, threads, and so on, of the target process.  The only way 
+    to do this on Mac OS X is to have a send right to the process's task 
+    control port.  And the best way to get that is to use a routine called 
+    task_for_pid.
+    
+    task_for_pid returns the name of a send right for the task control port for 
+    the process with the specified process ID.  This is fabulously useful for 
+    debugging tools, like any form of external crash report.  But, needless to 
+    say, it represents somewhat of a security concern.  Once you have access 
+    to a task's control port, you can do anything you like to the task 
+    (most notably, modify its memory).  Therefore it's important that task_for_pid 
+    be appropriately protected.
+    
+    Initially (starting with Mac OS X 10.0), task_for_pid's security policy was 
+    pretty simple.  To summarise, the old policy was that task_for_pid would 
+    succeed if:
+    
+    o if the caller is running as root (EUID 0)
+
+    o otherwise if the caller is running as the same UID as the target (and the 
+      target's EUID matches its RUID, that is, it's not a setuid binary)
+    
+    Starting with the release of the Intel-based Macintosh computers, task_for_pid 
+    security has been tightened up.  The new policy is that task_for_pid suceeds:
+    
+    o if the caller was running as root (EUID 0)
+    
+    o if the pid is that of the caller
+    
+    o if the caller is running as the same UID as the target and the target's 
+      EUID matches its RUID, that is, it's not a setuid binary AND the caller 
+      is in group "procmod" or "procview"
+    
+    btw The long term goal of having both "procmod" and "procview" is that 
+    task_for_pid would return a send right for the task control port only to those 
+    processes in "procmod"; the callers in "procview" would only get a send right 
+    to a task inspection port.  This distinction is not currently implemented.
+      
+    This new policy will be adopted by all systems (that is, PowerPC-based systems 
+    as well as Intel-based systems) in a future version of Mac OS X.
+    
+    This policy change is a pain for code, like this, that wants to manipulate 
+    other processes.  If you want to get the task control port for a task, your 
+    options are much more limited:
+    
+    1. run as ROOT (EUID 0) -- This is a bad idea for security reasons.
+    
+    2. change the policy -- You can actually change the task_for_pid policy via 
+       sysctl.  This is also a bad idea.  The policy was changed changed for a 
+       reason, and it's not your place to subvert that change.
+    
+    3. get into group "procmod" or "procview" -- This is the solution used by 
+       Apple's tools, but it is tricky for third party developers in practise.  
+       You have to make your executable set-group-id to one of these groups, and 
+       that requires you to have some sort of installer to 'bless' the executable.
+       
+    4. get the task to give you a send right to its task control port -- As with 
+       any other other Mach right, you can send a send right for a task control 
+       port between tasks as part of a Mach message.
+    
+    Given the above, only option 4 is a reasonable solution.  However, it does result 
+    in a chicken and egg problem.  How do you initially start communication with 
+    the task?  The solution to this is to use the Mach bootstrap service.  This 
+    service lets you register a port with a specific name, and other processes 
+    within the same bootstrap context can look up that port using that name.
+
+    However, publishing your task control port via the bootstrap service is not 
+    wise.  Anyone could look up the port and start reading and writing your tasks 
+    memory.  Of course, this is what you want, except that you want to restrict 
+    it to just your crash report tool.
+    
+    You can solve that problem by creating a new bootstrap namespace (also known 
+    as a subset) and registering your task control port in that namespace.  
+    If you run your crash reporting tool in that namespace, it can access your 
+    task control port.  Moreover, only processes running in that namespace can 
+    access it.  That's the approach taken by the following code.
+*/
+
+extern int QCRExecuteCrashReportTool(const char *toolArgs[], pid_t *pidPtr, int *toolStatusPtr)
+    // See comment in header.
+{
+    int             err;
+    kern_return_t   kr;
+    kern_return_t   junk;
+    mach_port_t     inheritedNamespace;
+    mach_port_t     privateNamespace;
+    pid_t           childPID;
+    pid_t           waitResult;
+    int             status;
+    
+    assert(toolArgs != NULL);
+    assert(toolArgs[0] != NULL);
+    // pidPtr may be NULL
+    assert( (pidPtr == NULL) || (*pidPtr == -1) );
+    assert( (pidPtr == NULL) == (toolStatusPtr != NULL) );
+    
+    inheritedNamespace = MACH_PORT_NULL;
+    privateNamespace   = MACH_PORT_NULL;
+    
+    // Get the old bootstarp.
+    
+    kr = task_get_bootstrap_port(mach_task_self(), &inheritedNamespace);
+    
+    // Create a private namespace based on it.  It's this that we're going to 
+    // give to the child.
+    
+    if (kr == KERN_SUCCESS) {
+        kr = bootstrap_subset(inheritedNamespace, mach_task_self(), &privateNamespace);
+    }
+    
+    // Register our task control port in the private namespace.  Only someone 
+    // with access to privateNamespace can look up our task control port.  And 
+    // we're only going to give that namespace to our child.
+    //
+    // Note that we don't have to worry about name uniqueness, because we just 
+    // created the namespace and it doesn't have any entries.  If someone in 
+    // the parent namespace (inheritedNamespace) has registered this name, 
+    // our registration masks it.
+    
+    if (kr == KERN_SUCCESS) {
+        // Don't try this at home kiddies.  It gives anyone that inherits this 
+        // private namespace completely access to your process.
+        kr = bootstrap_register(privateNamespace, "QCrashReport", mach_task_self());
+    }
+    err = QTMErrnoFromMachError(kr);
+    
+    // Run the tool with the private namespace.
+    
+    if (err == 0) {
+        err = ForkExecWithBootstrap(toolArgs, privateNamespace, &childPID);
+    }
+    
+    // Clean up.  If we're running asynchronously, just pass the PID back to the 
+    // caller.  If we're running synchronously, wait for the child to quit.
+    
+    if (err == 0) {
+        if (pidPtr != NULL) {
+            // Client is going to manage the child from here on.
+            
+            *pidPtr = childPID;
+        } else {
+            // Client wants use to wait for the child to exit.
+            
+            do {
+                waitResult = waitpid(childPID, &status, 0);
+                if (waitResult < 0) {
+                    err = errno;
+                }
+            } while (err == EINTR);
+            
+            if (err == 0) {
+                if ( WIFEXITED(status) ) {
+                    *toolStatusPtr = WEXITSTATUS(status);
+                } else {
+                    err = EINVAL;
+                }
+            }
+        }
+    }
+
+    // Clean up.  Note that we can dispose of our reference to privateNamespace. 
+    // The namespace will persist because the child has a send right for it. 
+    // It will, however, be deactivated if we quit.
+
+    if (inheritedNamespace != MACH_PORT_NULL) {
+        junk = mach_port_deallocate(mach_task_self(), inheritedNamespace);
+        assert(junk == KERN_SUCCESS);
+    }
+    if (privateNamespace != MACH_PORT_NULL) {
+        junk = mach_port_deallocate(mach_task_self(), privateNamespace);
+        assert(junk == KERN_SUCCESS);
+    }
+    
+    assert( (pidPtr == NULL) || ( (err == 0) == (*pidPtr != -1) ) );
+
+    return err;
+}
+
+extern int QCRGetParentTask(task_t *taskPtr)
+    // See comment in header.
+{
+    int             err;
+    kern_return_t   kr;
+    kern_return_t   junk;
+    mach_port_t     bootstrap;
+    
+    assert( taskPtr != NULL);
+    assert(*taskPtr == MACH_PORT_NULL);
+
+    bootstrap = MACH_PORT_NULL;
+    
+    // Look up the parent's task control port by name in our bootstrap namespace. 
+    // Easy peasy.
+    
+    kr = task_get_bootstrap_port(mach_task_self(), &bootstrap);
+    if (kr == KERN_SUCCESS) {
+        kr = bootstrap_look_up(bootstrap, "QCrashReport", taskPtr);
+    }
+    err = QTMErrnoFromMachError(kr);
+    
+    if (bootstrap != MACH_PORT_NULL) {
+        junk = mach_port_deallocate(mach_task_self(), bootstrap);
+        assert(junk == KERN_SUCCESS);
+    }
+    
+    if (false) {
+        fprintf(stderr, "Process %ld waiting for debugger.\n", (long) getpid());
+        pause();
+    }
+
+    return err;
+}
+
+#endif      // Not used by BOINC
diff --git a/lib/mac/QCrashReport.h b/lib/mac/QCrashReport.h
new file mode 100644
index 0000000..e085176
--- /dev/null
+++ b/lib/mac/QCrashReport.h
@@ -0,0 +1,774 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+/*
+ *  QCrashReport.h
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QCrashReport.h
+
+    Contains:   Code for generating crash reports.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QCrashReport.h,v $
+Revision 1.1  2007/03/02 12:20:01         
+First checked in.
+
+
+*/
+
+#ifndef _QCRASHREPORT_H
+#define _QCRASHREPORT_H
+
+/////////////////////////////////////////////////////////////////
+
+#include <stdio.h>
+
+// Put <mach/mach.h> inside extern "C" guards for the C++ build 
+// because the Mach header files don't always have them.
+
+#if defined(__cplusplus)
+	extern "C" {
+#endif
+
+#include <mach/mach.h>
+
+#if defined(__cplusplus)
+	}
+#endif
+
+#include "QMachOImage.h"
+#include "QBacktrace.h"
+
+/////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*!
+    @functiongroup  Crash Report Object
+*/
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Crash Report Object
+
+/*!
+    @header         QCrashReport.h
+    
+    @abstract       High-level crash report object.
+
+    @discussion     This module provides a high-level interface for creating and 
+                    recording crash report information.  It encapsulates all of 
+                    the complexity of many lower-level modules, providing you with 
+                    a nice, clean interface for creating crash reports.
+                    
+                    To create a create report object, just call QCRCreateFromTask or 
+                    QCRCreateFromSelf.  Use QCRDestroy to destroy the resulting 
+                    object.  Use QCRGetThreadCount and QCRGetThreadAtIndex to 
+                    iterate the threads of the crash report, and 
+                    QCRGetBacktraceAtIndex to interate the backtraces for those 
+                    threads.  Call QCRGetSymbols and QCRGetImages to get at the 
+                    underlying symbols object and image objects.  Finally, 
+                    QCRPrintBacktraces, QCRPrintThreadState and QCRPrintImages 
+                    provide a standard way to render crash reports to text.
+                    
+                    This module assumes that the state of the process you're 
+                    investigating is stable.  That is, when you create a crash report  
+                    object for a process, you need to guarantee that the state 
+                    of the process does not change while that object exists.  
+                    The best way to prevent this from happening is to suspend the 
+                    process while you're accessing it.  You can automatically 
+                    suspend the task for the lifetime of the crash report object by 
+                    pass true to the suspend parameter of QCRCreateFromTask.
+                    
+                    One special case of this applies to crash report objects that 
+                    target the current process (mach_task_self).  In this case, 
+                    it's not feasible to suspend the task, a fact that makes for 
+                    some interesting challenges.  This module copes with that 
+                    in two ways:
+                    
+                    o When you get a backtrace for a thread, it implicitly gets
+                      the thread's state.  It then caches that state and the 
+                      associated backtrace.  From that point on, you get 
+                      a consistent backtrace, although it may not be correlated 
+                      with the current state of the thread.
+                      
+                    o An exception to this is for the current thread 
+                      (mach_thread_self).  Unless you explicitly set its state 
+                      (using QCRSetThreadStateAtIndex), the act of calling 
+                      QCRGetBacktraceAtIndex causes the module to throw away 
+                      the cached backtrace for the thread and generate a new one 
+                      based on the thread's current state.
+
+                    This has some interesting consequences on the life time of 
+                    certain memory blocks returned by the module.  Specifically:
+                    
+                    o thread state returned by QCRGetThreadStateAtIndex
+
+                    o backtrace frames returned by QCRGetBacktraceAtIndex
+                    
+                    In both cases, this memory persists until one of the following 
+                    happens:
+                      
+                      - you destroy the crash report object
+                      - you explicitly set the thread state using QCRSetThreadStateAtIndex
+                      - it's associated with the current thread and you generate 
+                        a new backtrace for the thread by calling QCRGetBacktraceAtIndex
+
+                    In addition, this module provides some helper routines for 
+                    launching a crash report tool (QCRExecuteCrashReportTool) and 
+                    for giving that tool access to the task control port for the 
+                    crashed task (QCRGetParentTask).
+*/
+
+/*!
+    @typedef        QCrashReportRef
+    
+    @abstract       A reference to the crash report object.
+    
+    @discussion     This type is opaque; to create, destroy, or access it, you must 
+                    use the routines in this module.
+*/
+typedef struct QCrashReport *QCrashReportRef;
+
+/*!
+    @functiongroup  Create and Destroy
+*/
+#pragma mark ***** Create and Destroy
+
+/*!
+    @function       QCRCreateFromTask
+    
+    @abstract       Creates a crash report object for an arbitrary process.
+    
+    @discussion     Creates a crash report object for the specified process.
+
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the process to inspect; mach_task_self is just fine.
+                    
+                    If you do pass in mach_task_self, this routine automatically 
+                    enables some nice optimisations.
+
+    @param suspend  If true, the target task is suspended while the crash report 
+                    object exists.
+                    
+                    Must not be true if task is mach_task_self.
+
+    @param crashedThread
+                    The name of a valid send right for the thread control port of 
+                    the thread that crashed, or MACH_PORT_NULL if you don't have 
+                    this information handy.  If you pass in MACH_PORT_NULL, you 
+                    can also set the crashed thread later by calling 
+                    QCRSetCrashedThreadIndex.
+                    
+                    It is accepatble to pass mach_thread_self to this parameter, 
+                    but it may not do what you expect.  See the discussion 
+                    above for details.  
+                    
+                    This value primarily affects the text rendering routines; 
+                    see the discussion in QCRSetCrashedThreadIndex for details.
+
+    @param cputype  The CPU type for which you are creating a crash report.
+                    Typically you would pass CPU_TYPE_ANY to use the CPU type of 
+                    the first dynamic linker that's discovered.  See 
+                    QMOImageCreateFromTaskDyld for a detailed discussion of this 
+                    value.
+
+    @param crRefPtr On entry, crRefPtr must not be NULL and *crRefPtr must 
+                    be NULL.  On success, *crRefPtr will be a reference to the 
+                    crash report object that's been created.  On error, *crRefPtr 
+                    will be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QCRCreateFromTask(
+    task_t              task, 
+    bool                suspend, 
+    thread_t            crashedThread, 
+    cpu_type_t          cputype, 
+    QCrashReportRef *   crRefPtr
+);
+
+/*!
+    @function       QCRCreateFromSelf
+    
+    @abstract       Creates a crash report object for the current process.
+    
+    @discussion     This is equivalent to calling QCRCreateFromTask with 
+                    mach_task_self, false, mach_thread_self, and QMOGetLocalCPUType 
+                    for the first four parameters.
+
+    @param crRefPtr On entry, crRefPtr must not be NULL and *crRefPtr must 
+                    be NULL.  On success, *crRefPtr will be a reference to the 
+                    crash report object that's been created.  On error, *crRefPtr 
+                    will be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QCRCreateFromSelf(QCrashReportRef *crRefPtr);
+
+/*!
+    @function       QCRDestroy
+    
+    @abstract       Destroys a crash report object.
+    
+    @discussion     Destroys the supplied crash report object.
+                    
+    @param qmoImage The crash report object to destroy.  If this is NULL, the routine 
+                    does nothing.
+*/
+extern void QCRDestroy(QCrashReportRef crRef);
+
+/*!
+    @functiongroup  Accessors
+*/
+#pragma mark ***** Accessors
+
+/*!
+    @function       QCRGetSymbols
+    
+    @abstract       Gets the symbols for this crash report.
+    
+    @discussion     Gets the symbols object for this crash report object.
+
+    @param crRef    A valid crash report object.
+
+    @result         A reference to the symbols object.  This will never be 
+                    NULL (it is created when the crash report object is created, 
+                    and any failures would have caused creation to fail).  It 
+                    exists until you destroy the crash report object.
+*/
+extern QSymbolsRef QCRGetSymbols(QCrashReportRef crRef);
+
+/*!
+    @function       QCRGetImages
+    
+    @abstract       Gets the images for this crash report.
+    
+    @discussion     Gets the array of image objects for this crash report object.
+    
+                    This routine can never fail; the image array is created when 
+                    the crash report object is created, and any failures would 
+                    have caused creation to fail.
+                    
+                    IMPORTANT: Do not free the array that this returns, or indeed 
+                    any of the image objects contained in the array.  These all 
+                    belongs to the crash report object and will be destroyed when 
+                    the crash report object is destroyed.
+
+    @param crRef    A valid crash report object.
+
+    @param imageArrayPtr
+                    A pointer to an image object array pointer.  On entry,  
+                    imageArrayPtr must not be NULL and *imageArrayPtr is 
+                    ignored.  On return, *imageArrayPtr will be a pointer 
+                    to *imageCountPtr QMOImageRef objects.
+
+    @param imageCountPtr
+                    A pointer to an image object count.  On entry, imageCountPtr 
+                    must not be NULL and *imageCountPtr is ignored.  On return, 
+                    *imageCountPtr is the size of the image array whose pointer 
+                    is returned in *imageArrayPtr.
+*/
+extern void QCRGetImages(
+    QCrashReportRef     crRef, 
+    QMOImageRef **      imageArrayPtr,
+    size_t *            imageCountPtr
+);
+
+/*!
+    @function       QCRGetThreadCount
+    
+    @abstract       Returns the number of threads in this crash report.
+    
+    @discussion     Return the number of threads running in the process for which 
+                    this crash report was created.
+
+    @param crRef    A valid crash report object.
+
+    @result         A count of the number of threads.
+*/
+extern size_t QCRGetThreadCount(QCrashReportRef crRef);
+
+/*!
+    @function       QCRGetThreadAtIndex
+    
+    @abstract       Returns the specified thread for a crash report.
+    
+    @discussion     Returns the thread specified by threadIndex for the crash 
+                    report.  
+
+    @param crRef    A valid crash report object.
+
+    @param threadIndex
+                    A zero-based index into the array of threads.
+
+    @result         Returns the name of a send right for the thread control 
+                    port.  This right is owned by the crash report object; 
+                    you must not release it and it goes away when you destroy 
+                    the crash report object (although you may have other 
+                    references to the right).
+*/
+extern thread_t QCRGetThreadAtIndex(QCrashReportRef crRef, size_t threadIndex);
+
+/*!
+    @function       QCRGetThreadStateAtIndex
+    
+    @abstract       Gets the thread state of the specified thread.
+    
+    @discussion     Returns the state of the specified thread in the crash 
+                    report object.  The first time you call this function 
+                    (either explicitly, or implicitly by calling functions that 
+                    need the thread state), it takes a snapshot of the thread 
+                    state.  By the time the function returns, this snapshot is 
+                    valid only if the thread (or the entire task) is suspend.  
+                    Also, the lifetime of this snapshot is controlled by a number 
+                    of factors; see the detailed discussion of this topic, 
+                    above.
+                    
+                    If you have explicitly set the thread state (by calling 
+                    QCRSetThreadStateAtIndex) you will get back the values you 
+                    set most recently.
+
+    @param crRef    A valid crash report object.
+
+    @param threadIndex
+                    A zero-based index into the array of threads.
+                    
+                    If this specifies the current thread (that is, QCRGetThreadAtIndex 
+                    for this index returns mach_thread_self), you probably won't 
+                    get useful results.  See the discussion above for details. 
+
+    @param cpuTypePtr
+                    If NULL, this parameter is ignored.  Otherwise, 
+                    on entry, the value of *cpuTypePtr is ignored.  On success, 
+                    *cpuTypePtr will be the CPU type of the process that contains 
+                    the thread (for example, CPU_TYPE_X86).  This will be the same 
+                    for all threads within the process.  On error, the value in 
+                    *cpuTypePtr is undefined.
+
+    @param threadStateFlavorPtr
+                    If NULL, this parameter is ignored.  Otherwise, 
+                    on entry, the value of *threadStateFlavorPtr is ignored.  
+                    On success, *threadStateFlavorPtr will be the thread state 
+                    flavor of the thread's state (for example, x86_THREAD_STATE32).  
+                    On error, the value in *threadStateFlavorPtr is undefined.
+
+    @param threadStatePtr
+                    If NULL, this parameter is ignored.  Otherwise, 
+                    on entry, the value of *threadStatePtr is ignored.  
+                    On success, *threadStatePtr will contain a pointer to the 
+                    thread's state (for example, you could treat this as a pointer 
+                    to a x86_thread_state32_t structure).  On error, the value in 
+                    *threadStatePtr is undefined.
+                    
+                    IMPORTANT: The lifetime of this pointer is controlled by 
+                    a number of factors.  See the detailed discussion of this 
+                    topic, above.
+
+    @param threadStateSizePtr
+                    If NULL, this parameter is ignored.  Otherwise, 
+                    on entry, the value of *threadStateSizePtr is ignored.  
+                    On success, *threadStateSizePtr will be the size, in bytes, 
+                    of thread's state (for example, sizeof(x86_thread_state32_t)).  
+                    On error, the value in *threadStateSizePtr is undefined.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+                    If threadIndex is out of range, this will be EINVAL.
+*/
+extern int QCRGetThreadStateAtIndex(
+    QCrashReportRef         crRef,
+    size_t                  threadIndex,
+    cpu_type_t *            cpuTypePtr,
+    thread_state_flavor_t * threadStateFlavorPtr,
+    const void **           threadStatePtr,
+    size_t *                threadStateSizePtr
+);
+
+/*!
+    @function       QCRSetThreadStateAtIndex
+    
+    @abstract       Set the thread state for the specified thread.
+    
+    @discussion     Sets the thread state of the specified thread within the 
+                    the crash report.  This is useful if you have a better idea 
+                    of the thread's state than the default mechanism for getting 
+                    the thread state used by QCRGetThreadStateAtIndex (which gets 
+                    it by calling the Mach routine thread_get_state).  For example, 
+                    if you're running in a signal handler, you can extract the 
+                    interrupted thread's state from the signal handlers parameters.
+    
+                    If you set a thread's state by calling this routine, it 
+                    persists for the lifetime of the crash report object (unless 
+                    you override it by calling this routine again).
+    
+                    The memory buffer specified by threadState and threadStateSize 
+                    is copied by this routine; you do not need to maintain it 
+                    once the routine has returned.
+
+    @param crRef    A valid crash report object.
+
+    @param threadIndex
+                    A zero-based index into the array of threads.
+                    
+                    It is both acceptable and useful to specify the current 
+                    thread here (that is, pass in a value for which QCRGetThreadAtIndex 
+                    would return mach_thread_self).
+
+    @param threadStateFlavor
+                    Must be the thread state flavor of the new thread state 
+                    (for example, x86_THREAD_STATE32).  
+
+    @param threadState
+                    Must be a pointer to the new thread state (for example, a 
+                    pointer to a x86_thread_state32_t structure).  NULL is not 
+                    acceptable.
+
+    @param threadStateSize
+                    The size, in bytes, of the new thread state pointed to by 
+                    threadState (for example, sizeof(x86_thread_state32_t)).  Due 
+                    to the nature of Mach thread states, this must not be zero and 
+                    must be an even multiple of sizeof(integer_t).
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+                    If threadIndex is out of range, this will be EINVAL.
+*/
+extern int QCRSetThreadStateAtIndex(
+    QCrashReportRef         crRef,
+    size_t                  threadIndex,
+    thread_state_flavor_t   threadStateFlavor,
+    const void *            threadState,
+    size_t                  threadStateSize
+);
+
+/*!
+    @function       QCRGetBacktraceAtIndex
+    
+    @abstract       Returns a backtrace for the specified thread.
+    
+    @discussion     Returns a backtrace for the specified thread.  The first time 
+                    you call this function (except when specifying the current 
+                    thread, see below), it takes a snapshot of the thread's 
+                    backtrace.  For each subsequent call, you get back the 
+                    same backtrace.  This lifetime of this backtrace is 
+                    controlled by a number of factors; see the detailed 
+                    discussion of this topic, above.
+                    
+                    This routine has a special case so that you can easily get a 
+                    meaningful backtrace for the current thread.  If you specify 
+                    the current thread (that is, you pass in a value for which 
+                    QCRGetThreadAtIndex would return mach_thread_self) and you 
+                    have not explicitly set the thread state (by calling 
+                    QCRSetThreadStateByIndex), this routine will return a backtrace 
+                    for the current thread at the current time.  This backtrace 
+                    will persist until you call this function again (or until any 
+                    of the other events that can clear the backtrace occurs; see 
+                    the detailed discussion above).
+                    
+                    If you call this for anything except the current thread, 
+                    it implicitly snapshots the current thread state; this ensures 
+                    that the current thread state and the backtrace are in sync.
+
+                    IMPORTANT: The lifetime of the array returned by this routine 
+                    is controlled by a number of factors.  See the detailed 
+                    discussion of this topic, above.
+
+                    IMPORTANT: Do not free the array that this returns, or indeed 
+                    any of the items in the array.  These all belongs to the crash 
+                    report object and will be destroyed when the crash report 
+                    object is destroyed.
+
+    @param crRef    A valid crash report object.
+
+    @param threadIndex
+                    A zero-based index into the array of threads.
+
+    @param frameArrayPtr
+                    Must not be NULL.  On entry, the value of *frameArrayPtr is ignored.  
+                    On success, *frameArrayPtr will contain a pointer to an array 
+                    of *frameCountPtr QBTFrame objects.  On error, the value in 
+                    *frameArrayPtr is undefined.
+                    
+    @param frameCountPtr
+                    Must not be NULL.  On entry, the value of *frameCountPtr is 
+                    ignored.  On success, *frameCountPtr will be the number of 
+                    valid elements in the array pointed to be *frameArrayPtr.
+                    On error, the value in *frameCountPtr is undefined.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+                    If threadIndex is out of range, this will be EINVAL.
+*/
+extern int QCRGetBacktraceAtIndex(
+    QCrashReportRef     crRef, 
+    size_t              threadIndex, 
+    const QBTFrame **   frameArrayPtr, 
+    size_t *            frameCountPtr
+);
+
+enum {
+    kQCRNoThread = (size_t) -1
+};
+
+/*!
+    @function       QCRGetCrashedThreadIndex
+    
+    @abstract       Returns the crashed thread.
+    
+    @discussion     Returns the index of the crashed thread.  Unless you've 
+                    explicitly set this (using QCRSetCrashedThreadIndex), this 
+                    value is determined as follows:
+                    
+                    1. If you specified MACH_PORT_NULL when you created the crash 
+                       report object, the result will be kQCRNoThread.
+                       
+                    2. Otherwise, the result will be the index of the thread that 
+                       matches the thread that you specified.
+
+    @param crRef    A valid crash report object.
+
+    @result         The index of the crashed thread, or kQCRNoThread if none 
+                    was specified.
+*/
+extern size_t QCRGetCrashedThreadIndex(QCrashReportRef crRef);
+
+/*!
+    @function       QCRSetCrashedThreadIndex
+    
+    @abstract       Sets the crashed thread.
+    
+    @discussion     Sets the index of the crashed thread.  This value can be 
+                    specified initially by passing a value to the crashedThread 
+                    parameter of QCRCreateFromTask.  However, you can use this 
+                    function to override this value at any time.
+                    
+                    The information primarily affects the text rendering routines. 
+                    The crashed thread will be highlighted by QCRPrintBacktraces. 
+                    Also, QCRPrintThreadState prints the thread state of the 
+                    crashed thread.
+
+    @param crRef    A valid crash report object.
+
+    @param threadIndex
+                    A zero-based index into the array of threads.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+                    If threadIndex is out of range, this will be EINVAL.
+*/
+extern int QCRSetCrashedThreadIndex(QCrashReportRef crRef, size_t threadIndex);
+
+/*!
+    @functiongroup  Text Rendering
+*/
+#pragma mark ***** Text Rendering
+
+/*!
+    @function       QCRPrintBacktraces
+    
+    @abstract       Prints backtraces of each thread in the crash report.
+    
+    @discussion     This function is designed to ape the backtraces section of 
+                    a CrashReporter crash log as much as possible.
+
+    @param crRef    A valid crash report object.
+
+    @param f        The file to print to.  If you want to print to something 
+                    other than a file, create a custom (FILE *) object using 
+                    <x-man-page://3/funopen>.
+*/
+extern void QCRPrintBacktraces(QCrashReportRef crRef, FILE *f);
+
+/*!
+    @function       QCRPrintThreadState
+    
+    @abstract       Prints the thread state of the crashed thread.
+    
+    @discussion     This function is designed to ape the thread state section of 
+                    a CrashReporter crash log as much as possible.
+
+    @param crRef    A valid crash report object.
+
+    @param f        The file to print to.  If you want to print to something 
+                    other than a file, create a custom (FILE *) object using 
+                    <x-man-page://3/funopen>.
+*/
+extern void QCRPrintThreadState(QCrashReportRef crRef, FILE *f);
+
+/*!
+    @function       QCRPrintImages
+    
+    @abstract       Prints the dyld images of the crashed thread.
+    
+    @discussion     This function is designed to ape the "Binary Images Description" 
+                    section of a CrashReporter crash log as much as possible.
+
+    @param crRef    A valid crash report object.
+
+    @param f        The file to print to.  If you want to print to something 
+                    other than a file, create a custom (FILE *) object using 
+                    <x-man-page://3/funopen>.
+*/
+extern void QCRPrintImages(QCrashReportRef crRef, FILE *f);
+
+/*!
+    @functiongroup  Tool Helpers
+*/
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Tool Helpers
+
+/*!
+    @function       QCRExecuteCrashReportTool
+    
+    @abstract       Runs a crash report tool, giving it access to our task.
+    
+    @discussion     This function runs a crash report tool against the current 
+                    task in such a way that the crash report tool can get a 
+                    send right to the current process's task control port by 
+                    calling QCRGetParentTask.
+    
+                    IMPORTANT: This routine isn't thread safe.  To do its work 
+                    it must switch the current task's bootstrap port, fork/exec 
+                    the tool, and then switch the port back.  This can't be 
+                    done in a thread-safe way on current versions of Mac OS X.
+
+    @param toolArgs An array of arguments for the tool.  The array must be 
+                    terminated by a NULL entry.  The first entry must contain 
+                    the path to the tool.
+
+    @param pidPtr   If NULL, the tool runs synchronously.  That is, the routine 
+                    waits for the tool to exit before returning.  In that case, 
+                    toolStatusPtr must not be NULL.
+                    
+                    If non-NULL, the tools runs asynchronously and the routine 
+                    returns the process ID of the tool so that you can wait 
+                    for it to complete.  On entry, *pidPtr must be -1.  On 
+                    success, *pidPtr will be the process ID of the running tool 
+                    (that is, not -1).  On error, *pidPtr will be -1.
+
+    @param toolStatusPtr
+                    If the tool is run synchronously, the routine returns the 
+                    tool's exit status here.  This is the value returned from 
+                    its main function (typically EXIT_SUCCESS or EXIT_FAILURE).
+                    
+                    In the synchronous case, toolStatusPtr must not be NULL.  
+                    On entry, *toolStatusPtr is ignore.  On success, 
+                    *toolStatusPtr contains the tool's exit status.  On error, 
+                    the value of *toolStatusPtr is undefined.
+                    
+                    In the asynchronous case, toolStatusPtr must be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QCRExecuteCrashReportTool(const char *toolArgs[], pid_t *pidPtr, int *toolStatusPtr);
+
+/*!
+    @function       QCRGetParentTask
+    
+    @abstract       Returns the task control port for the parent task.
+    
+    @discussion     For a crash report tool executed by QCRExecuteCrashReportTool, 
+                    this routine returns the name of a send right for the parent 
+                    process's task control port.  This allows you to interrogate 
+                    the parent process using routines like QCRCreateFromTask.
+
+    @param taskPtr  Must not be NULL.  On entry, *taskPtr must be MACH_PORT_NULL. 
+                    On success, *taskPtr will be the name of a send right for the 
+                    parent process's task control port.  On error, *taskPtr will 
+                    be MACH_PORT_NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QCRGetParentTask(task_t *taskPtr);
+
+/////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/mac/QMachOImage.c b/lib/mac/QMachOImage.c
new file mode 100644
index 0000000..d3e673b
--- /dev/null
+++ b/lib/mac/QMachOImage.c
@@ -0,0 +1,2411 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/*
+ *  QMachOImage.c
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QMachOImage.c
+
+    Contains:   Mach-O image access.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QMachOImage.c,v $
+Revision 1.1  2007/03/02 12:20:14         
+First checked in.
+
+
+*/
+
+/////////////////////////////////////////////////////////////////
+
+// Our prototypes
+#include "config.h"
+#include "QMachOImage.h"
+
+// Basic system interfaces
+
+#include <TargetConditionals.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+// Mach-O interfaces
+
+#include <mach-o/arch.h>
+#include <mach-o/dyld.h>
+#include <mach-o/fat.h>
+#include <mach-o/loader.h>
+#include <mach-o/nlist.h>
+#include <mach-o/stab.h>
+
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+#include <mach/mach_vm.h>
+#endif
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Compile-Time Assert Information
+
+// At various places this code makes assumptions about the layout of various 
+// structures.  Where I noticed these assumptions, I've used a compile-time 
+// assert to check them.  Don't ask me how this works or I'll start to whimper.
+
+#define compile_time_assert__(name, line) name ## line
+#define compile_time_assert_(mustBeTrue, name, line)  \
+    struct compile_time_assert__(name, line) { unsigned int msg: (mustBeTrue); }
+#define compile_time_assert(mustBeTrue)         \
+    compile_time_assert_(mustBeTrue, CompileTimeAssert, __LINE__)
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Core Code
+
+// QMOSegment records information about a segment within an image.  This is helpful for 
+// a bunch of reasons.
+//
+// o We store an array of these structures, which makes it easy to access the segments 
+//   by simple array indexing.
+//
+// o The structure always store information about the segment as 64-bits, which means 
+//   that, as we access the information, we don't need to worry whether it's 32- or 64-bit. 
+//
+// o The structure always store information about the segment in native byte endian format.
+//
+// o It records whether we have the segment mapped, and the information required to 
+//   unmap it
+
+struct QMOSegment {
+	const struct load_command *	cmd;			// pointer to original load command
+	struct segment_command_64	seg;			// copy of segment information, promoted to 64-bits if necessary
+	const char *				segBase;		// base address of mapped segment (or NULL if not mapped)
+	void *						segMapRefCon;	// place for image type to store information about the mapping
+};
+typedef struct QMOSegment QMOSegment;
+
+// Likewise, we keep an array of information about all the sections in the image. 
+// This is primarily to support the various section access APIs.
+
+struct QMOSection {
+	const QMOSegment *          seg;			// parent segment
+	struct section_64           sect;			// copy of section information, promoted to 64-bits if necessary
+};
+typedef struct QMOSection QMOSection;
+
+typedef struct QMOImage QMOImage;
+	// forward declaration
+
+// Image Type Callbacks
+// --------------------
+// There are various types of QMOImage (local, from a remote task, from disk) that have 
+// lots in common.  However, in some cases it's necessary to do things diffently for each 
+// type of image to do different things.  In that case, the common code calls the image 
+// type specific code to do the work.
+
+typedef int  (*QMOMapRangeProc)(
+    QMOImage *      qmoImage, 
+    QTMAddr         offset, 
+    QTMAddr         length, 
+    const void **   basePtr, 
+    void **         mapRefConPtr
+);
+	// Map a chunk of an image into the local address space.  qmoImage is a reference 
+	// to the image itself.  offset and length define the chunk of the image.  The 
+	// callback can store a value in *mapRefConPtr to assist in its QMOUnmapRangeProc 
+	// implementation.
+	// 
+	// On entry, qmoImage must not be NULL
+	// On entry, offset is the offset, in bytes, of the chunk to map, relative to the 
+	// machHeaderOffset supplied when the image was created
+	// On entry, length is the number of bytes to map; must be greater than 0
+	// On entry, basePtr must not be NULL
+	// On entry, *basePtr must be NULL
+	// On entry, mapRefConPtr must not be NULL
+	// Returns an errno-style error code
+	// On success, *basePtr must be the (non-NULL) address of the mapped chunk
+
+typedef void  (*QMOUnmapRangeProc)(
+    QMOImage *      qmoImage, 
+    QTMAddr         offset, 
+    QTMAddr         length, 
+    const void *    base, 
+    void *          mapRefCon
+);
+	// Unmap a chunk of an image from the local address space.  qmoImage is a reference 
+	// to the image itself.  offset and length define the chunk of the image; these
+	// will be exactly equal to one of the chunks previously mapped (that is, we 
+	// won't map [100..200) and then unmap [100..150)).  base is the address of the 
+	// mapping, as returned by a previous QMOMapRangeProc call.  mapRefCon is the 
+	// per-mapping data, as returned by a previous QMOMapRangeProc call.
+	//
+	// On entry, qmoImage must not be NULL
+	// On entry, offset is the offset, in bytes, of the chunk to unmap, relative to the 
+	// machHeaderOffset supplied when the image was created
+	// On entry, length is the number of bytes to unmap; must be greater than 0
+	// On entry, base must not be NULL
+
+typedef int (*QMOCreateProc)(QMOImage *qmoImage, void *refCon);
+    // Called to tell the image type specific code to initialise itself.  
+    // The purpose of this callback is to commit the refCon to the 
+    // image.  Regardless of whether this routine succeeds or not, it 
+    // must leave the refCon in a state that can be correctly handled 
+    // by the destroy callback (if any).
+    //
+    // This callback is optional.  If it's not present, the core code 
+    // commits the refCon by simple assignment.
+    //
+	// On entry, qmoImage must not be NULL
+
+typedef void (*QMODestroyProc)(QMOImage *qmoImage);
+	// Destroy the type-specific data associated with the image.  If you have 
+    // a create callback, you are guaranteed that it will be called before 
+    // this callback (although it might have failed).
+    //
+    // This callback is optional.  If it's not present, the core code does 
+    // nothing to destroy the refCon.
+	//
+	// On entry, qmoImage must not be NULL
+
+// QMOImage represents a Mach-O image.  It's the backing for the exported QMOImageRef
+// type.
+
+struct QMOImage {
+    const char *                filePath;               // can be NULL
+    
+	// Mach-O header information
+	
+	QTMAddr						machHeaderOffset;		// offset within 'container'
+	const struct mach_header *	machHeader;				// address of Mach-O header mapped into local process; includes all load commands
+	void *						machHeaderRefCon;		// refCon for unmapping
+	size_t						machHeaderSize;			// size of Mach-O header, including load commands
+
+    // Cached information
+    
+    bool                        imageIDCached;          // true iff imageID is valid
+    const char *                imageID;                // NULL is a valid value
+
+	// General information
+	
+	QTMAddr						slide;					// amount to add to segment vmaddr to get actual addr in memory
+	bool						prepared;				// false if coming from file, true if coming from memory
+	bool						is64Bit;				// true if 64-bit Mach-O
+	bool						byteSwapped;			// true if byte swapped relative to current process
+	
+	uint32_t					segCount;				// number of segments
+	QMOSegment *				segments;				// per-segment information
+    uint32_t                    sectCount;              // number of sections
+    QMOSection *                sections;               // per-section information
+	
+	QMOMapRangeProc				mapRange;				// type-specific mapping routine
+	QMOUnmapRangeProc			unmapRange;				// type-specific unmapping routine
+	QMODestroyProc				destroy;				// type-specific destroy routine (optional)
+	
+	void *						refCon;					// storage for type-specific information
+};
+
+#if ! defined(NDEBUG)
+
+    static bool QMOImageIsValidLimited(QMOImageRef qmoImage)
+        // A limited form of QMOImageIsValid that's callback while qmoImage is still 
+        // being constructed.
+    {
+        return (qmoImage != NULL)
+            && (qmoImage->mapRange != NULL)
+            && (qmoImage->unmapRange != NULL);
+    }
+
+    static bool QMOImageIsValid(QMOImageRef qmoImage)
+        // Returns true if qmoImage is valid.
+    {
+        return (qmoImage != NULL)
+            && (qmoImage->machHeader != NULL)
+            && (qmoImage->machHeaderSize >= sizeof(struct mach_header))
+            && (qmoImage->segCount > 0)
+            && (qmoImage->segments != NULL)
+            && (qmoImage->segments[0].cmd != NULL)
+            && (qmoImage->sectCount > 0)
+            && (qmoImage->sections != NULL)
+            && (qmoImage->sections[0].seg != NULL)
+            && (qmoImage->mapRange != NULL)
+            && (qmoImage->unmapRange != NULL);
+    }
+
+#endif
+
+typedef bool (*LoadCommandCompareProc)(QMOImageRef qmoImage, const struct load_command *cmd, void *compareRefCon);
+	// Callback for FindLoadCommand.
+	//
+	// IMPORTANT:
+	// The contents of the load command pointed to be cmd may be byte swapped.
+	//
+	// On entry, qmoImage will not be NULL
+	// On entry, cmd will not be NULL
+	// Return true if this load command is the one you're looking for
+
+static const struct load_command * FindLoadCommand(
+	QMOImageRef				qmoImage, 
+	LoadCommandCompareProc	compareProc, 
+	void *					compareRefCon
+)
+	// Finds a load command within a Mach-O image.  Iterates through the load commands, 
+	// from first to last, calling compareProc on each one.  If compareProc returns 
+	// true, that load command becomes the function result.  If compareProc never returns 
+	// true, the function result is NULL.
+{
+	uint32_t	cmdIndex;
+	uint32_t	cmdCount;
+	const struct load_command *	firstCommand;
+	const struct load_command *	thisCommand;
+	const char *				commandLimit;
+	const struct load_command *	result;
+	
+	assert(qmoImage    != NULL);
+	assert(qmoImage->machHeader != NULL);
+	assert(compareProc != NULL);
+	
+	// Get the command count.
+	
+	cmdCount = QMOImageToLocalUInt32(qmoImage, qmoImage->machHeader->ncmds);
+	
+	// Get the start of the first command.
+	
+	if (qmoImage->is64Bit) {
+		firstCommand = (const struct load_command *) (((const char *) qmoImage->machHeader) + sizeof(struct mach_header_64));
+	} else {
+		firstCommand = (const struct load_command *) (((const char *) qmoImage->machHeader) + sizeof(struct mach_header));
+	}
+	
+	// Iterate through the commands until compareProc returns true.
+	
+	result = NULL;
+	cmdIndex = 0;
+	commandLimit = ((const char *) qmoImage->machHeader) + qmoImage->machHeaderSize;
+	thisCommand = firstCommand;
+	while ( (result == NULL) && (cmdIndex < cmdCount) ) {
+		uint32_t	thisCommandSize;
+		
+		thisCommandSize = QMOImageToLocalUInt32(qmoImage, thisCommand->cmdsize);
+		
+		assert( ((const char *) thisCommand) >= ((const char *) firstCommand) );
+		assert( ((const char *) thisCommand) <  commandLimit );
+		assert( (((const char *) thisCommand) + thisCommandSize) <= commandLimit );
+		
+		if ( compareProc(qmoImage, thisCommand, compareRefCon) ) {
+			result = thisCommand;
+		} else {
+			thisCommand = (const struct load_command *) (((const char *) thisCommand) + QMOImageToLocalUInt32(qmoImage, thisCommand->cmdsize));
+			cmdIndex += 1;
+		}
+	}
+	
+	return result;
+}
+
+static int MapMachHeader(QMOImageRef qmoImage)
+	// Map an image's Mach-O header (including its load commands) into memory, 
+	// recording that mapping in the fields in qmoImage.
+{
+	int	err;
+
+	assert(qmoImage != NULL);
+	assert(qmoImage->machHeader == NULL);			// that is, we haven't already mapped it
+	
+	compile_time_assert( offsetof(struct mach_header, magic)      == offsetof(struct mach_header_64, magic) );
+	compile_time_assert( offsetof(struct mach_header, sizeofcmds) == offsetof(struct mach_header_64, sizeofcmds) );
+	
+	// Temporarily map the mach_header itself, so we can figure out what sort of 
+    // header we're dealing with and get the size of the load commands.
+	
+	{
+		size_t						headerSize;
+		const struct mach_header *	headerPtr;
+		void *						headerRefCon;
+		
+		headerPtr  = NULL;
+
+		err = qmoImage->mapRange(
+			qmoImage, 
+			qmoImage->machHeaderOffset, 
+			sizeof(struct mach_header), 
+			(const void **) &headerPtr, 
+			&headerRefCon
+		);
+		if (err == 0) {
+
+			// Test the magic to check for Mach-O validity, size and byte order.
+			
+			switch (headerPtr->magic) {
+				case MH_MAGIC_64:
+				case MH_CIGAM_64:
+				case MH_MAGIC:
+				case MH_CIGAM:
+					qmoImage->is64Bit     = ( (headerPtr->magic == MH_MAGIC_64) || (headerPtr->magic == MH_CIGAM_64) );
+					qmoImage->byteSwapped = ( (headerPtr->magic == MH_CIGAM)    || (headerPtr->magic == MH_CIGAM_64) );
+					if (qmoImage->is64Bit) {
+						headerSize = sizeof(struct mach_header_64);
+					} else {
+						headerSize = sizeof(struct mach_header);
+					}
+					
+					// Now that we have set up qmoImage->byteSwapped, we can call QMOImageToLocalUInt32.
+					
+					qmoImage->machHeaderSize = headerSize + QMOImageToLocalUInt32(qmoImage, headerPtr->sizeofcmds);
+					break;
+				default:
+					err = EINVAL;
+					break;
+			}
+			
+			// Undo our temporary mapping.
+			
+			qmoImage->unmapRange(qmoImage, qmoImage->machHeaderOffset, sizeof(struct mach_header), headerPtr, headerRefCon);
+		}
+	}
+	
+	// Map the entire header permanently. 
+	
+	if (err == 0) {
+		err = qmoImage->mapRange(
+			qmoImage, 
+			qmoImage->machHeaderOffset, 
+			qmoImage->machHeaderSize, 
+			(const void **) &qmoImage->machHeader, 
+			&qmoImage->machHeaderRefCon
+		);
+	}
+	
+	assert( (err == 0) == (qmoImage->machHeader != NULL) );
+	
+	return err;
+}
+
+static bool CountSegmentsAndSections(QMOImageRef qmoImage, const struct load_command *cmd, void *compareRefCon)
+	// A LoadCommandCompareProc callback used to count the number of segments 
+	// and sections in the image.  For each segment load command, increment the 
+    // image's segment count by one and then extract the nsect field of the segment 
+    // and increment the image's section count by that.  Always return false so 
+    // we iterate all load commands.
+	//
+	// See LoadCommandCompareProc for a description of the other parameters.
+{
+	uint32_t	cmdID;
+	
+	assert(qmoImage != NULL);
+	assert(cmd      != NULL);
+	assert(compareRefCon == NULL);
+	
+	cmdID = QMOImageToLocalUInt32(qmoImage, cmd->cmd);
+	if ( (cmdID == LC_SEGMENT) || (cmdID == LC_SEGMENT_64) ) {
+		qmoImage->segCount += 1;
+		if (cmdID == LC_SEGMENT_64) {
+			qmoImage->sectCount += QMOImageToLocalUInt32(qmoImage, ((const struct segment_command_64 *) cmd)->nsects);
+		} else {
+			qmoImage->sectCount += QMOImageToLocalUInt32(qmoImage, ((const struct segment_command *)    cmd)->nsects);
+		}
+	}
+	return false;
+}
+
+static bool InitSegment(QMOImageRef qmoImage, const struct load_command *cmd, void *compareRefCon)
+	// A LoadCommandCompareProc callback used to initialise the segments array.
+	// For each segment load command, set up the corresponding element of 
+	// qmoImage->segments and increment the counter pointed to be compareRefCon.
+	// Always return false so we iterate all load commands.
+	//
+	// See LoadCommandCompareProc for a description of the other parameters.
+{
+	uint32_t *					segIndexPtr;
+	uint32_t					cmdID;
+	struct segment_command_64 *	outputSegCmd;
+
+	assert(qmoImage != NULL);
+	assert(cmd      != NULL);
+	assert(compareRefCon != NULL);
+	assert(qmoImage->segments != NULL);					// that is, we've already allocated the segment array
+
+	cmdID = QMOImageToLocalUInt32(qmoImage, cmd->cmd);
+	if ( (cmdID == LC_SEGMENT) || (cmdID == LC_SEGMENT_64) ) {
+		segIndexPtr = (uint32_t *) compareRefCon;
+		
+		// Allocate a segment array element.
+		
+		assert(*segIndexPtr < qmoImage->segCount);		// segCount was set up by CountSegmentsAndSections, so we should never run out of elements
+		qmoImage->segments[*segIndexPtr].cmd = cmd;
+		outputSegCmd = &qmoImage->segments[*segIndexPtr].seg;
+		*segIndexPtr += 1;
+		
+		// Convert the incoming segment command into the canonical 
+		// segment_command_64 that we use internally.  For all segments, this 
+		// involves possible byte swapping.  For 32-bit segments, we also have 
+		// to promote 32-bit values to 64 bits.
+		
+		if (cmdID == LC_SEGMENT_64) {
+			const struct segment_command_64 *	segCmd64;
+
+			segCmd64 = (const struct segment_command_64 *) cmd;
+
+			outputSegCmd->cmd      = QMOImageToLocalUInt32(qmoImage, segCmd64->cmd);
+			outputSegCmd->cmdsize  = QMOImageToLocalUInt32(qmoImage, segCmd64->cmdsize);
+			memcpy(outputSegCmd->segname, segCmd64->segname, sizeof(outputSegCmd->segname));
+			outputSegCmd->vmaddr   = QMOImageToLocalUInt64(qmoImage, segCmd64->vmaddr);
+			outputSegCmd->vmsize   = QMOImageToLocalUInt64(qmoImage, segCmd64->vmsize);
+			outputSegCmd->fileoff  = QMOImageToLocalUInt64(qmoImage, segCmd64->fileoff);
+			outputSegCmd->filesize = QMOImageToLocalUInt64(qmoImage, segCmd64->filesize);
+			outputSegCmd->maxprot  = QMOImageToLocalUInt32(qmoImage, segCmd64->maxprot);
+			outputSegCmd->initprot = QMOImageToLocalUInt32(qmoImage, segCmd64->initprot);
+			outputSegCmd->nsects   = QMOImageToLocalUInt32(qmoImage, segCmd64->nsects);
+			outputSegCmd->flags    = QMOImageToLocalUInt32(qmoImage, segCmd64->flags);
+		} else {
+			const struct segment_command *		segCmd;
+
+			segCmd = (const struct segment_command *) cmd;
+
+			outputSegCmd->cmd      = QMOImageToLocalUInt32(qmoImage, segCmd->cmd);
+			outputSegCmd->cmdsize  = QMOImageToLocalUInt32(qmoImage, segCmd->cmdsize);
+			memcpy(outputSegCmd->segname, segCmd->segname, sizeof(outputSegCmd->segname));
+			outputSegCmd->vmaddr   = QMOImageToLocalUInt32(qmoImage, segCmd->vmaddr);
+			outputSegCmd->vmsize   = QMOImageToLocalUInt32(qmoImage, segCmd->vmsize);
+			outputSegCmd->fileoff  = QMOImageToLocalUInt32(qmoImage, segCmd->fileoff);
+			outputSegCmd->filesize = QMOImageToLocalUInt32(qmoImage, segCmd->filesize);
+			outputSegCmd->maxprot  = QMOImageToLocalUInt32(qmoImage, segCmd->maxprot);
+			outputSegCmd->initprot = QMOImageToLocalUInt32(qmoImage, segCmd->initprot);
+			outputSegCmd->nsects   = QMOImageToLocalUInt32(qmoImage, segCmd->nsects);
+			outputSegCmd->flags    = QMOImageToLocalUInt32(qmoImage, segCmd->flags);
+		}
+	}
+	return false;
+}
+
+static void InitSegmentSections(QMOImageRef qmoImage, uint32_t segIndex, uint32_t *sectIndexPtr)
+    // Called to initialise the sections array.  segIndex indicates that segment 
+    // whose sections we should parse.  On entry, *sectIndexPtr is an index 
+    // into the sections array of the place where we should start placing 
+    // section information.  On return, we've update *sectIndexPtr for every 
+    // section that we filled in.
+{
+    uint32_t                    sectCount;
+    uint32_t                    sectIndex;
+    const struct section_64 *   sectArray64;
+    const struct section *      sectArray;
+    bool                        is64;
+    
+    // The section information is stored in an array with fixed size elements. 
+    // However, both the base of the array and size of the elements varies for 
+    // 32- and 64-bit segments. 
+
+    is64 = (qmoImage->segments[segIndex].seg.cmd == LC_SEGMENT_64);
+    if (is64) {
+        sectArray64 = (const struct section_64 *) (((const char *) qmoImage->segments[segIndex].cmd) + sizeof(struct segment_command_64));
+        sectArray   = NULL;
+    } else {
+        sectArray64 = NULL;
+        sectArray   = (const struct section    *) (((const char *) qmoImage->segments[segIndex].cmd) + sizeof(struct segment_command   ));
+    }
+    
+    // Iterate the sections in the segment.
+    
+    sectCount = qmoImage->segments[segIndex].seg.nsects;
+    for (sectIndex = 0; sectIndex < sectCount; sectIndex++) {
+        struct section_64 *     outputSect;
+        
+        // Set up the segment pointer for this section.
+        
+        qmoImage->sections[*sectIndexPtr + sectIndex].seg = &qmoImage->segments[segIndex];
+        
+		// Convert the incoming section structure into the canonical 
+		// section_64 structure that we use internally.  For all sections, this 
+		// involves possible byte swapping.  For sections in 32-bit segments, we 
+        // also have to promote 32-bit values to 64 bits.
+        
+        assert( (*sectIndexPtr + sectIndex) < qmoImage->sectCount );
+        outputSect = &qmoImage->sections[*sectIndexPtr + sectIndex].sect;
+        if (is64) {
+			const struct section_64 *	sect64;
+
+			sect64 = &sectArray64[sectIndex];
+
+            memcpy(outputSect->sectname, sect64->sectname, sizeof(outputSect->sectname));
+            memcpy(outputSect->segname,  sect64->segname,  sizeof(outputSect->segname));
+            outputSect->addr      = QMOImageToLocalUInt64(qmoImage, sect64->addr);
+            outputSect->size      = QMOImageToLocalUInt64(qmoImage, sect64->size);
+            outputSect->offset    = QMOImageToLocalUInt32(qmoImage, sect64->offset);
+            outputSect->align     = QMOImageToLocalUInt32(qmoImage, sect64->align);
+            outputSect->reloff    = QMOImageToLocalUInt32(qmoImage, sect64->reloff);
+            outputSect->nreloc    = QMOImageToLocalUInt32(qmoImage, sect64->nreloc);
+            outputSect->flags     = QMOImageToLocalUInt32(qmoImage, sect64->flags);
+            outputSect->reserved1 = QMOImageToLocalUInt32(qmoImage, sect64->reserved1);
+            outputSect->reserved2 = QMOImageToLocalUInt32(qmoImage, sect64->reserved2);
+            outputSect->reserved3 = QMOImageToLocalUInt32(qmoImage, sect64->reserved3);
+        } else {
+			const struct section *      sect;
+
+			sect = &sectArray[sectIndex];
+
+            memcpy(outputSect->sectname, sect->sectname, sizeof(outputSect->sectname));
+            memcpy(outputSect->segname,  sect->segname,  sizeof(outputSect->segname));
+            outputSect->addr      = QMOImageToLocalUInt32(qmoImage, sect->addr);
+            outputSect->size      = QMOImageToLocalUInt32(qmoImage, sect->size);
+            outputSect->offset    = QMOImageToLocalUInt32(qmoImage, sect->offset);
+            outputSect->align     = QMOImageToLocalUInt32(qmoImage, sect->align);
+            outputSect->reloff    = QMOImageToLocalUInt32(qmoImage, sect->reloff);
+            outputSect->nreloc    = QMOImageToLocalUInt32(qmoImage, sect->nreloc);
+            outputSect->flags     = QMOImageToLocalUInt32(qmoImage, sect->flags);
+            outputSect->reserved1 = QMOImageToLocalUInt32(qmoImage, sect->reserved1);
+            outputSect->reserved2 = QMOImageToLocalUInt32(qmoImage, sect->reserved2);
+            outputSect->reserved3 = 0;
+        }
+    }
+    
+    // Increment *sectIndexPtr for the number of sections that we added.
+    
+    *sectIndexPtr += sectCount;
+}
+
+static int GetSegmentIndexByName(QMOImageRef qmoImage, const char *segName, uint32_t *segIndexPtr)
+    // Search the segments array for the first segment with the specified 
+    // name.  This is the guts of QMOImageGetSegmentByName.
+    //
+    // *** Should merge this into QMOImageGetSegmentByName.
+{
+	int			err;
+	bool		found;
+	uint32_t	segIndex;
+	
+	assert(QMOImageIsValid(qmoImage));
+	assert(segName != NULL);
+	assert(segIndexPtr != NULL);
+
+	found = false;
+	segIndex = 0;
+	while ( ! found && segIndex < qmoImage->segCount ) {
+		found = ( strcmp(qmoImage->segments[segIndex].seg.segname, segName) == 0 );
+		if ( ! found ) {
+			segIndex += 1;
+		}
+	}
+
+	if (found) {
+		*segIndexPtr = segIndex;
+		err = 0;
+	} else {
+		err = ESRCH;
+	}
+	return err;
+}
+
+static int CalculateSlide(QMOImageRef qmoImage)
+	// Calculate the slide associated with an image.  In some cases, we can get 
+	// the slide (for example, for a local image, you can get the slide using 
+	// _dyld_get_image_vmaddr_slide), but in other cases you always have to 
+	// calculate it (for example, when using new-style remote image access). 
+	// So, rather than messing around with conditional code, I always just 
+	// calculate it myself.
+{
+	int							err;
+	
+	assert(QMOImageIsValid(qmoImage));
+	
+	if ( ! qmoImage->prepared ) {
+		// For file-based images, we assume a slide of 0.
+		
+		assert(qmoImage->slide == 0);
+		err = 0;
+	} else {
+		uint32_t					textSegIndex;
+		struct segment_command_64	textSeg;
+
+		// For in-memory images, we have to do the maths.  We find the __TEXT 
+		// segment, find its virtual address (the address it wanted to load), 
+		// and subtract that away from the start of the image (the address 
+		// that the __TEXT segment ended up loading).  This is slightly bogus 
+		// because it's possible to construct a Mach-O image where the 
+		// header isn't embedded in the __TEXT segment.  But, in reality, this 
+		// doesn't happen (and, if it did, other tools, like vmutils) would also 
+		// fail).
+		
+		err = GetSegmentIndexByName(qmoImage, "__TEXT", &textSegIndex);
+		if (err == 0) {
+			err = QMOImageGetSegmentByIndex(qmoImage, textSegIndex, &textSeg);
+		}
+		if (err == 0) {
+			qmoImage->slide = qmoImage->machHeaderOffset - textSeg.vmaddr;
+		}
+	}
+	return err;
+}
+
+static int QMOImageCreate(
+	QTMAddr				machHeaderOffset, 
+    const char *        filePath,
+	bool				prepared, 
+	QMOMapRangeProc		mapRange, 
+	QMOUnmapRangeProc	unmapRange, 
+	QMOCreateProc		create, 
+	QMODestroyProc		destroy, 
+	void *				refCon, 
+	QMOImageRef *		qmoImagePtr
+)
+	// Common code use by all types of images to create an image object. 
+	//
+	// mapRange, unmapRange, create and destroy are callbacks used to implement 
+	// type-specific behaviour.  See the description of their corresponding 
+	// function pointer definition for details.
+	//
+	// refCon is data storage for the type-specific code.  For example, for 
+	// a file-based image, it is used to hold the file descriptor of the mapped 
+	// file.
+	// 
+    // filePath is the Mach-O backing store file for the image.  It may be NULL.
+    //
+	// prepared indicates whether the image is in memory, having been prepared 
+	// by dyld, or is coming from a Mach-O file.  In the first case, the image 
+	// operates using virtual addresses.  In the second case, the image operates 
+	// using file offsets.
+	//
+	// machHeaderOffset is the offset, within the container defined by the 
+	// type-specific code, of the Mach-O header.  Specifically:
+	//
+	// o for a file-based image (unprepared), this is the offset within the file
+	// o for a memory-based image (prepared), this is the virtual address of the 
+	//   mach_header
+	//
+	// When calling the mapRange and unmapRange callbacks, the core code assumes that:
+	// 
+	// o the Mach-O header is available at machHeaderOffset
+	// o for an unprepared image, it adds machHeaderOffset to file-relative values to
+	//   get the actual file offset of a segment
+	// o for prepared images, it ignores machHeaderOffset and accesses the segment 
+	//   via its virtual address
+{
+	int			err;
+	QMOImageRef	qmoImage;
+    uint32_t	segIndex;
+    uint32_t    sectIndex;
+	
+    // machHeaderOffset could be zero
+    // filePath may be NULL
+	assert(mapRange     != NULL);
+	assert(unmapRange   != NULL);
+    // create may be NULL
+    // destroy may be NULL
+	assert( qmoImagePtr != NULL);
+	assert(*qmoImagePtr == NULL);
+	
+	// Allocate the memory for the image object, and fill out out the basic fields. 
+	// This involves mapping in the Mach-O header to figure out the width (32- or 
+	// 64-bit) and byte order of the image.
+	
+	err = 0;
+	qmoImage = calloc(1, sizeof(*qmoImage));
+	if (qmoImage == NULL) {
+		err = ENOMEM;
+	}
+	if (err == 0) {
+		qmoImage->machHeaderOffset = machHeaderOffset;
+		qmoImage->prepared   = prepared;
+		qmoImage->mapRange   = mapRange;
+		qmoImage->unmapRange = unmapRange;
+		qmoImage->destroy    = destroy;
+
+        // It is vital that we call the create callback (if any) before any 
+        // other failure (other than the calloc).  If there was a failure 
+        // point before this, we could end up calling the destroy callback 
+        // before calling the create callback.  Thatd woul be bad for image 
+        // types where a NULL refcon isn't appropriate as a nil value.  
+        //
+        // An example of this is the file image type.  The in this case, the 
+        // nil value for the refcon is -1.  The create callback is expected 
+        // to set up the refCon correctly; if it fails, it must set it to 
+        // an appropriate nil value.
+
+        if (create == NULL) {
+            qmoImage->refCon = refCon;
+        } else {
+            err = create(qmoImage, refCon);
+        }
+    }
+    if ( (err == 0) && (filePath != NULL) ) {
+        qmoImage->filePath = strdup(filePath);
+        if (qmoImage->filePath == NULL) {
+            err = ENOMEM;
+        }
+    }
+    if (err == 0) {
+		err = MapMachHeader(qmoImage);
+	}
+	
+	// Count the segments, allocate the array used to hold information about them, 
+	// and then fill in that array.  In the process, also fill out the sections 
+    // array.
+	
+	if (err == 0) {
+		(void) FindLoadCommand(qmoImage, CountSegmentsAndSections, NULL);
+		
+		qmoImage->segments = calloc(qmoImage->segCount,  sizeof(*qmoImage->segments));
+		qmoImage->sections = calloc(qmoImage->sectCount, sizeof(*qmoImage->sections));
+		if ( (qmoImage->segments == NULL) && (qmoImage->sections == NULL) ) {
+			err = ENOMEM;
+		}
+		
+	}
+	if (err == 0) {
+		segIndex = 0;
+
+		(void) FindLoadCommand(qmoImage, InitSegment, &segIndex);
+
+        assert(segIndex == qmoImage->segCount);
+	}
+    if (err == 0) {
+        sectIndex = 0;
+
+        for (segIndex = 0; segIndex < qmoImage->segCount; segIndex++) {
+            InitSegmentSections(qmoImage, segIndex, &sectIndex);
+        }
+
+        assert(sectIndex == qmoImage->sectCount);
+    }
+	
+	// Once we have the segment information, we can calculate the slide.
+	
+	if (err == 0) {
+		err = CalculateSlide(qmoImage);
+	}
+
+	// Clean up on error.
+	
+	if (err != 0) {
+		QMOImageDestroy(qmoImage);
+		qmoImage = NULL;
+	}
+	*qmoImagePtr = qmoImage;
+	
+	assert( (err == 0) == QMOImageIsValid(*qmoImagePtr) );
+	
+	return err;
+}
+
+extern void QMOImageDestroy(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	uint32_t	segIndex;
+	
+	if (qmoImage != NULL) {
+
+		// Destroy the segments array.
+
+		if (qmoImage->segments != NULL) {
+			// Unmap any mapped segments.
+				
+			for (segIndex = 0; segIndex < qmoImage->segCount; segIndex++) {
+				if (qmoImage->segments[segIndex].segBase != NULL) {
+					QTMAddr offset;
+					QTMAddr size;
+					
+					if (qmoImage->prepared) {
+						offset = qmoImage->segments[segIndex].seg.vmaddr + qmoImage->slide;
+						size   = qmoImage->segments[segIndex].seg.vmsize;
+					} else {
+						offset = qmoImage->segments[segIndex].seg.fileoff + qmoImage->machHeaderOffset;
+						size   = qmoImage->segments[segIndex].seg.filesize;
+					}
+					qmoImage->unmapRange(qmoImage, offset, size, qmoImage->segments[segIndex].segBase, qmoImage->segments[segIndex].segMapRefCon);
+					
+					qmoImage->segments[segIndex].segBase = 0;
+					qmoImage->segments[segIndex].segMapRefCon = NULL;
+				}
+			}
+			free(qmoImage->segments);
+		}
+
+		// Unmap the Mach-O header.
+		
+		if (qmoImage->machHeader != NULL) {
+			qmoImage->unmapRange(qmoImage, qmoImage->machHeaderOffset, qmoImage->machHeaderSize, qmoImage->machHeader, qmoImage->machHeaderRefCon);
+		}
+		
+		// Now that we're done unmapping, call the type-specific destroy callback 
+		// so that it can clean up any information that it needed to have 
+		// (typically this is hung off the refCon).
+		
+        if (qmoImage->destroy != NULL) {
+            qmoImage->destroy(qmoImage);
+        }
+
+		// Free the memory for the object itself.
+		
+        free( (void *) qmoImage->filePath );
+		free(qmoImage);
+	}
+}
+
+static int QMOImageMapSegmentByIndex(QMOImageRef qmoImage, uint32_t segIndex, const char **segBasePtr)
+	// Map a segment from a Mach-O image into the local process, returning the address 
+	// of the mapped data.
+{
+	int			err;
+	
+	assert(QMOImageIsValid(qmoImage));
+	assert(segIndex < qmoImage->segCount);
+	assert(segBasePtr != NULL);
+
+	// Have we mapped it yet?  If not, we have to do some heavy lifting.
+
+	err = 0;
+	if (qmoImage->segments[segIndex].segBase == NULL) {
+		QTMAddr offset;
+		QTMAddr size;
+		
+		// No, we need to map it now.
+		
+		// Work out what to map.  If the image has been prepared (that is, 
+		// we're dealing with an image that's been mapped into memory 
+		// by dyld), we operate on virtual addresses.  OTOH, if the image 
+		// is coming from a file, we operate in file-relative addresses.
+		
+		if (qmoImage->prepared) {
+			offset = qmoImage->segments[segIndex].seg.vmaddr + qmoImage->slide;
+			size   = qmoImage->segments[segIndex].seg.vmsize;
+		} else {
+			offset = qmoImage->segments[segIndex].seg.fileoff + qmoImage->machHeaderOffset;
+			size   = qmoImage->segments[segIndex].seg.filesize;
+		}
+		err = qmoImage->mapRange(
+			qmoImage, 
+			offset, 
+			size, 
+			(const void **) &qmoImage->segments[segIndex].segBase, 
+			&qmoImage->segments[segIndex].segMapRefCon
+		);
+	}
+	
+	// If all went well, return the address to the caller.
+	
+	if (err == 0) {
+		*segBasePtr = qmoImage->segments[segIndex].segBase;
+	}
+	return err;
+}
+
+#pragma mark ***** Accessors
+
+extern QTMAddr	QMOImageGetSlide(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+	
+	return qmoImage->slide;
+}
+
+extern bool QMOImageIs64Bit(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+
+	return qmoImage->is64Bit;
+}
+
+extern bool QMOImageIsByteSwapped(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+
+	return qmoImage->byteSwapped;
+}
+
+extern QTMAddr QMOImageGetMachHeaderOffset(QMOImageRef qmoImage)
+{
+	assert(QMOImageIsValid(qmoImage));
+
+	return qmoImage->machHeaderOffset;
+}
+
+extern const struct mach_header * QMOImageGetMachHeader(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+
+	return qmoImage->machHeader;
+}
+
+extern const char * QMOImageGetFilePath(QMOImageRef qmoImage)
+{
+	assert(QMOImageIsValid(qmoImage));
+
+    return qmoImage->filePath;
+}
+
+extern uint32_t QMOImageGetFileType(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+
+	compile_time_assert( offsetof(struct mach_header, filetype) == offsetof(struct mach_header_64, filetype) );
+
+	return QMOImageToLocalUInt32(qmoImage, qmoImage->machHeader->filetype);
+}
+
+extern uint32_t QMOImageGetCPUType(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+
+	compile_time_assert( offsetof(struct mach_header, cputype) == offsetof(struct mach_header_64, cputype) );
+
+	return QMOImageToLocalUInt32(qmoImage, qmoImage->machHeader->cputype);
+}
+
+extern uint32_t QMOImageGetCPUSubType(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+
+	assert( offsetof(struct mach_header, cpusubtype) == offsetof(struct mach_header_64, cpusubtype) );
+	assert( offsetof(struct mach_header, cpusubtype) == offsetof(struct mach_header_64, cpusubtype) );
+
+	return QMOImageToLocalUInt32(qmoImage, qmoImage->machHeader->cpusubtype);
+}
+
+static bool CommandIDCompareProc(QMOImageRef qmoImage, const struct load_command *cmd, void *compareRefCon)
+	// A LoadCommandCompareProc callback used to implement FindLoadCommandByID.
+	// compareRefCon is a pointer to the Mach-O command ID that we're looking for.
+	//
+	// See LoadCommandCompareProc for a description of the other parameters.
+{
+	assert(QMOImageIsValid(qmoImage));
+	assert(cmd != NULL);
+
+	return ( QMOImageToLocalUInt32(qmoImage, cmd->cmd) == *(uint32_t *) compareRefCon );
+}
+
+extern const struct load_command * QMOImageFindLoadCommandByID(QMOImageRef qmoImage, uint32_t cmdID)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+	
+	return FindLoadCommand(qmoImage, CommandIDCompareProc, (void *) &cmdID);
+}
+
+extern uint32_t	QMOImageGetSegmentCount(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+
+	return qmoImage->segCount;
+}
+
+extern int		QMOImageGetSegmentByName(
+    QMOImageRef                 qmoImage, 
+    const char *                segName, 
+    uint32_t *                  segIndexPtr, 
+    struct segment_command_64 * segPtr
+)
+	// See comment in header.
+{
+	int			err;
+	uint32_t	segIndex;
+
+	assert(QMOImageIsValid(qmoImage));
+	assert(segName != NULL);
+	assert( (segIndexPtr != NULL) || (segPtr  != NULL) );
+	
+	err = GetSegmentIndexByName(qmoImage, segName, &segIndex);
+	if (err == 0) {
+        if (segIndexPtr != NULL) {
+            *segIndexPtr = segIndex;
+        }
+        if (segPtr != NULL) {
+            *segPtr = qmoImage->segments[segIndex].seg;
+        }
+	}
+	
+	return err;
+}
+
+extern int	QMOImageGetSegmentByIndex(QMOImageRef qmoImage, uint32_t segIndex, struct segment_command_64 *segPtr)
+	// See comment in header.
+{
+	int	err;
+
+	assert(QMOImageIsValid(qmoImage));
+	assert(segPtr != NULL);
+	
+	if (segIndex < qmoImage->segCount) {
+		*segPtr = qmoImage->segments[segIndex].seg;
+		err = 0;
+	} else {
+		err = EINVAL;
+	}
+	return err;
+}
+
+extern uint32_t	QMOImageGetSectionCount(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+
+    return qmoImage->sectCount;
+}
+
+extern int		QMOImageGetSectionByName(
+    QMOImageRef                 qmoImage, 
+    const char *                segName,
+    const char *                sectName,
+    uint32_t *                  sectIndexPtr,
+    struct section_64 *         sectPtr
+)
+	// See comment in header.
+{
+    int         err;
+    bool        found;
+    uint32_t    sectIndex;
+    
+	assert(QMOImageIsValid(qmoImage));
+    assert( (segName != NULL) || (sectName != NULL) );
+    assert( (sectIndexPtr != NULL) || (sectPtr != NULL) );
+    
+    // Start by looking for the section.
+    
+    sectIndex = 0;
+    found = false;
+    while ( ! found && (sectIndex < qmoImage->sectCount) ) {
+        found = ( (segName  == NULL) || (strcmp(segName,  qmoImage->sections[sectIndex].sect.segname) == 0) )
+             && ( (sectName == NULL) || (strcmp(sectName, qmoImage->sections[sectIndex].sect.sectname) == 0) );
+        if ( ! found ) {
+            sectIndex += 1;
+        }
+    }
+    
+    // If we find it, copy out the details to our client.
+    
+    if (found) {
+        if (sectIndexPtr != NULL) {
+            *sectIndexPtr = sectIndex;
+        }
+        if (sectPtr != NULL) {
+            *sectPtr = qmoImage->sections[sectIndex].sect;
+        }
+        err = 0;
+    } else {
+        err = ESRCH;
+    }
+    
+    return err;
+}
+
+extern int		QMOImageGetSectionByIndex(
+    QMOImageRef                 qmoImage, 
+    uint32_t                    sectIndex, 
+    struct section_64 *         sectPtr
+)
+	// See comment in header.
+{
+    int     err;
+    
+	assert(QMOImageIsValid(qmoImage));
+
+	if (sectIndex < qmoImage->sectCount) {
+		*sectPtr = qmoImage->sections[sectIndex].sect;
+		err = 0;
+	} else {
+		err = EINVAL;
+	}
+	return err;
+}
+
+#pragma mark ***** Utilities
+
+extern uint8_t QMOImageToLocalUInt8(QMOImageRef qmoImage, uint8_t value)
+	// See comment in header.
+{
+	assert(QMOImageIsValidLimited(qmoImage));
+
+	return value;
+}
+
+extern uint16_t QMOImageToLocalUInt16(QMOImageRef qmoImage, uint16_t value)
+	// See comment in header.
+{
+	assert(QMOImageIsValidLimited(qmoImage));
+
+	if ( qmoImage->byteSwapped ) {
+		value = OSSwapInt16(value);
+	}
+	return value;
+}
+
+extern uint32_t QMOImageToLocalUInt32(QMOImageRef qmoImage, uint32_t value)
+	// See comment in header.
+{
+	assert(QMOImageIsValidLimited(qmoImage));
+
+	if ( qmoImage->byteSwapped ) {
+		value = OSSwapInt32(value);
+	}
+	return value;
+}
+
+extern uint64_t QMOImageToLocalUInt64(QMOImageRef qmoImage, uint64_t value)
+	// See comment in header.
+{
+	assert(QMOImageIsValidLimited(qmoImage));
+
+	if ( qmoImage->byteSwapped ) {
+		value = OSSwapInt64(value);
+	}
+	return value;
+}
+
+#pragma mark ***** QMOFileImage
+
+static int  QMOFileImageMapRange(
+    QMOImage *      qmoImage, 
+    QTMAddr         offset, 
+    QTMAddr         length, 
+    const void **   basePtr, 
+    void **         mapRefConPtr
+)
+    // The map range callback for file-based images.  This does its magic 
+    // via mmap.
+    //
+    // See the comments for QMOMapRangeProc for a discussion of the parameters.
+{
+	int		err;
+	int		fd;
+	void *	base;
+
+	assert(qmoImage != NULL);
+	assert(length > 0);
+	assert( basePtr != NULL);
+	assert(*basePtr == NULL);
+	assert(mapRefConPtr != NULL);
+
+	fd = (int) (intptr_t) qmoImage->refCon;
+	
+	err = 0;
+	base = mmap(NULL, length, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, offset);
+	if (base == MAP_FAILED) {
+		base = NULL;
+		err = errno;
+	}
+	*basePtr = base;
+
+	assert( (err == 0) == (*basePtr != NULL) );
+	
+	return err;
+}
+
+static void QMOFileImageUnmapRange(
+    QMOImage *      qmoImage, 
+    QTMAddr         offset, 
+    QTMAddr         length, 
+    const void *    base, 
+    void *          mapRefCon
+)
+    // The unmap range callback for file-based images.
+    //
+    // See the comments for QMOUnmapRangeProc for a discussion of the parameters.
+{
+    #pragma unused(offset, mapRefCon)
+	int		junk;
+	
+	assert(qmoImage != NULL);
+	assert(length > 0);
+	assert(base != NULL);
+
+	junk = munmap( (void *) base, length);
+	assert(junk == 0);
+}
+
+static int QMOFileImageCreate(QMOImage *qmoImage, void *refCon)
+    // The create callback for file-based images.  A file descriptor 
+    // of the file to work on is in refCon.  We dup this into the refCon 
+    // so that, when the destroy callback is called, it can close safely 
+    // close the file in the refCon.
+    //
+    // See the comments for QMOCreateProc for a discussion of the parameters.
+{
+    int     err;
+    int     fd;
+    
+	assert(qmoImage != NULL);
+
+	fd = (int) (intptr_t) refCon;
+    
+    fd = dup(fd);
+    if (fd < 0) {
+        err = errno;
+    } else {
+        err = 0;
+    }
+    qmoImage->refCon = (void *) (intptr_t) fd;
+
+    return err;
+}
+
+static void QMOFileImageDestroy(QMOImage *qmoImage)
+    // The destroy callback for file-based images.
+    //
+    // See the comments for QMODestroyProc for a discussion of the parameters.
+{
+	int	fd;
+	int	junk;
+	
+	assert(qmoImage != NULL);
+	
+	fd = (int) (intptr_t) qmoImage->refCon;
+	
+    if (fd != -1) {
+        junk = close(fd);
+        assert(junk == 0);
+    }
+}
+
+static const NXArchInfo *NXGetLocalArchInfoFixed(void)
+    // A version of NXGetLocalArchInfo that works around the gotchas described 
+    // below.
+{
+    static const NXArchInfo * sCachedArch = NULL;
+    
+    // NXGetLocalArchInfo (and related routines like NXGetArchInfoFromCpuType) may 
+    // or may not return a pointer that you have to free <rdar://problem/5000965>.  
+    // To limit the potential for leaks, I only ever call through to the underlying 
+    // routine once.  [This can still leak (if two threads initialise it at the 
+    // same time, or if we need to apply the x86-64 workaround), but the leak 
+    // is bounded.]
+    
+    if (sCachedArch == NULL) {
+        sCachedArch = NXGetLocalArchInfo();
+
+        // For some reason, when running 64-bit on 64-bit architectures, 
+        // NXGetLocalArchInfo returns the 32-bit architecture <rdar://problem/4996965>.  
+        // If that happens, we change it to what we expect.
+
+        if (sCachedArch != NULL) {
+            #if TARGET_CPU_X86_64
+                if (sCachedArch->cputype == CPU_TYPE_X86) {
+                    sCachedArch = NXGetArchInfoFromCpuType(CPU_TYPE_X86_64, CPU_SUBTYPE_X86_64_ALL);
+                }
+            #elif TARGET_CPU_PPC64
+                if (sCachedArch->cputype == CPU_TYPE_POWERPC) {
+                    sCachedArch = NXGetArchInfoFromCpuType(CPU_TYPE_POWERPC64, CPU_SUBTYPE_POWERPC_ALL);
+                }
+            #endif
+        }
+    }
+
+    return sCachedArch;
+}
+
+extern cpu_type_t QMOGetLocalCPUType(void)
+    // See comment in header.
+{
+    return NXGetLocalArchInfoFixed()->cputype;
+}
+
+static int FindBestFatArchitecture(
+    int                         fd, 
+    const struct fat_header *   fatHeader, 
+    cpu_type_t                  cputype, 
+    cpu_subtype_t               cpusubtype, 
+    off_t *                     machHeaderOffsetPtr
+)
+    // For fat Mach-O file that starts with fatHeader, looking for the 
+    // architecture that best matches cputype and cpusubtype.  Return 
+    // the file offset of that image in *machHeaderOffsetPtr.
+    //
+    // Keep in mind that a fat header is always big endian.
+{
+	int						err;
+	uint32_t				archCount;
+	struct fat_arch *		arches;
+	const struct fat_arch *	bestArch = NULL;
+
+	assert( (cputype != CPU_TYPE_ANY) || (cpusubtype == 0) );
+	
+	archCount = OSSwapBigToHostInt32(fatHeader->nfat_arch);
+	
+	// Allocate a fat_arch array and fill it in by reading the file.
+
+	err = 0;
+	arches = malloc(archCount * sizeof(*arches));
+	if (arches == NULL) {
+		err = ENOMEM;
+	}
+	if (err == 0) {
+		ssize_t		bytesRead;
+		
+		bytesRead = read(fd, arches, archCount * sizeof(*arches));
+		if (bytesRead < 0) {
+			err = errno;
+		} else if (bytesRead != (archCount * sizeof(*arches))) {
+			err = EPIPE;
+		}
+	}
+
+	// Find the fat_arch that best matches the user's requirements.
+	
+	if (err == 0) {
+		// This would do nothing on a big endian system, but it probably would take a 
+		// whole bunch of code to do nothing.  So we conditionalise it away.
+
+		#if TARGET_RT_LITTLE_ENDIAN
+			{
+				uint32_t	archIndex;
+				
+				for (archIndex = 0; archIndex < archCount; archIndex++) {
+					arches[archIndex].cputype    = OSSwapBigToHostInt32(arches[archIndex].cputype);
+					arches[archIndex].cpusubtype = OSSwapBigToHostInt32(arches[archIndex].cpusubtype);
+					arches[archIndex].offset     = OSSwapBigToHostInt32(arches[archIndex].offset);
+					arches[archIndex].size       = OSSwapBigToHostInt32(arches[archIndex].size);
+					arches[archIndex].align      = OSSwapBigToHostInt32(arches[archIndex].align);
+				}
+			}
+		#endif
+
+		// If the user requested any CPU type, first try to give them the current 
+		// architecture, and if that fails just give them the first.
+		
+		if (cputype == CPU_TYPE_ANY) {
+			const NXArchInfo *	localArch;
+
+            assert(cpusubtype == 0);
+
+			localArch = NXGetLocalArchInfoFixed();
+
+			bestArch = NULL;
+			if (localArch != NULL) {
+				bestArch = NXFindBestFatArch(localArch->cputype, localArch->cpusubtype, arches, archCount);
+                if (bestArch == NULL) {
+                    bestArch = NXFindBestFatArch(localArch->cputype, 0, arches, archCount);
+                }
+			}
+			if (bestArch == NULL) {
+				bestArch = NXFindBestFatArch(arches[0].cputype, cpusubtype, arches, archCount);
+			}
+		} else {
+			bestArch = NXFindBestFatArch(cputype, cpusubtype, arches, archCount);
+		}
+		if (bestArch == NULL) {
+			err = ESRCH;
+		}
+	}
+	
+	// Return that architecture's offset.
+	
+	if (err == 0) {
+		*machHeaderOffsetPtr = bestArch->offset;
+	}
+	
+	free(arches);
+	
+	return err;
+}
+
+extern int QMOImageCreateFromFile(const char *filePath, cpu_type_t cputype, cpu_subtype_t cpusubtype, QMOImageRef *qmoImagePtr)
+	// See comment in header.
+{
+	int					err;
+	int					junk;
+	int					fd;
+	ssize_t				bytesRead;
+	struct fat_header	fatHeader;
+	off_t				machHeaderOffset;
+	struct mach_header  machHeader;
+	struct fat_arch		arch;
+	const struct fat_arch *	bestArch;
+
+    assert(filePath != NULL);
+	assert( (cputype != CPU_TYPE_ANY) || (cpusubtype == 0) );
+    assert( qmoImagePtr != NULL);
+    assert(*qmoImagePtr == NULL);
+	
+    machHeaderOffset = 0;       // quieten a warning
+    
+	// Open the file.
+	
+	err = 0;
+	fd = open(filePath, O_RDONLY);
+	if (fd < 0) {
+		err = errno;
+	}
+	
+	// Read a potential fat header.  Keep in mind that this is always big endian.
+	
+	if (err == 0) {
+		bytesRead = read(fd, &fatHeader, sizeof(fatHeader));
+		if (bytesRead < 0) {
+			err = errno;
+		} else if (bytesRead != sizeof(fatHeader)) {
+			err = EPIPE;
+		}
+	}
+	
+	// If it's there, deal with it.  If not, we treat this as a thin file, that 
+    // is, the Mach-O image starts at the front of the file.
+	
+	if (err == 0) {
+		if ( OSSwapBigToHostInt32(fatHeader.magic) == FAT_MAGIC) {
+			err = FindBestFatArchitecture(fd, &fatHeader, cputype, cpusubtype, &machHeaderOffset);
+		} else {
+			machHeaderOffset = 0;
+		}
+	}
+	
+	// Read the Mach-O header from the requested offset, and do a quick check to make sure 
+	// that its magic is correct and that the architecture is compatible with the one the 
+	// user requested.  We do this by constructing a dummy fat_arch and passing it as 
+    // a single element array to NXFindBestFatArch.  If NXFindBestFatArch returns NULL, 
+    // this single architecture isn't compatible with the architecture that the user 
+    // requested.
+	
+	if (err == 0) {
+		bytesRead = pread(fd, &machHeader, sizeof(machHeader), machHeaderOffset);
+		if (bytesRead < 0) {
+			err = errno;
+		} else if (bytesRead != sizeof(machHeader)) {
+			err = EPIPE;
+		}
+	}
+	if (err == 0) {
+		arch.cputype    = machHeader.cputype;
+		arch.cpusubtype = machHeader.cpusubtype;
+		arch.offset     = 0;						// NXFindBestFatArch ignores these fields
+		arch.size       = 0;
+		arch.align      = 0;
+
+		if ( (machHeader.magic == MH_MAGIC) || (machHeader.magic == MH_MAGIC_64) ) {
+			// do nothing
+		} else if ( (machHeader.magic == MH_CIGAM) || (machHeader.magic == MH_CIGAM_64) ) {
+			arch.cputype    = OSSwapInt32(arch.cputype);
+			arch.cpusubtype = OSSwapInt32(arch.cpusubtype);
+		} else {
+			err = EINVAL;
+		}
+	}
+	if (err == 0) {
+		if (cputype == CPU_TYPE_ANY) {
+			cputype = arch.cputype;
+		}
+		bestArch = NXFindBestFatArch(cputype, cpusubtype, &arch, 1);
+		if (bestArch == NULL) {
+			err = ESRCH;
+		}
+	}
+
+	// Create an QMOImage for this file.
+	
+	if (err == 0) {
+		err = QMOImageCreate(machHeaderOffset, filePath, false, QMOFileImageMapRange, QMOFileImageUnmapRange, QMOFileImageCreate, QMOFileImageDestroy, (void *) (intptr_t) fd, qmoImagePtr);
+	}
+	
+	// Clean up.  We can safe close fd because QMOFileImageCreate has dup'd it.
+	
+	if ( (err != 0) && (fd != -1) ) {
+		junk = close(fd);
+		assert(junk == 0);
+	}
+	assert( (err == 0) == QMOImageIsValid(*qmoImagePtr) );
+
+	return err;
+}
+
+#pragma mark ***** QMOTaskImage
+
+static int  QMOTaskImageMapRange(
+    QMOImage *      qmoImage, 
+    QTMAddr         offset, 
+    QTMAddr         length, 
+    const void **   basePtr, 
+    void **         mapRefConPtr
+)
+    // The map range callback for remote images.  This is much easier now that 
+    // the QTaskMemory takes care of all the Mach rubbish.
+    //
+    // See the comments for QMOMapRangeProc for a discussion of the parameters.
+{
+	int					err;
+	task_t				task;
+	const void *        base;
+
+	assert(qmoImage != NULL);
+	assert(length > 0);
+	assert( basePtr != NULL);
+	assert(*basePtr == NULL);
+	assert(mapRefConPtr != NULL);
+	
+	task = (task_t) (uintptr_t) qmoImage->refCon;
+
+    base = NULL;
+    
+    // First try to remap the memory into our address space.
+    
+    err = QTMRemap(task, offset, length, &base);
+
+	if (err == EFAULT) {
+
+        // If the mapping fails, just read the memory.  This happens if the address 
+        // is within the system shared region.
+        
+        assert(base == NULL);
+        err = QTMReadAllocated(task, offset, length, &base);
+	}
+	if (err == 0) {
+		*basePtr   = base;
+		*mapRefConPtr = NULL;
+	}
+	
+	assert( (err == 0) == (*basePtr != NULL) );
+	
+	return err;
+}
+
+static void QMOTaskImageUnmapRange(
+    QMOImage *      qmoImage, 
+    QTMAddr         offset, 
+    QTMAddr         length, 
+    const void *    base, 
+    void *          mapRefCon
+)
+    // The unmap range callback for remote images.
+    //
+    // See the comments for QMOUnmapRangeProc for a discussion of the parameters.
+{
+    #pragma unused(offset, mapRefCon)
+	assert(qmoImage != NULL);
+	assert(length > 0);
+	assert(base != NULL);
+	
+    QTMFree(base, length);
+}
+
+bool kQMachOImageTestSelfShortCircuit = true;
+	// By changing this variable to false you can disable the short circuit that 
+    // we apply when targetting the local task.
+    //
+    // This is exported for the benefit of the unit test.
+
+extern int QMOImageCreateFromTask(
+    task_t          task, 
+    QTMAddr         machHeader, 
+    const char *    filePath,
+    QMOImageRef *   qmoImagePtr
+)
+	// See comment in header.
+{
+    int     err;
+
+    assert(task != MACH_PORT_NULL);
+    // machHeader could potentially be at zero
+    // filePath may be NULL
+    assert( qmoImagePtr != NULL);
+    assert(*qmoImagePtr == NULL);
+    
+    if ( (task == mach_task_self()) && kQMachOImageTestSelfShortCircuit ) {
+        err = QMOImageCreateFromLocalImage( (const struct mach_header *) (uintptr_t) machHeader, filePath, qmoImagePtr);
+    } else {
+        err = QMOImageCreate(machHeader, filePath, true, QMOTaskImageMapRange, QMOTaskImageUnmapRange, NULL, NULL, (void *) (uintptr_t) task, qmoImagePtr);
+    }
+
+	assert( (err == 0) == QMOImageIsValid(*qmoImagePtr) );
+
+    return err;
+}
+
+static int FindTaskDyldWithNonNativeRetry(task_t task, cpu_type_t cputype, QTMAddr *dyldAddrPtr);
+    // forward declaration
+
+extern int QMOImageCreateFromTaskDyld(
+    task_t          task, 
+    cpu_type_t      cputype, 
+    QMOImageRef *   qmoImagePtr
+)
+	// See comment in header.
+{
+    int         err;
+    QMOImageRef qmoImage;
+    QTMAddr     dyldAddr;
+    
+    assert(task != MACH_PORT_NULL);
+    assert( qmoImagePtr != NULL);
+    assert(*qmoImagePtr == NULL);
+
+    qmoImage = NULL;
+    
+    // Find dyld within the task and then create a remote image based on that. 
+    // Seems easy huh?  No way.
+    
+    err = FindTaskDyldWithNonNativeRetry(task, cputype, &dyldAddr);
+    if (err == 0) {
+        err = QMOImageCreateFromTask(task, dyldAddr, NULL, &qmoImage);
+    }
+    
+    // In the case of dyld, we assume that the dynamic linker ID is the file path. 
+    // It's hard to get the dynamic linker ID before we create the image, so we create 
+    // the image with a NULL filePath and then fill it in afterwards.  If this 
+    // fails, I leave the file path set to NULL; I don't consider this failure 
+    // bad enough to warrant failing the entire routine.
+    
+    if (err == 0) {
+        const struct dylinker_command * dyldCommand;
+        const char *                    filePath;
+        
+        assert(qmoImage->filePath == NULL);
+
+        filePath = NULL;
+
+        dyldCommand = (const struct dylinker_command *) QMOImageFindLoadCommandByID(
+            qmoImage,
+            LC_ID_DYLINKER
+        );
+        if (dyldCommand != NULL) {
+            filePath = ((const char *) dyldCommand) + QMOImageToLocalUInt32(qmoImage, dyldCommand->name.offset);
+        }
+        if (filePath != NULL) {
+            qmoImage->filePath = strdup(filePath);
+        }
+        
+        assert(qmoImage->filePath != NULL);
+        
+        // Copy result out to client.
+        
+        *qmoImagePtr = qmoImage;
+    }
+    
+	assert( (err == 0) == QMOImageIsValid(*qmoImagePtr) );
+    
+    return err;
+}
+
+#pragma mark ***** QMOLocalImage
+
+static int  QMOLocalImageMapRange(
+    QMOImage *      qmoImage, 
+    QTMAddr         offset, 
+    QTMAddr         length, 
+    const void **   basePtr, 
+    void **         mapRefConPtr
+)
+    // The map range callback for local images.  This one is easy (-:
+    //
+    // See the comments for QMOMapRangeProc for a discussion of the parameters.
+{
+	int		err;
+	
+	assert(qmoImage != NULL);
+	assert(length > 0);
+	assert( basePtr != NULL);
+	assert(*basePtr == NULL);
+	assert(mapRefConPtr != NULL);
+
+	*basePtr   = (const void *) (uintptr_t) offset;
+	*mapRefConPtr = NULL;
+	err = 0;
+	
+	assert( (err == 0) == (*basePtr != NULL) );
+	
+	return err;
+}
+
+static void QMOLocalImageUnmapRange(
+    QMOImage *      qmoImage, 
+    QTMAddr         offset, 
+    QTMAddr         length, 
+    const void *    base, 
+    void *          mapRefCon
+)
+    // The unmap range callback for local images.
+    //
+    // See the comments for QMOUnmapRangeProc for a discussion of the parameters.
+{
+    #pragma unused(offset, mapRefCon)
+	assert(qmoImage != NULL);
+	assert(length > 0);
+	assert(base != NULL);
+
+	// do nothing
+}
+
+extern int QMOImageCreateFromLocalImage(
+    const struct mach_header *  machHeader, 
+    const char *                filePath,
+    QMOImageRef *               qmoImagePtr
+)
+	// See comment in header.
+{
+    // machHeader could potentially be at zero
+    // filePath may be NULL
+    assert( qmoImagePtr != NULL);
+    assert(*qmoImagePtr == NULL);
+
+	return QMOImageCreate( (QTMAddr) (uintptr_t) machHeader, filePath, true, QMOLocalImageMapRange, QMOLocalImageUnmapRange, NULL, NULL, NULL, qmoImagePtr);
+}
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Finding dyld
+
+// This stuff is fairly well commented in the routines comments.  Start with 
+// the comments for FindTaskDyldWithNonNativeRetry.
+
+// In the debug version, we support an environment variable that logs progress 
+// for our dyld search.  This is nice because is can be hard to debug otherwise 
+// (for example, when you're running PowerPC program using Rosetta).
+
+#if defined(NDEBUG)
+
+    static inline bool LogDyldSearch(void)
+    {
+        return false;
+    }
+
+#else
+
+    static bool LogDyldSearch(void)
+    {
+        static bool sInited = false;
+        static bool sLogDyldSearch = false;
+        
+        if ( ! sInited ) {
+            sLogDyldSearch = (getenv("QMACHOIMAGE_LOG_DYLD_SEARCH") != NULL);
+        
+            sInited = true;
+        }
+        
+        return sLogDyldSearch;
+    }
+
+#endif
+
+static const char * GetLocalDyldPath(void)
+	// Get the path for the dyld associated with the current task. 
+	// We do this by iterating through the list of images in the 
+	// current task looking for the main executable's image (whose 
+	// file type is MH_EXECUTE).  In that we look for the 
+	// LC_LOAD_DYLINKER load command, which contains the path to the 
+	// dynamic linker requested by this image.
+{
+	int							err;
+	uint32_t					imageCount;
+	uint32_t					imageIndex;
+	const struct mach_header *	thisImage;
+    static const char *         sCachedResult = NULL;
+    
+    if (sCachedResult == NULL) {
+        // Iterate the images in the current process looking for the main 
+        // executable image (MH_EXECUTE).
+        
+        imageCount = _dyld_image_count();
+        for (imageIndex = 0; imageIndex < imageCount; imageIndex++) {
+
+            compile_time_assert( offsetof(struct mach_header_64, filetype) == offsetof(struct mach_header, filetype) );
+
+            thisImage = _dyld_get_image_header(imageIndex);
+            if (thisImage->filetype == MH_EXECUTE) {										// no need to byte swap because this is local only
+                QMOImageRef						qmoImage;
+                const struct dylinker_command *	loadDyldCmd;
+
+                if ( LogDyldSearch() ) {
+                    fprintf(stderr, "GetLocalDyldPath: Found executable at %p.\n", thisImage);
+                }
+
+                // Within the main executable image, look for the LC_LOAD_DYLINKER 
+                // load command.  Extract the dyld's path from that.
+                
+                qmoImage = NULL;
+                
+                err = QMOImageCreateFromLocalImage(
+                    thisImage, 
+                    NULL,
+                    &qmoImage
+                );
+                if (err == 0) {
+                    loadDyldCmd = (const struct dylinker_command *) QMOImageFindLoadCommandByID(
+                        qmoImage, 
+                        LC_LOAD_DYLINKER
+                    );
+                    if (loadDyldCmd != NULL) {
+                        sCachedResult = (((const char *) loadDyldCmd) + loadDyldCmd->name.offset);	// no need to byte swap because this is local only
+                        if ( LogDyldSearch() ) {
+                            fprintf(stderr, "GetLocalDyldPath: Local dyld is '%s'.\n", sCachedResult);
+                        }
+                    }
+                }
+                QMOImageDestroy(qmoImage);
+                
+                break;
+            }
+        }
+    }
+	
+	return sCachedResult;
+}
+
+static QTMAddr GetLocalDyldAddr(void)
+	// Get the address that the current task /intended/ to load 
+	// dyld.  That is, get the default load address of the dyld 
+	// requested by the current task.  So, if the dyld was slid, 
+	// this returns that address that it wanted to load at.
+	//
+	// If anything goes wrong, return 0.  The caller can either 
+	// ignore the error, or specifically check for 0, which is a 
+	// very improbable load address for dyld.
+{
+	int							err;
+	const char *				dyldPath;
+	QMOImageRef					qmoImage;
+	struct segment_command_64	textSeg;
+	static QTMAddr              sCachedResult = 0;
+    
+    if (sCachedResult == 0) {
+        qmoImage = NULL;
+
+        // Get the path to the current task's dyld, using a hard-wired 
+        // default if any goes wrong.
+        
+        dyldPath = GetLocalDyldPath();
+        if (dyldPath == NULL) {
+            dyldPath = "/usr/lib/dyld";
+        }	
+        
+        // Create a file-based QMOImage from that, and then look up the __TEXT 
+        // segment's vmaddr.  Note that, if dyld is fat, QMOImageCreateFromFile 
+        // will use the architecture that matches the local architecture (if 
+        // possible).
+        
+        err = QMOImageCreateFromFile(dyldPath, CPU_TYPE_ANY, 0, &qmoImage);
+        if (err == 0) {
+            err = QMOImageGetSegmentByName(qmoImage, "__TEXT", NULL, &textSeg);
+        }
+        if (err == 0) {
+            sCachedResult = textSeg.vmaddr;
+            if ( LogDyldSearch() ) {
+                fprintf(stderr, "GetLocalDyldAddr: Local dyld is at %p; based on fat file member with CPU type/subtype of %#x/%#x.\n", (void *) (uintptr_t) sCachedResult, (int) QMOImageGetCPUType(qmoImage), (int) QMOImageGetCPUSubType(qmoImage));
+            }
+        }
+        
+        // Clean up.
+        
+        QMOImageDestroy(qmoImage);
+    }
+
+	return sCachedResult;
+}
+
+static bool IsDyldAtAddress(task_t task, cpu_type_t cputype, QTMAddr addr, vm_prot_t prot)
+	// Returns true if the address within the specified task looks 
+	// like it points to dyld.  We first check that prot is what we'd 
+    // expect for dydl.  Then we read a mach_header from the 
+	// address and check its magic, filetype, and cputype fields.
+{
+	int						err;
+	bool					result;
+	struct mach_header		machHeader;
+
+	assert(task != MACH_PORT_NULL);
+		
+	result = false;
+
+    compile_time_assert( offsetof(struct mach_header_64, magic)    == offsetof(struct mach_header, magic) );
+	compile_time_assert( offsetof(struct mach_header_64, filetype) == offsetof(struct mach_header, filetype) );
+	
+    if ( (prot & (VM_PROT_READ | VM_PROT_EXECUTE)) == (VM_PROT_READ | VM_PROT_EXECUTE) ) {
+        err = QTMRead(task, addr, sizeof(machHeader), &machHeader);
+        if (err == 0) {
+            if ( (machHeader.magic == MH_MAGIC) || (machHeader.magic == MH_MAGIC_64) ) {
+                result = true;
+            } else if ( (machHeader.magic == MH_CIGAM) || (machHeader.magic == MH_CIGAM_64) ) {
+                machHeader.filetype = OSSwapInt32(machHeader.filetype);
+                machHeader.cputype  = OSSwapInt32(machHeader.cputype);
+                result = true;
+            }
+            if (result) {
+                result = ( machHeader.filetype == MH_DYLINKER );
+                if (result) {
+                    result = ((cputype == CPU_TYPE_ANY) || (cputype == machHeader.cputype));
+                    if (result) {
+                        if ( LogDyldSearch() ) {
+                            fprintf(stderr, "IsDyldAtAddress: Found dyld at %#llx; CPU type is %#x.\n", addr, (int) machHeader.cputype);
+                        }
+                    } else {
+                        if ( LogDyldSearch() ) {
+                            fprintf(stderr, "IsDyldAtAddress: Mach header at %#llx is dyld but wrong CPU type (wanted %#x, got %#x).\n", addr, (int) cputype, (int) machHeader.cputype);
+                        }
+                    }
+                } else {
+                    if ( LogDyldSearch() ) {
+                        fprintf(stderr, "IsDyldAtAddress: Mach header at %#llx but not dyld.\n", addr);
+                    }
+                }
+            } else {
+                if ( LogDyldSearch() ) {
+                    fprintf(stderr, "IsDyldAtAddress: No Mach header at %#llx.\n", addr);
+                }
+            }
+        } else {
+            if ( LogDyldSearch() ) {
+                fprintf(stderr, "IsDyldAtAddress: Error %#x reading Mach header at %#llx.\n", err, addr);
+            }
+        }
+    } else {
+        if ( LogDyldSearch() ) {
+            fprintf(stderr, "IsDyldAtAddress: Skipped region at %#llx because of protection (%d).\n", addr, (int) prot);
+        }
+    }
+	
+	return result;
+}
+
+static int FindTaskDyld(task_t task, cpu_type_t cputype, QTMAddr *dyldAddrPtr)
+	// Finds the address of dyld within a given task.  Unfortunately, there is 
+	// just no good way to do this because a) the task might have a different 
+	// architecture, which might load dyld at a different address, and 
+	// b) dyld can slide.  So, we go hunting for dyld the hard way.  We start 
+	// by assuming that dyld loaded in the same place as it loaded in our 
+	// task, which is a very strong heuristic (assuming that the target is the 
+    // same architecture as us, which is also quite likely).  If that doesn't pan 
+    // out, we iterate through every memory region in the task look for one that 
+	// starts with something that looks like dyld.
+	//
+	// Yetch!
+	//
+	// This is pretty much the same thing that's done by GDB and vmutils.
+{
+	int                     err;
+        kern_return_t           kr;
+	QTMAddr                 localDyldAddr;
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+	mach_vm_address_t	thisRegion;
+#else
+	vm_address_t		thisRegion;
+#endif	
+	assert(task != MACH_PORT_NULL);
+	assert(dyldAddrPtr != NULL);
+	
+    // Find our dyld's address and see if the task has dyld at the same address.
+    
+	localDyldAddr = GetLocalDyldAddr();
+	if ( IsDyldAtAddress(task, cputype, localDyldAddr, VM_PROT_READ | VM_PROT_EXECUTE) ) {
+        if ( LogDyldSearch() ) {
+            fprintf(stderr, "FindTaskDyld: Got dyld at local address (%#llx).\n", localDyldAddr);
+        }
+		*dyldAddrPtr = localDyldAddr;
+		err = 0;
+	} else {
+		bool						found;
+		mach_port_t					junkObjName;
+		
+        if ( LogDyldSearch() ) {
+            fprintf(stderr, "FindTaskDyld: Searching for dyld the hard way.\n");
+        }
+
+        // Well, that didn't work.  Let's look the hard way.
+        
+		found = false;
+		thisRegion = 0;
+		do {
+            // Because we don't actually look at the pointer size fields of the 
+            // resulting structure, we should just be able to use VM_REGION_BASIC_INFO. 
+            // However, it seems that VM_REGION_BASIC_INFO is not compatible with 
+            // the 64-bit call variant (that is, mach_vm_region as opposed to 
+            // vm_region).  I really haven't investigated this properly because the 
+            // workaround is pretty easy: use VM_REGION_BASIC_INFO_64 for 
+            // everything.  There may be compatibility consequences for this 
+            // (for example, I suspect that VM_REGION_BASIC_INFO_COUNT_64 is not 
+            // supported on 10.3).  I'll deal with these when I come to them.
+
+            // For BOINC changes, See Mach Compatibility comments in QTaskMemory.c
+
+                mach_msg_type_number_t                  infoCount;
+
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+
+                mach_vm_size_t				thisRegionSize;
+                vm_region_basic_info_data_64_t          info;
+
+                infoCount = VM_REGION_BASIC_INFO_COUNT_64;
+                kr = mach_vm_region(
+                    task,
+                    &thisRegion,
+                    &thisRegionSize,
+                    VM_REGION_BASIC_INFO_64,
+                    (vm_region_info_t) &info,
+                    &infoCount,
+                    &junkObjName
+                );
+
+#else
+
+                vm_size_t                               thisRegionSize;
+                vm_region_basic_info_data_t             info;
+
+                infoCount = VM_REGION_BASIC_INFO_COUNT;
+                kr = vm_region(
+                    task,
+                    &thisRegion,
+                    &thisRegionSize,
+                    VM_REGION_BASIC_INFO,
+                    (vm_region_info_t) &info,
+                    &infoCount,
+                    &junkObjName
+                );
+#endif
+            err = QTMErrnoFromMachError(kr);
+
+			if (err == 0) {
+				assert(infoCount == infoCount);
+
+				// We've found dyld if the memory region is read/no-write/execute 
+				// and it starts with a mach_header that looks like dyld.
+
+                found = IsDyldAtAddress(task, cputype, thisRegion, info.protection);
+				if ( found ) {
+					*dyldAddrPtr = thisRegion;
+				} else {
+					thisRegion += thisRegionSize;
+				}
+			}				
+		} while ( (err == 0) && ! found );
+	}
+	
+	return err;
+}
+
+static int FindTaskDyldWithNonNativeRetry(task_t task, cpu_type_t cputype, QTMAddr *dyldAddrPtr)
+    // A wrapper around FindTaskDyld that handles a nasty edge case.  Namely, 
+    // if the client asks for any dyld and the target task is being run using 
+    // Rosetta, try to find the PowerPC dyld first and then, if that fails, 
+    // look for any dyld.  This gives an explicit priority to the PowerPC dyld 
+    // for non-native tasks.  Without this, you run into problems where a client 
+    // doesn't know the CPU type of the target task (because they haven't connected 
+    // to it yet), tries to connect up, connects up the wrong dyld, and it all 
+    // goes south.
+{
+    int         err;
+    
+	assert(task != MACH_PORT_NULL);
+	assert(dyldAddrPtr != NULL);
+
+    if ( (cputype == CPU_TYPE_ANY) && ! QTMTaskIsNative(task) ) {
+        err = FindTaskDyld(task, CPU_TYPE_POWERPC, dyldAddrPtr);
+        if (err != 0) {
+            if ( LogDyldSearch() ) {
+                fprintf(stderr, "FindTaskDyldWithNonNativeRetry: Failed to find PowerPC dyld; retrying for any dyld.\n");
+            }
+            err = FindTaskDyld(task, cputype, dyldAddrPtr);
+        }
+    } else {
+        err = FindTaskDyld(task, cputype, dyldAddrPtr);
+    }
+    
+    return err;
+}
+
+#pragma mark ***** High-Level APIs
+
+extern const char * QMOImageGetLibraryID(QMOImageRef qmoImage)
+	// See comment in header.
+{
+	assert(QMOImageIsValid(qmoImage));
+
+    if ( ! qmoImage->imageIDCached ) {
+        const struct dylib_command * imageIDCommand;
+        
+        imageIDCommand = (const struct dylib_command *) QMOImageFindLoadCommandByID(
+            qmoImage,
+            LC_ID_DYLIB
+        );
+        if (imageIDCommand != NULL) {
+            qmoImage->imageID = ((const char *) imageIDCommand) + QMOImageToLocalUInt32(qmoImage, imageIDCommand->dylib.name.offset);
+        }
+        
+        qmoImage->imageIDCached = true;
+    }
+    
+    return qmoImage->imageID;
+}
+
+extern int QMOImageIterateSymbols(QMOImageRef qmoImage, QMOSymbolIteratorProc callback, void *iteratorRefCon)
+	// See comment in header.
+{
+	int								err;
+	const struct symtab_command *	symTabCmd;
+	uint32_t						linkEditSegIndex;
+	const char *					linkEditSeg;
+	uint32_t						symCount;
+	uint32_t						symIndex;
+	QTMAddr							linkEditFileOffset;
+	const char *					stringBase;
+	const struct nlist *			symBase;
+	const struct nlist_64 *			symBase64;
+	uint32_t						nameStringOffset;
+	const char *					name;
+	bool							stop;
+
+	assert(QMOImageIsValid(qmoImage));
+    assert(callback != NULL);
+	
+    // Do some preparation.  Get the LC_SYMTAB command and map the __LINKEDIT segment.
+    
+	err = 0;
+	symTabCmd = (const struct symtab_command *) QMOImageFindLoadCommandByID(qmoImage, LC_SYMTAB);
+	if (symTabCmd == NULL) {
+		err = EINVAL;
+	}
+	if (err == 0) {
+		err = GetSegmentIndexByName(qmoImage, "__LINKEDIT", &linkEditSegIndex);
+	}
+	if (err == 0) {
+		err = QMOImageMapSegmentByIndex(qmoImage, linkEditSegIndex, &linkEditSeg);
+	}
+	
+    // Rummage through the these two things to find the symbol list.
+    
+	if (err == 0) {
+		symCount = QMOImageToLocalUInt32(qmoImage, symTabCmd->nsyms);
+		
+        // The seg fields of the segments array have already been swapped, so we 
+        // don't need to swap them here.
+
+        linkEditFileOffset = qmoImage->segments[linkEditSegIndex].seg.fileoff;
+
+		stringBase = linkEditSeg + QMOImageToLocalUInt32(qmoImage, symTabCmd->stroff) - linkEditFileOffset;
+		symBase    = (const struct nlist *) (linkEditSeg + QMOImageToLocalUInt32(qmoImage, symTabCmd->symoff) - linkEditFileOffset);
+
+		stop = false;
+		
+		if ( qmoImage->is64Bit ) {
+			symBase64 = (const struct nlist_64 *) symBase;
+			
+			for (symIndex = 0; symIndex < symCount; symIndex++) {
+				nameStringOffset = QMOImageToLocalUInt32(qmoImage, symBase64[symIndex].n_un.n_strx);
+				if (nameStringOffset == 0) {
+					name = "";
+				} else {
+					name = stringBase + nameStringOffset;
+				}
+
+				err = callback(
+					qmoImage,
+					name,
+					QMOImageToLocalUInt8( qmoImage, symBase64[symIndex].n_type),
+					QMOImageToLocalUInt8( qmoImage, symBase64[symIndex].n_sect),
+					QMOImageToLocalUInt16(qmoImage, symBase64[symIndex].n_desc),
+					QMOImageToLocalUInt64(qmoImage, symBase64[symIndex].n_value),
+					iteratorRefCon,
+					&stop
+				);
+				
+				if ( (err != 0) || stop ) {
+					break;
+				}
+			}
+		} else {
+			for (symIndex = 0; symIndex < symCount; symIndex++) {
+				nameStringOffset = QMOImageToLocalUInt32(qmoImage, symBase[symIndex].n_un.n_strx);
+				if (nameStringOffset == 0) {
+					name = "";
+				} else {
+					name = stringBase + nameStringOffset;
+				}
+
+				err = callback(
+					qmoImage,
+					name,
+					QMOImageToLocalUInt8( qmoImage, symBase[symIndex].n_type),
+					QMOImageToLocalUInt8( qmoImage, symBase[symIndex].n_sect),
+					QMOImageToLocalUInt16(qmoImage, symBase[symIndex].n_desc),
+					QMOImageToLocalUInt32(qmoImage, symBase[symIndex].n_value),
+					iteratorRefCon,
+					&stop
+				);
+
+				if ( (err != 0) || stop ) {
+					break;
+				}
+			}
+		}
+	}
+	
+	return err;
+}
+
+// SymbolByNameIteratorContext is pointed to be the iteratorRefCon in SymbolByNameIterator.
+
+struct SymbolByNameIteratorContext {
+	const char *	symName;
+	QTMAddr			symValue;
+	bool			found;
+};
+typedef struct SymbolByNameIteratorContext SymbolByNameIteratorContext;
+
+static int SymbolByNameIterator(
+	QMOImageRef		qmoImage, 
+	const char *	name,
+	uint8_t			type,
+	uint8_t			sect,
+	uint16_t		desc,
+	QTMAddr			value,
+	void *			iteratorRefCon,
+	bool *			stopPtr
+)
+    // The QMOImageIterateSymbols callback for QMOImageLookupSymbol.
+{
+    #pragma unused(sect, desc)
+	int								err;
+	SymbolByNameIteratorContext *	context;
+
+	assert(QMOImageIsValid(qmoImage));
+    assert(name != NULL);
+    assert( stopPtr != NULL);
+    assert(*stopPtr == false);
+
+	err = 0;
+
+    // Check it's not a debugging symbol.
+    
+	if ( ! (type & N_STAB) ) {
+		context = (SymbolByNameIteratorContext *) iteratorRefCon;
+		
+        // See if the name matches.
+        
+		if ( strcmp(name, context->symName) == 0 ) {
+        
+            // Handle the symbol differently depending on its type.
+            
+			switch (type & N_TYPE) {
+				case N_ABS:
+					context->symValue = value;
+					context->found = true;
+					*stopPtr = true;
+					break;
+				case N_SECT:
+					context->symValue = value + qmoImage->slide;
+					context->found = true;
+					*stopPtr = true;
+					break;
+				case N_INDR:
+					// *** should handle this, but it's hard
+					break;
+			}
+		}
+	}
+	return err;
+}
+
+extern int QMOImageLookupSymbol(QMOImageRef qmoImage, const char *symName, QTMAddr *valuePtr)
+	// See comment in header.
+{
+	int							err;
+	SymbolByNameIteratorContext context;
+	
+	assert(QMOImageIsValid(qmoImage));
+    assert(symName != NULL);
+    assert(valuePtr != NULL);
+
+	context.symName  = symName;
+	context.symValue = 0;
+	context.found = false;
+	err = QMOImageIterateSymbols(qmoImage, SymbolByNameIterator, &context);
+	if (err == 0) {
+		if (context.found) {
+			*valuePtr = context.symValue;
+		} else {
+			err = ESRCH;
+		}
+	}
+	return err;
+}
+
diff --git a/lib/mac/QMachOImage.h b/lib/mac/QMachOImage.h
new file mode 100644
index 0000000..0627468
--- /dev/null
+++ b/lib/mac/QMachOImage.h
@@ -0,0 +1,1081 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+/*
+ *  QMachOImage.h
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QMachOImage.h
+
+    Contains:   Mach-O image access.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QMachOImage.h,v $
+Revision 1.1  2007/03/02 12:20:18         
+First checked in.
+
+
+*/
+
+#ifndef _QMACHOIMAGE_H
+#define _QMACHOIMAGE_H
+
+/////////////////////////////////////////////////////////////////
+
+#include <stdbool.h>
+#include <mach-o/loader.h>
+
+// Put <mach/mach.h> inside extern "C" guards for the C++ build 
+// because the Mach header files don't always have them.
+
+#if defined(__cplusplus)
+	extern "C" {
+#endif
+
+#include <mach/mach.h>
+
+#if defined(__cplusplus)
+	}
+#endif
+/////////////////////////////////////////////////////////////////
+// Fixes for compiling on 10.3 and earlier                     //
+/////////////////////////////////////////////////////////////////
+#ifdef DARWIN_10_3
+#define nlist_64 nlist
+#define mach_header_64 mach_header
+#define segment_command_64 segment_command
+#define section_64 section
+#define reserved3 reserved2
+#define MH_MAGIC_64 0x0ffffff0
+#define MH_CIGAM_64 0x00ffffff
+#define LC_SEGMENT_64 0x00fffff9
+#undef MH_CIGAM
+#define MH_CIGAM 0xcefaedfe
+#endif
+/////////////////////////////////////////////////////////////////
+
+#include "QTaskMemory.h"            // for the QTMAddr type
+
+/////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+    extern "C" {
+#endif
+
+/*!
+    @header         QMachOImage.h
+    
+    @abstract       Mach-O image access.
+
+    @discussion     This module gives you read access to a Mach-O image, either 
+                    on disk or in memory.  The module allows you to create an 
+                    object (denoted by the QMOImageRef type) for a Mach-O image 
+                    and then query that image object for various bits of information 
+                    about an image.  For example, you can ask whether the image 
+                    is 64-bit (QMOImageIs64Bit), how many segments it has 
+                    (QMOImageGetSegmentCount), and what symbols it uses 
+                    (QMOImageIterateSymbols).
+                    
+                    You can create an image object from:
+                    
+                    o from a Mach-O file on disk (QMOImageCreateFromFile)
+                    o from a running image in the local process (QMOImageCreateFromLocalImage)
+                    o from a running image in another process (QMOImageCreateFromTask)
+                    o from the dynamic link in another process (QMOImageCreateFromTaskDyld)
+                    
+                    In the last three cases, the image is considered to be prepared.  
+                    Prepared images work slightly differently from file-based (that 
+                    is, non-prepared) ones.  For example, the image slide 
+                    (QMOImageGetSlide) is always zero for a file-based image.
+                    
+                    Unless you know that the image is local, you have to be careful 
+                    to access the object in an architecture independent way.  The 
+                    image may have a different pointer size (QMOImageIs64Bit) or 
+                    byte order (QMOImageIsByteSwapped).  Many image object accessors 
+                    automatically take care of this for you.  For example, the 
+                    QMOImageGetSegmentByName always returns segment information as 
+                    in a 64-bit capable structure, even if the underlying image is 
+                    32-bit, and the fields of that structure are always in your 
+                    native byte order.  However, some routines (for example, 
+                    QMOImageGetMachHeader) give you direct access to the underlying 
+                    image; in that case, you have to be careful to access the image 
+                    in an architecture neutral way.  There routines, like 
+                    QMOImageToLocalUInt32, to help you do this.
+                    
+                    When you create a prepared image object, this module assumes 
+                    that the state of the task in which the object resides is stable. 
+                    That is, if you create an image object for an image within a 
+                    task and the code in that task unloads the image, all bets are 
+                    off.  The best way to prevent this from happening is to suspend 
+                    the task while you're accessing it.  The Mach routine 
+                    task_suspend is very useful in this situation.
+                    
+                    Some routines in this module (for example, QMOImageGetFilePath) 
+                    return you pointers to structures that are embedded within the 
+                    image object.  Such pointers are only valid for the lifetime 
+                    of the image object itself.  Once you've destroyed the image 
+                    object (by calling QMOImageDestroy), you can no longer rely 
+                    on the validity of these pointers.
+*/
+
+/*!
+    @typedef        QMOImageRef
+    
+    @abstract       A reference to a Mach-O image object.
+    
+    @discussion     This type is opaque; to create, destroy, or access it, you must 
+                    use the routines in this module.
+*/
+typedef struct QMOImage * QMOImageRef;
+
+/*!
+    @functiongroup  Create and Destroy
+*/
+#pragma mark ***** Create and Destroy
+
+/*!
+    @function       QMOImageCreateFromFile
+    
+    @abstract       Creates an image object for a Mach-O file.
+    
+    @discussion     Create an image object based on the contents of the Mach-O file 
+                    at filePath.  This handles both plain Mach-O files and fat files.  
+                    If you want to specify a particular architecture within a fat 
+                    file, pass the appropriate values to cputype and cpusubtype.
+                    
+                    Once you're done with the object, call QMOImageDestroy to 
+                    destroy it.
+                    
+    @param filePath The BSD path to the Mach-O file.  This must not be NULL.
+    
+    @param cputype  Specifies, along with cpusubtype, the architecture of the 
+                    Mach-O image you're looking for.
+                    
+                    You can pass CPU_TYPE_ANY, which says that you don't care 
+                    what architecture you get.  In this case, the routine will 
+                    try to find a Mach-O image that's most compatible with the 
+                    current architecture but, if that fails, will return an 
+                    arbitrary architecture.
+                    
+                    If you pass a value other than CPU_TYPE_ANY, you are guaranteed 
+                    to get an architecture that's compatible with that CPU type 
+                    or an error.
+    
+    @param cpusubtype
+                    Specifies, along with cputype, the architecture of the 
+                    Mach-O image you're looking for.  Pass 0 as a don't care 
+                    value.
+                    
+                    You must pass 0 to this parameter if you pass CPU_TYPE_ANY to 
+                    the cputype parameter.
+                    
+    @param qmoImagePtr
+                    On entry, qmoImagePtr must not be NULL and *qmoImagePtr must 
+                    be NULL.  On success, *qmoImagePtr will be a reference to the 
+                    image object that's been created.  On error, *qmoImagePtr 
+                    will be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QMOImageCreateFromFile(
+    const char *    filePath, 
+    cpu_type_t      cputype, 
+    cpu_subtype_t   cpusubtype, 
+    QMOImageRef *   qmoImagePtr
+);
+
+
+
+/*!
+    @function       QMOImageCreateFromLocalImage
+    
+    @abstract       Creates an image object from a Mach-O image in the current process.
+    
+    @discussion     Creates an image object from a Mach-O image running in the current 
+                    process.
+
+                    Once you're done with the object, call QMOImageDestroy to 
+                    destroy it.
+                    
+    @param machHeader
+                    The address of the (struct mach_header) of the Mach-O image 
+                    in the current process.  This /could/ be NULL, although its 
+                    very unlikely.
+
+                    If the current process is 64-bit, this parameter would actually 
+                    point to (struct mach_header_64) not a (struct mach_header).  
+                    The code automatically figures out whether the image is 64-bit 
+                    or not.  However, I had to define the routine to take one or 
+                    the other type, so I chose (struct mach_header).
+
+    @param filePath The BSD path to the Mach-O file that backs this image. It's 
+                    possible for an image not to have a backing file (if, for example, 
+                    the image was prepared directly from memory), so it's OK to 
+                    pass in NULL.
+                    
+                    If you do pass in NULL, the routine QMOImageGetFilePath will 
+                    return NULL.
+
+    @param qmoImagePtr
+                    On entry, qmoImagePtr must not be NULL and *qmoImagePtr must 
+                    be NULL.  On success, *qmoImagePtr will be a reference to the 
+                    image object that's been created.  On error, *qmoImagePtr 
+                    will be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QMOImageCreateFromLocalImage(
+    const struct mach_header *  machHeader, 
+    const char *                filePath,
+    QMOImageRef *               qmoImagePtr
+);
+
+/*!
+    @function       QMOImageCreateFromTask
+    
+    @abstract       Creates an image object from a Mach-O image in an arbitrary process.
+    
+    @discussion     Creates an image object from a Mach-O image running in an 
+                    arbitrary process.
+
+                    Once you're done with the object, call QMOImageDestroy to 
+                    destroy it.
+                    
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the task in which the image resides; mach_task_self 
+                    is just fine.
+                    
+                    If you do pass in mach_task_self, this routine acts like you'd 
+                    create the image using QMOImageCreateFromLocalImage.  This 
+                    automatically enables some nice optimisations.
+
+    @param machHeader
+                    The address of the (struct mach_header) (or 
+                    (struct mach_header_64)) of the Mach-O image in the specified 
+                    process.  This /could/ be NULL, although its very unlikely.
+
+    @param filePath The BSD path to the Mach-O file that backs this image. It's 
+                    possible for an image not to have a backing file (if, for example, 
+                    the image was prepared directly from memory), so it's OK to 
+                    pass in NULL.
+                    
+                    If you do pass in NULL, the routine QMOImageGetFilePath will 
+                    return NULL.
+
+    @param qmoImagePtr
+                    On entry, qmoImagePtr must not be NULL and *qmoImagePtr must 
+                    be NULL.  On success, *qmoImagePtr will be a reference to the 
+                    image object that's been created.  On error, *qmoImagePtr 
+                    will be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QMOImageCreateFromTask(
+    task_t          task, 
+    QTMAddr         machHeader, 
+    const char *    filePath,
+    QMOImageRef *   qmoImagePtr
+);
+
+/*!
+    @function       QMOImageCreateFromTaskDyld
+    
+    @abstract       Creates an image object for the dynamic linker of a particular process.
+    
+    @discussion     Creates an image object for the dynamic linker of a particular 
+                    process.  It's rare that you'd need to call this routine; it's 
+                    mainly exported for the benefit of the QMachOImageList module.
+
+                    IMPORTANT: Locating the dynamic linker within a remote process 
+                    is a difficult problem, and it could take some time.
+                    
+                    Once you're done with the object, call QMOImageDestroy to 
+                    destroy it.
+                    
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the task in which the image resides; mach_task_self 
+                    is just fine.
+                    
+                    If you do pass in mach_task_self, this routine automatically 
+                    enables some nice optimisations.
+
+    @param cputype  The CPU type of the dynamic linker that you're looking for. 
+                    In many cases, you can just pass in CPU_TYPE_ANY.  If you want 
+                    to guarantee that you'll get the same CPU type as the current 
+                    process, use the result of QMOGetLocalCPUType.
+                    
+                    This parameter is necessary beacuse it is possible for 
+                    a process to be running more than one dynamic linker.  
+                    The most common example is a process being run using 
+                    Rosetta.  In this case, there's a native dynamic linker that's 
+                    managing the native code in the process, and a PowerPC dynamic 
+                    linker that's managing your code.
+                    
+                    To handle this case, this routine lets you specify the CPU 
+                    type of the dynamic linker you're looking for.  In the 
+                    typical case (where you're inspecting a native process), you 
+                    can pass in CPU_TYPE_ANY.  However, if you know the process 
+                    is being run using Rosetta, you can pass in a value of 
+                    CPU_TYPE_X86 to look at the native dynamic linker or 
+                    CPU_TYPE_POWERPC to look at the PowerPC one. 
+                    
+                    If you pass in CPU_TYPE_ANY, the behaviour depends on the 
+                    process type.  For a native process, CPU_TYPE_ANY will cause  
+                    the routine to use the first dynamic linker it finds.  However, 
+                    for a Rosetta process, it will prefer the PowerPC dynamic 
+                    linker, only returning the Intel dynamic linker if it can't 
+                    find the PowerPC one.
+
+    @param qmoImagePtr
+                    On entry, qmoImagePtr must not be NULL and *qmoImagePtr must 
+                    be NULL.  On success, *qmoImagePtr will be a reference to the 
+                    image object that's been created.  On error, *qmoImagePtr 
+                    will be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QMOImageCreateFromTaskDyld(
+    task_t          task, 
+    cpu_type_t      cputype, 
+    QMOImageRef *   qmoImagePtr
+);
+
+/*!
+    @function       QMOImageDestroy
+    
+    @abstract       Destroys an image object.
+    
+    @discussion     Destroys the supplied image object.
+                    
+    @param qmoImage The image object to destroy.  If this is NULL, the routine 
+                    does nothing.
+*/
+extern void QMOImageDestroy(QMOImageRef qmoImage);
+
+
+/*!
+    @functiongroup  Basic Accessors
+*/
+#pragma mark ***** Basic Accessors
+
+/*!
+    @function       QMOImageGetSlide
+    
+    @abstract       Gets the image's slide.
+    
+    @discussion     Gets the slide associated with an image.  In this case, 
+                    slide has the traditional Mach-O definition, that it, it is 
+                    the amount that you have to add to the virtual addresses stored 
+                    in the Mach-O file to get to the actual virtual addresses 
+                    being used by the prepared image.
+                    
+                    For a file-based image, the slide is always assumed to be 0.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         The object's slide.
+*/
+extern QTMAddr	QMOImageGetSlide(QMOImageRef qmoImage);
+
+/*!
+    @function       QMOImageIs64Bit
+    
+    @abstract       Reports whether the image is 64-bit.
+    
+    @discussion     Returns true if the image is a 64-bit image.  This information 
+                    is based on the Mach-O image, not on the process in which the 
+                    image is running (if any).  Current versions of Mac OS X 
+                    don't let you mix 32- and 64-bit images within a process, 
+                    so that distinction is irrelevant at the moment.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         Returns true if the image is 64-bit; returns false otherwise.
+*/
+extern bool		QMOImageIs64Bit(QMOImageRef qmoImage);
+	
+/*!
+    @function       QMOImageIsByteSwapped
+    
+    @abstract       Reports whether the image is byte swapped.
+    
+    @discussion     Returns true if the image is byte swapped relative to the 
+                    calling process.  For example, if you're running on a PowerPC 
+                    and you create an image for file-based Intel executable, this 
+                    will return true.
+                    
+                    In general, you shouldn't care whether the image is byte 
+                    swapped.  In most cases, this module will automatically 
+                    return data in native endian format.  If you're calling the 
+                    few routines in this module that don't do that, you can use 
+                    helper routines, like QMOImageToLocalUInt32, which 
+                    automatically byte swap if necessary.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         Returns true if the image is byte swapped relative to the 
+                    current process; returns false otherwise.
+*/
+extern bool		QMOImageIsByteSwapped(QMOImageRef qmoImage);
+
+/*!
+    @function       QMOImageGetMachHeaderOffset
+    
+    @abstract       Returns the address of the image's Mach-O header.
+    
+    @discussion     Returns the offset of the image's Mach-O header within its 
+                    container.  For a prepared image, this is just the address 
+                    of the Mach-O header.  For a file-based image, this is the 
+                    offset within the file.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         The offset of the image's Mach-O header within its 
+                    container.
+*/
+extern QTMAddr QMOImageGetMachHeaderOffset(QMOImageRef qmoImage);
+
+/*!
+    @function       QMOImageGetMachHeader
+    
+    @abstract       Returns a pointer to the image's Mach-O header.
+    
+    @discussion     Returns a pointer, in the current process's address space, to 
+                    the image's Mach-O header.
+
+                    IMPORTANT: The (struct mach_header *) may actually be a 
+                    (struct mach_header_64 *) depending on the result of QMOImageIs64Bit.
+
+                    IMPORTANT: The fields of the returned (struct mach_header *) 
+                    may be byte swapped.  Use the QMOImageToLocalUIntX routines 
+                    to access them.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         A pointer to the Mach-O header of the image.  If the image 
+                    is local, this will point to the Mach-O header of the image 
+                    in the current process.  If the image is remote or file-based, 
+                    this will be a copy of the Mach-O header.
+*/
+extern const struct mach_header * QMOImageGetMachHeader(QMOImageRef qmoImage);
+
+/*!
+    @function       QMOImageGetFilePath
+    
+    @abstract       Returns a path to the Mach-O file containing the image.
+    
+    @discussion     There is no magic here.  The value you get back is just a 
+                    copy of the value you passed in when you created the image.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         A pointer to a BSD path for the Mach-O file containing the 
+                    image.  This may be NULL.
+                    
+                    Do not try to free this pointer.  It belongs to the image 
+                    object and will be freed when you destroy the image object.
+*/
+extern const char * QMOImageGetFilePath(QMOImageRef qmoImage);
+
+/*!
+    @function       QMOImageGetFileType
+    
+    @abstract       Returns the Mach-O file type.
+    
+    @discussion     Returns the Mach-O file type per the filetype field of the 
+                    (struct mach_header).  Typical values are MH_EXECUTE, 
+                    MH_BUNDLE, and so on.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         The Mach-O file type (as native endian).
+*/
+extern uint32_t QMOImageGetFileType(QMOImageRef qmoImage);
+
+/*!
+    @function       QMOImageGetCPUType
+    
+    @abstract       Returns the Mach-O CPU type.
+    
+    @discussion     Returns the Mach-O CPU type per the cputype field of the 
+                    (struct mach_header).  Typical values are CPU_TYPE_POWERPC, 
+                    CPU_TYPE_X86, and so on.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         The Mach-O CPU type (as native endian).
+*/
+extern uint32_t QMOImageGetCPUType(QMOImageRef qmoImage);
+
+/*!
+    @function       QMOImageGetCPUSubType
+    
+    @abstract       Returns the Mach-O CPU subtype.
+    
+    @discussion     Returns the Mach-O CPU subtype per the cpusubtype field of the 
+                    (struct mach_header).  Typical values are CPU_SUBTYPE_POWERPC_970, 
+                    CPU_SUBTYPE_X86_ALL, and so on.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         The Mach-O CPU subtype (as native endian).
+*/
+extern uint32_t QMOImageGetCPUSubType(QMOImageRef qmoImage);
+
+/*!
+    @function       QMOImageFindLoadCommandByID
+    
+    @abstract       Finds a load command within an image.
+    
+    @discussion     Finds a load command within an image.  cmdID is the command 
+                    that you're trying to find (for example, LC_UNIXTHREAD, 
+                    LC_SYMTAB, and so on).  Returns the address of the first 
+                    instance of that command ID, or NULL if that command is not 
+                    found.
+
+                    IMPORTANT:  The fields of the return (struct load_command *) 
+                    may be byte swapped.  Use the QMOImageToLocalUIntX routines 
+                    to access them.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @param cmdID    The load command ID to look for.  
+
+    @result         A pointer to the load command.  This will be NULL if the 
+                    command is not found.
+*/
+extern const struct load_command * QMOImageFindLoadCommandByID(
+    QMOImageRef     qmoImage, 
+    uint32_t        cmdID
+);
+
+/*!
+    @function       QMOImageGetSegmentCount
+    
+    @abstract       Returns the number of segments in the image.
+    
+    @discussion     Returns the number of segments in the image.  This is a 
+                    count of the number of LC_SEGMENT commands in the image.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         A count of the segments in the image.
+*/
+extern uint32_t	QMOImageGetSegmentCount(QMOImageRef qmoImage);
+	
+/*!
+    @function       QMOImageGetSegmentByName
+    
+    @abstract       Returns information about the named segment.
+    
+    @discussion     Returns information about the named segment within the image. 
+                    You can chose to get the segment index, or the segment fields, 
+                    or both.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @param segName
+                    The name of the segment to search for as ASCII.  A typical 
+                    value might be "__TEXT".  Segment name comparison is case 
+                    sensitive.  If there is more than one segment with this name, 
+                    you get the first one.
+                    
+    @param segIndexPtr
+                    On success, if segIndexPtr is not NULL, *segIndexPtr will be 
+                    the zero-based index of the segment within the image.
+                    
+                    It is an error for both segIndexPtr and segPtr to be NULL.
+                    
+    @param segPtr   On success, if segPtr is not NULL, *segPtr will contain 
+                    information about the segment.  The fields of this structure 
+                    will be in native endian format.
+
+                    The information is always returned in a (struct seg_command_64), 
+                    even if the segment is in a 32-bit image (which would contain 
+                    (struct seg_command)); all relevant 32-bit quantities are 
+                    promoted to 64-bits in the result.
+                    
+                    The vmaddr field of this structure is the /unprepared/ value. 
+                    If the image is prepared, there's no guarantee that the segment 
+                    will be mapped at this address.  To get the address at which 
+                    the segment is mapped, you must add the slide to this value.
+
+                    It is an error for both segIndexPtr and segPtr to be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+                    If the named segment is not found, the result is ESRCH.
+*/
+extern int		QMOImageGetSegmentByName(
+    QMOImageRef                 qmoImage, 
+    const char *                segName, 
+    uint32_t *                  segIndexPtr, 
+    struct segment_command_64 * segPtr
+);
+
+/*!
+    @function       QMOImageGetSegmentByIndex
+    
+    @abstract       Returns information about a segment.
+    
+    @discussion     Returns information about the specified segment within the image. 
+                    
+    @param qmoImage Must be a valid image object.
+
+    @param segIndex The zero-based index of the segment for which to return 
+                    information. 
+
+    @param segPtr   On entry, segPtr must not be NULL.  On success, *segPtr will 
+                    contain information about the segment.  The fields of this 
+                    structure will be in native endian format.
+
+                    The information is always returned in a (struct seg_command_64), 
+                    even if the segment is in a 32-bit image (which would contain 
+                    (struct seg_command)); all relevant 32-bit quantities are 
+                    promoted to 64-bits in the result.
+
+                    The vmaddr field of this structure is the /unprepared/ value. 
+                    If the image is prepared, there's no guarantee that the segment 
+                    will be mapped at this address.  To get the address at which 
+                    the segment is mapped, you must add the slide to this value.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+                    If segIndex is out of range, the result is EINVAL.
+*/
+extern int		QMOImageGetSegmentByIndex(
+    QMOImageRef                 qmoImage, 
+    uint32_t                    segIndex, 
+    struct segment_command_64 * segPtr
+);
+
+/*!
+    @function       QMOImageGetSectionCount
+    
+    @abstract       Returns the number of sections within the image.
+    
+    @discussion     Returns the number of sections within the image.  This is 
+                    equal to the sum of the nsects fields of all the segment in 
+                    the image.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         A count of the sections in the image.
+*/
+extern uint32_t	QMOImageGetSectionCount(QMOImageRef qmoImage);
+
+/*!
+    @function       QMOImageGetSectionByName
+    
+    @abstract       Returns information about the named section.
+    
+    @discussion     Returns information about the named section within the image. 
+                    You can choose to search for the section by the section name, 
+                    the segment name, or both.  If there is more than one section 
+                    that matches the search criteria, you get the first.
+                    
+                    You can chose to request the section index, or the section 
+                    fields, or both.
+                    
+    @param qmoImage Must be a valid image object.
+
+    @param segName  The name of the segment in which the section must reside, in 
+                    ASCII.  A typical value might be "__TEXT".  Segment name 
+                    comparison is case sensitive.  If you specify NULL, the section 
+                    specified by sectName can reside in any segment.
+                    
+                    It is an error for both segName and sectName to be NULL.
+
+    @param sectName The name of the section, in ASCII.  A typical value might be 
+                    "__text".  Section name comparison is case sensitive.  If you 
+                    specify NULL, you get the first section within the segment 
+                    specified by segName.
+
+                    It is an error for both segName and sectName to be NULL.
+
+    @param sectIndexPtr
+                    On success, if sectIndexPtr is not NULL, *sectIndexPtr will be 
+                    the zero-based index of the section within the image.
+                    
+                    It is an error for both sectIndexPtr and sectPtr to be NULL.
+                    
+    @param sectPtr  On success, if sectPtr is not NULL, *sectPtr will contain 
+                    information about the section.  The fields of this structure 
+                    will be in native endian format.
+
+                    The information is always returned in a (struct section_64), 
+                    even if the section is in a 32-bit image (which would contain 
+                    (struct section)); all relevant 32-bit quantities are promoted 
+                    to 64-bits in the result.
+                    
+                    The addr field of this structure is the /unprepared/ value. 
+                    If the image is prepared, there's no guarantee that the section 
+                    will be mapped at this address.  To get the address at which 
+                    the section is mapped, you must add the slide to this value.
+
+                    It is an error for both sectIndexPtr and sectPtr to be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+                    If the named section is not found, the result is ESRCH.
+*/
+extern int		QMOImageGetSectionByName(
+    QMOImageRef                 qmoImage, 
+    const char *                segName,
+    const char *                sectName,
+    uint32_t *                  sectIndexPtr,
+    struct section_64 *         sectPtr
+);
+
+/*!
+    @function       QMOImageGetSectionByIndex
+    
+    @abstract       Returns information about a section.
+    
+    @discussion     Returns information about the specified section within the image. 
+                    
+    @param qmoImage Must be a valid image object.
+
+    @param sectIndex
+                    The zero-based index of the section for which to return 
+                    information. 
+
+    @param sectPtr  On entry, sectPtr must not be NULL.  On success, *sectPtr will 
+                    contain information about the section.  The fields of this 
+                    structure will be in native endian format.
+
+                    The information is always returned in a (struct section_64), 
+                    even if the section is in a 32-bit image (which would contain 
+                    (struct section)); all relevant 32-bit quantities are promoted 
+                    to 64-bits in the result.
+
+                    The addr field of this structure is the /unprepared/ value. 
+                    If the image is prepared, there's no guarantee that the section 
+                    will be mapped at this address.  To get the address at which 
+                    the section is mapped, you must add the slide to this value.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+                    If sectIndex is out of range, the result is EINVAL.
+*/
+extern int		QMOImageGetSectionByIndex(
+    QMOImageRef                 qmoImage, 
+    uint32_t                    sectIndex, 
+    struct section_64 *         sectPtr
+);
+
+/*!
+    @functiongroup  Utilities
+*/
+#pragma mark ***** Utilities
+
+/*!
+    @function       QMOGetLocalCPUType
+    
+    @abstract       Returns the CPU type of the current process.
+
+    @discussion     Returns the CPU type of the current process (for example,
+                    CPU_TYPE_X86, CPU_TYPE_POWERPC).
+    
+    @result         The CPU type of the current process.
+*/
+extern cpu_type_t QMOGetLocalCPUType(void);
+
+/*!
+    @function       QMOImageToLocalUInt8
+    
+    @abstract       Converts an 8-bit quantity from image format to native format.
+
+    @discussion     Yes, I know that this routine is a NOP, but it makes the code 
+                    more symmentric.
+    
+    @param qmoImage Must be a valid image object.
+
+    @param value    The value to convert, in image format.
+
+    @result         The value in native format.
+*/
+extern uint8_t	QMOImageToLocalUInt8( QMOImageRef qmoImage, uint8_t  value);
+
+/*!
+    @function       QMOImageToLocalUInt16
+    
+    @abstract       Converts a 16-bit quantity from image format to native format.
+    
+    @param qmoImage Must be a valid image object.
+
+    @param value    The value to convert, in image format.
+
+    @result         The value in native format.
+*/
+extern uint16_t QMOImageToLocalUInt16(QMOImageRef qmoImage, uint16_t value);
+
+/*!
+    @function       QMOImageToLocalUInt32
+    
+    @abstract       Converts a 32-bit quantity from image format to native format.
+    
+    @param qmoImage Must be a valid image object.
+
+    @param value    The value to convert, in image format.
+
+    @result         The value in native format.
+*/
+extern uint32_t QMOImageToLocalUInt32(QMOImageRef qmoImage, uint32_t value);
+
+/*!
+    @function       QMOImageToLocalUInt64
+    
+    @abstract       Converts a 64-bit quantity from image format to native format.
+    
+    @param qmoImage Must be a valid image object.
+
+    @param value    The value to convert, in image format.
+
+    @result         The value in native format.
+*/
+extern uint64_t QMOImageToLocalUInt64(QMOImageRef qmoImage, uint64_t value);
+
+/*!
+    @functiongroup  High-Level Routines
+*/
+#pragma mark ***** High-Level Routines
+
+/*!
+    @function       QMOImageGetLibraryID
+    
+    @abstract       Returns the library ID of an image.
+    
+    @discussion     Returns the library ID of an image, as contained in the 
+                    LC_ID_DYLIB command within the image.  This is typically 
+                    only present for shared libraries and frameworks (whose Mach-O 
+                    file type is MH_DYLIB).
+                    
+    @param qmoImage Must be a valid image object.
+
+    @result         A pointer to the library ID for the image.  This will be NULL 
+                    if the image has no LC_ID_DYLIB command.
+                    
+                    Do not try to free this pointer.  It belongs to the image 
+                    object and will be freed when you destroy the image object.
+*/
+extern const char * QMOImageGetLibraryID(QMOImageRef qmoImage);
+
+/*!
+    @function       QMOSymbolIteratorProc
+    
+    @abstract       Symbol callback for QMOImageIterateSymbols.
+    
+    @discussion     QMOImageIterateSymbols will call this callback for every symbol 
+                    in the image.
+                    
+                    IMPORTANT: When I say every symbol, I mean /every/ symbol.  
+                    This isn't called just for symbols exported by the image. 
+                    It's also called for symbols that the image imports (these 
+                    are of type N_SECT) and for all debugger symbols.  If you're 
+                    just looking for exported symbols, you must filter out the 
+                    cruft.
+                    
+                    The following pre-conditions are appropriate for your callback:
+                    
+                    assert(qmoImage != NULL);
+                    assert(name != NULL);
+                    assert( stopPtr != NULL);
+                    assert(*stopPtr == false);
+                    
+    @param qmoImage This is the image object on which you called QMOImageIterateSymbols.
+
+    @param name     The name of the symbol.  If you're looking for a C symbol, 
+                    remember that the compiler prefixes all C symbols with a 
+                    leading underscore.
+
+    @param type     The symbol type; equivalent to the n_type field of (struct nlist). 
+                    You can use the masks from <mach-o/nlist.h> to extract information 
+                    from this value.  The most commonly used masks are:
+                    
+                    o N_STAB -- If this flag is set, the symbol is a debugging symbol.
+                    o N_EXT  -- If this flag is set, the symbol is an external symbol.
+                    o N_TYPE -- Use this mask to extract the symbol type (typical 
+                      values are N_UNDF, N_ABS, and N_SECT).
+
+    @param sect     The symbol section; equivalent to the n_sect field of (struct nlist).
+                    For symbols of type N_SECT, this is the section in which the 
+                    symbol resides.
+                    
+                    IMPORTANT: This is /one-based/, not zero-based.  Thus, if you 
+                    want to pass this to QMOImageGetSectionByIndex, you have to 
+                    subtract one.
+
+    @param desc     Equivalent to the n_desc field of (struct nlist).  See 
+                    <mach-o/nlist.h> and <mach-o/stabs.h> for details.
+
+    @param value    The symbol value; equivalent to the n_value field of (struct nlist).
+
+                    IMPORTANT: For symbols of type N_SECT, you must add the image's 
+                    slide (as returned by QMOImageGetSlide) to the value to get the 
+                    actual address of the symbol.
+
+    @param iteratorRefCon
+                    The iterator refCon passed to QMOImageIterateSymbols.
+
+    @param stopPtr  Will not be NULL.  Set *stopPtr to true to stop iteration 
+                    without triggering an error.
+
+    @result         An errno-style error code.  Any value other than 0 will 
+                    cause symbol iteration to stop and QMOImageIterateSymbols 
+                    to return that error.
+*/
+typedef int (*QMOSymbolIteratorProc)(
+	QMOImageRef		qmoImage, 
+	const char *	name,
+	uint8_t			type,
+	uint8_t			sect,
+	uint16_t		desc,
+	QTMAddr			value,
+	void *			iteratorRefCon,
+	bool *			stopPtr
+);
+
+/*!
+    @function       QMOImageIterateSymbols
+    
+    @abstract       Iterates through the symbols in an image.
+    
+    @discussion     Iterates through the symbols in an image, call your supplied 
+                    callback for each symbol.
+
+    @param qmoImage Must be a valid image object.
+
+    @param callback A pointer to a QMOSymbolIteratorProc callback routine that's 
+                    called for each symbol in the image.
+
+    @param iteratorRefCon
+                    A refCon for that callback.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.  If your 
+                    callback returns an error, symbol iteration stops and the 
+                    error code from your callback is returned here.
+*/
+extern int QMOImageIterateSymbols(
+    QMOImageRef             qmoImage, 
+    QMOSymbolIteratorProc   callback, 
+    void *                  iteratorRefCon
+);
+
+/*!
+    @function       QMOImageLookupSymbol
+    
+    @abstract       Looks up a symbol by name.
+    
+    @discussion     Looks up the named symbol and returns its value.  The current 
+                    implementation will only find symbols of type N_ABS and N_SECT 
+                    (that is, absolute symbols and symbols exported by this image).
+
+    @param qmoImage Must be a valid image object.
+
+    @param symName  The name of the symbol to look up.  If this is a C symbol, 
+                    you must include the leading underscore that's inserted by 
+                    the compiler for all C symbols.
+
+    @param valuePtr On entry, valuePtr must not be NULL.  On success, *valuePtr 
+                    will be the value of the symbol.  This /will/ account for 
+                    any slide.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.  If the 
+                    named symbol is not found, the result is ESRCH.
+*/
+extern int QMOImageLookupSymbol(
+    QMOImageRef     qmoImage, 
+    const char *    symName, 
+    QTMAddr *       valuePtr
+);
+
+/////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/mac/QMachOImageList.c b/lib/mac/QMachOImageList.c
new file mode 100644
index 0000000..43e6097
--- /dev/null
+++ b/lib/mac/QMachOImageList.c
@@ -0,0 +1,657 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/*
+ *  QMachOImageList.c
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QMachOImageList.c
+
+    Contains:   Code to get all Mach-O images within a task.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QMachOImageList.c,v $
+Revision 1.1  2007/03/02 12:20:22         
+First checked in.
+
+
+*/
+
+/////////////////////////////////////////////////////////////////
+
+// Our prototypes
+
+#include "QMachOImageList.h"
+
+// System interfaces
+
+#include <TargetConditionals.h>
+
+#include <assert.h>
+#include <sys/param.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <mach-o/dyld.h>
+#include <mach-o/loader.h>
+
+// Scary Darwin-derived header file for dyld.
+
+#include "dyld_gdb.h"
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** New Technique
+
+static int ImageListForTaskNew(
+	task_t          task, 
+	QMOImageRef     dyldImage, 
+	QTMAddr         allImageInfoAddr, 
+	QMOImageRef *	imageArray, 
+	size_t          imageArraySize, 
+	size_t *        imageCountPtr
+)
+	// The new interface is fairly straightforward: there's a single symbol 
+	// ("dyld_all_image_infos", which has already been looked up by our caller, 
+	// and whose address (in the remote task) is passed to us in allImageInfoAddr) 
+    // that contains a simple data structure that describes all of the images.  
+    // That data structure is defined by (struct dyld_all_image_infos) (see 
+    // "dyld_gdb.h"); it, in turn, contains a pointer to an array of structures 
+	// (struct dyld_image_info) for each image.
+	//
+	// Given the task, a dyld image, and the address of the 
+	// "dyld_all_image_infos" structure within that task, this routine returns 
+	// an array of images within that task (in the buffer specified by imageArray, 
+	// if it's not NULL, and imageArraySize), and a count of those images 
+    // (in *imageCountPtr). 
+	//
+	// On entry, task must not be MACH_PORT_NULL
+	// On entry, dyldImage must not be NULL
+	// On entry, allImageInfoAddr must be the address of "dyld_all_image_infos" 
+	// within the task, which shouldn't be NULL
+	// On entry, imageCountPtr must not be NULL
+	// On entry, *imageCountPtr is ignored
+	// On entry, if imageArray is NULL, imageArraySize must be 0
+	// On entry, if imageArray is not NULL, imageArraySize must be the number of 
+	// elements available in imageArray
+	// On success, if imageArray is not NULL, up to imageArraySize image objects 
+	// are returned in the array
+	// On success, *imageCountPtr is the number of images in the task; this may 
+	// be larger than imageArraySize, in which case the imageArray wasn't big 
+	// enough and the returned value tells you how big it needs to be
+{
+	int							err;
+	struct dyld_all_image_infos	allImageInfo;
+	uint32_t					infoCount = 0;
+	uint32_t					infoIndex;
+	QTMAddr						infoArrayAddr;
+	size_t						infoArraySize;
+	const void *				infoArrayLocal;
+	
+	assert(task != MACH_PORT_NULL);
+	assert(dyldImage != NULL);
+	assert(allImageInfoAddr != 0);		// very unlikely for dyld_all_image_infos to be at 0
+	assert( (imageArray != NULL) || (imageArraySize == 0) );
+	assert(imageCountPtr != NULL);
+	
+	infoArrayLocal = NULL;
+    infoArraySize  = 0;                 // quieten a warning
+
+	// Read the value of the dyld_all_image_infos structure.
+	
+	err = QTMRead(task, allImageInfoAddr, sizeof(allImageInfo), &allImageInfo);
+
+	// Bletch.  The layout of (struct dyld_all_image_infos) varies with the pointer 
+	// size of the architecture.  As we can't guarantee that the remote architecture 
+	// is compatible with our local pointer size, we have to be very careful about 
+	// the fields that we access within dyld_all_image_infos.  It turns out that we 
+	// only care about the "version", "infoArrayCount", and "infoArray" fields, and 
+	// only the last one varies by pointer size, so this all works; but it's 
+	// hardly nice.
+	
+	if ( (err == 0) && (QMOImageToLocalUInt32(dyldImage, allImageInfo.version) != 1) ) {
+		err = ESHLIBVERS;
+	}
+	if (err == 0) {
+		infoCount = QMOImageToLocalUInt32(dyldImage, allImageInfo.infoArrayCount);
+		
+		if ( QMOImageIs64Bit(dyldImage) ) {
+			infoArrayAddr = QMOImageToLocalUInt64(dyldImage, *(uint64_t *) &allImageInfo.infoArray);
+			infoArraySize = infoCount * sizeof(uint64_t) * 3;
+		} else {
+			infoArrayAddr = QMOImageToLocalUInt32(dyldImage, *(uint32_t *) &allImageInfo.infoArray);
+			infoArraySize = infoCount * sizeof(uint32_t) * 3;
+		}
+		
+		// Read in the array of per-image structures.
+		
+		err = QTMReadAllocated(task, infoArrayAddr, infoArraySize, &infoArrayLocal);
+	}
+	
+	// Process the array of per-image structures, using the relevant information 
+	// to create our output.  Again, the size of these fields vary per architecture.
+	
+	if (err == 0) {
+		*imageCountPtr = infoCount;
+		
+		if (imageArray != NULL) {
+            bool    is64Bit;
+            
+            is64Bit = QMOImageIs64Bit(dyldImage);
+            for (infoIndex = 0; infoIndex < infoCount; infoIndex++) {
+                if (infoIndex < imageArraySize) {
+                    QTMAddr     machHeader;
+                    QTMAddr     filePathAddr;
+                    char        filePath[PATH_MAX];
+                    
+                    if (is64Bit) {
+                        machHeader   = QMOImageToLocalUInt64(dyldImage, ((uint64_t *) infoArrayLocal)[infoIndex * 3] );
+                        filePathAddr = QMOImageToLocalUInt64(dyldImage, ((uint64_t *) infoArrayLocal)[infoIndex * 3 + 1] );
+                    } else {
+                        machHeader   = QMOImageToLocalUInt32(dyldImage, ((uint32_t *) infoArrayLocal)[infoIndex * 3] );
+                        filePathAddr = QMOImageToLocalUInt32(dyldImage, ((uint32_t *) infoArrayLocal)[infoIndex * 3 + 1] );
+                    }
+                    err = QTMRead(task, filePathAddr, sizeof(filePath), filePath);
+                    if (err == 0) {
+                        filePath[sizeof(filePath) - 1] = 0;         // guarantee NULL termination
+                        err = QMOImageCreateFromTask(task, machHeader, filePath, &imageArray[infoIndex]);
+                    }
+                    if (err != 0) {
+                        break;
+                    }
+                }
+            }
+		}
+	}
+
+	// Clean up.
+	
+    QTMFree(infoArrayLocal, infoArraySize);
+	
+	return err;
+}
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Old Technique
+
+static int ImageListForTaskOldWithNames(
+	task_t			task, 
+	QMOImageRef		dyldImage, 
+	const char *	listHeadName, 
+	const char *	elemCountName, 
+	const char *	elemSizeName, 
+	QMOImageRef *	imageArray, 
+	size_t			imageArraySize, 
+	size_t *		imageCountPtr
+)
+	// The old interface is quite strange.  dyld declares a global variable 
+	// (whose name is given by listHeadName, for example, "library_images") 
+	// that contains elemCount elements, each of elemSize bytes.  The values 
+	// of elemCount and elemSize are exported in global variables, each 
+	// of which is a uint32_t.  The names of these variables are also supplied 
+	// as parameters to this routine (elemCountName and elemSizeName, for example, 
+	// "gdb_nlibrary_images" and "gdb_library_image_size", respectively).
+	// Finally, at the end of this block of elements is a count of the number 
+	// of elements in the block ("nimages") followed by a pointer to the 
+	// next block of elements ("next_images").
+	//
+	// Within an element, there are only three fields that interest us:
+	//
+	// o "valid"         (offset 12, size 4) -- Non-zero if this element is valid.
+	// o "mh"            (offset  8, size 4) -- A pointer to the mach_header for this 
+    //                                          image.
+    // o "physical_name" (offset  0, size 4) -- A pointer to the file path for the
+    //                                          on disk storage, if any.
+	//
+	// On entry, task must not be MACH_PORT_NULL
+	// On entry, dyldImage must not be NULL
+	// On entry, listHeadName, elemCountName, and elemSizeName must all not be NULL
+	// On entry, imageCountPtr must not be NULL
+	// On entry, *imageCountPtr is NOT ignored; rather, this routine assumes that 
+	// imageArray already has *imageCountPtr elements filled in, and starts putting 
+	// new elements at *imageCountPtr
+	// On entry, if imageArray is NULL, imageArraySize must be 0
+	// On entry, if imageArray is not NULL, imageArraySize must be the number of 
+	// elements available in imageArray
+	// On success, if imageArray is not NULL, up to imageArraySize image objects 
+	// are returned in the array, starting at the position specified by the 
+	// original value of *imageCountPtr
+	// On success, *imageCountPtr is incremented by the number of images that were 
+	// found; this may end up making it larger than imageArraySize, in which case the 
+	// imageArray wasn't big enough and the returned value tells you how big 
+	// it needs to be
+{
+	int						err;
+	QTMAddr					listChunkAddr;
+	QTMAddr					elemSizeAddr;
+	QTMAddr					elemCountAddr;
+	uint32_t				elemCount;
+	uint32_t				elemSize;
+	size_t					listChunkSize;
+	enum {									// constants related to the array elements
+		kValidOffset        = 12,				// offset to "valid" field
+		kMHOffset           = 8,				// offset to "mh" field
+        kPhysicalNameOffset = 0                 // offset to "physical_name" field
+	};
+	enum {									// constants related to data after array
+		kNImagesOffset    = 0,					// offset to "nimages" field
+		kNextImagesOffset = 4,					// offset to next_images field
+		kBlockSuffixSize  = 8,					// total size of trailing block
+	};
+
+	// The old-style interface is not present in 64-bit tasks.
+	
+	assert( ! QMOImageIs64Bit(dyldImage) );
+	
+	assert(task != MACH_PORT_NULL);
+	assert(dyldImage     != NULL);
+	assert(listHeadName  != NULL);
+	assert(elemCountName != NULL);
+	assert(elemSizeName  != NULL);
+	assert( (imageArray  != NULL) || (imageArraySize == 0) );
+	assert(imageCountPtr != NULL);
+
+	// Look up each of the symbols.
+	
+	err = QMOImageLookupSymbol(dyldImage, listHeadName, &listChunkAddr);
+	if (err == 0) {
+		err = QMOImageLookupSymbol(dyldImage, elemCountName, &elemCountAddr);
+	}
+	if (err == 0) {
+		err = QMOImageLookupSymbol(dyldImage, elemSizeName, &elemSizeAddr);
+	}
+	
+	// Read the elemCount and elemSize values.
+	
+	if (err == 0) {
+		err = QTMRead(task, elemCountAddr, sizeof(elemCount), &elemCount);
+	}
+	if (err == 0) {
+		err = QTMRead(task, elemSizeAddr, sizeof(elemSize), &elemSize);
+	}
+	
+	// Read the image data, one chunk at a time.
+	
+	if (err == 0) {
+		elemCount = QMOImageToLocalUInt32(dyldImage, elemCount);
+		elemSize  = QMOImageToLocalUInt32(dyldImage, elemSize);
+		listChunkSize = elemCount * elemSize + kBlockSuffixSize;
+
+		do {
+			const char *    listChunk;
+			uint32_t        elemCountInThisBlock;
+			uint32_t        elemIndex;
+			
+			listChunk = NULL;
+			
+			// Read a copy of this chunk of the list.
+			
+			err = QTMReadAllocated(task, listChunkAddr, listChunkSize, (const void **) &listChunk);
+			if (err == 0) {
+				elemCountInThisBlock = QMOImageToLocalUInt32(dyldImage, *(uint32_t *) (listChunk + elemCount * elemSize + kNImagesOffset) );
+				
+				// Process each element in the chunk.  If the element is valid, place 
+				// the image into the output array (if there's size)
+				
+				for (elemIndex = 0; elemIndex < elemCountInThisBlock; elemIndex++) {
+					if ( QMOImageToLocalUInt32(dyldImage, *(uint32_t *) (listChunk + elemIndex * elemSize + kValidOffset)) != 0 ) {
+						if ( (imageArray != NULL) && (*imageCountPtr < imageArraySize) ) {
+                            QTMAddr     machHeader;
+                            QTMAddr     filePathAddr;
+                            char        filePath[PATH_MAX];
+                            
+							machHeader   = QMOImageToLocalUInt32(dyldImage, *(uint32_t *) (listChunk + elemIndex * elemSize + kMHOffset          ));
+                            filePathAddr = QMOImageToLocalUInt32(dyldImage, *(uint32_t *) (listChunk + elemIndex * elemSize + kPhysicalNameOffset));
+                            err = QTMRead(task, filePathAddr, sizeof(filePath), filePath);
+                            if (err == 0) {
+                                filePath[sizeof(filePath) - 1] = 0;         // guarantee NULL termination
+                                err = QMOImageCreateFromTask(task, machHeader, filePath, &imageArray[*imageCountPtr]);
+                            }
+						}
+						*imageCountPtr += 1;
+                        if (err != 0) {
+                            break;
+                        }
+					}
+				}
+			}
+			
+			// Move on to the next chunk.
+			
+			if (err == 0) {
+				listChunkAddr = QMOImageToLocalUInt32(dyldImage, *(uint32_t *) (listChunk + elemCount * elemSize + kNextImagesOffset) );
+			}
+			
+            QTMFree(listChunk, listChunkSize);
+		} while ( (err == 0) && (listChunkAddr != 0) );
+	}
+	
+	return err;
+}
+
+static int ImageListForTaskOld(
+	task_t          task, 
+	QMOImageRef     dyldImage, 
+	QMOImageRef *	imageArray, 
+	size_t          imageArraySize, 
+	size_t *        imageCountPtr
+)
+	// Returns information about the prepared Mach-O images in a task 
+	// using the old (pre-10.4) interface.  See ImageListForTaskOldWithNames 
+	// for a discussion of the mechanics of this.
+	//
+	// On entry, task must not be MACH_PORT_NULL
+	// On entry, dyldImage must not be NULL
+	// On entry, imageCountPtr must not be NULL
+	// On entry, *imageCountPtr is ignored
+	// On entry, if imageArray is NULL, imageArraySize must be 0
+	// On entry, if imageArray is not NULL, imageArraySize must be the number of 
+	// elements available in imageArray
+	// On success, if imageArray is not NULL, up to imageArraySize image objects 
+	// are returned in the array
+	// On success, *imageCountPtr is the number of images in the task; this may 
+	// be larger than imageArraySize, in which case the imageArray wasn't big 
+	// enough and the returned value tells you how big it needs to be
+{
+	int	err;
+	
+	assert(task != MACH_PORT_NULL);
+	assert(dyldImage != NULL);
+	assert( (imageArray != NULL) || (imageArraySize == 0) );
+	assert(imageCountPtr != NULL);
+	
+	// The old-style interface is only used for 32-bit.
+	
+	assert( ! QMOImageIs64Bit(dyldImage) );
+
+	// The old interface makes a (strange) distinction between 
+	// 'library' images and 'object' images.  To avoid unnecessary 
+	// code duplication I've factored this out into a subroutine 
+	// that I call twice.
+	
+	*imageCountPtr = 0;
+	err = ImageListForTaskOldWithNames(
+		task, 
+		dyldImage, 
+		"_library_images", 
+		"_gdb_nlibrary_images", 
+		"_gdb_library_image_size", 
+		imageArray, 
+		imageArraySize, 
+		imageCountPtr
+	);
+	if (err == 0) {
+		err = ImageListForTaskOldWithNames(
+			task, 
+			dyldImage, 
+			"_object_images", 
+			"_gdb_nobject_images", 
+			"_gdb_object_image_size", 
+			imageArray, 
+			imageArraySize, 
+			imageCountPtr
+		);
+	}
+	
+	return err;
+}
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Exported Abstraction Layer
+
+static int SortByMachHeader(const void *lhs, const void *rhs)
+{
+    QTMAddr lhsAddr;
+    QTMAddr rhsAddr;
+ 
+    lhsAddr = QMOImageGetMachHeaderOffset(*((QMOImageRef *) lhs));
+    rhsAddr = QMOImageGetMachHeaderOffset(*((QMOImageRef *) rhs));
+
+    // Can't do this using the standard (lhsAddr - rhsAddr) trick because the 
+    // difference can be so big that it overflows an int, which is the type of 
+    // the return value.
+    
+    if (lhsAddr < rhsAddr) {
+        return  -1;
+    } else if (lhsAddr > rhsAddr) {
+        return  +1;
+    } else {
+        return 0;
+    }
+}
+
+extern void QMOImageListDestroy(QMOImageRef *imageArray, size_t imageArrayCount)
+	// See comments in header.
+{
+	uint32_t        imageIndex;
+
+	assert( (imageArray != NULL) || (imageArrayCount == 0) );
+
+    if (imageArray != NULL) {
+        for (imageIndex = 0; imageIndex < imageArrayCount; imageIndex++) {
+            QMOImageDestroy(imageArray[imageIndex]);
+            imageArray[imageIndex] = NULL;
+        }
+    }
+}
+
+bool kQMachOImageListTestOldDyldOnNew = false;
+	// By changing this variable you can test the old code when looking 
+	// at a new dyld.  For compatibility reasons, the new dyld continues 
+	// to support the old interface (at least for 32-bit PowerPC), so this 
+	// makes it possible to test the old code on 10.4, which makes life a lot 
+	// easier.
+    //
+    // This is exported for the benefit of the unit test.
+
+bool kQMachOImageListTestSelfShortCircuit = true;
+	// By changing this variable to false you can disable the short circuit that 
+    // we apply when targetting the local task.
+    //
+    // This is exported for the benefit of the unit test.
+
+extern int QMOImageListFromSelf(
+    QMOImageRef *   imageArray, 
+    size_t          imageArrayCount, 
+    size_t *        imageCountPtr
+)
+	// See comments in header.
+{
+    int             err;
+	uint32_t        imageIndex;
+
+	assert( (imageArray != NULL) || (imageArrayCount == 0) );
+	assert(imageCountPtr != NULL);
+    
+    // Blast the output array to NULL to aid in error recovery.
+    
+    if (imageArray != NULL) {
+        memset(imageArray, 0, imageArrayCount * sizeof(*imageArray));
+    }
+    
+    // Do the job.
+    
+    err = 0;
+	*imageCountPtr = _dyld_image_count();
+	for (imageIndex = 0; imageIndex < *imageCountPtr; imageIndex++) {
+        if ( (imageArray != NULL) && (imageIndex < imageArrayCount) ) {
+            const struct mach_header *  machHeader;
+            const char *                filePath;
+
+            machHeader = _dyld_get_image_header(imageIndex);
+            filePath   = _dyld_get_image_name(imageIndex);
+            // fprintf(stderr, "filePath = %s\n", filePath);
+
+            err = QMOImageCreateFromLocalImage(machHeader, filePath, &imageArray[imageIndex]);
+            if (err != 0) {
+                break;
+            }
+        }
+	}
+    if ( (err == 0) && (imageArray != NULL) ) {
+        qsort(imageArray, MIN(imageArrayCount, *imageCountPtr), sizeof(*imageArray), SortByMachHeader);
+    }
+    
+    // On error, destroy any partial results.
+    
+    if (err != 0) {
+        QMOImageListDestroy(imageArray, imageArrayCount);
+    }
+    
+    return err;
+}
+
+extern int QMOImageListFromTask(
+    task_t          task, 
+    cpu_type_t      cputype, 
+    QMOImageRef *   imageArray, 
+    size_t          imageArrayCount, 
+    size_t *        imageCountPtr
+)
+	// See comments in header.
+{
+	int			err;
+	
+	assert(task != MACH_PORT_NULL);
+	assert( (imageArray != NULL) || (imageArrayCount == 0) );
+	assert(imageCountPtr != NULL);
+	
+    if ( (task == mach_task_self()) && (cputype == QMOGetLocalCPUType()) && kQMachOImageListTestSelfShortCircuit ) {
+        err = QMOImageListFromSelf(imageArray, imageArrayCount, imageCountPtr);
+    } else {
+        QMOImageRef	dyldImage;
+        QTMAddr		allImageInfoAddr;
+
+        // Blast the output array to NULL to aid in error recovery.
+        
+        if (imageArray != NULL) {
+            memset(imageArray, 0, imageArrayCount * sizeof(*imageArray));
+        }
+
+        dyldImage = NULL;
+        
+        // The information about the prepared images within a task is published 
+        // in various global variables exported by dyld.  So, to start off, we 
+        // have to find the address of dyld in the remote task and then create 
+        // an QMOImage for it.
+        
+        err = QMOImageCreateFromTaskDyld(task, cputype, &dyldImage);
+        
+        // Now we look for the dyld_all_image_infos variable exported by dyld. 
+        // If it exists, we looking at a new dyld (10.4 and later), and we use 
+        // the new mechanism for finding the prepared images.  If it's not present, 
+        // we're looking at an old dyld and we use the old mechanism.
+        
+        if (err == 0) {
+            err = QMOImageLookupSymbol(dyldImage, "_dyld_all_image_infos", &allImageInfoAddr);
+            if ( ! kQMachOImageListTestOldDyldOnNew && (err == 0) ) {
+                err = ImageListForTaskNew(task, dyldImage, allImageInfoAddr, imageArray, imageArrayCount, imageCountPtr);
+            } else {
+                err = ImageListForTaskOld(task, dyldImage, imageArray, imageArrayCount, imageCountPtr);
+            }
+        }
+        if ( (err == 0) && (imageArray != NULL) ) {
+            qsort(imageArray, MIN(imageArrayCount, *imageCountPtr), sizeof(*imageArray), SortByMachHeader);
+        }
+
+        // Clean up.
+        
+        QMOImageDestroy(dyldImage);
+
+        // On error, destroy any partial results.
+        
+        if (err != 0) {
+            QMOImageListDestroy(imageArray, imageArrayCount);
+        }
+    }
+	
+	return err;
+}
diff --git a/lib/mac/QMachOImageList.h b/lib/mac/QMachOImageList.h
new file mode 100644
index 0000000..45a9a4b
--- /dev/null
+++ b/lib/mac/QMachOImageList.h
@@ -0,0 +1,260 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+/*
+ *  QMachOImageList.h
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QMachOImageList.h
+
+    Contains:   Code to get all Mach-O images within a task.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QMachOImageList.h,v $
+Revision 1.1  2007/03/02 12:20:25         
+First checked in.
+
+
+*/
+
+#ifndef _QMACHOIMAGELIST_H
+#define _QMACHOIMAGELIST_H
+
+/////////////////////////////////////////////////////////////////
+
+#include "QMachOImage.h"
+
+/////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+    extern "C" {
+#endif
+
+/*!
+    @header         QMachOImageList.h
+    
+    @abstract       Gets all Mach-O images within a process.
+
+    @discussion     This module provides routines to get all of the Mach-O images 
+                    from a process.  The intricacies of the implementation are covered 
+                    by the comments in the source.  The interface is, however, 
+                    quite clean.  There are two functions, one to get a list of 
+                    all of the images in the current process (QMOImageListFromSelf), 
+                    and another to get a list of the images in an arbitrary process.
+
+                    This module assumes that the state of the process you're 
+                    investigating is stable.  That is, when you ask the module to 
+                    create the process's image list, you need to guarantee that 
+                    the dyld state of the process does not change while this module 
+                    is looking at it.  The best way to prevent this from happening 
+                    is to suspend the process while you're accessing it.  The Mach 
+                    routine task_suspend is very useful in this situation.
+*/
+
+/*!
+    @function       QMOImageListFromSelf
+    
+    @abstract       Returns a list of Mach-O images in the current process.
+    
+    @discussion     Just like QMOImageListForTask except that it returns the 
+                    image list for the current task.
+
+                    The implementation of this routine is much less scary than 
+                    that of QMOImageListForTask.
+
+    @param imageArray
+                    May be NULL only if imageArrayCount is 0.  If not NULL, 
+                    it must point to an array of imageArrayCount elements. 
+                    On success, the array holds references to up to imageArrayCount 
+                    image objects.  On error, each element of the array will 
+                    be NULL.
+
+    @param imageArrayCount
+                    The size of the array pointed to by imageArray.  May be 
+                    zero.
+                    
+    @param imageArrayCountPtr
+                    Must not be NULL.  On entry, the value of *imageArrayCountPtr 
+                    is ignored.  On success, *imageArrayCountPtr is the number of 
+                    images in the target process.  On error, *imageArrayCountPtr is 
+                    undefined.
+                    
+                    IMPORTANT: The value returned in *imageArrayCountPtr may be 
+                    larger than imageArrayCount.  That means that the imageArray 
+                    was not big enough to hold all of the images in the target 
+                    process.  You can use the value in *imageArrayCountPtr to 
+                    grow the array and thus get all of the images.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QMOImageListFromSelf(
+    QMOImageRef *   imageArray, 
+    size_t          imageArrayCount, 
+    size_t *        imageCountPtr
+);
+
+/*!
+    @function       QMOImageListFromTask
+    
+    @abstract       Returns a list of Mach-O images for an arbitrary process.
+    
+    @discussion     Returns a list of Mach-O images for the specified process.
+        
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the task whose images you want; mach_task_self is 
+                    just fine.
+                    
+                    If you do pass in mach_task_self, this routine acts like you'd 
+                    called QMOImageListFromSelf.  This automatically enables some 
+                    nice optimisations.
+                    
+    @param cputype  The CPU type of the dynamic linker from which you want to get 
+                    the image list.  Typically you would pass CPU_TYPE_ANY to use 
+                    the first dynamic linker that's discovered.  See 
+                    QMOImageCreateFromTaskDyld for a detailed discussion of this 
+                    value.
+
+    @param imageArray
+                    May be NULL only if imageArrayCount is 0.  If not NULL, 
+                    it must point to an array of imageArrayCount elements. 
+                    On success, the array holds references to up to imageArrayCount 
+                    image objects.  On error, each element of the array will 
+                    be NULL.
+
+    @param imageArrayCount
+                    The size of the array pointed to by imageArray.  May be 
+                    zero.
+                    
+    @param imageArrayCountPtr
+                    Must not be NULL.  On entry, the value of *imageArrayCountPtr 
+                    is ignored.  On success, *imageArrayCountPtr is the number of 
+                    images in the target process.  On error, *imageArrayCountPtr is 
+                    undefined.
+                    
+                    IMPORTANT: The value returned in *imageArrayCountPtr may be 
+                    larger than imageArrayCount.  That means that the imageArray 
+                    was not big enough to hold all of the images in the target 
+                    process.  You can use the value in *imageArrayCountPtr to 
+                    grow the array and thus get all of the images.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QMOImageListFromTask(
+    task_t          task, 
+    cpu_type_t      cputype, 
+    QMOImageRef *   imageArray, 
+    size_t          imageArrayCount, 
+    size_t *        imageCountPtr
+);
+
+/*!
+    @function       QMOImageListDestroy
+    
+    @abstract       Destroys an array of image objects.
+    
+    @discussion     Destroys an array of image objects.  Calls QMOImageDestroy 
+                    for each element of the array.  Because QMOImageDestroy does 
+                    nothing if its parameter is NULL, it's safe for elements of 
+                    the array to be NULL.
+
+    @param imageArray
+                    May be NULL only if imageArrayCount is 0.  If not NULL, it 
+                    must point to an array of imageArrayCount elements.
+
+    @param imageArrayCount
+                    The size of the array pointed to by imageArray.  May be 
+                    zero.
+*/
+extern void QMOImageListDestroy(QMOImageRef *imageArray, size_t imageArrayCount);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/mac/QSymbols.c b/lib/mac/QSymbols.c
new file mode 100644
index 0000000..30f1b1b
--- /dev/null
+++ b/lib/mac/QSymbols.c
@@ -0,0 +1,1000 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/*
+ *  QSymbols.c
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QSymbols.c
+
+    Contains:   Code for symbols to addresses and vice versa.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QSymbols.c,v $
+Revision 1.2  2007/03/02 13:00:51         
+Fix an error handling bug in the creation code.
+
+Revision 1.1  2007/03/02 12:20:29         
+First checked in.
+
+
+*/
+
+/////////////////////////////////////////////////////////////////
+
+// Our Prototypes
+#include "config.h"
+#include "QSymbols.h"
+
+// Mac OS Interfaces
+
+#include <assert.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <mach-o/nlist.h>
+#include <mach-o/arch.h>
+
+// Project interfaces
+
+#include "QMachOImage.h"
+#include "QMachOImageList.h"
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Performance Notes
+
+/*
+    I'm currently not happy with the performance characteristics of this module. 
+    There are /way/ too many linear searches for my liking.  However, there are a 
+    number of reasons I implemented it this way.  In no particular order, these are:
+    
+      o In general I believe in the principle of "make it work, then make it 
+        go fast".  To that end, I've specifically designed the module to allow 
+        for future optimisation.
+        
+      o The current performance isn't too bad.  While there's lots of linear 
+        algorithms, the data structures that we're operating on are all cached 
+        in client-side memory, so there's very little IPC cost.
+    
+      o If and when I write the optimised code, it will be nice to have the  
+        simple code around for testing.  That is, I'll be able to automatically 
+        test the new code by comparing its results to the old code.
+        
+      o This is sample code.  I've already spent way too much time on this, and 
+        writing the optimised version of the code would consume even more time.
+        optimising
+    
+      o The overall goal of this project is to provide infrastructure for crash 
+        reporting; crash reporting is not, in general, time sensitive.
+        
+    The way I'd make this go fast are as follows:
+    
+      o Don't do anything more on QSymbolsRef creation.  Rather, create the 
+        'go faster' data structures when the first address-to-symbol or 
+        symbol-to-address operation is done.  This is because the type of 
+        data structure you want is different for each operation, and you don't 
+        want to spend the time creating the data structures for both types 
+        if the client is only going to use one.
+        
+      o The address-to-symbol optimising data structure would consist of a 
+        sorted array of section starts.  This would be created lazily when the 
+        first address-to-symbol operation is done.  You could binary search 
+        this to find the section containing the address.  Then, for each section, 
+        you would (lazily) create an array of symbols sorted by their start 
+        address.  So you could binary search that to find the best symbol.
+        
+        This would make QSymGetSymbolForAddress O(log2 n) + O(log2 m), where 
+        n is the number of sections and m is the number of symbols within a 
+        section.
+      
+      o The symbol-to-address optimising data structure would start with a 
+        hash table that maps library names to image objects.  For each image 
+        object, there would be another hash table to map symbols to addresses.
+
+        This would make a QSymGetAddressForSymbol call to look up a symbol with 
+        a particular library O(1).  It would make a flat namespace lookup O(n), 
+        where n is the number of images.  You could further reduce that to O(1) 
+        by creating a global hash table for all symbols from all libraries.
+        
+      o These two data structures would also support an O(1) implementation of 
+        QSymGetNextSymbol.
+*/
+
+/////////////////////////////////////////////////////////////////
+
+// In the QSymbols data structure, we record the index of the image for dyld 
+// and the main executable.  We initialise these indexes to kQSymBadImageIndex so 
+// we can tell whether we've found the corresponding image.
+
+enum {
+    kQSymBadImageIndex = (size_t) -1
+};
+
+// QMOImage represents all of the symbols with a process.  It's the backing for 
+// the exported QSymbolsRef type.
+
+struct QSymbols {
+    task_t          task;               // target task
+    bool            didSuspend;         // true if we suspended the target task
+    size_t          imageCount;         // size of images array
+    QMOImageRef *   images;             // pointer to images array
+    size_t          execIndex;          // index of main executable in images array
+    size_t          dyldIndex;          // index of dyld in images array
+};
+typedef struct QSymbols QSymbols;
+
+#if ! defined(NDEBUG)
+
+    static bool QSymIsValid(QSymbolsRef symRef)
+        // Returns true if symRef references a valid QSymbols data structure.
+    {
+        bool        valid;
+        size_t      imageIndex;
+        
+        valid = (symRef != NULL)
+             && (symRef->imageCount > 0)
+             && (symRef->images != NULL)
+             && ( (symRef->execIndex == kQSymBadImageIndex) || (symRef->execIndex < symRef->imageCount) )
+             && ( (symRef->dyldIndex == kQSymBadImageIndex) || (symRef->dyldIndex < symRef->imageCount) );
+        if (valid) {
+            for (imageIndex = 0; imageIndex < symRef->imageCount; imageIndex++) {
+                if ( symRef->images[imageIndex] == NULL ) {
+                    valid = false;
+                }
+            }
+        }
+        
+        return valid;
+    }
+
+#endif
+
+extern void QSymDestroy(QSymbolsRef symRef)
+    // See comment in header.
+{
+    kern_return_t   krJunk;
+    size_t          imageIndex;
+    
+    if (symRef != NULL) {
+        if (symRef->images != NULL) {
+            for (imageIndex = 0; imageIndex < symRef->imageCount; imageIndex++) {
+                QMOImageDestroy(symRef->images[imageIndex]);
+            }
+            free(symRef->images);
+        }
+        if (symRef->didSuspend) {
+            krJunk = task_resume(symRef->task);
+            assert(krJunk == KERN_SUCCESS);
+        }
+        free(symRef);
+    }
+}
+
+extern int QSymCreateFromTask(
+    task_t              task,
+    bool                suspend,
+    cpu_type_t          cputype,
+    QSymbolsRef *       symRefPtr
+)
+    // See comment in header.
+{
+    int             err;
+    kern_return_t   kr;
+    QSymbolsRef     symRef;
+    size_t          imageIndex;
+    
+    assert(task != MACH_PORT_NULL);
+    assert( symRefPtr != NULL);
+    assert(*symRefPtr == NULL);
+
+	symRef = NULL;
+	
+    // Basic initialisation.  This includes getting the image list from the task.
+    
+    err = 0;
+    if ( (task == mach_task_self()) && suspend ) {
+        err = EINVAL;
+    }
+    if (err == 0) {
+        symRef = (QSymbolsRef) calloc(1, sizeof(*symRef));
+        if (symRef == NULL) {
+            err = ENOMEM;
+        }
+    }
+    if (err == 0) {
+        symRef->task      = task;
+        symRef->execIndex = kQSymBadImageIndex;
+        symRef->dyldIndex = kQSymBadImageIndex;
+        
+        if (suspend) {
+            kr = task_suspend(symRef->task);
+            err = QTMErrnoFromMachError(kr);
+            
+            symRef->didSuspend = (err == 0);
+        }
+    }
+    if (err == 0) {
+        err = QMOImageListFromTask(task, cputype, NULL, 0, &symRef->imageCount);
+    }
+    if (err == 0) {
+        symRef->images = (QMOImageRef *) calloc(symRef->imageCount, sizeof(*symRef->images));
+        if (symRef->images == NULL) {
+            err = ENOMEM;
+        }
+    }
+    if (err == 0) {
+        err = QMOImageListFromTask(task, cputype, symRef->images, symRef->imageCount, &symRef->imageCount);
+    }
+    
+    // Search for dyld and the main executable.
+    
+    if (err == 0) {
+        for (imageIndex = 0; imageIndex < symRef->imageCount; imageIndex++) {
+            int32_t fileType;
+            
+            fileType = QMOImageGetFileType(symRef->images[imageIndex]);
+            switch (fileType) {
+                case MH_EXECUTE:
+                    assert(symRef->execIndex == kQSymBadImageIndex);
+                    symRef->execIndex = imageIndex;
+                case MH_DYLINKER:
+                    assert(symRef->dyldIndex == kQSymBadImageIndex);
+                    symRef->dyldIndex = imageIndex;
+                    break;
+                default:
+                    // do nothing
+                    break;
+            }
+        }
+    }
+
+    // Clean up.
+    
+    if (err != 0) {
+        QSymDestroy(symRef);
+        symRef = NULL;
+    }
+    *symRefPtr = symRef;
+
+    assert( (err == 0) == (*symRefPtr != NULL) );
+    
+    return err;
+}
+
+extern int QSymCreateFromSelf(
+    QSymbolsRef *       symRefPtr
+)
+    // See comment in header.
+{
+    // All of the infrastructure that QSymCreateFromTask uses (specifically, 
+    // QMOImageListFromTask and QMOImageCreateFromTask) has a short circuit 
+    // implementation when task is mach_task_self.  So we can just call that 
+    // routine with mach_task_self and be assured that we'll get the simple 
+    // implementation.
+
+    // We have to pass in the local CPU type (from QMOGetLocalCPUType), not 
+    // CPU_TYPE_ANY.  Otherwise, if we're being run using Rosetta, there's a chance 
+    // we might find the native dyld rather than the PowerPC one.  If that happens, 
+    // we end up looking at the wrong list of Mach-O images, and things go south 
+    // quickly.
+
+    return QSymCreateFromTask(mach_task_self(), false, QMOGetLocalCPUType(), symRefPtr);
+}
+
+extern QMOImageRef QSymGetDyldImage(QSymbolsRef symRef)
+    // See comment in header.
+{
+    QMOImageRef result;
+    
+    assert( QSymIsValid(symRef) );
+
+    result = NULL;
+    if (symRef->dyldIndex != kQSymBadImageIndex) {
+        result = symRef->images[symRef->dyldIndex];
+    }
+    return result;
+}
+
+extern QMOImageRef QSymGetExecutableImage(QSymbolsRef symRef)
+    // See comment in header.
+{
+    QMOImageRef result;
+    
+    assert( QSymIsValid(symRef) );
+
+    result = NULL;
+    if (symRef->execIndex != kQSymBadImageIndex) {
+        result = symRef->images[symRef->execIndex];
+    }
+    return result;
+}
+
+extern void QSymGetImages(
+    QSymbolsRef     symRef, 
+    QMOImageRef **  imageArrayPtr, 
+    size_t *        imageCountPtr
+)
+    // See comment in header.
+{
+    assert( QSymIsValid(symRef) );
+    assert(imageArrayPtr != NULL);
+    assert(imageCountPtr != NULL);
+    
+    *imageArrayPtr = symRef->images;
+    *imageCountPtr = symRef->imageCount;
+}
+
+static int SymbolToAddressCallback(
+	QMOImageRef		qmoImage, 
+	const char *	name,
+	uint8_t			type,
+	uint8_t			sect,
+	uint16_t		desc,
+	QTMAddr			value,
+	void *			iteratorRefCon,
+	bool *			stopPtr
+)
+    // The QMOImageIterateSymbols callback for QSymGetAddressForSymbol.  See
+    // See QMOSymbolIteratorProc for a description of the parameters.
+    //
+    // iteratorRefCon is a pointer to a QSymSymbolInfo structure.  Initially, 
+    // only the symbolName field is valid.  If this routine finds a matching 
+    // symbol, it sets up the symbolType, symbolName, symbolImage, and symbolValue 
+    // fields. 
+    // 
+    // IMPORTANT: We set symbolInfo->symbolName to "name" because the initial 
+    // value of symbolName comes from the client, so the lifetime of the referenced 
+    // memory is undefined.  However, our "name" input parameter comes from the 
+    // QMOImageRef object, so it persists until that object is destroy, which 
+    // only happens when the QSymbolsRef object is destroyed.
+{
+    #pragma unused(sect, desc)
+	int             err;
+	QSymSymbolInfo * symbolInfo;
+
+	assert(qmoImage != NULL);
+    assert(name != NULL);
+    assert( stopPtr != NULL);
+    assert(*stopPtr == false);
+
+	err = 0;
+
+    // Ignore debugger symbols.
+    
+	if ( ! (type & N_STAB) ) {
+		symbolInfo = (QSymSymbolInfo *) iteratorRefCon;
+	
+        // Do the names match.
+        
+		if ( strcmp(name, symbolInfo->symbolName) == 0 ) {
+        
+            // If so, check that it's one of our supported types and, if so, 
+            // set up the output structure.
+            
+			switch (type & N_TYPE) {
+				case N_ABS:
+                    symbolInfo->symbolType   = (type & N_EXT) ? kQSymDyldPublicSymbol : kQSymDyldPrivateSymbol;
+                    symbolInfo->symbolImage  = qmoImage;
+                    symbolInfo->symbolName   = name;
+					symbolInfo->symbolValue  = value;
+					*stopPtr = true;
+					break;
+				case N_SECT:
+                    symbolInfo->symbolType   = (type & N_EXT) ? kQSymDyldPublicSymbol : kQSymDyldPrivateSymbol;
+                    symbolInfo->symbolImage  = qmoImage;
+                    symbolInfo->symbolName   = name;
+					symbolInfo->symbolValue  = value + QMOImageGetSlide(qmoImage);
+					*stopPtr = true;
+					break;
+			}
+		}
+	}
+	return err;
+}
+
+extern char *   QSymCreateLibraryNameWithSuffix(const char *libraryName, const char *suffix);
+    // I need to export this for the benefit of the test program.  So it isn't 
+    // in a header, but it is "extern".
+
+extern char *   QSymCreateLibraryNameWithSuffix(const char *libraryName, const char *suffix)
+    // Add the suffix (for example, "_debug") to the library name (for example, 
+    // "/usr/lib/libSystem.B_debug.dylib").  Place the suffix before the extension 
+    // if there is one.
+{
+    const char *    nameStart;
+    const char *    lastDot;
+    size_t          libraryNameLen;
+    const char *    extension;
+    char *          result;
+    
+    assert(libraryName != NULL);
+    assert(suffix != NULL);
+    
+    nameStart = strrchr(libraryName, '/');
+    if (nameStart == NULL) {
+        nameStart = libraryName;
+    } else {
+        nameStart += 1;
+    }
+    lastDot   = strrchr(nameStart, '.');
+    
+    // Default to just concatenating the suffix.
+    
+    libraryNameLen = strlen(libraryName);
+    extension      = "";
+    
+    // If there's an extensiont, break the string at the dot and place the suffix 
+    // between the two.
+    
+    if (lastDot != NULL) {
+        libraryNameLen = lastDot - libraryName;
+        extension      = lastDot;
+    }
+    
+    result = NULL;
+    asprintf(&result, "%.*s%s%s", (int) libraryNameLen, libraryName, suffix, extension);
+    return result;
+}
+
+extern int QSymGetAddressForSymbol(
+    QSymbolsRef         symRef,
+    const char *        libraryName,
+    const char *        symbolName,
+    QSymSymbolInfo *    symbolInfo
+)
+    // See comment in header.
+{
+    int         err;
+    size_t      imageIndex;
+    size_t      imageIndexStart;
+    size_t      imageIndexLimit;
+    
+    assert( QSymIsValid(symRef) );
+    // libraryName may be NULL
+    assert(symbolName != NULL);
+    assert(symbolInfo != NULL);
+    
+    // First find the library to search, if any.  We first try with no suffix, 
+    // then with the _debug and _profile suffixes.
+    
+    err = 0;
+    imageIndexStart = 0;
+    imageIndexLimit = symRef->imageCount;
+    if (libraryName != NULL) {
+        static const char * kSuffixes[] = { "", "_debug", "_profile", NULL };
+        size_t suffixIndex;
+        
+        suffixIndex = 0;
+        do {
+            char *      libraryNameWithSuffix;
+            
+            libraryNameWithSuffix = QSymCreateLibraryNameWithSuffix(libraryName, kSuffixes[suffixIndex]);
+            if (libraryNameWithSuffix == NULL) {
+                err = ENOMEM;
+            }
+            
+            if (err == 0) {
+                for (imageIndex = 0; imageIndex < symRef->imageCount; imageIndex++) {
+                    const char *    thisImageName;
+                    
+                    thisImageName = QMOImageGetLibraryID(symRef->images[imageIndex]);
+                    if ( (thisImageName != NULL) && (strcmp(thisImageName, libraryNameWithSuffix) == 0) ) {
+                        break;
+                    }
+                }
+                if (imageIndex == symRef->imageCount) {
+                    err = ESRCH;
+                } else {
+                    imageIndexStart = imageIndex;
+                    imageIndexLimit = imageIndex + 1;
+                }
+            }
+            
+            free(libraryNameWithSuffix);
+            
+            suffixIndex += 1;
+        } while ( (err == ESRCH) && (kSuffixes[suffixIndex] != NULL) );
+    }
+
+    // Within the range of libraries specified by imageIndexStart and imageIndexLimit, 
+    // search for the symbol.
+    
+    if (err == 0) {
+        memset(symbolInfo, 0, sizeof(*symbolInfo));
+        symbolInfo->symbolType  = kQSymNoSymbol;
+        symbolInfo->symbolName  = symbolName;
+
+        for (imageIndex = imageIndexStart; imageIndex < imageIndexLimit; imageIndex++) {
+            err = QMOImageIterateSymbols(symRef->images[imageIndex], SymbolToAddressCallback, symbolInfo);
+            if ( (err != 0) || (symbolInfo->symbolType != kQSymNoSymbol) ) {
+                break;
+            }
+        }
+        if ( (err == 0) && (symbolInfo->symbolType == kQSymNoSymbol) ) {
+            err = ESRCH;
+        }
+    }
+    
+    // Clean up if there's any failure.
+    
+    if (err != 0) {
+        memset(symbolInfo, 0, sizeof(*symbolInfo));
+        symbolInfo->symbolType  = kQSymNoSymbol;
+    }
+    
+    // Post-conditions
+    
+    assert( (err == 0) == (symbolInfo->symbolType != kQSymNoSymbol) );
+    assert( (symbolInfo->symbolType != kQSymNoSymbol) == (symbolInfo->symbolImage != NULL) );
+    assert( (symbolInfo->symbolType != kQSymNoSymbol) == (symbolInfo->symbolName  != NULL) );
+    assert(symbolInfo->symbolOffset == 0);      // for sym -> addr lookup, offset always zero
+    
+    return err;
+}
+
+extern int QSymGetAddressesForSymbols(
+    QSymbolsRef         symRef,
+    size_t              count,
+    const char *        libraryNames[],
+    const char *        symbolNames[],
+    QSymSymbolInfo      symbolInfos[]
+)
+    // See comment in header.
+{
+    int         err;
+    size_t      symbolIndex;
+    
+    assert( QSymIsValid(symRef) );
+    assert(count > 0);
+    // libraryNames may be NULL
+    assert(symbolNames != NULL);
+    for (symbolIndex = 0; symbolIndex < count; symbolIndex++) {
+        assert(symbolNames[symbolIndex] != NULL);
+    }
+    assert(symbolInfos != NULL);
+
+    // The current implementation is very naive.  I could definitely make this 
+    // faster, but see my "Performance Notes" comment at the top of this file.
+    
+    err = 0;
+    for (symbolIndex = 0; symbolIndex < count; symbolIndex++) {
+        const char *    thisLib;
+
+        if (libraryNames == NULL) {
+            thisLib = NULL;
+        } else {
+            thisLib = libraryNames[symbolIndex];
+        }
+        (void) QSymGetAddressForSymbol(symRef, thisLib, symbolNames[symbolIndex], &symbolInfos[symbolIndex]);
+    }
+    
+    return err;
+}
+
+extern int QSymGetImageForAddress(
+	QSymbolsRef		symRef, 
+	QTMAddr			addr,
+	QMOImageRef *	qmoImagePtr, 
+	uint32_t *		sectIndexPtr
+)
+    // See comment in header.
+{
+	int					err;
+	int                 junk;
+	size_t              imageIndex;
+	QTMAddr             slide;
+	uint32_t            sectCount;
+	uint32_t            sectIndex;
+	struct section_64	sect;
+	bool                found;
+	
+	assert( QSymIsValid(symRef) );
+	assert( qmoImagePtr != NULL );
+	// sectIndexPtr may be NULL
+    
+	// Iterate through the libraries looking for the section that contains the address.
+
+    found = false;
+    for (imageIndex = 0; imageIndex < symRef->imageCount; imageIndex++) {
+        slide = QMOImageGetSlide(symRef->images[imageIndex]);
+        
+        sectCount = QMOImageGetSectionCount(symRef->images[imageIndex]);
+        
+        for (sectIndex = 0; sectIndex < sectCount; sectIndex++) {
+            junk = QMOImageGetSectionByIndex(symRef->images[imageIndex], sectIndex, &sect);
+            assert(junk == 0);
+            
+            if ( (strcmp(sect.segname, "__TEXT") == 0) || (strcmp(sect.segname, "__DATA") == 0) ) {
+                found = (addr >= (sect.addr + slide)) && (addr < (sect.addr + slide + sect.size));
+                if ( found ) {
+					*qmoImagePtr = symRef->images[imageIndex];
+					if (sectIndexPtr != NULL) {
+						*sectIndexPtr = sectIndex;
+					}
+					found = true;
+                    break;
+                }
+            }
+        }
+        if ( found ) {
+            break;
+        }
+    }
+	if (found) {
+		err = 0;
+	} else {
+		err = ESRCH;
+	}
+	
+	assert( (err != 0) || (*qmoImagePtr != NULL) );
+	
+	return err;
+}
+
+// AddressToSymbolContext is the parameter block passed to AddressToSymbolCallback 
+// via its iteratorRefCon.
+
+struct AddressToSymbolContext {
+    QTMAddr         requiredAddr;
+    uint8_t         requiredSect;
+    const char *    currentSymbol;
+    uint8_t         currentSymbolType;
+    QTMAddr         currentSymbolValue;
+    QTMOffset       currentOffset;
+};
+typedef struct AddressToSymbolContext AddressToSymbolContext;
+
+static int AddressToSymbolCallback(
+	QMOImageRef		qmoImage, 
+	const char *	name,
+	uint8_t			type,
+	uint8_t			sect,
+	uint16_t		desc,
+	QTMAddr			value,
+	void *			iteratorRefCon,
+	bool *			stopPtr
+)
+    // The QMOImageIterateSymbols callback for QSymGetSymbolForAddress.  See
+    // See QMOSymbolIteratorProc for a description of the parameters.
+    //
+    // iteratorRefCon is a pointer to a AddressToSymbolContext structure.  Initially, 
+    // the requiredSect, requiredAddr, and currentOffset fields are valid.  As 
+    // this routine finds better matching symbols, it fills out currentSymbol, 
+    // currentSymbolType, and currentSymbolValue, and adjusts currentOffset.  
+    // In this way, currentOffset slowly decreases until, after all symbols 
+    // have been considered, AddressToSymbolContext contains the best match.
+{
+    #pragma unused(desc)
+	int                         err;
+	AddressToSymbolContext *    iterContext;
+    QTMAddr                     symValue;
+    QTMOffset                   symOffset;
+
+	assert(qmoImage != NULL);
+    assert(name != NULL);
+    assert( stopPtr != NULL);
+    assert(*stopPtr == false);
+
+	err = 0;
+
+    // Ignore debugger symbols.
+
+	if ( ! (type & N_STAB) ) {
+		iterContext = (AddressToSymbolContext *) iteratorRefCon;
+		
+        // Check that it's a section-based symbol within our section.
+        
+        if ( ((type & N_TYPE) == N_SECT) && (sect == iterContext->requiredSect) ) {
+        
+            // Check that it's a better match than our current symbol.
+            
+            symValue  = value + QMOImageGetSlide(qmoImage);
+            symOffset = (iterContext->requiredAddr - symValue);
+            if ( (symValue <= iterContext->requiredAddr) && (symOffset < iterContext->currentOffset) ) {
+            
+                // If it is, record the name of the symbol and its offset.
+                
+                iterContext->currentSymbol      = name;
+                iterContext->currentSymbolType  = type;
+                iterContext->currentSymbolValue = symValue;
+                iterContext->currentOffset      = symOffset;
+            }
+        }
+	}
+	return err;
+}
+
+extern int QSymGetSymbolForAddress(
+    QSymbolsRef         symRef,
+    QTMAddr             addr,
+    QSymSymbolInfo *    symbolInfo
+)
+    // See comment in header.
+{
+    int                 err;
+	QMOImageRef			qmoImage;
+    uint32_t            sectIndex;
+    struct section_64   sect;
+    
+    assert( QSymIsValid(symRef) );
+    assert(symbolInfo != NULL);
+    
+    memset(symbolInfo, 0, sizeof(*symbolInfo));
+    symbolInfo->symbolType = kQSymNoSymbol;
+
+	// Find the section and then get its information.
+	
+    err = QSymGetImageForAddress(symRef, addr, &qmoImage, &sectIndex);
+	if (err == 0) {
+		err = QMOImageGetSectionByIndex(qmoImage, sectIndex, &sect);
+	}
+	
+    // Within that image, iterate through the symbols that are relative to the 
+    // section we found and that closest match the address.
+
+    if (err == 0) {
+        AddressToSymbolContext  iterContext;
+        
+        iterContext.requiredAddr  = addr;
+        iterContext.requiredSect  = sectIndex + 1;  // sect is one-based in QMOImageIterateSymbols callback
+        iterContext.currentSymbol      = NULL;
+        iterContext.currentSymbolType  = 0;
+        iterContext.currentSymbolValue = 0;
+        iterContext.currentOffset      = sect.size;
+        
+        err = QMOImageIterateSymbols(qmoImage, AddressToSymbolCallback, &iterContext);
+        
+        if (err == 0) {
+            if (iterContext.currentSymbol == NULL) {
+                err = ESRCH;
+            } else {
+                symbolInfo->symbolType   = (iterContext.currentSymbolType & N_EXT) ? kQSymDyldPublicSymbol : kQSymDyldPrivateSymbol;
+                symbolInfo->symbolImage  = qmoImage;
+                symbolInfo->symbolName   = iterContext.currentSymbol;
+                symbolInfo->symbolValue  = iterContext.currentSymbolValue;
+                symbolInfo->symbolOffset = iterContext.currentOffset;
+            }
+        }
+    }
+    
+    assert( (err == 0) == (symbolInfo->symbolType != kQSymNoSymbol) );
+    assert( (symbolInfo->symbolType != kQSymNoSymbol) == (symbolInfo->symbolImage != NULL) );
+    assert( (symbolInfo->symbolType != kQSymNoSymbol) == (symbolInfo->symbolName  != NULL) );
+    
+    return err;
+}
+
+extern int QSymGetSymbolsForAddresses(
+    QSymbolsRef         symRef,
+    size_t              count,
+    QTMAddr             addrs[],
+    QSymSymbolInfo      symbolInfos[]
+)
+    // See comment in header.
+{
+    int     err;
+    size_t  addrIndex;
+    
+    assert( QSymIsValid(symRef) );
+    assert(count > 0);
+    assert(addrs != NULL);
+    assert(symbolInfos != NULL);
+    
+    // The current implementation is very naive.  I could definitely make this 
+    // faster, but see my "Performance Notes" comment at the top of this file.
+
+    err = 0;
+    for (addrIndex = 0; addrIndex < count; addrIndex++) {
+        (void) QSymGetSymbolForAddress(symRef, addrs[addrIndex], &symbolInfos[addrIndex]);
+    }
+    return err;
+}
+
+// NextSymbolContext is the parameter block passed to NextSymbolCallback 
+// via its iteratorRefCon.
+
+struct NextSymbolContext {
+    QTMAddr         requiredAddr;
+    const char *    currentSymbol;
+    uint8_t         currentSymbolType;
+    QTMAddr         currentSymbolValue;
+    QTMOffset       currentOffset;
+};
+typedef struct NextSymbolContext NextSymbolContext;
+
+static int NextSymbolCallback(
+	QMOImageRef		qmoImage, 
+	const char *	name,
+	uint8_t			type,
+	uint8_t			sect,
+	uint16_t		desc,
+	QTMAddr			value,
+	void *			iteratorRefCon,
+	bool *			stopPtr
+)
+    // The QMOImageIterateSymbols callback for QSymGetSymbolForAddress.  See
+    // See QMOSymbolIteratorProc for a description of the parameters.
+    //
+    // iteratorRefCon is a pointer to a NextSymbolContext structure.  Initially, 
+    // the requiredAddr and currentOffset fields are valid.  As this routine 
+    // finds better matching symbols, it fills out currentSymbol, 
+    // currentSymbolType, and currentSymbolValue, and adjusts currentOffset.  
+    // In this way, currentOffset slowly decreases until, after all symbols 
+    // have been considered, NextSymbolContext contains the symbol immediately 
+    // following the one at requiredAddr.
+{
+    #pragma unused(sect, desc)
+	int                 err;
+	NextSymbolContext * iterContext;
+    QTMAddr             symValue;
+    QTMOffset           symOffset;
+
+	assert(qmoImage != NULL);
+    assert(name != NULL);
+    assert( stopPtr != NULL);
+    assert(*stopPtr == false);
+
+	err = 0;
+
+    // Ignore debugger symbols.
+
+	if ( ! (type & N_STAB) ) {
+		iterContext = (NextSymbolContext *) iteratorRefCon;
+		
+        // Check that it's a section-based symbol.  Don't want to get confused by 
+        // undefined symbols (N_UNDF) or absolute symbols (N_ABS) or any other 
+        // symbol type for that matter.
+        
+        if (((type & N_TYPE) == N_SECT)) {
+
+            // Check that it's a better match than our current symbol.
+            
+            symValue  = value + QMOImageGetSlide(qmoImage);
+            symOffset = (symValue - iterContext->requiredAddr);
+            if ( (symValue > iterContext->requiredAddr) && (symOffset < iterContext->currentOffset) ) {
+            
+                // If it is, record the name of the symbol and its offset.
+                
+                iterContext->currentSymbol      = name;
+                iterContext->currentSymbolType  = type;
+                iterContext->currentSymbolValue = symValue;
+                iterContext->currentOffset      = symOffset;
+            }
+        }
+	}
+	return err;
+}
+
+extern int QSymGetNextSymbol(
+    QSymbolsRef             symRef,
+    const QSymSymbolInfo *  symbol,
+    QSymSymbolInfo *        nextSymbol
+)
+    // See comment in header.
+{
+    int                 err;
+    NextSymbolContext   iterContext;
+
+    assert( QSymIsValid(symRef) );
+    assert(symbol->symbolType  != kQSymNoSymbol);
+    assert(symbol->symbolImage != NULL);
+    assert(symbol->symbolName  != NULL);
+    // I use symbol->symbolValue but I can't think of any meaningful validity checks.
+    
+    // Iterate all of the symbols in the image looking for the one that's closet 
+    // to symbol->symbolValue.  Set currentOffset to a very large number so that 
+    // any symbol greater than symbol->symbolValue is considered closer.
+    
+    iterContext.requiredAddr       = symbol->symbolValue;
+    iterContext.currentSymbol      = NULL;
+    iterContext.currentSymbolType  = 0;
+    iterContext.currentSymbolValue = 0;
+    iterContext.currentOffset      = (QTMAddr) -1;
+
+    err = QMOImageIterateSymbols(symbol->symbolImage, NextSymbolCallback, &iterContext);
+    if (err == 0) {
+        if (iterContext.currentSymbol == NULL) {
+            err = ESRCH;
+        } else {
+            nextSymbol->symbolType   = (iterContext.currentSymbolType & N_EXT) ? kQSymDyldPublicSymbol : kQSymDyldPrivateSymbol;
+            nextSymbol->symbolImage  = symbol->symbolImage;
+            nextSymbol->symbolName   = iterContext.currentSymbol;
+            nextSymbol->symbolValue  = iterContext.currentSymbolValue;
+            nextSymbol->symbolOffset = iterContext.currentOffset;
+        }
+    }
+    
+    assert( (err == 0) == (nextSymbol->symbolType != kQSymNoSymbol) );
+    
+    return err;
+}
diff --git a/lib/mac/QSymbols.h b/lib/mac/QSymbols.h
new file mode 100644
index 0000000..6419b3b
--- /dev/null
+++ b/lib/mac/QSymbols.h
@@ -0,0 +1,722 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+/*
+ *  QSymbols.h
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QSymbols.h
+
+    Contains:   Code for symbols to addresses and vice versa.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QSymbols.h,v $
+Revision 1.1  2007/03/02 12:20:33         
+First checked in.
+
+
+*/
+
+#ifndef _QTASKSYMBOLS_H
+#define _QTASKSYMBOLS_H
+
+/////////////////////////////////////////////////////////////////
+
+// Mac OS Interfaces
+
+#include <stdint.h>
+#include <stdlib.h>
+
+// Put <mach/mach.h> inside extern "C" guards for the C++ build 
+// because the Mach header files don't always have them.
+
+#if defined(__cplusplus)
+	extern "C" {
+#endif
+
+#include <mach/mach.h>
+
+#if defined(__cplusplus)
+	}
+#endif
+
+// Our interfaces
+
+#include "QMachOImage.h"
+
+/////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*!
+    @header         QTaskSymbols.h
+    
+    @abstract       Code for symbol to address conversion, and vice versa.
+
+    @discussion     This module provides an abstraction layer for mapping symbols 
+                    to addresses, and vice versa, within a particular process.  To 
+                    map symbols within a process, first create a symbols object 
+                    (QTaskSymRef) from either the current process (QSymCreateFromSelf) 
+                    or an arbitrary process (QSymCreateFromTask).
+                    
+                    You can then call (QSymGetAddressForSymbol) to map a symbol to an 
+                    address or (QSymGetSymbolForAddress) to map an address to a symbol.  
+                    There are also bulk versions of these calls 
+                    (QSymGetAddressesForSymbols and QSymGetSymbolsForAddresses) to 
+                    allow for future performance optimisations.  The QSymGetNextSymbol 
+                    routine lets you find the symbol that immediately follows 
+                    another symbol; this is useful is you want to find the extent
+                    of a symbol.
+                    
+                    Finally, call QSymDestroy to destroy the symbols object.
+                    
+                    IMPORTANT: This module has not been performance tuned.  
+                    Specifically, it uses a bunch of algorithms that are linear 
+                    with the number of images within the task, and linear with 
+                    the number of symbols within the images.  If you need to map 
+                    lots of symbols, you should probably performance tune the 
+                    implementation.
+                    
+                    This module assumes that the state of the process you're 
+                    investigating is stable.  That is, when you create a symbols 
+                    object for a process, you need to guarantee that the state 
+                    of the process does not change while that symbols object exists.  
+                    The best way to prevent this from happening is to suspend the 
+                    process while you're accessing it.  You can automatically 
+                    suspend the task for the lifetime of the symbols object by 
+                    pass true to the suspend parameter of QSymCreateFromTask.
+                    
+                    Many routines in this module (for example, QSymGetAddressForSymbol) 
+                    return you pointers to structures that are embedded within the 
+                    symbols object.  Such pointers are only valid for the lifetime 
+                    of the symbols object itself.  Once you've destroyed the image 
+                    object (by calling QSymDestroy), you can no longer rely 
+                    on the validity of these pointers.
+                    
+                    This module works in terms of symbol names seen by the linker. 
+                    Keep in mind the following:
+                    
+                      o The C compiler adds a leading underscore to all C symbols.
+                        For example, the C routine "getpid" because is seen by the 
+                        linker as "_getpid".
+                    
+                      o The C++ compiler mangles names extensively.
+
+                    While this module is currently implemented entirely in terms of 
+                    Mach-O, the interface is not Mach-O specific; you could enhance 
+                    the module to support other types of symbols (for example, 
+                    PowerPC traceback tables).
+*/
+
+/*!
+    @typedef        QSymbolsRef
+    
+    @abstract       A reference to the symbols for a process.
+    
+    @discussion     This type is opaque; to create, destroy, or access it, you must 
+                    use the routines in this module.
+*/
+typedef struct QSymbols * QSymbolsRef;
+
+/*!
+    @functiongroup  Create and Destroy
+*/
+#pragma mark ***** Create and Destroy
+
+/*!
+    @function       QSymCreateFromTask
+    
+    @abstract       Creates a symbols object for an arbitrary process.
+    
+    @discussion     Creates a symbols object for the specified procses.
+
+                    Once you're done with the object, call QSymDestroy to 
+                    destroy it.
+
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the process to inspect; mach_task_self is just fine.
+                    
+                    If you do pass in mach_task_self, this routine automatically 
+                    enables some nice optimisations.
+
+    @param suspend  If true, the target task is suspended while the symbols object 
+                    exists.
+                    
+                    Must not be true if task is mach_task_self.
+                    
+    @param cputype  The CPU type of the dynamic linker from which you want to get 
+                    the symbols.  Typically you would pass CPU_TYPE_ANY to use 
+                    the first dynamic linker that's discovered.  See 
+                    QMOImageCreateFromTaskDyld for a detailed discussion of this 
+                    value.
+
+    @param symRefPtr
+                    On entry, symRefPtr must not be NULL and *symRefPtr must 
+                    be NULL.  On success, *symRefPtr will be a reference to the 
+                    symbols object that's been created.  On error, *symRefPtr 
+                    will be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QSymCreateFromTask(
+    task_t              task,
+    bool                suspend,
+    cpu_type_t          cputype,
+    QSymbolsRef *       symRefPtr
+);
+
+/*!
+    @function       QSymCreateFromSelf
+    
+    @abstract       Creates a symbols object for the current process.
+    
+    @discussion     Creates a symbols object for the current procses.  This is 
+                    equivalent to calling QSymCreateFromTask, passing it 
+                    mach_task_self and the current CPU type.
+
+                    Once you're done with the object, call QSymDestroy to 
+                    destroy it.
+
+    @param symRefPtr
+                    On entry, symRefPtr must not be NULL and *symRefPtr must 
+                    be NULL.  On success, *symRefPtr will be a reference to the 
+                    symbols object that's been created.  On error, *symRefPtr 
+                    will be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QSymCreateFromSelf(
+    QSymbolsRef *       symRefPtr
+);
+
+/*!
+    @function       QSymDestroy
+    
+    @abstract       Destroys a symbols object.
+    
+    @discussion     Destroys the supplied symbols object.
+                    
+    @param qmoImage The symbols object to destroy.  If this is NULL, the routine 
+                    does nothing.
+*/
+extern void QSymDestroy(QSymbolsRef symRef);
+
+/*!
+    @functiongroup  Basic Accessors
+*/
+#pragma mark ***** Basic Accessors
+
+/*!
+    @function       QSymGetDyldImage
+    
+    @abstract       Gets the dyld image object for the process.
+    
+    @discussion     Gets the dyld image object for the process which the symbols 
+                    object is inspecting.
+
+    @param symRef   A valid symbols object.
+
+    @result         A reference to the image object.  It's possible for this to 
+                    be NULL (although that would be /very/ weird).
+*/
+extern QMOImageRef QSymGetDyldImage(QSymbolsRef symRef);
+
+/*!
+    @function       QSymGetExecutableImage
+    
+    @abstract       Gets the executable image object for the process.
+    
+    @discussion     Gets the executable image object for the process which the symbols 
+                    object is inspecting.
+
+    @param symRef   A valid symbols object.
+
+    @result         A reference to the image object.  It's possible for this to 
+                    be NULL (although that would be /very/ weird).
+*/
+extern QMOImageRef QSymGetExecutableImage(QSymbolsRef symRef);
+
+/*!
+    @function       QSymGetImages
+    
+    @abstract       Gets all of the image objects for the process.
+    
+    @discussion     Gets all of the image objects for the process.
+    
+                    This routine can never fail; the image array is created when 
+                    the symbols object is created, and any failures would 
+                    have caused creation to fail.
+                    
+                    IMPORTANT: Do not free the array that this returns, or indeed 
+                    any of the image objects contained in the array.  These all 
+                    belongs to the symbols object and will be destroyed when 
+                    the symbols object is destroyed.
+
+    @param symRef   A valid symbols object.
+
+    @param imageArrayPtr
+                    A pointer to an image object array pointer.  On entry,  
+                    imageArrayPtr must not be NULL and *imageArrayPtr is 
+                    ignored.  On return, *imageArrayPtr will be a pointer 
+                    to *imageCountPtr QMOImageRef objects.
+
+    @param imageCountPtr
+                    A pointer to an image object count.  On entry, imageCountPtr 
+                    must not be NULL and *imageCountPtr is ignored.  On return, 
+                    *imageCountPtr is the size of the image array whose pointer 
+                    is returned in *imageArrayPtr.
+*/
+extern void QSymGetImages(
+    QSymbolsRef     symRef, 
+    QMOImageRef **  imageArrayPtr, 
+    size_t *        imageCountPtr
+);
+
+/*!
+    @functiongroup  Symbol to Address
+*/
+#pragma mark ***** Symbol to Address
+
+/*!
+    @enum           QSymSymbolType
+    
+    @abstract       Identifies the type of symbol found.
+    
+    @discussion     This module currently works entirely in terms of Mach-O, so 
+                    this enumeration only contains values for Mach-O symbols. 
+                    If I extended the module to handle other types of symbols 
+                    (for example, PowerPC traceback tables), I would extend this 
+                    enumeration to identify those symbol types.
+
+    @constant kQSymNoSymbol
+                    No symbol was found.  This is useful for bulk routines 
+                    (like QSymGetAddressesForSymbols), where failing to find one 
+                    symbol does not cause the entire routine to fail.
+
+    @constant kQSymDyldPublicSymbol
+                    Found an exported Mach-O symbol.
+
+    @constant kQSymDyldPrivateSymbol
+                    Found a private Mach-O symbol.
+*/
+enum QSymSymbolType {
+	kQSymNoSymbol = 0,
+	kQSymDyldPublicSymbol,
+	kQSymDyldPrivateSymbol
+};
+typedef enum QSymSymbolType QSymSymbolType;
+
+/*!
+    @struct         QSymSymbolInfo
+    
+    @abstract       Information about a particular symbol.
+    
+    @discussion     This structure is used to return information about a particular 
+                    symbol.
+                    
+                    The pointers in a QSymSymbolInfo structure are valid until you 
+                    destroy the symbols object that you passed to the routine that 
+                    returned the structure.
+
+    @field symbolType
+                    The type of the symbol.  If this is kQSymNoSymbol, the remaining 
+                    fields are meaningless.
+
+    @field symbolImage
+                    A reference to the image object that contains the symbol.  
+                    
+                    For symbols of type kQSymDyldPublicSymbol and kQSymDyldPrivateSymbol, 
+                    this will not be NULL.
+
+    @field symbolName
+                    The name of the symbol.  This is the name seen as the linker 
+                    so, for example, the name of a C function would include the 
+                    leading underscore added by the C compiler.
+
+                    For symbols of whose type is not kQSymNoSymbol, this will not 
+                    be NULL.
+
+    @field symbolValue
+                    The address of the symbol whose name is symbolName within the 
+                    process for which you created the symbols object.
+
+    @field symbolOffset
+                    For the symbol-to-address mapping routines, this will always be 
+                    zero.
+                    
+                    For the address-to-symbol mapping routines, this contains the 
+                    offset of the address from the start of the symbol.
+*/
+struct QSymSymbolInfo {
+    QSymSymbolType      symbolType;
+    QMOImageRef         symbolImage;
+	const char *        symbolName;
+	QTMAddr             symbolValue;        // address of symbol named by symbolName
+    QTMOffset           symbolOffset;
+};
+typedef struct QSymSymbolInfo QSymSymbolInfo;
+
+/*!
+    @function       QSymGetAddressForSymbol
+    
+    @abstract       Gets the address for a symbol.
+    
+    @discussion     Gets the address for a symbol.  The symbol is specified by 
+                    both a library name and a symbol name.  If the library name 
+                    is NULL, the routine searches all Mach-O images within the process 
+                    for a symbol with the specified name.  The order that the images 
+                    are search is not specified.  This simulates dyld's flat 
+                    namespace concept.
+                    
+                    If the library name is not NULL, it should contain the name 
+                    of a shared library.  In that case, the routine searches 
+                    just that shared library for the symbol.  This simulates dyld's 
+                    two-level namespace.
+                    
+                    A library name is equivalent to the name given in the LC_ID_DYLIB 
+                    load command of the library.  For example, the library name of 
+                    "/usr/lib/libz.1.2.3.dylib" is "/usr/lib/libz.1.dylib".  You can 
+                    get the library name of using <x-man-page://1/otool> with the 
+                    "-l" option, looking through the output for the LC_ID_DYLIB 
+                    command.  For example:
+                    
+                    $ otool -l /usr/lib/libz.1.2.3.dylib | grep -A 5 LC_ID_DYLIB
+                              cmd LC_ID_DYLIB
+                          cmdsize 48
+                             name /usr/lib/libz.1.dylib (offset 24)
+                       time stamp 1170684920 Mon Feb  5 14:15:20 2007
+                          current version 1.2.3
+                    compatibility version 1.0.0
+                    
+                    This will find absolute and section-based symbols (those of 
+                    type N_ABS and N_SECT) that aren't debugger symbols (that is, 
+                    N_TYPE is not set).
+                    
+    @param symRef   A valid symbols object.
+
+    @param libraryName
+                    The name of the library to search, or NULL to search all images.
+
+    @param symbolName
+                    The name of the symbol to search for.  If this is a C symbol, 
+                    you must include the leading underscore that's inserted by 
+                    the compiler for all C symbols.
+
+    @param symbolInfo
+                    On success, this structured is filled out with information 
+                    about the found symbol.
+                    
+                    On failure, the symbolType field will be kQSymNoSymbol.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.  If the 
+                    symbol is not found, this will be ESRCH.
+*/
+extern int QSymGetAddressForSymbol(
+    QSymbolsRef         symRef,
+    const char *        libraryName,
+    const char *        symbolName,
+    QSymSymbolInfo *    symbolInfo
+);
+
+/*!
+    @function       QSymGetAddressesForSymbols
+    
+    @abstract       Maps multiple symbols to their addresses.
+    
+    @discussion     This is a bulk version of QSymGetAddressForSymbol.  Using it, 
+                    you can map multiple symbols to their addresses in one 
+                    function call.
+                    
+                    This routine is equivalent to calling QSymGetAddressForSymbol 
+                    count times, each time passing corresponding entries of the 
+                    libraryNames, symbolNames and symbolInfos arrays.
+    
+                    IMPORTANT: Failing to map a symbol to an address will not 
+                    cause this routine to fail.  Rather, the corresponding entry 
+                    in symbolInfos will have a symbol type of kQSymNoSymbol.
+
+    @param symRef   A valid symbols object.
+
+    @param count    The number of entries in the libraryNames, symbolNames, 
+                    and symbolInfos arrays.
+
+    @param libraryNames
+                    An array of library names.  Each element is equivalent to the 
+                    libraryName parameter of QSymGetAddressForSymbol.
+                    
+                    This may be NULL, in which case it's treated as an array of 
+                    count items, each of which is NULL.
+
+    @param symbolNames
+                    The array of symbol names to search for.  Each element is 
+                    equivalent to the symbolName parameter of QSymGetAddressForSymbol.
+
+    @param symbolInfos
+                    An array of symbol information structures.  Each element is 
+                    equivalent to the symbolInfo parameter of QSymGetAddressForSymbol. 
+
+                    If the mapping failed for a particular element, the symbolType 
+                    field will be kQSymNoSymbol
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QSymGetAddressesForSymbols(
+    QSymbolsRef         symRef,
+    size_t              count,
+    const char *        libraryNames[],
+    const char *        symbolNames[],
+    QSymSymbolInfo      symbolInfos[]
+);
+
+/*!
+    @function       QSymGetNextSymbol
+    
+    @abstract       Returns the symbol that immediately follows a specified symbol.
+    
+    @discussion     Returns the symbol that immediately follows a specified symbol. 
+                    
+                    IMPORTANT: This finds the next symbol within a particular 
+                    image.  That is, on success, the symbolImage field of the 
+                    next symbol will be equal to the symbolImage field of the 
+                    original symbol.
+
+    @param symRef   A valid symbols object.
+
+    @param symbol   The symbol for which you wish to find the next symbol.  Typically 
+                    you pass in the results of QSymGetAddressForSymbol.  Regardless, 
+                    the symbolType field must not be kQSymNoSymbol and the 
+                    symbolType, symbolImage, symbolName and symbolValue fields must 
+                    be valid.
+
+    @param nextSymbol
+                    On success, this describes the symbol that immediately follows 
+                    symbol.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.  If there  
+                    is no next symbol, this will be ESRCH.
+*/
+extern int QSymGetNextSymbol(
+    QSymbolsRef             symRef,
+    const QSymSymbolInfo *  symbol,
+    QSymSymbolInfo *        nextSymbol
+);
+
+/*!
+    @functiongroup  Address to Symbol
+*/
+#pragma mark ***** Address to Symbol
+
+/*!
+    @function       QSymGetImageForAddress
+    
+    @abstract       Gets the image that contains the specified address.
+    
+    @discussion     Returns the image that contains the specified address and, 
+					optionally, the section within that image.
+					
+					IMPORTANT: The current implementation only considers sections 
+                    in the "__TEXT" and "__DATA" segments.
+
+    @param symRef   A valid symbols object.
+
+    @param addr     The address to search for; this is within the process specified 
+					when you created the symbols object.
+
+    @param qmoImagePtr
+					Must not be NULL.
+					
+					On success, *qmoImagePtr is set to the image object that has 
+					a section that contains the address.  This image object is 
+					owned by the symbols object and will be destroyed when the 
+					symbols object is destroy; you must not destroy it yourself.  
+					On failure, the value in *qmoImagePtr is unspecified.
+
+    @param sectIndexPtr
+					If NULL, this parameter is ignored.
+					
+					If not NULL then, on success, *sectIndexPtr will contain 
+					the zero-based section index of the section containing the 
+					address (within the image returned in *qmoImagePtr).  On 
+					failure, the value in *sectIndexPtr is unspecified.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.  If no 
+                    image is found, this will be ESRCH.
+*/
+extern int QSymGetImageForAddress(
+	QSymbolsRef		symRef, 
+	QTMAddr			addr,
+	QMOImageRef *	qmoImagePtr, 
+	uint32_t *		sectIndexPtr
+);
+
+/*!
+    @function       QSymGetSymbolForAddress
+    
+    @abstract       Maps an address to a symbol.
+    
+    @discussion     Maps an address (within the process specified when you created 
+                    the symbols object) to a symbol (within that process).  This 
+                    first tries to find the section containing the symbol; if 
+                    that succeeds, it looks through all of the symbol in that 
+                    section looking for the one that's least less than the specified 
+                    address.
+                    
+                    IMPORTANT: The current implementation only considers sections 
+                    in the "__TEXT" and "__DATA" segments.
+
+    @param symRef   A valid symbols object.
+
+    @param addr     The address to map; this is within the process specified when 
+                    you created the symbols object
+
+    @param symbolInfo
+                    On success, this structured is filled out with information 
+                    about the found symbol.  The symbolOffset field will contain 
+                    the offset of from the start of the symbol (that is, the 
+                    value in symbolValue) to the address.
+                    
+                    On failure, the symbolType field will be kQSymNoSymbol.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.  If no 
+                    symbol is found, this will be ESRCH.
+*/
+extern int QSymGetSymbolForAddress(
+    QSymbolsRef         symRef,
+    QTMAddr             addr,
+    QSymSymbolInfo *    symbolInfo
+);
+
+/*!
+    @function       QSymGetSymbolsForAddresses
+    
+    @abstract       Map multiple addresses to their symbols.
+    
+    @discussion     This is a bulk version of QSymGetSymbolForAddress.  Using it, 
+                    you can map multiple aaddress to their symbols in one 
+                    function call.
+                    
+                    This routine is equivalent to calling QSymGetSymbolForAddress 
+                    count times, each time passing corresponding entries of the 
+                    addrs and symbolInfos arrays.
+    
+                    IMPORTANT: Failing to map an address to a symbol will not 
+                    cause this routine to fail.  Rather, the corresponding entry 
+                    in symbolInfos will have a symbol type of kQSymNoSymbol.
+
+    @param symRef   A valid symbols object.
+
+    @param count    The number of entries in the addrs and symbolInfos arrays.
+
+    @param symbolNames
+                    The array of addresses to map.  Each element is equivalent 
+                    to the addr parameter of QSymGetSymbolForAddress.
+
+    @param symbolInfos
+                    An array of symbol information structures.  Each element is 
+                    equivalent to the symbolInfo parameter of QSymGetSymbolForAddress. 
+
+                    If the mapping failed for a particular element, the symbolType 
+                    field will be kQSymNoSymbol
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int QSymGetSymbolsForAddresses(
+    QSymbolsRef         symRef,
+    size_t              count,
+    QTMAddr             addrs[],
+    QSymSymbolInfo      symbolInfos[]
+);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/mac/QTaskMemory.c b/lib/mac/QTaskMemory.c
new file mode 100644
index 0000000..e662483
--- /dev/null
+++ b/lib/mac/QTaskMemory.c
@@ -0,0 +1,566 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/*
+ *  QTaskMemory.c
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QTaskMemory.c
+
+    Contains:   Task memory access abstraction.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QTaskMemory.c,v $
+Revision 1.2  2007/03/02 12:25:50         
+Fixed a problem where a routine that should be static was mistakenly extern.
+
+Revision 1.1  2007/03/02 12:20:37         
+First checked in.
+
+
+*/
+
+/////////////////////////////////////////////////////////////////
+
+// Our prototypes
+
+#include "QTaskMemory.h"
+
+// System includes
+
+#include <TargetConditionals.h>
+#include <AvailabilityMacros.h>
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <sys/errno.h>
+#include <sys/sysctl.h>
+#include <sys/utsname.h>
+
+// Put Mach includes inside extern "C" guards for the C++ build 
+// because the Mach header files don't always have them.
+
+#if defined(__cplusplus)
+	extern "C" {
+#endif
+
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+#include <mach/mach_vm.h>
+#endif
+
+#if defined(__cplusplus)
+	}
+#endif
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Mach Compatibility
+
+// Prior to 10.3, Mac OS X did not support 64-bit address spaces.  Thus, key Mach 
+// data structures, like vm_address_t, were 32-bits in size, and can't be changed 
+// for binary compatibility.  So, all of these data types, and the functions that 
+// use them, are defined to scale with the address space: they are 32-bit for 
+// 32-bit clients and 64-bit for 64-bit clients.
+//
+// To make it possible to create 32-bit programs that operate on 64-bit address spaces, 
+// 10.4 introduces new Mach data structures and routines, all prefixed by mach_, that 
+// are fixed at 64-bits.  For example, vm_address_t is supplanted by mach_vm_address_t, 
+// and vm_read is supplanted by mach_vm_read.
+//
+// Unfortunately, the routines are only available on 10.4 and later.  So, we can't just 
+// call them directly if we want to run on 10.3.  The original QCrashReport code from 
+// Apple DTS used weak linking to solve this.  But weak linking may cause crashes if 
+// the code does not specifically test for the presence of weak-linked APIs on older 
+// versions of the OS.  For this reason, BOINC uses MacOSX10.3.9.sdk for PowerPC builds 
+// to avoid weak linking.
+//
+// Finally, the old routines are not available to 64-bit clients on Intel.  
+//
+// BOINC use this code only to analyze the process which called it, and this code 
+// supports 64-bit backtraces only for Intel processors, so we use the new routines 
+// for Intel builds and the old routines for PowerPC builds. 
+// 
+
+/////////////////////////////////////////////////////////////////
+
+
+extern int QTMErrnoFromMachError(kern_return_t kr)
+    // See comment in header.
+{
+    int     err;
+    
+    switch (kr) {
+        case KERN_SUCCESS:
+            err = 0;
+            break;
+        case KERN_INVALID_ADDRESS:
+            err = EFAULT;
+            break;
+        case KERN_PROTECTION_FAILURE:
+            err = EACCES;
+            break;
+        case KERN_NO_SPACE:
+            err = ENOMEM;
+            break;
+        case KERN_INVALID_ARGUMENT:
+            err = EINVAL;
+            break;
+        case KERN_FAILURE:
+            err = EINVAL;
+            break;
+        case KERN_NAME_EXISTS:
+            err = EEXIST;
+            break;
+        case KERN_INVALID_NAME:
+            err = EBADF;
+            break;
+        default:
+            if ( (((int) kr) >= 0) && (((int) kr) <= ELAST) ) {
+                fprintf(stderr, "QTMErrnoFromMachError: Mapping unrecognised Mach error in the errno range (%#x) to EINVAL (%d).", (unsigned int) kr, EINVAL);
+                err = EINVAL;
+            } else {
+                err = (int) kr;
+            }
+            break;
+    }
+    return err;
+}
+
+extern int QTMRead(task_t task, QTMAddr addrWithinTask, size_t size, void *addrLocal)
+	// See comment in header.
+{
+	int				err;
+	kern_return_t   		kr;
+	
+	assert(task != MACH_PORT_NULL);
+	assert(size > 0);
+	assert(addrLocal != NULL);
+	
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+	mach_vm_size_t                  bytesRead;
+
+        kr = mach_vm_read_overwrite(task, addrWithinTask, (mach_vm_size_t) size, (mach_vm_address_t) (uintptr_t) addrLocal, &bytesRead);
+
+#else
+	vm_size_t                       bytesRead;
+
+        kr = vm_read_overwrite(task, (vm_address_t) addrWithinTask, (vm_size_t) size, (vm_address_t) addrLocal, &bytesRead);
+#endif
+
+        err = QTMErrnoFromMachError(kr);
+	
+	// AFAIK mach_vm_read_overwrite will not return partial data; that is, you 
+	// get everything (no error) or you get nothing (error).  The following 
+	// checks that assertion.
+	
+	assert( (err != 0) || (bytesRead == size) );
+
+	return err;
+}
+
+extern int QTMReadAllocated(task_t task, QTMAddr addrWithinTask, size_t size, const void **bufPtr)
+    // See comment in header.
+{
+	int						err;
+	kern_return_t           			kr;
+	vm_offset_t                                     addrLocal;
+	mach_msg_type_number_t                          bytesRead;
+
+	
+	assert(task != MACH_PORT_NULL);
+	assert(size > 0);
+	assert( bufPtr != NULL);
+	assert(*bufPtr == NULL);
+	
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+
+         kr = mach_vm_read(task, addrWithinTask, size, &addrLocal, &bytesRead);
+
+#else
+
+        kr = vm_read(task, addrWithinTask, size, &addrLocal, &bytesRead);
+#endif
+
+        err = QTMErrnoFromMachError(kr);
+
+	// AFAIK mach_vm_read will not return partial data; that is, you get 
+	// everything (no error) or you get nothing (error).  The following 
+	// checks that assertion.
+
+	assert( (err != 0) || (bytesRead == size) );
+
+	if (err == 0) {
+		*bufPtr = (const void *) (uintptr_t) addrLocal;
+
+        // Pointer truncation should never occur (because addrLocal is a 
+        // vm_offset_t, which with the current address space) but, if it does, 
+        // the following should catch it.
+        
+        assert( ((uintptr_t) *bufPtr) == addrLocal );
+	}
+	
+	assert( (err == 0) == (*bufPtr != NULL) );
+	
+	return err;
+}
+
+extern int  QTMRemap(task_t task, QTMAddr addrWithinTask, size_t size, const void **bufPtr)
+    // See comment in header.
+{
+        int                 err;
+        kern_return_t       kr;
+        vm_prot_t           curProt;
+        vm_prot_t           maxProt;
+
+	assert(task != MACH_PORT_NULL);
+	assert(size > 0);
+	assert( bufPtr != NULL);
+	assert(*bufPtr == NULL);
+    
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+        mach_vm_address_t   addrLocal;
+
+	addrLocal = 0;
+	kr = mach_vm_remap(
+		mach_task_self(),	// target_task
+		&addrLocal,             // target_address
+		size,			// size
+		0,			// mask
+		true,			// anywhere
+		task,			// src_task
+		addrWithinTask,         // src_address
+		true,			// copy
+		&curProt,		// cur_protection
+		&maxProt,		// max_protection
+		VM_INHERIT_NONE
+	);
+
+#else
+
+        vm_address_t   addrLocal;
+
+	addrLocal = 0;
+        kr = vm_remap(
+		mach_task_self(),	// target_task
+		&addrLocal,             // target_address
+		size,			// size
+		0,			// mask
+		true,			// anywhere
+		task,			// src_task
+		addrWithinTask,         // src_address
+		true,			// copy
+		&curProt,		// cur_protection
+		&maxProt,		// max_protection
+		VM_INHERIT_NONE
+	);
+
+#endif
+
+        err = QTMErrnoFromMachError(kr);
+        if (err == 0) {
+            *bufPtr = (const void *) (uintptr_t) addrLocal;
+
+            // Pointer truncation should never occur (because we're remapping into 
+            // the current task) but, if it does, the following should catch it.
+            
+            assert( (uintptr_t) *bufPtr == addrLocal );
+        }
+    
+        return err;
+}
+
+extern void QTMFree(const void *buf, size_t size)
+    // See comment in header.
+{
+    kern_return_t   junk;
+
+    if (buf == NULL) {
+        assert(size > 0);
+
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+
+        junk = mach_vm_deallocate(mach_task_self(), (uintptr_t) buf, (mach_vm_size_t) size);
+
+#else
+        junk = vm_deallocate(mach_task_self(), (vm_address_t) buf, (vm_size_t) size);
+
+#endif
+        assert(junk == KERN_SUCCESS);
+    }
+}
+
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Extra Stuff
+
+extern int QTMGetDarwinOSRelease(int *majorPtr, int *minorPtr, int *bugPtr)
+	// See comment in header.
+{
+	int                 err;
+	struct utsname      names;
+	int                 scanResult;
+    static int          sMajor;
+    static int          sMinor;
+    static int          sBug;
+		
+    // If we haven't already got the OS release, get it now.
+    
+    err = 0;
+    if (sMajor == 0) {
+        err = uname(&names);
+        if (err < 0) {
+            err = errno;
+        }
+        if (err == 0) {
+            // Parse the three dot separated components of the release string. 
+            // If we don't get exactly three, we've confused and we error.
+            
+            scanResult = sscanf(names.release, "%d.%d.%d", &sMajor, &sMinor, &sBug);
+            if (scanResult != 3) {
+                err = EINVAL;
+            }
+        }
+    }
+    
+    // Return it to our caller.
+    
+    if (err == 0) {
+        if (majorPtr != NULL) {
+            *majorPtr = sMajor;
+        }
+        if (minorPtr != NULL) {
+            *minorPtr = sMinor;
+        }
+        if (bugPtr != NULL) {
+            *bugPtr = sBug;
+        }
+    }
+	
+	return err;
+}
+
+#if 0   // Not used by BOINC
+
+extern bool QTMTaskIs64Bit(task_t task)
+    // See comments in header.
+    //
+    // This implementation uses sysctl to get the process information structure 
+    // and then checks the P_LP64 flag.  This is less than ideal because the 
+    // sysctl interface for getting process information is not exactly well-liked 
+    // by kernel engineering.  OTOH, the alternatives are, on average, less nice, 
+    // so I've gone with this.
+{
+    kern_return_t       kr;
+    bool                result;
+    int                 major;
+    pid_t               pid;
+    int                 err;
+    int                 mib[4];
+    struct kinfo_proc   info;
+    size_t              size;
+
+    assert(task != MACH_PORT_NULL);
+    
+    // We default to assuming that the process is 32-bit.
+    
+    result = false;
+    
+    // The bit denoted by P_LP64 the flag was used for a different purpose 
+    // (P_INMEM) prior to 10.4.  So we only look at the bit on 10.4 and later. 
+    // Earlier systems didn't support 64-bit processes, so the default value 
+    // of false is correct.
+    
+    err = QTMGetDarwinOSRelease(&major, NULL, NULL);
+    assert(err == 0);
+    
+    if ( (err == 0) && (major >= kQTMDarwinOSMajorForMacOSX104) ) {
+        kr = pid_for_task(task, &pid);
+        assert(kr == KERN_SUCCESS);
+        err = QTMErrnoFromMachError(kr);
+
+        if (err == 0) {
+            // Initialize mib, which tells sysctl the info we want, in this case
+            // we're looking for information about a specific process ID.
+
+            mib[0] = CTL_KERN;
+            mib[1] = KERN_PROC;
+            mib[2] = KERN_PROC_PID;
+            mib[3] = pid;
+
+            // Call sysctl.
+
+            size = sizeof(info);
+            err = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
+
+            // We're 64-bit if the P_LP64 flag is set.
+
+            if (err == 0) {
+                result = (info.kp_proc.p_flag & P_LP64) != 0;
+            }
+        }
+    }
+    
+    // We really shouldn't get any error from the above.  If we do, assert in 
+    // the debug build and just return the default value (32-bit) in the 
+    // production build.
+    
+    return result;
+}
+
+#endif
+
+static int sysctlbyname_with_pid(
+    const char *    name, 
+    pid_t           pid, 
+    void *          oldp, 
+    size_t *        oldlenp, 
+    void *          newp, 
+    size_t          newlen
+)
+    // Stolen directly from the "Universal Binaries Programming Guidelines" 
+    // document.
+{
+    if (pid == 0) {
+        if (sysctlbyname(name, oldp, oldlenp, newp, newlen) == -1)  {
+            // fprintf(stderr, "sysctlbyname_with_pid(0): sysctlbyname  failed: %s\n", strerror(errno));
+            return -1;
+        }
+    } else {
+        int     mib[CTL_MAXNAME];
+        size_t  len = CTL_MAXNAME;
+        if (sysctlnametomib(name, mib, &len) == -1) {
+            // fprintf(stderr, "sysctlbyname_with_pid: sysctlnametomib  failed: %s\n", strerror(errno));
+            return -1;
+        }
+        mib[len] = pid;
+        len++;
+        if (sysctl(mib, len, oldp, oldlenp, newp, newlen) == -1)  {
+            // fprintf(stderr, "sysctlbyname_with_pid: sysctl  failed: %s\n", strerror(errno));
+            return -1;
+        }
+    }
+    return 0;
+}
+
+static int is_pid_native(pid_t pid)
+    // Stolen directly from the "Universal Binaries Programming Guidelines" 
+    // document.
+{
+    int ret = 0;
+    size_t sz = sizeof(ret);
+ 
+    if (sysctlbyname_with_pid("sysctl.proc_native", pid, 
+                &ret, &sz, NULL, 0) == -1) {
+        if (errno == ENOENT) {
+            return 1;
+        }
+        // fprintf(stderr, "is_pid_native: sysctlbyname_with_pid  failed: %s\n", strerror(errno));
+        return -1;
+    }
+    return ret;
+}
+
+extern bool QTMTaskIsNative(task_t task)
+    // See comments in header.
+{
+    kern_return_t   kr;
+    pid_t           pid;
+    
+    assert(task != MACH_PORT_NULL);
+
+    pid = -1;
+    kr = pid_for_task(task, &pid);
+    assert(kr == KERN_SUCCESS);
+    
+    // is_pid_native returns 1 (native), 0 (non-native), or -1 (error).  I want 
+    // to treat everything except 0 as native.  That is, an error is consider 
+    // to be native.  I do this because native to make native the default choice.
+    
+    return (is_pid_native(pid) != 0);
+}
diff --git a/lib/mac/QTaskMemory.h b/lib/mac/QTaskMemory.h
new file mode 100644
index 0000000..c19e6ca
--- /dev/null
+++ b/lib/mac/QTaskMemory.h
@@ -0,0 +1,426 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+/*
+ *  QTaskMemory.h
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+    File:       QTaskMemory.h
+
+    Contains:   Task memory access abstraction.
+
+    Written by: DTS
+
+    Copyright:  Copyright (c) 2007 Apple Inc. All Rights Reserved.
+
+    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
+                ("Apple") in consideration of your agreement to the following
+                terms, and your use, installation, modification or
+                redistribution of this Apple software constitutes acceptance of
+                these terms.  If you do not agree with these terms, please do
+                not use, install, modify or redistribute this Apple software.
+
+                In consideration of your agreement to abide by the following
+                terms, and subject to these terms, Apple grants you a personal,
+                non-exclusive license, under Apple's copyrights in this
+                original Apple software (the "Apple Software"), to use,
+                reproduce, modify and redistribute the Apple Software, with or
+                without modifications, in source and/or binary forms; provided
+                that if you redistribute the Apple Software in its entirety and
+                without modifications, you must retain this notice and the
+                following text and disclaimers in all such redistributions of
+                the Apple Software. Neither the name, trademarks, service marks
+                or logos of Apple Inc. may be used to endorse or promote
+                products derived from the Apple Software without specific prior
+                written permission from Apple.  Except as expressly stated in
+                this notice, no other rights or licenses, express or implied,
+                are granted by Apple herein, including but not limited to any
+                patent rights that may be infringed by your derivative works or
+                by other works in which the Apple Software may be incorporated.
+
+                The Apple Software is provided by Apple on an "AS IS" basis. 
+                APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+                WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+                MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING
+                THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+                COMBINATION WITH YOUR PRODUCTS.
+
+                IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
+                INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+                TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+                DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY
+                OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+                OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY
+                OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+                OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+                SUCH DAMAGE.
+
+    Change History (most recent first):
+
+$Log: QTaskMemory.h,v $
+Revision 1.1  2007/03/02 12:20:40         
+First checked in.
+
+
+*/
+
+#ifndef _QTASKMEMORY_H
+#define _QTASKMEMORY_H
+
+/////////////////////////////////////////////////////////////////
+
+#include <stdbool.h>
+
+// Put <mach/mach.h> inside extern "C" guards for the C++ build 
+// because the Mach header files don't always have them.
+
+#if defined(__cplusplus)
+	extern "C" {
+#endif
+
+#include <mach/mach.h>
+
+#if defined(__cplusplus)
+	}
+#endif
+
+/////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+    extern "C" {
+#endif
+
+/*!
+    @header         QTaskMemory.h
+    
+    @abstract       Abstraction layer for reading another process's memory.
+
+    @discussion     This module lets you read memory from another task.  It's implemented 
+                    using Mach APIs that are designed for that very job.  The purpose of 
+                    this module is to make those routines easier to call, handling the 
+                    various nasty compatibility problems that arise.  See the comments 
+                    inside "QTaskMemory.c" for the gory details.
+                    
+                    When using this module, keep in mind that addresses within a remote 
+                    task are represented by an unsigned 64-bit integer (QTMAddr).  This 
+                    is necessary because it lets a 32-bit tool examine a 64-bit task.
+                    -- Changed for BOINC: See comments in QTaskMemory.c
+
+                    Because of oddities in the underlying infrastructure (specifically, 
+                    mach_vm_read does odd things if you ask for a size of zero -- it 
+                    returns KERN_SUCCESS, addrLocal == 0, bytesRead == 0), we don't 
+                    allow clients to request a size of zero.
+*/
+
+/*!
+    @functiongroup  Main Interface
+*/
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Main Interface
+
+/*!
+    @typedef        QTMAddr
+    
+    @abstract       Represents an address within a task.
+    
+    @discussion     This type represents an address within a task.  We can't just 
+                    use use (void *) because we need to be able to represent 64-bit 
+                    addresses, even if we're built 32-bit.
+*/
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+typedef mach_vm_address_t QTMAddr;
+#else
+typedef uint64_t QTMAddr;
+#endif
+
+/*!
+    @typedef        QTMOffset
+    
+    @abstract       Represents a byte offset between two QTMAddrs.
+    
+    @discussion     This type represents a byte offset between two QTMAddrs.  We 
+                    can't just use use ptrdiff_t or size_t because we need to be 
+                    able to represent a 64-bit offset, even if we're built 32-bit.
+*/
+#if TARGET_CPU_X86 || TARGET_CPU_X86_64
+typedef mach_vm_offset_t  QTMOffset;
+#else
+typedef uint64_t  QTMOffset;
+#endif
+
+/*!
+    @function       QTMRead
+    
+    @abstract       Reads memory from a task.
+    
+    @discussion     Read size bytes from addrWithinTask of the task to the buffer 
+                    specified by addrLocal.  There are no partial results; you 
+                    either get size bytes of data or an error.
+
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the task whose memory you want to read; mach_task_self 
+                    is just fine.
+
+    @param addrWithinTask
+                    The address within that task of the memory you want to read.
+
+    @param size     The number of bytes that you want to read; there must be this 
+                    many bytes available in the buffer pointed to by addrLocal.  
+                    It must not be zero.
+
+    @param addrLocal
+                    The address of the buffer into which you want to read the bytes.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+*/
+extern int  QTMRead(task_t task, QTMAddr addrWithinTask, size_t size, void *addrLocal);
+
+/*!
+    @function       QTMReadAllocated
+    
+    @abstract       Allocates a buffer and reads memory from a task into it.
+    
+    @discussion     Read size bytes from addrWithinTask of the task to a newly 
+                    allocated buffer, and return a pointer to that buffer in *bufPtr.  
+                    The client is responsible for freeing the buffer by calling QTMFree.
+
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the task whose memory you want to read; mach_task_self 
+                    is just fine.
+
+    @param addrWithinTask
+                    The address within that task of the memory you want to read.
+
+    @param size     The number of bytes that you want to read.  It must not be zero.
+
+    @param bufPtr   On entry, bufPtr must not be NULL and *bufPtr must be NULL.
+                    On success, *bufPtr will point to a buffer of at least size bytes.  
+                    You must free the buffer by calling QTMFree.
+                    On failure, *bufPtr will be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+
+*/
+extern int  QTMReadAllocated(task_t task, QTMAddr addrWithinTask, size_t size, const void **bufPtr);
+
+/*!
+    @function       QTMRemap
+    
+    @abstract       Maps memory from a task into your address space.
+    
+    @discussion     Maps size bytes of memory from addrWithinTask to the current 
+                    task and returns the address of the newly mapped data in *bufPtr.  
+                    The client is responsible for freeing the buffer by calling 
+                    QTMFree.
+
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the task whose memory you want to map; mach_task_self 
+                    is just fine.
+
+    @param addrWithinTask
+                    The address within that task of the memory you want to map.
+
+    @param size     The number of bytes that you want to map.  It must not be zero.
+
+    @param bufPtr   On entry, bufPtr must not be NULL and *bufPtr must be NULL.
+                    On success, *bufPtr will point to a buffer of at least size bytes.  
+                    You must free the buffer by calling QTMFree.
+                    On failure, *bufPtr will be NULL.
+
+    @result         An errno-style error code per QTMErrnoFromMachError.
+
+*/
+extern int  QTMRemap(task_t task, QTMAddr addrWithinTask, size_t size, const void **bufPtr);
+    
+/*!
+    @function       QTMFree
+    
+    @abstract       Free data returned by QTMReadAllocated or QTMRemap.
+    
+    @discussion     Free data returned by QTMReadAllocated or QTMRemap.
+
+    @param buf      The buffer to free.  This may be NULL, in which case the routine 
+                    does nothing.
+
+    @param size     The size of the buffer to free.  If buf is NULL, this value 
+                    is ignored.  If buf is not NULL, this must bee the same value 
+                    as passed to the routine that allocated the memory (and hence 
+                    must not be 0).
+*/
+extern void QTMFree(const void *buf, size_t size);
+
+/*!
+    @functiongroup  Utilities
+*/
+/////////////////////////////////////////////////////////////////
+#pragma mark ***** Utilities
+
+/*!
+    @function       QTMErrnoFromMachError
+    
+    @abstract       Converts a Mach error code to a errno-style error code.
+    
+    @discussion     Various other modules call Mach directly for various reasons, 
+                    and these need to translate Mach-style errors into errno-style 
+                    errors.  This module already has a helper routine to do that 
+                    job, so I export it.
+
+                    IMPORTANT:
+                    This routine can still return errors outside of the errno range.  
+                    What it does is as follows:
+
+                     1. If the Mach error is something obvious that we recognise, 
+                        map it to a specific errno-style error.
+
+                     2. Failing that, if the Mach error is outside of the errno 
+                        range (and thus it's not ambiguous as to whether the error 
+                        is a Mach error or an errno error), just return it.
+
+                     3. For unrecognised Mach errors within the errno range, just 
+                        return EINVAL.
+
+                    The upshot is that if an error is outside of the errno range 
+                    [0..ELAST], you should treat it as a Mach error.
+
+    @param kr       A Mach error code.
+
+    @result         An errno-style error code.
+*/
+extern int QTMErrnoFromMachError(kern_return_t kr);
+
+/*!
+    @enum           QTMDarwinOSMajor
+    
+    @abstract       Constants for Darwin OS release major values.
+    
+    @constant kQTMDarwinOSMajorForMacOSX102
+                    The Darwin OS release major value for Mac OS X 10.2.x.
+    
+    @constant kQTMDarwinOSMajorForMacOSX103
+                    The Darwin OS release major value for Mac OS X 10.3.x.
+    
+    @constant kQTMDarwinOSMajorForMacOSX104
+                    The Darwin OS release major value for Mac OS X 10.4.x.
+*/
+enum QTMDarwinOSMajor {
+    kQTMDarwinOSMajorForMacOSX102 = 6,
+    kQTMDarwinOSMajorForMacOSX103 = 7,
+    kQTMDarwinOSMajorForMacOSX104 = 8
+};
+
+/*!
+    @function       QTMGetDarwinOSRelease
+    
+    @abstract       Returns the Darwin OS release numbers.
+    
+    @discussion     Returns the Darwin OS release numbers for the current 
+                    system.  It gets these values by calling uname and parsing 
+                    the results.  For example, the major/minor/bug values for 
+                    Mac OS X 10.4.8 will be 8/8/x (where x is dependent on the 
+                    particular release).
+                    
+                    This is useful in environments, like a 64-bit process running 
+                    on Mac OS X 10.4.x, where you can't get gestaltSystemVersion.
+
+    @param majorPtr May be NULL, in which case no value is return.  Otherwise, 
+                    on entry, *majorPtr is ignored and, on success, *majorPtr 
+                    will be set to the Darwin OS release major component.
+
+    @param minorPtr May be NULL, in which case no value is return.  Otherwise, 
+                    on entry, *minorPtr is ignored and, on success, *minorPtr 
+                    will be set to the Darwin OS release minor component.
+
+    @param bugPtr   May be NULL, in which case no value is return.  Otherwise, 
+                    on entry, *bugPtr is ignored and, on success, *bugPtr 
+                    will be set to the Darwin OS release bug fix component.
+
+    @result         An errno-style error number.
+*/
+extern int QTMGetDarwinOSRelease(int *majorPtr, int *minorPtr, int *bugPtr);
+	// Get the Darwin OS release using uname.  I can't use gestaltSystemVersion 
+	// because it's part of CoreServices, and CoreServices is not available 
+	// to 64-bit programs on Mac OS X 10.4.x.
+
+/*!
+    @function       QTMTaskIs64Bit
+    
+    @abstract       Determines whether a task is 64-bit.
+    
+    @discussion     Returns true if the specified task is 64-bit.
+
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the task; mach_task_self should work just fine.
+
+    @result         Returns true if the task is 64-bit and false otherwise.
+                    
+                    If something goes wrong, you get the default value of false.
+*/
+extern bool QTMTaskIs64Bit(task_t task);
+
+/*!
+    @function       QTMTaskIsNative
+    
+    @abstract       Determines whether a task is native.
+    
+    @discussion     Returns false if the specified task is being run using Rosetta.
+
+    @param task     Must be the name of a valid send right for the task control 
+                    port of the task; mach_task_self should work just fine.
+
+    @result         Returns false if the task is being run by Rosetta and false 
+                    otherwise.
+                    
+                    If something goes wrong, you get the default value of true.
+*/
+extern bool QTMTaskIsNative(task_t task);
+
+    // I'm not ever going to try to explain how this works (-:
+    //
+    // Apple doesn't generally recommend, and hence doesn't officially document, 
+    // the Mach API.  If you search the web for "vm_region", you'll find our 
+    // unofficial documentation.
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/mac/dyld_gdb.h b/lib/mac/dyld_gdb.h
new file mode 100644
index 0000000..aa36b4c
--- /dev/null
+++ b/lib/mac/dyld_gdb.h
@@ -0,0 +1,212 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+/*
+ *  dyld_gdb.h
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames in file QBacktrace.c.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+/*
+ * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#ifndef _DYLD_GDB_
+#define _DYLD_GDB_
+/*
+ * This file describes the interface between gdb and dyld created for
+ * MacOS X GM.  Prior to MacOS X GM gdb used the dyld_debug interfaces
+ * described in <mach-o/dyld_debug.h>.
+ */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define OLD_GDB_DYLD_INTERFACE __ppc__ || __i386__
+
+#if OLD_GDB_DYLD_INTERFACE
+/*
+ * gdb_dyld_version is the version of gdb interface that dyld is currently
+ * exporting.  For the interface described in this header file gdb_dyld_version
+ * is 2.  As the gdb/dyld interface changes this number will be incremented and
+ * comments will be added as to what are the are changes for the various
+ * versions.
+ */
+extern unsigned int gdb_dyld_version;
+
+/* 
+ * gdb_dyld_state_changed is the internal dyld routine called by dyld to notify
+ * gdb that the state of the data structures has changed.  gdb is expected to
+ * put a break point on this routine and re-read the internal dyld data
+ * structures below when this break point is hit.
+ */
+extern void gdb_dyld_state_changed(void);
+
+/*
+ * gdb looks directly at parts of two of dyld's internal data structures.  The
+ * list of object file images and the list of library images.  The parts of
+ * these structures that gdb looks at will not change unless the value of
+ * gdb_dyld_version changes.  The size of these structures and the other fields
+ * that gdb does not look at may change.
+ *
+ *  struct object_images {
+ *      struct object_image images[NOBJECT_IMAGES];
+ *      unsigned long nimages; 
+ *      struct object_images *next_images; 
+ *      ...
+ *  };
+ *
+ *  struct library_images { 
+ *      struct library_image images[NLIBRARY_IMAGES];
+ *      unsigned long nimages;
+ *      struct library_images *next_images;
+ *      ...
+ *  };
+ *
+ * Both the object_image structure and the library_image structure
+ * start with a structure containing the following fields:
+ *
+ *  struct image {   
+ *      char *physical_name;        physical image name (file name)
+ *      unsigned long vmaddr_slide; the slide from the staticly linked address
+ *      struct mach_header *mh;     address of the mach header of the image
+ *      unsigned long valid;        TRUE if this is struct is valid
+ *      char *name;                 image name for reporting errors
+ *      ...
+ *  };
+ *
+ * In gdb_dyld_version 1 the first field was "name".  In gdb_dyld_version 2 the
+ * first field was changed to "physical_name" and a new fifth field "name" was
+ * added.  These two fields are set to the same values except in the case of
+ * zero-link.  In zero-link the NSLinkModule() option
+ * NSLINKMODULE_OPTION_TRAILING_PHYS_NAME is used and then the physical_name is
+ * the file name of the module zero-link loaded that is part of the logical
+ * image "name".
+ */
+
+/* object_images is the global object_images structure */
+
+/* the number of gdb_object_image structures present per bucket */
+extern unsigned int gdb_nobject_images;
+
+/* the size of each gdb_object_image structure */
+extern unsigned int gdb_object_image_size;
+
+/* library_images is the global library_images structure */
+
+/* the number of gdb_library_image structures present per bucket */
+extern unsigned int gdb_nlibrary_images;
+
+/* the size of each gdb_library_image structure */
+extern unsigned int gdb_library_image_size;
+
+#endif /* OLD_GDB_DYLD_INTERFACE */
+
+
+/* 
+ *	Beginning in Mac OS X 10.4, there is a new mechanism for dyld to notify gdb and other about new images.
+ *
+ *
+ */
+
+enum dyld_image_mode { dyld_image_adding=0, dyld_image_removing=1 };
+
+struct dyld_image_info {
+	const struct mach_header*	imageLoadAddress;	/* base address image is mapped into */
+	const char*					imageFilePath;		/* path dyld used to load the image */
+	uintptr_t					imageFileModDate;	/* time_t of image file */
+													/* if stat().st_mtime of imageFilePath does not match imageFileModDate, */
+													/* then file has been modified since dyld loaded it */
+};
+
+
+typedef void (*dyld_image_notifier)(enum dyld_image_mode mode, uint32_t infoCount, const struct dyld_image_info info[]);
+
+/* 
+ *	gdb looks for the symbol "_dyld_all_image_infos" in dyld.  It contains the fields below.  
+ *
+ *	For a snap shot of what images are currently loaded, the infoArray fields contain a pointer
+ *	to an array of all images. If infoArray is NULL, it means it is being modified, come back later.
+ *
+ *	To be notified of changes, gdb sets a break point on the notification field.  The function
+ *	it points to is called by dyld with an array of information about what images have been added
+ *	(dyld_image_adding) or are about to be removed (dyld_image_removing). 
+ *
+ * The notification is called after infoArray is updated.  This means that if gdb attaches to a process
+ * and infoArray is NULL, gdb can set a break point on notification and let the proccess continue to
+ * run until the break point.  Then gdb can inspect the full infoArray.
+ */
+ struct dyld_all_image_infos {
+	uint32_t						version;		/* == 1 in Mac OS X 10.4 */
+	uint32_t						infoArrayCount;
+	const struct dyld_image_info*	infoArray;
+	dyld_image_notifier				notification;		
+	bool							processDetachedFromSharedRegion;
+};
+extern struct dyld_all_image_infos  dyld_all_image_infos;
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DYLD_GDB_ */
diff --git a/lib/mac/mac_backtrace.cpp b/lib/mac/mac_backtrace.cpp
new file mode 100644
index 0000000..943306e
--- /dev/null
+++ b/lib/mac/mac_backtrace.cpp
@@ -0,0 +1,419 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/*
+ *  mac_backtrace.C
+ *
+ */
+ 
+/* This is part of a backtrace generator for boinc project applications.  
+*
+* Adapted from Apple Developer Technical Support Sample Code QCrashReport
+*
+* This code handles Mac OS X 10.3.x through 10.4.9.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames below.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+* A very useful shell script to add symbols to a crash dump can be found at:
+*  http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
+* Pipe the output of the shell script through c++filt to demangle C++ symbols.
+*/
+
+
+#ifdef __ppc__
+#include <Carbon/Carbon.h>
+#endif
+
+#include <mach-o/dyld.h>
+#include <mach-o/loader.h>
+#include <mach-o/nlist.h>
+#include <mach-o/stab.h>
+#include <mach-o/arch.h>
+
+#include <stdio.h>
+#include <unistd.h>     // for getpid()
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <time.h>
+
+#include "QSymbols.h"
+#include "QMachOImageList.h"
+#include "QBacktrace.h"
+#include "QCrashReport.h"
+#include "mac_backtrace.h"
+#include "filesys.h"
+
+// Suppress obsolete warning when building for OS 10.3.9
+#define DLOPEN_NO_WARN
+#include <dlfcn.h>
+
+// Functions available only in OS 10.5 and later
+    typedef int     (*backtraceProc)(void**,int);
+    typedef char ** (*backtrace_symbolsProc)(void* const*,int);
+#define CALL_STACK_SIZE 128
+
+extern void * _sigtramp;
+
+enum {
+        kFrameCount = 200
+};
+
+#define SKIPFRAME 4 /* Number frames overhead for signal handler and backtrace */
+
+static void PrintOSVersion(char *minorVersion);
+
+void PrintBacktrace(void) {
+    int                         err;
+    QCrashReportRef             crRef = NULL;
+
+    char                        nameBuf[256], pathToThisProcess[1024];
+    const NXArchInfo            *localArch;
+    char                        OSMinorVersion = '?';
+    time_t                      t;
+    char                        atosPipeBuf[1024], cppfiltPipeBuf[1024];
+    char                        outBuf[1024], offsetBuf[32];
+    char                        *sourceSymbol, *symbolEnd;
+    char                        **symbols = NULL;
+    void                        *callstack[CALL_STACK_SIZE];
+    int                         frames, i;
+    void                        *systemlib = NULL;
+    FILE                        *atosPipe = NULL;
+    FILE                        *cppfiltPipe = NULL;
+    backtraceProc               myBacktraceProc = NULL;
+    backtrace_symbolsProc       myBacktrace_symbolsProc = NULL;
+    char                        saved_env[128], *env = NULL;
+    bool                        atosExists = false, cppfiltExists = false;
+
+#if 0
+// To debug backtrace logic:
+//  * Enable this block of code.
+//  * Set a breakpoint at sleep(1) call, and wherever else you wish.
+//  * Launch built development application from Finder.
+//  * Get this application's pid from Activity Monitor.
+//  * Attach Debugger to this application.
+//  * Continue until you reach this breakpoint.
+//  * Change wait variable to 0 (false).
+// This is necessary because GDB intercepts signals even if you tell it 
+// not to, so you must attach GDB after the signal handler is invoked.
+
+    bool wait = true;
+    
+    while (wait) {
+        fprintf(stderr, "waiting\n");
+        sleep(1);
+    }
+#endif
+
+    GetNameOfAndPathToThisProcess(nameBuf, sizeof(nameBuf), pathToThisProcess, sizeof(pathToThisProcess));
+    
+    if (nameBuf[0]) {
+        fprintf(stderr, "\nCrashed executable name: %s\n", nameBuf);
+    }
+    
+#ifdef BOINC_VERSION_STRING
+    fprintf(stderr, "built using BOINC library version %s\n", BOINC_VERSION_STRING);
+#endif
+
+    localArch = NXGetLocalArchInfo();
+    fprintf(stderr, "Machine type %s", localArch->description);
+#ifdef __LP64__
+    fprintf(stderr, " (64-bit executable)\n");
+#else
+    fprintf(stderr, " (32-bit executable)\n");
+#endif
+
+    PrintOSVersion(&OSMinorVersion);
+
+    time(&t);
+    fputs(asctime(localtime(&t)), stderr);
+    fputc('\n', stderr);
+    
+    err = QCRCreateFromSelf(&crRef);
+
+    if (OSMinorVersion == '5') {
+#ifdef __ppc__
+        fputs("BOINC backtrace under OS 10.5.x only shows exported (global) symbols\n", stderr);
+        fputs("and may work poorly on a PowerPC Mac after a crash.  For a better\n", stderr);
+        fputs("backtrace, run under OS 10.4.x.\n\n", stderr);
+#else
+        fputs("BOINC backtrace under OS 10.5.x only shows exported (global) symbols\n", stderr);
+        fputs("and may not show the final location which caused a crash.  For a better\n", stderr);
+        fputs("backtrace, either run under OS 10.4.x or run under OS 10.6.x or later.\n\n", stderr);
+#endif
+    }
+    
+    if (OSMinorVersion >= '5') {
+        // Use new backtrace functions if available (only in OS 10.5 and later)
+        systemlib = dlopen ("/usr/lib/libSystem.dylib", RTLD_NOW );
+        if (systemlib) {
+            myBacktraceProc = (backtraceProc)dlsym(systemlib, "backtrace");
+         }
+        if (! myBacktraceProc) {
+            goto skipBackTrace;     // Should never happen
+        }
+        frames = myBacktraceProc(callstack, CALL_STACK_SIZE);
+        myBacktrace_symbolsProc = (backtrace_symbolsProc)dlsym(systemlib, "backtrace_symbols");
+        if (myBacktrace_symbolsProc) {
+            symbols = myBacktrace_symbolsProc(callstack, frames);
+        } else {
+            goto skipBackTrace;     // Should never happen
+        }
+        
+        atosExists = boinc_file_exists("/usr/bin/atos");
+        cppfiltExists = boinc_file_exists("/usr/bin/atos");
+        if (atosExists || cppfiltExists) {
+            // The bidirectional popen only works if the NSUnbufferedIO environment 
+            // variable is set, so we save and restore its current value.
+            env = getenv("NSUnbufferedIO");
+            if (env) {
+                strlcpy(saved_env, env, sizeof(saved_env));
+            }
+            setenv("NSUnbufferedIO", "YES", 1);
+        }
+        
+        if (atosExists) {
+            // The backtrace_symbols() and backtrace_symbols() APIs are limited to 
+            // external symbols only, so we also use the atos command-line utility  
+            // which gives us debugging symbols when available.
+            //
+            // For some reason, using the -p option with the value from getpid() 
+            // fails here but the -o option with a path does work.
+#ifdef __x86_64__
+            snprintf(atosPipeBuf, sizeof(atosPipeBuf), "/usr/bin/atos -o \"%s\" -arch x86_64", pathToThisProcess);
+#elif defined (__i386__)
+            snprintf(atosPipeBuf, sizeof(atosPipeBuf), "/usr/bin/atos -o \"%s\" -arch i386", pathToThisProcess);
+#else
+            snprintf(atosPipeBuf, sizeof(atosPipeBuf), "/usr/bin/atos -o \"%s\" -arch ppc", pathToThisProcess);
+#endif
+
+            atosPipe = popen(atosPipeBuf, "r+");
+            if (atosPipe) {
+                setbuf(atosPipe, 0);
+            }
+        }
+
+        if (cppfiltExists) {
+            cppfiltPipe = popen("/usr/bin/c++filt -s gnu-v3 -n", "r+");
+            if (cppfiltPipe) {
+                setbuf(cppfiltPipe, 0);
+            }
+        }
+        
+        for (i=0; i<frames; i++) {
+            strlcpy(outBuf, symbols[i], sizeof(outBuf));
+            if (cppfiltPipe) {
+                sourceSymbol = strstr(outBuf, "0x");
+                if (sourceSymbol) {
+                    sourceSymbol = strchr(sourceSymbol, (int)'_');
+                    if (sourceSymbol) {
+                        strlcpy(cppfiltPipeBuf, sourceSymbol, sizeof(cppfiltPipeBuf)-1);
+                        *sourceSymbol = '\0';
+                        symbolEnd = strchr(cppfiltPipeBuf, (int)' ');
+                        if (symbolEnd) {
+                            strlcpy(offsetBuf, symbolEnd, sizeof(offsetBuf));
+                            *symbolEnd = '\0';
+                        }
+                        fprintf(cppfiltPipe, "%s\n", cppfiltPipeBuf);
+                        BT_PersistentFGets(cppfiltPipeBuf, sizeof(cppfiltPipeBuf), cppfiltPipe);
+                        symbolEnd = strchr(cppfiltPipeBuf, (int)'\n');
+                        if (symbolEnd) {
+                            *symbolEnd = '\0';
+                        }
+                        strlcat(outBuf, cppfiltPipeBuf, sizeof(outBuf));
+                        strlcat(outBuf, offsetBuf, sizeof(outBuf));
+                    }
+                }
+            }
+            
+            if (atosPipe) {
+                fprintf(atosPipe, "%#llx\n", (QTMAddr)callstack[i]);
+                BT_PersistentFGets(atosPipeBuf, sizeof(atosPipeBuf), atosPipe);
+                sourceSymbol = strstr(atosPipeBuf, "0x");
+                if (!sourceSymbol) {        // If atos returned a symbol (not just a hex value)
+                    sourceSymbol = strstr(outBuf, "0x");
+                    if (sourceSymbol) sourceSymbol = strstr(sourceSymbol, " ");
+                    if (sourceSymbol) *++sourceSymbol = '\0'; // Remove questionable symbol from backtrace_symbols()
+                    strlcat(outBuf, " ", sizeof(outBuf));
+                    strlcat(outBuf, atosPipeBuf, sizeof(outBuf));
+                    symbolEnd = strchr(outBuf, (int)'\n');
+                    if (symbolEnd) {
+                        *symbolEnd = '\0';
+                    }
+                }
+            }
+            fprintf(stderr, "%s\n", outBuf);
+        }
+
+        if (atosPipe) {
+            pclose(atosPipe);
+        }
+        
+        if (cppfiltPipe) {
+            pclose(cppfiltPipe);
+        }
+
+        if (atosExists || cppfiltExists) {
+            if (env) {
+                setenv("NSUnbufferedIO", saved_env, 1);
+            } else {
+                unsetenv("NSUnbufferedIO");
+            }
+        }
+        
+skipBackTrace:
+        fprintf(stderr, "\n");
+    } else {
+    // Not OS 10.5.x
+        QCRPrintBacktraces(crRef, stderr);
+    }
+
+    // make sure this much gets written to file in case future 
+    // versions of OS break our crash dump code beyond this point.
+    fflush(stderr);
+    
+    QCRPrintThreadState(crRef, stderr);
+    QCRPrintImages(crRef, stderr);
+}
+
+
+char * BT_PersistentFGets(char *buf, size_t buflen, FILE *f) {
+    char *p = buf;
+    size_t len = buflen;
+    size_t datalen = 0;
+
+    *buf = '\0';
+    while (datalen < (buflen - 1)) {
+        fgets(p, len, f);
+        if (feof(f)) break;
+        if (ferror(f) && (errno != EINTR)) break;
+        if (strchr(buf, '\n')) break;
+        datalen = strlen(buf);
+        p = buf + datalen;
+        len -= datalen;
+    }
+    return (buf[0] ? buf : NULL);
+}
+
+
+void GetNameOfAndPathToThisProcess(char *nameBuf, size_t nameBufLen, char* outbuf, size_t outBufLen) {
+    FILE *f;
+    char buf[256], *p, *q=NULL;
+    pid_t aPID = getpid();
+    size_t nameLen;
+
+    *outbuf = '\0';
+    *nameBuf = '\0';
+    
+    sprintf(buf, "ps -wo command -p %d", (int)aPID);
+    f = popen(buf, "r");
+    if (f == NULL)
+        return;
+    
+    BT_PersistentFGets (outbuf, outBufLen, f);     // Discard header line
+    BT_PersistentFGets (outbuf, outBufLen, f);     // Get the UNIX command which ran us
+    pclose(f);
+
+    sprintf(buf, "ps -p %d -c -o command", aPID);
+    f = popen(buf,  "r");
+    if (!f)
+        return;
+    BT_PersistentFGets(nameBuf, nameBufLen, f);    // Discard header line
+    BT_PersistentFGets(nameBuf, nameBufLen, f);    // Get just the name of our application
+    pclose(f);
+
+    // Remove trailing newline if present
+    p = strchr(nameBuf, '\n');
+    if (p)
+        *p = '\0';
+    
+    // Strip off any arguments
+    p = outbuf;
+    nameLen = strlen(nameBuf);
+    // Find last instance of string nameBuf in string outbuf
+    p = strnstr(p, nameBuf, outBufLen);
+    while (p) {
+        q = p;
+        p = strnstr(q + nameLen, nameBuf, outBufLen - (q - nameBuf));
+    }
+    // Terminate the string immediately after path
+    if (q) {
+        q += nameLen;
+        *q = '\0';
+    }
+}
+
+
+// This is an alternative to using Gestalt(gestaltSystemVersion,..) so 
+// we don't need the Carbon Framework
+static void PrintOSVersion(char *OSMinorVersion) {
+    char buf[1024], *p1 = NULL, *p2 = NULL, *p3;
+    FILE *f;
+    int n;
+    
+    f = fopen("/System/Library/CoreServices/SystemVersion.plist", "r");
+    if (!f)
+        return;
+        
+    n = fread(buf, 1, sizeof(buf)-1, f);
+    buf[n] = '\0';
+    p1 = strstr(buf, "<key>ProductUserVisibleVersion</key>");
+    if (p1) {
+        p1 = strstr(p1, "<string>") + 8;
+        p2 = strstr(p1, "</string>");
+        if (p2) {
+            // Extract the minor system version number character
+            p3 = strchr(p2, '.');
+            *OSMinorVersion = *(p3+1);    // Pass minor version number back to caller
+            // Now print the full OS version string
+            fputs("System version: Macintosh OS ", stderr);
+            while (p1 < p2) {
+                fputc(*p1++, stderr);
+            }
+        }
+    }
+    
+    if (p2) {
+        p2 = NULL;
+        p1 = strstr(buf, "<key>ProductBuildVersion</key>");
+        if (p1) {
+            p1 = strstr(p1, "<string>") + 8;
+            p2 = strstr(p1, "</string>");
+            if (p2) {
+                fputs(" build ", stderr);
+                while (p1 < p2) {
+                    fputc(*p1++, stderr);
+                }
+            }
+        }
+    }
+    
+    fputc('\n', stderr);
+
+    fclose(f);
+}
diff --git a/lib/mac/mac_backtrace.h b/lib/mac/mac_backtrace.h
new file mode 100644
index 0000000..fdc75d5
--- /dev/null
+++ b/lib/mac/mac_backtrace.h
@@ -0,0 +1,68 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+/*
+ *  mac_backtrace.h
+ *
+ */
+ 
+/* This is a rudimentary backtrace generator for boinc project applications.  
+*
+* It is adapted from Apple Developer Technical Support Sample Code 
+*   MoreisBetter / MoreDebugging / MoreBacktraceTest
+*  The symbols it displays are not always clean.  
+*
+* This code handles Mac OS X 10.3.x through 10.4.2.  It may require some 
+* adjustment for future OS versions; see the discussion of _sigtramp and 
+* PowerPC Signal Stack Frames below.
+*
+*  For useful tips on using backtrace information, see Apple Tech Note 2123:
+*  http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
+*
+*  To convert addresses to correct symbols, use the atos command-line tool:
+*  atos -o path/to/executable/with/symbols address
+*  Note: if address 1a23 is hex, use 0x1a23.  
+*
+*  To demangle mangled C++ symbols, use the c++filt command-line tool. 
+*  You may need to prefix C++ symbols with an additonal underscore before 
+*  passing them to c++filt (so they begin with two underscore characters).
+*
+*  Flags in backtrace:
+*    F this frame pointer is bad
+*    P this PC is bad
+*    S this frame is a signal handler
+*
+*/
+ 
+#ifndef _BOINC_BACKTRACE_
+#define _BOINC_BACKTRACE_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <mach/mach.h>
+
+void PrintBacktrace(void);
+void GetNameOfAndPathToThisProcess(char *nameBuf, size_t nameBufLen, char* outbuf, size_t outBufLen);
+char * BT_PersistentFGets(char *buf, size_t buflen, FILE *f);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif      // _BOINC_BACKTRACE_
diff --git a/lib/md5.c b/lib/md5.c
index 396d3d5..cc7fae2 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -21,7 +21,7 @@
   ghost at aladdin.com
 
  */
-/*$Id: md5.c 20873 2010-03-12 16:51:57Z romw $ */
+/*$Id$ */
 /*
   Independent implementation of MD5 (RFC 1321).
 
diff --git a/lib/md5_test.cpp b/lib/md5_test.cpp
index f6d9a1c..c608f48 100644
--- a/lib/md5_test.cpp
+++ b/lib/md5_test.cpp
@@ -12,4 +12,4 @@ int main(int, char** argv) {
     return 0;
 }
 
-const char *BOINC_RCSID_c6f4ef0a81 = "$Id: md5_test.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_c6f4ef0a81 = "$Id$";
diff --git a/lib/mem_usage.cpp b/lib/mem_usage.cpp
index 471fab3..cd772c2 100644
--- a/lib/mem_usage.cpp
+++ b/lib/mem_usage.cpp
@@ -117,6 +117,7 @@ int mem_usage(double& vm_usage, double& resident_set) {
             ++p; // move past space
         }
         if (!p) {
+            fclose(f);
             return ERR_NOT_IMPLEMENTED;
         }
 
diff --git a/lib/msg_queue.cpp b/lib/msg_queue.cpp
index 572ad31..b009b21 100644
--- a/lib/msg_queue.cpp
+++ b/lib/msg_queue.cpp
@@ -93,4 +93,4 @@ int destroy_message_queue(key_t key) {
 }
 
 
-const char *BOINC_RCSID_7b5e8a534b = "$Id: msg_queue.cpp 24303 2011-09-27 19:45:27Z davea $";
+const char *BOINC_RCSID_7b5e8a534b = "$Id$";
diff --git a/lib/msg_test.cpp b/lib/msg_test.cpp
index 1f93ab3..1817794 100644
--- a/lib/msg_test.cpp
+++ b/lib/msg_test.cpp
@@ -59,4 +59,4 @@ int main(int argc, char** argv) {
     return 0;
 }
 
-const char *BOINC_RCSID_7ce3817f4c = "$Id: msg_test.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_7ce3817f4c = "$Id$";
diff --git a/lib/proc_control.cpp b/lib/proc_control.cpp
index ac77771..83ca3d2 100644
--- a/lib/proc_control.cpp
+++ b/lib/proc_control.cpp
@@ -166,7 +166,8 @@ void kill_descendants() {
     kill_all(descendants);
 }
 #else
-// Same, but if child_pid is nonzero, give it a chance to exit gracefully on Unix
+// Same, but if child_pid is nonzero,
+// give it a chance to exit gracefully on Unix
 //
 void kill_descendants(int child_pid) {
     vector<int> descendants;
diff --git a/lib/proxy_info.h b/lib/proxy_info.h
index 42cacd0..44e6f34 100644
--- a/lib/proxy_info.h
+++ b/lib/proxy_info.h
@@ -19,6 +19,7 @@
 #define _PROXY_INFO_
 
 #include "miofile.h"
+#include "parse.h"
 
 // info on whether HTTP requests need to go through a proxy
 //
diff --git a/lib/shmem_test.cpp b/lib/shmem_test.cpp
index bcc7d95..32d6239 100644
--- a/lib/shmem_test.cpp
+++ b/lib/shmem_test.cpp
@@ -47,4 +47,4 @@ int main(int argc, char** argv) {
     return 0;
 }
 
-const char *BOINC_RCSID_6911713ff8 = "$Id: shmem_test.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_6911713ff8 = "$Id$";
diff --git a/lib/stackwalker_win.cpp b/lib/stackwalker_win.cpp
index 92e6e1d..f8d64c8 100644
--- a/lib/stackwalker_win.cpp
+++ b/lib/stackwalker_win.cpp
@@ -1,4 +1,4 @@
-// $Id: stackwalker_win.cpp 23842 2011-07-14 15:54:52Z romw $
+// $Id$
 //
 
 /*////////////////////////////////////////////////////////////////////////////
diff --git a/lib/stackwalker_win.h b/lib/stackwalker_win.h
index 3c85420..1104878 100644
--- a/lib/stackwalker_win.h
+++ b/lib/stackwalker_win.h
@@ -1,4 +1,4 @@
-// $Id: stackwalker_win.h 12364 2007-04-13 06:13:46Z rwalton $
+// $Id$
 //
 /*////////////////////////////////////////////////////////////////////////////
  *  Project:
diff --git a/lib/synch_test.cpp b/lib/synch_test.cpp
index 2af0803..7e69a99 100644
--- a/lib/synch_test.cpp
+++ b/lib/synch_test.cpp
@@ -40,4 +40,4 @@ int main(int argc, char** argv) {
     return 0;
 }
 
-const char *BOINC_RCSID_7eba26a197 = "$Id: synch_test.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_7eba26a197 = "$Id$";
diff --git a/lib/util.cpp b/lib/util.cpp
index 884bb8e..5ac8834 100644
--- a/lib/util.cpp
+++ b/lib/util.cpp
@@ -311,7 +311,7 @@ void boinc_crash() {
 #ifdef _WIN32
     DebugBreak();
 #else
-    *(int*)0 = 0;
+    abort();
 #endif
 }
 
diff --git a/locale/ar/pootle-boinctrunk-ar.prefs b/locale/ar/pootle-boinctrunk-ar.prefs
deleted file mode 100644
index 807f71d..0000000
--- a/locale/ar/pootle-boinctrunk-ar.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-# Pootle preferences for project boinctrunk, language ar
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/be/pootle-boinctrunk-be.prefs b/locale/be/pootle-boinctrunk-be.prefs
deleted file mode 100644
index 1271ac4..0000000
--- a/locale/be/pootle-boinctrunk-be.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-# Pootle preferences for project boinctrunk, language be
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/bg/pootle-boinctrunk-bg.prefs b/locale/bg/pootle-boinctrunk-bg.prefs
deleted file mode 100644
index 0f0feee..0000000
--- a/locale/bg/pootle-boinctrunk-bg.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-# Pootle preferences for project boinctrunk, language bg
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/ca/pootle-boinctrunk-ca.prefs b/locale/ca/pootle-boinctrunk-ca.prefs
deleted file mode 100644
index fe9246f..0000000
--- a/locale/ca/pootle-boinctrunk-ca.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language ca
-
-rights:
-  Xavi = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/cs/pootle-boinctrunk-cs.prefs b/locale/cs/pootle-boinctrunk-cs.prefs
deleted file mode 100644
index 4fad2ff..0000000
--- a/locale/cs/pootle-boinctrunk-cs.prefs
+++ /dev/null
@@ -1,10 +0,0 @@
-# Pootle preferences for project boinctrunk, language cs
-
-rights:
-  Spok = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  Necroman = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  JensSeidler = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/cy/pootle-boinctrunk-cy.prefs b/locale/cy/pootle-boinctrunk-cy.prefs
deleted file mode 100644
index b36d35c..0000000
--- a/locale/cy/pootle-boinctrunk-cy.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language cy
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  huwwaters = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/da/pootle-boinctrunk-da.prefs b/locale/da/pootle-boinctrunk-da.prefs
deleted file mode 100644
index 7a9cdbe..0000000
--- a/locale/da/pootle-boinctrunk-da.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language da
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  jbk = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/de/BOINC-Manager.mo b/locale/de/BOINC-Manager.mo
index c9134c3..29a2ee1 100644
Binary files a/locale/de/BOINC-Manager.mo and b/locale/de/BOINC-Manager.mo differ
diff --git a/locale/de/BOINC-Manager.po b/locale/de/BOINC-Manager.po
index f9eee6c..4db0132 100644
--- a/locale/de/BOINC-Manager.po
+++ b/locale/de/BOINC-Manager.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: BOINC Manager 6.4x\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-03-05 10:58-0500\n"
-"PO-Revision-Date: 2012-06-17 10:22+0200\n"
+"PO-Revision-Date: 2012-08-05 13:48+0200\n"
 "Last-Translator: Christian <djangofett at gmx.net>\n"
 "Language-Team: BOINC.DE Team <webmaster at boinc.de>\n"
 "Language: de\n"
@@ -34,8 +34,7 @@ msgid ""
 "(to create an account, visit the project's web site)"
 msgstr ""
 "Bitte geben Sie Ihre Kontoinformationen ein.\n"
-"(Bitte besuchen Sie die Projektwebseite, um ein Teilnehmerkonto "
-"einzurichten.)"
+"(Zum Erstellen eines Accounts, Projektseite besuchen)"
 
 #: clientgui/AccountInfoPage.cpp:396
 msgid ""
@@ -1918,7 +1917,7 @@ msgstr "Status"
 
 #: clientgui/DlgItemProperties.cpp:316
 msgid "Received"
-msgstr "Erhalten"
+msgstr "erhalten"
 
 #: clientgui/DlgItemProperties.cpp:319
 msgid "Report deadline"
@@ -1939,12 +1938,12 @@ msgstr "Prozessor-Zeit beim letzten Checkpoint"
 #: clientgui/DlgItemProperties.cpp:328
 #: clientgui/DlgItemProperties.cpp:343
 msgid "CPU time"
-msgstr "Prozessor-Zeit"
+msgstr "Prozessorzeit"
 
 #: clientgui/DlgItemProperties.cpp:330
 #: clientgui/DlgItemProperties.cpp:344
 msgid "Elapsed time"
-msgstr "Verbrauchte Zeit"
+msgstr "bisherige Laufzeit"
 
 #: clientgui/DlgItemProperties.cpp:332
 msgid "Estimated time remaining"
@@ -1956,7 +1955,7 @@ msgstr "Fortschritt"
 
 #: clientgui/DlgItemProperties.cpp:334
 msgid "Virtual memory size"
-msgstr "Größe des Virtuellen Speichers"
+msgstr "benötigter Arbeitsspeicher"
 
 #: clientgui/DlgItemProperties.cpp:335
 msgid "Working set size"
@@ -1964,7 +1963,7 @@ msgstr "Größe des Arbeitspakets"
 
 #: clientgui/DlgItemProperties.cpp:337
 msgid "Directory"
-msgstr "Ordner"
+msgstr "Verzeichnis"
 
 #: clientgui/DlgItemProperties.cpp:340
 msgid "Process ID"
@@ -1985,7 +1984,7 @@ msgstr "Sprache:"
 
 #: clientgui/DlgOptions.cpp:168
 msgid "What language should BOINC use?"
-msgstr "Welche Sprache soll der Manager verwenden?"
+msgstr "Welche Sprache soll der BOINC Manager verwenden?"
 
 #: clientgui/DlgOptions.cpp:172
 msgid "Notice reminder interval:"
@@ -1994,7 +1993,8 @@ msgstr "An Nachrichten erinnern alle:"
 #: clientgui/DlgOptions.cpp:179
 msgid "How often should BOINC remind you of new notices?"
 msgstr ""
-"Wie oft soll der Manager Sie erinnern wenn neue Nachrichten verfügbar sind?"
+"Wie oft soll der BOINC Manager Sie erinnern wenn neue Nachrichten verfügbar "
+"sind?"
 
 #: clientgui/DlgOptions.cpp:184
 msgid "Run Manager at login?"
@@ -2055,12 +2055,12 @@ msgstr "Port:"
 #: clientgui/DlgOptions.cpp:282
 #: clientgui/DlgOptions.cpp:346
 msgid "Don't use proxy for:"
-msgstr "Keinen Proxy benutzen für:"
+msgstr "Keinen Proxyserver benutzen für:"
 
 #: clientgui/DlgOptions.cpp:289
 #: clientgui/DlgOptions.cpp:353
 msgid "Leave these blank if not needed"
-msgstr "Leer lassen, wenn nicht benötigt."
+msgstr "Bitte leer lassen, falls nicht benötigt."
 
 #: clientgui/DlgOptions.cpp:295
 #: clientgui/DlgOptions.cpp:359
@@ -2079,7 +2079,7 @@ msgstr "Passwort:"
 
 #: clientgui/DlgOptions.cpp:310
 msgid "HTTP Proxy"
-msgstr "HTTP Proxy"
+msgstr "HTTP Proxyserver"
 
 #: clientgui/DlgOptions.cpp:318
 msgid "Connect via SOCKS proxy server"
@@ -2091,11 +2091,11 @@ msgstr "SOCKS Proxyserver Konfiguration"
 
 #: clientgui/DlgOptions.cpp:374
 msgid "SOCKS Proxy"
-msgstr "SOCKS Proxy"
+msgstr "SOCKS Proxyserver"
 
 #: clientgui/DlgOptions.cpp:572
 msgid "always"
-msgstr "dauerhaft"
+msgstr "ständig"
 
 #: clientgui/DlgOptions.cpp:573
 msgid "1 hour"
@@ -2115,7 +2115,7 @@ msgstr "1 Woche"
 
 #: clientgui/DlgOptions.cpp:577
 msgid "never"
-msgstr "nie"
+msgstr "niemals"
 
 #: clientgui/DlgOptions.cpp:674
 #, c-format
diff --git a/locale/de/BOINC-Project-Generic.po b/locale/de/BOINC-Project-Generic.po
index 3ca8ad8..ff779bf 100644
--- a/locale/de/BOINC-Project-Generic.po
+++ b/locale/de/BOINC-Project-Generic.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: BOINC Project (Generic) 6.x\n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at boinc.berkeley.edu>\n"
 "POT-Creation-Date: 2012-01-16 11:31 PST\n"
-"PO-Revision-Date: 2012-03-23 18:53+0200\n"
+"PO-Revision-Date: 2012-10-17 18:38+0200\n"
 "Last-Translator: Christian <djangofett at gmx.net>\n"
 "Language-Team: BOINC Development Team <boinc_loc at ssl.berkeley.edu>\n"
 "Language: de\n"
@@ -42,12 +42,10 @@ msgid "Underline text: [u]text[/u]  (alt+u)"
 msgstr "Unterstrichener Text: [u]text[/u]  (alt+u)"
 
 #: ../inc/bbcode_html.inc:20
-#, fuzzy
 msgid "Quote text: [quote]text[/quote]  (alt+q)"
 msgstr "Zitierter Text: [quote]text[/quote]  (alt+q)"
 
 #: ../inc/bbcode_html.inc:23
-#, fuzzy
 msgid "Code display: [code]code[/code]  (alt+c)"
 msgstr "Quelltext anzeigen: [code]Quelltext[/code]  (alt+c)"
 
@@ -221,7 +219,7 @@ msgstr "Diskussionsforen"
 # Forum sample index page
 #: ../inc/forum.inc:187 ../inc/forum.inc:195
 msgid "%1 message board"
-msgstr "%1 Diskussionsforum"
+msgstr "%1 Diskussionsforen"
 
 #: ../inc/forum.inc:238 ../inc/result.inc:658
 msgid "Previous"
@@ -237,7 +235,7 @@ msgstr "Nachricht senden"
 
 #: ../inc/forum.inc:535
 msgid "Send %1 a private message"
-msgstr "Eine Privatnachricht an %1 senden"
+msgstr "Private Nachricht an %1 senden"
 
 #: ../inc/forum.inc:536
 msgid "Joined: %1"
@@ -281,7 +279,6 @@ msgid "Posted: %1"
 msgstr "Geschrieben: %1"
 
 #: ../inc/forum.inc:582
-#, fuzzy
 msgid " - in response to "
 msgstr " - als Antwort für "
 
@@ -295,7 +292,7 @@ msgstr "Diese Nachricht bearbeiten"
 
 #: ../inc/forum.inc:591
 msgid "Last modified: %1"
-msgstr "Letzte Änderung: %1"
+msgstr "Zuletzt verändert: %1"
 
 #: ../inc/forum.inc:594
 msgid ""
@@ -311,7 +308,7 @@ msgstr "Diesen Beitrag als anstößig melden"
 
 #: ../inc/forum.inc:622 ../inc/forum.inc:633
 msgid "Report as offensive"
-msgstr "Anstößigen Beitrag melden"
+msgstr "Als anstößig melden"
 
 #: ../inc/forum.inc:626
 msgid "Rating: %1"
@@ -396,7 +393,7 @@ msgstr ""
 "            oder das Thema an sich reißen sollen.\n"
 "        <li> Keine Beiträge die mit Absicht feindselig oder beleidigend "
 "sind.\n"
-"        <li> Keine beleidigenden Kommentare zu Ethnie, Religion,\n"
+"        <li> Keine beleidigenden Kommentare zu Alter, Ethnie, Religion,\n"
 "            Nationalität, Geschlecht, Schicht oder Sexualität.\n"
 "        "
 
@@ -467,8 +464,8 @@ msgid ""
 "system."
 msgstr ""
 "Sie können für den Moment keine weiteren Themen mehr anlegen. Bitte warten "
-"Sie eine gewisse Zeit und versuchen Sie es dann erneut. Diese Verzögerung "
-"wurde eingeführt, um Missbrauch des Systems vorzubeugen."
+"Sie einige Zeit und versuchen Sie es dann erneut. Diese Verzögerung wurde "
+"eingeführt, um Missbrauch des Systems vorzubeugen."
 
 #: ../inc/forum.inc:1093
 msgid ""
@@ -750,12 +747,12 @@ msgstr "% der Gesamtlaufzeit von BOINC"
 #: ../inc/host.inc:183
 #, php-format
 msgid "While BOINC running, % of time host has an Internet connection"
-msgstr "Während BOINC läuft, % der Zeit in der eine Internetverbindung besteht"
+msgstr "Während BOINC läuft, besteht % der Zeit eine Internetverbindung"
 
 #: ../inc/host.inc:185
 #, php-format
 msgid "While BOINC running, % of time work is allowed"
-msgstr "Während BOINC läuft, % der Zeit in der Berechnungen erlaubt sind"
+msgstr "Während BOINC läuft, sind in % der Zeit Berechnungen erlaubt"
 
 #: ../inc/host.inc:187
 msgid "Average CPU efficiency"
@@ -917,7 +914,7 @@ msgstr "Schreiben"
 
 #: ../inc/pm.inc:33 ../inc/user.inc:373
 msgid "Send private message"
-msgstr "Privatnachricht versenden"
+msgstr "Private Nachricht versenden"
 
 #: ../inc/pm.inc:35 ../inc/pm.inc:37 ../inc/pm.inc:89
 #: ../user/ffmail_form.php:59 ../user/forum_edit.php:99
@@ -995,8 +992,8 @@ msgid ""
 "Suspend work while computer is on battery power? %1 Matters only for "
 "portable computers %2"
 msgstr ""
-"Ausführung anhalten bei Batteriebetrieb? %1(gilt nur für tragbare Computer)%"
-"2"
+"Ausführung anhalten bei Batteriebetrieb? %1 (gilt nur für tragbare Computer) "
+"%2"
 
 #: ../inc/prefs.inc:84
 msgid "Suspend work while computer is in use?"
@@ -1006,8 +1003,8 @@ msgstr "Ausführung anhalten wenn der Computer benutzt wird?"
 msgid ""
 "Suspend GPU work while computer is in use? %1 Enforced by version 6.6.21+ %2"
 msgstr ""
-"Ausführung auf Grafikkarte anhalten wenn der Computer benutzt wird? %"
-"1Unterstützt ab Version 6.7 aufwärts%2"
+"Ausführung auf Grafikkarte anhalten wenn der Computer benutzt wird? %1 "
+"Unterstützt ab Version 6.6.21 %2"
 
 #: ../inc/prefs.inc:98
 msgid "'In use' means mouse/keyboard activity in last"
@@ -1022,8 +1019,8 @@ msgid ""
 "Suspend work if no mouse/keyboard activity in last %1 Needed to enter low-"
 "power mode on some computers %2"
 msgstr ""
-"Arbeit unterbrechen wenn keine Maus-/Tastaturaktivität für %1(zur "
-"Umschaltung in den Ruhemodus bei manchen PC)%2"
+"Arbeit unterbrechen wenn keine Maus-/Tastaturaktivität für %1 Wird bei "
+"manchen PC zur Umschaltung in den Ruhemodus benötigt %2"
 
 #: ../inc/prefs.inc:113
 msgid ""
@@ -1036,19 +1033,20 @@ msgstr ""
 #: ../inc/prefs.inc:121
 msgid "Do work only between the hours of %1 No restriction if equal %2"
 msgstr ""
-"Erlaube Arbeit nur in der Zeit zwischen %1Keine Einschränkung wenn gleich%2"
+"Erlaube Arbeit nur in der Zeit zwischen %1 Keine Einschränkung wenn gleich %"
+"2"
 
 #: ../inc/prefs.inc:129
 msgid ""
 "Leave tasks in memory while suspended? %1 Suspended tasks will consume swap "
 "space if 'yes' %2"
 msgstr ""
-"Angehaltene Arbeitspakete im Speicher belassen? %1Benötigt viel "
-"Arbeitsspeicher wenn 'Ja'%2"
+"Angehaltene Arbeitspakete im Speicher belassen? %1 wenn 'Ja', wird Speicher "
+"in der Auslagerungsdatei belegt %2"
 
 #: ../inc/prefs.inc:138
 msgid "Switch between tasks every %1 Recommended: 60 minutes %2"
-msgstr "Wechsle zwischen den Tasks alle %1Empfohlen: 60 Minuten%2"
+msgstr "Wechsle zwischen den Tasks alle %1 Empfohlen: 60 Minuten %2"
 
 #: ../inc/prefs.inc:146
 msgid "On multiprocessors, use at most"
@@ -1061,17 +1059,17 @@ msgstr "Prozessoren"
 #: ../inc/prefs.inc:152
 msgid "On multiprocessors, use at most %1 Enforced by version 6.1+ %2"
 msgstr ""
-"Bei mehreren Prozessoren, nutze höchstens %1Unterstützt ab Version 6.1 "
-"aufwärts%2"
+"Bei mehreren Prozessoren, nutze höchstens %1 Unterstützt ab Version 6.1 %2"
 
 #: ../inc/prefs.inc:157
 #, php-format
 msgid "% of the processors"
-msgstr "% von den Prozessoren"
+msgstr "% der Prozessoren"
 
 #: ../inc/prefs.inc:161
 msgid "Use at most %1 Can be used to reduce CPU heat %2"
-msgstr "Nutze höchstens %1Kann benutzt werden um Überhitzung zu vermeiden.%2"
+msgstr ""
+"Nutze höchstens %1 Kann benutzt werden um CPU Überhitzung zu vermeiden %2"
 
 #: ../inc/prefs.inc:166
 #, php-format
@@ -1089,8 +1087,8 @@ msgstr "GB"
 #: ../inc/prefs.inc:179
 msgid "Disk: leave free at least %1 Values smaller than %2 are ignored %3"
 msgstr ""
-"Festplatte: mindestens frei zulassen %1Werte kleiner als %2 werden ignoriert"
-"%3"
+"Festplatte: mindestens frei zulassen %1 Werte kleiner als %2 werden "
+"ignoriert %3"
 
 #: ../inc/prefs.inc:190 ../inc/prefs.inc:200 ../inc/prefs.inc:205
 #: ../inc/prefs.inc:210
@@ -1142,15 +1140,16 @@ msgid ""
 "Confirm before connecting to Internet? %1 Matters only if you have a modem, "
 "ISDN or VPN connection %2"
 msgstr ""
-"Bestätigen vor Verbindungsaufbau zum Internet? %1Nur für Modem, ISDN oder "
-"VPN nötig.%2"
+"Bestätigen vor Verbindungsaufbau zum Internet? %1 Nur für Modem, ISDN oder "
+"VPN Verbindungen nötig. %2"
 
 #: ../inc/prefs.inc:241
 msgid ""
 "Disconnect when done? %1 Matters only if you have a modem, ISDN or VPN "
 "connection %2"
 msgstr ""
-"Trennen wenn Aufgabe/n erledigt? %1Nur für Modem, ISDN oder VPN nötig.%2"
+"Trennen wenn Aufgabe/n erledigt? %1 Nur für Modem, ISDN oder VPN "
+"Verbindungen nötig.%2"
 
 #: ../inc/prefs.inc:249
 msgid "Maximum download rate:"
@@ -1171,7 +1170,7 @@ msgstr "Nutze das Netzwerk nur in der Zeit von/bis"
 
 #: ../inc/prefs.inc:263
 msgid "Transfer at most %1 Enforced by version 6.10.46+ %2"
-msgstr "Übertrage höchstens %1 Unterstützt ab Version 6.10.46 aufwärts %2"
+msgstr "Übertrage höchstens %1 Unterstützt ab Version 6.10.46 %2"
 
 #: ../inc/prefs.inc:269
 msgid "Mbytes every"
@@ -1201,20 +1200,19 @@ msgstr ""
 
 #: ../inc/prefs.inc:298
 msgid "Accelerate GPU tasks by dedicating a CPU to each one?"
-msgstr ""
-"Bereitstellung jeweils einer CPU für jede GPU? (Beschleunigt Berechnung)"
+msgstr "Beschleunige Berechnung, durch Bereitstellung jeweils einer CPU je GPU?"
 
 #: ../inc/prefs.inc:308
 msgid "Use CPU %1 Enforced by version 6.10+ %2"
-msgstr "Benutze CPU %1 Unterstützt ab Version 6.10 aufwärts% 2"
+msgstr "Benutze CPU %1 Unterstützt ab Version 6.10 %2"
 
 #: ../inc/prefs.inc:320
 msgid "Use ATI GPU %1 Enforced by version 6.10+ %2"
-msgstr "Benutze ATI GPU %1 Unterstützt ab Version 6.10 aufwärts %2"
+msgstr "Benutze ATI GPU %1 Unterstützt ab Version 6.10 %2"
 
 #: ../inc/prefs.inc:332
 msgid "Use NVIDIA GPU %1 Enforced by version 6.10+ %2"
-msgstr "Benutze Nvidia GPU %1 Unterstützt ab Version 6.10 aufwärts %2"
+msgstr "Benutze Nvidia GPU %1 Unterstützt ab Version 6.10 %2"
 
 #: ../inc/prefs.inc:346
 msgid ""
@@ -5321,6 +5319,47 @@ msgid ""
 "If you have comments about the policy, email %2.\n"
 "\n"
 msgstr ""
+"\n"
+"<p>\n"
+"Moderatoren können Beiträge löschen die gegen einer dieser Regeln verstoßen.\n"
+"Die Autoren der gelöschten Beiträge werden per email benachrichtigt.\n"
+"Bei schwerwiegenden Verstößen wird dem Benutzer vorrübergehend die Fähigkeit "
+"Nachrichten zu schreiben entzogen.\n"
+"(Um Missbrauch zu verhindern haben daher nur Projektadministratoren die "
+"Möglichkeit dies zu tun).\n"
+"Weitere Arten von schlechtem Verhalten sind (\"Phishing\" das ausspähen von\n"
+"IP-Adressen und anderer Daten der Benutzer, übermäßige Erstellung von "
+"Beiträgen und Themen\n"
+"um das Forum zu zuspämmen, etc.), auch ähnliche Verstöße die nicht in den "
+"offiziellen Regeln aufgeführt sind\n"
+"können zu Strafen führen.\n"
+"<p>\n"
+"Wenn Sie denken das ein Beitrag gegen geltende Regeln verstößt,\n"
+"dann klicken Sie auf das rote x im Beitrag, und füllen Sie das Formular aus;\n"
+"Ihre Beschwerde wird den Moderatoren mitgeteilt.\n"
+"Bitte benutzen Sie den Button nur für klare Regelverstöße - nicht\n"
+"für persönliche Streitigkeiten.\n"
+"<p>\n"
+"Wir werden versuchen so gerecht wie möglich zu sein beim Moderieren,\n"
+"aber in einer großen Gemeinschaft von Nutzern, mit vielen unterschiedlichen "
+"Standpunkten,\n"
+"wird es immer einige Leute geben die nicht mit unseren\n"
+"Entscheidungen zufrieden sind.\n"
+"Wir bedauern wenn das passiert,\n"
+"Bitte sehen Sie ein das wir es nicht allen recht machen können,\n"
+"und wir unsere Entscheidungen auf der Grundlage der uns zur Verfügung "
+"stehenden Mittel und\n"
+"das was am besten für die Allgemeinheit im Forum ist treffen.\n"
+"Bitte Diskutieren Sie unsere Forumspolitik nicht im Forum! Wir sind kein\n"
+"Gesellschafts Wissentschaftsprojekt noch ist es unsere Pflicht\n"
+"ein perfektes faires System zu erschaffen. Da solche Diskussionen und "
+"eventuelle aufkommende beleidigende Äußerungen\n"
+"tendenziell kontra produktiv sind. Wenn Sie ein berechtigtes Anliegen haben,\n"
+"dann senden Sie uns eine email an die unten angegebene Adresse.\n"
+"<p>\n"
+"Diese Forum Moderations Regeln gelten für das %1 Project.\n"
+"Wenn Sie Fragen oder Kommentare zu diesem Bestimmungen haben, email %2.\n"
+"\n"
 
 #: ../user/pending.php:66
 msgid "Result ID"
diff --git a/locale/de/BOINC-Web.mo b/locale/de/BOINC-Web.mo
index 8a5ab4a..353b9c3 100644
Binary files a/locale/de/BOINC-Web.mo and b/locale/de/BOINC-Web.mo differ
diff --git a/locale/de/BOINC-Web.po b/locale/de/BOINC-Web.po
index e93f0cd..eceba5c 100644
--- a/locale/de/BOINC-Web.po
+++ b/locale/de/BOINC-Web.po
@@ -4,7 +4,7 @@ msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at ssl.berkeley.edu>\n"
 "POT-Creation-Date: 2011-04-04 22:09 PDT\n"
-"PO-Revision-Date: 2012-03-23 19:00+0200\n"
+"PO-Revision-Date: 2012-10-17 18:51+0200\n"
 "Last-Translator: Christian <djangofett at gmx.net>\n"
 "Language-Team: BOINC Development Team <boinc_loc at ssl.berkeley.edu>\n"
 "Language: de\n"
@@ -335,6 +335,16 @@ msgid ""
 "single event of interest can be expected to occur.  Our research group is "
 "interested in calculating the long time dynamics of systems."
 msgstr ""
+"Ein bekanntes Problem der theoretischen Chemie, der Physik dichter Materie "
+"und der Materialwissenschaft ist die Berechnung der Zeitentwicklung eines "
+"Systems auf atomarer Ebene, bei dem beispielsweise chemische Reaktionen "
+"und/oder Diffusionen auftreten. Im Allgemeinen sind die interessanten "
+"Ereignisse äußerst selten (um mehrere Größenordnungen langsamer als die "
+"Schwingungsbewegungen der Atome). Dafür bräuchten tatsächliche Simulationen, "
+"die jede Bewegung der Atome aufzeichnen, tausende Jahre Rechenzeit auf dem "
+"schnellsten existierenden Computer bevor ein solches Ereignis zu erwarten "
+"ist. Unsere Forschungsgruppe ist interessiert an der Berechnung der "
+"Langzeit-Dynamik von atomaren Systemen."
 
 #: projects.inc:158
 msgid "Orbit at home"
@@ -406,6 +416,13 @@ msgid ""
 "argon, or to test the validity of the ideal gas law by actually doing the "
 "simulations through the grid."
 msgstr ""
+"Berechnungen der Oberflächenforschung mit der klassichen Dynamik. Leiden "
+"Classical erlaubt es Freiwilligen, Studenten und anderen Wissenschaftlern "
+"ihre eigenen Berechnungen in das Rechennetz einzuspeisen. Jeder Anwender hat "
+"seine eigene Schlange von Arbeiten für das Projekt. Auf diese Weise haben "
+"Studenten das Rechennetz genutzt um flüssiges Argon zu simulieren oder das "
+"Gesetz des idealen Gases durch Simulationen mit Hilfe des Rechennetzes zu "
+"beweisen."
 
 #: projects.inc:190
 msgid "uFluids at home"
@@ -413,7 +430,7 @@ msgstr "uFluids at home"
 
 #: projects.inc:192
 msgid "Purdue University"
-msgstr "Purdue Universität"
+msgstr "Universität Purdue"
 
 #: projects.inc:193
 msgid "Physics/Aeronautics"
@@ -426,6 +443,10 @@ msgid ""
 "management devices and address two-phase flow in microchannel and MEMS "
 "devices."
 msgstr ""
+"Das µFluids-Projekt simuliert das Verhalten von Zwei-Phasen-Fluiden "
+"unter Mikrogravitation und Mikrofluid-Probleme. Unser Ziel ist eine "
+"Verbesserung von Geräten zur Steuerung von Satellitenantrieben und die Zwei-"
+"Phasen-Strömung in Mikrokanälen und MEMS-Geräten anzugehen."
 
 #: projects.inc:198
 msgid "Einstein at home"
@@ -433,7 +454,7 @@ msgstr "Einstein at home"
 
 #: projects.inc:200
 msgid "Univ. of Wisconsin - Milwaukee, Max Planck Institute"
-msgstr "Univ. von Wisconsin in Milwaukee,  Max Planck Institut"
+msgstr "Universität von Wisconsin in Milwaukee,  Max-Planck-Institut"
 
 #: projects.inc:201
 msgid "Astrophysics"
@@ -567,6 +588,9 @@ msgid ""
 "adopt the technologies of volunteer computing and volunteer thinking for "
 "their research."
 msgstr ""
+"Das Ziel von CAS at home ist die Förderung und Unterstützung der "
+"Wissenschaftler in China sich die Technologie der freiwilligen Mithilfe und "
+"Datenverarbeitung für Ihre Forschung anzueignen."
 
 #: projects.inc:252
 msgid "Yoyo at home"
@@ -581,17 +605,18 @@ msgid ""
 "Yoyo at home is an adapter between BOINC and several existing volunteer "
 "computing projects: ECM, Muon, Evolution at home, and distributed.net"
 msgstr ""
+"Yoyo at home ist ein Adapter zwischen BOINC und einigen existierenden "
+"verteiltes Rechnen Projekten: ECM, Muon, Evolution at home und distributed.net."
 
 #: projects.inc:259
 msgid "EDGeS at Home"
-msgstr ""
+msgstr "EDGeS at Home"
 
 #: projects.inc:261 projects.inc:360
 msgid "MTA-SZTAKI Laboratory of Parallel and Distributed Systems (Hungary)"
 msgstr "MTA-SZTAKI - Labor für Parallele und Verteilte Systeme (Ungarn)"
 
 #: projects.inc:262
-#, fuzzy
 msgid "European research projects"
 msgstr "Europäische Forschungsprojekte"
 
@@ -602,17 +627,21 @@ msgid ""
 "processed by the volunteers of this project. The scientific projects covered "
 "by the project include math, physics, biology, etc."
 msgstr ""
+"Das EDGeS at home Beta Projekt integriert freiwillige Berechnungen in das "
+"Service-Grid-Netzwerk Europas, indem es Service-Grids ermöglicht wird "
+"Arbeitseinheiten von Freiwilligen ausführen zu lassen. Die "
+"wissenschaftlichen Projekte, die von dem Projekt abgedeckt werden beinhalten "
+"Mathematik, Physik, Biologie, u.a.."
 
 #: projects.inc:267
 msgid "Ibercivis"
-msgstr ""
+msgstr "Ibercivis"
 
 #: projects.inc:269
 msgid "Spanish universities and research centers"
 msgstr "Spanische Universitäten und Forschungszentren"
 
 #: projects.inc:270
-#, fuzzy
 msgid "Various Spanish research projects"
 msgstr "Verschiedene spanische Forschungsprojekte"
 
@@ -622,11 +651,11 @@ msgstr "Forschung im Bereich der Physik, Materialforschung und Biomedizin"
 
 #: projects.inc:275
 msgid "World Community Grid"
-msgstr ""
+msgstr "World Community Grid"
 
 #: projects.inc:277
 msgid "IBM Corporate Community Relations"
-msgstr ""
+msgstr "IBM Corporate Community Relations"
 
 #: projects.inc:278
 msgid "Humanitarian research on disease, natural disasters and hunger."
@@ -640,6 +669,11 @@ msgid ""
 "problems by creating the world's largest volunteer computing grid.  Research "
 "includes HIV/AIDS, cancer, muscular dystrophy, dengue fever, and many more."
 msgstr ""
+"Für weitere wichtige Non-Profit-Forschung an den die Menschheit am meisten "
+"bedrückenden Problemen, indem man das weltweit größte Netz freiwillige "
+"Rechner erstellt. Die Forschung beinhaltet HIV/AIDS, Krebs, "
+"Muskeldystrophie, Dengue Fieber und viele weitere Krankheiten und andere "
+"Probleme."
 
 #: projects.inc:285
 msgid "Mathematics, computing, and games"
@@ -647,7 +681,7 @@ msgstr "Mathematik, Berechnungen und Spiele"
 
 #: projects.inc:288
 msgid "Enigma at Home"
-msgstr ""
+msgstr "Enigma at Home"
 
 #: projects.inc:291 projects.inc:345
 msgid "Cryptography"
@@ -664,7 +698,7 @@ msgstr ""
 
 #: projects.inc:295
 msgid "Collatz Conjecture"
-msgstr ""
+msgstr "Collatz Conjecture"
 
 #: projects.inc:298 projects.inc:337 projects.inc:353 projects.inc:361
 msgid "Mathematics"
@@ -673,19 +707,20 @@ msgstr "Mathematik"
 #: projects.inc:299
 msgid "Study the Collatz Conjecture, an unsolved conjecture in mathematics"
 msgstr ""
+"Untersuchung des Collatz Problems, ein ungelöstes Mathematisches Problem"
 
 # 75%
 #: projects.inc:302
 msgid "NFS at home"
-msgstr ""
+msgstr "NFS at home"
 
 #: projects.inc:304
 msgid "California State University Fullerton"
-msgstr ""
+msgstr "Universität von California in Fullerton"
 
 #: projects.inc:305
 msgid "Factorization of large integers"
-msgstr ""
+msgstr "Faktorisierung großer natürlicher Zahlen"
 
 #: projects.inc:306
 msgid ""
@@ -705,16 +740,17 @@ msgstr ""
 
 #: projects.inc:310
 msgid "VTU at home"
-msgstr ""
+msgstr "VTU at home"
 
 #: projects.inc:312
 msgid ""
 "Vilnius Gediminas Technical University and Kaunas University of Technology "
 "(Lithuania)"
 msgstr ""
+"Technische Gediminas-Universität Vilnius und der Technischen Universität "
+"Kaunas in Litauen"
 
 #: projects.inc:313
-#, fuzzy
 msgid "Software testing"
 msgstr "Software tests"
 
@@ -725,18 +761,23 @@ msgid ""
 "well as others Lithuanian academic institutions.  Current applications "
 "involve the study of Monte-Carlo based software testing."
 msgstr ""
+"Das Ziel dieses Projekts ist die Bereitstellung einer leistungstarken "
+"Verteiltes-Rechnen-Plattform für Wissenschaftler der Technischen Gediminas-"
+"Universität in Vilnius und für andere akademische Institute Litauens. "
+"Derzeitige Anwendungen beinhalten die Erforschung von Monte-Carlo-basierten "
+"Softwaretests. "
 
 #: projects.inc:318
 msgid "AQUA at home"
-msgstr ""
+msgstr "AQUA at home"
 
 #: projects.inc:320
 msgid "D-Wave Systems, Inc."
-msgstr ""
+msgstr "D-Wave Systems, Inc."
 
 #: projects.inc:321
 msgid "Quantum computing"
-msgstr ""
+msgstr "Quantenberechnung"
 
 #: projects.inc:322
 msgid ""
@@ -747,15 +788,22 @@ msgid ""
 "computers to help design and analyze quantum computing algorithms, using "
 "Quantum Monte Carlo techniques."
 msgstr ""
+"D-Waves AQUA (Adiabatische QUanten Algorithmen) ist ein Forschungsprojekt "
+"dessen Ziel die Vorhersage der Leistung von supraleitenden adiabatischen "
+"Quantenrechnern bei eine Vielzahl großer Probleme angefangen mit "
+"Materialforschung bis maschinellem Lernen ist. AQUA at home verwendet mit dem "
+"Internet verbundene Rechner, um sich bei der Entwicklung und Analysierung "
+"von Quantenberechnungsalgorithmen helfen zu lassen. Dabei werden Quanten-"
+"Monte-Carlo-Techniken angewandt."
 
 #: projects.inc:334
 #, fuzzy
 msgid "ABC at home"
-msgstr "zu Hause"
+msgstr "ABC at home"
 
 #: projects.inc:336
 msgid "Mathematical Institute of Leiden University / Kennislink"
-msgstr ""
+msgstr "Mathematisches Institut der Universität Leiden / Kennislink"
 
 #: projects.inc:338
 msgid ""
@@ -767,15 +815,23 @@ msgid ""
 "problems in mathematics. If it is proven to be true, a lot of other open "
 "problems can be answered directly from it."
 msgstr ""
+"Suche nach \"ABC-Tripeln\": Positive Zahlen a,b,c; zum Beispiel a+b=c, a < "
+"b < c, a,b,c haben keinen gemeinsamen Divisor und c sei größer als als "
+"rad(abc), wobei rad(n) das Produkt verschiedener Primzahlfaktoren von n ist. "
+"Die ABC-VErmutung sagt aus, dass es nur eine begrenzte Anzahl von a,b,c "
+"gibt, die log(c)/log(rad(abc))>h für alle reellen h>1 erfüllen. Die ABC-"
+"Vermutung ist zur Zeit eines der größten bekannten Probleme der Mathematik. "
+"Sollte sie bewiesen werden, können viele andere Probleme dadurch gelöst "
+"werden."
 
 #: projects.inc:342
 msgid "PrimeGrid"
-msgstr ""
+msgstr "PrimeGrid"
 
 #: projects.inc:344
 #, fuzzy
 msgid "Private"
-msgstr "privat"
+msgstr "Privat"
 
 #: projects.inc:346
 msgid ""
@@ -789,39 +845,43 @@ msgstr ""
 
 #: projects.inc:350
 msgid "primaboinca"
-msgstr ""
+msgstr "primaboinca"
 
 #: projects.inc:352
 msgid "Hochschule RheinMain University of Applied Sciences"
-msgstr ""
+msgstr "Hochschule RheinMain Universität der Angewandten Wissenschaften"
 
 #: projects.inc:354
 msgid ""
 "Search for counterexamples to two conjectures related to the identification "
 "of prime numbers"
 msgstr ""
+"Suche nach Gegenbeispielen für zwei Vermutungen die sich auf die "
+"Identifizierung von Primzahlen beziehen"
 
 #: projects.inc:358
 msgid "SZTAKI Desktop Grid"
-msgstr ""
+msgstr "SZTAKI Desktop Grid"
 
 #: projects.inc:362
 msgid ""
 "Find all the generalized binary number systems (in which bases are matrices "
 "and digits are vectors) up to dimension 11."
 msgstr ""
+"Finde alle verallgemeinerten binären Zahlensysteme (in denen Basen Matrizen "
+"und Zeichen Vektoren sind) bis zur Dimension 11."
 
 #: projects.inc:382
 msgid "Chess960 at home"
-msgstr ""
+msgstr "Chess960 at home"
 
 #: projects.inc:384
 msgid "Chess-960.org"
-msgstr ""
+msgstr "Chess-960.org"
 
 #: projects.inc:385
 msgid "Game-playing"
-msgstr ""
+msgstr "Spiele"
 
 #: projects.inc:386
 msgid ""
@@ -830,6 +890,10 @@ msgid ""
 "before the start of every game, the initial configuration of the chess "
 "pieces is determined randomly."
 msgstr ""
+"Das Projekt untersucht Schach 960, eine Variante des klassischen Schachs. Im "
+"klassischen Schach ändert sich die Startposition niemals. Bei Schach 960, "
+"kurz vor dem Start jedes Spiels, werden die Startaufstellungen zufällig "
+"ausgewählt."
 
 #: versions.inc:6
 msgid "The current release is known to work with these Linux versions:"
diff --git a/locale/de/pootle-boinctrunk-de.prefs b/locale/de/pootle-boinctrunk-de.prefs
deleted file mode 100644
index df3738d..0000000
--- a/locale/de/pootle-boinctrunk-de.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-# Pootle preferences for project boinctrunk, language de
-
-rights:
-  JensSeidler = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  ChristianB = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-goals:
-  testgoal:
-    files = ''
-    users = u'ChristianB'
diff --git a/locale/el/pootle-boinctrunk-el.prefs b/locale/el/pootle-boinctrunk-el.prefs
deleted file mode 100644
index f04cebe..0000000
--- a/locale/el/pootle-boinctrunk-el.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language el
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Anark = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/es/BOINC-Manager.mo b/locale/es/BOINC-Manager.mo
index e5eff9a..84bcb36 100644
Binary files a/locale/es/BOINC-Manager.mo and b/locale/es/BOINC-Manager.mo differ
diff --git a/locale/es/BOINC-Manager.po b/locale/es/BOINC-Manager.po
index 371d884..2734695 100644
--- a/locale/es/BOINC-Manager.po
+++ b/locale/es/BOINC-Manager.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: BOINC Manager 4.x\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-03-05 10:58-0500\n"
-"PO-Revision-Date: 2012-06-24 23:09+0200\n"
+"PO-Revision-Date: 2012-07-08 20:47+0200\n"
 "Last-Translator: David M <davidcomp2 at telefonica dot net>\n"
 "Language-Team: BOINC Development Team <rwalton at ssl.berkeley.edu>\n"
 "Language: es\n"
@@ -990,7 +990,7 @@ msgstr "Hay nuevos avisos - haz click para verlos."
 
 #: clientgui/CompletionErrorPage.cpp:199
 msgid "Failed to add project"
-msgstr "Fallo al agregar el proyecto"
+msgstr "Fallo al añadir el proyecto"
 
 #: clientgui/CompletionErrorPage.cpp:204
 msgid "Failed to update account manager"
@@ -1002,7 +1002,7 @@ msgstr "Fallo al borrar el administrador de cuentas"
 
 #: clientgui/CompletionErrorPage.cpp:212
 msgid "Failed to add account manager"
-msgstr "Fallo al agregar el administrador de cuentas"
+msgstr "Fallo al añadir el administrador de cuentas"
 
 #: clientgui/CompletionErrorPage.cpp:221
 msgid ""
@@ -1130,7 +1130,7 @@ msgstr "Error de Validación"
 #: clientgui/DlgAdvPreferences.cpp:793
 #: clientgui/DlgAdvPreferences.cpp:798
 msgid "Applications to add"
-msgstr "Aplicaciones a agregar"
+msgstr "Aplicaciones a añadir"
 
 #: clientgui/DlgAdvPreferences.cpp:814
 #, c-format
@@ -1141,15 +1141,15 @@ msgstr "'%s' no es una aplicación ejecutable."
 #: clientgui/DlgAdvPreferences.cpp:848
 #: clientgui/DlgAdvPreferences.cpp:872
 msgid "Add Exclusive App"
-msgstr "Agregar Aplicación Exclusiva"
+msgstr "Añadir Aplicación Exclusiva"
 
 #: clientgui/DlgAdvPreferences.cpp:826
 msgid "Name of application to add?"
-msgstr "Nombre de la aplicación a agregar"
+msgstr "¿Nombre de la aplicación a añadir?"
 
 #: clientgui/DlgAdvPreferences.cpp:826
 msgid "Add exclusive app"
-msgstr "Agregar aplicación exclusiva"
+msgstr "Añadir aplicación exclusiva"
 
 #: clientgui/DlgAdvPreferences.cpp:847
 #, c-format
@@ -1651,7 +1651,7 @@ msgstr "&Cerrar"
 #: clientgui/DlgEventLog.cpp:307
 #, c-format
 msgid "Get help with %s"
-msgstr ""
+msgstr "Obtener ayuda con %s"
 
 #: clientgui/DlgEventLog.cpp:321
 msgid "Show all &messages"
@@ -1682,10 +1682,15 @@ msgid ""
 "If you also want to stop running the tasks,\n"
 "choose from the following options:"
 msgstr ""
+"Ha solicitado salir de %s,\n"
+"que le permite ver y administrar\n"
+"las tareas ejecutándose en su ordenador.\n"
+"\n"
+"Si también quiere parar de ejecutar las tareas,\n"
+"elija entre las siguientes opciones:"
 
 #: clientgui/DlgExitMessage.cpp:135
-#, c-format
-#, fuzzy, c-format
+#, c-format, c-format
 msgid ""
 "This will shut down %s and its tasks until either the\n"
 "%s or the %s screen saver is run again.\n"
@@ -1694,12 +1699,11 @@ msgid ""
 "rather than to exit the application; that will allow %s to run its\n"
 "tasks at the times you selected in your preferences."
 msgstr ""
-"Esto cerrará %s y sus tareas completamente hasta que indistintamente la "
-"aplicación\n"
-"%s o el salvapantallas %s se ejecuten de nuevo.\n"
+"Esto cerrará %s y sus tareas hasta que la aplicación\n"
+"%s o el salvapantallas %s sean ejecutados de nuevo.\n"
 "\n"
-"En la mayoría de los casos, es mejor simplemente cerrar la ventana de %s\n"
-"antes que salir de la aplicación, eso le permitirá a %s ejecutar sus\n"
+"En la mayoría de los casos, es mejor cerrar la ventana de %s solamente\n"
+"más que salir de la aplicación, eso le permitirá a %s ejecutar sus\n"
 "tareas a las horas que usted seleccionó en sus preferencias."
 
 #: clientgui/DlgExitMessage.cpp:153
@@ -1732,9 +1736,8 @@ msgid "Project preference"
 msgstr "Preferencia del proyecto"
 
 #: clientgui/DlgItemProperties.cpp:174
-#, fuzzy
 msgid "Account manager preference"
-msgstr "Sitio web del administrador de cuentas"
+msgstr "Preferencia del administrador de cuentas"
 
 #: clientgui/DlgItemProperties.cpp:177
 msgid "Project has no apps for "
@@ -1826,7 +1829,7 @@ msgstr "Llamada al planificador en progreso"
 
 #: clientgui/DlgItemProperties.cpp:245
 msgid "Trickle-up pending"
-msgstr ""
+msgstr "Trickle-up pendiente"
 
 #: clientgui/DlgItemProperties.cpp:248
 #: clientgui/DlgItemProperties.cpp:250
@@ -2344,9 +2347,8 @@ msgid "Retrieving system state; please wait..."
 msgstr "Recuperando estado del sistema; por favor espere..."
 
 #: clientgui/MainDocument.cpp:1792
-#, fuzzy
 msgid "Missing application"
-msgstr "Programa"
+msgstr "Aplicación perdida"
 
 #: clientgui/MainDocument.cpp:1793
 msgid "Please download and install the CoRD application from http://cord.sourceforge.net"
@@ -2591,7 +2593,6 @@ msgid "Click"
 msgstr "Pulsar"
 
 #: clientgui/NoticeListCtrl.cpp:481
-#, fuzzy
 msgid "There are no notices at this time."
 msgstr "No hay avisos en este momento."
 
@@ -2619,7 +2620,6 @@ msgid "Categories:"
 msgstr "Categorías:"
 
 #: clientgui/ProjectInfoPage.cpp:588
-#, fuzzy
 msgid "Projects:"
 msgstr "Proyectos:"
 
@@ -2651,7 +2651,7 @@ msgstr "URL del proyecto:"
 msgid "This project may not have work for your type of computer.  Do you want to add it anyway?"
 msgstr ""
 "Puede que este proyecto no tenga trabajo para su tipo de ordenador.  ¿Quiere "
-"agregarlo de todas formas?"
+"añadirlo de todas formas?"
 
 #: clientgui/ProjectInfoPage.cpp:806
 msgid "You already added this project. Please choose a different project."
@@ -2805,7 +2805,6 @@ msgid "&%s"
 msgstr "&%s"
 
 #: clientgui/sg_BoincSimpleFrame.cpp:358
-#, fuzzy
 msgid "Default"
 msgstr "Predeterminado"
 
@@ -2905,8 +2904,7 @@ msgid "Close"
 msgstr "Cerrar"
 
 #: clientgui/sg_DlgMessages.cpp:332
-#, c-format
-#, fuzzy, c-format
+#, c-format, c-format
 msgid "%s - Notices"
 msgstr "%s - Avisos"
 
@@ -3020,23 +3018,23 @@ msgstr "60"
 
 #: clientgui/sg_DlgPreferences.cpp:282
 msgid "This dialog controls preferences for this computer only."
-msgstr ""
+msgstr "Este diálogo contola las preferencias de este ordenador solamente."
 
 #: clientgui/sg_DlgPreferences.cpp:287
 msgid "Click OK to set preferences."
-msgstr ""
+msgstr "Pulse Aceptar para establecer las preferencias."
 
 #: clientgui/sg_DlgPreferences.cpp:292
 msgid "Click Clear to restore web-based settings."
-msgstr ""
+msgstr "Haga clic en Restablecer para restaurar la configuración basada en web."
 
 #: clientgui/sg_DlgPreferences.cpp:299
 msgid "For additional settings, select Computing Preferences in "
-msgstr ""
+msgstr "Para ajustes adicionales, seleccione Preferencias de Computación en"
 
 #: clientgui/sg_DlgPreferences.cpp:304
 msgid "the Advanced View."
-msgstr ""
+msgstr "la Vista Avanzada."
 
 #: clientgui/sg_DlgPreferences.cpp:332
 msgid "Do work only between:"
@@ -3103,9 +3101,8 @@ msgid "%d"
 msgstr "%d"
 
 #: clientgui/sg_DlgPreferences.cpp:1031
-#, fuzzy
 msgid "Do you really want to clear all local preferences?\n"
-msgstr "¿Realmente desea restaurar todas las preferencias locales?"
+msgstr "¿Realmente desea borrar todas las preferencias locales?"
 
 #: clientgui/sg_ImageButton.cpp:90
 msgid "Paused: Other work running"
@@ -3231,17 +3228,16 @@ msgid "Remove Project"
 msgstr "Eliminar Proyecto"
 
 #: clientgui/sg_ProjectPanel.cpp:72
-#, fuzzy
 msgid "Add Project"
 msgstr "Añadir proyecto"
 
 #: clientgui/sg_ProjectPanel.cpp:73
 msgid "Synchronize"
-msgstr ""
+msgstr "Sincronizar"
 
 #: clientgui/sg_ProjectPanel.cpp:74
 msgid "Work done for this project"
-msgstr ""
+msgstr "Trabajo realizado para este proyecto"
 
 #: clientgui/sg_ProjectPanel.cpp:77
 #: clientgui/sg_ProjectsComponent.cpp:123
@@ -3250,32 +3246,31 @@ msgstr "Sincronizar los proyectos con el sistema de administrador de cuentas"
 
 #: clientgui/sg_ProjectPanel.cpp:124
 msgid "Select a project to access with the controls below"
-msgstr ""
+msgstr "Seleccione un proyecto al que acceder con los controles de abajo"
 
 #: clientgui/sg_ProjectPanel.cpp:134
 #: clientgui/sg_ProjectPanel.cpp:262
 #, c-format
 msgid "%s: %.0f"
-msgstr ""
+msgstr "%s: %.0f"
 
 #: clientgui/sg_ProjectPanel.cpp:145
-#, fuzzy
 msgid "Project Web Pages"
-msgstr "Sitio Web del proyecto"
+msgstr "Páginas Web del Proyecto"
 
 #: clientgui/sg_ProjectPanel.cpp:149
 msgid "Project Commands"
-msgstr ""
+msgstr "Comandos del Proyecto"
 
 #: clientgui/sg_ProjectPanel.cpp:267
 #, c-format
 msgid "Pop up a menu of websites for project %s"
-msgstr ""
+msgstr "Saca un menú de sitios web del proyecto %s"
 
 #: clientgui/sg_ProjectPanel.cpp:269
 #, c-format
 msgid "Pop up a menu of commands to apply to project %s"
-msgstr ""
+msgstr "Saca un menú de comandos a aplicar al proyecto %s"
 
 #: clientgui/sg_ProjectsComponent.cpp:196
 #: clientgui/sg_ProjectsComponent.cpp:207
@@ -3340,14 +3335,13 @@ msgid "Suspend work for this task."
 msgstr "Suspender el trabajo para esta tarea."
 
 #: clientgui/sg_TaskCommandPopup.cpp:251
-#, c-format
-#, fuzzy, c-format
+#, c-format, c-format
 msgid ""
 "Are you sure you want to abort this task '%s'?\n"
 "(Progress: %.1lf%%, Status: %s)"
 msgstr ""
-"¿Está seguro de querer cancelar esta tarea '%s'?\n"
-"(Progreso: %s % %, Estado: %s)"
+"¿Está seguro de querer cancelar la tarea '%s'?\n"
+"(Progreso: %.1lf%%, Estado: %s)"
 
 #: clientgui/sg_TaskCommandPopup.cpp:256
 msgid "Abort task"
@@ -3355,67 +3349,64 @@ msgstr "Cancelar tarea"
 
 #: clientgui/sg_TaskPanel.cpp:444
 msgid "Not available"
-msgstr ""
+msgstr "No disponible"
 
 #: clientgui/sg_TaskPanel.cpp:455
-#, fuzzy
 msgid "Tasks:"
-msgstr "Tareas"
+msgstr "Tareas:"
 
 #: clientgui/sg_TaskPanel.cpp:461
 msgid "Select a task to access"
-msgstr ""
+msgstr "Seleccione una tarea a la que acceder"
 
 #: clientgui/sg_TaskPanel.cpp:472
-#, fuzzy
 msgid "From:"
-msgstr "De"
+msgstr "De:"
 
 #: clientgui/sg_TaskPanel.cpp:526
 msgid "This task's progress"
-msgstr ""
+msgstr "Progreso de esta tarea"
 
 #: clientgui/sg_TaskPanel.cpp:544
 msgid "Task Commands"
-msgstr ""
+msgstr "Comandos de la Tarea"
 
 #: clientgui/sg_TaskPanel.cpp:545
 msgid "Pop up a menu of commands to apply to this task"
-msgstr ""
+msgstr "Visualizar un menú de comandos aplicables a esta tarea"
 
 #: clientgui/sg_TaskPanel.cpp:680
-#, c-format
-#, fuzzy, c-format
+#, c-format, c-format
 msgid "Application: %s"
-msgstr "Aplicación:"
+msgstr "Aplicación: %s"
 
 #: clientgui/sg_TaskPanel.cpp:701
 #, c-format
 msgid "%.3f%%"
-msgstr ""
+msgstr "%.3f%%"
 
 #: clientgui/sg_TaskPanel.cpp:709
 msgid "Application: Not available"
-msgstr ""
+msgstr "Aplicación: No disponible"
 
 #: clientgui/sg_TaskPanel.cpp:810
 msgid "Not Available"
-msgstr ""
+msgstr "No Disponible"
 
 #: clientgui/sg_TaskPanel.cpp:825
 #, c-format
 msgid "Elapsed: %s"
-msgstr ""
+msgstr "Transcurrido: %s"
 
 #: clientgui/sg_TaskPanel.cpp:839
 #, c-format
 msgid "Remaining (estimated): %s"
-msgstr ""
+msgstr "Restante (estimado): %s"
 
 #: clientgui/sg_TaskPanel.cpp:854
 #, c-format
 msgid "Status: %s"
-msgstr ""
+msgstr "Estado: %s"
 
 #: clientgui/sg_ViewTabPage.cpp:140
 #: clientgui/sg_ViewTabPage.cpp:280
@@ -3663,41 +3654,36 @@ msgid "Launching browser..."
 msgstr "Lanzando navegador..."
 
 #: clientgui/ViewProjects.cpp:1048
-#, fuzzy
 msgid "Requested by user"
-msgstr "Suspendido por el usuario"
+msgstr "Pedido por el usuario"
 
 #: clientgui/ViewProjects.cpp:1049
 msgid "To fetch work"
-msgstr ""
+msgstr "Buscar trabajo"
 
 #: clientgui/ViewProjects.cpp:1050
 msgid "To report completed tasks"
-msgstr ""
+msgstr "Informar las tareas completadas"
 
 #: clientgui/ViewProjects.cpp:1051
 msgid "To send trickle-up message"
-msgstr ""
+msgstr "Enviar mensaje trickle-up"
 
 #: clientgui/ViewProjects.cpp:1052
-#, fuzzy
 msgid "Requested by account manager"
-msgstr "Añadir administrador de cuentas"
+msgstr "Pedido por el administrador de cuentas"
 
 #: clientgui/ViewProjects.cpp:1053
-#, fuzzy
 msgid "Project initialization"
-msgstr "Proyecto no encontrado"
+msgstr "Iniciación del proyecto"
 
 #: clientgui/ViewProjects.cpp:1054
-#, fuzzy
 msgid "Requested by project"
-msgstr "Abortado por el proyecto"
+msgstr "Pedido por el proyecto"
 
 #: clientgui/ViewProjects.cpp:1055
-#, fuzzy
 msgid "Unknown reason"
-msgstr "razón desconocida"
+msgstr "Razón desconocida"
 
 #: clientgui/ViewProjects.cpp:1069
 msgid "Suspended by user"
@@ -3725,7 +3711,7 @@ msgstr "Petición al planificador en progreso"
 
 #: clientgui/ViewProjects.cpp:1090
 msgid "Trickle up message pending"
-msgstr ""
+msgstr "Mensaje trickle up pendiente"
 
 #: clientgui/ViewProjects.cpp:1096
 msgid "Communication deferred "
@@ -3745,7 +3731,7 @@ msgstr "Disco"
 
 #: clientgui/ViewResources.cpp:249
 msgid "no projects: 0 bytes used"
-msgstr ""
+msgstr "sin proyectos: 0 bytes usados"
 
 #: clientgui/ViewResources.cpp:286
 msgid "used by BOINC: "
@@ -3839,12 +3825,12 @@ msgstr "Muestra el gráfico del siguiente proyecto"
 #: clientgui/ViewStatistics.cpp:2010
 #: clientgui/ViewStatistics.cpp:2407
 msgid "Hide project list"
-msgstr ""
+msgstr "Ocultar la lista de proyectos"
 
 #: clientgui/ViewStatistics.cpp:2011
 #: clientgui/ViewStatistics.cpp:2407
 msgid "Use entire area for graphs"
-msgstr ""
+msgstr "Usar todo el área para gráficos"
 
 #: clientgui/ViewStatistics.cpp:2016
 msgid "Mode view"
@@ -3860,7 +3846,7 @@ msgstr "Muestra un gráfico del proyecto seleccionado"
 
 #: clientgui/ViewStatistics.cpp:2027
 msgid "All projects (separate)"
-msgstr ""
+msgstr "Todos los proyectos (separados)"
 
 #: clientgui/ViewStatistics.cpp:2028
 msgid "Show all projects, one chart per project"
@@ -3868,21 +3854,19 @@ msgstr "Muestra todos los proyectos, un gráfico por proyecto"
 
 #: clientgui/ViewStatistics.cpp:2034
 msgid "All projects (together)"
-msgstr ""
+msgstr "Todos los proyectos (juntos)"
 
 #: clientgui/ViewStatistics.cpp:2035
 msgid "Show one chart with all projects"
 msgstr "Muestra un gráfico con todos los proyectos"
 
 #: clientgui/ViewStatistics.cpp:2041
-#, fuzzy
 msgid "All projects (sum)"
-msgstr "Todos los proyectos (juntos)"
+msgstr "Todos los proyectos (suma)"
 
 #: clientgui/ViewStatistics.cpp:2042
-#, fuzzy
 msgid "Show one chart with sum of projects"
-msgstr "Muestra un gráfico con todos los proyectos"
+msgstr "Muestra un gráfico con la suma de los proyectos"
 
 #: clientgui/ViewStatistics.cpp:2070
 msgid "Statistics"
@@ -3903,11 +3887,11 @@ msgstr "Actualizando gráficas..."
 
 #: clientgui/ViewStatistics.cpp:2411
 msgid "Show project list"
-msgstr ""
+msgstr "Mostrar la lista de proyectos"
 
 #: clientgui/ViewStatistics.cpp:2411
 msgid "Uses smaller area for graphs"
-msgstr ""
+msgstr "Usar un área menor para gráficos"
 
 #: clientgui/ViewTransfers.cpp:163
 msgid "Retry Now"
@@ -3993,32 +3977,31 @@ msgstr "Cancelar Transferencia de Archivo"
 
 #: clientgui/ViewTransfers.cpp:769
 msgid "Upload"
-msgstr ""
+msgstr "Enviar"
 
 #: clientgui/ViewTransfers.cpp:769
 msgid "Download"
-msgstr ""
+msgstr "Descargar"
 
 #: clientgui/ViewTransfers.cpp:773
-#, fuzzy
 msgid "retry in "
-msgstr "Reintentar en "
+msgstr "reintentar en "
 
 #: clientgui/ViewTransfers.cpp:775
 msgid "failed"
-msgstr ""
+msgstr "falló"
 
 #: clientgui/ViewTransfers.cpp:778
 msgid "suspended"
-msgstr ""
+msgstr "suspendido"
 
 #: clientgui/ViewTransfers.cpp:783
 msgid "active"
-msgstr ""
+msgstr "activo"
 
 #: clientgui/ViewTransfers.cpp:785
 msgid "pending"
-msgstr ""
+msgstr "pendiente"
 
 #: clientgui/ViewTransfers.cpp:792
 msgid " (project backoff: "
@@ -4035,23 +4018,20 @@ msgid "Show only active tasks."
 msgstr "Mostrar sólo tareas activas."
 
 #: clientgui/ViewWork.cpp:200
-#, fuzzy
 msgid "Show VM Console"
-msgstr "Mostrar totales del ordenador"
+msgstr "Mostrar Consola VM"
 
 #: clientgui/ViewWork.cpp:201
-#, fuzzy
 msgid "Show VM Console in a window."
-msgstr "Mostrar los gráficos de la aplicación en una ventana."
+msgstr "Mostrar la Consola VM en una ventana."
 
 #: clientgui/ViewWork.cpp:234
 msgid "Elapsed"
 msgstr "Transcurrido"
 
 #: clientgui/ViewWork.cpp:235
-#, fuzzy
 msgid "Remaining (estimated)"
-msgstr "Restante"
+msgstr "Restante (estimado)"
 
 #: clientgui/ViewWork.cpp:236
 msgid "Deadline"
@@ -4078,9 +4058,8 @@ msgid "Showing graphics for task..."
 msgstr "Mostrando gráficos para la tarea..."
 
 #: clientgui/ViewWork.cpp:425
-#, fuzzy
 msgid "Showing VM console for task..."
-msgstr "Mostrando gráficos para la tarea..."
+msgstr "Mostrando consola VM para la tarea..."
 
 #: clientgui/ViewWork.cpp:478
 #, c-format
@@ -4128,7 +4107,6 @@ msgstr ""
 "listados o administrados a través de %s."
 
 #: clientgui/WelcomePage.cpp:275
-#, fuzzy
 msgid ""
 "There are over 30 BOINC-based projects\n"
 "doing research in many areas of science,\n"
@@ -4140,11 +4118,9 @@ msgstr ""
 "investigando en muchas áreas de la ciencia,\n"
 "y usted puede ser voluntario en tantos de ellos como desee.\n"
 "Usted puede unirse a un proyecto directamente,\n"
-"o usar un sitio web 'Administrador de cuentas' para seleccionar los "
-"proyectos."
+"o usar un sitio web 'Administrador de cuentas' para elegir los proyectos."
 
 #: clientgui/WelcomePage.cpp:283
-#, fuzzy
 msgid ""
 "You have chosen to add a new BOINC project.  Adding a new\n"
 "project means that you will be connecting your computer to a new organization.\n"
@@ -4159,7 +4135,7 @@ msgid ""
 "To change which research applications are sent to you from\n"
 "World Community Grid then please click on the following button:"
 msgstr ""
-"Ha seleccionado unirse a un nuevo proyecto BOINC.  Unirse a un nuevo\n"
+"Ha seleccionado añadir un nuevo proyecto BOINC.  Añadir un nuevo\n"
 "proyecto supone que conectará su ordenador a una nueva organización.\n"
 "Si esto es lo que desea hacer, por favor pulse\n"
 "el botón 'Siguiente' debajo.\n"
@@ -4167,12 +4143,11 @@ msgstr ""
 "Algunos proyectos como World Community Grid ejecutan varios programas de "
 "investigación.\n"
 "Si quiere cambiar qué programas de investigación son enviados a su ordenador\n"
-"para ser ejecutados, entonces debe visitar el sitio web del proyecto y "
-"modificar allí\n"
+"para ser ejecutados, visite el sitio web del proyecto y modifique allí\n"
 "sus preferencias.\n"
 "\n"
-"Para cambiar qué programas de investigación se le envían desde\n"
-"World Community Grid por favor pulse en el botón siguiente: "
+"Para cambiar qué programas de investigación le son enviados desde\n"
+"World Community Grid por favor pulse el siguiente botón: "
 
 #: clientgui/WelcomePage.cpp:286
 msgid "Change Research Applications at World Community Grid"
@@ -4241,7 +4216,7 @@ msgstr ""
 
 #: clientgui/mac/MacAccessiblity.cpp:726
 msgid "list headers"
-msgstr ""
+msgstr "encabezados de la lista"
 
 #: clientgui/mac/MacAccessiblity.cpp:732
 msgid "list of events"
@@ -4320,32 +4295,30 @@ msgid "row %d of %d; "
 msgstr "fila %d de %d; "
 
 #: clientgui/mac/Mac_GUI.cpp:105
-#, fuzzy
 msgid "Preferences…"
-msgstr "Preferencias"
+msgstr "Preferencias..."
 
 #: clientgui/mac/Mac_GUI.cpp:117
 msgid "Services"
-msgstr ""
+msgstr "Servicios"
 
 #: clientgui/mac/Mac_GUI.cpp:139
 #, c-format
 msgid "Hide %s"
-msgstr ""
+msgstr "Ocultar %s"
 
 #: clientgui/mac/Mac_GUI.cpp:153
 msgid "Hide Others"
-msgstr ""
+msgstr "Ocultar los Otros"
 
 #: clientgui/mac/Mac_GUI.cpp:167
 msgid "Show All"
-msgstr ""
+msgstr "Mostrar Todo"
 
 #: clientgui/mac/Mac_GUI.cpp:181
-#, c-format
-#, fuzzy, c-format
+#, c-format, c-format
 msgid "Quit %s"
-msgstr "&Cerrar %s"
+msgstr "Cerrar %s"
 
 #: clientgui/DlgAdvPreferences.h:30
 msgid "specify work start and stop hours in format HH:MM-HH:MM"
diff --git a/locale/es/BOINC-Project-Generic.po b/locale/es/BOINC-Project-Generic.po
index b2abb28..88db4a2 100644
--- a/locale/es/BOINC-Project-Generic.po
+++ b/locale/es/BOINC-Project-Generic.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at boinc.berkeley.edu>\n"
 "POT-Creation-Date: 2012-01-16 11:31 PST\n"
-"PO-Revision-Date: 2011-12-04 19:02+0200\n"
+"PO-Revision-Date: 2012-08-25 19:45+0200\n"
 "Last-Translator: David M <davidcomp2 at telefonica dot net>\n"
 "Language-Team: \n"
 "Language: es\n"
@@ -29,147 +29,149 @@ msgstr "Spanish"
 
 #: ../inc/bbcode_html.inc:11
 msgid "Bold text: [b]text[/b]  (alt+b)"
-msgstr ""
+msgstr "Texto en negrita: [b]texto[/b]  (alt+b)"
 
 #: ../inc/bbcode_html.inc:14
 msgid "Italic text: [i]text[/i]  (alt+i)"
-msgstr ""
+msgstr "Texto en cursiva: [i]texto[/i]  (alt+i)"
 
 #: ../inc/bbcode_html.inc:17
 msgid "Underline text: [u]text[/u]  (alt+u)"
-msgstr ""
+msgstr "Texto subrayado: [u]texto[/u]  (alt+u)"
 
 #: ../inc/bbcode_html.inc:20
 msgid "Quote text: [quote]text[/quote]  (alt+q)"
-msgstr ""
+msgstr "Texto de cita: [quote]texto[/quote]  (alt+q)"
 
 #: ../inc/bbcode_html.inc:23
 msgid "Code display: [code]code[/code]  (alt+c)"
-msgstr ""
+msgstr "Visualización de código: [code]código[/code]  (alt+c)"
 
 #: ../inc/bbcode_html.inc:26
 msgid "List: [list]text[/list] (alt+l)"
-msgstr ""
+msgstr "Lista: [list]text[/list] (alt+l)"
 
 #: ../inc/bbcode_html.inc:29
 msgid "Ordered list: [list=]text[/list]  (alt+o)"
-msgstr ""
+msgstr "Lista ordenada: [list=]texto[/list]  (alt+o)"
 
 #: ../inc/bbcode_html.inc:32
 msgid "Insert image: [img]http://image_url[/img]  (alt+p)"
-msgstr ""
+msgstr "Insertar imagen: [img]http://url_de_imagen[/img]  (alt+p)"
 
 #: ../inc/bbcode_html.inc:35
 msgid ""
 "Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]  (alt+w)"
 msgstr ""
+"Insertar URL: [url]http://url[/url] o [url=http://url]texto URL[/url]  "
+"(alt+w)"
 
 #: ../inc/bbcode_html.inc:42
 msgid "Font color"
-msgstr ""
+msgstr "Color de fuente"
 
 #: ../inc/bbcode_html.inc:43
 msgid ""
 "Font color: [color=red]text[/color]  Tip: you can also use color=#FF0000"
 msgstr ""
+"Color de fuente: [color=red]texto[/color]  Nota: también puede usar "
+"color=#FF0000"
 
 #: ../inc/bbcode_html.inc:44 ../inc/bbcode_html.inc:59 ../inc/prefs.inc:625
 msgid "Default"
 msgstr "Por defecto"
 
 #: ../inc/bbcode_html.inc:45
-#, fuzzy
 msgid "Dark Red"
-msgstr "Marcar como leído"
+msgstr "Rojo Oscuro"
 
 #: ../inc/bbcode_html.inc:46
 msgid "Red"
-msgstr ""
+msgstr "Rojo"
 
 #: ../inc/bbcode_html.inc:47
-#, fuzzy
 msgid "Orange"
-msgstr "Cambiar"
+msgstr "Naranja"
 
 #: ../inc/bbcode_html.inc:48
 msgid "Brown"
-msgstr ""
+msgstr "Marrón"
 
 #: ../inc/bbcode_html.inc:49
 msgid "Yellow"
-msgstr ""
+msgstr "Amarillo"
 
 #: ../inc/bbcode_html.inc:50
 msgid "Green"
-msgstr ""
+msgstr "Verde"
 
 #: ../inc/bbcode_html.inc:51
 msgid "Olive"
-msgstr ""
+msgstr "Oliva"
 
 #: ../inc/bbcode_html.inc:52
 msgid "Cyan"
-msgstr ""
+msgstr "Turquesa"
 
 #: ../inc/bbcode_html.inc:53
 msgid "Blue"
-msgstr ""
+msgstr "Azul"
 
 #: ../inc/bbcode_html.inc:54
 msgid "Dark Blue"
-msgstr ""
+msgstr "Azul Oscuro"
 
 #: ../inc/bbcode_html.inc:55
 msgid "Indigo"
-msgstr ""
+msgstr "Índigo"
 
 #: ../inc/bbcode_html.inc:56
 msgid "Violet"
-msgstr ""
+msgstr "Violeta"
 
 #: ../inc/bbcode_html.inc:57
 msgid "Font size"
-msgstr ""
+msgstr "Tamaño de fuente"
 
 #: ../inc/bbcode_html.inc:58
 msgid "Font size: [size=x-small]small text[/size]"
-msgstr ""
+msgstr "Tamaño de fuente: [size=x-small]texto pequeño[/size]"
 
 #: ../inc/bbcode_html.inc:60
 msgid "Small"
-msgstr ""
+msgstr "Pequeña"
 
 #: ../inc/bbcode_html.inc:61
 msgid "Normal"
-msgstr ""
+msgstr "Normal"
 
 #: ../inc/bbcode_html.inc:62
 msgid "Large"
-msgstr ""
+msgstr "Grande"
 
 #: ../inc/bbcode_html.inc:65
 msgid "Close all open bbCode tags"
-msgstr ""
+msgstr "Cerrar todas las etiquetas bbCode abiertas"
 
 #: ../inc/bbcode_html.inc:65
 msgid "Close Tags"
-msgstr ""
+msgstr "Cerrar Etiquetas"
 
 #: ../inc/forum.inc:37
 msgid "Oldest first"
-msgstr ""
+msgstr "Más antiguo primero"
 
 #: ../inc/forum.inc:38 ../inc/forum.inc:44
 msgid "Newest first"
-msgstr ""
+msgstr "Más nuevo primero"
 
 #: ../inc/forum.inc:39
 msgid "Highest rated posts first"
-msgstr ""
+msgstr "Mensajes más valorados primero"
 
 #: ../inc/forum.inc:41
 msgid "Newest post first"
-msgstr ""
+msgstr "Mensajes más nuevos primero"
 
 #: ../inc/forum.inc:42
 msgid "Most views first"
@@ -226,63 +228,54 @@ msgid "Next"
 msgstr "Siguiente"
 
 #: ../inc/forum.inc:535
-#, fuzzy
 msgid "Send message"
-msgstr "Enviar mensaje"
+msgstr "Enviar mensaje"
 
-# ########################################
+# ########################################
 # Private messages
 #: ../inc/forum.inc:535
-#, fuzzy
 msgid "Send %1 a private message"
-msgstr "Enviar mensaje privado"
+msgstr "Enviar a %1 un mensaje privado"
 
 #: ../inc/forum.inc:536
-#, fuzzy
 msgid "Joined: %1"
-msgstr "Perfil: %1"
+msgstr "Unido: %1"
 
-# ########################################
+# ########################################
 # Forum
 #: ../inc/forum.inc:545
-#, fuzzy
 msgid "Posts: %1"
-msgstr "Mensajes"
+msgstr "Mensajes: %1"
 
 #: ../inc/forum.inc:551
-#, fuzzy
 msgid "Credit: %1"
-msgstr "Crédito"
+msgstr "Crédito: %1"
 
 #: ../inc/forum.inc:552
 msgid "RAC: %1"
-msgstr ""
+msgstr "RAC: %1"
 
 #: ../inc/forum.inc:574
-#, fuzzy
 msgid "You haven't read this message yet"
-msgstr "No tiene mensajes privados."
+msgstr "No ha leído este mensaje todavía"
 
 #: ../inc/forum.inc:574
-#, fuzzy
 msgid "Unread"
-msgstr "no leído"
+msgstr "No leído"
 
 #: ../inc/forum.inc:577 ../inc/forum.inc:582 ../inc/forum.inc:681
-#, fuzzy
 msgid "Message %1"
-msgstr "Mensaje"
+msgstr "Mensaje %1"
 
 #: ../inc/forum.inc:578 ../inc/user.inc:324 ../user/forum_forum.php:172
 msgid "hidden"
 msgstr "oculto"
 
-# ########################################
+# ########################################
 # Forum
 #: ../inc/forum.inc:579
-#, fuzzy
 msgid "Posted: %1"
-msgstr "Mensajes"
+msgstr "Enviados: %1"
 
 #: ../inc/forum.inc:582
 #, fuzzy
@@ -294,14 +287,12 @@ msgid "Edit"
 msgstr "Editar"
 
 #: ../inc/forum.inc:585
-#, fuzzy
 msgid "Edit this message"
-msgstr "Edite su perfil"
+msgstr "Edite este mensaje"
 
 #: ../inc/forum.inc:591
-#, fuzzy
 msgid "Last modified: %1"
-msgstr "Ultima modificación de las preferencias:"
+msgstr "Última modificación: %1"
 
 #: ../inc/forum.inc:594
 msgid ""
@@ -311,36 +302,35 @@ msgstr ""
 
 #: ../inc/forum.inc:622 ../inc/forum.inc:633
 msgid "Report this post as offensive"
-msgstr ""
+msgstr "Informar este mensaje como ofensivo"
 
 #: ../inc/forum.inc:622 ../inc/forum.inc:633
-#, fuzzy
 msgid "Report as offensive"
-msgstr "Último mensaje"
+msgstr "Informar como ofensivo"
 
 #: ../inc/forum.inc:626
 msgid "Rating: %1"
-msgstr ""
+msgstr "Valoración: %1"
 
 #: ../inc/forum.inc:626
 msgid "rate: "
-msgstr ""
+msgstr "valoración: "
 
 #: ../inc/forum.inc:629
 msgid "Click if you like this message"
-msgstr ""
+msgstr "Pulse si le gusta este mensaje"
 
 #: ../inc/forum.inc:629
 msgid "Rate +"
-msgstr ""
+msgstr "Valoración +"
 
 #: ../inc/forum.inc:631
 msgid "Click if you don't like this message"
-msgstr ""
+msgstr "Pulse si no le gusta este mensaje"
 
 #: ../inc/forum.inc:631
 msgid "Rate -"
-msgstr ""
+msgstr "Valoración -"
 
 #: ../inc/forum.inc:639 ../user/pm.php:106 ../user/pm.php:146
 msgid "Reply"
@@ -348,27 +338,25 @@ msgstr "Responder"
 
 #: ../inc/forum.inc:639
 msgid "Post a reply to this message"
-msgstr ""
+msgstr "Enviar una respuesta a este mensaje"
 
 #: ../inc/forum.inc:641
-#, fuzzy
 msgid "Quote"
-msgstr "Separase del equipo"
+msgstr "Citar"
 
 #: ../inc/forum.inc:641
 msgid "Post a reply by quoting this message"
-msgstr ""
+msgstr "Enviar una respuesta citando este mensaje"
 
 #: ../inc/forum.inc:662
 msgid "Hidden by a moderator"
-msgstr ""
+msgstr "Oculto por un moderador"
 
-# ########################################
+# ########################################
 # Forum
 #: ../inc/forum.inc:683
-#, fuzzy
 msgid "Posted %1 by %2"
-msgstr "Mensajes"
+msgstr "Enviado %1 por %2"
 
 #: ../inc/forum.inc:701
 #, fuzzy
@@ -3788,9 +3776,11 @@ msgstr ""
 msgid "unread/locked"
 msgstr "no leído"
 
+# 81%
 #: ../user/forum_forum.php:184
+#, fuzzy
 msgid "You haven't read this thread yet"
-msgstr ""
+msgstr "No tiene mensajes privados."
 
 #: ../user/forum_forum.php:190
 msgid "This thread is sticky and locked"
@@ -6372,9 +6362,11 @@ msgstr ""
 msgid "Couldn't join team - please try again later."
 msgstr "No se pudo crear el equipo - por favor, intentelo más tarde"
 
+# 90%
 #: ../user/team_join_action.php:40
+#, fuzzy
 msgid "Joined %1"
-msgstr ""
+msgstr "Perfil: %1"
 
 #: ../user/team_join_action.php:41
 msgid "You have joined %1."
@@ -6865,9 +6857,11 @@ msgstr ""
 msgid "can't find workunit"
 msgstr ""
 
+# 81%
 #: ../user/workunit.php:35
+#, fuzzy
 msgid "Workunit %1"
-msgstr ""
+msgstr "Unidad de trabajo"
 
 #: ../user/workunit.php:43
 msgid "canonical result"
diff --git a/locale/es/BOINC-Web.mo b/locale/es/BOINC-Web.mo
index a1b2245..3f42429 100644
Binary files a/locale/es/BOINC-Web.mo and b/locale/es/BOINC-Web.mo differ
diff --git a/locale/es/BOINC-Web.po b/locale/es/BOINC-Web.po
index 515278f..64bf423 100644
--- a/locale/es/BOINC-Web.po
+++ b/locale/es/BOINC-Web.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at ssl.berkeley.edu>\n"
 "POT-Creation-Date: 2011-04-04 22:09 PDT\n"
-"PO-Revision-Date: 2011-12-31 05:39+0200\n"
+"PO-Revision-Date: 2012-08-25 18:42+0200\n"
 "Last-Translator: David M <davidcomp2 at telefonica dot net>\n"
 "Language-Team: \n"
 "Language: es\n"
@@ -201,6 +201,14 @@ msgid ""
 "populations with a diverse set of parameters related to biological and "
 "social factors that influence the distribution of the disease. "
 msgstr ""
+"Los modelos de simulación de la dinámica de transmisión y efectos en la "
+"salud de la malaria son una herramienta importante para el control de la "
+"malaria. Pueden ser utilizados para determinar las estrategias óptimas para "
+"la entrega de mosquiteros, la quimioterapia o las nuevas vacunas que están "
+"actualmente en desarrollo y pruebas. Este tipo de modelos es extremadamente "
+"intensivo, y requieren simulaciones de grandes poblaciones humanas con un "
+"variado conjunto de parámetros relacionados con los factores biológicos y "
+"sociales que influyen en la distribución de la enfermedad."
 
 #: projects.inc:102
 msgid "Rosetta at home"
@@ -655,7 +663,7 @@ msgstr "NFS at home"
 
 #: projects.inc:304
 msgid "California State University Fullerton"
-msgstr ""
+msgstr "Universidad del Estado de California Fullerton"
 
 #: projects.inc:305
 msgid "Factorization of large integers"
@@ -680,6 +688,8 @@ msgid ""
 "Vilnius Gediminas Technical University and Kaunas University of Technology "
 "(Lithuania)"
 msgstr ""
+"Universidad Técnica Vilnius Gediminas y Universidad de Tecnología Kaunas "
+"(Lituania)"
 
 #: projects.inc:313
 msgid "Software testing"
@@ -972,6 +982,8 @@ msgid ""
 "BOINC helpers are unpaid volunteers.  Their advice is not endorsed by BOINC "
 "or the University of California."
 msgstr ""
+"Los colaboradores de BOINC no son remunerados. Su consejo no esta avalado "
+"por BOINC o por la Universidad de California."
 
 #: help_funcs.php:110
 msgid "%1Never%2 give email address or password information to BOINC helpers."
diff --git a/locale/es/pootle-boinctrunk-es.prefs b/locale/es/pootle-boinctrunk-es.prefs
deleted file mode 100644
index f4fab50..0000000
--- a/locale/es/pootle-boinctrunk-es.prefs
+++ /dev/null
@@ -1,9 +0,0 @@
-# Pootle preferences for project boinctrunk, language es
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  JensSeidler = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  DavidM = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/fa/pootle-boinctrunk-fa.prefs b/locale/fa/pootle-boinctrunk-fa.prefs
deleted file mode 100644
index 511199a..0000000
--- a/locale/fa/pootle-boinctrunk-fa.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-# Pootle preferences for project boinctrunk, language fa
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/fi/pootle-boinctrunk-fi.prefs b/locale/fi/pootle-boinctrunk-fi.prefs
deleted file mode 100644
index 19e0f80..0000000
--- a/locale/fi/pootle-boinctrunk-fi.prefs
+++ /dev/null
@@ -1,10 +0,0 @@
-# Pootle preferences for project boinctrunk, language fi
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Olli = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Nikerabbit = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  samipetri = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/fr/BOINC-Client.mo b/locale/fr/BOINC-Client.mo
index f5089dc..7fddcc7 100644
Binary files a/locale/fr/BOINC-Client.mo and b/locale/fr/BOINC-Client.mo differ
diff --git a/locale/fr/BOINC-Client.po b/locale/fr/BOINC-Client.po
index 160d65f..3d28433 100644
--- a/locale/fr/BOINC-Client.po
+++ b/locale/fr/BOINC-Client.po
@@ -7,8 +7,8 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-09 09:39-0800\n"
-"PO-Revision-Date: 2012-03-22 14:15+0200\n"
-"Last-Translator: Jerome Cadet <jerome.cadet at pobox.com>\n"
+"PO-Revision-Date: 2012-07-12 07:47+0200\n"
+"Last-Translator: Rom <rwalton at ssl.berkeley.edu>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
 "Language: fr\n"
 "MIME-Version: 1.0\n"
@@ -18,7 +18,6 @@ msgstr ""
 "X-Generator: Pootle 2.1.6\n"
 
 #: acct_mgr.cpp:435 acct_mgr.cpp:444
-#, fuzzy
 msgid "Message from account manager"
 msgstr "Message du gestionnaire de compte"
 
@@ -81,7 +80,6 @@ msgid "Missing start tag in cc_config.xml"
 msgstr "Balise de debut manquante dans cc_config.xml"
 
 #: log_flags.cpp:443
-#, fuzzy
 msgid "Error in cc_config.xml options"
 msgstr "Erreur dans les options cc_config.xml"
 
@@ -168,7 +166,6 @@ msgstr ""
 "projet"
 
 #: ../sched/sched_send.cpp:1523
-#, fuzzy
 msgid "No tasks are available for the applications you have selected."
 msgstr ""
 "Aucune tâche disponible pour les applications que vous avez sélectionnées."
diff --git a/locale/fr/BOINC-Manager.mo b/locale/fr/BOINC-Manager.mo
index 28115ee..5e6c95a 100644
Binary files a/locale/fr/BOINC-Manager.mo and b/locale/fr/BOINC-Manager.mo differ
diff --git a/locale/fr/BOINC-Manager.po b/locale/fr/BOINC-Manager.po
index 250f16b..a227d16 100644
--- a/locale/fr/BOINC-Manager.po
+++ b/locale/fr/BOINC-Manager.po
@@ -4,8 +4,8 @@ msgstr ""
 "Project-Id-Version: BOINC Manager\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-03-05 10:58-0500\n"
-"PO-Revision-Date: 2012-03-23 19:01+0200\n"
-"Last-Translator: Jerome Cadet <jerome.cadet at pobox.com>\n"
+"PO-Revision-Date: 2012-07-12 07:47+0200\n"
+"Last-Translator: Rom <rwalton at ssl.berkeley.edu>\n"
 "Language-Team: <fr at li.org>\n"
 "Language: fr\n"
 "MIME-Version: 1.0\n"
@@ -733,7 +733,6 @@ msgstr ""
 "comme nom d'hôte."
 
 #: clientgui/BOINCBaseView.cpp:774
-#, fuzzy
 msgid "Project web pages"
 msgstr "Pages Web du projet"
 
@@ -800,8 +799,7 @@ msgid "%s failed to disconnected from the Internet."
 msgstr "%s n'a pas réussi à se déconnecter d'Internet."
 
 #: clientgui/BOINCGUIApp.cpp:339
-#, c-format
-#, fuzzy, c-format
+#, c-format, c-format
 msgid ""
 "You currently are not authorized to manage the client.\n"
 "\n"
@@ -1736,7 +1734,6 @@ msgid "Project preference"
 msgstr "Préférences du projet"
 
 #: clientgui/DlgItemProperties.cpp:174
-#, fuzzy
 msgid "Account manager preference"
 msgstr "Préférence du gestionnaire de compte"
 
@@ -3415,8 +3412,7 @@ msgid "Elapsed: %s"
 msgstr "Ecoulé: %s"
 
 #: clientgui/sg_TaskPanel.cpp:839
-#, c-format
-#, fuzzy, c-format
+#, c-format, c-format
 msgid "Remaining (estimated): %s"
 msgstr "Restant (estimation): %s"
 
@@ -4060,7 +4056,6 @@ msgid "Elapsed"
 msgstr "Ecoulé"
 
 #: clientgui/ViewWork.cpp:235
-#, fuzzy
 msgid "Remaining (estimated)"
 msgstr "Restant (estimation)"
 
diff --git a/locale/fr/pootle-boinctrunk-fr.prefs b/locale/fr/pootle-boinctrunk-fr.prefs
deleted file mode 100644
index a45e930..0000000
--- a/locale/fr/pootle-boinctrunk-fr.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-# Pootle preferences for project boinctrunk, language fr
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  philmo = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Mugurel = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  JeromeC = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Millenium82 = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  skimpax = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/gl/pootle-boinctrunk-gl.prefs b/locale/gl/pootle-boinctrunk-gl.prefs
deleted file mode 100644
index c652d3e..0000000
--- a/locale/gl/pootle-boinctrunk-gl.prefs
+++ /dev/null
@@ -1,10 +0,0 @@
-# Pootle preferences for project boinctrunk, language gl
-
-rights:
-  ceixeoida = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  JensSeidler = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  thebigjens = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, commit'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/he/pootle-boinctrunk-he.prefs b/locale/he/pootle-boinctrunk-he.prefs
deleted file mode 100644
index e44d83c..0000000
--- a/locale/he/pootle-boinctrunk-he.prefs
+++ /dev/null
@@ -1,9 +0,0 @@
-# Pootle preferences for project boinctrunk, language he
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Maple = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  DjLegolas = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/hr/pootle-boinctrunk-hr.prefs b/locale/hr/pootle-boinctrunk-hr.prefs
deleted file mode 100644
index fbc927d..0000000
--- a/locale/hr/pootle-boinctrunk-hr.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language hr
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  GoranY = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/hu/BOINC-Manager.mo b/locale/hu/BOINC-Manager.mo
index 1dcbad5..0bf06e0 100644
Binary files a/locale/hu/BOINC-Manager.mo and b/locale/hu/BOINC-Manager.mo differ
diff --git a/locale/hu/BOINC-Manager.po b/locale/hu/BOINC-Manager.po
index 35f1c7d..c3d8668 100644
--- a/locale/hu/BOINC-Manager.po
+++ b/locale/hu/BOINC-Manager.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: BOINC Manager 5.x\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-03-05 10:58-0500\n"
-"PO-Revision-Date: 2012-06-03 13:43+0200\n"
+"PO-Revision-Date: 2012-07-08 15:21+0200\n"
 "Last-Translator: Gabor <csega at mailbox.hu>\n"
 "Language-Team: BOINC Development Team <rwalton at ssl.berkeley.edu>\n"
 "Language: hu\n"
@@ -730,7 +730,6 @@ msgstr ""
 "megadásánál használja a 'localhost' kifejezést."
 
 #: clientgui/BOINCBaseView.cpp:774
-#, fuzzy
 msgid "Project web pages"
 msgstr "A projekt weboldalai"
 
@@ -940,7 +939,6 @@ msgid "Resume"
 msgstr "Folytatás"
 
 #: clientgui/BOINCTaskBar.cpp:632
-#, fuzzy
 msgid "Resume GPU"
 msgstr "GPU folytatása"
 
@@ -1696,8 +1694,8 @@ msgstr ""
 "%s alkalmazás vagy a(z) %s képernyővédő újra futni nem kezd.\n"
 "\n"
 "A legtöbb esetben jobb csupán lecsukni a(z) %s ablakát\n"
-"mint kilépni az alkalmazásból; ezzel engedélyezi a(z) %snek, hogy futassa a\n"
-"feladatait a beállításoknál megadott időpontokban."
+"mint kilépni az alkalmazásból; ezzel engedélyezi a(z) %s feladatainak\n"
+"futtatását a beállításoknál megadott időpontokban."
 
 #: clientgui/DlgExitMessage.cpp:153
 #, c-format
@@ -1733,7 +1731,6 @@ msgid "Account manager preference"
 msgstr "A fiókkezelő élvez elsőbbséget"
 
 #: clientgui/DlgItemProperties.cpp:177
-#, fuzzy
 msgid "Project has no apps for "
 msgstr "A projektnek nincs alkalmazása ehhez: "
 
@@ -1742,7 +1739,6 @@ msgid "Client configuration excludes "
 msgstr "A kliens beállításai kizárják ezt:  "
 
 #: clientgui/DlgItemProperties.cpp:184
-#, fuzzy
 msgid " work fetch deferred for"
 msgstr " munka letöltése elhalasztva ennyi időre"
 
@@ -2644,7 +2640,6 @@ msgid "Supported systems:"
 msgstr "Támogatott rendszerek:"
 
 #: clientgui/ProjectInfoPage.cpp:612
-#, fuzzy
 msgid "Project URL:"
 msgstr "Projekt URL:"
 
@@ -3106,7 +3101,6 @@ msgid "%d"
 msgstr "%d"
 
 #: clientgui/sg_DlgPreferences.cpp:1031
-#, fuzzy
 msgid "Do you really want to clear all local preferences?\n"
 msgstr "Biztosan törölni akar minden helyi beállítást?\n"
 
@@ -3266,7 +3260,6 @@ msgid "%s: %.0f"
 msgstr "%s: %.0f"
 
 #: clientgui/sg_ProjectPanel.cpp:145
-#, fuzzy
 msgid "Project Web Pages"
 msgstr "A projekt weboldalai"
 
@@ -3411,8 +3404,7 @@ msgid "Elapsed: %s"
 msgstr "Eltelt: %s"
 
 #: clientgui/sg_TaskPanel.cpp:839
-#, c-format
-#, fuzzy, c-format
+#, c-format, c-format
 msgid "Remaining (estimated): %s"
 msgstr "Hátralévő (becsült): %s"
 
@@ -3912,7 +3904,7 @@ msgstr "Próbálja most"
 
 #: clientgui/ViewTransfers.cpp:164
 msgid "Click 'Retry now' to transfer the file now"
-msgstr "Kattintson a \"Próbálja most\" gombra, hogy a fájl átvitelét megkezdje"
+msgstr "Kattintson a \"Próbálja most\" gombra a fájl átviteléhez"
 
 #: clientgui/ViewTransfers.cpp:170
 msgid "Abort Transfer"
@@ -3989,12 +3981,10 @@ msgid "Abort File Transfer"
 msgstr "Adatátvitel megszakítása"
 
 #: clientgui/ViewTransfers.cpp:769
-#, fuzzy
 msgid "Upload"
 msgstr "Feltöltés"
 
 #: clientgui/ViewTransfers.cpp:769
-#, fuzzy
 msgid "Download"
 msgstr "Letöltés"
 
@@ -4038,14 +4028,13 @@ msgstr "Virtuális gép konzol"
 
 #: clientgui/ViewWork.cpp:201
 msgid "Show VM Console in a window."
-msgstr "A virtuális gép konzoljának új ablakban történő megjelenítése."
+msgstr "Virtuális gép konzol megjelenítése új ablakban."
 
 #: clientgui/ViewWork.cpp:234
 msgid "Elapsed"
 msgstr "Eltelt"
 
 #: clientgui/ViewWork.cpp:235
-#, fuzzy
 msgid "Remaining (estimated)"
 msgstr "Hátralévő (becsült)"
 
diff --git a/locale/hu/BOINC-Project-Generic.po b/locale/hu/BOINC-Project-Generic.po
index 25ff76a..deca101 100644
--- a/locale/hu/BOINC-Project-Generic.po
+++ b/locale/hu/BOINC-Project-Generic.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at boinc.berkeley.edu>\n"
 "POT-Creation-Date: 2012-01-16 11:31 PST\n"
-"PO-Revision-Date: 2012-06-08 12:53+0200\n"
+"PO-Revision-Date: 2012-09-23 21:40+0200\n"
 "Last-Translator: Gabor <csega at mailbox.hu>\n"
 "Language-Team: \n"
 "Language: hu\n"
@@ -229,12 +229,10 @@ msgid "Next"
 msgstr "Következő"
 
 #: ../inc/forum.inc:535
-#, fuzzy
 msgid "Send message"
 msgstr "Ãœzenet küldése"
 
 #: ../inc/forum.inc:535
-#, fuzzy
 msgid "Send %1 a private message"
 msgstr "Privát üzenet küldése neki: %1"
 
@@ -242,15 +240,13 @@ msgstr "Privát üzenet küldése neki: %1"
 msgid "Joined: %1"
 msgstr "Csatlakozott: %1"
 
-# #######################################
+# #######################################
 # Forum
 #: ../inc/forum.inc:545
-#, fuzzy
 msgid "Posts: %1"
 msgstr "Bejegyzések: %1"
 
 #: ../inc/forum.inc:551
-#, fuzzy
 msgid "Credit: %1"
 msgstr "Kredit: %1"
 
@@ -263,12 +259,10 @@ msgid "You haven't read this message yet"
 msgstr "Ezt az üzenetet még nem olvasta"
 
 #: ../inc/forum.inc:574
-#, fuzzy
 msgid "Unread"
 msgstr "Olvasatlan"
 
 #: ../inc/forum.inc:577 ../inc/forum.inc:582 ../inc/forum.inc:681
-#, fuzzy
 msgid "Message %1"
 msgstr "%1. üzenet"
 
@@ -276,15 +270,13 @@ msgstr "%1. üzenet"
 msgid "hidden"
 msgstr "rejtett"
 
-# #######################################
+# #######################################
 # Forum
 #: ../inc/forum.inc:579
-#, fuzzy
 msgid "Posted: %1"
 msgstr "Beküldve: %1"
 
 #: ../inc/forum.inc:582
-#, fuzzy
 msgid " - in response to "
 msgstr "- válasz erre:"
 
@@ -293,12 +285,10 @@ msgid "Edit"
 msgstr "Szerkesztés"
 
 #: ../inc/forum.inc:585
-#, fuzzy
 msgid "Edit this message"
 msgstr "Üzenet szerkesztése"
 
 #: ../inc/forum.inc:591
-#, fuzzy
 msgid "Last modified: %1"
 msgstr "Utolsó módosítás: %1"
 
@@ -315,7 +305,6 @@ msgid "Report this post as offensive"
 msgstr "Bejegyzés jelentése, mert sértő"
 
 #: ../inc/forum.inc:622 ../inc/forum.inc:633
-#, fuzzy
 msgid "Report as offensive"
 msgstr "Sértő bejegyzés jelentése"
 
@@ -329,7 +318,6 @@ msgstr "minősítés: "
 
 # 83%
 #: ../inc/forum.inc:629
-#, fuzzy
 msgid "Click if you like this message"
 msgstr "Kattintson ide, ha tetszik ez az üzenet"
 
@@ -338,7 +326,6 @@ msgid "Rate +"
 msgstr "Pozitív"
 
 #: ../inc/forum.inc:631
-#, fuzzy
 msgid "Click if you don't like this message"
 msgstr "Kattintson ide, ha nem tetszik ez az üzenet"
 
@@ -355,7 +342,6 @@ msgid "Post a reply to this message"
 msgstr "Válasz erre az üzenetre"
 
 #: ../inc/forum.inc:641
-#, fuzzy
 msgid "Quote"
 msgstr "Idézés"
 
@@ -367,15 +353,13 @@ msgstr "Válasz ebből az üzenetből vett idézettel"
 msgid "Hidden by a moderator"
 msgstr "Egy moderátor elrejtette"
 
-# #######################################
+# #######################################
 # Forum
 #: ../inc/forum.inc:683
-#, fuzzy
 msgid "Posted %1 by %2"
 msgstr "%2 írta ekkor: %1"
 
 #: ../inc/forum.inc:701
-#, fuzzy
 msgid "You may not post or rate messages until %1"
 msgstr "Nem írhat vagy minősíthet üzeneteket %1-ig"
 
@@ -409,7 +393,7 @@ msgstr ""
 "illetve a téma elterelése.\n"
 "<li> Tilos a szándékosan rosszindulatú, ellenszenvet tükröző üzenetek "
 "közzététele.\n"
-"<li> Nem megengedett a gyalázkodó kommentelés, ide értve a faji, vallási,\n"
+"<li> Nem megengedett a gyalázkodó hozzászólás, ide értve a faji, vallási,\n"
 "nemzetiségi, nemekkel kapcsolatos, osztályi, vagy szexuális témákat.\n"
 
 #: ../inc/forum.inc:734
@@ -538,7 +522,6 @@ msgid "Mark all threads as read"
 msgstr "Minden téma megjelölése olvasottként"
 
 #: ../inc/forum.inc:1205
-#, fuzzy
 msgid "Mark all threads in all message boards as read."
 msgstr "Minden üzenőfal minden témáját 'olvasott'-nak jelöli."
 
@@ -1051,7 +1034,6 @@ msgstr ""
 "esetén nincs korlátozás<br>Kényszerítve a 6.10.30 fölötti verzióknál%2"
 
 #: ../inc/prefs.inc:121
-#, fuzzy
 msgid "Do work only between the hours of %1 No restriction if equal %2"
 msgstr "Csak ezen időszakban dolgozzon: %1 Nincs korlátozás, ha megegyeznek %2"
 
@@ -1065,7 +1047,6 @@ msgstr ""
 "választja %2"
 
 #: ../inc/prefs.inc:138
-#, fuzzy
 msgid "Switch between tasks every %1 Recommended: 60 minutes %2"
 msgstr "Váltás a feladatok között ennyi időnként: %1 Ajánlott: 60 perc %2"
 
@@ -1243,13 +1224,13 @@ msgid "Use NVIDIA GPU %1 Enforced by version 6.10+ %2"
 msgstr "Használja az NVIDIA GPU-t %1 Erőltetve a 6.10 verzió felett %2"
 
 #: ../inc/prefs.inc:346
-#, fuzzy
 msgid ""
 "Run test applications? %1 This helps us develop applications, but may cause "
 "jobs to fail on your computer %2"
 msgstr ""
-"Futtat teszt-alkalmazásokat? %1 Ez segít nekünk jobb alkalmazásokat "
-"fejleszteni, de ez feladatok elvesztését okozhatja számítógépén. %2"
+"Szeretne teszt-alkalmazásokat futtatni? %1 Ezzel segít nekünk az "
+"alkalmazások fejlesztésében, de néha a feladatok elvesztését okozhatja "
+"számítógépén. %2"
 
 #: ../inc/prefs.inc:355
 msgid ""
@@ -1298,7 +1279,7 @@ msgstr "hibás hely: %1"
 
 #: ../inc/prefs.inc:438
 msgid "bad subset: %1"
-msgstr "hibás halmaz: %1"
+msgstr "hibás részhalmaz: %1"
 
 #: ../inc/prefs.inc:657 ../inc/prefs.inc:660 ../inc/prefs.inc:1003
 #: ../inc/prefs_util.inc:93 ../project.sample/project_specific_prefs.inc:75
@@ -1386,7 +1367,6 @@ msgid "Update preferences"
 msgstr "Beállítások frissítése"
 
 #: ../inc/prefs.inc:1014 ../inc/prefs.inc:1023
-#, fuzzy
 msgid "Default computer location"
 msgstr "A számítógép alapértelmezett helye"
 
@@ -1444,9 +1424,8 @@ msgid "Your feedback on this profile"
 msgstr "Az Ön véleménye erről a profilról"
 
 #: ../inc/profile.inc:263
-#, fuzzy
 msgid "Recommend this profile for User of the Day:"
-msgstr "Profil javaslása a Nap felhasználójának:"
+msgstr "Profil előterjesztése a Nap felhasználójának:"
 
 #: ../inc/profile.inc:264
 msgid "I %1like%2 this profile"
@@ -1565,9 +1544,8 @@ msgid "Aborted by user"
 msgstr "Felhasználó által megszakítva"
 
 #: ../inc/result.inc:186 ../inc/result.inc:239
-#, fuzzy
 msgid "Upload failed"
-msgstr "Frissítés sikertelen:"
+msgstr "Feltöltés sikertelen"
 
 #: ../inc/result.inc:189
 msgid "Timed out - no response"
@@ -1693,9 +1671,8 @@ msgid "Show names"
 msgstr "Nevek mutatása"
 
 #: ../inc/result.inc:336
-#, fuzzy
 msgid "Task"
-msgstr "Feladatok"
+msgstr "Feladat"
 
 #: ../inc/result.inc:339
 msgid "Work unit"
@@ -1884,9 +1861,8 @@ msgid "Type"
 msgstr "Típus"
 
 #: ../inc/team.inc:119 ../user/team_manage.php:63
-#, fuzzy
 msgid "Message board"
-msgstr "Üzenőfalak"
+msgstr "Üzenőfal"
 
 #: ../inc/team.inc:120 ../user/forum_forum.php:134 ../user/forum_index.php:93
 msgid "Threads"
@@ -2028,6 +2004,7 @@ msgid "without \"http://\""
 msgstr "\"http://\" nélkül"
 
 #: ../inc/team.inc:437
+#, fuzzy
 msgid "This URL will be linked to from the team's page on this site."
 msgstr "Erre az URL-re fog hivatkozni a csapat oldala ezen a honlapon."
 
@@ -2099,7 +2076,6 @@ msgid "Team"
 msgstr "Csapat"
 
 #: ../inc/user.inc:168
-#, fuzzy
 msgid "Cross-project"
 msgstr "Projekt-közti"
 
@@ -2258,6 +2234,7 @@ msgid "Computers"
 msgstr "Számítógépek"
 
 #: ../inc/user.inc:331
+#, fuzzy
 msgid "Donor"
 msgstr "Donor"
 
@@ -2282,17 +2259,16 @@ msgid "Add as friend"
 msgstr "Barátokhoz ad"
 
 #: ../inc/util.inc:113
-#, fuzzy
 msgid "log out"
-msgstr "Kijelentkezés"
+msgstr "kijelentkezés"
 
 #: ../inc/util.inc:115
 msgid "log in"
-msgstr ""
+msgstr "bejelentkezés"
 
 #: ../inc/util.inc:174 ../user/login_form.php:37 ../user/login_form.php:62
 msgid "Log in"
-msgstr ""
+msgstr "Bejelentkezés"
 
 # #######################################
 # Create account form (create_account_form.php)
@@ -2301,9 +2277,8 @@ msgid "Create an account"
 msgstr "Fiók létrehozása"
 
 #: ../inc/util.inc:176
-#, fuzzy
 msgid "Server status page"
-msgstr "Szerver állapot"
+msgstr "A szerver állapotának oldala"
 
 #: ../inc/util.inc:218
 msgid ""
@@ -2414,7 +2389,7 @@ msgid ""
 "computer. The current version of the application will be downloaded to your "
 "computer. This happens automatically; you don't have to do anything."
 msgstr ""
-"A(z) %1 jelenleg a következő alkalmazásokat használja. Ha résztvesz a(z) %1 "
+"A(z) %1 jelenleg a következő alkalmazásokat használja. Ha részt vesz a(z) %1 "
 "projektben, ezen alkalmazások közül egy vagy több futtathatóvá válik az Ön "
 "számítógépén. Az alkalmazás aktuális verziója letöltődik számítógépére. A "
 "folyamat automatikus; Önnek semmit nem kell tennie."
@@ -2455,7 +2430,6 @@ msgid "Bold"
 msgstr "Félkövér"
 
 #: ../user/bbcode.php:33
-#, fuzzy
 msgid "Italic"
 msgstr "DÅ‘lt"
 
@@ -2480,7 +2454,6 @@ msgid "link to website"
 msgstr "hivatkozás egy weboldalra"
 
 #: ../user/bbcode.php:39
-#, fuzzy
 msgid "Quoted text"
 msgstr "Idézet"
 
@@ -2574,10 +2547,11 @@ msgid "The invitation code you gave is not valid."
 msgstr "Az Ön által megadott meghívó"
 
 #: ../user/create_account_action.php:94
-#, fuzzy
 msgid ""
 "Invalid email address: you must enter a valid address of the form name at domain"
-msgstr "Az emailcímnek 'név at szolgáltató' alakúnak kell lennie!"
+msgstr ""
+"Érvénytelen email cím: az érvényes emailcímnek 'név at szolgáltató' alakúnak "
+"kell lennie"
 
 #: ../user/create_account_action.php:98
 msgid "There's already an account with that email address."
@@ -2605,15 +2579,12 @@ msgstr ""
 "A fióklétrehozás jelenleg nem engedélyezett. Kérjük, próbálja meg később."
 
 #: ../user/create_account_form.php:53
-#, fuzzy
 msgid ""
 "Don't use this form. Just run BOINC, select Add Project, and enter an email "
 "address and password."
 msgstr ""
-"MEGJEGYZÉS: Ha Ön a BOINC 5.2+ (az 5.2-es vagy annál nagyobb) verzióját "
-"használja, ne töltse ki ezt a nyomtatványt. Egyszerűen csak futassa a "
-"BOINCot, válassza a Kapcsolódás projekthez menüpontot, majd írja be a kívánt "
-"emailcímet és jelszót."
+"Ne használja ezt az űrlapot. Csak futtassa a BOINCot, válassza a Projekt "
+"hozzáadását, és írjon be egy email címet és egy jelszót."
 
 #: ../user/create_account_form.php:71
 msgid ""
@@ -2776,7 +2747,6 @@ msgstr ""
 "létrehozásához vagy szerkesztéséhez. Elnézést kérünk a kényelmetlenségért."
 
 #: ../user/delete_account.php:57
-#, fuzzy
 msgid "Couldn't delete account"
 msgstr "Nem tudtam törölni a fiókot."
 
@@ -2785,7 +2755,6 @@ msgid "Account deleted"
 msgstr "Fiók törölve"
 
 #: ../user/delete_account.php:60
-#, fuzzy
 msgid "Your account has been deleted."
 msgstr "Az Ön fiókját töröltük."
 
@@ -2827,7 +2796,6 @@ msgid "Yes"
 msgstr "Igen"
 
 #: ../user/delete_account.php:79
-#, fuzzy
 msgid "Delete this account"
 msgstr "Fiók törlése"
 
@@ -2838,7 +2806,6 @@ msgid "No"
 msgstr "Nem"
 
 #: ../user/delete_account.php:80
-#, fuzzy
 msgid "Do not delete this account"
 msgstr "Ne törölje ezt a fiókot"
 
@@ -2847,12 +2814,10 @@ msgid "couldn't delete profile - please try again later"
 msgstr "nem tudtam törölni a profilt, kérjük próbálja meg később"
 
 #: ../user/delete_profile.php:33
-#, fuzzy
 msgid "Delete Confirmation"
 msgstr "Törlés jóváhagyása"
 
 #: ../user/delete_profile.php:35
-#, fuzzy
 msgid "Your profile has been deleted."
 msgstr "A fiókját töröltük."
 
@@ -2879,14 +2844,14 @@ msgid ""
 "If you're sure, click 'Yes'\n"
 "to remove your profile from our database."
 msgstr ""
+"Ha biztos benne, hogy profilját\n"
+"törölni akarja adatbázisunkból, kattintson az \"Igen\" gombra!"
 
 #: ../user/delete_profile.php:52
-#, fuzzy
 msgid "Delete my profile"
 msgstr "Profil törlése"
 
 #: ../user/delete_profile.php:53
-#, fuzzy
 msgid "Do not delete my profile"
 msgstr "Ne törölje a profilomat"
 
@@ -2918,7 +2883,6 @@ msgid "This project is not accepting donations."
 msgstr "Ez a projekt nem fogad el adományokat."
 
 #: ../user/donations.php:34
-#, fuzzy
 msgid "%1 donations"
 msgstr "%1 adomány"
 
@@ -2948,7 +2912,7 @@ msgstr ""
 "A PayPal többféle valutát elfogad\n"
 "(kanadai dollár, euró, angol font, usa dollár\n"
 "japán jen, ausztrál dollár, új-zélandi dollár\n"
-"svájci frank, hong kongi dollár, szingapúri dollár, svéd korona\n"
+"svájci frank, hongkongi dollár, szingapúri dollár, svéd korona\n"
 "dán korona, lengyel zloty, norvég korona,\n"
 "magyar forint, cseh korona).\n"
 "Használja a beépített valutaváltót\n"
@@ -2965,7 +2929,6 @@ msgid "Estimated value in"
 msgstr "Becsült értéke"
 
 #: ../user/donations.php:320 ../user/donations.php:324
-#, fuzzy
 msgid "Anonymous donation"
 msgstr "Névtelen adomány"
 
@@ -3042,7 +3005,6 @@ msgid "There's already an account with that email address"
 msgstr "Már létezik fiók ezzel az email címmel"
 
 #: ../user/edit_email_action.php:54
-#, fuzzy
 msgid "Invalid password."
 msgstr "Érvénytelen jelszó."
 
@@ -3055,83 +3017,83 @@ msgid "Please %1validate this email address%2."
 msgstr "Kérjük, %1erősítse meg ezt az email címet%2."
 
 #: ../user/edit_email_action.php:67
-#, fuzzy
 msgid ""
 "We can't update your email address due to a database problem.  Please try "
 "again later."
 msgstr ""
-"A fióklétrehozás jelenleg nem engedélyezett. Kérjük, próbálja meg később."
+"Adatbázis probléma miatt nem tudjuk frissíteni az email címét. Kérjük, "
+"próbálja meg később."
 
 #: ../user/edit_email_form.php:28 ../user/edit_email_form.php:52
 msgid "Change email address"
-msgstr ""
+msgstr "E-mail cím megváltoztatása"
 
 #: ../user/edit_email_form.php:37
-#, fuzzy
 msgid "Change the email address of your account"
-msgstr "email cím"
+msgstr "A fiókjához tartozó email cím megváltoztatása"
 
 #: ../user/edit_email_form.php:38
-#, fuzzy
 msgid "New email address"
-msgstr "email cím"
+msgstr "Új email cím"
 
 #: ../user/edit_email_form.php:39
-#, fuzzy
 msgid "Must be a valid address of the form 'name at domain'"
-msgstr "Az emailcímnek 'név at szolgáltató' alakúnak kell lennie!"
+msgstr "Az érvényes emailcímnek 'név at szolgáltató' alakúnak kell lennie"
 
 #: ../user/edit_email_form.php:49
+#, fuzzy
 msgid "No password?"
-msgstr ""
+msgstr "Nincs jelszó?"
 
 #: ../user/edit_forum_preferences_action.php:35
-#, fuzzy
 msgid "Confirm reset"
-msgstr "Jelszó megerősítése"
+msgstr "Visszaállítás megerősítése"
 
 #: ../user/edit_forum_preferences_action.php:36
 msgid ""
 "This action will erase any changes you have made in your community "
 "preferences. To cancel, click your browser's Back button."
 msgstr ""
+"Ez a művelet törölni fog minden változtatást, amit a közösségi "
+"beállításokban eszközölt. Ha mégsem szeretné a törlést, kattintson a "
+"böngészőben a Vissza gombra!"
 
 #: ../user/edit_forum_preferences_action.php:40
-#, fuzzy
 msgid "Reset preferences"
-msgstr "Beállítások szerkesztése"
+msgstr "Beállítások visszaállítása"
 
 #: ../user/edit_forum_preferences_action.php:90
 msgid "Error: Not the right kind of file, only PNG and JPEG are supported."
-msgstr ""
+msgstr "Hiba: Helytelen filetípus! Csak PNG vagy JPEG formátum támogatott!"
 
 #: ../user/edit_forum_preferences_action.php:116
 msgid "Your signature was too long, please keep it less than 250 characters."
-msgstr ""
+msgstr "Az aláírása túl hosszú, kérjük, módosítsa 250 karakternél rövidebbre!"
 
 #: ../user/edit_forum_preferences_action.php:139
 #: ../user/edit_forum_preferences_action.php:153
-#, fuzzy
 msgid "No such user: %1"
-msgstr "Nincs ilyen felhasználó"
+msgstr "Nincs %1 nevű felhasználó"
 
 #: ../user/edit_forum_preferences_form.php:56
 msgid ""
 "How should we notify you of new private messages, friend requests, posts in "
 "subscribed threads, and other events?"
 msgstr ""
+"Hogyan értesítsük Önt a különböző eseményekről, új üzenetekről, ismerősnek "
+"jelölésekről, új bejegyzésekről a feliratkozott témákban?"
 
 #: ../user/edit_forum_preferences_form.php:57
 msgid "On my Account page (no email)"
-msgstr ""
+msgstr "Felhasználói oldalamon (ne e-mailben)"
 
 #: ../user/edit_forum_preferences_form.php:58
 msgid "Immediately, by email"
-msgstr ""
+msgstr "Azonnal, e-mailben"
 
 #: ../user/edit_forum_preferences_form.php:59
 msgid "In a single daily email"
-msgstr ""
+msgstr "Napi egyszer, e-mailben"
 
 #: ../user/edit_forum_preferences_form.php:75
 #, fuzzy
@@ -3140,40 +3102,40 @@ msgstr "Üzenőfalak"
 
 #: ../user/edit_forum_preferences_form.php:76
 msgid "Avatar"
-msgstr ""
+msgstr "Profilkép"
 
 #: ../user/edit_forum_preferences_form.php:77
 msgid "An image representing you on the message boards."
-msgstr ""
+msgstr "Az Ön üzenőfalakon megjelenő képe"
 
 #: ../user/edit_forum_preferences_form.php:78
 msgid "Format: JPG or PNG. Size: at most 4 KB, 100x100 pixels"
-msgstr ""
+msgstr "JPG vagy PNG formátum, legfeljebb 4 KB, 100x100 pixel"
 
 #: ../user/edit_forum_preferences_form.php:80
 #, fuzzy
 msgid "Don't use an avatar"
-msgstr "Ne használjon HTML címkéket."
+msgstr "Ne legyen profilkép"
 
 #: ../user/edit_forum_preferences_form.php:82
 msgid "Use a Globally Recognized Avatar provided by %1"
-msgstr ""
+msgstr "Használjon globális profilképet (gravatart) innen: %1"
 
 #: ../user/edit_forum_preferences_form.php:84
 msgid "Use this uploaded avatar:"
-msgstr ""
+msgstr "Használja az alábbi feltöltött profilképet:"
 
 #: ../user/edit_forum_preferences_form.php:87
 msgid "Avatar preview"
-msgstr ""
+msgstr "Profilkép előnézet"
 
 #: ../user/edit_forum_preferences_form.php:87
 msgid "This is how your avatar will look"
-msgstr ""
+msgstr "Így fog megjelenni a profilképe"
 
 #: ../user/edit_forum_preferences_form.php:96
 msgid "Signature for message board posts"
-msgstr ""
+msgstr "Aláírás az üzenőfali bejegyzésekhez"
 
 #: ../user/edit_forum_preferences_form.php:99
 msgid ""
@@ -3181,22 +3143,26 @@ msgid ""
 "<br> providing dynamic 'signature images'\n"
 "<br> showing your latest credit info, project news, etc."
 msgstr ""
+"Tekintse meg a különböző %1ingyenes szolgáltatásokat%2, melyek\n"
+"<br> kitűnő aláírásképeket biztosítanak\n"
+"<br> megjelenítik az Ön legfrissebb kreditinformációit, a projekt híreket, "
+"stb."
 
 #: ../user/edit_forum_preferences_form.php:104
 msgid "characters remaining"
-msgstr ""
+msgstr "fennmaradó karakterek"
 
 #: ../user/edit_forum_preferences_form.php:105
 msgid "Attach signature by default"
-msgstr ""
+msgstr "Aláírás alapértelmezett csatolása"
 
 #: ../user/edit_forum_preferences_form.php:108
 msgid "Signature preview"
-msgstr ""
+msgstr "Aláírás előnézet"
 
 #: ../user/edit_forum_preferences_form.php:109
 msgid "This is how your signature will look in the forums"
-msgstr ""
+msgstr "Így fog megjelenni az aláírása a fórumokon"
 
 #: ../user/edit_forum_preferences_form.php:127
 #, fuzzy
@@ -3205,31 +3171,31 @@ msgstr "Üzenőfalak"
 
 #: ../user/edit_forum_preferences_form.php:129
 msgid "What to display"
-msgstr ""
+msgstr "Megjelenítendő"
 
 #: ../user/edit_forum_preferences_form.php:130
 msgid "Hide avatar images"
-msgstr ""
+msgstr "Profilkép elrejtése"
 
 #: ../user/edit_forum_preferences_form.php:131
 msgid "Hide signatures"
-msgstr ""
+msgstr "Aláírás elrejtése"
 
 #: ../user/edit_forum_preferences_form.php:132
 msgid "Show images as links"
-msgstr ""
+msgstr "Képek megjelenítése hivatkozásként"
 
 #: ../user/edit_forum_preferences_form.php:133
 msgid "Open links in new window/tab"
-msgstr ""
+msgstr "Hivatkozások megnyitása új ablakban/fülön"
 
 #: ../user/edit_forum_preferences_form.php:134
 msgid "Highlight special users"
-msgstr ""
+msgstr "Különleges felhasználók kiemelése"
 
 #: ../user/edit_forum_preferences_form.php:138
 msgid "How to sort"
-msgstr ""
+msgstr "Rendezés módja"
 
 #: ../user/edit_forum_preferences_form.php:139
 #, fuzzy
@@ -3245,153 +3211,154 @@ msgstr "Ãœzenetek"
 
 #: ../user/edit_forum_preferences_form.php:140
 msgid "Jump to first new post in thread automatically"
-msgstr ""
+msgstr "Automatikus ugrás a téma legújabb bejegyzésére"
 
 #: ../user/edit_forum_preferences_form.php:141
 msgid "Do not reorder sticky posts"
-msgstr ""
+msgstr "Ne rendezze át az emlékeztetőket"
 
 #: ../user/edit_forum_preferences_form.php:142
 msgid "If a thread contains more than this number of posts"
-msgstr ""
+msgstr "Ha egy témakör az itt megadottnál több bejegyzést tartalmaz,"
 
 #: ../user/edit_forum_preferences_form.php:143
 msgid "only display the first one and this many of the last ones"
 msgstr ""
+"csak az elsőt és az utána következő itt megjelölt darabszámút jelenítse meg"
 
 #: ../user/edit_forum_preferences_form.php:149
 #, fuzzy
 msgid "Message filtering"
-msgstr "Üzenőfalak"
+msgstr "Üzenetek szűrése"
 
 #: ../user/edit_forum_preferences_form.php:165
 msgid "Filtered users"
-msgstr ""
+msgstr "Szűrt felhasználók"
 
 #: ../user/edit_forum_preferences_form.php:166
-#, fuzzy
 msgid "Ignore message board posts and private messages from these users."
-msgstr "Üzenőfalak és privát üzenetek"
+msgstr ""
+"Hagyja figyelmen kívül az alábbi felhasználók bejegyzéseit és privát "
+"üzeneteit."
 
 #: ../user/edit_forum_preferences_form.php:168
 msgid "User ID (For instance: 123456789)"
-msgstr ""
+msgstr "Felhasználó azonosító (például: 123456789)"
 
 #: ../user/edit_forum_preferences_form.php:169 ../user/pm.php:251
 msgid "Add user to filter"
 msgstr "Ezen felhasználó szűrőhöz adása"
 
 #: ../user/edit_forum_preferences_form.php:174
-#, fuzzy
 msgid "Click here to update preferences"
-msgstr "Beállítások frissítése"
+msgstr "Kattintson ide a beállítások frissítéséhez"
 
 #: ../user/edit_forum_preferences_form.php:176
 #: ../user/edit_forum_preferences_form.php:178
 msgid "Reset"
-msgstr ""
+msgstr "Visszaállítás"
 
 #: ../user/edit_forum_preferences_form.php:177
 msgid "Or click here to reset preferences to the defaults"
 msgstr ""
+"Vagy kattintson ide a beállítások alapértelmezettre történő "
+"visszaállításához"
 
 #: ../user/edit_passwd_action.php:50
-#, fuzzy
 msgid "Invalid account key"
-msgstr "Fiókkulcs"
+msgstr "Érvénytelen fiókkulcs"
 
 #: ../user/edit_passwd_action.php:55
 msgid "No account with that email address was found"
-msgstr ""
+msgstr "Ehhez az e-mail címhez nem találtam felhasználói fiókot"
 
 #: ../user/edit_passwd_action.php:59
 #, fuzzy
 msgid "Invalid password"
-msgstr "Jelszó megerősítése"
+msgstr "Érvénytelen jelszó"
 
 #: ../user/edit_passwd_action.php:63 ../user/edit_passwd_form.php:28
 #: ../user/edit_passwd_form.php:58
 msgid "Change password"
-msgstr ""
+msgstr "Jelszó megváltoztatása"
 
 #: ../user/edit_passwd_action.php:67
 #, fuzzy
 msgid "Your password has been changed."
-msgstr "Üzenet elküldve."
+msgstr "Jelszava megváltozott"
 
 #: ../user/edit_passwd_action.php:69
-#, fuzzy
 msgid ""
 "We can't update your password due to a database problem. Please try again "
 "later."
 msgstr ""
-"A fióklétrehozás jelenleg nem engedélyezett. Kérjük, próbálja meg később."
+"Adatbázis probléma miatt nem tudjuk frissíteni a jelszavát. Kérjük, próbálja "
+"meg később."
 
 #: ../user/edit_passwd_form.php:42
 msgid "You can identify yourself using either"
-msgstr ""
+msgstr "Azonosíthatja magát"
 
 #: ../user/edit_passwd_form.php:44
 msgid "your email address and old password"
-msgstr ""
+msgstr "e-mail címének és régi jelszavának megadásával"
 
 #: ../user/edit_passwd_form.php:45
 msgid "your account key"
-msgstr ""
+msgstr "felhasználói fiókkulcsának megadásával"
 
 #: ../user/edit_passwd_form.php:49
 msgid "Current password"
-msgstr ""
+msgstr "Jelenlegi jelszó"
 
 #: ../user/edit_passwd_form.php:51
 msgid "<b>OR</b>: Account key"
-msgstr ""
+msgstr "<b>VAGY</b> Fiókkulcsának megadásával"
 
 #: ../user/edit_passwd_form.php:52
 msgid "Get account key by email"
-msgstr ""
+msgstr "Fiókkulcs kérése e-mailben"
 
 #: ../user/edit_passwd_form.php:56
 msgid "New password"
-msgstr ""
+msgstr "Új jelszó"
 
 #: ../user/edit_passwd_form.php:57
 msgid "New password, again"
-msgstr ""
+msgstr "Új jelszó, még egyszer"
 
 #: ../user/edit_user_info_action.php:31
 msgid "HTML tags are not allowed in your name."
-msgstr ""
+msgstr "A HTML-kódok nem engedélyezettek a névben."
 
 #: ../user/edit_user_info_action.php:34
-#, fuzzy
 msgid "You must supply a name for your account."
-msgstr "Új fiók létrehozásához Önnek meghívókóddal kell rendelkeznie."
+msgstr "Fiók létrehozásához kötelező a nevet megadnia."
 
 #: ../user/edit_user_info_action.php:58
 msgid "Couldn't update user info."
-msgstr ""
+msgstr "Nem tudtuk frissíteni a felhasználói adatokat."
 
 #: ../user/edit_user_info_form.php:29
 #, fuzzy
 msgid "Edit account information"
-msgstr "Fiókinformáció"
+msgstr "Fiókinformációk szerkesztése"
 
 #: ../user/edit_user_info_form.php:34
 msgid "Name %1 real name or nickname%2"
-msgstr ""
+msgstr "Név %1 valódi név vagy becenév%2"
 
 #: ../user/edit_user_info_form.php:37
 msgid "URL %1 of your web page; optional%2"
-msgstr ""
+msgstr "%1 Weblapjának URL-je%2 (nem kötelező)"
 
 #: ../user/edit_user_info_form.php:45
 msgid "Postal (ZIP) code %1 Optional%2"
-msgstr ""
+msgstr "Irányítószám %1 Nem kötelező%2"
 
 #: ../user/edit_user_info_form.php:49
 msgid "Update info"
-msgstr ""
+msgstr "Infók frissítése"
 
 #: ../user/explain_state.php:27
 #, fuzzy
@@ -3404,16 +3371,20 @@ msgid ""
 "computer, and if so whether the computer has finished it. Possible values "
 "are:"
 msgstr ""
+"A feladat <b>szerverstátusza</b> megmutatja, hogy a feladat már kiküldésre "
+"került-e, illetve hogy a számítógép elvégezte-e azt. A lehetséges értékek:"
 
 #: ../user/explain_state.php:35
 msgid ""
 "The task is not ready to send (for example, because its input files are "
 "unavailable)"
 msgstr ""
+"A feladat nem áll készen a küldésre (például mert a bemeneti fájljai nem "
+"érhetők el)"
 
 #: ../user/explain_state.php:38
 msgid "The task is ready to send, but hasn't been sent yet."
-msgstr ""
+msgstr "A feladat készen áll a küldésre, de még nincs kiküldve."
 
 #: ../user/explain_state.php:40
 #, fuzzy
@@ -3422,191 +3393,212 @@ msgstr "Folyamatban"
 
 #: ../user/explain_state.php:41
 msgid "The task has been sent; waiting for completion."
-msgstr ""
+msgstr "A feladat kiküldve; várakozás a befejezésre."
 
 #: ../user/explain_state.php:44
 msgid ""
 "The task has been sent to a computer and either it has timed out or the "
 "computer has reported its completion."
 msgstr ""
+"A feladat kiküldve egy számítógépre és lejárt az ideje, vagy a számítógép "
+"jelezte a befejezését."
 
 #: ../user/explain_state.php:49
 msgid "Outcomes"
-msgstr ""
+msgstr "Eredmény"
 
 #: ../user/explain_state.php:52
 msgid ""
 "A tasks's <b>outcome</b> is defined if its server state is <b>over</b>. "
 "Possible values are:"
 msgstr ""
+"A feladat <b>kimenete</b> akkor értelmezhető, ha a szerver státusz: "
+"<b>kész</b>. Lehetséges értékek:"
 
 #: ../user/explain_state.php:57
 msgid ""
 "The task was sent to a computer, but the computer has not yet completed the "
 "work and reported the outcome."
 msgstr ""
+"A feladat kiküldve, de a számítógép még nem végezte el és nem jelezte az "
+"eredményt."
 
 #: ../user/explain_state.php:60
 msgid "A computer completed and reported the task successfully."
-msgstr ""
+msgstr "A számítógép jelezte a feladat sikeres elvégzését."
 
 #: ../user/explain_state.php:63
 msgid ""
 "The server wasn't able to send the task to a computer (perhaps because its "
 "resource requirements were too large)"
 msgstr ""
+"A szerver nem tudta kiküldeni a feladatot a számítógépre (talán a feladat "
+"túlzott erőforrásigénye miatt)"
 
 #: ../user/explain_state.php:65
-#, fuzzy
 msgid "Client error"
-msgstr "Érvényesítési hiba"
+msgstr "Kliens hiba"
 
 #: ../user/explain_state.php:66
 msgid "The task was sent to a computer and an error occurred."
-msgstr ""
+msgstr "A feladat kiküldve a számítógépre, de hiba lépett fel."
 
 #: ../user/explain_state.php:69
 msgid ""
 "The task was sent to a computer and no reply was received within the time "
 "limit."
-msgstr ""
+msgstr "A feladat kiküldve a számítógépre, de határidőn belül nem jött válasz."
 
 #: ../user/explain_state.php:72
 msgid ""
 "The task wasn't sent to a computer because enough other tasks were completed "
 "for this workunit."
 msgstr ""
+"A feladat nem került kiküldésre, mivel elég egyéb feladat lett kész ehhez a "
+"munkacsomaghoz."
 
 #: ../user/explain_state.php:75
 msgid ""
 "The task was reported but could not be validated, typically because the "
 "output files were lost on the server."
 msgstr ""
+"A feladat elvégzését jelezték, de nem hagyható jóvá, tipikusan azért, mert a "
+"kimeneti fájlok a szerveren elvesztek."
 
 #: ../user/explain_state.php:80
-#, fuzzy
 msgid "Client states"
-msgstr "Kliens állapot"
+msgstr "Kliens állapotok"
 
 #: ../user/explain_state.php:81
 msgid ""
 "A result's <b>client state</b> indicates the stage of processing at which an "
 "error occurred."
 msgstr ""
+"Az eredmény <b>kliens állapota</b> jelzi a feldolgozás azon lépését, melynél "
+"a hiba jelentkezett."
 
 #: ../user/explain_state.php:86
 msgid "The computer has not yet completed the task."
-msgstr ""
+msgstr "A számítógép még nem végezte el a feladatot."
 
 #: ../user/explain_state.php:89
 msgid "The computer completed the task successfully."
-msgstr ""
+msgstr "A számítógép sikeresen befejezte a feladatot."
 
 #: ../user/explain_state.php:92
 msgid "The computer couldn't download the application or input files."
 msgstr ""
+"A számítógép nem tudta letölteni az alkalmazást vagy a bemeneti fájlokat."
 
 #: ../user/explain_state.php:95
 msgid "An error occurred during computation."
-msgstr ""
+msgstr "Hiba lépett fel a feldolgozás során."
 
 #: ../user/explain_state.php:98
 msgid "The computer couldn't upload the output files."
-msgstr ""
+msgstr "A számítógép nem tudta feltölteni a kimeneti fájlokat."
 
 #: ../user/explain_state.php:103
 msgid "Time reported and deadline"
-msgstr ""
+msgstr "Jelentés ideje és határidő"
 
 #: ../user/explain_state.php:106
 msgid ""
 "A task's <b>Time reported or deadline</b> field depends on whether the task "
 "has been reported yet:"
 msgstr ""
+"Egy feladat <b>Jelentés ideje és határidő</b> mező értéke attól függ, hogy "
+"annak állapotáról érkezett-e már jelentés:"
 
 #: ../user/explain_state.php:110
 msgid "Already reported"
-msgstr ""
+msgstr "Már jelentve"
 
 #: ../user/explain_state.php:110
 msgid "The date/time it was reported"
-msgstr ""
+msgstr "Jelentés dátuma/ideje"
 
 #: ../user/explain_state.php:111
 msgid "Not reported yet, deadline in the future"
-msgstr ""
+msgstr "Nincs jelentve, a határidő még nem járt le"
 
 #: ../user/explain_state.php:112
 msgid "Deadline, shown in green."
-msgstr ""
+msgstr "Határidő, zölddel kiemelve."
 
 #: ../user/explain_state.php:114
 msgid "Not reported yet, deadline in the past"
-msgstr ""
+msgstr "Nincs jelentve, határidő már lejárt"
 
 #: ../user/explain_state.php:115
 msgid "Deadline, shown in red."
-msgstr ""
+msgstr "Határidő, pirossal kiemelve."
 
 #: ../user/explain_state.php:120
 #, fuzzy
 msgid "Unknown field"
-msgstr "Ismeretlen"
+msgstr "Ismeretlen mező"
 
 #: ../user/ffmail_action.php:47
-#, fuzzy
 msgid "Email preview"
-msgstr "Email cím"
+msgstr "Email előnézet"
 
 #: ../user/ffmail_action.php:48
 msgid "Your email will appear as follows:"
-msgstr ""
+msgstr "Az Ön emailje így fog megjelenni:"
 
 #: ../user/ffmail_action.php:57
-#, fuzzy
 msgid "Send email"
-msgstr "Üzenet küldése"
+msgstr "Email küldése"
 
 #: ../user/ffmail_action.php:59
 msgid "Use your browser's back button to return to message form"
 msgstr ""
+"Ha vissza akar térni az üzenet űrlaphoz, használja a böngésző Vissza gombját"
 
 #: ../user/ffmail_action.php:63
 #, fuzzy
 msgid "Sending emails"
-msgstr "Feldolgozatlan kredit"
+msgstr "E-mail küldése"
 
 #: ../user/ffmail_action.php:84
 msgid "email sent successfully to %1"
-msgstr ""
+msgstr "email sikeresen elküldve %1 részére"
 
 #: ../user/ffmail_action.php:86
+#, fuzzy
 msgid "failed to send email to %1: %2"
-msgstr ""
+msgstr "az email küldése sikertelen neki: %1: %2"
 
 #: ../user/ffmail_action.php:92
 msgid "Thanks for telling your friends about %1"
-msgstr ""
+msgstr "Köszönjük, hogy mesél ismerőseinek erről: %1"
 
 #: ../user/ffmail_action.php:94
 msgid ""
 "You forgot to enter your friends' names and/or email addresses; Please "
 "%1return to the form%2 and enter them."
 msgstr ""
+"Elfelejtette megadni barátai neveit és/vagy email címeiket; Kérjük, térjen %"
+"1vissza az űrlaphoz%2 és adja meg ezeket."
 
 #: ../user/ffmail_form.php:31
 msgid ""
 "This project hasn\\'t created an email message - please notify its "
 "administrators"
 msgstr ""
+"Ez a projekt nem hozott létre email üzenetet - kérjük, értesítse az "
+"adminisztrátorokat"
 
 #: ../user/ffmail_form.php:34
 msgid "Tell your friends about %1"
-msgstr ""
+msgstr "Meséljen barátainak erről: %1"
 
 #: ../user/ffmail_form.php:38
 msgid "Help us by telling your friends, family and coworkers about %1"
 msgstr ""
+"Segítse munkánkat és meséljen barátainak, családjának és munkatársainak "
+"erről: %1"
 
 #: ../user/ffmail_form.php:40
 msgid ""
@@ -3614,52 +3606,52 @@ msgid ""
 "might be interested in %1. We'll send them an email in your name, and you "
 "can add your own message if you like."
 msgstr ""
+"Adja meg azon ismerősei nevét és email címét, akiket Ön szerint érdekelhet "
+"a(z) %1 projektről. Küldünk egy emailt nekik az Ön nevében, amihez saját "
+"üzenetet is hozzáadhat, ha szeretne."
 
 #: ../user/ffmail_form.php:43
 #, fuzzy
 msgid "Your name:"
-msgstr "Nevek mutatása"
+msgstr "Az Ön neve:"
 
 #: ../user/ffmail_form.php:43
 #, fuzzy
 msgid "Your email address:"
-msgstr "email cím"
+msgstr "Az Ön email címe:"
 
 #: ../user/ffmail_form.php:49
-#, fuzzy
 msgid "Friend's name:"
-msgstr "Barátok"
+msgstr "Ismerős neve:"
 
 #: ../user/ffmail_form.php:49
-#, fuzzy
 msgid "Friend's email address:"
-msgstr "email cím"
+msgstr "Ismerős email címe:"
 
 #: ../user/ffmail_form.php:57
 msgid "Additional message (optional)"
-msgstr ""
+msgstr "Személyes üzenet (nem kötelező)"
 
 #: ../user/ffmail_form.php:60
-#, fuzzy
 msgid "Send"
-msgstr "Elküldve"
+msgstr "Elküld"
 
 #: ../user/forum_banishment_vote.php:35
 #: ../user/forum_banishment_vote_action.php:33
 msgid "You are not authorized to banish users."
-msgstr ""
+msgstr "Nincs jogosultsága a felhasználók kitiltásához."
 
 #: ../user/forum_banishment_vote.php:41 ../user/forum_banishment_vote.php:46
 msgid "Banishment Vote"
-msgstr ""
+msgstr "Kitiltási javaslat"
 
 #: ../user/forum_banishment_vote.php:50
 msgid "No user with this ID found."
-msgstr ""
+msgstr "Ezzel az azonosítóval nem található felhasználó."
 
 #: ../user/forum_banishment_vote.php:54 ../user/forum_moderate_post.php:76
 msgid "User is already banished"
-msgstr ""
+msgstr "A felhasználó már ki van tiltva"
 
 #: ../user/forum_banishment_vote.php:59 ../user/forum_moderate_post.php:79
 msgid ""
@@ -3667,70 +3659,77 @@ msgid ""
 "for chosen time period.<br/>It should be done only if %1 has consistently "
 "exhibited trollish behavior."
 msgstr ""
+"Biztos benne, hogy ki akarja tiltani %1-t?<br/>Így %1 nem írhat új "
+"bejegyzést egy megadott ideig.<br/>Csak akkor tiltsuk ki %1-t, ha "
+"folyamatosan zavaró viselkedést folytat."
 
 #: ../user/forum_banishment_vote.php:61
 msgid ""
 "Select the reason category, optionally write a longer description of why the "
 "user should be banished."
 msgstr ""
+"Válassza ki az okot, esetleg írja le bővebben, miért kellene a felhasználót "
+"kitiltani."
 
 #: ../user/forum_banishment_vote.php:62 ../user/forum_moderate_thread.php:50
 msgid "Category"
-msgstr ""
+msgstr "Oka"
 
 #: ../user/forum_banishment_vote.php:64
 #: ../user/forum_banishment_vote_action.php:57
 #: ../user/forum_moderate_post.php:55 ../user/forum_moderate_thread.php:52
 msgid "Obscene"
-msgstr ""
+msgstr "Trágár"
 
 #: ../user/forum_banishment_vote.php:65
 #: ../user/forum_banishment_vote_action.php:59
 #: ../user/forum_moderate_post.php:56 ../user/forum_moderate_thread.php:53
 msgid "Flame/Hate mail"
-msgstr ""
+msgstr "Gyűlölködő emailek"
 
 #: ../user/forum_banishment_vote.php:66
 #: ../user/forum_banishment_vote_action.php:61
 #: ../user/forum_moderate_post.php:59
 msgid "User Request"
-msgstr ""
+msgstr "Felhasználó kérésére"
 
 #: ../user/forum_banishment_vote.php:67
 #: ../user/forum_banishment_vote_action.php:63
 #: ../user/forum_moderate_post.php:60 ../user/forum_moderate_thread.php:55
 #, fuzzy
 msgid "Other"
-msgstr "Vége"
+msgstr "Egyéb"
 
 #: ../user/forum_banishment_vote.php:69 ../user/forum_moderate_post.php:53
 #: ../user/forum_moderate_thread.php:85
 #, fuzzy
 msgid "Reason"
-msgstr "Verzió"
+msgstr "Indoklás"
 
 #: ../user/forum_banishment_vote.php:69 ../user/forum_moderate_thread.php:85
 msgid "Mailed if nonempty"
-msgstr ""
+msgstr "Küldés, ha nem üres"
 
 #: ../user/forum_banishment_vote.php:74
 msgid "Proceed with vote"
-msgstr ""
+msgstr "Szavazattal megerősítve"
 
 #: ../user/forum_banishment_vote_action.php:39
 #: ../user/forum_moderate_post_action.php:63
 msgid "You must specify an action..."
-msgstr ""
+msgstr "Válasszon egy műveletet..."
 
 #: ../user/forum_edit.php:41
 msgid ""
 "You can no longer edit this post.<br/>Posts can only be edited at most %1 "
 "minutes after they have been created."
 msgstr ""
+"Már nem szerkesztheti a bejegyzést.<br/>A bejegyzések létrehozásuk után csak "
+"max. %1 percig szerkeszthetőek."
 
 #: ../user/forum_edit.php:47
 msgid "You are not authorized to edit this post."
-msgstr ""
+msgstr "Nincs jogosultsága ezen bejegyzés szerkesztéséhez."
 
 #: ../user/forum_edit.php:86 ../user/forum_search.php:72
 #, fuzzy
@@ -3754,7 +3753,7 @@ msgstr "Aláírás hozzáadása ehhez az üzenethez"
 
 #: ../user/forum_forum.php:41
 msgid "Not visible to you"
-msgstr ""
+msgstr "Nem látható az Ön számára"
 
 #: ../user/forum_forum.php:80
 #, fuzzy
@@ -3767,14 +3766,12 @@ msgid "New thread"
 msgstr "Téma"
 
 #: ../user/forum_forum.php:96
-#, fuzzy
 msgid "Add a new thread to this forum"
-msgstr "Aláírás hozzáadása ehhez az üzenethez"
+msgstr "Új téma hozzáadása ehhez a fórumhoz"
 
 #: ../user/forum_forum.php:116
-#, fuzzy
 msgid "This message board is available as an %1RSS feed%2"
-msgstr "A hírek elérhetőak %sRSS feed%s formában"
+msgstr "Ez az üzenőfal elérhető %1RSS-hírfolyam%2 formában"
 
 # #######################################
 # Forum thread
@@ -3785,41 +3782,42 @@ msgstr "Ezt a témát adminisztratív okokból rejtetté tették"
 
 #: ../user/forum_forum.php:176
 msgid "This thread is sticky and locked, and you haven't read it yet"
-msgstr ""
+msgstr "Ez a téma kiemelt és zárt, Ön még nem olvasta."
 
 #: ../user/forum_forum.php:176
 msgid "sticky/locked/unread"
-msgstr ""
+msgstr "kiemelt/zárt/olvasatlan"
 
 #: ../user/forum_forum.php:178
 msgid "This thread is sticky and you haven't read it yet"
-msgstr ""
+msgstr "Ez a téma kiemelt és Ön még nem olvasta."
 
 #: ../user/forum_forum.php:178
-#, fuzzy
 msgid "sticky/unread"
-msgstr "olvasatlan"
+msgstr "kiemelt/olvasatlan"
 
 #: ../user/forum_forum.php:182
 msgid "You haven't read this thread yet, and it's locked"
-msgstr ""
+msgstr "Ez a téma zárt és Ön még nem olvasta"
 
 #: ../user/forum_forum.php:182
 #, fuzzy
 msgid "unread/locked"
-msgstr "olvasatlan"
+msgstr "zárt/olvasatlan"
 
+# 81%
 #: ../user/forum_forum.php:184
+#, fuzzy
 msgid "You haven't read this thread yet"
-msgstr ""
+msgstr "Még nem olvasta ezt a témát"
 
 #: ../user/forum_forum.php:190
 msgid "This thread is sticky and locked"
-msgstr ""
+msgstr "Ez a téma kiemelt és zárt"
 
 #: ../user/forum_forum.php:190
 msgid "sticky/locked"
-msgstr ""
+msgstr "kiemelt/zárt"
 
 # #######################################
 # Forum thread
@@ -3840,18 +3838,17 @@ msgid "This thread is locked"
 msgstr "Ezt a témát adminisztratív okokból rejtetté tették"
 
 #: ../user/forum_forum.php:196
-#, fuzzy
 msgid "locked"
-msgstr "Felhasználó blokkolása"
+msgstr "zárt"
 
 #: ../user/forum_forum.php:198
 msgid "You read this thread"
-msgstr ""
+msgstr "Már olvasta ezt a témát"
 
 #: ../user/forum_forum.php:198
 #, fuzzy
 msgid "read"
-msgstr "Téma"
+msgstr "olvasott"
 
 # #######################################
 # Links from the main page
@@ -3865,6 +3862,8 @@ msgid ""
 "Talk live via Skype with a volunteer, in any of several languages. Go to "
 "%1BOINC Online Help%2."
 msgstr ""
+"Beszéljen Skype-on egy önkéntessel a számos támogatott nyelv bármelyikén! "
+"Látogassa meg a %1BOINC Online Súgóját%2."
 
 #: ../user/forum_help_desk.php:44 ../user/forum_index.php:92
 msgid "Topic"
@@ -3873,11 +3872,11 @@ msgstr "Tárgy"
 #: ../user/forum_help_desk.php:45
 #, fuzzy
 msgid "Questions"
-msgstr "Verzió"
+msgstr "Kérdések"
 
 #: ../user/forum_index.php:53 ../user/team_forum.php:68
 msgid "Discussion among members of %1"
-msgstr ""
+msgstr "%1 tagok beszélgetése"
 
 # #######################################
 # Forum sample index page
@@ -3890,33 +3889,35 @@ msgid ""
 "If you have a question or problem, please use the %1Questions & Answers%2 "
 "section of the message boards."
 msgstr ""
+"Ha kérdése vagy problémája van, kérjük, használja az üzenőfalak %1Kérdések & "
+"válaszok%2 részét."
 
 #: ../user/forum_index.php:123
 #, fuzzy
 msgid "Subscribed threads"
-msgstr "Feliratkozás"
+msgstr "Feliratkozott témák"
 
 #: ../user/forum_moderate_post.php:43
 #, fuzzy
 msgid "Moderate post"
-msgstr "Utolsó üzenet"
+msgstr "Bejegyzés moderálása"
 
 #: ../user/forum_moderate_post.php:52
 msgid "Hide post"
-msgstr ""
+msgstr "Bejegyzés elrejtése"
 
 #: ../user/forum_moderate_post.php:57 ../user/forum_moderate_thread.php:54
 msgid "Commercial spam"
-msgstr ""
+msgstr "Kereskedelmi spam"
 
 #: ../user/forum_moderate_post.php:58
 msgid "Doublepost"
-msgstr ""
+msgstr "Duplázott bejegyzés"
 
 #: ../user/forum_moderate_post.php:63
 #, fuzzy
 msgid "Move post"
-msgstr "Nincs kiszolgáló"
+msgstr "Bejegyzés áthelyezése"
 
 #: ../user/forum_moderate_post.php:65
 #, fuzzy
@@ -3924,94 +3925,94 @@ msgid "Destination thread ID:"
 msgstr "Küldés a témához"
 
 #: ../user/forum_moderate_post.php:78
-#, fuzzy
 msgid "Banish user"
-msgstr "Nincs ilyen felhasználó"
+msgstr "Felhasználó kitiltása"
 
 #: ../user/forum_moderate_post.php:80
 msgid "Ban duration"
-msgstr ""
+msgstr "Kitiltás időtartama"
 
 #: ../user/forum_moderate_post.php:81
 #, fuzzy
 msgid "4 hours"
-msgstr "UTC %1 óra"
+msgstr "4 óra"
 
 #: ../user/forum_moderate_post.php:82 ../user/forum_search.php:45
 #, fuzzy
 msgid "1 day"
-msgstr "%1 nap"
+msgstr "1 nap"
 
 #: ../user/forum_moderate_post.php:83
 msgid "1 week"
-msgstr ""
+msgstr "1 hét"
 
 #: ../user/forum_moderate_post.php:84
 msgid "2 weeks"
-msgstr ""
+msgstr "2 hét"
 
 #: ../user/forum_moderate_post.php:85
 #, fuzzy
 msgid "1 month"
-msgstr "%1 üzenet"
+msgstr "1 hónap"
 
 #: ../user/forum_moderate_post.php:86
 msgid "Forever"
-msgstr ""
+msgstr "Végleges"
 
 #: ../user/forum_moderate_post.php:96
 msgid "Optional explanation %1 This is included in email to user.%2"
-msgstr ""
+msgstr "Indoklás (nem kötelező) %1 Ezt emailben megkapja a felhasználó. %2"
 
 #: ../user/forum_moderate_post.php:101 ../user/forum_moderate_thread.php:91
 #: ../user/forum_post.php:130 ../user/forum_report_post.php:84
 #: ../user/forum_rss.php:55 ../user/friend.php:81 ../user/get_passwd.php:41
 #: ../user/get_passwd.php:75
 msgid "OK"
-msgstr ""
+msgstr "OK"
 
 #: ../user/forum_moderate_post_action.php:57
 msgid "You are not authorized to moderate this post."
-msgstr ""
+msgstr "Nincs jogosultsága a bejegyzés moderálásához."
 
 #: ../user/forum_moderate_post_action.php:85
 msgid "Can't move to different category type"
-msgstr ""
+msgstr "Nem sorolható át másik kategóriatípusba"
 
 #: ../user/forum_moderate_post_action.php:89
 msgid "Can't move to different category"
-msgstr ""
+msgstr "Nem sorolható át másik kategóriába"
 
 #: ../user/forum_moderate_post_action.php:110
 msgid "Not authorized to banish users"
-msgstr ""
+msgstr "Nincs jogosultsága felhasználók kitiltásához"
 
 #: ../user/forum_moderate_post_action.php:126
-#, fuzzy
 msgid "Banishment"
-msgstr "Nincs elküldve"
+msgstr "Kitiltás"
 
 #: ../user/forum_moderate_post_action.php:128
 msgid "User %1 has been banished."
-msgstr ""
+msgstr "%1 felhasználó kitiltva."
 
 #: ../user/forum_moderate_post_action.php:131
 msgid "Action failed: possible database problem"
-msgstr ""
+msgstr "Művelet sikertelen: valószínűleg adatbázis probléma"
 
 #: ../user/forum_moderate_thread.php:33
 msgid "not authorized"
-msgstr ""
+msgstr "nem jogosult"
 
 #: ../user/forum_moderate_thread.php:36
 msgid "Moderate thread '%1'"
-msgstr ""
+msgstr "'%1' téma moderálása"
 
 #: ../user/forum_moderate_thread.php:48
 msgid ""
 "Select the reason category, or write a longer description of why you're "
 "hiding or locking the thread; then press OK."
 msgstr ""
+"Válassza ki az indok kategóriát, vagy írja le bővebben, miért rejti el vagy "
+"zárja le a témát; majd nyomja meg az OK gombot!"
 
 #: ../user/forum_moderate_thread.php:72
 #, fuzzy
@@ -4020,23 +4021,27 @@ msgstr "Jelenlegi verzió"
 
 #: ../user/forum_moderate_thread.php:73
 msgid "Destination forum"
-msgstr ""
+msgstr "Célfórum"
 
 #: ../user/forum_moderate_thread.php:77
 msgid "New title:"
-msgstr ""
+msgstr "Új cím:"
 
 #: ../user/forum_post.php:40
 msgid ""
 "Only project admins may create a thread here. However, you may reply to "
 "existing threads."
 msgstr ""
+"Csak a projekt adminok hozhatnak létre új témát ezen a helyen. A meglévő "
+"témákra azonban válaszolhat."
 
 #: ../user/forum_post.php:60
 msgid ""
 "Your message was flagged as spam by the Akismet anti-spam system. Please "
 "modify your text and try again."
 msgstr ""
+"Az Ön üzenetét levélszemétnek minősítette az Akismet spamszűrő rendszer. "
+"Kérjük, módosítsa a szöveget és próbálja meg újra!"
 
 #: ../user/forum_post.php:70
 #, fuzzy
@@ -4049,31 +4054,35 @@ msgstr "Új téma létrehozása"
 
 #: ../user/forum_post.php:105
 msgid "Remember to add a title"
-msgstr ""
+msgstr "Ne felejtsen el címet megadni"
 
 #: ../user/forum_post.php:127
 msgid "Show this item as a Notice in the BOINC Manager"
-msgstr ""
+msgstr "Jelölje meg Értesítésként ezt az elemet a BOINC Kezelőben"
 
 #: ../user/forum_post.php:127
 msgid "Do so only for items likely to be of interest to all volunteers."
 msgstr ""
+"Csak azokkal az elemekkel tegyen így, amelyek minden résztvevőt "
+"érdekelhetnek!"
 
 #: ../user/forum_rate.php:26
 msgid "Rating offline"
-msgstr ""
+msgstr "Offline értékelés"
 
 #: ../user/forum_rate.php:27
 msgid "This function is turned off by the project"
-msgstr ""
+msgstr "Ezt a funkciót a projekt kikapcsolta."
 
 #: ../user/forum_rate.php:58
 msgid "You need more average or total credit to rate a post."
 msgstr ""
+"Nagyobb átlagra vagy több összes kreditre van szüksége egy bejegyzés "
+"értékeléséhez."
 
 #: ../user/forum_rate.php:62
 msgid "You have already rated this post."
-msgstr ""
+msgstr "Már értékelte ezt a bejegyzést"
 
 #: ../user/forum_rate.php:62 ../user/forum_rate.php:78
 #: ../user/forum_rate.php:83 ../user/forum_report_post.php:68
@@ -4081,33 +4090,35 @@ msgstr ""
 #: ../user/forum_subscribe.php:69 ../user/forum_thread_status.php:51
 #, fuzzy
 msgid "Return to thread"
-msgstr "Küldés a témához"
+msgstr "Vissza a témához"
 
 #: ../user/forum_rate.php:72
 msgid "Input Recorded"
-msgstr ""
+msgstr "Bevitel rögzítve"
 
 #: ../user/forum_rate.php:73
 msgid "Your input has been recorded. Thanks for your help."
-msgstr ""
+msgstr "A bevitelt rögzítettük. Köszönjük segítségét!"
 
 #: ../user/forum_rate.php:75
 msgid "Vote Registered"
-msgstr ""
+msgstr "Szavazat regisztrálva"
 
 #: ../user/forum_rate.php:76
 msgid "Your rating has been recorded. Thanks for your input."
-msgstr ""
+msgstr "Értékelését rögzítettük. Köszönjük véleményét!"
 
 #: ../user/forum_rate.php:80
 msgid "Vote Submission Problem"
-msgstr ""
+msgstr "Szavazat leadási probléma"
 
 #: ../user/forum_reply.php:76
 msgid ""
 "Your post has been flagged as spam by the Akismet anti-spam system. Please "
 "modify your text and try again."
 msgstr ""
+"Bejegyzését spamnek minősítette az Akismet spamszűrő rendszer. Kérjük, "
+"módosítsa a szöveget és próbálja meg újra!"
 
 #: ../user/forum_reply.php:87 ../user/forum_thread.php:154
 #: ../user/forum_thread.php:274
@@ -4120,13 +4131,14 @@ msgid "Message:"
 msgstr "Ãœzenet"
 
 #: ../user/forum_reply.php:130
+#, fuzzy
 msgid "reply to %1Message ID%2:"
-msgstr ""
+msgstr "válasz az %1Üzenet ID-re%2:"
 
 #: ../user/forum_reply.php:154
 #, fuzzy
 msgid "Post reply"
-msgstr "Nincs válasz"
+msgstr "Válasz írása"
 
 #: ../user/forum_reply.php:157
 #, fuzzy
@@ -4136,25 +4148,29 @@ msgstr "Aláírás hozzáadása ehhez az üzenethez"
 #: ../user/forum_report_post.php:45
 msgid "You need more average or total credit to report a post."
 msgstr ""
+"Magasabb átlagra vagy több összes kreditre van szüksége egy bejegyzés "
+"jelentéséhez."
 
 #: ../user/forum_report_post.php:64
 msgid "Report Registered"
-msgstr ""
+msgstr "Jelentés regisztrálva"
 
 #: ../user/forum_report_post.php:65
 msgid "Your report has been recorded. Thanks you for your input."
-msgstr ""
+msgstr "Jelentését rögzítettük. Köszönjük jelzését!"
 
 #: ../user/forum_report_post.php:66
 msgid ""
 "A moderator will now look at your report and decide what will happen - this "
 "may take a little while, so please be patient"
 msgstr ""
+"Egy moderátor meg fogja vizsgálni jelentését és eldönti, mi fog történni - "
+"ez egy kis időt vesz igénybe, türelmét kérjük!"
 
 #: ../user/forum_report_post.php:70
 #, fuzzy
 msgid "Report a forum post"
-msgstr "Utolsó üzenet"
+msgstr "Fórumbejegyzés jelentése"
 
 #: ../user/forum_report_post.php:72
 msgid ""
@@ -4933,7 +4949,7 @@ msgstr ""
 #: ../user/html.php:32
 #, fuzzy
 msgid "preformatted"
-msgstr "Létrehozva"
+msgstr "előformázott"
 
 #: ../user/html.php:33
 msgid ""
@@ -6818,9 +6834,11 @@ msgstr ""
 msgid "can't find workunit"
 msgstr ""
 
+# 81%
 #: ../user/workunit.php:35
+#, fuzzy
 msgid "Workunit %1"
-msgstr ""
+msgstr "Munkacsomag"
 
 #: ../user/workunit.php:43
 msgid "canonical result"
diff --git a/locale/hu/BOINC-Web.mo b/locale/hu/BOINC-Web.mo
index 0e64389..c465f70 100644
Binary files a/locale/hu/BOINC-Web.mo and b/locale/hu/BOINC-Web.mo differ
diff --git a/locale/hu/BOINC-Web.po b/locale/hu/BOINC-Web.po
index 775857b..29557ab 100644
--- a/locale/hu/BOINC-Web.po
+++ b/locale/hu/BOINC-Web.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at ssl.berkeley.edu>\n"
 "POT-Creation-Date: 2011-04-04 22:09 PDT\n"
-"PO-Revision-Date: 2012-06-18 10:52+0200\n"
+"PO-Revision-Date: 2012-08-29 14:41+0200\n"
 "Last-Translator: Gabor <csega at mailbox.hu>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
 "Language: hu\n"
@@ -551,7 +551,6 @@ msgid "Spinhenge at home"
 msgstr "Spinhenge at home"
 
 #: projects.inc:232
-#, fuzzy
 msgid "Bielefeld University of Applied Sciences"
 msgstr "Alkalmazott Tudományok Bielefeldi Egyeteme"
 
@@ -660,7 +659,6 @@ msgid "World Community Grid"
 msgstr "World Community Grid"
 
 #: projects.inc:277
-#, fuzzy
 msgid "IBM Corporate Community Relations"
 msgstr "IBM Vállalati Közösségi Kapcsolatok"
 
@@ -736,6 +734,12 @@ msgid ""
 "NFS at Home is a continuation of that experience, only with integers that are "
 "hundreds of digits long."
 msgstr ""
+"Az NFS at Home olyan kutatási projekt, mely interneteléréssel rendelkező "
+"számítógépeket használ nagy egész számok rácson történő szitálásához. "
+"Általános iskolásként Ön is megszerezte első tapasztalatait egy egész szám "
+"prímtényezőkre való bontásával kapcsolatban, mint például hogy 15 = 3 * 5, "
+"vagy hogy 35 = 5 * 7. Az NFS at Home ezen tapasztalatok kiterjesztése, csak "
+"éppen több száz számjegy hosszúságú egész számokra."
 
 #: projects.inc:310
 msgid "VTU at home"
@@ -745,7 +749,7 @@ msgstr "VTU at home"
 msgid ""
 "Vilnius Gediminas Technical University and Kaunas University of Technology "
 "(Lithuania)"
-msgstr ""
+msgstr "Vilnius Gediminas Műszaki Egyetem és Kaunas Műszaki Egyetem (Litvánia)"
 
 #: projects.inc:313
 msgid "Software testing"
@@ -758,6 +762,10 @@ msgid ""
 "well as others Lithuanian academic institutions.  Current applications "
 "involve the study of Monte-Carlo based software testing."
 msgstr ""
+"Jelen projekt célja egy szélesen elosztott számítógépes platform létrehozása "
+"a Vilnius Gediminas Műszaki Egyetem (VGME) illetve más litvániai akadémiai "
+"intézmények kutatóinak számára. Jelen alkalmazások Monte-Carlo alapú "
+"szoftvertesztelési kutatások részei."
 
 #: projects.inc:318
 msgid "AQUA at home"
@@ -780,6 +788,13 @@ msgid ""
 "computers to help design and analyze quantum computing algorithms, using "
 "Quantum Monte Carlo techniques."
 msgstr ""
+"A D-Wave AQUA (Adiabatic QUantum Algorithms - Adiabatikus KVantum "
+"Algoritmusok) kutatási projekt célja a szupravezető adiabatikus kvantum "
+"számítógépek teljesítményének előrejelzése az anyagtudománytól a gépi "
+"tanulásig felvetődő különböző problémák esetében. Az AQUA at home "
+"interneteléréssel rendelkező számítógépeket használ kvantum algoritmusok "
+"megtervezéséhez és elemzéséhez, a Quantum Monte Carlo technikák "
+"alkalmazásával."
 
 #: projects.inc:334
 msgid "ABC at home"
@@ -787,7 +802,7 @@ msgstr "ABC at home"
 
 #: projects.inc:336
 msgid "Mathematical Institute of Leiden University / Kennislink"
-msgstr ""
+msgstr "A Leideni Egyetem Matematikai Intézete / Kennislink"
 
 #: projects.inc:338
 msgid ""
@@ -799,6 +814,13 @@ msgid ""
 "problems in mathematics. If it is proven to be true, a lot of other open "
 "problems can be answered directly from it."
 msgstr ""
+"'ABC-hármasok' keresése: a, b és c olyan pozitív egész számok, melyekre "
+"igaz, hogy a+b=c, a < b < nincs közös osztójuk és c > rad(abc), ahol "
+"rad(n) az n különböző egész szorzóinak eredménye. Az ABC-feltevés szerint "
+"véges számban találhatóak olyan a, b, és c számok, melyekre igaz, hogy "
+"log(c)/log(rad(abc)) > h, ahol h 1-nél nagyobb valós szám. Az ABC-feltevés "
+"napjainkban a matematika egyik legnagyobb nyitott problémája. Ha igaznak "
+"bizonyul, rengeteg egyéb nyitott problémára fog majd választ adni."
 
 #: projects.inc:342
 msgid "PrimeGrid"
@@ -814,6 +836,9 @@ msgid ""
 "searching for large twin primes of the form k*2<sup>n</sup>+1 and k*2<sup>n</"
 "sup>-1"
 msgstr ""
+"A Primegrid projekt nyilvános, növekvő prímszám-adatbázist épít és "
+"k*2<sup>n</sup>+1 and k*2<sup>n</sup>-1 formátumú, nagy ikerprímek után "
+"kutat."
 
 #: projects.inc:350
 msgid "primaboinca"
@@ -821,13 +846,15 @@ msgstr "primaboinca"
 
 #: projects.inc:352
 msgid "Hochschule RheinMain University of Applied Sciences"
-msgstr ""
+msgstr "RheinMaini Alkalmazott Tudományok Egyeteme"
 
 #: projects.inc:354
 msgid ""
 "Search for counterexamples to two conjectures related to the identification "
 "of prime numbers"
 msgstr ""
+"Prímszámok azonosításához kapcsolódó két sejtéshez tartozó ellenpéldák "
+"keresése"
 
 #: projects.inc:358
 msgid "SZTAKI Desktop Grid"
@@ -838,6 +865,8 @@ msgid ""
 "Find all the generalized binary number systems (in which bases are matrices "
 "and digits are vectors) up to dimension 11."
 msgstr ""
+"Találja meg az összes általánosított kettes számrendszert (melyekben a "
+"bázisok mátrixok, a számjegyek pedig vektorok) egészen a 11. dimenzióig."
 
 #: projects.inc:382
 msgid "Chess960 at home"
diff --git a/locale/hu/pootle-boinctrunk-hu.prefs b/locale/hu/pootle-boinctrunk-hu.prefs
deleted file mode 100644
index ee95882..0000000
--- a/locale/hu/pootle-boinctrunk-hu.prefs
+++ /dev/null
@@ -1,11 +0,0 @@
-# Pootle preferences for project boinctrunk, language hu
-
-rights:
-  Thrawn = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Csega = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Vandorr = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Robee = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/it/BOINC-Manager.mo b/locale/it/BOINC-Manager.mo
index 1880ca1..ee57d09 100644
Binary files a/locale/it/BOINC-Manager.mo and b/locale/it/BOINC-Manager.mo differ
diff --git a/locale/it/BOINC-Manager.po b/locale/it/BOINC-Manager.po
index e3c75a8..a766689 100644
--- a/locale/it/BOINC-Manager.po
+++ b/locale/it/BOINC-Manager.po
@@ -7,8 +7,8 @@ msgstr ""
 "Project-Id-Version: BOINC Manager 6.x\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-03-05 10:58-0500\n"
-"PO-Revision-Date: 2012-06-11 23:29+0200\n"
-"Last-Translator: Simone_3dz2 <simonecnt at gmail.com>\n"
+"PO-Revision-Date: 2012-08-06 13:42+0200\n"
+"Last-Translator: Gianfranco <costamagnagianfranco at yahoo.it>\n"
 "Language-Team: BOINC.Italy team <contact at boincitaly.org>\n"
 "Language: it\n"
 "MIME-Version: 1.0\n"
@@ -18,11 +18,11 @@ msgstr ""
 "X-Generator: Pootle 2.1.6\n"
 "X-Poedit-SourceCharset: utf-8\n"
 "X-Poedit-Basepath: C:\\Src\\BOINCSVN\\trunk\\boinc\n"
+"X-BOINC-UTF8-Marker: 简体中文, 日本語\n"
 "X-Poedit-SearchPath-0: clientgui\n"
 "X-Poedit-SearchPath-1: clientgui/msw\n"
 "X-Poedit-SearchPath-2: clientgui/gtk\n"
 "X-Poedit-SearchPath-3: clientgui/mac\n"
-"X-BOINC-UTF8-Marker: 简体中文, 日本語\n"
 
 #: clientgui/AccountInfoPage.cpp:386
 msgid "Identify your account "
@@ -65,8 +65,7 @@ msgid ""
 "below to find out what to put in the email address and\n"
 "password fields."
 msgstr ""
-"Non siamo stati in grado di impostare le informazioni del tuo account "
-"automaticamente.\n"
+"Non siamo stati in grado di impostare le informazioni del tuo account automaticamente.\n"
 "\n"
 "Clicca sul link 'Recupera le informazioni di accesso'\n"
 "in basso per trovare cosa inserire nei campi\n"
@@ -141,22 +140,16 @@ msgstr "Usa l'account manager"
 #: clientgui/AccountInfoPage.cpp:583
 #, c-format
 msgid "The minimum password length for this project is %d. Please enter a different password."
-msgstr ""
-"La lunghezza minima della password per questo progetto è %d. Sei pregato di "
-"inserire una password diversa."
+msgstr "La lunghezza minima della password per questo progetto è %d. Sei pregato di inserire una password diversa."
 
 #: clientgui/AccountInfoPage.cpp:589
 #, c-format
 msgid "The minimum password length for this account manager is %d. Please enter a different password."
-msgstr ""
-"La lunghezza minima della password per questo account manager è %d. Sei "
-"pregato di inserire una password diversa."
+msgstr "La lunghezza minima della password per questo account manager è %d. Sei pregato di inserire una password diversa."
 
 #: clientgui/AccountInfoPage.cpp:601
 msgid "The password and confirmation password do not match. Please type them again."
-msgstr ""
-"La password e la password di conferma non corrispondono. Prova a scriverle "
-"di nuovo."
+msgstr "La password e la password di conferma non corrispondono. Prova a scriverle di nuovo."
 
 #: clientgui/AccountManagerInfoPage.cpp:248
 msgid "Choose an account manager"
@@ -280,9 +273,7 @@ msgstr "Connessione ad un &progetto o ad un account manager..."
 
 #: clientgui/AdvancedFrame.cpp:412
 msgid "Volunteer for any or all of 30+ projects in many areas of science"
-msgstr ""
-"Diventa un volontario di uno o di tutti gli oltre 30 progetti nelle varie "
-"aree scientifiche"
+msgstr "Diventa un volontario di uno o di tutti gli oltre 30 progetti nelle varie aree scientifiche"
 
 #: clientgui/AdvancedFrame.cpp:416
 #, c-format
@@ -357,8 +348,7 @@ msgstr "E&laborazione GPU continua"
 
 #: clientgui/AdvancedFrame.cpp:496
 msgid "Allow GPU work regardless of preferences"
-msgstr ""
-"Elabora con la GPU senza interruzioni e indipendentemente dalle preferenze"
+msgstr "Elabora con la GPU senza interruzioni e indipendentemente dalle preferenze"
 
 #: clientgui/AdvancedFrame.cpp:500
 msgid "Use GPU based on preferences"
@@ -382,9 +372,7 @@ msgstr "Attività di rete sempre disponibile"
 
 #: clientgui/AdvancedFrame.cpp:531
 msgid "Allow network activity regardless of preferences"
-msgstr ""
-"Permetti l'attività di rete senza interruzioni e indipendentemente dalle "
-"preferenze"
+msgstr "Permetti l'attività di rete senza interruzioni e indipendentemente dalle preferenze"
 
 #: clientgui/AdvancedFrame.cpp:535
 msgid "Network activity based on preferences"
@@ -657,8 +645,7 @@ msgid ""
 "Please contact your administrator to add you to the 'boinc_users' local user group."
 msgstr ""
 "Non sei autorizzato a gestire il client BOINC.\n"
-"Contatta l'amministratore del computer per aggiungere il tuo account al "
-"gruppo 'boinc_users'."
+"Contatta l'amministratore del computer per aggiungere il tuo account al gruppo 'boinc_users'."
 
 #: clientgui/BOINCBaseFrame.cpp:517
 msgid ""
@@ -670,8 +657,7 @@ msgstr ""
 
 #: clientgui/BOINCBaseFrame.cpp:519
 msgid "Authorization failed connecting to running client."
-msgstr ""
-"Autorizzazione fallita durante la connessione al client BOINC in esecuzione."
+msgstr "Autorizzazione fallita durante la connessione al client BOINC in esecuzione."
 
 #: clientgui/BOINCBaseFrame.cpp:527
 msgid "The password you have provided is incorrect, please try again."
@@ -703,8 +689,7 @@ msgid ""
 "Please launch the Control Panel->Administative Tools->Services applet and start the BOINC service."
 msgstr ""
 "%s non riesce ad avviare il client %s.\n"
-"Vai su Pannello di controllo->Strumenti di amministrazione->Servizi "
-"componenti ed avvia il servizio BOINC."
+"Vai su Pannello di controllo->Strumenti di amministrazione->Servizi componenti ed avvia il servizio BOINC."
 
 #: clientgui/BOINCBaseFrame.cpp:632
 #, c-format
@@ -728,8 +713,7 @@ msgid ""
 "To connect up to your local computer please use 'localhost' as the host name."
 msgstr ""
 "%s al momento non è connesso al client %s.\n"
-"Usa l'opzione del menù 'Avanzate\\Seleziona un computer...' per connettersi "
-"al client %s.\n"
+"Usa l'opzione del menù 'Avanzate\\Seleziona un computer...' per connettersi al client %s.\n"
 "Per connetterti al computer locale usa 'localhost' come host name."
 
 #: clientgui/BOINCBaseView.cpp:774
@@ -747,8 +731,7 @@ msgid ""
 "The %s client has exited unexpectedly 3 times within the last %d minutes.\n"
 "Would you like to restart it again?"
 msgstr ""
-"Il client %s si è disconnesso in modo imprevisto 3 volte negli ultimi %d "
-"minuti.\n"
+"Il client %s si è disconnesso in modo imprevisto 3 volte negli ultimi %d minuti.\n"
 "Vuoi ricollegarti?"
 
 #: clientgui/BOINCDialupManager.cpp:61
@@ -787,8 +770,7 @@ msgid ""
 "Updating all projects and retrying all transfers."
 msgstr ""
 "%s ha individuato una connessione a Internet.\n"
-"L'aggiornamento di tutti i progetti e i nuovi tentativi di trasferimento "
-"sono in corso."
+"L'aggiornamento di tutti i progetti e i nuovi tentativi di trasferimento sono in corso."
 
 #: clientgui/BOINCDialupManager.cpp:417
 #, c-format
@@ -827,8 +809,7 @@ msgid ""
 "%s ownership or permissions are not set properly; please reinstall %s.\n"
 "(Error code %d"
 msgstr ""
-"La proprietà o i permessi di %s non sono impostati correttamente; per "
-"risolvere il problema installa nuovamente %s.\n"
+"La proprietà o i permessi di %s non sono impostati correttamente; per risolvere il problema installa nuovamente %s.\n"
 "(Codice errore %d)"
 
 #: clientgui/BOINCGUIApp.cpp:351
@@ -857,8 +838,7 @@ msgstr "BOINC Manager è stato avviato dal sistema operativo in modo automatico"
 
 #: clientgui/BOINCGUIApp.cpp:531
 msgid "Startup BOINC so only the system tray icon is visible"
-msgstr ""
-"Avvia BOINC in modo che sia visibile solo l'icona nella barra di sistema"
+msgstr "Avvia BOINC in modo che sia visibile solo l'icona nella barra di sistema"
 
 #: clientgui/BOINCGUIApp.cpp:533
 msgid "Directory containing the BOINC Client executable"
@@ -890,9 +870,7 @@ msgstr "disabilita la sicurezza utenti e i permessi di BOINC"
 
 #: clientgui/BOINCGUIApp.cpp:541
 msgid "set skin debugging mode to enable skin manager error messages"
-msgstr ""
-"imposta la modalità di debug per la visualizzazione per abilitarne i "
-"messaggi di errore del gestore"
+msgstr "imposta la modalità di debug per la visualizzazione per abilitarne i messaggi di errore del gestore"
 
 #: clientgui/BOINCGUIApp.cpp:542
 msgid "multiple instances of BOINC Manager allowed"
@@ -1041,8 +1019,7 @@ msgid ""
 "When you click Finish, your web browser will go to a page where\n"
 "you can set your account name and preferences."
 msgstr ""
-"Quando clicchi su Fine, il tuo browser ti reindirizzerà verso una pagina "
-"dove\n"
+"Quando clicchi su Fine, il tuo browser ti reindirizzerà verso una pagina dove\n"
 "potrai gestire il tuo account e le tue preferenze."
 
 #: clientgui/CompletionPage.cpp:232
@@ -1150,29 +1127,30 @@ msgstr "Aggiungi Applicazione Esclusiva"
 
 #: clientgui/DlgAdvPreferences.cpp:826
 msgid "Name of application to add?"
-msgstr ""
+msgstr "Nome dell'applicazione da aggiungere?"
 
 # 88%
 #: clientgui/DlgAdvPreferences.cpp:826
-#, fuzzy
 msgid "Add exclusive app"
-msgstr "Aggiungi Applicazione Esclusiva"
+msgstr "Aggiungi applicazioni esclusive"
 
 #: clientgui/DlgAdvPreferences.cpp:847
 #, c-format
 msgid "Application names must end with '%s'"
-msgstr ""
+msgstr "I nomi delle applicazioni devono finire con '%s'"
 
 #: clientgui/DlgAdvPreferences.cpp:871
 #, c-format
 msgid "'%s' is already in the list."
-msgstr ""
+msgstr "'%s' è già nella lista."
 
 #: clientgui/DlgAdvPreferences.cpp:962
 msgid ""
 "Do you really want to clear all local preferences?\n"
 "(This will not affect exclusive applications.)"
 msgstr ""
+"Vuoi veramente cancellare tutte le tue preferenze locali?\n"
+"(Questo non modificherà le applicazioni esclusive.)"
 
 #: clientgui/DlgAdvPreferences.cpp:963
 msgid "Confirmation"
@@ -1191,8 +1169,7 @@ msgid ""
 msgstr ""
 "Da qui puoi impostare le preferenze solo per questo computer.\n"
 "Clicca OK per impostare le preferenze.\n"
-"Clicca sul pulsante Rimuovi per ripristinare l'uso delle impostazioni via "
-"web (tranne per le applicazioni esclusive)."
+"Clicca sul pulsante Rimuovi per ripristinare l'uso delle impostazioni via web (tranne per le applicazioni esclusive)."
 
 #: clientgui/DlgAdvPreferencesBase.cpp:65
 msgid "Clear"
@@ -1216,7 +1193,7 @@ msgstr "uso del disco e della memoria"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:90
 msgid "exclusive applications"
-msgstr ""
+msgstr "applicazioni esclusive"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:102
 msgid "OK"
@@ -1248,9 +1225,7 @@ msgstr "Quando il computer va a batterie"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:142
 msgid "check this if you want this computer to do work while it runs on batteries"
-msgstr ""
-"spunta questa voce se vuoi che il computer elabori anche se è alimentato a "
-"batteria"
+msgstr "spunta questa voce se vuoi che il computer elabori anche se è alimentato a batteria"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:148
 msgid "While computer is in use"
@@ -1258,9 +1233,7 @@ msgstr "Quando il computer è in uso"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:151
 msgid "check this if you want this computer to do work even when you're using it"
-msgstr ""
-"spunta questa voce se vuoi che il computer elabori anche quando lo stai "
-"utilizzando"
+msgstr "spunta questa voce se vuoi che il computer elabori anche quando lo stai utilizzando"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:157
 msgid "Use GPU while computer is in use"
@@ -1268,9 +1241,7 @@ msgstr "Usa GPU mentre il computer è in uso"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:160
 msgid "check this if you want your GPU to do work even when you're using the computer"
-msgstr ""
-"spunta questa voce se vuoi che la GPU elabori anche quando stai utilizzando "
-"il computer"
+msgstr "spunta questa voce se vuoi che la GPU elabori anche quando stai utilizzando il computer"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:172
 msgid "Only after computer has been idle for"
@@ -1278,9 +1249,7 @@ msgstr "Solamente quando il computer è inutilizzato da più di"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:182
 msgid "do work only after you haven't used the computer for this number of minutes"
-msgstr ""
-"elabora solo dopo che il computer non è utilizzato per questo numero di "
-"minuti"
+msgstr "elabora solo dopo che il computer non è utilizzato per questo numero di minuti"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:187
 #: clientgui/DlgAdvPreferencesBase.cpp:336
@@ -1289,7 +1258,7 @@ msgstr "minuti"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:206
 msgid "While processor usage is less than"
-msgstr "Quando l'utilizzo del processore è minore di"
+msgstr "Quando l'utilizzo del processore è minore del"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:216
 msgid "suspend work if processor usage exceeds this level"
@@ -1297,7 +1266,7 @@ msgstr "sospendere i lavori se l'utilizzo del processore supera questo livello"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:221
 msgid "percent (0 means no restriction)"
-msgstr "percentuale (0 indica nessuna restrizione)"
+msgstr "percento (0 indica nessuna restrizione)"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:235
 #: clientgui/DlgAdvPreferencesBase.cpp:495
@@ -1330,9 +1299,7 @@ msgstr "Impostazioni speciali per alcuni giorni della settimana:"
 #: clientgui/DlgAdvPreferencesBase.cpp:261
 #: clientgui/DlgAdvPreferencesBase.cpp:521
 msgid "check box to specify hours for this day of week"
-msgstr ""
-"spunta la voce del giorno della settimana per specificare le ore di "
-"funzionamento"
+msgstr "spunta la voce del giorno della settimana per specificare le ore di funzionamento"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:267
 #: clientgui/DlgAdvPreferencesBase.cpp:527
@@ -1437,11 +1404,11 @@ msgstr "giorni"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:428
 msgid "Minimum work buffer"
-msgstr "Riserva di lavoro addizionale Minima"
+msgstr "Riserva di lavoro addizionale minima"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:437
 msgid "Try to maintain enough tasks to keep busy for this many days"
-msgstr ""
+msgstr "Cerca di mantenere sufficienti lavori per rimanere occupato per questi giorni"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:449
 msgid "Max additional work buffer"
@@ -1449,7 +1416,7 @@ msgstr "Riserva di lavoro addizionale massima"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:458
 msgid "In addition, maintain enough tasks for up to this many days"
-msgstr ""
+msgstr "In aggiunta, mantieni lavori sufficienti per per questi giorni"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:465
 msgid "Skip image file verification"
@@ -1469,9 +1436,7 @@ msgstr "Chiede conferma prima di connettersi ad Internet"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:479
 msgid "if checked, a confirmation dialog will be displayed before trying to connect to the Internet"
-msgstr ""
-"se la voce è spuntata, sarà chiesta una conferma prima di effettuare una "
-"connessione ad Internet"
+msgstr "se la voce è spuntata, sarà chiesta una conferma prima di effettuare una connessione ad Internet"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:483
 msgid "Disconnect when done"
@@ -1516,8 +1481,7 @@ msgstr "Lascia come minimo"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:619
 msgid "BOINC leaves at least this amount of disk space free (in Gigabytes)"
-msgstr ""
-"BOINC lascia almeno questa quantità di spazio libero su disco (in Gigabytes)"
+msgstr "BOINC lascia almeno questa quantità di spazio libero su disco (in Gigabytes)"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:623
 msgid "Gigabytes disk space free"
@@ -1565,12 +1529,11 @@ msgstr " Lascia le applicazioni in memoria quando sono sospese"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:692
 msgid "if checked, suspended work units are left in memory"
-msgstr ""
-"se la voce è spuntata, le elaborazioni sospese vengono lasciate in memoria"
+msgstr "se la voce è spuntata, le elaborazioni sospese vengono lasciate in memoria"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:712
 msgid "Suspend processor and network usage when these applications are running:"
-msgstr ""
+msgstr "Sospendi il processore e l'utilizzo della rete quando queste applicazioni sono in esecuzione:"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:721
 msgid "Add..."
@@ -1589,9 +1552,8 @@ msgid "Remove an application from this list"
 msgstr "Rimuovi applicazione dalla lista"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:737
-#, fuzzy
 msgid "For advanced options, refer to "
-msgstr "Per le opzioni avanzata, vai su"
+msgstr "Per le opzioni avanzate, vai su"
 
 #: clientgui/DlgEventLog.cpp:194
 #, c-format
@@ -1631,17 +1593,12 @@ msgstr "Copia &Selezionati"
 #: clientgui/DlgEventLog.cpp:281
 #: clientgui/DlgEventLog.cpp:289
 msgid "Copy the selected messages to the clipboard. You can select multiple messages by holding down the shift or command key while clicking on messages."
-msgstr ""
-"Copia i messaggi selezionati negli appunti. Puoi selezionare più messaggi "
-"insieme tenendo premuto il tasto Shift o command mentre clicchi sui "
-"messaggi."
+msgstr "Copia i messaggi selezionati negli appunti. Puoi selezionare più messaggi insieme tenendo premuto il tasto Shift o command mentre clicchi sui messaggi."
 
 #: clientgui/DlgEventLog.cpp:283
 #: clientgui/DlgEventLog.cpp:291
 msgid "Copy the selected messages to the clipboard. You can select multiple messages by holding down the shift or control key while clicking on messages."
-msgstr ""
-"Copia i messaggi selezionati negli appunti. Puoi selezionare più messaggi "
-"insieme tenendo premuto il tasto Shift o Ctrl mentre clicchi sui messaggi."
+msgstr "Copia i messaggi selezionati negli appunti. Puoi selezionare più messaggi insieme tenendo premuto il tasto Shift o Ctrl mentre clicchi sui messaggi."
 
 #: clientgui/DlgEventLog.cpp:298
 #: clientgui/DlgItemProperties.cpp:66
@@ -1829,7 +1786,7 @@ msgstr "Richiesta allo scheduler in corso"
 
 #: clientgui/DlgItemProperties.cpp:245
 msgid "Trickle-up pending"
-msgstr ""
+msgstr "Messaggio istantaneo in attesa"
 
 #: clientgui/DlgItemProperties.cpp:248
 #: clientgui/DlgItemProperties.cpp:250
@@ -1917,7 +1874,6 @@ msgid "Resources"
 msgstr "Risorse in uso"
 
 #: clientgui/DlgItemProperties.cpp:324
-#, fuzzy
 msgid "Estimated computation size"
 msgstr "Durata stimata lavoro"
 
@@ -2113,9 +2069,7 @@ msgstr "%s - Selezione della lingua"
 #: clientgui/DlgOptions.cpp:681
 #, c-format
 msgid "The %s's default language has been changed, in order for this change to take affect you must restart the %s."
-msgstr ""
-"La lingua di default di %s è stata cambiata, per rendere effettive le "
-"modifiche occorre riavviare il %s."
+msgstr "La lingua di default di %s è stata cambiata, per rendere effettive le modifiche occorre riavviare il %s."
 
 #: clientgui/DlgSelectComputer.cpp:90
 #, c-format
@@ -2167,9 +2121,7 @@ msgstr "Le tue preferenze"
 
 #: clientgui/Localization.cpp:45
 msgid "View and modify your SETI at home account profile and preferences"
-msgstr ""
-"Visualizza e modifica il profilo del tuo account SETI at home e le tue "
-"preferenze"
+msgstr "Visualizza e modifica il profilo del tuo account SETI at home e le tue preferenze"
 
 #: clientgui/Localization.cpp:47
 #: clientgui/Localization.cpp:89
@@ -2188,9 +2140,7 @@ msgstr "I tuoi computer"
 
 #: clientgui/Localization.cpp:53
 msgid "View a listing of all the computers on which you are running SETI at Home"
-msgstr ""
-"Visualizza l'elenco di tutti i computer con cui stai partecipando a "
-"SETI at Home"
+msgstr "Visualizza l'elenco di tutti i computer con cui stai partecipando a SETI at Home"
 
 #: clientgui/Localization.cpp:55
 #: clientgui/Localization.cpp:97
@@ -2220,8 +2170,7 @@ msgstr "Leggi una descrizione dettagliata dello sreensaver di Einstein at Home"
 
 #: clientgui/Localization.cpp:71
 msgid "Correspond with admins and other users on the Einstein at Home message boards"
-msgstr ""
-"Discuti con gli amministratori e gli altri utenti sul forum di Einstein at Home"
+msgstr "Discuti con gli amministratori e gli altri utenti sul forum di Einstein at Home"
 
 #: clientgui/Localization.cpp:73
 msgid "Einstein status"
@@ -2241,9 +2190,7 @@ msgstr "Collegamento al forum per i problemi ed i bug di Einstein at Home"
 
 #: clientgui/Localization.cpp:83
 msgid "View and modify your Einstein at Home account profile and preferences"
-msgstr ""
-"Visualizza e modifica il profilo del tuo account su Einstein at Home e le "
-"preferenze"
+msgstr "Visualizza e modifica il profilo del tuo account su Einstein at Home e le preferenze"
 
 #: clientgui/Localization.cpp:85
 msgid "Account summary"
@@ -2251,9 +2198,7 @@ msgstr "Riepilogo dell'account"
 
 #: clientgui/Localization.cpp:95
 msgid "View a listing of all the computers on which you are running Einstein at Home"
-msgstr ""
-"Visualizza l'elenco di tutti i computer con cui stai partecipando ad "
-"Einstein at Home"
+msgstr "Visualizza l'elenco di tutti i computer con cui stai partecipando ad Einstein at Home"
 
 #: clientgui/Localization.cpp:101
 msgid "LIGO project"
@@ -2261,9 +2206,7 @@ msgstr "Progetto LIGO"
 
 #: clientgui/Localization.cpp:103
 msgid "The home page of the Laser Interferometer Gravitational-wave Observatory (LIGO) project"
-msgstr ""
-"Pagina iniziale del progetto Laser Interferometer Gravitational-wave "
-"Observatory (LIGO)"
+msgstr "Pagina iniziale del progetto Laser Interferometer Gravitational-wave Observatory (LIGO)"
 
 #: clientgui/Localization.cpp:105
 msgid "GEO-600 project"
@@ -2296,9 +2239,7 @@ msgstr "Notizie su climateprediction.net"
 
 #: clientgui/Localization.cpp:131
 msgid "View your account information, credits, and trickles"
-msgstr ""
-"Visualizza le informazioni sul tuo account, i crediti ed il lavoro "
-"effettuato"
+msgstr "Visualizza le informazioni sul tuo account, i crediti ed il lavoro effettuato"
 
 #: clientgui/Localization.cpp:135
 msgid "Info about your team"
@@ -2358,9 +2299,7 @@ msgstr "Applicazione mancante"
 
 #: clientgui/MainDocument.cpp:1793
 msgid "Please download and install the CoRD application from http://cord.sourceforge.net"
-msgstr ""
-"Per favore scarica e installa l'applicazione CoRd da "
-"http://cord.sourceforge.net"
+msgstr "Per favore scarica e installa l'applicazione CoRd da http://cord.sourceforge.net"
 
 #: clientgui/MainDocument.cpp:2390
 msgid "on batteries"
@@ -2618,9 +2557,7 @@ msgstr "Scegli un progetto"
 
 #: clientgui/ProjectInfoPage.cpp:580
 msgid "To choose a project, click its name or type its URL below."
-msgstr ""
-"Per selezionare un progetto, clicca sul nome o digita il suo indirizzo "
-"sotto."
+msgstr "Per selezionare un progetto, clicca sul nome o digita il suo indirizzo sotto."
 
 #: clientgui/ProjectInfoPage.cpp:584
 msgid "Categories:"
@@ -2656,9 +2593,7 @@ msgstr "URL del progetto:"
 
 #: clientgui/ProjectInfoPage.cpp:782
 msgid "This project may not have work for your type of computer.  Do you want to add it anyway?"
-msgstr ""
-"Questo progetto potrebbe non avere lavoro per il tuo tipo di computer. Sei "
-"sicuro di volerlo aggiungere comunque?"
+msgstr "Questo progetto potrebbe non avere lavoro per il tuo tipo di computer. Sei sicuro di volerlo aggiungere comunque?"
 
 #: clientgui/ProjectInfoPage.cpp:806
 msgid "You already added this project. Please choose a different project."
@@ -2731,8 +2666,7 @@ msgstr ""
 "1) Problemi di connettività. Controlla la tua connessione di rete o\n"
 "la connessione del modem e poi riprova l'operazione.\n"
 "\n"
-"2) Il firewall sta bloccando il progetto BOINC World Community Grid. Devi "
-"configurare il tuo\n"
+"2) Il firewall sta bloccando il progetto BOINC World Community Grid. Devi configurare il tuo\n"
 "firewall per permettere a BOINC di comunicare sulle porte 80 e 443.\n"
 "Una volta fatto questo, clicca su indietro e riprova.\n"
 "\n"
@@ -3035,14 +2969,12 @@ msgid "Click Clear to restore web-based settings."
 msgstr "Clicca Cancella per ripristinare le preferenze web."
 
 #: clientgui/sg_DlgPreferences.cpp:299
-#, fuzzy
 msgid "For additional settings, select Computing Preferences in "
-msgstr "Per impostazioni aggiuntive, seleziona Impostazioni "
+msgstr "Per impostazioni aggiuntive, seleziona Preferenze di elaborazione nel "
 
 #: clientgui/sg_DlgPreferences.cpp:304
-#, fuzzy
 msgid "the Advanced View."
-msgstr "Visualizzazione Avanzata."
+msgstr "la Visualizzazione Avanzata."
 
 #: clientgui/sg_DlgPreferences.cpp:332
 msgid "Do work only between:"
@@ -3154,9 +3086,7 @@ msgstr "Aggiorna"
 
 #: clientgui/sg_ProjectCommandPopup.cpp:62
 msgid "Report all completed tasks, get latest credit, get latest preferences, and possibly get more tasks."
-msgstr ""
-"Riporta il lavoro completato, aggiorna il totale dei crediti e le "
-"preferenze, e possibilmente ottiene altro lavoro."
+msgstr "Riporta il lavoro completato, aggiorna il totale dei crediti e le preferenze, e possibilmente ottiene altro lavoro."
 
 #: clientgui/sg_ProjectCommandPopup.cpp:68
 #: clientgui/sg_ProjectCommandPopup.cpp:114
@@ -3178,16 +3108,11 @@ msgstr "Reset del progetto"
 
 #: clientgui/sg_ProjectCommandPopup.cpp:80
 msgid "Delete all files and tasks associated with this project, and get new tasks.  You can update the project first to report any completed tasks."
-msgstr ""
-"Cancella tutti i file e le elaborazioni associate a questo progetto e "
-"scarica nuovo lavoro.  Puoi aggiornare il progetto prima di eseguire il "
-"reset per riportare le elaborazioni già completate."
+msgstr "Cancella tutti i file e le elaborazioni associate a questo progetto e scarica nuovo lavoro.  Puoi aggiornare il progetto prima di eseguire il reset per riportare le elaborazioni già completate."
 
 #: clientgui/sg_ProjectCommandPopup.cpp:86
 msgid "Remove this project.  Tasks in progress will be lost (use 'Update' first to report any completed tasks)."
-msgstr ""
-"Rimuovi questo progetto dal computer.  Il lavoro in corso andrà perso (usa "
-"prima 'Aggiorna' per inviare il lavoro già completato)."
+msgstr "Rimuovi questo progetto dal computer.  Il lavoro in corso andrà perso (usa prima 'Aggiorna' per inviare il lavoro già completato)."
 
 #: clientgui/sg_ProjectCommandPopup.cpp:91
 #: clientgui/sg_TaskCommandPopup.cpp:78
@@ -3254,8 +3179,7 @@ msgstr "Sincronizza i progetti con il sistema dell'account manager"
 
 #: clientgui/sg_ProjectPanel.cpp:124
 msgid "Select a project to access with the controls below"
-msgstr ""
-"Seleziona un progetto a cui accedere mediantei i controlli sottostanti..."
+msgstr "Seleziona un progetto a cui accedere mediantei i controlli sottostanti..."
 
 #: clientgui/sg_ProjectPanel.cpp:134
 #: clientgui/sg_ProjectPanel.cpp:262
@@ -3329,8 +3253,7 @@ msgstr "Annulla"
 
 #: clientgui/sg_TaskCommandPopup.cpp:73
 msgid "Abandon work on the result. You will get no credit for it."
-msgstr ""
-"Abbandona l'elaborazione selezionata. In questo modo non otterai crediti."
+msgstr "Abbandona l'elaborazione selezionata. In questo modo non otterai crediti."
 
 #: clientgui/sg_TaskCommandPopup.cpp:79
 msgid "Show task details."
@@ -3644,14 +3567,11 @@ msgstr "Sospensione del progetto in corso..."
 
 #: clientgui/ViewProjects.cpp:384
 msgid "Telling project to allow additional task downloads..."
-msgstr ""
-"Comunicazione con il progetto per abilitare lo scaricamento di ulteriore "
-"lavoro in corso..."
+msgstr "Comunicazione con il progetto per abilitare lo scaricamento di ulteriore lavoro in corso..."
 
 #: clientgui/ViewProjects.cpp:388
 msgid "Telling project to not fetch any additional tasks..."
-msgstr ""
-"Comunicazione con il progetto per non ottenere ulteriore lavoro in corso..."
+msgstr "Comunicazione con il progetto per non ottenere ulteriore lavoro in corso..."
 
 #: clientgui/ViewProjects.cpp:424
 msgid "Resetting project..."
@@ -3679,9 +3599,8 @@ msgid "To report completed tasks"
 msgstr "Per riportare attività completate"
 
 #: clientgui/ViewProjects.cpp:1051
-#, fuzzy
 msgid "To send trickle-up message"
-msgstr "per mandare un messaggio istantaneo"
+msgstr "Per mandare un messaggio istantaneo al server"
 
 #: clientgui/ViewProjects.cpp:1052
 msgid "Requested by account manager"
@@ -3921,10 +3840,7 @@ msgstr "Annulla il trasferimento"
 
 #: clientgui/ViewTransfers.cpp:171
 msgid "Click 'Abort transfer' to delete the file from the transfer queue. This will prevent you from being granted credit for this result."
-msgstr ""
-"Clicca 'Annulla il trasferimento' per cancellare il file dalla coda dei "
-"trasferimenti. Questa azione comporterà la perdita dei crediti relativi a "
-"questo risultato."
+msgstr "Clicca 'Annulla il trasferimento' per cancellare il file dalla coda dei trasferimenti. Questa azione comporterà la perdita dei crediti relativi a questo risultato."
 
 #: clientgui/ViewTransfers.cpp:182
 msgid "File"
@@ -4150,19 +4066,14 @@ msgid ""
 "To change which research applications are sent to you from\n"
 "World Community Grid then please click on the following button:"
 msgstr ""
-"Hai scelto di connetterti ad un nuovo progetto BOINC. Connettersi ad un "
-"nuovo\n"
-"progetto, significa connettere il proprio computer ad un nuovo sito web ed a "
-"una\n"
+"Hai scelto di connetterti ad un nuovo progetto BOINC. Connettersi ad un nuovo\n"
+"progetto, significa connettere il proprio computer ad un nuovo sito web ed a una\n"
 "nuova organizzazione. Se questo è ciò che volevi, clicca sul tasto 'Avanti'\n"
 "qui sotto.\n"
 "\n"
-"Alcuni progetti, come il World Community Grid, supportano diverse "
-"applicazioni\n"
-"di ricerca.Se vuoi cambiare le applicazioni di ricerca che vengono inviate "
-"al tuo\n"
-"computer per essere elaborate, visita la pagina web del progetto e modifica "
-"le\n"
+"Alcuni progetti, come il World Community Grid, supportano diverse applicazioni\n"
+"di ricerca.Se vuoi cambiare le applicazioni di ricerca che vengono inviate al tuo\n"
+"computer per essere elaborate, visita la pagina web del progetto e modifica le\n"
 "tue preferenze.Per cambiare le applicazioni inviate da World Community Grid,\n"
 "clicca sul tasto seguente: "
 
@@ -4221,15 +4132,11 @@ msgstr "Controllo"
 
 #: clientgui/mac/MacAccessiblity.cpp:257
 msgid "for accessibility support, please select advanced from the view menu or type command shift a"
-msgstr ""
-"per il supporto accessibilità, per favore seleziona avanzate dal menu "
-"visualizza oppure premi command shift a"
+msgstr "per il supporto accessibilità, per favore seleziona avanzate dal menu visualizza oppure premi command shift a"
 
 #: clientgui/mac/MacAccessiblity.cpp:302
 msgid "This panel contains graphs showing user totals for projects"
-msgstr ""
-"Questo pannello contiene grafici che visualizzano il totale utente per i "
-"progetti"
+msgstr "Questo pannello contiene grafici che visualizzano il totale utente per i progetti"
 
 #: clientgui/mac/MacAccessiblity.cpp:726
 msgid "list headers"
@@ -4339,15 +4246,11 @@ msgstr "Esci da %s"
 
 #: clientgui/DlgAdvPreferences.h:30
 msgid "specify work start and stop hours in format HH:MM-HH:MM"
-msgstr ""
-"specifica l'orario di avvio e arresto dell'elaborazione nel formato HH:MM-"
-"HH:MM"
+msgstr "specifica l'orario di avvio e arresto dell'elaborazione nel formato HH:MM-HH:MM"
 
 #: clientgui/DlgAdvPreferences.h:31
 msgid "specify network usage start and stop hours in format HH:MM-HH:MM"
-msgstr ""
-"specifica l'orario di avvio e arresto per l'uso della rete nel formato HH"
-":MM-HH:MM"
+msgstr "specifica l'orario di avvio e arresto per l'uso della rete nel formato HH:MM-HH:MM"
 
 #~ msgid "Don't fetch NVIDIA GPU tasks"
 #~ msgstr "Non richiedere nuovo lavoro per la GPU NVIDIA"
diff --git a/locale/it/BOINC-Project-Generic.po b/locale/it/BOINC-Project-Generic.po
index 96832c8..31ccff4 100644
--- a/locale/it/BOINC-Project-Generic.po
+++ b/locale/it/BOINC-Project-Generic.po
@@ -231,7 +231,7 @@ msgstr "Successivo"
 msgid "Send message"
 msgstr "Spedisci il messaggio"
 
-# ########################################
+# ########################################
 # Private messages
 #: ../inc/forum.inc:535
 msgid "Send %1 a private message"
@@ -241,7 +241,7 @@ msgstr "Spedisci %1 un messaggio privato"
 msgid "Joined: %1"
 msgstr "Iscritto: %1"
 
-# ########################################
+# ########################################
 # Forum
 #: ../inc/forum.inc:545
 msgid "Posts: %1"
@@ -271,7 +271,7 @@ msgstr "Messaggio %1"
 msgid "hidden"
 msgstr "nascosto"
 
-# ########################################
+# ########################################
 # Forum
 #: ../inc/forum.inc:579
 msgid "Posted: %1"
@@ -354,7 +354,7 @@ msgstr "Replica a questo messaggio citandolo"
 msgid "Hidden by a moderator"
 msgstr "Nascosto da un moderatore"
 
-# ########################################
+# ########################################
 # Forum
 #: ../inc/forum.inc:683
 msgid "Posted %1 by %2"
@@ -969,7 +969,7 @@ msgstr ""
 "Per ricevere le notifiche via mail, %1modifica le preferenze della comunità%"
 "2"
 
-# ########################################
+# ########################################
 # Private messages
 #: ../inc/pm.inc:198
 msgid "Private message"
@@ -3194,7 +3194,7 @@ msgstr ""
 msgid "Threads:"
 msgstr "Discussioni:"
 
-# ########################################
+# ########################################
 # Forum
 #: ../user/edit_forum_preferences_form.php:139
 msgid "Posts:"
diff --git a/locale/it/pootle-boinctrunk-it.prefs b/locale/it/pootle-boinctrunk-it.prefs
deleted file mode 100644
index 63b9942..0000000
--- a/locale/it/pootle-boinctrunk-it.prefs
+++ /dev/null
@@ -1,11 +0,0 @@
-# Pootle preferences for project boinctrunk, language it
-
-rights:
-  GHz = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  mlincetto = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  baxnimis = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  LocutusOfBorg = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/ja/BOINC-Project-Generic.po b/locale/ja/BOINC-Project-Generic.po
index f10b7d7..68eba31 100644
--- a/locale/ja/BOINC-Project-Generic.po
+++ b/locale/ja/BOINC-Project-Generic.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at boinc.berkeley.edu>\n"
 "POT-Creation-Date: 2012-01-16 11:31 PST\n"
-"PO-Revision-Date: 2011-11-11 13:57+0200\n"
+"PO-Revision-Date: 2011-12-04 22:23+0200\n"
 "Last-Translator: shirayuki <shirayuking at gmail.com>\n"
 "Language-Team: \n"
 "Language: ja\n"
@@ -324,9 +324,11 @@ msgstr ""
 msgid "rate: "
 msgstr ""
 
+# 83%
 #: ../inc/forum.inc:629
+#, fuzzy
 msgid "Click if you like this message"
-msgstr ""
+msgstr "非公開メッセージを作成できませんでした"
 
 #: ../inc/forum.inc:629
 msgid "Rate +"
diff --git a/locale/ja/pootle-boinctrunk-ja.prefs b/locale/ja/pootle-boinctrunk-ja.prefs
deleted file mode 100644
index 4a0ebd8..0000000
--- a/locale/ja/pootle-boinctrunk-ja.prefs
+++ /dev/null
@@ -1,10 +0,0 @@
-# Pootle preferences for project boinctrunk, language ja
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  je2bwm = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  josesun = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  momdo = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/ko/pootle-boinctrunk-ko.prefs b/locale/ko/pootle-boinctrunk-ko.prefs
deleted file mode 100644
index 93eab0a..0000000
--- a/locale/ko/pootle-boinctrunk-ko.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-# Pootle preferences for project boinctrunk, language ko
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  josesun = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  treppolse = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  noturn234 = u'view, suggest, translate, overwrite, review, archive, pocompile, commit'
-goals:
-  'Web page':
-    files = u'BOINC-Project-Customized.po, BOINC-Project-Generic.po, BOINC-Web.po'
diff --git a/locale/lt/pootle-boinctrunk-lt.prefs b/locale/lt/pootle-boinctrunk-lt.prefs
deleted file mode 100644
index 2da3474..0000000
--- a/locale/lt/pootle-boinctrunk-lt.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language lt
-
-rights:
-  Rytis = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/lv/pootle-boinctrunk-lv.prefs b/locale/lv/pootle-boinctrunk-lv.prefs
deleted file mode 100644
index fde74e5..0000000
--- a/locale/lv/pootle-boinctrunk-lv.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language lv
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Atis = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/nb/BOINC-Client.mo b/locale/nb/BOINC-Client.mo
index dad5588..331deac 100644
Binary files a/locale/nb/BOINC-Client.mo and b/locale/nb/BOINC-Client.mo differ
diff --git a/locale/nb/BOINC-Client.po b/locale/nb/BOINC-Client.po
index a64e2f9..b0e3cb9 100644
--- a/locale/nb/BOINC-Client.po
+++ b/locale/nb/BOINC-Client.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-09 09:39-0800\n"
-"PO-Revision-Date: 2012-04-07 15:06+0200\n"
+"PO-Revision-Date: 2012-04-07 15:07+0200\n"
 "Last-Translator: Kenneth <kenneth at skjold.biz>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
 "Language: nb\n"
@@ -18,9 +18,8 @@ msgstr ""
 "X-Generator: Pootle 2.1.6\n"
 
 #: acct_mgr.cpp:435 acct_mgr.cpp:444
-#, fuzzy
 msgid "Message from account manager"
-msgstr "Melding fra server"
+msgstr "Melding fra konto manager"
 
 #: client_msgs.cpp:79
 msgid "Message from server"
diff --git a/locale/nb/BOINC-Manager.mo b/locale/nb/BOINC-Manager.mo
index 356c003..414c150 100644
Binary files a/locale/nb/BOINC-Manager.mo and b/locale/nb/BOINC-Manager.mo differ
diff --git a/locale/nb/BOINC-Manager.po b/locale/nb/BOINC-Manager.po
index 6a7a507..8ca640b 100644
--- a/locale/nb/BOINC-Manager.po
+++ b/locale/nb/BOINC-Manager.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-03-05 10:58-0500\n"
-"PO-Revision-Date: 2012-04-07 14:58+0200\n"
+"PO-Revision-Date: 2012-09-16 13:49+0200\n"
 "Last-Translator: Kenneth <kenneth at skjold.biz>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
 "Language: nb\n"
@@ -1119,7 +1119,7 @@ msgstr "Validerings feil"
 #: clientgui/DlgAdvPreferences.cpp:793
 #: clientgui/DlgAdvPreferences.cpp:798
 msgid "Applications to add"
-msgstr ""
+msgstr "Legg til programmer"
 
 #: clientgui/DlgAdvPreferences.cpp:814
 #, c-format
@@ -1134,7 +1134,7 @@ msgstr ""
 
 #: clientgui/DlgAdvPreferences.cpp:826
 msgid "Name of application to add?"
-msgstr ""
+msgstr "Navn på program å legge til?"
 
 #: clientgui/DlgAdvPreferences.cpp:826
 msgid "Add exclusive app"
@@ -1143,7 +1143,7 @@ msgstr ""
 #: clientgui/DlgAdvPreferences.cpp:847
 #, c-format
 msgid "Application names must end with '%s'"
-msgstr ""
+msgstr "Applikasjon navn må slutte med \"%s\""
 
 #: clientgui/DlgAdvPreferences.cpp:871
 #, c-format
diff --git a/locale/nb/pootle-boinctrunk-nb.prefs b/locale/nb/pootle-boinctrunk-nb.prefs
deleted file mode 100644
index 1ac9c57..0000000
--- a/locale/nb/pootle-boinctrunk-nb.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language nb
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  kskjold = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/nl/pootle-boinctrunk-nl.prefs b/locale/nl/pootle-boinctrunk-nl.prefs
deleted file mode 100644
index 7f18b99..0000000
--- a/locale/nl/pootle-boinctrunk-nl.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-# Pootle preferences for project boinctrunk, language nl
-
-rights:
-  ReneOskam = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/nn/pootle-boinctrunk-nn.prefs b/locale/nn/pootle-boinctrunk-nn.prefs
deleted file mode 100644
index 95fd749..0000000
--- a/locale/nn/pootle-boinctrunk-nn.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-# Pootle preferences for project boinctrunk, language nn
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/pl/pootle-boinctrunk-pl.prefs b/locale/pl/pootle-boinctrunk-pl.prefs
deleted file mode 100644
index a231512..0000000
--- a/locale/pl/pootle-boinctrunk-pl.prefs
+++ /dev/null
@@ -1,9 +0,0 @@
-# Pootle preferences for project boinctrunk, language pl
-
-rights:
-  MarekZ = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  Simek = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/pt_BR/pootle-boinctrunk-pt_BR.prefs b/locale/pt_BR/pootle-boinctrunk-pt_BR.prefs
deleted file mode 100644
index 693f608..0000000
--- a/locale/pt_BR/pootle-boinctrunk-pt_BR.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language pt_BR
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  ferfuji = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/pt_PT/BOINC-Project-Generic.po b/locale/pt_PT/BOINC-Project-Generic.po
index e503a49..4f73cba 100644
--- a/locale/pt_PT/BOINC-Project-Generic.po
+++ b/locale/pt_PT/BOINC-Project-Generic.po
@@ -6,15 +6,15 @@ msgstr ""
 "Project-Id-Version: 1.03\n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at boinc.berkeley.edu>\n"
 "POT-Creation-Date: 2012-01-16 11:31 PST\n"
-"PO-Revision-Date: 2012-02-24 19:28+0200\n"
-"Last-Translator: Miguel Filipe Paulino de Sousa <Miguel.veig at gmail.com>\n"
+"PO-Revision-Date: 2012-10-29 15:09-0000\n"
+"Last-Translator: Miguel Veiga <Miguel.veig at gmail.com>\n"
 "Language-Team: Portuguese <LL at li.org>\n"
 "Language: pt_PT\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Pootle 2.1.6\n"
+"X-Generator: Poedit 1.5.4\n"
 "X-Poedit-SourceCharset: utf-8\n"
 
 msgid "LANG_NAME_NATIVE"
@@ -59,8 +59,8 @@ msgstr "Inserir imagem: [img]http://image_url[/img]  (alt+p)"
 msgid ""
 "Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]  (alt+w)"
 msgstr ""
-"Inserir URL: [url]http://url[/url] ou [url=http://url]URL texto[/url]  "
-"(alt+w)"
+"Inserir URL: [url]http://url[/url] ou [url=http://url]URL texto[/url]  (alt"
+"+w)"
 
 #: ../inc/bbcode_html.inc:42
 msgid "Font color"
@@ -364,9 +364,9 @@ msgstr ""
 "\n"
 "        <ul>\n"
 "        <li> Os posts têm de ser 'amigáveis': não poderão conter\n"
-"              conteudo que seja obsceno, que tenham conteudo\n"
-"              sexual explicito ou sugestivo.\n"
-"        <li> Avisos comerciais.\n"
+"              conteúdo que seja obsceno, conteudo sexual\n"
+"              explicito ou sugestivo.\n"
+"        <li> Publicidade.\n"
 "        <li> Links para websites envolvendo conteudo sexual,\n"
 "             jogos de azar, ou intolerância de outros tipos.\n"
 "         <li> Mensagens destinadas a importunar ou antoganizar outras "
@@ -1007,7 +1007,8 @@ msgstr ""
 
 #: ../inc/prefs.inc:121
 msgid "Do work only between the hours of %1 No restriction if equal %2"
-msgstr "Executar trabalho apenas entre as horas %1 Sem restrições se igual a %2"
+msgstr ""
+"Executar trabalho apenas entre as horas %1 Sem restrições se igual a %2"
 
 #: ../inc/prefs.inc:129
 msgid ""
@@ -1165,9 +1166,9 @@ msgid ""
 "resources and the second will get 2/3. %2"
 msgstr ""
 "Partilha de recursos %1 Determina a proporção dos recursos do seu computador "
-"dedicados a este projecto. Exemplo: se participa em dois projectos BOINC "
-"com recursos partilhados de 100 e 200, o primeiro obterá 1/3 dos recursos e "
-"o segundo obterá 2/3. %2"
+"dedicados a este projecto. Exemplo: se participa em dois projectos BOINC com "
+"recursos partilhados de 100 e 200, o primeiro obterá 1/3 dos recursos e o "
+"segundo obterá 2/3. %2"
 
 #: ../inc/prefs.inc:298
 msgid "Accelerate GPU tasks by dedicating a CPU to each one?"
@@ -2275,7 +2276,8 @@ msgstr ""
 
 #: ../inc/util.inc:771
 msgid "Unable to connect to database - please try again later"
-msgstr "Não foi possivel conectar à base de dados - por favor, tente mais tarde"
+msgstr ""
+"Não foi possivel conectar à base de dados - por favor, tente mais tarde"
 
 #: ../inc/util.inc:772
 msgid "Error:"
@@ -2442,15 +2444,15 @@ msgstr "Item 2"
 
 #: ../user/bbcode.php:45
 msgid "use to link to Trac ticket on BOINC website"
-msgstr ""
+msgstr "use para linkar o Ticket Trac no website do BOINC"
 
 #: ../user/bbcode.php:47
 msgid "use to link to Trac Wiki on BOINC website"
-msgstr ""
+msgstr "use para linkar a Trac Wiki no website do BOINC"
 
 #: ../user/bbcode.php:49
 msgid "use to link to SVN changeset on BOINC website"
-msgstr ""
+msgstr "use para linkar  o SVN de alterações no website do BOINC"
 
 #: ../user/bbcode.php:53
 msgid ""
@@ -2467,8 +2469,7 @@ msgstr "Não é possivel criar conta"
 #: ../user/create_account_action.php:29
 msgid "Click your browser's <b>Back</b> button to try again."
 msgstr ""
-"Carregue no botão <b>Voltar atrás</b> do seu navegador para tentar outra "
-"vez."
+"Carregue no botão <b>Voltar atrás</b> do seu navegador para tentar outra vez."
 
 #: ../user/create_account_action.php:38 ../user/create_account_action.php:40
 #: ../user/create_account_form.php:43
@@ -2597,8 +2598,8 @@ msgid ""
 "To replace it, click the \"Browse\" button and select a JPEG or PNG file (%1 "
 "or less)."
 msgstr ""
-"Para a substituir, carregue no botão \"Procurar em\" e seleccione um ficheiro "
-"JPEG ou PNG (%1 ou menos)."
+"Para a substituir, carregue no botão \"Procurar em\" e seleccione um "
+"ficheiro JPEG ou PNG (%1 ou menos)."
 
 #: ../user/create_profile.php:69
 msgid "To remove it from your profile, check this box:"
@@ -2685,7 +2686,8 @@ msgstr "Perfil salvo"
 #: ../user/create_profile.php:304
 msgid ""
 "Congratulations! Your profile was successfully entered into our database."
-msgstr "Parabéns! O seu perfil foi inserido com sucesso na nossa base de dados."
+msgstr ""
+"Parabéns! O seu perfil foi inserido com sucesso na nossa base de dados."
 
 #: ../user/create_profile.php:306
 msgid "%1View your profile%2"
@@ -2902,7 +2904,8 @@ msgstr ""
 
 #: ../user/donations.php:324
 msgid "To assign the donation with your user ID, please log in."
-msgstr "Para atribuir o donativo ao seu ID de utilizador, por favor faça login."
+msgstr ""
+"Para atribuir o donativo ao seu ID de utilizador, por favor faça login."
 
 #: ../user/donations.php:328
 msgid "Proceed"
@@ -2980,8 +2983,8 @@ msgid ""
 "We can't update your email address due to a database problem.  Please try "
 "again later."
 msgstr ""
-"Não foi possivel actualizar o seu endereço de email devido a um problema na "
-" base de dados. Por favor, tente mais tarde."
+"Não foi possivel actualizar o seu endereço de email devido a um problema na  "
+"base de dados. Por favor, tente mais tarde."
 
 #: ../user/edit_email_form.php:28 ../user/edit_email_form.php:52
 msgid "Change email address"
@@ -3313,6 +3316,9 @@ msgid ""
 "computer, and if so whether the computer has finished it. Possible values "
 "are:"
 msgstr ""
+"O <b>estado do servidor</b> relativamente à/s tarefa/s indica se a tarefa "
+"foir enviada para um computador, e, se esse computador a acabou. Possiveis "
+"valores são:"
 
 #: ../user/explain_state.php:35
 msgid ""
@@ -3351,6 +3357,8 @@ msgid ""
 "A tasks's <b>outcome</b> is defined if its server state is <b>over</b>. "
 "Possible values are:"
 msgstr ""
+"O <b>resultado</b> da/s tarefa/s é definido se estado do seu servidor é "
+"<b>terminado</b>. Possiveis valores são:"
 
 #: ../user/explain_state.php:57
 msgid ""
@@ -3413,6 +3421,8 @@ msgid ""
 "A result's <b>client state</b> indicates the stage of processing at which an "
 "error occurred."
 msgstr ""
+"O resultado/s do <b>estado cliente</b> indica  a fase de processamento em "
+"que o erro ocorreu."
 
 #: ../user/explain_state.php:86
 msgid "The computer has not yet completed the task."
@@ -3445,6 +3455,8 @@ msgid ""
 "A task's <b>Time reported or deadline</b> field depends on whether the task "
 "has been reported yet:"
 msgstr ""
+"O campo <b>Tempo reportado ou tempo limite<b>da/s tarefa/s  depende se a "
+"tarefa já foi reportada:"
 
 #: ../user/explain_state.php:110
 msgid "Already reported"
@@ -3530,8 +3542,7 @@ msgstr "Dizer aos seus amigos acerca de %1"
 #: ../user/ffmail_form.php:38
 msgid "Help us by telling your friends, family and coworkers about %1"
 msgstr ""
-"Ajude-nos dizendo aos seus amigos, familia e colegas de trabalho acerca de %"
-"1"
+"Ajude-nos dizendo aos seus amigos, familia e colegas de trabalho acerca de %1"
 
 #: ../user/ffmail_form.php:40
 msgid ""
@@ -4952,9 +4963,9 @@ msgid ""
 "anyone to view and copy your posts."
 msgstr ""
 "Se usa o nosso fórum na web, tem que seguir as %2instruções para fazer posts"
-"%3. Mensagens postadas ao %1 fórum estão visíveis a todos, incluindo "
-"não-membros. Ao postar nos fóruns, está a garantir licença irrevogável para "
-"que qualquer pessoa possa ver e copiar os seus posts."
+"%3. Mensagens postadas ao %1 fórum estão visíveis a todos, incluindo não-"
+"membros. Ao postar nos fóruns, está a garantir licença irrevogável para que "
+"qualquer pessoa possa ver e copiar os seus posts."
 
 #: ../user/info.php:48
 msgid "Is it safe to run %1?"
@@ -4976,8 +4987,8 @@ msgstr ""
 "riscos. Testamos as nossas aplicações com todos o cuidado. os nossos "
 "servidores estão por trás de uma firewall e configurados para alta "
 "segurança. Para garantir a integridade dos downloads dos programas, todos os "
-"executáveis estão assinados digitalmente num computador seguro não "
-"conectado à Internet."
+"executáveis estão assinados digitalmente num computador seguro não conectado "
+"à Internet."
 
 #: ../user/info.php:50
 msgid ""
@@ -4985,8 +4996,8 @@ msgid ""
 "happens, stop running %1 or use a %2utility program%3 that limits CPU usage."
 msgstr ""
 "As aplicações executadas pelo %1 podem causar em alguns computadores "
-"sobreaquecimento. Se isto acontecer, pare de executar %1 ou use um %"
-"aplicativo%3 que limite o uso do CPU."
+"sobreaquecimento. Se isto acontecer, pare de executar %1 ou use um "
+"%aplicativo%3 que limite o uso do CPU."
 
 #: ../user/info.php:51
 msgid ""
@@ -5132,6 +5143,14 @@ msgid ""
 "        Incompatible computers will not be merged.\n"
 "        <p>"
 msgstr ""
+"Esta operação funde os computadores com base no nome de domínio.\n"
+"        <p>\n"
+"        Por cada nome de domínio, irão ser fundidos todos os computadores "
+"mais velhos\n"
+"        que tenham esse nome com os computadores mais recentes que tenham "
+"esse nome.\n"
+"        Computadores incompativeis não serão fundidos.\n"
+"        <p>"
 
 #: ../user/merge_by_name.php:84
 msgid "Go ahead and do this"
@@ -5202,7 +5221,8 @@ msgstr ""
 "Tipos de mau comportamenteo adicionais (\"bugging\" posts para apanhar os\n"
 "endereços de IP de outros participantes, criação excessiva de posts para "
 "fazer spam\n"
-"nos fóruns, ect), enquanto não listados de acordo com as regras, podem ainda\n"
+"nos fóruns, ect), enquanto não listados de acordo com as regras, podem "
+"ainda\n"
 "levar a sanções similares.\n"
 "<p>\n"
 "Se acredita que um post viola alguma destas regras,\n"
@@ -5406,7 +5426,8 @@ msgstr "Confirmar apagar preferências"
 
 #: ../user/prefs_remove.php:51
 msgid "Are you sure you want to delete your separate %1 preferences for %2?"
-msgstr "Tem a certeza que quer apagar as suas %1preferências separadas para %2?"
+msgstr ""
+"Tem a certeza que quer apagar as suas %1preferências separadas para %2?"
 
 #: ../user/prefs_remove.php:55
 msgid "Remove preferences"
@@ -5754,8 +5775,7 @@ msgid ""
 "projects from several sites; see your %1home page%2."
 msgstr ""
 "Adicionalmente pode obter as suas estatísticas individuais resumidas através "
-"de todos os projectos BOINC de vários sites; veja a sua %1página principal%"
-"2."
+"de todos os projectos BOINC de vários sites; veja a sua %1página principal%2."
 
 #: ../user/team.php:25
 msgid "Teams"
@@ -5799,8 +5819,8 @@ msgstr "acabar com a equipa se esta não tiver membros"
 #: ../user/team.php:40
 msgid "To join a team, visit its team page and click %1Join this team%2."
 msgstr ""
-"Para se juntar a uma equipa, visite a página da equipa e carregue em %"
-"1Juntar-se a esta equipa%2."
+"Para se juntar a uma equipa, visite a página da equipa e carregue em "
+"%1Juntar-se a esta equipa%2."
 
 #: ../user/team.php:41 ../user/team_search.php:179
 msgid "Find a team"
@@ -5822,8 +5842,8 @@ msgstr "Criar uma nova equipa"
 msgid ""
 "If you cannot find a team that is right for you, you can %1create a team%2."
 msgstr ""
-"Se não encontrar uma equipa que seja adequada a si, pode %1criar uma equipa%"
-"2."
+"Se não encontrar uma equipa que seja adequada a si, pode %1criar uma equipa"
+"%2."
 
 #: ../user/team_admins.php:34
 msgid "Remove Team Admin status from this member"
@@ -6265,8 +6285,8 @@ msgid ""
 "The founder was notified of your request. If he/she does not respond by %1 "
 "you will be given an option to become founder."
 msgstr ""
-"O fundador foi notificado do seu pedido. Se ele/ela não responder por %1 "
-"ser-lhe-á dada a opção de se tornar fundador."
+"O fundador foi notificado do seu pedido. Se ele/ela não responder por %1 ser-"
+"lhe-á dada a opção de se tornar fundador."
 
 #: ../user/team_founder_transfer_form.php:60
 msgid ""
@@ -6360,8 +6380,7 @@ msgstr "Pode ver os membros, estatísticas e informações das equipas."
 #: ../user/team_lookup.php:98
 msgid "More than 100 teams match your search. The first 100 are shown."
 msgstr ""
-"Mais de 100 equipas correspondem à sua procura. Os primeiros serão "
-"mostrados."
+"Mais de 100 equipas correspondem à sua procura. Os primeiros serão mostrados."
 
 #: ../user/team_lookup.php:104
 msgid ""
diff --git a/locale/pt_PT/pootle-boinctrunk-pt_PT.prefs b/locale/pt_PT/pootle-boinctrunk-pt_PT.prefs
deleted file mode 100644
index b498815..0000000
--- a/locale/pt_PT/pootle-boinctrunk-pt_PT.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language pt_BR
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  MeGaBeSuNTa = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/ro/pootle-boinctrunk-ro.prefs b/locale/ro/pootle-boinctrunk-ro.prefs
deleted file mode 100644
index 502eb1c..0000000
--- a/locale/ro/pootle-boinctrunk-ro.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-# Pootle preferences for project boinctrunk, language ro
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/ru/pootle-boinctrunk-ru.prefs b/locale/ru/pootle-boinctrunk-ru.prefs
deleted file mode 100644
index a1d859d..0000000
--- a/locale/ru/pootle-boinctrunk-ru.prefs
+++ /dev/null
@@ -1,10 +0,0 @@
-# Pootle preferences for project boinctrunk, language ru
-
-rights:
-  SaharovNA = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  default = u'view, suggest, archive'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  mifistorX = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  DeadJDona = u'view, suggest, archive'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/sk/BOINC-Project-Generic.po b/locale/sk/BOINC-Project-Generic.po
index d63dd6f..aba5e68 100644
--- a/locale/sk/BOINC-Project-Generic.po
+++ b/locale/sk/BOINC-Project-Generic.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at boinc.berkeley.edu>\n"
 "POT-Creation-Date: 2012-01-16 11:31 PST\n"
-"PO-Revision-Date: 2012-04-22 21:06+0200\n"
+"PO-Revision-Date: 2012-09-16 20:10+0200\n"
 "Last-Translator: aceman <acelists at atlas.sk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
 "Language: sk\n"
@@ -155,11 +155,11 @@ msgstr "Zavrieť tagy"
 
 #: ../inc/forum.inc:37
 msgid "Oldest first"
-msgstr ""
+msgstr "Od najstarších"
 
 #: ../inc/forum.inc:38 ../inc/forum.inc:44
 msgid "Newest first"
-msgstr ""
+msgstr "Od najnovších"
 
 #: ../inc/forum.inc:39
 msgid "Highest rated posts first"
@@ -211,15 +211,15 @@ msgstr "nástenka %1"
 
 #: ../inc/forum.inc:238 ../inc/result.inc:658
 msgid "Previous"
-msgstr ""
+msgstr "Predchádzajúci"
 
 #: ../inc/forum.inc:260 ../inc/result.inc:667
 msgid "Next"
-msgstr ""
+msgstr "Nasledujúci"
 
 #: ../inc/forum.inc:535
 msgid "Send message"
-msgstr ""
+msgstr "OdoslaÅ¥ správu"
 
 #: ../inc/forum.inc:535
 #, fuzzy
@@ -237,20 +237,20 @@ msgstr "Príspevkov: %1"
 
 #: ../inc/forum.inc:551
 msgid "Credit: %1"
-msgstr ""
+msgstr "Kredit: %1"
 
 #: ../inc/forum.inc:552
 msgid "RAC: %1"
-msgstr ""
+msgstr "RAC: %1"
 
 #: ../inc/forum.inc:574
 msgid "You haven't read this message yet"
-msgstr ""
+msgstr "Túto správu ste zatiaľ nečítali"
 
 #: ../inc/forum.inc:574
 #, fuzzy
 msgid "Unread"
-msgstr "Vlákno"
+msgstr "Neprečítané"
 
 #: ../inc/forum.inc:577 ../inc/forum.inc:582 ../inc/forum.inc:681
 #, fuzzy
@@ -259,7 +259,7 @@ msgstr "Správa %1"
 
 #: ../inc/forum.inc:578 ../inc/user.inc:324 ../user/forum_forum.php:172
 msgid "hidden"
-msgstr ""
+msgstr "skryté"
 
 #: ../inc/forum.inc:579
 #, fuzzy
@@ -268,11 +268,11 @@ msgstr "Uverejnené: %1"
 
 #: ../inc/forum.inc:582
 msgid " - in response to "
-msgstr ""
+msgstr " - ako odpoveď na "
 
 #: ../inc/forum.inc:585 ../inc/prefs.inc:691 ../inc/prefs.inc:693
 msgid "Edit"
-msgstr ""
+msgstr "Upraviť"
 
 #: ../inc/forum.inc:585
 msgid "Edit this message"
@@ -280,7 +280,7 @@ msgstr "Upraviť správu"
 
 #: ../inc/forum.inc:591
 msgid "Last modified: %1"
-msgstr ""
+msgstr "Posledná zmena: %1"
 
 #: ../inc/forum.inc:594
 msgid ""
diff --git a/locale/sk/pootle-boinctrunk-sk.prefs b/locale/sk/pootle-boinctrunk-sk.prefs
deleted file mode 100644
index cc01b89..0000000
--- a/locale/sk/pootle-boinctrunk-sk.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-# Pootle preferences for project boinctrunk, language sk
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/sl/pootle-boinctrunk-sl.prefs b/locale/sl/pootle-boinctrunk-sl.prefs
deleted file mode 100644
index 5b2aa4d..0000000
--- a/locale/sl/pootle-boinctrunk-sl.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language sl
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  MihaP = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/sv_SE/pootle-boinctrunk-sv_SE.prefs b/locale/sv_SE/pootle-boinctrunk-sv_SE.prefs
deleted file mode 100644
index 8b44f0e..0000000
--- a/locale/sv_SE/pootle-boinctrunk-sv_SE.prefs
+++ /dev/null
@@ -1,10 +0,0 @@
-# Pootle preferences for project boinctrunk, language sv_SE
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  ersi = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  RobHol = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  Elgot = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/tr/BOINC-Client.mo b/locale/tr/BOINC-Client.mo
index d1aaee1..3cc2a6b 100644
Binary files a/locale/tr/BOINC-Client.mo and b/locale/tr/BOINC-Client.mo differ
diff --git a/locale/tr/BOINC-Client.po b/locale/tr/BOINC-Client.po
index 41ffc30..a93ae7b 100644
--- a/locale/tr/BOINC-Client.po
+++ b/locale/tr/BOINC-Client.po
@@ -7,20 +7,18 @@ msgstr ""
 "Project-Id-Version: BOICN Client Messages\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-09 09:39-0800\n"
-"PO-Revision-Date: 2011-02-02 19:40+0200\n"
-"Last-Translator: Aycan <aycandemirel at hotmail.com>\n"
+"PO-Revision-Date: 2012-10-28 21:43+0200\n"
+"Last-Translator: Aycan Demirel <aycandemirel at hotmail.com>\n"
 "Language-Team: Turkish <weboglan at hotmail.com>\n"
 "Language: tr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Pootle 2.1.6\n"
+"X-Generator: Poedit 1.5.4\n"
 
 #: acct_mgr.cpp:435 acct_mgr.cpp:444
-#, fuzzy
 msgid "Message from account manager"
-msgstr "Sunucudan mesaj - "
+msgstr "Hesap yöneticisinden mesaj - "
 
 #: client_msgs.cpp:79
 msgid "Message from server"
@@ -80,9 +78,8 @@ msgid "Missing start tag in cc_config.xml"
 msgstr "cc_config.xml dosyasında başlangıç etiketi kayıp"
 
 #: log_flags.cpp:443
-#, fuzzy
 msgid "Error in cc_config.xml options"
-msgstr "cc_config.xml dosyasında tanınmayan etiket"
+msgstr "cc_config.xml dosyası seçeneklerinde hata"
 
 #: log_flags.cpp:461
 msgid "Missing end tag in cc_config.xml"
@@ -160,11 +157,8 @@ msgid "An ATI GPU is required to run tasks for this project"
 msgstr "Bu projedeki işleri çalıştırabilmek için, bir ATI GPU gerekiyor"
 
 #: ../sched/sched_send.cpp:1523
-#, fuzzy
 msgid "No tasks are available for the applications you have selected."
-msgstr ""
-"Seçtiğiniz uygulamalar için iş mevcut değil.  Lütfen web sitesinde proje "
-"tercihlerinizi kontrol edin."
+msgstr "Seçtiğiniz uygulamalar için iş mevcut değil."
 
 #: ../sched/sched_send.cpp:1549
 msgid "Your computer type is not supported by this project"
diff --git a/locale/tr/BOINC-Manager.mo b/locale/tr/BOINC-Manager.mo
index 302ba97..1717619 100644
Binary files a/locale/tr/BOINC-Manager.mo and b/locale/tr/BOINC-Manager.mo differ
diff --git a/locale/tr/BOINC-Manager.po b/locale/tr/BOINC-Manager.po
index e410a64..09faac0 100644
--- a/locale/tr/BOINC-Manager.po
+++ b/locale/tr/BOINC-Manager.po
@@ -1,13 +1,9 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 msgid ""
 msgstr ""
 "Project-Id-Version: BOINC Manager 6.8x\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-03-05 10:58-0500\n"
-"PO-Revision-Date: 2011-04-07 09:19+0200\n"
+"PO-Revision-Date: 2012-10-28 23:02+0200\n"
 "Last-Translator: Aycan <aycandemirel at hotmail.com>\n"
 "Language-Team: Donanım Haber <bilgi at donanimhaber.com>\n"
 "Language: tr\n"
@@ -16,13 +12,10 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 "X-Generator: Pootle 2.1.6\n"
-"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SourceCharset: UTF-8\n"
 "X-Poedit-Basepath: C:\\Src\\BOINCSVN\\trunk\\boinc\n"
-"X-Poedit-SearchPath-0: clientgui\n"
-"X-Poedit-SearchPath-1: clientgui/msw\n"
-"X-Poedit-SearchPath-2: clientgui/gtk\n"
-"X-Poedit-SearchPath-3: clientgui/mac\n"
 "X-BOINC-UTF8-Marker: 简体中文, 日本語\n"
+"X-Poedit-SearchPath-0: clientgui\n"
 
 #: clientgui/AccountInfoPage.cpp:386
 msgid "Identify your account "
@@ -75,13 +68,11 @@ msgstr ""
 msgid "Find login information"
 msgstr "GiriÅŸ bilgisini bul"
 
-#: clientgui/AccountInfoPage.cpp:435
-#: clientgui/AccountInfoPage.cpp:635
+#: clientgui/AccountInfoPage.cpp:435 clientgui/AccountInfoPage.cpp:635
 msgid "&Password:"
 msgstr "&Parola:"
 
-#: clientgui/AccountInfoPage.cpp:442
-#: clientgui/AccountInfoPage.cpp:659
+#: clientgui/AccountInfoPage.cpp:442 clientgui/AccountInfoPage.cpp:659
 msgid "Choose a &password:"
 msgstr "Bir &parola seçin:"
 
@@ -139,20 +130,25 @@ msgstr "Hesap yöneticisi kullan"
 
 #: clientgui/AccountInfoPage.cpp:583
 #, c-format
-msgid "The minimum password length for this project is %d. Please enter a different password."
+msgid ""
+"The minimum password length for this project is %d. Please enter a different "
+"password."
 msgstr ""
 "Bu proje için parola uzunluğu en az %d karakter olmalı. Lütfen uygun bir "
 "parola girin."
 
 #: clientgui/AccountInfoPage.cpp:589
 #, c-format
-msgid "The minimum password length for this account manager is %d. Please enter a different password."
+msgid ""
+"The minimum password length for this account manager is %d. Please enter a "
+"different password."
 msgstr ""
 "Bu hesap yöneticisi için parola uzunluğu en az %d karakter olmalı. Lütfen "
 "uygun bir parola girin."
 
 #: clientgui/AccountInfoPage.cpp:601
-msgid "The password and confirmation password do not match. Please type them again."
+msgid ""
+"The password and confirmation password do not match. Please type them again."
 msgstr "Parola ve parola doğrulaması birbirini tutmuyor. Lütfen tekrar yazın."
 
 #: clientgui/AccountManagerInfoPage.cpp:248
@@ -208,8 +204,7 @@ msgstr "%s penceresini kapatır."
 msgid "&Close Window"
 msgstr "&Pencereyi kapat"
 
-#: clientgui/AdvancedFrame.cpp:329
-#: clientgui/AdvancedFrame.cpp:336
+#: clientgui/AdvancedFrame.cpp:329 clientgui/AdvancedFrame.cpp:336
 #: clientgui/AdvancedFrame.cpp:343
 #, c-format
 msgid "Exit %s"
@@ -653,7 +648,8 @@ msgstr "%s - Bağlantı Hatası"
 #: clientgui/BOINCBaseFrame.cpp:508
 msgid ""
 "You currently are not authorized to manage the client.\n"
-"Please contact your administrator to add you to the 'boinc_users' local user group."
+"Please contact your administrator to add you to the 'boinc_users' local user "
+"group."
 msgstr ""
 "İstemciyi yönetmek için yetkili durumda değilsiniz.\n"
 "Lüfen 'boinc_users' yerel kullanıcı grubuna dahil olmak için yöneticinizle "
@@ -698,7 +694,8 @@ msgstr "%s - Hizmet İşlemi Başlatılamadı"
 #, c-format
 msgid ""
 "%s is not able to start a %s client.\n"
-"Please launch the Control Panel->Administative Tools->Services applet and start the BOINC service."
+"Please launch the Control Panel->Administative Tools->Services applet and "
+"start the BOINC service."
 msgstr ""
 "%s, %s istemcisini başlatamıyor.\n"
 "Lütfen, Denetim Masası->Yönetimsel Araçlar->Hizmetler bölümüne gidip, BOINC "
@@ -722,7 +719,8 @@ msgstr "%s - Bağlantı Durumu"
 #, c-format
 msgid ""
 "%s is not currently connected to a %s client.\n"
-"Please use the 'Advanced\\Select Computer...' menu option to connect up to a %s client.\n"
+"Please use the 'Advanced\\Select Computer...' menu option to connect up to a "
+"%s client.\n"
 "To connect up to your local computer please use 'localhost' as the host name."
 msgstr ""
 "%s şu anda bir %s istemcisine bağlı değil.\n"
@@ -732,9 +730,8 @@ msgstr ""
 "yazın."
 
 #: clientgui/BOINCBaseView.cpp:774
-#, fuzzy
 msgid "Project web pages"
-msgstr "Proje Ä°nternet Siteleri"
+msgstr "Proje internet sayfaları"
 
 #: clientgui/BOINCClientManager.cpp:570
 #, c-format
@@ -800,7 +797,6 @@ msgstr "%s internet bağlantısını keserken başarısız oldu."
 
 #: clientgui/BOINCGUIApp.cpp:339
 #, c-format
-#, fuzzy, c-format
 msgid ""
 "You currently are not authorized to manage the client.\n"
 "\n"
@@ -813,8 +809,8 @@ msgid ""
 msgstr ""
 "Bu istemciyi yönetmek için yetkilendirilmemişsiniz.\n"
 "\n"
-"BOINC'i bu kullanıcıyla çalıştırabilmek için, lütfen:\n"
-"- BOINC'ı, bilgisayar yöneticisi olmayan kullanıcıların da\n"
+"Bu kullanıcıyla %s çalıştırabilmek için, lütfen:\n"
+"- %s'ı, bilgisayar yöneticisi olmayan kullanıcıların da\n"
 "çalıştırabilmesi hakkındaki soruya \"Evet\" yanıtını vererek\n"
 "yeniden kurun\n"
 "ya da\n"
@@ -823,18 +819,18 @@ msgstr ""
 
 #: clientgui/BOINCGUIApp.cpp:345
 #, c-format
-#, fuzzy, c-format
 msgid ""
 "%s ownership or permissions are not set properly; please reinstall %s.\n"
 "(Error code %d"
 msgstr ""
-"BOINC sahipliği ya da izinleri doğru olarak ayarlanmamış; lütfen BOINC'i "
-"yeniden kurun.\n"
-"(Hata kodu %d)"
+"%s sahipliği ya da izinleri doğru olarak ayarlanmamış; lütfen %s'i yeniden "
+"kurun.\n"
+"(Hata kodu %d"
 
 #: clientgui/BOINCGUIApp.cpp:351
+#, fuzzy
 msgid " at "
-msgstr ""
+msgstr "at "
 
 #: clientgui/BOINCGUIApp.cpp:354
 msgid ")"
@@ -891,7 +887,7 @@ msgstr "BOINC güvenlik kullanıcılarını ve izinlerini devre dışı bırak"
 #: clientgui/BOINCGUIApp.cpp:541
 msgid "set skin debugging mode to enable skin manager error messages"
 msgstr ""
-"kaplama yöneticisi hata mesajları için, kaplama hata ayıklama moduna geçin"
+"görünüm yöneticisi hata mesajları için, görünüm hata ayıklama moduna geçin"
 
 #: clientgui/BOINCGUIApp.cpp:542
 msgid "multiple instances of BOINC Manager allowed"
@@ -899,7 +895,7 @@ msgstr "BOINC Manager'ın birden çok kopyasına izin verildi"
 
 #: clientgui/BOINCGUIApp.cpp:544
 msgid "Not used: workaround for bug in XCode 4.2"
-msgstr ""
+msgstr "Kullanılmadı: XCode 4.2'deki hata için geçici çözüm"
 
 #: clientgui/BOINCGUIApp.cpp:762
 msgid "(Automatic Detection)"
@@ -923,14 +919,12 @@ msgstr "%s Sitesini Aç..."
 msgid "Open %s..."
 msgstr "%s'ı Aç..."
 
-#: clientgui/BOINCTaskBar.cpp:516
-#: clientgui/BOINCTaskBar.cpp:612
+#: clientgui/BOINCTaskBar.cpp:516 clientgui/BOINCTaskBar.cpp:612
 #: clientgui/BOINCTaskBar.cpp:620
 msgid "Snooze"
 msgstr "Hesaplamayı bir süre ertele"
 
-#: clientgui/BOINCTaskBar.cpp:518
-#: clientgui/BOINCTaskBar.cpp:639
+#: clientgui/BOINCTaskBar.cpp:518 clientgui/BOINCTaskBar.cpp:639
 #: clientgui/BOINCTaskBar.cpp:647
 msgid "Snooze GPU"
 msgstr "GPU ile hesaplamayı bir süre ertele"
@@ -944,9 +938,8 @@ msgid "Resume"
 msgstr "Sürdür"
 
 #: clientgui/BOINCTaskBar.cpp:632
-#, fuzzy
 msgid "Resume GPU"
-msgstr "Sürdür"
+msgstr "GPU ile hesaplamayı sürdür"
 
 #: clientgui/BOINCTaskBar.cpp:708
 msgid "Computing is enabled"
@@ -1017,10 +1010,8 @@ msgstr ""
 "\n"
 "Kapatmak için Son'u tıklayın."
 
-#: clientgui/CompletionErrorPage.cpp:225
-#: clientgui/CompletionPage.cpp:222
-#: clientgui/CompletionPage.cpp:242
-#: clientgui/CompletionPage.cpp:273
+#: clientgui/CompletionErrorPage.cpp:225 clientgui/CompletionPage.cpp:222
+#: clientgui/CompletionPage.cpp:242 clientgui/CompletionPage.cpp:273
 msgid "Click Finish to close."
 msgstr "Kapatmak için Son'u tıklayın"
 
@@ -1093,11 +1084,10 @@ msgid ""
 "(C) 2003-2011 University of California, Berkeley.\n"
 "All Rights Reserved."
 msgstr ""
-"(C) 2003-2011 California Ãœniversitesi, Berkeley.\n"
+"(C) 2003-2011 Kaliforniya Ãœniversitesi, Berkeley.\n"
 "Tüm hakları saklıdır."
 
-#: clientgui/DlgAbout.cpp:185
-#: clientgui/DlgAbout.cpp:189
+#: clientgui/DlgAbout.cpp:185 clientgui/DlgAbout.cpp:189
 msgid "Berkeley Open Infrastructure for Network Computing"
 msgstr ""
 "                 Türkçe çeviri: Aycan Demirel\n"
@@ -1105,8 +1095,7 @@ msgstr ""
 "\n"
 "Berkeley Open Infrastructure for Network Computing"
 
-#: clientgui/DlgAbout.cpp:201
-#: clientgui/DlgExitMessage.cpp:173
+#: clientgui/DlgAbout.cpp:201 clientgui/DlgExitMessage.cpp:173
 #: clientgui/DlgGenericMessage.cpp:120
 msgid "&OK"
 msgstr "&Tamam"
@@ -1131,46 +1120,46 @@ msgstr "geçersiz giriş değeri belirlendi"
 msgid "Validation Error"
 msgstr "Doğrulama Hatası"
 
-#: clientgui/DlgAdvPreferences.cpp:788
-#: clientgui/DlgAdvPreferences.cpp:793
+#: clientgui/DlgAdvPreferences.cpp:788 clientgui/DlgAdvPreferences.cpp:793
 #: clientgui/DlgAdvPreferences.cpp:798
 msgid "Applications to add"
-msgstr ""
+msgstr "Uygulama ekle"
 
 #: clientgui/DlgAdvPreferences.cpp:814
 #, c-format
 msgid "'%s' is not an executable application."
-msgstr ""
+msgstr "'%s' çalıştırılabilir bir uygulama değil."
 
-#: clientgui/DlgAdvPreferences.cpp:815
-#: clientgui/DlgAdvPreferences.cpp:848
+#: clientgui/DlgAdvPreferences.cpp:815 clientgui/DlgAdvPreferences.cpp:848
 #: clientgui/DlgAdvPreferences.cpp:872
 msgid "Add Exclusive App"
-msgstr ""
+msgstr "Ayrıcalıklı Uygulama Ekle"
 
 #: clientgui/DlgAdvPreferences.cpp:826
 msgid "Name of application to add?"
-msgstr ""
+msgstr "Eklenecek uygulamanın ismi?"
 
 #: clientgui/DlgAdvPreferences.cpp:826
 msgid "Add exclusive app"
-msgstr ""
+msgstr "Ayrıcalıklı uygulama ekle"
 
 #: clientgui/DlgAdvPreferences.cpp:847
 #, c-format
 msgid "Application names must end with '%s'"
-msgstr ""
+msgstr "Uygulama isimleri mutlaka '%s' ile bitmelidir"
 
 #: clientgui/DlgAdvPreferences.cpp:871
 #, c-format
 msgid "'%s' is already in the list."
-msgstr ""
+msgstr "'%s' zaten listede."
 
 #: clientgui/DlgAdvPreferences.cpp:962
 msgid ""
 "Do you really want to clear all local preferences?\n"
 "(This will not affect exclusive applications.)"
 msgstr ""
+"Tüm yerel tercihleri kaldırmak istediğinize emin misiniz?\n"
+"(Bu, ayrıcalıklı uygulama listesini silmeyecektir.)"
 
 #: clientgui/DlgAdvPreferences.cpp:963
 msgid "Confirmation"
@@ -1182,15 +1171,15 @@ msgid "%s - Preferences"
 msgstr "%s - Tercihler"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:62
-#, fuzzy
 msgid ""
 "This dialog controls preferences for this computer only.\n"
 "Click OK to set preferences.\n"
 "Click Clear to restore web-based settings (except exclusive apps)."
 msgstr ""
-"Bu pencere, yalnızca bu bilgisayara ait tercihleri ayarlar.\n"
-"Tercihlerinizi kaydetmek için Tamam'ı tıklayın.\n"
-"İnternet tabanlı ayarlarınıza dönmek için Temizle'yi tıklayın."
+"Bu pencere, tercihlerinizi yalnızca bu bilgisayar için özelleştirir.\n"
+"Tercihlerinizi kaydetmek için 'Tamam'ı tıklayın.\n"
+"İnternet tabanlı ayarlarınıza dönmek için 'Temizle'yi tıklayın (ayrıcalıklı "
+"uygulama listesi silinmez)."
 
 #: clientgui/DlgAdvPreferencesBase.cpp:65
 msgid "Clear"
@@ -1214,7 +1203,7 @@ msgstr "disk ve bellek kullanımı"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:90
 msgid "exclusive applications"
-msgstr ""
+msgstr "ayrıcalıklı uygulamalar"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:102
 msgid "OK"
@@ -1245,7 +1234,8 @@ msgid "While computer is on batteries"
 msgstr "Bilgisayar pil gücünde olduğunda"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:142
-msgid "check this if you want this computer to do work while it runs on batteries"
+msgid ""
+"check this if you want this computer to do work while it runs on batteries"
 msgstr ""
 "bilgisayar pille çalışırken hesaplamanın çalışmasını istiyorsanız bunu "
 "iÅŸaretleyin"
@@ -1255,7 +1245,8 @@ msgid "While computer is in use"
 msgstr "Bilgisayar kullanımda olduğunda"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:151
-msgid "check this if you want this computer to do work even when you're using it"
+msgid ""
+"check this if you want this computer to do work even when you're using it"
 msgstr ""
 "bilgisayarınızı kullandığınız sırada hesaplamanın çalışmasını istiyorsanız "
 "bunu iÅŸaretleyin"
@@ -1265,7 +1256,9 @@ msgid "Use GPU while computer is in use"
 msgstr "Bilgisayar kullanımda olduğunda GPU kullanılsın"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:160
-msgid "check this if you want your GPU to do work even when you're using the computer"
+msgid ""
+"check this if you want your GPU to do work even when you're using the "
+"computer"
 msgstr ""
 "bilgisayarınızı kullandığınız sırada ekran kartınızın da hesaplamada "
 "kullanılmasını istiyorsanız bunu işaretleyin (bazı bilgisayarlarda yavaşlama "
@@ -1276,7 +1269,8 @@ msgid "Only after computer has been idle for"
 msgstr "Yalnızca bilgisayar bu süre kadar boşta kaldığında:"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:182
-msgid "do work only after you haven't used the computer for this number of minutes"
+msgid ""
+"do work only after you haven't used the computer for this number of minutes"
 msgstr ""
 "bilgisayarınızı kaç dakika kullanılmadığınızda hesaplamanın başlamasını "
 "istediÄŸinizi belirleyin"
@@ -1434,25 +1428,25 @@ msgstr "her"
 #: clientgui/DlgAdvPreferencesBase.cpp:443
 #: clientgui/DlgAdvPreferencesBase.cpp:462
 msgid "days"
-msgstr "günde bir"
+msgstr "günlük"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:428
-#, fuzzy
 msgid "Minimum work buffer"
-msgstr "Depolanacak ek iş miktarı:"
+msgstr "Depoda en az bu kadar iÅŸ bulundur:"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:437
 msgid "Try to maintain enough tasks to keep busy for this many days"
-msgstr ""
+msgstr "Depoda, en az bu kadar gün boyunca yetecek miktarda iş bulundur"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:449
-#, fuzzy
 msgid "Max additional work buffer"
-msgstr "Depolanacak ek iş miktarı:"
+msgstr "Depoda en fazla bu kadar iÅŸ bulundur:"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:458
 msgid "In addition, maintain enough tasks for up to this many days"
 msgstr ""
+"Bunun yanında, depoda en fazla bu kadar günde tüketilebilecek miktarda iş "
+"bulundur"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:465
 msgid "Skip image file verification"
@@ -1460,7 +1454,8 @@ msgstr "Resim dosyasıyla doğrulamayı atla"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:467
 msgid "check this if your Internet provider modifies image files"
-msgstr "internet sağlayıcınız resim dosyalarını değiştiriyorsa bunu işaretleyin"
+msgstr ""
+"internet sağlayıcınız resim dosyalarını değiştiriyorsa bunu işaretleyin"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:475
 msgid "Connect options"
@@ -1471,7 +1466,9 @@ msgid "Confirm before connecting to internet"
 msgstr "Internete bağlanmadan önce onay iste"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:479
-msgid "if checked, a confirmation dialog will be displayed before trying to connect to the Internet"
+msgid ""
+"if checked, a confirmation dialog will be displayed before trying to connect "
+"to the Internet"
 msgstr ""
 "işaretlerseniz, internet bağlantısı kurulmaya çalışılmadan önce sizden onay "
 "isteyen bir mesaj belirir"
@@ -1500,8 +1497,7 @@ msgstr "ağ kullanımı başlangıç saati"
 msgid "network usage stop hour"
 msgstr "ağ kullanımı bitiş saati"
 
-#: clientgui/DlgAdvPreferencesBase.cpp:597
-#: clientgui/DlgItemProperties.cpp:234
+#: clientgui/DlgAdvPreferencesBase.cpp:597 clientgui/DlgItemProperties.cpp:234
 msgid "Disk usage"
 msgstr "Disk kullanımı"
 
@@ -1572,16 +1568,17 @@ msgstr ""
 "kalmayı sürdürür"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:712
-msgid "Suspend processor and network usage when these applications are running:"
-msgstr ""
+msgid ""
+"Suspend processor and network usage when these applications are running:"
+msgstr "Bu uygulamalar çalışırken, işlemci ve ağ kullanımını duraklat:"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:721
 msgid "Add..."
-msgstr ""
+msgstr "Ekle..."
 
 #: clientgui/DlgAdvPreferencesBase.cpp:722
 msgid "Add an application to this list"
-msgstr ""
+msgstr "Bu listeye bir uygulama ekle"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:727
 msgid "Remove"
@@ -1589,11 +1586,11 @@ msgstr "Kaldır"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:728
 msgid "Remove an application from this list"
-msgstr ""
+msgstr "Bu listeden bir uygulama kaldır"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:737
 msgid "For advanced options, refer to "
-msgstr ""
+msgstr "Gelişmiş seçenekler için, lütfen ziyaret edin:  "
 
 #: clientgui/DlgEventLog.cpp:194
 #, c-format
@@ -1612,63 +1609,56 @@ msgstr "Zaman"
 msgid "Message"
 msgstr "Mesaj"
 
-#: clientgui/DlgEventLog.cpp:263
-#: clientgui/DlgEventLog.cpp:327
-#, fuzzy
+#: clientgui/DlgEventLog.cpp:263 clientgui/DlgEventLog.cpp:327
 msgid "&Show only this project"
-msgstr "Yalnızca bu projeyi göster"
+msgstr "&Yalnızca bu projeyi göster"
 
 #: clientgui/DlgEventLog.cpp:267
-#, fuzzy
 msgid "Copy &All"
-msgstr "Tümünü kopyala"
+msgstr "&Tümünü kopyala"
 
-#: clientgui/DlgEventLog.cpp:269
-#: clientgui/DlgEventLog.cpp:273
+#: clientgui/DlgEventLog.cpp:269 clientgui/DlgEventLog.cpp:273
 msgid "Copy all the messages to the clipboard."
 msgstr "Tüm mesajları panoya kopyalar."
 
 #: clientgui/DlgEventLog.cpp:278
-#, fuzzy
 msgid "Copy &Selected"
-msgstr "Seçili mesajları kopyala"
+msgstr "&Seçili mesajları kopyala"
 
-#: clientgui/DlgEventLog.cpp:281
-#: clientgui/DlgEventLog.cpp:289
-msgid "Copy the selected messages to the clipboard. You can select multiple messages by holding down the shift or command key while clicking on messages."
+#: clientgui/DlgEventLog.cpp:281 clientgui/DlgEventLog.cpp:289
+msgid ""
+"Copy the selected messages to the clipboard. You can select multiple "
+"messages by holding down the shift or command key while clicking on messages."
 msgstr ""
 "Seçili mesajları panoya kopyalar. Shift ya da komut düğmelerine basıp\n"
 "mesajların üzerine tıklayarak, çok sayıda mesajı seçebilirsiniz."
 
-#: clientgui/DlgEventLog.cpp:283
-#: clientgui/DlgEventLog.cpp:291
-msgid "Copy the selected messages to the clipboard. You can select multiple messages by holding down the shift or control key while clicking on messages."
+#: clientgui/DlgEventLog.cpp:283 clientgui/DlgEventLog.cpp:291
+msgid ""
+"Copy the selected messages to the clipboard. You can select multiple "
+"messages by holding down the shift or control key while clicking on messages."
 msgstr ""
 "Seçili mesajları panoya kopyalar. Shift ya da Ctrl düğmelerine basıp\n"
 "mesajların üzerine tıklayarak, çok sayıda mesajı seçebilirsiniz."
 
-#: clientgui/DlgEventLog.cpp:298
-#: clientgui/DlgItemProperties.cpp:66
+#: clientgui/DlgEventLog.cpp:298 clientgui/DlgItemProperties.cpp:66
 msgid "&Close"
 msgstr "&Kapat"
 
 #: clientgui/DlgEventLog.cpp:307
 #, c-format
 msgid "Get help with %s"
-msgstr "%s ile yardım al"
+msgstr "%s ile yardım alın"
 
 #: clientgui/DlgEventLog.cpp:321
-#, fuzzy
 msgid "Show all &messages"
-msgstr "Tüm mesajları göster"
+msgstr "&Tüm mesajları göster"
 
-#: clientgui/DlgEventLog.cpp:322
-#: clientgui/DlgEventLog.cpp:324
+#: clientgui/DlgEventLog.cpp:322 clientgui/DlgEventLog.cpp:324
 msgid "Show messages for all projects"
 msgstr "Tüm projelere ait mesajları gösterir."
 
-#: clientgui/DlgEventLog.cpp:328
-#: clientgui/DlgEventLog.cpp:330
+#: clientgui/DlgEventLog.cpp:328 clientgui/DlgEventLog.cpp:330
 msgid "Show only the messages for the selected project"
 msgstr ""
 "Yalnızca şu anda seçili projeye ait mesajları ve BOINC'in genel mesajlarını "
@@ -1689,10 +1679,15 @@ msgid ""
 "If you also want to stop running the tasks,\n"
 "choose from the following options:"
 msgstr ""
+"%s'dan çıkmak istediniz.\n"
+"Bu program, bilgisayarınızda çalışan bilimsel\n"
+"uygulamaları görmenizi ve yönetmenizi sağlar.\n"
+"\n"
+"Çıktığınızda bilimsel uygulamaların da kapanmasını\n"
+"istiyorsanız, aşağıdaki seçenekleri işaretleyin:"
 
 #: clientgui/DlgExitMessage.cpp:135
 #, c-format
-#, fuzzy, c-format
 msgid ""
 "This will shut down %s and its tasks until either the\n"
 "%s or the %s screen saver is run again.\n"
@@ -1701,25 +1696,24 @@ msgid ""
 "rather than to exit the application; that will allow %s to run its\n"
 "tasks at the times you selected in your preferences."
 msgstr ""
-"Bu işlem, %s'ı ve işlerini kapatır ve %s uygulaması\n"
-"ya da %s ekran koruyucu tekrar çalışana kadar kapalı kalır.\n"
+"Bu işlem, %s'ı ve işlerini kapatır. %s uygulaması\n"
+"ya da %s ekran koruyucusu tekrar çalışana kadar da kapalı kalır.\n"
 "\n"
 "Bir çok durumda sadece %s penceresini kapatmak,\n"
 "uygulamayı kapatmaktan iyidir. Böylece %s,\n"
-"iÅŸleri tercihlerinizde belirlediÄŸiniz zamanlarda\n"
-"çalıştırabilir."
+"işleri ve zamanlanmış görevleri tercihlerinizde belirlediğiniz\n"
+"şekilde çalıştırabilir."
 
 #: clientgui/DlgExitMessage.cpp:153
 #, c-format
 msgid "Stop running tasks when exiting the %s"
-msgstr ""
+msgstr "%s'dan çıkarken, çalışan bilimsel uygulamaları da durdur"
 
 #: clientgui/DlgExitMessage.cpp:165
 msgid "Remember this decision and do not show this dialog."
 msgstr "Seçimimi hatırla ve tekrar sorma"
 
-#: clientgui/DlgExitMessage.cpp:178
-#: clientgui/DlgGenericMessage.cpp:125
+#: clientgui/DlgExitMessage.cpp:178 clientgui/DlgGenericMessage.cpp:125
 msgid "&Cancel"
 msgstr "&Ä°ptal"
 
@@ -1727,41 +1721,34 @@ msgstr "&Ä°ptal"
 msgid "Don't show this dialog again."
 msgstr "Bu pencereyi tekrar gösterme."
 
-#: clientgui/DlgItemProperties.cpp:171
-#: clientgui/DlgItemProperties.cpp:174
-#: clientgui/DlgItemProperties.cpp:177
-#: clientgui/DlgItemProperties.cpp:180
-#, fuzzy
+#: clientgui/DlgItemProperties.cpp:171 clientgui/DlgItemProperties.cpp:174
+#: clientgui/DlgItemProperties.cpp:177 clientgui/DlgItemProperties.cpp:180
 msgid "Don't fetch tasks for "
-msgstr "CPU için yeni işler alınmayacak"
+msgstr "Bunun için işler indirme: "
 
 #: clientgui/DlgItemProperties.cpp:171
 msgid "Project preference"
 msgstr "Proje tercihleri"
 
 #: clientgui/DlgItemProperties.cpp:174
-#, fuzzy
 msgid "Account manager preference"
-msgstr "Hesap yöneticisi sitesi"
+msgstr "Hesap yöneticisi tercihi"
 
 #: clientgui/DlgItemProperties.cpp:177
-#, fuzzy
 msgid "Project has no apps for "
-msgstr "Proje Ä°nternet Siteleri"
+msgstr "Projenin bunun için uygulaması bulunmuyor: "
 
 #: clientgui/DlgItemProperties.cpp:180
 msgid "Client configuration excludes "
-msgstr ""
+msgstr "İstemci yapılandırma ayrıcalığı"
 
 #: clientgui/DlgItemProperties.cpp:184
-#, fuzzy
 msgid " work fetch deferred for"
-msgstr "CPU iÅŸ alma ertelendi"
+msgstr " iÅŸ alma ertelendi"
 
 #: clientgui/DlgItemProperties.cpp:185
-#, fuzzy
 msgid " work fetch deferral interval"
-msgstr "CPU iş alma erteleme aralığı"
+msgstr " iş alma erteleme aralığı"
 
 #: clientgui/DlgItemProperties.cpp:216
 msgid "Properties of project "
@@ -1807,14 +1794,10 @@ msgstr "Bilgisayar ID"
 msgid "Non CPU intensive"
 msgstr "CPU-yoÄŸun deÄŸil"
 
-#: clientgui/DlgItemProperties.cpp:237
-#: clientgui/DlgItemProperties.cpp:239
-#: clientgui/DlgItemProperties.cpp:240
-#: clientgui/DlgItemProperties.cpp:242
-#: clientgui/DlgItemProperties.cpp:245
-#: clientgui/DlgItemProperties.cpp:254
-#: clientgui/DlgItemProperties.cpp:257
-#: clientgui/DlgItemProperties.cpp:260
+#: clientgui/DlgItemProperties.cpp:237 clientgui/DlgItemProperties.cpp:239
+#: clientgui/DlgItemProperties.cpp:240 clientgui/DlgItemProperties.cpp:242
+#: clientgui/DlgItemProperties.cpp:245 clientgui/DlgItemProperties.cpp:254
+#: clientgui/DlgItemProperties.cpp:257 clientgui/DlgItemProperties.cpp:260
 msgid "yes"
 msgstr "evet"
 
@@ -1822,8 +1805,7 @@ msgstr "evet"
 msgid "Suspended via GUI"
 msgstr "Grafik arabirimi (GUI) ile durduruldu"
 
-#: clientgui/DlgItemProperties.cpp:239
-#: clientgui/DlgItemProperties.cpp:240
+#: clientgui/DlgItemProperties.cpp:239 clientgui/DlgItemProperties.cpp:240
 msgid "no"
 msgstr "hayır"
 
@@ -1837,10 +1819,9 @@ msgstr "Zamanlanmış çağrı sürmekte"
 
 #: clientgui/DlgItemProperties.cpp:245
 msgid "Trickle-up pending"
-msgstr ""
+msgstr "Ä°ÅŸ ilerleme kuyruÄŸu"
 
-#: clientgui/DlgItemProperties.cpp:248
-#: clientgui/DlgItemProperties.cpp:250
+#: clientgui/DlgItemProperties.cpp:248 clientgui/DlgItemProperties.cpp:250
 msgid "Host location"
 msgstr "Sunucu konumu"
 
@@ -1877,21 +1858,20 @@ msgid "Scheduling"
 msgstr "Zamanlama"
 
 #: clientgui/DlgItemProperties.cpp:280
-#, fuzzy
 msgid "Scheduling priority"
-msgstr "CPU zamanlama önceliği"
+msgstr "Zamanlama önceliği"
 
 #: clientgui/DlgItemProperties.cpp:281
 msgid "CPU"
-msgstr ""
+msgstr "CPU"
 
 #: clientgui/DlgItemProperties.cpp:283
 msgid "NVIDIA GPU"
-msgstr ""
+msgstr "NVIDIA GPU"
 
 #: clientgui/DlgItemProperties.cpp:286
 msgid "ATI GPU"
-msgstr ""
+msgstr "ATI GPU"
 
 #: clientgui/DlgItemProperties.cpp:288
 msgid "Duration correction factor"
@@ -1919,7 +1899,7 @@ msgstr "Alınma tarihi"
 
 #: clientgui/DlgItemProperties.cpp:319
 msgid "Report deadline"
-msgstr "Son teslim tarihi"
+msgstr "Son teslim zamanı"
 
 #: clientgui/DlgItemProperties.cpp:321
 msgid "Resources"
@@ -1927,19 +1907,17 @@ msgstr "Kullandığı kaynaklar"
 
 #: clientgui/DlgItemProperties.cpp:324
 msgid "Estimated computation size"
-msgstr ""
+msgstr "Tahmini hesaplama miktarı"
 
 #: clientgui/DlgItemProperties.cpp:327
 msgid "CPU time at last checkpoint"
 msgstr "Kontrol noktasındaki CPU zamanı"
 
-#: clientgui/DlgItemProperties.cpp:328
-#: clientgui/DlgItemProperties.cpp:343
+#: clientgui/DlgItemProperties.cpp:328 clientgui/DlgItemProperties.cpp:343
 msgid "CPU time"
 msgstr "CPU zamanı"
 
-#: clientgui/DlgItemProperties.cpp:330
-#: clientgui/DlgItemProperties.cpp:344
+#: clientgui/DlgItemProperties.cpp:330 clientgui/DlgItemProperties.cpp:344
 msgid "Elapsed time"
 msgstr "Geçen süre"
 
@@ -1971,10 +1949,9 @@ msgstr "Ä°ÅŸlem ID"
 msgid "Local: "
 msgstr "Yerel:"
 
-#: clientgui/DlgOptions.cpp:115
-#: clientgui/DlgOptions.cpp:121
+#: clientgui/DlgOptions.cpp:115 clientgui/DlgOptions.cpp:121
 msgid "Options"
-msgstr ""
+msgstr "Tercihler"
 
 #: clientgui/DlgOptions.cpp:161
 msgid "Language:"
@@ -1991,7 +1968,7 @@ msgstr "Bildirim hatırlatma sıklığı:"
 #: clientgui/DlgOptions.cpp:179
 msgid "How often should BOINC remind you of new notices?"
 msgstr ""
-"BOINC Manager'ın, yeni bildirimler olduğunu size kaç dakikada bir "
+"BOINC Manager'ın, yeni bildirimler olduğunu size ne kadar sürede bir "
 "hatırlatmasını istediğinizi belirleyin."
 
 #: clientgui/DlgOptions.cpp:184
@@ -2042,39 +2019,30 @@ msgstr "HTTP vekil sunucu (proxy) aracılığıyla bağlan"
 msgid "HTTP Proxy Server Configuration"
 msgstr "HTTP Vekil Sunucu Yapılandırması"
 
-#: clientgui/DlgOptions.cpp:266
-#: clientgui/DlgOptions.cpp:330
+#: clientgui/DlgOptions.cpp:266 clientgui/DlgOptions.cpp:330
 msgid "Address:"
 msgstr "Adres:"
 
-#: clientgui/DlgOptions.cpp:274
-#: clientgui/DlgOptions.cpp:338
-#: clientgui/ProxyPage.cpp:340
-#: clientgui/ProxyPage.cpp:360
+#: clientgui/DlgOptions.cpp:274 clientgui/DlgOptions.cpp:338
+#: clientgui/ProxyPage.cpp:340 clientgui/ProxyPage.cpp:360
 msgid "Port:"
 msgstr "Bağlantı noktası:"
 
-#: clientgui/DlgOptions.cpp:282
-#: clientgui/DlgOptions.cpp:346
+#: clientgui/DlgOptions.cpp:282 clientgui/DlgOptions.cpp:346
 msgid "Don't use proxy for:"
 msgstr "Burası için vekil sunucu kullanma:"
 
-#: clientgui/DlgOptions.cpp:289
-#: clientgui/DlgOptions.cpp:353
+#: clientgui/DlgOptions.cpp:289 clientgui/DlgOptions.cpp:353
 msgid "Leave these blank if not needed"
 msgstr "Gerekli değilse bu bölümü boş bırakın"
 
-#: clientgui/DlgOptions.cpp:295
-#: clientgui/DlgOptions.cpp:359
-#: clientgui/ProxyPage.cpp:343
-#: clientgui/ProxyPage.cpp:363
+#: clientgui/DlgOptions.cpp:295 clientgui/DlgOptions.cpp:359
+#: clientgui/ProxyPage.cpp:343 clientgui/ProxyPage.cpp:363
 msgid "User Name:"
 msgstr "Kullanıcı adı:"
 
-#: clientgui/DlgOptions.cpp:303
-#: clientgui/DlgOptions.cpp:367
-#: clientgui/DlgSelectComputer.cpp:151
-#: clientgui/ProxyPage.cpp:346
+#: clientgui/DlgOptions.cpp:303 clientgui/DlgOptions.cpp:367
+#: clientgui/DlgSelectComputer.cpp:151 clientgui/ProxyPage.cpp:346
 #: clientgui/ProxyPage.cpp:366
 msgid "Password:"
 msgstr "Parola:"
@@ -2126,7 +2094,9 @@ msgstr "%s - Dil Seçimi"
 
 #: clientgui/DlgOptions.cpp:681
 #, c-format
-msgid "The %s's default language has been changed, in order for this change to take affect you must restart the %s."
+msgid ""
+"The %s's default language has been changed, in order for this change to take "
+"affect you must restart the %s."
 msgstr ""
 "%s'ın varsayılan dili değişti.\n"
 "Değişikliğin etkili olması için %s yeniden başlatılmalı."
@@ -2149,8 +2119,7 @@ msgstr ""
 msgid "Host name:"
 msgstr "Sunucu adı:"
 
-#: clientgui/Localization.cpp:31
-#: clientgui/Localization.cpp:69
+#: clientgui/Localization.cpp:31 clientgui/Localization.cpp:69
 msgid "Message boards"
 msgstr "Forum sayfaları"
 
@@ -2163,15 +2132,12 @@ msgstr ""
 msgid "Ask questions and report problems"
 msgstr "Sorular sorun ve problemleri bildirin"
 
-#: clientgui/Localization.cpp:39
-#: clientgui/Localization.cpp:81
-#: clientgui/Localization.cpp:111
-#: clientgui/Localization.cpp:129
+#: clientgui/Localization.cpp:39 clientgui/Localization.cpp:81
+#: clientgui/Localization.cpp:111 clientgui/Localization.cpp:129
 msgid "Your account"
 msgstr "Hesabınız"
 
-#: clientgui/Localization.cpp:41
-#: clientgui/Localization.cpp:87
+#: clientgui/Localization.cpp:41 clientgui/Localization.cpp:87
 #: clientgui/Localization.cpp:113
 msgid "View your account information and credit totals"
 msgstr "Hesap bilgilerinizi ve toplam kredinizi görüntüleyin"
@@ -2184,20 +2150,17 @@ msgstr "Tercihleriniz"
 msgid "View and modify your SETI at home account profile and preferences"
 msgstr "SETI at home hesap profili ve tercihlerini görüp değiştirin"
 
-#: clientgui/Localization.cpp:47
-#: clientgui/Localization.cpp:89
+#: clientgui/Localization.cpp:47 clientgui/Localization.cpp:89
 msgid "Your results"
 msgstr "Sonuçlarınız"
 
-#: clientgui/Localization.cpp:49
-#: clientgui/Localization.cpp:91
+#: clientgui/Localization.cpp:49 clientgui/Localization.cpp:91
 msgid "View your last week (or more) of computational results and work"
 msgstr ""
 "Son haftaya ait (ya da daha eski) hesaplama sonuçlarınızı ve işlerinizi "
 "görüntüleyin"
 
-#: clientgui/Localization.cpp:51
-#: clientgui/Localization.cpp:93
+#: clientgui/Localization.cpp:51 clientgui/Localization.cpp:93
 msgid "Your computers"
 msgstr "Bilgisayarlarınız"
 
@@ -2205,13 +2168,11 @@ msgstr "Bilgisayarlarınız"
 msgid "View a listing of all the computers on which you are running SETI at Home"
 msgstr "SETI at Home çalıştırdığınız tüm bilgisayarların listesini görün"
 
-#: clientgui/Localization.cpp:55
-#: clientgui/Localization.cpp:97
+#: clientgui/Localization.cpp:55 clientgui/Localization.cpp:97
 msgid "Your team"
 msgstr "Takımınız"
 
-#: clientgui/Localization.cpp:57
-#: clientgui/Localization.cpp:99
+#: clientgui/Localization.cpp:57 clientgui/Localization.cpp:99
 msgid "View information about your team"
 msgstr "Takımınız hakkındaki bilgileri görüntüleyin"
 
@@ -2232,7 +2193,8 @@ msgid "Read a detailed description of the Einstein at Home screensaver"
 msgstr "Einstein at Home ekran koruyucusunun detaylı açıklamalarını okuyun"
 
 #: clientgui/Localization.cpp:71
-msgid "Correspond with admins and other users on the Einstein at Home message boards"
+msgid ""
+"Correspond with admins and other users on the Einstein at Home message boards"
 msgstr ""
 "Yöneticiler ve başka kullanıcılarla Einstein at Home forumlarında mesajlaşın"
 
@@ -2261,7 +2223,8 @@ msgid "Account summary"
 msgstr "Hesap özeti"
 
 #: clientgui/Localization.cpp:95
-msgid "View a listing of all the computers on which you are running Einstein at Home"
+msgid ""
+"View a listing of all the computers on which you are running Einstein at Home"
 msgstr "Einstein at Home çalıştırdığınız tüm bilgisayarların bir listesini görün"
 
 #: clientgui/Localization.cpp:101
@@ -2269,7 +2232,9 @@ msgid "LIGO project"
 msgstr "LIGO projesi"
 
 #: clientgui/Localization.cpp:103
-msgid "The home page of the Laser Interferometer Gravitational-wave Observatory (LIGO) project"
+msgid ""
+"The home page of the Laser Interferometer Gravitational-wave Observatory "
+"(LIGO) project"
 msgstr ""
 "Laser Interferometer Gravitational-wave Observatory (LIGO) projesinin ana "
 "sayfası"
@@ -2282,8 +2247,7 @@ msgstr "GEO-600 projesi"
 msgid "The home page of the GEO-600 project"
 msgstr "GEO-600 projesinin ana sayfası"
 
-#: clientgui/Localization.cpp:115
-#: clientgui/Localization.cpp:133
+#: clientgui/Localization.cpp:115 clientgui/Localization.cpp:133
 msgid "Team"
 msgstr "Takım"
 
@@ -2305,7 +2269,7 @@ msgstr "climateprediction.net Haberleri"
 
 #: clientgui/Localization.cpp:131
 msgid "View your account information, credits, and trickles"
-msgstr "Hesap bilgilerinizi, kredilerinizi ve trickle'ları görün"
+msgstr "Hesap bilgilerinizi, kredilerinizi ve iş ilerleme raporlarını görün"
 
 #: clientgui/Localization.cpp:135
 msgid "Info about your team"
@@ -2361,13 +2325,16 @@ msgid "Retrieving system state; please wait..."
 msgstr "Sistem durum bilgisi alınıyor; lütfen bekleyin..."
 
 #: clientgui/MainDocument.cpp:1792
-#, fuzzy
 msgid "Missing application"
-msgstr "Uygulama"
+msgstr "Uygulama bulunamadı"
 
 #: clientgui/MainDocument.cpp:1793
-msgid "Please download and install the CoRD application from http://cord.sourceforge.net"
+msgid ""
+"Please download and install the CoRD application from http://cord."
+"sourceforge.net"
 msgstr ""
+"Lütfen CoRD uygulamasını buradan indirin ve kurun: http://cord.sourceforge."
+"net"
 
 #: clientgui/MainDocument.cpp:2390
 msgid "on batteries"
@@ -2415,7 +2382,7 @@ msgstr "ağ kullanım kotası doldu"
 
 #: clientgui/MainDocument.cpp:2401
 msgid "requested by operating system"
-msgstr ""
+msgstr "işletim sistemi tarafından istendi"
 
 #: clientgui/MainDocument.cpp:2403
 msgid "unknown reason"
@@ -2437,8 +2404,7 @@ msgstr "İndirme başarısız"
 msgid "Downloading"
 msgstr "Ä°ndiriliyor"
 
-#: clientgui/MainDocument.cpp:2435
-#: clientgui/MainDocument.cpp:2499
+#: clientgui/MainDocument.cpp:2435 clientgui/MainDocument.cpp:2499
 msgid " (suspended - "
 msgstr " (durakladı - "
 
@@ -2478,23 +2444,21 @@ msgstr " (CPU-yoÄŸun-deÄŸil)"
 msgid "Waiting to run"
 msgstr "Çalışmayı bekliyor"
 
-#: clientgui/MainDocument.cpp:2469
-#: clientgui/MainDocument.cpp:2475
+#: clientgui/MainDocument.cpp:2469 clientgui/MainDocument.cpp:2475
 msgid "Ready to start"
 msgstr "Başlamaya hazır"
 
 #: clientgui/MainDocument.cpp:2479
 msgid " (Scheduler wait: "
-msgstr ""
+msgstr " (Zamanlanmış bekleme: "
 
 #: clientgui/MainDocument.cpp:2483
 msgid " (Scheduler wait)"
-msgstr ""
+msgstr " (Zamanlanmış bekleme)"
 
 #: clientgui/MainDocument.cpp:2487
-#, fuzzy
 msgid " (Waiting for network access)"
-msgstr "Bellek için bekleniyor"
+msgstr " (Ağ erişimi için bekleniyor)"
 
 #: clientgui/MainDocument.cpp:2491
 msgid "Computation error"
@@ -2518,7 +2482,7 @@ msgstr "Proje tarafından iptal edildi"
 
 #: clientgui/MainDocument.cpp:2514
 msgid "Aborted: not started by deadline"
-msgstr "İptal edildi: Son teslim tarihi nedeniyle başlamadı"
+msgstr "İptal edildi: Son teslim zamanı nedeniyle başlamadı"
 
 #: clientgui/MainDocument.cpp:2517
 msgid "Aborted"
@@ -2600,8 +2564,7 @@ msgstr "%s; alınma %s"
 msgid "%s; received from %s; on %s"
 msgstr "%s; %s kaynağından; alınma %s"
 
-#: clientgui/NoticeListCtrl.cpp:271
-#: clientgui/ProjectListCtrl.cpp:283
+#: clientgui/NoticeListCtrl.cpp:271 clientgui/ProjectListCtrl.cpp:283
 msgid "Click"
 msgstr "Tıkla"
 
@@ -2613,11 +2576,10 @@ msgstr "Şu anda görüntülenecek bildirim yok."
 msgid "more..."
 msgstr "fazlası..."
 
-#: clientgui/ProjectInfoPage.cpp:451
-#: clientgui/ProjectInfoPage.cpp:734
+#: clientgui/ProjectInfoPage.cpp:451 clientgui/ProjectInfoPage.cpp:734
 #: clientgui/ProjectInfoPage.cpp:738
 msgid "All"
-msgstr ""
+msgstr "Tümü"
 
 #: clientgui/ProjectInfoPage.cpp:576
 msgid "Choose a project"
@@ -2629,41 +2591,40 @@ msgstr "Bir proje seçmek için, ismine tıklayın ya da aşağıya adresini gir
 
 #: clientgui/ProjectInfoPage.cpp:584
 msgid "Categories:"
-msgstr ""
+msgstr "Kategoriler:"
 
 #: clientgui/ProjectInfoPage.cpp:588
-#, fuzzy
 msgid "Projects:"
-msgstr "Projeler"
+msgstr "Projeler:"
 
 #: clientgui/ProjectInfoPage.cpp:592
 msgid "Project details"
-msgstr ""
+msgstr "Proje detayları"
 
 #: clientgui/ProjectInfoPage.cpp:596
 msgid "Research area:"
-msgstr ""
+msgstr "Araştırma alanı:"
 
 #: clientgui/ProjectInfoPage.cpp:600
 msgid "Organization:"
-msgstr ""
+msgstr "Organizasyon:"
 
 #: clientgui/ProjectInfoPage.cpp:604
-#, fuzzy
 msgid "Web site:"
-msgstr "Ä°nternet siteleri"
+msgstr "Ä°nternet sitesi:"
 
 #: clientgui/ProjectInfoPage.cpp:608
 msgid "Supported systems:"
-msgstr ""
+msgstr "Desteklenen iÅŸletim sistemleri:"
 
 #: clientgui/ProjectInfoPage.cpp:612
-#, fuzzy
 msgid "Project URL:"
-msgstr "Proje &adresi:"
+msgstr "Proje adresi:"
 
 #: clientgui/ProjectInfoPage.cpp:782
-msgid "This project may not have work for your type of computer.  Do you want to add it anyway?"
+msgid ""
+"This project may not have work for your type of computer.  Do you want to "
+"add it anyway?"
 msgstr ""
 "Bu proje bilgisayarınızın özelliklerine uygun işe sahip olmayabilir.  Yine "
 "de eklemek istediÄŸinize emin misiniz?"
@@ -2785,8 +2746,7 @@ msgstr "Proxy yapılandırması"
 msgid "HTTP proxy"
 msgstr "HTTP proxy"
 
-#: clientgui/ProxyPage.cpp:337
-#: clientgui/ProxyPage.cpp:357
+#: clientgui/ProxyPage.cpp:337 clientgui/ProxyPage.cpp:357
 msgid "Server:"
 msgstr "Sunucu:"
 
@@ -2808,11 +2768,11 @@ msgstr "Gelişmiş grafiksel arayüzü görüntüler."
 
 #: clientgui/sg_BoincSimpleFrame.cpp:142
 msgid "Skin"
-msgstr "Kaplama"
+msgstr "Görünüm"
 
 #: clientgui/sg_BoincSimpleFrame.cpp:144
 msgid "Select the appearance of the user interface."
-msgstr ""
+msgstr "Kullanıcı arayüzünün görünümünü seçin."
 
 #: clientgui/sg_BoincSimpleFrame.cpp:191
 #, c-format
@@ -2820,21 +2780,20 @@ msgid "&%s"
 msgstr "&%s"
 
 #: clientgui/sg_BoincSimpleFrame.cpp:358
-#, fuzzy
 msgid "Default"
-msgstr "varsayılan"
+msgstr "Varsayılan"
 
 #: clientgui/sg_BoincSimpleFrame.cpp:709
 msgid "Suspend"
-msgstr "Durdur"
+msgstr "Duraklat"
 
 #: clientgui/sg_BoincSimpleFrame.cpp:711
 msgid "Suspend Computing"
-msgstr ""
+msgstr "Hesaplamayı duraklatır"
 
 #: clientgui/sg_BoincSimpleFrame.cpp:712
 msgid "Resume Computing"
-msgstr ""
+msgstr "Hesaplamayı sürdürür"
 
 #: clientgui/sg_BoincSimpleFrame.cpp:728
 msgid "Notices"
@@ -2842,76 +2801,63 @@ msgstr "Bildirimler"
 
 #: clientgui/sg_BoincSimpleFrame.cpp:729
 msgid "Open a window to view notices from projects or BOINC"
-msgstr "Projeler ya da BOINC'ten bildirimleri görmek için bir pencere açar."
+msgstr "Projelerden ya da BOINC'ten gelen bildirimleri gösterir"
 
 #: clientgui/sg_BoincSimpleGUI.cpp:120
 msgid "Display the advanced (accessible) graphical interface."
 msgstr "Gelişmiş (erişilebilir) grafiksel arayüzü görüntüler."
 
-#: clientgui/sg_ClientStateIndicator.cpp:288
-#: clientgui/sg_TaskPanel.cpp:1191
+#: clientgui/sg_ClientStateIndicator.cpp:288 clientgui/sg_TaskPanel.cpp:1191
 msgid "Retrieving current status."
 msgstr "Mevcut durum bilgisi alınıyor..."
 
-#: clientgui/sg_ClientStateIndicator.cpp:291
-#: clientgui/sg_TaskPanel.cpp:443
+#: clientgui/sg_ClientStateIndicator.cpp:291 clientgui/sg_TaskPanel.cpp:443
 msgid "You don't have any projects.  Please Add a Project."
 msgstr "Katıldığınız bir proje bulunmuyor.  Lütfen bir proje ekleyin."
 
-#: clientgui/sg_ClientStateIndicator.cpp:294
-#: clientgui/sg_TaskPanel.cpp:1197
+#: clientgui/sg_ClientStateIndicator.cpp:294 clientgui/sg_TaskPanel.cpp:1197
 msgid "Downloading work from the server."
 msgstr "Ä°ÅŸ sunucudan indiriliyor"
 
-#: clientgui/sg_ClientStateIndicator.cpp:299
-#: clientgui/sg_TaskPanel.cpp:1202
+#: clientgui/sg_ClientStateIndicator.cpp:299 clientgui/sg_TaskPanel.cpp:1202
 msgid "Processing Suspended:  Running On Batteries."
 msgstr "Çalışma Durdu:  Pil Gücünde Çalışıyor."
 
-#: clientgui/sg_ClientStateIndicator.cpp:301
-#: clientgui/sg_TaskPanel.cpp:1204
+#: clientgui/sg_ClientStateIndicator.cpp:301 clientgui/sg_TaskPanel.cpp:1204
 msgid "Processing Suspended:  User Active."
 msgstr "Çalışma Durdu:  Kullanıcı Faal."
 
-#: clientgui/sg_ClientStateIndicator.cpp:303
-#: clientgui/sg_TaskPanel.cpp:1206
+#: clientgui/sg_ClientStateIndicator.cpp:303 clientgui/sg_TaskPanel.cpp:1206
 msgid "Processing Suspended:  User paused processing."
 msgstr "Çalışma Durdu:  Kullanıcı Çalışmayı Duraklattı."
 
-#: clientgui/sg_ClientStateIndicator.cpp:305
-#: clientgui/sg_TaskPanel.cpp:1208
+#: clientgui/sg_ClientStateIndicator.cpp:305 clientgui/sg_TaskPanel.cpp:1208
 msgid "Processing Suspended:  Time of Day."
 msgstr "Çalışma Durdu:  Günlük Zamanlama"
 
-#: clientgui/sg_ClientStateIndicator.cpp:307
-#: clientgui/sg_TaskPanel.cpp:1210
+#: clientgui/sg_ClientStateIndicator.cpp:307 clientgui/sg_TaskPanel.cpp:1210
 msgid "Processing Suspended:  Benchmarks Running."
 msgstr "Çalışma Durdu:  Testler Çalışıyor."
 
-#: clientgui/sg_ClientStateIndicator.cpp:309
-#: clientgui/sg_TaskPanel.cpp:1212
+#: clientgui/sg_ClientStateIndicator.cpp:309 clientgui/sg_TaskPanel.cpp:1212
 msgid "Processing Suspended."
 msgstr "Çalışma Durdu."
 
-#: clientgui/sg_ClientStateIndicator.cpp:313
-#: clientgui/sg_TaskPanel.cpp:1216
+#: clientgui/sg_ClientStateIndicator.cpp:313 clientgui/sg_TaskPanel.cpp:1216
 msgid "Waiting to contact project servers."
 msgstr "Proje sunucularına bağlanılması için bekleniyor."
 
 #: clientgui/sg_ClientStateIndicator.cpp:317
-#: clientgui/sg_ClientStateIndicator.cpp:325
-#: clientgui/sg_TaskPanel.cpp:1220
+#: clientgui/sg_ClientStateIndicator.cpp:325 clientgui/sg_TaskPanel.cpp:1220
 #: clientgui/sg_TaskPanel.cpp:1229
 msgid "Retrieving current status"
 msgstr "Mevcut durum bilgisi alınıyor"
 
-#: clientgui/sg_ClientStateIndicator.cpp:320
-#: clientgui/sg_TaskPanel.cpp:1224
+#: clientgui/sg_ClientStateIndicator.cpp:320 clientgui/sg_TaskPanel.cpp:1224
 msgid "No work available to process"
 msgstr "Çalıştırılacak iş bulunmuyor"
 
-#: clientgui/sg_ClientStateIndicator.cpp:322
-#: clientgui/sg_TaskPanel.cpp:1226
+#: clientgui/sg_ClientStateIndicator.cpp:322 clientgui/sg_TaskPanel.cpp:1226
 msgid "Unable to connect to the core client"
 msgstr "Çekirdek istemciyle bağlantı kurulamadı"
 
@@ -2921,9 +2867,8 @@ msgstr "Kapat"
 
 #: clientgui/sg_DlgMessages.cpp:332
 #, c-format
-#, fuzzy, c-format
 msgid "%s - Notices"
-msgstr "%s Bildirimleri"
+msgstr "%s  - Bildirimler"
 
 #: clientgui/sg_DlgPreferences.cpp:94
 msgid "100 MB"
@@ -3035,23 +2980,23 @@ msgstr "60"
 
 #: clientgui/sg_DlgPreferences.cpp:282
 msgid "This dialog controls preferences for this computer only."
-msgstr ""
+msgstr "Bu pencere, tercihleri yalnızca bu bilgisayar için özelleştirir."
 
 #: clientgui/sg_DlgPreferences.cpp:287
 msgid "Click OK to set preferences."
-msgstr ""
+msgstr "Tercihlerinizi kaydetmek için 'Tamam'ı tıklayın."
 
 #: clientgui/sg_DlgPreferences.cpp:292
 msgid "Click Clear to restore web-based settings."
-msgstr ""
+msgstr "İnternet tabanlı ayarlarınıza dönmek için 'Temizle'yi tıklayın."
 
 #: clientgui/sg_DlgPreferences.cpp:299
 msgid "For additional settings, select Computing Preferences in "
-msgstr ""
+msgstr "Ek tercih seçenekleri için, 'Gelişmiş görünüm'e geçiş yapın ve "
 
 #: clientgui/sg_DlgPreferences.cpp:304
 msgid "the Advanced View."
-msgstr ""
+msgstr "menüden 'Hesaplama tercihleri'ni seçin."
 
 #: clientgui/sg_DlgPreferences.cpp:332
 msgid "Do work only between:"
@@ -3061,8 +3006,7 @@ msgstr "Yalnızca bu saatler arasında çalıştır:"
 msgid "Connect to internet only between:"
 msgstr "Bu saatler arasında internete bağlan:"
 
-#: clientgui/sg_DlgPreferences.cpp:376
-#: clientgui/sg_DlgPreferences.cpp:393
+#: clientgui/sg_DlgPreferences.cpp:376 clientgui/sg_DlgPreferences.cpp:393
 msgid "Use no more than:"
 msgstr "En çok bu kadar kullan:"
 
@@ -3082,14 +3026,10 @@ msgstr "Pil gücündeyken işleri çalıştır?"
 msgid "Do work after idle for:"
 msgstr "Bu kadar süre boşta kaldığında çalıştır:"
 
-#: clientgui/sg_DlgPreferences.cpp:621
-#: clientgui/sg_DlgPreferences.cpp:624
-#: clientgui/sg_DlgPreferences.cpp:683
-#: clientgui/sg_DlgPreferences.cpp:687
-#: clientgui/sg_DlgPreferences.cpp:699
-#: clientgui/sg_DlgPreferences.cpp:703
-#: clientgui/sg_DlgPreferences.cpp:846
-#: clientgui/sg_DlgPreferences.cpp:857
+#: clientgui/sg_DlgPreferences.cpp:621 clientgui/sg_DlgPreferences.cpp:624
+#: clientgui/sg_DlgPreferences.cpp:683 clientgui/sg_DlgPreferences.cpp:687
+#: clientgui/sg_DlgPreferences.cpp:699 clientgui/sg_DlgPreferences.cpp:703
+#: clientgui/sg_DlgPreferences.cpp:846 clientgui/sg_DlgPreferences.cpp:857
 msgid "Anytime"
 msgstr "Herhangi"
 
@@ -3118,9 +3058,8 @@ msgid "%d"
 msgstr "%d"
 
 #: clientgui/sg_DlgPreferences.cpp:1031
-#, fuzzy
 msgid "Do you really want to clear all local preferences?\n"
-msgstr "Tüm yerel tercihleri kaldırmak istediğinize emin misiniz?"
+msgstr "Tüm yerel tercihlerinizi kaldırmak istediğinize emin misiniz?\n"
 
 #: clientgui/sg_ImageButton.cpp:90
 msgid "Paused: Other work running"
@@ -3163,7 +3102,9 @@ msgid "Update"
 msgstr "Güncelle"
 
 #: clientgui/sg_ProjectCommandPopup.cpp:62
-msgid "Report all completed tasks, get latest credit, get latest preferences, and possibly get more tasks."
+msgid ""
+"Report all completed tasks, get latest credit, get latest preferences, and "
+"possibly get more tasks."
 msgstr ""
 "Tamamlanan işleri raporlar, güncel kredi bigilerini ve tercih ayarlarını "
 "alır ve gerekiyorsa daha fazla iş indirir."
@@ -3187,14 +3128,18 @@ msgid "Reset project"
 msgstr "Projeyi sıfırla"
 
 #: clientgui/sg_ProjectCommandPopup.cpp:80
-msgid "Delete all files and tasks associated with this project, and get new tasks.  You can update the project first to report any completed tasks."
+msgid ""
+"Delete all files and tasks associated with this project, and get new tasks.  "
+"You can update the project first to report any completed tasks."
 msgstr ""
 "Bu projeye ilişkin tüm dosyalar ile işleri siler ve yeni işler alır.  "
 "Tamamlanmış işler varsa sonuçları raporlamak için önce projeyi "
 "güncelleyebilirsiniz."
 
 #: clientgui/sg_ProjectCommandPopup.cpp:86
-msgid "Remove this project.  Tasks in progress will be lost (use 'Update' first to report any completed tasks)."
+msgid ""
+"Remove this project.  Tasks in progress will be lost (use 'Update' first to "
+"report any completed tasks)."
 msgstr ""
 "Bu bilgisayardan bu projeyi kaldırır.  Sürmekte olan işler kaybedilir "
 "(tamamlanmış işlerin sonuçlarını göndermek için önce 'Güncelle' komutunu "
@@ -3241,8 +3186,7 @@ msgid "Are you sure you want to remove project '%s'?"
 msgstr "'%s' projesini kaldırmak istediğinize emin misiniz?"
 
 #: clientgui/sg_ProjectCommandPopup.cpp:257
-#: clientgui/sg_StatImageLoader.cpp:138
-#: clientgui/sg_StatImageLoader.cpp:198
+#: clientgui/sg_StatImageLoader.cpp:138 clientgui/sg_StatImageLoader.cpp:198
 msgid "Remove Project"
 msgstr "Projeyi Kaldır"
 
@@ -3256,10 +3200,9 @@ msgstr "EÅŸitle"
 
 #: clientgui/sg_ProjectPanel.cpp:74
 msgid "Work done for this project"
-msgstr ""
+msgstr "Bu projede elde ettiÄŸiniz toplam kredi"
 
-#: clientgui/sg_ProjectPanel.cpp:77
-#: clientgui/sg_ProjectsComponent.cpp:123
+#: clientgui/sg_ProjectPanel.cpp:77 clientgui/sg_ProjectsComponent.cpp:123
 msgid "Synchronize projects with account manager system"
 msgstr "Projeleri hesap yöneticisi sistemiyle senkronize eder"
 
@@ -3267,17 +3210,14 @@ msgstr "Projeleri hesap yöneticisi sistemiyle senkronize eder"
 msgid "Select a project to access with the controls below"
 msgstr "Aşağıdaki kontrollere erişimek için bir proje seçin"
 
-#: clientgui/sg_ProjectPanel.cpp:134
-#: clientgui/sg_ProjectPanel.cpp:262
+#: clientgui/sg_ProjectPanel.cpp:134 clientgui/sg_ProjectPanel.cpp:262
 #, c-format
-#, fuzzy, c-format
 msgid "%s: %.0f"
 msgstr "%s: %0.2f"
 
 #: clientgui/sg_ProjectPanel.cpp:145
-#, fuzzy
 msgid "Project Web Pages"
-msgstr "Proje Ä°nternet Siteleri"
+msgstr "Proje İnternet Sayfaları"
 
 #: clientgui/sg_ProjectPanel.cpp:149
 msgid "Project Commands"
@@ -3374,18 +3314,16 @@ msgid "Not available"
 msgstr "Mevcut deÄŸil"
 
 #: clientgui/sg_TaskPanel.cpp:455
-#, fuzzy
 msgid "Tasks:"
-msgstr "Ä°ÅŸler"
+msgstr "Ä°ÅŸler:"
 
 #: clientgui/sg_TaskPanel.cpp:461
 msgid "Select a task to access"
 msgstr "Erişim için bir iş seçin"
 
 #: clientgui/sg_TaskPanel.cpp:472
-#, fuzzy
 msgid "From:"
-msgstr "Kaynak"
+msgstr "Sahibi:"
 
 #: clientgui/sg_TaskPanel.cpp:526
 msgid "This task's progress"
@@ -3407,7 +3345,7 @@ msgstr "Uygulama: %s"
 #: clientgui/sg_TaskPanel.cpp:701
 #, c-format
 msgid "%.3f%%"
-msgstr ""
+msgstr "%%%.3f"
 
 #: clientgui/sg_TaskPanel.cpp:709
 msgid "Application: Not available"
@@ -3420,21 +3358,19 @@ msgstr "Mevcut DeÄŸil"
 #: clientgui/sg_TaskPanel.cpp:825
 #, c-format
 msgid "Elapsed: %s"
-msgstr ""
+msgstr "Geçen süre: %s"
 
 #: clientgui/sg_TaskPanel.cpp:839
 #, c-format
-#, fuzzy, c-format
 msgid "Remaining (estimated): %s"
-msgstr "Kalan Süre: %s"
+msgstr "Kalan süre (tahmini): %s"
 
 #: clientgui/sg_TaskPanel.cpp:854
 #, c-format
 msgid "Status: %s"
 msgstr "Durum: %s"
 
-#: clientgui/sg_ViewTabPage.cpp:140
-#: clientgui/sg_ViewTabPage.cpp:280
+#: clientgui/sg_ViewTabPage.cpp:140 clientgui/sg_ViewTabPage.cpp:280
 #, c-format
 msgid "%.1lf"
 msgstr "%.1lf"
@@ -3452,8 +3388,7 @@ msgstr "Uzak bilgisayardaki grafikleri görüntülemek istediğinize emin misini
 msgid "Application: "
 msgstr "Uygulama: "
 
-#: clientgui/sg_ViewTabPage.cpp:449
-#: clientgui/sg_ViewTabPage.cpp:453
+#: clientgui/sg_ViewTabPage.cpp:449 clientgui/sg_ViewTabPage.cpp:453
 msgid "Time Remaining: "
 msgstr "Kalan süre: "
 
@@ -3513,8 +3448,7 @@ msgstr "Lütfen devam etmek için bir hesap anahtarı belirtin."
 msgid "Invalid Account Key; please enter a valid Account Key"
 msgstr "Geçersiz hesap anahtarı; lütfen geçerli bir hesap anahtarı girin."
 
-#: clientgui/ValidateAccountKey.cpp:82
-#: clientgui/ValidateEmailAddress.cpp:86
+#: clientgui/ValidateAccountKey.cpp:82 clientgui/ValidateEmailAddress.cpp:86
 msgid "Validation conflict"
 msgstr "DoÄŸrulama tutmuyor"
 
@@ -3540,17 +3474,13 @@ msgstr ""
 "Örneğin:\n"
 "http://www.ornek.com/"
 
-#: clientgui/ValidateURL.cpp:83
-#: clientgui/ValidateURL.cpp:87
-#: clientgui/ValidateURL.cpp:91
-#: clientgui/ValidateURL.cpp:103
-#: clientgui/ValidateURL.cpp:107
-#: clientgui/ValidateURL.cpp:110
+#: clientgui/ValidateURL.cpp:83 clientgui/ValidateURL.cpp:87
+#: clientgui/ValidateURL.cpp:91 clientgui/ValidateURL.cpp:103
+#: clientgui/ValidateURL.cpp:107 clientgui/ValidateURL.cpp:110
 msgid "Invalid URL"
 msgstr "Geçersiz adres"
 
-#: clientgui/ValidateURL.cpp:84
-#: clientgui/ValidateURL.cpp:88
+#: clientgui/ValidateURL.cpp:84 clientgui/ValidateURL.cpp:88
 #: clientgui/ValidateURL.cpp:92
 msgid ""
 "Please specify a valid URL.\n"
@@ -3561,8 +3491,7 @@ msgstr ""
 "Örneğin:\n"
 "http:/boincproject.ornek.com"
 
-#: clientgui/ValidateURL.cpp:104
-#: clientgui/ValidateURL.cpp:108
+#: clientgui/ValidateURL.cpp:104 clientgui/ValidateURL.cpp:108
 #, c-format
 msgid "'%s' does not contain a valid host name."
 msgstr "'%s' geçerli bir bilgisayar adı içermiyor."
@@ -3572,10 +3501,8 @@ msgstr "'%s' geçerli bir bilgisayar adı içermiyor."
 msgid "'%s' does not contain a valid path."
 msgstr "'%s' geçerli bir yol içermiyor."
 
-#: clientgui/ViewMessages.cpp:84
-#: clientgui/ViewProjects.cpp:169
-#: clientgui/ViewStatistics.cpp:1962
-#: clientgui/ViewTransfers.cpp:159
+#: clientgui/ViewMessages.cpp:84 clientgui/ViewProjects.cpp:169
+#: clientgui/ViewStatistics.cpp:1962 clientgui/ViewTransfers.cpp:159
 #: clientgui/ViewWork.cpp:182
 msgid "Commands"
 msgstr "Komutlar"
@@ -3588,13 +3515,11 @@ msgstr "Tüm mesajları kopyala"
 msgid "Copy selected messages"
 msgstr "Seçili mesajları kopyala"
 
-#: clientgui/ViewMessages.cpp:106
-#: clientgui/ViewMessages.cpp:502
+#: clientgui/ViewMessages.cpp:106 clientgui/ViewMessages.cpp:502
 msgid "Show only this project"
 msgstr "Yalnızca bu projeyi göster"
 
-#: clientgui/ViewMessages.cpp:107
-#: clientgui/ViewMessages.cpp:503
+#: clientgui/ViewMessages.cpp:107 clientgui/ViewMessages.cpp:503
 msgid "Show only the messages for the selected project."
 msgstr ""
 "Yalnızca şu anda seçili projeye ait mesajları ve BOINC'in genel mesajlarını "
@@ -3624,8 +3549,7 @@ msgstr "Tüm mesajları göster"
 msgid "Show messages for all projects."
 msgstr "Tüm projeler için mesajları gösterir."
 
-#: clientgui/ViewProjects.cpp:219
-#: clientgui/ViewStatistics.cpp:442
+#: clientgui/ViewProjects.cpp:219 clientgui/ViewStatistics.cpp:442
 msgid "Account"
 msgstr "Hesap"
 
@@ -3637,8 +3561,7 @@ msgstr "Kredi"
 msgid "Avg. work done"
 msgstr "Günlük ortalama kredi"
 
-#: clientgui/ViewProjects.cpp:224
-#: clientgui/ViewTransfers.cpp:187
+#: clientgui/ViewProjects.cpp:224 clientgui/ViewTransfers.cpp:187
 #: clientgui/ViewWork.cpp:233
 msgid "Status"
 msgstr "Durum"
@@ -3675,8 +3598,7 @@ msgstr "Proje sıfırlanıyor..."
 msgid "Removing project..."
 msgstr "Proje kaldırılıyor..."
 
-#: clientgui/ViewProjects.cpp:542
-#: clientgui/ViewWork.cpp:598
+#: clientgui/ViewProjects.cpp:542 clientgui/ViewWork.cpp:598
 msgid "Launching browser..."
 msgstr "Tarayıcı çalıştırılıyor..."
 
@@ -3849,13 +3771,11 @@ msgstr "&Sonraki proje >"
 msgid "Show chart for next project"
 msgstr "Sonraki proje için çizelge"
 
-#: clientgui/ViewStatistics.cpp:2010
-#: clientgui/ViewStatistics.cpp:2407
+#: clientgui/ViewStatistics.cpp:2010 clientgui/ViewStatistics.cpp:2407
 msgid "Hide project list"
 msgstr "Proje listesini gizle"
 
-#: clientgui/ViewStatistics.cpp:2011
-#: clientgui/ViewStatistics.cpp:2407
+#: clientgui/ViewStatistics.cpp:2011 clientgui/ViewStatistics.cpp:2407
 msgid "Use entire area for graphs"
 msgstr "Tüm alan grafikler için kullanılır"
 
@@ -3899,16 +3819,11 @@ msgstr "Tüm projelerin özetinin bulunduğu tek çizelge göster"
 msgid "Statistics"
 msgstr "Ä°statistikler"
 
-#: clientgui/ViewStatistics.cpp:2094
-#: clientgui/ViewStatistics.cpp:2115
-#: clientgui/ViewStatistics.cpp:2136
-#: clientgui/ViewStatistics.cpp:2158
-#: clientgui/ViewStatistics.cpp:2179
-#: clientgui/ViewStatistics.cpp:2200
-#: clientgui/ViewStatistics.cpp:2221
-#: clientgui/ViewStatistics.cpp:2242
-#: clientgui/ViewStatistics.cpp:2263
-#: clientgui/ViewStatistics.cpp:2287
+#: clientgui/ViewStatistics.cpp:2094 clientgui/ViewStatistics.cpp:2115
+#: clientgui/ViewStatistics.cpp:2136 clientgui/ViewStatistics.cpp:2158
+#: clientgui/ViewStatistics.cpp:2179 clientgui/ViewStatistics.cpp:2200
+#: clientgui/ViewStatistics.cpp:2221 clientgui/ViewStatistics.cpp:2242
+#: clientgui/ViewStatistics.cpp:2263 clientgui/ViewStatistics.cpp:2287
 msgid "Updating charts..."
 msgstr "Çizelgeler güncelleniyor..."
 
@@ -3933,7 +3848,9 @@ msgid "Abort Transfer"
 msgstr "Aktarımı iptal et"
 
 #: clientgui/ViewTransfers.cpp:171
-msgid "Click 'Abort transfer' to delete the file from the transfer queue. This will prevent you from being granted credit for this result."
+msgid ""
+"Click 'Abort transfer' to delete the file from the transfer queue. This will "
+"prevent you from being granted credit for this result."
 msgstr ""
 "Dosyayı aktarım kuyruğundan çıkarmayı sağlar.\n"
 "Bunu yapmak, sonuçtan kredi almanızı engelleyecektir."
@@ -3942,8 +3859,7 @@ msgstr ""
 msgid "File"
 msgstr "Dosya"
 
-#: clientgui/ViewTransfers.cpp:183
-#: clientgui/ViewWork.cpp:232
+#: clientgui/ViewTransfers.cpp:183 clientgui/ViewWork.cpp:232
 msgid "Progress"
 msgstr "Ä°lerleme"
 
@@ -4004,69 +3920,63 @@ msgstr "Dosya Aktarımını İptal Et"
 
 #: clientgui/ViewTransfers.cpp:769
 msgid "Upload"
-msgstr ""
+msgstr "Gönderme"
 
 #: clientgui/ViewTransfers.cpp:769
 msgid "Download"
-msgstr ""
+msgstr "Ä°ndirme"
 
 #: clientgui/ViewTransfers.cpp:773
-#, fuzzy
 msgid "retry in "
-msgstr "Yeniden denenecek "
+msgstr "yeniden denenecek "
 
 #: clientgui/ViewTransfers.cpp:775
 msgid "failed"
-msgstr ""
+msgstr "başarısız"
 
 #: clientgui/ViewTransfers.cpp:778
 msgid "suspended"
-msgstr ""
+msgstr "durakladı"
 
 #: clientgui/ViewTransfers.cpp:783
 msgid "active"
-msgstr ""
+msgstr "sürüyor"
 
 #: clientgui/ViewTransfers.cpp:785
 msgid "pending"
-msgstr ""
+msgstr "kuyrukta"
 
 #: clientgui/ViewTransfers.cpp:792
 msgid " (project backoff: "
 msgstr " (proje ertelendi: "
 
-#: clientgui/ViewWork.cpp:186
-#: clientgui/ViewWork.cpp:766
+#: clientgui/ViewWork.cpp:186 clientgui/ViewWork.cpp:766
 msgid "Show active tasks"
-msgstr "Faal işleri göster"
+msgstr "Süren işleri göster"
 
-#: clientgui/ViewWork.cpp:187
-#: clientgui/ViewWork.cpp:767
+#: clientgui/ViewWork.cpp:187 clientgui/ViewWork.cpp:767
 msgid "Show only active tasks."
 msgstr "Yalnızca çalışmakta olan işleri gösterir."
 
 #: clientgui/ViewWork.cpp:200
-#, fuzzy
 msgid "Show VM Console"
-msgstr "Bilgisayar toplamı"
+msgstr "VM Konsolu'nu görüntüle"
 
 #: clientgui/ViewWork.cpp:201
-#, fuzzy
 msgid "Show VM Console in a window."
-msgstr "Uygulama grafiklerini bir pencerede gösterir."
+msgstr "VM Konsolu'nu bir pencerede gösterir."
 
 #: clientgui/ViewWork.cpp:234
 msgid "Elapsed"
 msgstr "Geçen"
 
 #: clientgui/ViewWork.cpp:235
-#, fuzzy
 msgid "Remaining (estimated)"
-msgstr "Kalan"
+msgstr "Kalan (tahmini)"
 
 #: clientgui/ViewWork.cpp:236
 msgid "Deadline"
-msgstr "Son teslim tarihi"
+msgstr "Son teslim zamanı"
 
 #: clientgui/ViewWork.cpp:238
 msgid "Name"
@@ -4089,9 +3999,8 @@ msgid "Showing graphics for task..."
 msgstr "İşin grafikleri gösteriliyor..."
 
 #: clientgui/ViewWork.cpp:425
-#, fuzzy
 msgid "Showing VM console for task..."
-msgstr "İşin grafikleri gösteriliyor..."
+msgstr "İşin VM Konsolu gösteriliyor..."
 
 #: clientgui/ViewWork.cpp:478
 #, c-format
@@ -4157,7 +4066,8 @@ msgstr ""
 #: clientgui/WelcomePage.cpp:283
 msgid ""
 "You have chosen to add a new BOINC project.  Adding a new\n"
-"project means that you will be connecting your computer to a new organization.\n"
+"project means that you will be connecting your computer to a new "
+"organization.\n"
 "If this is what you wanted to do, please click on\n"
 "the 'Next' button below.\n"
 "\n"
@@ -4173,7 +4083,8 @@ msgstr ""
 "internet sitesine ve organizasyonuna baÄŸlanacak. EÄŸer istediÄŸiniz buysa,\n"
 "aşağıdaki 'İleri' butonuna basın.\n"
 "\n"
-"World Community Grid gibi bazı projeler, birden fazla araştırma uygulamasına\n"
+"World Community Grid gibi bazı projeler, birden fazla araştırma "
+"uygulamasına\n"
 "sahiptir. Eğer bilgisayarınıza gönderilen uygulamaları değiştirmek "
 "isterseniz,\n"
 "projenin Ä°nternet sitesini ziyaret etmeli ve buradaki tercihlerinizi "
@@ -4198,8 +4109,7 @@ msgstr "Ä°ptal etmek istediÄŸinize emin misiniz?"
 msgid "Question"
 msgstr "Soru"
 
-#: clientgui/wizardex.cpp:377
-#: clientgui/wizardex.cpp:553
+#: clientgui/wizardex.cpp:377 clientgui/wizardex.cpp:553
 msgid "&Next >"
 msgstr "&Ä°leri >"
 
@@ -4236,10 +4146,12 @@ msgid "Pie Ctrl"
 msgstr "Pie Ctrl"
 
 #: clientgui/mac/MacAccessiblity.cpp:257
-msgid "for accessibility support, please select advanced from the view menu or type command shift a"
+msgid ""
+"for accessibility support, please select advanced from the view menu or type "
+"command shift a"
 msgstr ""
-"erişilebilirlik desteği için, lütfen \"görünüm\" menüsünden \"gelişmiş\"i seçin "
-"ya da klavyeden komut+shift+a tuşlarına basın"
+"erişilebilirlik desteği için, lütfen \"görünüm\" menüsünden \"gelişmiş\"i "
+"seçin ya da klavyeden komut+shift+a tuşlarına basın"
 
 #: clientgui/mac/MacAccessiblity.cpp:302
 msgid "This panel contains graphs showing user totals for projects"
@@ -4288,8 +4200,7 @@ msgstr "; sütun %d/%d; "
 msgid "list is empty"
 msgstr "liste boÅŸ"
 
-#: clientgui/mac/MacAccessiblity.cpp:858
-#: clientgui/mac/MacAccessiblity.cpp:870
+#: clientgui/mac/MacAccessiblity.cpp:858 clientgui/mac/MacAccessiblity.cpp:870
 #, c-format
 msgid "; row %d; "
 msgstr "; sıra %d; "
@@ -4738,3 +4649,11 @@ msgstr "ağ kullanım saatlerini SS:DD-SS:DD formatına göre belirleyin"
 
 #~ msgid "Add account manager"
 #~ msgstr "Hesap yöneticisi ekle"
+
+#, fuzzy
+#~ msgid " is empty"
+#~ msgstr "liste boÅŸ"
+
+#, fuzzy
+#~ msgid "of %d; "
+#~ msgstr "taneden %d"
diff --git a/locale/tr/BOINC-Project-Generic.po b/locale/tr/BOINC-Project-Generic.po
index 83286e0..7113b38 100644
--- a/locale/tr/BOINC-Project-Generic.po
+++ b/locale/tr/BOINC-Project-Generic.po
@@ -6,16 +6,15 @@ msgstr ""
 "Project-Id-Version: BOINC Project Generic\n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at boinc.berkeley.edu>\n"
 "POT-Creation-Date: 2012-01-16 11:31 PST\n"
-"PO-Revision-Date: 2011-04-07 09:19+0200\n"
-"Last-Translator: Aycan <aycandemirel at hotmail.com>\n"
+"PO-Revision-Date: 2012-10-31 08:57+0200\n"
+"Last-Translator: Aycan Demirel <aycandemirel at hotmail.com>\n"
 "Language-Team: Donanım Haber\n"
-"Language: tr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Pootle 2.1.6\n"
-"X-Poedit-SourceCharset: utf-8\n"
+"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"Plural-Forms: nplurals=2; plural=(n>1);\n"
 
 msgid "LANG_NAME_NATIVE"
 msgstr "Türkçe"
@@ -25,49 +24,53 @@ msgstr "Turkish"
 
 #: ../inc/bbcode_html.inc:11
 msgid "Bold text: [b]text[/b]  (alt+b)"
-msgstr ""
+msgstr "Kalın metin: [b]metin[/b]  (alt+b)"
 
 #: ../inc/bbcode_html.inc:14
 msgid "Italic text: [i]text[/i]  (alt+i)"
-msgstr ""
+msgstr "Ä°talik metin: [i]metin[/i]  (alt+i)"
 
 #: ../inc/bbcode_html.inc:17
 msgid "Underline text: [u]text[/u]  (alt+u)"
-msgstr ""
+msgstr "Altı çizili metin: [u]metin[/u]  (alt+u)"
 
 #: ../inc/bbcode_html.inc:20
 msgid "Quote text: [quote]text[/quote]  (alt+q)"
-msgstr ""
+msgstr "Alıntı yapılmış metin: [quote]metin[/quote]  (alt+q)"
 
 #: ../inc/bbcode_html.inc:23
 msgid "Code display: [code]code[/code]  (alt+c)"
-msgstr ""
+msgstr "Kod görünümü: [code]kod[/code]  (alt+c)"
 
 #: ../inc/bbcode_html.inc:26
 msgid "List: [list]text[/list] (alt+l)"
-msgstr ""
+msgstr "Liste: [list]metin[/list] (alt+l)"
 
 #: ../inc/bbcode_html.inc:29
 msgid "Ordered list: [list=]text[/list]  (alt+o)"
-msgstr ""
+msgstr "Numaralanmış liste: [list=]metin[/list]  (alt+o)"
 
 #: ../inc/bbcode_html.inc:32
 msgid "Insert image: [img]http://image_url[/img]  (alt+p)"
-msgstr ""
+msgstr "Resim ekle: [img]http://resim_adresi[/img]  (alt+p)"
 
 #: ../inc/bbcode_html.inc:35
 msgid ""
 "Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]  (alt+w)"
 msgstr ""
+"Adres gir: [url]http://adres[/url] ya da [url=http://url]adres metni[/url]  "
+"(alt+w)"
 
 #: ../inc/bbcode_html.inc:42
 msgid "Font color"
-msgstr ""
+msgstr "Font rengi"
 
 #: ../inc/bbcode_html.inc:43
 msgid ""
 "Font color: [color=red]text[/color]  Tip: you can also use color=#FF0000"
 msgstr ""
+"Font rengi: [color=red]metin[/color]  Ä°pucu: color=#FF0000 ÅŸeklinde de "
+"yazabilirsiniz"
 
 #: ../inc/bbcode_html.inc:44 ../inc/bbcode_html.inc:59 ../inc/prefs.inc:625
 msgid "Default"
@@ -75,104 +78,103 @@ msgstr "Varsayılan"
 
 #: ../inc/bbcode_html.inc:45
 msgid "Dark Red"
-msgstr ""
+msgstr "Koyu kırmızı"
 
 #: ../inc/bbcode_html.inc:46
 msgid "Red"
-msgstr ""
+msgstr "Kırmızı"
 
 #: ../inc/bbcode_html.inc:47
-#, fuzzy
 msgid "Orange"
-msgstr "DeÄŸiÅŸtir"
+msgstr "Turuncu"
 
 #: ../inc/bbcode_html.inc:48
 msgid "Brown"
-msgstr ""
+msgstr "Kahverengi"
 
 #: ../inc/bbcode_html.inc:49
 msgid "Yellow"
-msgstr ""
+msgstr "Sarı"
 
 #: ../inc/bbcode_html.inc:50
 msgid "Green"
-msgstr ""
+msgstr "YeÅŸil"
 
 #: ../inc/bbcode_html.inc:51
 msgid "Olive"
-msgstr ""
+msgstr "Zeytin yeÅŸili"
 
 #: ../inc/bbcode_html.inc:52
 msgid "Cyan"
-msgstr ""
+msgstr "Camgöbeği"
 
 #: ../inc/bbcode_html.inc:53
 msgid "Blue"
-msgstr ""
+msgstr "Mavi"
 
 #: ../inc/bbcode_html.inc:54
 msgid "Dark Blue"
-msgstr ""
+msgstr "Koyu mavi"
 
 #: ../inc/bbcode_html.inc:55
 msgid "Indigo"
-msgstr ""
+msgstr "Çivit"
 
 #: ../inc/bbcode_html.inc:56
 msgid "Violet"
-msgstr ""
+msgstr "Mor"
 
 #: ../inc/bbcode_html.inc:57
 msgid "Font size"
-msgstr ""
+msgstr "Font boyu"
 
 #: ../inc/bbcode_html.inc:58
 msgid "Font size: [size=x-small]small text[/size]"
-msgstr ""
+msgstr "Font boyu: [size=x-small]küçük metin[/size]"
 
 #: ../inc/bbcode_html.inc:60
 msgid "Small"
-msgstr ""
+msgstr "Küçük"
 
 #: ../inc/bbcode_html.inc:61
 msgid "Normal"
-msgstr ""
+msgstr "Normal"
 
 #: ../inc/bbcode_html.inc:62
 msgid "Large"
-msgstr ""
+msgstr "Büyük"
 
 #: ../inc/bbcode_html.inc:65
 msgid "Close all open bbCode tags"
-msgstr ""
+msgstr "Açık bbCode etiketlerini kapat"
 
 #: ../inc/bbcode_html.inc:65
 msgid "Close Tags"
-msgstr ""
+msgstr "Etiketleri kapat"
 
 #: ../inc/forum.inc:37
 msgid "Oldest first"
-msgstr ""
+msgstr "Eskiler baÅŸta"
 
 #: ../inc/forum.inc:38 ../inc/forum.inc:44
 msgid "Newest first"
-msgstr ""
+msgstr "Yeniler baÅŸta"
 
 #: ../inc/forum.inc:39
 msgid "Highest rated posts first"
-msgstr ""
+msgstr "En çok oylananlar başta"
 
 #: ../inc/forum.inc:41
 msgid "Newest post first"
-msgstr ""
+msgstr "Yeni gönderiler başa"
 
 #: ../inc/forum.inc:42
 msgid "Most views first"
-msgstr ""
+msgstr "En çok okunanlar başa"
 
 #: ../inc/forum.inc:43
 msgid "Most posts first"
-msgstr ""
+msgstr "En çok yanıtlananlar başa"
 
 #: ../inc/forum.inc:125
 msgid "Search for words in forum messages"
@@ -215,118 +217,105 @@ msgid "Next"
 msgstr "Sonraki"
 
 #: ../inc/forum.inc:535
-#, fuzzy
 msgid "Send message"
-msgstr "Mesajı yolla"
+msgstr "Mesaj gönder"
 
 #: ../inc/forum.inc:535
-#, fuzzy
 msgid "Send %1 a private message"
-msgstr "Özel mesaj gönder"
+msgstr "%1 kişisine özel mesaj gönder"
 
 #: ../inc/forum.inc:536
-#, fuzzy
 msgid "Joined: %1"
-msgstr "%1 takımına katılım"
+msgstr "Katılım: %1"
 
 #: ../inc/forum.inc:545
-#, fuzzy
 msgid "Posts: %1"
-msgstr "Cevaplar"
+msgstr "Gönderiler: %1"
 
 #: ../inc/forum.inc:551
-#, fuzzy
 msgid "Credit: %1"
-msgstr "Kredi"
+msgstr "Kredi:  %1"
 
 #: ../inc/forum.inc:552
 msgid "RAC: %1"
-msgstr ""
+msgstr "Güncel kredi: %1"
 
 #: ../inc/forum.inc:574
-#, fuzzy
 msgid "You haven't read this message yet"
-msgstr "Özel mesajınız bulunmuyor."
+msgstr "Bu mesajı henüz okumadınız"
 
 #: ../inc/forum.inc:574
-#, fuzzy
 msgid "Unread"
-msgstr "okunmamış"
+msgstr "Okunmamış"
 
 #: ../inc/forum.inc:577 ../inc/forum.inc:582 ../inc/forum.inc:681
-#, fuzzy
 msgid "Message %1"
-msgstr "Mesaj"
+msgstr "Mesaj %1"
 
 #: ../inc/forum.inc:578 ../inc/user.inc:324 ../user/forum_forum.php:172
 msgid "hidden"
-msgstr "Gizli"
+msgstr "gizli"
 
 #: ../inc/forum.inc:579
-#, fuzzy
 msgid "Posted: %1"
-msgstr "Cevaplar"
+msgstr "Gönderildi: %1"
 
 #: ../inc/forum.inc:582
-#, fuzzy
 msgid " - in response to "
-msgstr "Zaman doldu - yanıt yok"
+msgstr "şu mesaja yanıt olarak: "
 
 #: ../inc/forum.inc:585 ../inc/prefs.inc:691 ../inc/prefs.inc:693
 msgid "Edit"
 msgstr "Düzenle"
 
 #: ../inc/forum.inc:585
-#, fuzzy
 msgid "Edit this message"
-msgstr "Profilinizi düzenleyin"
+msgstr "Bu mesajı düzenler"
 
 #: ../inc/forum.inc:591
-#, fuzzy
 msgid "Last modified: %1"
-msgstr "Tercihlerin son güncellenmesi:"
+msgstr "Son düzenleme: %1"
 
 #: ../inc/forum.inc:594
 msgid ""
 "This post is not shown because the sender is on your 'ignore' list.  Click "
 "%1here%2 to view this post"
 msgstr ""
+"Bu gönderi gösterilemiyor, çünkü gönderici 'yoksay' listenizde.  Bu "
+"gönderiyi okumak için %1buraya%2 tıklayın"
 
 #: ../inc/forum.inc:622 ../inc/forum.inc:633
 msgid "Report this post as offensive"
-msgstr ""
+msgstr "Bu gönderiyi yöneticiye şikayet et"
 
 #: ../inc/forum.inc:622 ../inc/forum.inc:633
-#, fuzzy
 msgid "Report as offensive"
-msgstr "Son mesaj"
+msgstr "Åžikayet et"
 
 #: ../inc/forum.inc:626
 msgid "Rating: %1"
-msgstr ""
+msgstr "Oy: %1"
 
 #: ../inc/forum.inc:626
 msgid "rate: "
-msgstr ""
+msgstr "oyla:"
 
 # 83%
 #: ../inc/forum.inc:629
-#, fuzzy
 msgid "Click if you like this message"
-msgstr "mesaj yaratılamadı"
+msgstr "Bu mesajdan hoşlandıysanız tıklayın"
 
 #: ../inc/forum.inc:629
 msgid "Rate +"
-msgstr ""
+msgstr "+ Oy"
 
 #: ../inc/forum.inc:631
-#, fuzzy
 msgid "Click if you don't like this message"
-msgstr "mesaj yaratılamadı"
+msgstr "Bu mesajdan hoşlanmadıysanız tıklayın"
 
 #: ../inc/forum.inc:631
 msgid "Rate -"
-msgstr ""
+msgstr "- Oy"
 
 #: ../inc/forum.inc:639 ../user/pm.php:106 ../user/pm.php:146
 msgid "Reply"
@@ -334,30 +323,27 @@ msgstr "Yanıtla"
 
 #: ../inc/forum.inc:639
 msgid "Post a reply to this message"
-msgstr ""
+msgstr "Bu mesaja yanıt ver"
 
 #: ../inc/forum.inc:641
-#, fuzzy
 msgid "Quote"
-msgstr "Takımdan ayrıl"
+msgstr "Alıntı"
 
 #: ../inc/forum.inc:641
 msgid "Post a reply by quoting this message"
-msgstr ""
+msgstr "Bu mesaja alıntı yaparak yanıt ver"
 
 #: ../inc/forum.inc:662
 msgid "Hidden by a moderator"
-msgstr ""
+msgstr "Moderatör tarafından gizlendi"
 
 #: ../inc/forum.inc:683
-#, fuzzy
 msgid "Posted %1 by %2"
-msgstr "Cevaplar"
+msgstr "%2 tarafından gönderildi, %1"
 
 #: ../inc/forum.inc:701
-#, fuzzy
 msgid "You may not post or rate messages until %1"
-msgstr "Özel mesajınız bulunmuyor."
+msgstr "Bu zamana kadar gönderim yapamaz ya da oylayamazsınız: "
 
 #: ../inc/forum.inc:712
 msgid ""
@@ -376,47 +362,59 @@ msgid ""
 "            nationality, gender, class or sexuality.\n"
 "        "
 msgstr ""
+"\n"
+"        <ul>\n"
+"        <li> Gönderiler mutlaka 'çocuk dostu' olmalıdır: İçerikleri açık "
+"saçık,\n"
+"            nefretle ilişkili, cinsel açıdan müstehcen ya da imalı "
+"olmamalıdır.\n"
+"        <li> Mesajlarda ticari reklamlar olmamalı,\n"
+"        <li> Seksüel içerikli, kumar oynatan ya da başkalarını rahatsız "
+"edecek\n"
+"            internet sitelerine bağlantı içermemeli,\n"
+"        <li> İnsanları yönlendirmeyi ya da kışkırtmayı, ya da bir konuda\n"
+"            kandırmayı amaçlamamalı,\n"
+"        <li> Kasıtlı şekilde düşmanca ya da aşağılayıcı olmamalı,\n"
+"        <li> Irk, din, milliyet, cinsiyet, sınıf veya cinsellik içeren "
+"küfürlü\n"
+"            yorumlar olmamalıdır.\n"
+"        "
 
 #: ../inc/forum.inc:734
 msgid "Rules:"
-msgstr ""
+msgstr "Kurallar:"
 
 #: ../inc/forum.inc:735
-#, fuzzy
 msgid "More info"
-msgstr "Takım bilgisi"
+msgstr "Daha fazla bilgi"
 
 #: ../inc/forum.inc:1008 ../user/forum_thread.php:185
 msgid "Unhide"
 msgstr "Gizliliği kaldır"
 
 #: ../inc/forum.inc:1008
-#, fuzzy
 msgid "Unhide this post"
-msgstr "Bu konu başlığının gizliliğini kaldırır"
+msgstr "Bu gönderinin gizliliğini kaldırır"
 
 #: ../inc/forum.inc:1010 ../user/forum_thread.php:191
 msgid "Hide"
 msgstr "Gizle"
 
 #: ../inc/forum.inc:1010
-#, fuzzy
 msgid "Hide this post"
-msgstr "Gizle"
+msgstr "Bu gönderiyi gizler"
 
 #: ../inc/forum.inc:1015 ../user/forum_thread.php:224
 msgid "Move"
 msgstr "Taşı"
 
 #: ../inc/forum.inc:1015
-#, fuzzy
 msgid "Move post to a different thread"
-msgstr "Bu konu başlığını başka bir foruma taşır"
+msgstr "Bu gönderiyi başka bir foruma taşır"
 
 #: ../inc/forum.inc:1020
-#, fuzzy
 msgid "Banish author"
-msgstr "eşleşen kullanıcı yok"
+msgstr ""
 
 #: ../inc/forum.inc:1027
 msgid "Vote to banish author"
@@ -431,9 +429,8 @@ msgid "Start vote to banish author"
 msgstr ""
 
 #: ../inc/forum.inc:1069
-#, fuzzy
 msgid "Only team members can post to the team message board"
-msgstr "Takım mesaj panosu oluşturun ya da yönetin."
+msgstr "Takım mesaj panosuna yalnızca takım üyeleri gönderim yapabilir"
 
 #: ../inc/forum.inc:1079
 msgid ""
@@ -459,10 +456,12 @@ msgid ""
 "This thread is locked. Only forum moderators and administrators are allowed "
 "to post there."
 msgstr ""
+"Bu konu başlığı kilitli. Yalnızca forum moderatörleri ya da yöneticilerin "
+"gönderi yapmasına izin var."
 
 #: ../inc/forum.inc:1098
 msgid "Can't post to a hidden thread."
-msgstr ""
+msgstr "Gizli bir konu başlığına gönderi yapılamaz."
 
 #: ../inc/forum.inc:1126
 msgid "Thread"
@@ -489,30 +488,25 @@ msgid "Last post"
 msgstr "Son mesaj"
 
 #: ../inc/forum.inc:1188
-#, fuzzy
 msgid "New posts in the thread %1"
-msgstr "Cevap yaz"
+msgstr "%1 konu başlığındaki yeni gönderiler"
 
 #: ../inc/forum.inc:1193
-#, fuzzy
 msgid "New posts in subscribed thread"
-msgstr "Abone ol"
+msgstr "Abone olunan konu başlığındaki yeni gönderiler"
 
 #: ../inc/forum.inc:1194
-#, fuzzy
 msgid "There are new posts in the thread '%1'"
-msgstr ""
-"Bu konu başlığına yeni mesajlar yazıldığında e-posta almak için tıklayın"
+msgstr "'%1' konu başlığında yöne gönderiler var"
 
 #: ../inc/forum.inc:1204
 msgid "Mark all threads as read"
-msgstr "Tümünü \"okundu\" olarak işaretle"
+msgstr "Tümünü okundu olarak işaretle"
 
 #: ../inc/forum.inc:1205
-#, fuzzy
 msgid "Mark all threads in all message boards as read."
 msgstr ""
-"Tüm mesaj panolarındaki tüm konu başlıklarını 'okundu' olarak işaretler."
+"Tüm mesaj panolarındaki tüm konu başlıklarını -okundu- olarak işaretler."
 
 #: ../inc/host.inc:24
 msgid "No host"
@@ -719,9 +713,8 @@ msgid "Tasks"
 msgstr "Ä°ÅŸler"
 
 #: ../inc/host.inc:179 ../inc/host.inc:200
-#, fuzzy
 msgid "Number of times client has contacted server"
-msgstr "BOINC'in sunucuya bağlanma sayısı"
+msgstr "İstemcinin sunucuya bağlanma sayısı"
 
 #: ../inc/host.inc:180
 msgid "Last time contacted server"
@@ -915,9 +908,8 @@ msgid "Preview"
 msgstr "Önizleme"
 
 #: ../inc/pm.inc:48 ../user/pm.php:131
-#, fuzzy
 msgid "no such message"
-msgstr "eşleşen kullanıcı yok"
+msgstr "eÅŸleÅŸen mesaj yok"
 
 #: ../inc/pm.inc:82
 msgid "To"
@@ -971,9 +963,8 @@ msgid "For email notification, %1edit community prefs%2"
 msgstr "E-posta uyarısı için, %1topluluk tercihlerini düzenleyin%2"
 
 #: ../inc/pm.inc:198
-#, fuzzy
 msgid "Private message"
-msgstr "Özel mesajlar"
+msgstr "Özel mesaj"
 
 #: ../inc/prefs.inc:76
 msgid ""
@@ -1013,13 +1004,12 @@ msgstr ""
 "bilgisayarlarda, düşük güç moduna geçmek için gerekli. %2"
 
 #: ../inc/prefs.inc:113
-#, fuzzy
 msgid ""
 "Suspend work when non-BOINC CPU usage is above %1 0 means no "
 "restriction<br>Enforced by version 6.10.30+ %2"
 msgstr ""
-"CPU kullanımı bu orandan fazlaysa çalışma duraklasın %1 0 yazılırsa "
-"sınırlama olmaz<br>Sürüm 6.10.30 ve üzeri için. %2"
+"BOINC dışındaki uygulamaların CPU kullanımı bu orandan fazlaysa çalışma "
+"duraklasın %1 0 yazılırsa sınırlama olmaz<br>Sürüm 6.10.30 ve üzeri için. %2"
 
 #: ../inc/prefs.inc:121
 msgid "Do work only between the hours of %1 No restriction if equal %2"
@@ -1108,14 +1098,14 @@ msgid "Memory: when computer is not in use, use at most"
 msgstr "Bellek: Bilgisayar boştayken en fazla kullanım"
 
 #: ../inc/prefs.inc:217
-#, fuzzy
 msgid ""
 "Computer is connected to the Internet about every %1 Leave blank or 0 if "
 "always connected. %2 BOINC will try to maintain at least this much work (max "
 "10 days). %3"
 msgstr ""
 "Bilgisayar internete bu kadar sürede bir bağlanır %1 Sürekli bağlıysa 0 "
-"yazın. %2 BOINC, bu süre kadar yeterli olacak iş indirmeyi deneyecek. %3"
+"yazın. %2 BOINC, bu süre kadar yeterli olacak iş indirmeyi deneyecek (en "
+"fazla 10 gün). %3"
 
 #: ../inc/prefs.inc:223 ../inc/prefs.inc:228 ../inc/prefs.inc:270
 #: ../inc/util.inc:244
@@ -1144,7 +1134,7 @@ msgstr ""
 
 #: ../inc/prefs.inc:249
 msgid "Maximum download rate:"
-msgstr "En yüksek indirme hızı:"
+msgstr "En yüksek indirme hızı"
 
 #: ../inc/prefs.inc:251 ../inc/prefs.inc:256
 msgid "Kbytes/sec"
@@ -1152,7 +1142,7 @@ msgstr "KB/sn"
 
 #: ../inc/prefs.inc:254
 msgid "Maximum upload rate:"
-msgstr "En yüksek gönderme hızı:"
+msgstr "En yüksek gönderme hızı"
 
 #: ../inc/prefs.inc:259
 msgid "Use network only between the hours of"
@@ -1381,14 +1371,14 @@ msgid "Database error"
 msgstr "Veritabanı hatası"
 
 #: ../inc/profile.inc:192
-#, fuzzy
 msgid ""
 "To prevent spam, profiles of users with an average credit of less than %1 "
 "are displayed only to logged-in users. We apologize for this inconvenience."
 msgstr ""
-"Sitemize saldırıların önüne geçmek amacıyla, ortalama kredisi %1'den az olan "
-"kullanıcılar, yalnızca giriş yapmış kullanıcılara görünür.  Verdiğimiz "
-"rahatsızlık nedeniyle özür dileriz."
+"Çok sayıda sahte hesap oluşturularak sitemize saldırının önüne geçmek "
+"amacıyla, ortalama kredisi %1'den az olan kullanıcıların profilleri, "
+"yalnızca giriş yapmış kullanıcılara görünür.  Verdiğimiz rahatsızlık "
+"nedeniyle özür dileriz."
 
 #: ../inc/profile.inc:196
 msgid "User is banished"
@@ -1527,9 +1517,8 @@ msgid "Aborted by user"
 msgstr "Kullanıcı tarafından iptal edildi"
 
 #: ../inc/result.inc:186 ../inc/result.inc:239
-#, fuzzy
 msgid "Upload failed"
-msgstr "Güncelleme başarısız"
+msgstr "Gönderme başarısız"
 
 #: ../inc/result.inc:189
 msgid "Timed out - no response"
@@ -1742,14 +1731,13 @@ msgstr "Uygulama sürümü"
 
 #: ../inc/result.inc:619
 msgid "Output files"
-msgstr ""
+msgstr "Çıktı dosyaları"
 
 #: ../inc/result.inc:622
 msgid "Stderr output"
 msgstr "Stderr çıktısı"
 
 #: ../inc/result.inc:669
-#, fuzzy
 msgid "State"
 msgstr "Durum"
 
@@ -2232,14 +2220,12 @@ msgid "Add as friend"
 msgstr "ArkadaÅŸ olarak ekle"
 
 #: ../inc/util.inc:113
-#, fuzzy
 msgid "log out"
-msgstr "Çıkış"
+msgstr "çıkış"
 
 #: ../inc/util.inc:115
-#, fuzzy
 msgid "log in"
-msgstr "Oturum aç"
+msgstr "oturum aç"
 
 #: ../inc/util.inc:174 ../user/login_form.php:37 ../user/login_form.php:62
 msgid "Log in"
@@ -2250,7 +2236,6 @@ msgid "Create an account"
 msgstr "Bir hesap oluÅŸtur"
 
 #: ../inc/util.inc:176
-#, fuzzy
 msgid "Server status page"
 msgstr "Sunucu durumu"
 
@@ -2297,11 +2282,10 @@ msgid "Project down for maintenance"
 msgstr "Proje bakım için kapatıldı"
 
 #: ../inc/util.inc:753
-#, fuzzy
 msgid "%1 is temporarily shut down for maintenance.  Please try again later."
 msgstr ""
-"Bu sayfa veritabanı erişimi gerektirir.  Veritabanı sunucumuz bakım için "
-"geçiçi olarak kapalı durumda.  Lütfen taha sonra tekrar deneyin."
+"%1 sunucumuz bakım için geçiçi olarak kapalı durumda.  Lütfen taha sonra "
+"tekrar deneyin."
 
 #: ../inc/util.inc:771
 msgid "Unable to connect to database - please try again later"
@@ -2321,7 +2305,7 @@ msgstr "Bu bilgisayarda oturumumu açık tut"
 
 #: ../user/account_finish.php:34
 msgid "Finish account setup"
-msgstr ""
+msgstr "Hesap kurulumunu bitir"
 
 #: ../user/account_finish.php:41 ../user/create_account_form.php:89
 msgid "Identifies you on our web site. Use your real name or a nickname."
@@ -2342,14 +2326,12 @@ msgid "Optional"
 msgstr "İsteğe bağlı"
 
 #: ../user/account_finish_action.php:27 ../user/create_account_action.php:86
-#, fuzzy
 msgid "You must supply a name for your account"
-msgstr "Hesabınız için bir isim belirlemelisiniz."
+msgstr "Hesabınız için bir isim belirlemelisiniz"
 
 #: ../user/account_finish_action.php:30 ../user/create_account_action.php:89
-#, fuzzy
 msgid "HTML tags not allowed in name"
-msgstr "İsminizde HTML etiketlerinin kullanımı kabul edilmiyor."
+msgstr "İsminizde HTML etiketleri kullanamazsınız"
 
 #: ../user/add_venue.php:85
 msgid "Add %1 preferences for %2"
@@ -2386,7 +2368,7 @@ msgstr "Yayınlanma tarihi"
 
 #: ../user/bbcode.php:23
 msgid "BBCode tags"
-msgstr ""
+msgstr "BBCode etiketleri"
 
 #: ../user/bbcode.php:25
 msgid ""
@@ -2395,111 +2377,111 @@ msgid ""
 "have used %1 in HTML) and end with ] (where you would have used %2 in\n"
 "HTML)."
 msgstr ""
+"BBCode etiketleri, profilinizdeki ve mesaj panolarındaki metinleri "
+"ÅŸekillendirmenizi saÄŸlar.\n"
+"HTML'e benzer, fakat daha basittir. Etiketler bir [ ile baÅŸlar (HTML'de "
+"kullanılan\n"
+"%1 gibi) ve bir ] ile biter (HTML'de kullanılan %2 gibi)."
 
 #: ../user/bbcode.php:31
 msgid "Examples"
-msgstr ""
+msgstr "Örnekler"
 
 #: ../user/bbcode.php:32
 msgid "Bold"
-msgstr ""
+msgstr "Kalın"
 
 #: ../user/bbcode.php:33
-#, fuzzy
 msgid "Italic"
-msgstr "Geçersiz"
+msgstr "Ä°talik"
 
 #: ../user/bbcode.php:34
-#, fuzzy
 msgid "Underline"
-msgstr "Reddet"
+msgstr "Altı çizili"
 
 #: ../user/bbcode.php:35
-#, fuzzy
 msgid "Superscript"
-msgstr "Tanıtım"
+msgstr "Ãœstsimge"
 
 #: ../user/bbcode.php:36
-#, fuzzy
 msgid "Big text"
-msgstr "salt metin"
+msgstr "Büyük metin"
 
 #: ../user/bbcode.php:37
-#, fuzzy
 msgid "Red text"
-msgstr "salt metin"
+msgstr "Kırmızı metin"
 
 #: ../user/bbcode.php:38
 msgid "link to website"
-msgstr ""
+msgstr "internet sitesine bağlantı"
 
 #: ../user/bbcode.php:39
-#, fuzzy
 msgid "Quoted text"
-msgstr "Takımdan ayrıl"
+msgstr "Alıntı yapılmış metin"
 
 #: ../user/bbcode.php:39
 msgid "use for quoted blocks of text"
-msgstr ""
+msgstr "metinden alıntı bloğu yapmak için"
 
 #: ../user/bbcode.php:40
 msgid "use to display an image"
-msgstr ""
+msgstr "bir resmi görüntülemek için"
 
 #: ../user/bbcode.php:41
 msgid "Code snippet here"
-msgstr ""
+msgstr "Kod parçası"
 
 #: ../user/bbcode.php:41
 msgid "use to display some code"
-msgstr ""
+msgstr "bir kodu düzgün görüntülemek için"
 
 #: ../user/bbcode.php:42
 msgid "Pre-formatted text"
-msgstr ""
+msgstr "Önceden biçimlenmiş metin"
 
 #: ../user/bbcode.php:42
 msgid "use to display pre-formatted (usually monospaced) text"
-msgstr ""
+msgstr "önceden biçimlenmiş (genellikle eşaralıklı) metin görüntülemek için"
 
 #: ../user/bbcode.php:43
 msgid "Item 1"
-msgstr ""
+msgstr "Öğe 1"
 
 #: ../user/bbcode.php:43
 msgid "Item2"
-msgstr ""
+msgstr "Öğe 2"
 
 #: ../user/bbcode.php:43
 msgid "Item 2"
-msgstr ""
+msgstr "Öğe 3"
 
 #: ../user/bbcode.php:45
 msgid "use to link to Trac ticket on BOINC website"
-msgstr ""
+msgstr "BOINC sitesindeki Trac biletine bağlantı için"
 
 #: ../user/bbcode.php:47
 msgid "use to link to Trac Wiki on BOINC website"
-msgstr ""
+msgstr "BOINC sitesindeki Trac Wiki'sine bağlantı için"
 
 #: ../user/bbcode.php:49
 msgid "use to link to SVN changeset on BOINC website"
-msgstr ""
+msgstr "BOINC sitesindeki SVN değişiklik setine bağlantı için"
 
 #: ../user/bbcode.php:53
 msgid ""
 "If you don't close a tag or don't specify a parameter correctly,\n"
 "the raw tag itself will display instead of the formatted text."
 msgstr ""
+"EÄŸer bir etiketi kapatmaz ya da parametreyi doÄŸru girmezseniz,\n"
+"biçimlenmiş metin yerine, etiketin ham hali görüntülenecektir."
 
 #: ../user/create_account_action.php:26
-#, fuzzy
 msgid "Can't create account"
-msgstr "Hesap oluÅŸtur"
+msgstr "Hesap oluşturulamadı"
 
 #: ../user/create_account_action.php:29
 msgid "Click your browser's <b>Back</b> button to try again."
-msgstr ""
+msgstr "Yeniden denemek için, tarayıcınızın <b>Geri</b> butonuna tıklayın."
 
 #: ../user/create_account_action.php:38 ../user/create_account_action.php:40
 #: ../user/create_account_form.php:43
@@ -2511,11 +2493,12 @@ msgid ""
 "Sorry, this project has disabled the creation of new accounts.\n"
 "Please try again later."
 msgstr ""
+"Üzgünüm, bu projede yeni hesapların yaratılması devredışı bırakıldı.\n"
+"Lütfen daha sonra yeniden deneyin."
 
 #: ../user/create_account_action.php:53
-#, fuzzy
 msgid "Your reCAPTCHA response was not correct. Please try again."
-msgstr "ReCaptcha yanıtınız doğru değil.  Lütfen tekrar deneyin."
+msgstr "reCAPTCHA yanıtınız doğru değil.  Lütfen tekrar deneyin."
 
 #: ../user/create_account_action.php:77
 msgid "You must supply an invitation code to create an account."
@@ -2526,32 +2509,30 @@ msgid "The invitation code you gave is not valid."
 msgstr "Sahip olduğunuz davet kodu geçersiz."
 
 #: ../user/create_account_action.php:94
-#, fuzzy
 msgid ""
 "Invalid email address: you must enter a valid address of the form name at domain"
-msgstr "'isim at site' biçiminde geçerli bir adres olmalı"
+msgstr ""
+"Geçersiz e-posta adresi: 'isim at site' biçiminde geçerli bir adres girmelisiniz"
 
 #: ../user/create_account_action.php:98
 msgid "There's already an account with that email address."
-msgstr ""
+msgstr "Bu e-posta adresiyle bir hesap zaten var."
 
 #: ../user/create_account_action.php:104 ../user/edit_passwd_action.php:33
-#, fuzzy
 msgid "New passwords are different"
-msgstr "Yeni parola, yeniden"
+msgstr "Yeni parola bölümleri birbirinden farklı"
 
 #: ../user/create_account_action.php:111 ../user/edit_passwd_action.php:41
 msgid "Passwords may only include ASCII characters."
-msgstr ""
+msgstr "Parolalar yalnızca ASCII karakterleri içerebilir."
 
 #: ../user/create_account_action.php:116 ../user/edit_passwd_action.php:45
 msgid "New password is too short: minimum password length is %1 characters."
-msgstr ""
+msgstr "Yeni parola çok kısa. En az %1 karakter olmalı."
 
 #: ../user/create_account_action.php:137
-#, fuzzy
 msgid "Couldn't create account"
-msgstr "Hesap oluÅŸtur"
+msgstr "Hesap oluşturulamadı"
 
 #: ../user/create_account_form.php:44
 msgid "Account creation is currently disabled. Please try again later."
@@ -2560,13 +2541,12 @@ msgstr ""
 "deneyin."
 
 #: ../user/create_account_form.php:53
-#, fuzzy
 msgid ""
 "Don't use this form. Just run BOINC, select Add Project, and enter an email "
 "address and password."
 msgstr ""
-"NOT: BOINC Manager'ı kullanıyorsanız, bu formu kullanmayın. Yalnızca BOINC'i "
-"çalıştırın, \"Proje ekle\"yi seçin ve bir e-posta adresi ile parola girin."
+"Bu formu kullanmayın. Yalnızca BOINC'i çalıştırın, Proje ekle'yi seçin ve "
+"bir e-posta adresi ile parola girin."
 
 #: ../user/create_account_form.php:71
 msgid ""
@@ -2605,9 +2585,8 @@ msgid "Confirm password"
 msgstr "Parolayı doğrula"
 
 #: ../user/create_account_form.php:123
-#, fuzzy
 msgid "Please enter the words shown in the image"
-msgstr "Lütfen resimde görülen harfleri girin."
+msgstr "Lütfen resimde görülen kelimeleri girin"
 
 #: ../user/create_account_form.php:129
 msgid "Create account"
@@ -2733,24 +2712,20 @@ msgstr ""
 "Verdiğimiz rahatsızlık nedeniyle özür dileriz."
 
 #: ../user/delete_account.php:57
-#, fuzzy
 msgid "Couldn't delete account"
-msgstr "Eski bilgisayar kullanımdan kaldırılamadı"
+msgstr "Hesap silinemedi"
 
 #: ../user/delete_account.php:59
-#, fuzzy
 msgid "Account deleted"
-msgstr "Hesap bilgisi"
+msgstr "Hesap silindi"
 
 #: ../user/delete_account.php:60
-#, fuzzy
 msgid "Your account has been deleted."
-msgstr "Öneriniz kaydedildi."
+msgstr "Hesabınız silindi."
 
 #: ../user/delete_account.php:64
-#, fuzzy
 msgid "Confirm delete account"
-msgstr "Hesap oluÅŸtur"
+msgstr "Hesap silinmesini onayla"
 
 #: ../user/delete_account.php:67
 msgid ""
@@ -2760,17 +2735,23 @@ msgid ""
 "No jobs will be issued to any computers attached\n"
 "to this account."
 msgstr ""
+"Hesabınızın silinmesiyle, profil ve mesaj panosu\n"
+"gönderileriniz de dahil tüm kişisel bilgileriniz\n"
+"sunucularımızdan kaldırılacak.\n"
+"Bu hesabın kurulu olduğu bilgisayarlara ise işler\n"
+"gönderilmeyecek."
 
 #: ../user/delete_account.php:73
 msgid ""
 "This cannot be undone.\n"
 "Once your account has been deleted, you cannot get it back."
 msgstr ""
+"Bu işlem geri alınamaz.\n"
+"Hesabınızı sildiğinizde, onu tekrar geri alamazsınız."
 
 #: ../user/delete_account.php:76
-#, fuzzy
 msgid "Are you sure you want to delete your account?"
-msgstr "%2 için ayrı %1 tercihlerinizi silmek istediğinize emin misiniz?"
+msgstr "Hesabınızı silmek istediğinize emin misiniz?"
 
 #: ../user/delete_account.php:79 ../user/delete_profile.php:52
 #: ../user/donations.php:322 ../user/donations.php:326 ../user/friend.php:238
@@ -2780,9 +2761,8 @@ msgid "Yes"
 msgstr "Evet"
 
 #: ../user/delete_account.php:79
-#, fuzzy
 msgid "Delete this account"
-msgstr "Bu bilgisayarı sil"
+msgstr "Bu hesabı sil"
 
 #: ../user/delete_account.php:80 ../user/delete_profile.php:53
 #: ../user/friend.php:239 ../user/user_search.php:128
@@ -2791,32 +2771,28 @@ msgid "No"
 msgstr "Hayır"
 
 #: ../user/delete_account.php:80
-#, fuzzy
 msgid "Do not delete this account"
-msgstr "Bu bilgisayarı sil"
+msgstr "Bu hesabı silme"
 
 #: ../user/delete_profile.php:30
-#, fuzzy
 msgid "couldn't delete profile - please try again later"
-msgstr "Takıma katılamadınız - lütfen daha sonra tekrar deneyin."
+msgstr "profil silinemedi - lütfen daha sonra tekrar deneyin"
 
 #: ../user/delete_profile.php:33
-#, fuzzy
 msgid "Delete Confirmation"
-msgstr "Bilgisayar bilgisi"
+msgstr "Silmeyi Onayla"
 
 #: ../user/delete_profile.php:35
-#, fuzzy
 msgid "Your profile has been deleted."
-msgstr "Mesajınız gönderildi."
+msgstr "Profiliniz silindi."
 
 #: ../user/delete_profile.php:40
 msgid "Profile delete confirmation"
-msgstr ""
+msgstr "Profil silme onayı"
 
 #: ../user/delete_profile.php:43
 msgid "Are you sure?"
-msgstr ""
+msgstr "Emin misiniz?"
 
 #: ../user/delete_profile.php:44
 msgid ""
@@ -2824,60 +2800,60 @@ msgid ""
 "you will have to start from scratch\n"
 "if you want another profile in the future."
 msgstr ""
+"Silinen profiller sonsuza kadar yok olur ve kurtarılamaz--\n"
+"Gelecekte yeni bir profil yaratmak için baştan başlamanız gerekir."
 
 #: ../user/delete_profile.php:48
 msgid ""
 "If you're sure, click 'Yes'\n"
 "to remove your profile from our database."
 msgstr ""
+"Eminseniz, profilinizin sunucularımızdan silinmesi için\n"
+"lütfen 'Evet'e tıklayın."
 
 #: ../user/delete_profile.php:52
-#, fuzzy
 msgid "Delete my profile"
-msgstr "Bir profil oluÅŸtur"
+msgstr "Profilimi sil"
 
 #: ../user/delete_profile.php:53
-#, fuzzy
 msgid "Do not delete my profile"
-msgstr "Bu profilden %1hiç hoşlanmadım%2"
+msgstr "Profilimi silme"
 
 #: ../user/donated.php:25
 msgid "PayPal - Transaction Completed"
-msgstr ""
+msgstr "PayPal - Aktarım Tamamlandı"
 
 #: ../user/donated.php:28
 msgid "Thank you for donating!"
-msgstr ""
+msgstr "Bağışınız için teşekkürler!"
 
 #: ../user/donated.php:29
-#, fuzzy
 msgid "Your donation for has been completed."
-msgstr "Öneriniz kaydedildi."
+msgstr "Bağışınız tamamlandı."
 
 #: ../user/donated.php:30
 msgid ""
 "Your donation will be added to the progress bar after confirmation by PayPal."
 msgstr ""
+"Bağışınız PayPal tarafından onaylandıktan sonra ilerleme çubuğuna eklenecek."
 
 #: ../user/donated.php:32
 msgid "You have canceled your donation."
-msgstr ""
+msgstr "Bağışınızı iptal ettiniz."
 
 #: ../user/donations.php:24
-#, fuzzy
 msgid "This project is not accepting donations."
-msgstr "Bu istek halen onaylanmayı bekliyor."
+msgstr "Bu proje bağışları kabul etmiyor."
 
 #: ../user/donations.php:34
-#, fuzzy
 msgid "%1 donations"
-msgstr "%1 gün"
+msgstr "%1 bağış"
 
 #: ../user/donations.php:39
 msgid ""
 "This project is accepting donations via\n"
 "%1."
-msgstr ""
+msgstr "Bu proje %1 ile bağışları kabul ediyor."
 
 #: ../user/donations.php:42
 msgid ""
@@ -2893,38 +2869,49 @@ msgid ""
 "        (please note that the rates are only estimates\n"
 "         and the actual amount may differ)."
 msgstr ""
+"Bağış yapmak için, istediğiniz miktara göre aşağıdaki formu doldurun.\n"
+"        PayPal bir çok para birimini destekler \n"
+"        (Kanada Doları, Avro, İngiliz Sterlini, ABD Doları,\n"
+"         Yen, Avusturalya Doları, Yeni Zelanda Doları,\n"
+"        İsviçre Frangı, Hong Kong Doları, Singapur Doları, İsveç Kronu, \n"
+"         Danimarka Kronu, Polonya Zlotisi, Norveç Kronu,\n"
+"        Macar Forinti, Çek Korunası).\n"
+"        Farklı para birimlerinin değerlerini görmek için,\n"
+"        dönüştürücüyü kullanabilirsiniz (Ancak, bu değerlerin\n"
+"        yaklaşık olduğunu ve gerçek miktarın farklı olabileceğini\n"
+"        unutmayın)."
 
 #: ../user/donations.php:316
 msgid "Amount you would like to donate"
-msgstr ""
+msgstr "Bağışlamak istediğiniz miktar"
 
 #: ../user/donations.php:317
 msgid "Estimated value in"
-msgstr ""
+msgstr "Bununla yaklaşık miktar"
 
 #: ../user/donations.php:320 ../user/donations.php:324
-#, fuzzy
 msgid "Anonymous donation"
-msgstr "Anonim platform"
+msgstr "Anonim bağış"
 
 #: ../user/donations.php:320
 msgid ""
 "Select this if you dont want your name and account number displayed in\n"
 "donator lists.<br>If not checked, you will be recorded as user ID %1"
 msgstr ""
+"Select this if you dont want your name and account number displayed in\n"
+"donator lists.<br>If not checked, you will be recorded as user ID %1"
 
 #: ../user/donations.php:324
 msgid "To assign the donation with your user ID, please log in."
-msgstr ""
+msgstr "Kullanıcı NO'nuzla bağış yapmak için, lütfen sisteme giriş yapın."
 
 #: ../user/donations.php:328
-#, fuzzy
 msgid "Proceed"
-msgstr "Profil kaydedildi"
+msgstr "Devam et"
 
 #: ../user/donations.php:329
 msgid "Donations are accepted through"
-msgstr ""
+msgstr "Bağışlar bunun aracılığıyla gerçekleştirilir:"
 
 #: ../user/download_network.php:25
 msgid "Download BOINC add-on software"
@@ -2962,44 +2949,40 @@ msgid "This list is managed centrally at %1the BOINC website%2."
 msgstr "Bu liste %1BOINC internet sitesinden%2 merkezi olarak yönetilir."
 
 #: ../user/edit_email_action.php:31
-#, fuzzy
 msgid "Change email address of account"
-msgstr "Hesabınızın bağlı olduğu e-posta adresini değiştirin"
+msgstr "Hesabın bağlı olduğu e-posta adresini değiştir"
 
 #: ../user/edit_email_action.php:34 ../user/edit_email_action.php:36
-#, fuzzy
 msgid "New email address '%1' is invalid."
-msgstr "Yeni e-posta adresi"
+msgstr "Yeni e-posta adresi '%1' geçersiz."
 
 #: ../user/edit_email_action.php:38
 msgid "New email address is same as existing address. Nothing is changed."
-msgstr ""
+msgstr "Yeni e-posta adresi, mevcut adres ile aynı. Değişiklik yapılmadı."
 
 #: ../user/edit_email_action.php:42
 msgid "There's already an account with that email address"
-msgstr ""
+msgstr "Bu adres ile bir hesap zaten var."
 
 #: ../user/edit_email_action.php:54
-#, fuzzy
 msgid "Invalid password."
-msgstr "Parolayı doğrula"
+msgstr "Geçersiz parola."
 
 #: ../user/edit_email_action.php:62
-#, fuzzy
 msgid "The email address of your account is now %1."
-msgstr "Hesabınızın bağlı olduğu e-posta adresi doğrulandı."
+msgstr "Hesabınızın bağlı olduğu e-posta adresi artık %1."
 
 #: ../user/edit_email_action.php:64
-#, fuzzy
 msgid "Please %1validate this email address%2."
-msgstr "E-posta adresini doÄŸrula"
+msgstr "Lütfen %1bu e-posta adresini doğrulayın%2."
 
 #: ../user/edit_email_action.php:67
-#, fuzzy
 msgid ""
 "We can't update your email address due to a database problem.  Please try "
 "again later."
-msgstr "Veritabanı seçilemedi - lütfen daha sonra tekrar deneyin"
+msgstr ""
+"Veritabanı hatası nedeniyle e-posta adresinizi güncelleyemedik.  Lütfen daha "
+"sonra tekrar deneyin."
 
 #: ../user/edit_email_form.php:28 ../user/edit_email_form.php:52
 msgid "Change email address"
@@ -3022,97 +3005,94 @@ msgid "No password?"
 msgstr "Parolanız yok mu?"
 
 #: ../user/edit_forum_preferences_action.php:35
-#, fuzzy
 msgid "Confirm reset"
-msgstr "Parolayı doğrula"
+msgstr "Sıfırlamayı onayla"
 
 #: ../user/edit_forum_preferences_action.php:36
 msgid ""
 "This action will erase any changes you have made in your community "
 "preferences. To cancel, click your browser's Back button."
 msgstr ""
+"Bu eylem, topluluk tercihlerinizde yaptığınız değişiklikleri silecek. İptal "
+"etmek için, tarayıcınızın Geri butonuna basın."
 
 #: ../user/edit_forum_preferences_action.php:40
-#, fuzzy
 msgid "Reset preferences"
-msgstr "Tercihleri kaldır"
+msgstr "Sıfırlama tercihleri"
 
 #: ../user/edit_forum_preferences_action.php:90
 msgid "Error: Not the right kind of file, only PNG and JPEG are supported."
-msgstr ""
+msgstr "Hata: Yanlış dosya tipi. Yalnızca PNG ve JPEG destekleniyor."
 
 #: ../user/edit_forum_preferences_action.php:116
 msgid "Your signature was too long, please keep it less than 250 characters."
-msgstr ""
+msgstr "İmzanız çok uzun. Lütfen 250 karakterden kısa tutun."
 
 #: ../user/edit_forum_preferences_action.php:139
 #: ../user/edit_forum_preferences_action.php:153
-#, fuzzy
 msgid "No such user: %1"
-msgstr "Böyle bir kullanıcı yok"
+msgstr "Böyle bir kullanıcı yok: %1"
 
 #: ../user/edit_forum_preferences_form.php:56
 msgid ""
 "How should we notify you of new private messages, friend requests, posts in "
 "subscribed threads, and other events?"
 msgstr ""
+"Sizi yeni özel mesajlar, arkadaşlık istekleri , abone olunan konu "
+"başlıklarına gönderiler ve diğer olaylar hakkında nasıl bilgilendirelim?"
 
 #: ../user/edit_forum_preferences_form.php:57
-#, fuzzy
 msgid "On my Account page (no email)"
-msgstr "Hesap anahtarını e-posta ile al"
+msgstr "Hesap sayfamda (e-posta yok)"
 
 #: ../user/edit_forum_preferences_form.php:58
-#, fuzzy
 msgid "Immediately, by email"
-msgstr "Hesap anahtarını e-posta ile al"
+msgstr "Derhal, e-posta ile"
 
 #: ../user/edit_forum_preferences_form.php:59
 msgid "In a single daily email"
-msgstr ""
+msgstr "Günde tek e-posta ile"
 
 #: ../user/edit_forum_preferences_form.php:75
-#, fuzzy
 msgid "Message-board identity"
-msgstr "Mesaj panosu"
+msgstr "Mesaj panosu kimliÄŸi"
 
 #: ../user/edit_forum_preferences_form.php:76
 msgid "Avatar"
-msgstr ""
+msgstr "Avatar"
 
 #: ../user/edit_forum_preferences_form.php:77
 msgid "An image representing you on the message boards."
-msgstr ""
+msgstr "Mesaj panolarında sizi temsil edecek bir resim."
 
 #: ../user/edit_forum_preferences_form.php:78
 msgid "Format: JPG or PNG. Size: at most 4 KB, 100x100 pixels"
-msgstr ""
+msgstr "Format: JPG ya da PNG. Boyut: 4 KB civarı, 100x100 piksel"
 
 #: ../user/edit_forum_preferences_form.php:80
-#, fuzzy
 msgid "Don't use an avatar"
-msgstr "HTML etiketleri kullanmayın."
+msgstr "Bir avatar kullanma"
 
 #: ../user/edit_forum_preferences_form.php:82
 msgid "Use a Globally Recognized Avatar provided by %1"
 msgstr ""
+"%1 tarafından sağlanan bir Globally Recognized Avatar (Gravatar) kullan"
 
 #: ../user/edit_forum_preferences_form.php:84
 msgid "Use this uploaded avatar:"
-msgstr ""
+msgstr "Yüklediğim bu avatarı kullan:"
 
 #: ../user/edit_forum_preferences_form.php:87
 msgid "Avatar preview"
-msgstr ""
+msgstr "Avatar önizlemesi"
 
 #: ../user/edit_forum_preferences_form.php:87
 msgid "This is how your avatar will look"
-msgstr ""
+msgstr "Bu, avatarınızın nasıl görüneceğini gösterir"
 
 #: ../user/edit_forum_preferences_form.php:96
-#, fuzzy
 msgid "Signature for message board posts"
-msgstr "%1 için bir mesaj panosu oluştur"
+msgstr "Mesaj panosu gönderileri için imza"
 
 #: ../user/edit_forum_preferences_form.php:99
 msgid ""
@@ -3120,133 +3100,127 @@ msgid ""
 "<br> providing dynamic 'signature images'\n"
 "<br> showing your latest credit info, project news, etc."
 msgstr ""
+"%1Çeşitli bedava servislere%2 gözatın.\n"
+"<br> Dinamik 'imza resimleri',\n"
+"<br> son kredi bilginizi, proje haberlerini vs gösterir."
 
 #: ../user/edit_forum_preferences_form.php:104
 msgid "characters remaining"
-msgstr ""
+msgstr "karakter kaldı"
 
 #: ../user/edit_forum_preferences_form.php:105
 msgid "Attach signature by default"
-msgstr ""
+msgstr "İmzayı varsayılan olarak ekle"
 
 #: ../user/edit_forum_preferences_form.php:108
 msgid "Signature preview"
-msgstr ""
+msgstr "İmza önizlemesi"
 
 #: ../user/edit_forum_preferences_form.php:109
 msgid "This is how your signature will look in the forums"
-msgstr ""
+msgstr "Bu, imzanızın forumlarda nasıl gösterileceğinin bir önizlemesidir"
 
 #: ../user/edit_forum_preferences_form.php:127
-#, fuzzy
 msgid "Message display"
-msgstr "Mesaj panoları"
+msgstr "Mesaj görüntüleme"
 
 #: ../user/edit_forum_preferences_form.php:129
-#, fuzzy
 msgid "What to display"
-msgstr "Görüntülenecek iş yok"
+msgstr "Görüntülenecek öğeler"
 
 #: ../user/edit_forum_preferences_form.php:130
 msgid "Hide avatar images"
-msgstr ""
+msgstr "Avatar resimlerini gizle"
 
 #: ../user/edit_forum_preferences_form.php:131
 msgid "Hide signatures"
-msgstr ""
+msgstr "İmzaları gizle"
 
 #: ../user/edit_forum_preferences_form.php:132
 msgid "Show images as links"
-msgstr ""
+msgstr "Resimleri bağlantı olarak görüntüle"
 
 #: ../user/edit_forum_preferences_form.php:133
 msgid "Open links in new window/tab"
-msgstr ""
+msgstr "Bağlantıları yeni sekmelerde/pencerelerde aç"
 
 #: ../user/edit_forum_preferences_form.php:134
 msgid "Highlight special users"
-msgstr ""
+msgstr "Özel kullanıcıları vurgula"
 
 #: ../user/edit_forum_preferences_form.php:138
 msgid "How to sort"
-msgstr ""
+msgstr "Nasıl sıralanacak"
 
 #: ../user/edit_forum_preferences_form.php:139
-#, fuzzy
 msgid "Threads:"
-msgstr "Konu Başlıkları"
+msgstr "Konu başlıkları:"
 
 #: ../user/edit_forum_preferences_form.php:139
-#, fuzzy
 msgid "Posts:"
-msgstr "Cevaplar"
+msgstr "Cevaplar:"
 
 #: ../user/edit_forum_preferences_form.php:140
 msgid "Jump to first new post in thread automatically"
-msgstr ""
+msgstr "Konu başlığındaki ilk yeni gönderiye otomatik olarak atla"
 
 #: ../user/edit_forum_preferences_form.php:141
 msgid "Do not reorder sticky posts"
-msgstr ""
+msgstr "Sabit gönderileri yeniden düzenleme"
 
 #: ../user/edit_forum_preferences_form.php:142
 msgid "If a thread contains more than this number of posts"
-msgstr ""
+msgstr "Eğer bir konu başlığı bundan fazla sayıda gönderi içeriyorsa"
 
 #: ../user/edit_forum_preferences_form.php:143
 msgid "only display the first one and this many of the last ones"
-msgstr ""
+msgstr "yalnızca ilkini ve en sondakileri görüntüle"
 
 #: ../user/edit_forum_preferences_form.php:149
-#, fuzzy
 msgid "Message filtering"
-msgstr "Mesaj panosu"
+msgstr "Mesaj filtreleme"
 
 #: ../user/edit_forum_preferences_form.php:165
-#, fuzzy
 msgid "Filtered users"
-msgstr "Süzgeçler"
+msgstr "Filtrelenen kullanıcılar"
 
 #: ../user/edit_forum_preferences_form.php:166
-#, fuzzy
 msgid "Ignore message board posts and private messages from these users."
-msgstr "Mesaj panoları ve özel mesajlar"
+msgstr ""
+"Bu kullanıcıların mesaj panosu ve özel mesaj gönderilerini görmezden gel."
 
 #: ../user/edit_forum_preferences_form.php:168
 msgid "User ID (For instance: 123456789)"
-msgstr ""
+msgstr "Kullanıcı NO (Örneğin: 123456789)"
 
 #: ../user/edit_forum_preferences_form.php:169 ../user/pm.php:251
 msgid "Add user to filter"
 msgstr "Kullanıcıyı filtreye ekle"
 
 #: ../user/edit_forum_preferences_form.php:174
-#, fuzzy
 msgid "Click here to update preferences"
-msgstr "Tercihleri güncelle"
+msgstr "Tercihleri güncellemek için buraya tıklayın"
 
 #: ../user/edit_forum_preferences_form.php:176
 #: ../user/edit_forum_preferences_form.php:178
 msgid "Reset"
-msgstr ""
+msgstr "Sıfırla"
 
 #: ../user/edit_forum_preferences_form.php:177
 msgid "Or click here to reset preferences to the defaults"
-msgstr ""
+msgstr "Ya da ayarları varsayılana sıfırlamak için buraya tıklayın"
 
 #: ../user/edit_passwd_action.php:50
-#, fuzzy
 msgid "Invalid account key"
-msgstr "Zayıf hesap anahtarı"
+msgstr "Geçersiz hesap anahtarı"
 
 #: ../user/edit_passwd_action.php:55
 msgid "No account with that email address was found"
-msgstr ""
+msgstr "Bu e-posta adresine ait bir hesap bulunamadı"
 
 #: ../user/edit_passwd_action.php:59
-#, fuzzy
 msgid "Invalid password"
-msgstr "Parolayı doğrula"
+msgstr "Geçersiz parola"
 
 #: ../user/edit_passwd_action.php:63 ../user/edit_passwd_form.php:28
 #: ../user/edit_passwd_form.php:58
@@ -3254,16 +3228,16 @@ msgid "Change password"
 msgstr "Parolayı değiştir"
 
 #: ../user/edit_passwd_action.php:67
-#, fuzzy
 msgid "Your password has been changed."
-msgstr "Mesajınız gönderildi."
+msgstr "Parolanız değişti."
 
 #: ../user/edit_passwd_action.php:69
-#, fuzzy
 msgid ""
 "We can't update your password due to a database problem. Please try again "
 "later."
-msgstr "Veritabanına erişilemedi - lütfen daha sonra tekrar deneyin"
+msgstr ""
+"Parolanızı veritaban problemi nedeniyle güncelleyemedik. Lütfen daha sonra "
+"tekrar deneyin."
 
 #: ../user/edit_passwd_form.php:42
 msgid "You can identify yourself using either"
@@ -3330,9 +3304,8 @@ msgid "Update info"
 msgstr "Bilgileri güncelle"
 
 #: ../user/explain_state.php:27
-#, fuzzy
 msgid "Server states"
-msgstr "Sunucu durumu"
+msgstr "Sunucu durumları"
 
 #: ../user/explain_state.php:30
 msgid ""
@@ -3340,59 +3313,68 @@ msgid ""
 "computer, and if so whether the computer has finished it. Possible values "
 "are:"
 msgstr ""
+"Bir işin <b>sunucu durumu</b>, bir bilgisayara gönderilip gönderilmediğini "
+"ve bilgisayarın onu tamamlayıp tamamlamadığını anlatır. Muhtemel değerler "
+"şunlardır:"
 
 #: ../user/explain_state.php:35
 msgid ""
 "The task is not ready to send (for example, because its input files are "
 "unavailable)"
 msgstr ""
+"İş gönderilmeye hazır değil (örneğin, giriş dosyaları henüz mevcut değil)"
 
 #: ../user/explain_state.php:38
 msgid "The task is ready to send, but hasn't been sent yet."
-msgstr ""
+msgstr "İş gönderilmeye hazır, fakat henüz gönderilmedi."
 
 #: ../user/explain_state.php:40
-#, fuzzy
 msgid "In Progress"
 msgstr "Sürmekte"
 
 #: ../user/explain_state.php:41
-#, fuzzy
 msgid "The task has been sent; waiting for completion."
-msgstr "Dosya silinmesi için bekleyen işler"
+msgstr "İş gönderildi, tamamlanması bekleniyor."
 
 #: ../user/explain_state.php:44
 msgid ""
 "The task has been sent to a computer and either it has timed out or the "
 "computer has reported its completion."
 msgstr ""
+"İş bir bilgisayara gönderildi ve son teslim zamanı geçti ya da bilgisayar "
+"tamamlandığını bildirdi."
 
 #: ../user/explain_state.php:49
-#, fuzzy
 msgid "Outcomes"
-msgstr "Sonuç"
+msgstr "Sonuçlar"
 
 #: ../user/explain_state.php:52
 msgid ""
 "A tasks's <b>outcome</b> is defined if its server state is <b>over</b>. "
 "Possible values are:"
 msgstr ""
+"Bir işin <b>sonucu</b>, sunucu durumu <b>tamamlandı</b> ise belirlenir. "
+"Muhtemel değerler şunlardır:"
 
 #: ../user/explain_state.php:57
 msgid ""
 "The task was sent to a computer, but the computer has not yet completed the "
 "work and reported the outcome."
 msgstr ""
+"İş bir bilgisayara gönderildi, fakat bilgisayar henüz tamamlamadı ve "
+"sonucunu raporlamadı."
 
 #: ../user/explain_state.php:60
 msgid "A computer completed and reported the task successfully."
-msgstr ""
+msgstr "Bir bilgisayar işi başarıyla tamamladı ve raporladı."
 
 #: ../user/explain_state.php:63
 msgid ""
 "The server wasn't able to send the task to a computer (perhaps because its "
 "resource requirements were too large)"
 msgstr ""
+"Sunucu işi bir bilgisayara göndermeyi başaramadı (muhtemelen sistem "
+"ihtiyaçları çok yüksek ya da dosya boyu çok büyük)"
 
 #: ../user/explain_state.php:65
 msgid "Client error"
@@ -3400,153 +3382,160 @@ msgstr "İstemci hatası"
 
 #: ../user/explain_state.php:66
 msgid "The task was sent to a computer and an error occurred."
-msgstr ""
+msgstr "İş bir bilgisayara gönderildi ve hata meydana geldi."
 
 #: ../user/explain_state.php:69
 msgid ""
 "The task was sent to a computer and no reply was received within the time "
 "limit."
 msgstr ""
+"İş bir bilgisayara gönderildi ve son teslim tarihi içinde bir yanıt "
+"alınamadı."
 
 #: ../user/explain_state.php:72
 msgid ""
 "The task wasn't sent to a computer because enough other tasks were completed "
 "for this workunit."
 msgstr ""
+"İş bir bilgisayara gönderilemedi, çünkü bu iş birimi için yeterli miktarda "
+"diğer işler tamamlandı."
 
 #: ../user/explain_state.php:75
 msgid ""
 "The task was reported but could not be validated, typically because the "
 "output files were lost on the server."
 msgstr ""
+"İş raporlandı, fakat doğrulanamadı. Çünkü, genellikle sonuç dosyaları "
+"sunucuda kayboldu."
 
 #: ../user/explain_state.php:80
-#, fuzzy
 msgid "Client states"
-msgstr "Ä°stemci durumu"
+msgstr "İstemci durumları"
 
 #: ../user/explain_state.php:81
 msgid ""
 "A result's <b>client state</b> indicates the stage of processing at which an "
 "error occurred."
 msgstr ""
+"Bir sonucun <b>istemci durumu</b> hesaplama sırasında meydana gelen bir "
+"hatayı anlatır."
 
 #: ../user/explain_state.php:86
 msgid "The computer has not yet completed the task."
-msgstr ""
+msgstr "Bilgisayar henüz işi tamamlayamadı."
 
 #: ../user/explain_state.php:89
 msgid "The computer completed the task successfully."
-msgstr ""
+msgstr "Bilgisayar işi başarıyla tamamladı."
 
 #: ../user/explain_state.php:92
 msgid "The computer couldn't download the application or input files."
-msgstr ""
+msgstr "Bilgisayar uygulamayı ya da girdi dosyalarını indiremedi."
 
 #: ../user/explain_state.php:95
 msgid "An error occurred during computation."
-msgstr ""
+msgstr "Hesaplama sırasında bir hata meydana geldi."
 
 #: ../user/explain_state.php:98
 msgid "The computer couldn't upload the output files."
-msgstr ""
+msgstr "Bilgisayar sonuç dosyalarını gönderemedi."
 
 #: ../user/explain_state.php:103
-#, fuzzy
 msgid "Time reported and deadline"
-msgstr "Raporlanma ya da<br />son teslim tarihi"
+msgstr "Raporlanma ya da son teslim tarihi"
 
 #: ../user/explain_state.php:106
 msgid ""
 "A task's <b>Time reported or deadline</b> field depends on whether the task "
 "has been reported yet:"
 msgstr ""
+"Bir işin <b>raporlanma ya da son teslim tarihi</b> işin raporlanıp "
+"raporlanmadığına işaret eder:"
 
 #: ../user/explain_state.php:110
-#, fuzzy
 msgid "Already reported"
-msgstr "Zaten arkadaÅŸ"
+msgstr "Zaten raporlandı"
 
 #: ../user/explain_state.php:110
 msgid "The date/time it was reported"
-msgstr ""
+msgstr "Raporlandığı tarih/saat"
 
 #: ../user/explain_state.php:111
 msgid "Not reported yet, deadline in the future"
-msgstr ""
+msgstr "Henüz raporlanmadı, son teslim tarihine daha var"
 
 #: ../user/explain_state.php:112
 msgid "Deadline, shown in green."
-msgstr ""
+msgstr "Son teslim tarihi yeşil olarak gösterilmekte."
 
 #: ../user/explain_state.php:114
 msgid "Not reported yet, deadline in the past"
-msgstr ""
+msgstr "Henüz raporlanmadı, son teslim tarihi geçti"
 
 #: ../user/explain_state.php:115
 msgid "Deadline, shown in red."
-msgstr ""
+msgstr "Son teslim tarihi kırmızı olarak gösterilmekte"
 
 #: ../user/explain_state.php:120
-#, fuzzy
 msgid "Unknown field"
-msgstr "Bilinmiyor"
+msgstr "Bilinmeyen sebep"
 
 #: ../user/ffmail_action.php:47
-#, fuzzy
 msgid "Email preview"
-msgstr "E-posta adresi"
+msgstr "E-posta önizlemesi"
 
 #: ../user/ffmail_action.php:48
 msgid "Your email will appear as follows:"
-msgstr ""
+msgstr "E-posta adresiniz şu şekilde görünecek:"
 
 #: ../user/ffmail_action.php:57
-#, fuzzy
 msgid "Send email"
-msgstr "Mesajı yolla"
+msgstr "E-posta gönder"
 
 #: ../user/ffmail_action.php:59
 msgid "Use your browser's back button to return to message form"
-msgstr ""
+msgstr "Mesaj formuna dönmek için tarayıcınızın Geri butonunu kullanın"
 
 #: ../user/ffmail_action.php:63
-#, fuzzy
 msgid "Sending emails"
-msgstr "Beklenen kredi"
+msgstr "E-postalar gönderiliyor"
 
 #: ../user/ffmail_action.php:84
 msgid "email sent successfully to %1"
-msgstr ""
+msgstr "%1 kişisine e-posta gönderimi başarıyla tamamlandı"
 
 #: ../user/ffmail_action.php:86
 msgid "failed to send email to %1: %2"
-msgstr ""
+msgstr "%1 kişisine e-posta gönderimi tamamlanamadı: %2"
 
 #: ../user/ffmail_action.php:92
 msgid "Thanks for telling your friends about %1"
-msgstr ""
+msgstr "Arkadaşlarınıza %1 projesinden bahsettiğiniz için teşekkürler"
 
 #: ../user/ffmail_action.php:94
 msgid ""
 "You forgot to enter your friends' names and/or email addresses; Please "
 "%1return to the form%2 and enter them."
 msgstr ""
+"Arkadaşlarınızın e-posta adreslerini ve/veya isimlerini girmeyi unuttunuz. "
+"Lütfen %1forma geri dönün%2 ve yazın."
 
 #: ../user/ffmail_form.php:31
 msgid ""
 "This project hasn\\'t created an email message - please notify its "
 "administrators"
 msgstr ""
+"Bu proje henüz bir e-posta mesajına sahip değil. Lütfen yöneticileri uyarın"
 
 #: ../user/ffmail_form.php:34
-#, fuzzy
 msgid "Tell your friends about %1"
-msgstr "%1 hakkındaki fikirleriniz"
+msgstr "Arkadaşlarınıza %1 projesinden bahsedin"
 
 #: ../user/ffmail_form.php:38
 msgid "Help us by telling your friends, family and coworkers about %1"
 msgstr ""
+"Lütfen, arkadaşlarınıza, ailenize ve çalışma arkadaşlarınıza %1 projesini "
+"duyurmamıza yardımcı olun"
 
 #: ../user/ffmail_form.php:40
 msgid ""
@@ -3554,36 +3543,33 @@ msgid ""
 "might be interested in %1. We'll send them an email in your name, and you "
 "can add your own message if you like."
 msgstr ""
+"Lütfen bu formu %1 projesiyle ilgilenebilecek kişilerin isim ve e-posta "
+"adresleriyle doldurun. Bir tanıtım e-postasını sizin isminizle göndereceğiz, "
+"isterseniz siz de özel bir mesaj ekleyebilirsiniz."
 
 #: ../user/ffmail_form.php:43
-#, fuzzy
 msgid "Your name:"
-msgstr "İsimleri göster"
+msgstr "Ä°sminiz:"
 
 #: ../user/ffmail_form.php:43
-#, fuzzy
 msgid "Your email address:"
-msgstr "e-posta adresi"
+msgstr "E-posta adresiniz:"
 
 #: ../user/ffmail_form.php:49
-#, fuzzy
 msgid "Friend's name:"
-msgstr "ArkadaÅŸlar"
+msgstr "Arkadaşınızın ismi:"
 
 #: ../user/ffmail_form.php:49
-#, fuzzy
 msgid "Friend's email address:"
-msgstr "Yeni e-posta adresi"
+msgstr "Arkadaşınızın e-posta adresi:"
 
 #: ../user/ffmail_form.php:57
-#, fuzzy
 msgid "Additional message (optional)"
-msgstr "İstiyorsanız buraya bir mesaj ekleyin:"
+msgstr "Ek mesaj (isteğe bağlı)"
 
 #: ../user/ffmail_form.php:60
-#, fuzzy
 msgid "Send"
-msgstr "Gönderen"
+msgstr "Yolla"
 
 #: ../user/forum_banishment_vote.php:35
 #: ../user/forum_banishment_vote_action.php:33
@@ -3595,14 +3581,12 @@ msgid "Banishment Vote"
 msgstr ""
 
 #: ../user/forum_banishment_vote.php:50
-#, fuzzy
 msgid "No user with this ID found."
-msgstr "%1 NO'suyla bilgisayar bulunamadı"
+msgstr "Bu NO'ya sahip kullanıcı bulunamadı."
 
 #: ../user/forum_banishment_vote.php:54 ../user/forum_moderate_post.php:76
-#, fuzzy
 msgid "User is already banished"
-msgstr "Kullanıcı uzaklaştırıldı"
+msgstr ""
 
 #: ../user/forum_banishment_vote.php:59 ../user/forum_moderate_post.php:79
 msgid ""
@@ -3636,22 +3620,19 @@ msgstr ""
 #: ../user/forum_banishment_vote.php:66
 #: ../user/forum_banishment_vote_action.php:61
 #: ../user/forum_moderate_post.php:59
-#, fuzzy
 msgid "User Request"
-msgstr "Ä°stek yok"
+msgstr "Kullanıcı talebi"
 
 #: ../user/forum_banishment_vote.php:67
 #: ../user/forum_banishment_vote_action.php:63
 #: ../user/forum_moderate_post.php:60 ../user/forum_moderate_thread.php:55
-#, fuzzy
 msgid "Other"
-msgstr "Farketmez"
+msgstr "DiÄŸer"
 
 #: ../user/forum_banishment_vote.php:69 ../user/forum_moderate_post.php:53
 #: ../user/forum_moderate_thread.php:85
-#, fuzzy
 msgid "Reason"
-msgstr "Sürüm"
+msgstr "Sebep"
 
 #: ../user/forum_banishment_vote.php:69 ../user/forum_moderate_thread.php:85
 msgid "Mailed if nonempty"
@@ -3663,29 +3644,28 @@ msgstr ""
 
 #: ../user/forum_banishment_vote_action.php:39
 #: ../user/forum_moderate_post_action.php:63
-#, fuzzy
 msgid "You must specify an action..."
-msgstr "Hesabınız için bir isim belirlemelisiniz."
+msgstr "Bir eylem seçmelisiniz..."
 
 #: ../user/forum_edit.php:41
 msgid ""
 "You can no longer edit this post.<br/>Posts can only be edited at most %1 "
 "minutes after they have been created."
 msgstr ""
+"Bu gönderiyi şu anda düzenleyemezsiniz.<br/>Gönderiler oluşturulduktan %1 "
+"dakika sonra düzenlenebilir."
 
 #: ../user/forum_edit.php:47
-#, fuzzy
 msgid "You are not authorized to edit this post."
-msgstr "%1 ile artık arkadaşsınız."
+msgstr "Bu gönderiyi düzenlemek için yetkili değilsiniz."
 
 #: ../user/forum_edit.php:86 ../user/forum_search.php:72
 msgid "Forum"
-msgstr ""
+msgstr "Forum"
 
 #: ../user/forum_edit.php:110
-#, fuzzy
 msgid "Edit your message"
-msgstr "Profilinizi düzenleyin"
+msgstr "Mesajınızı düzenleyin"
 
 #: ../user/forum_edit.php:115 ../user/forum_edit.php:120
 #: ../user/forum_post.php:109 ../user/forum_post.php:111
@@ -3695,128 +3675,111 @@ msgstr "Başlık"
 
 #: ../user/forum_edit.php:144 ../user/forum_post.php:129
 msgid "Add my signature to this post"
-msgstr "İmzamı bu iletiye ekle"
+msgstr "İmzamı bu gönderiye ekle"
 
 #: ../user/forum_forum.php:41
-#, fuzzy
 msgid "Not visible to you"
-msgstr "Bu forum sizin tarafınızdan görülebilir değil."
+msgstr "Size görünür değil"
 
 #: ../user/forum_forum.php:80
-#, fuzzy
 msgid "Team message board for %1"
-msgstr "%1 için bir mesaj panosu oluştur"
+msgstr "%1 için takım mesaj panosu"
 
 #: ../user/forum_forum.php:96
-#, fuzzy
 msgid "New thread"
-msgstr "Konu Başlığı"
+msgstr "Yeni konu başlığı"
 
 #: ../user/forum_forum.php:96
-#, fuzzy
 msgid "Add a new thread to this forum"
-msgstr "Bu konu başlığına yeni bir mesaj ekle"
+msgstr "Bu foruma yeni bir konu başlığı ekle"
 
 #: ../user/forum_forum.php:116
-#, fuzzy
 msgid "This message board is available as an %1RSS feed%2"
-msgstr "Haberler bir %sRSS beslemesi%s olarak da mevcuttur"
+msgstr "Bu mesaj panosu bir %sRSS beslemesi%s olarak da mevcuttur"
 
 #: ../user/forum_forum.php:172
-#, fuzzy
 msgid "This thread is hidden"
-msgstr "Bu konu başlığı moderatörler tarafından gizlendi"
+msgstr "Bu konu başlığı gizli"
 
 #: ../user/forum_forum.php:176
 msgid "This thread is sticky and locked, and you haven't read it yet"
-msgstr ""
+msgstr "Bu konu başlığı sabit ve kilitli, onu henüz okumadınız"
 
 #: ../user/forum_forum.php:176
 msgid "sticky/locked/unread"
-msgstr ""
+msgstr "sabit/kilitli/okunmamış"
 
 #: ../user/forum_forum.php:178
 msgid "This thread is sticky and you haven't read it yet"
-msgstr ""
+msgstr "Bu konu başlığı sabit ve onu henüz okumadınız"
 
 #: ../user/forum_forum.php:178
-#, fuzzy
 msgid "sticky/unread"
-msgstr "okunmamış"
+msgstr "sabit/okunmamış"
 
 #: ../user/forum_forum.php:182
 msgid "You haven't read this thread yet, and it's locked"
-msgstr ""
+msgstr "Bu konu başlığını henüz okumadınız ve kilitli"
 
 #: ../user/forum_forum.php:182
-#, fuzzy
 msgid "unread/locked"
-msgstr "okunmamış"
+msgstr "okunmamış/kilitli"
 
-# 81%
 #: ../user/forum_forum.php:184
-#, fuzzy
 msgid "You haven't read this thread yet"
-msgstr "Özel mesajınız bulunmuyor."
+msgstr "Bu konu başlığını henüz okumadınız"
 
 #: ../user/forum_forum.php:190
-#, fuzzy
 msgid "This thread is sticky and locked"
-msgstr "Bu konu başlığını üst konu başlığı yapar"
+msgstr "Bu konu başlığı sabit ve kilitli"
 
 #: ../user/forum_forum.php:190
 msgid "sticky/locked"
-msgstr ""
+msgstr "sabit/kilitli"
 
 #: ../user/forum_forum.php:192
-#, fuzzy
 msgid "This thread is sticky"
-msgstr "Bu konu başlığını üst konu başlığı yapar"
+msgstr "Bu konu başlığı sabit"
 
 #: ../user/forum_forum.php:192
-#, fuzzy
 msgid "sticky"
-msgstr "Ãœst konu yap"
+msgstr "sabit"
 
 #: ../user/forum_forum.php:196
-#, fuzzy
 msgid "This thread is locked"
-msgstr "Bu konu başlığını üst konu başlığı yapar"
+msgstr "Bu konu başlığı kilitli"
 
 #: ../user/forum_forum.php:196
-#, fuzzy
 msgid "locked"
-msgstr "Kilidi kaldır"
+msgstr "kilitli"
 
 #: ../user/forum_forum.php:198
-#, fuzzy
 msgid "You read this thread"
-msgstr "Bu konu başlığını gizler"
+msgstr "Bu konu başlığını okudunuz"
 
 #: ../user/forum_forum.php:198
-#, fuzzy
 msgid "read"
-msgstr "Konu Başlığı"
+msgstr "oku"
 
 #: ../user/forum_help_desk.php:27
-#, fuzzy
 msgid "Questions and answers"
-msgstr "Soru ve Yanıtlar"
+msgstr "Soru ve yanıtlar"
 
 #: ../user/forum_help_desk.php:30
 msgid ""
 "Talk live via Skype with a volunteer, in any of several languages. Go to "
 "%1BOINC Online Help%2."
 msgstr ""
+"Bir gönüllüyle Skype aracılığıyla konuşun. Bir çok dilde mevcuttur. %1BOINC "
+"Online Yardım%2a gidin."
 
 #: ../user/forum_help_desk.php:44 ../user/forum_index.php:92
 msgid "Topic"
 msgstr "Konu"
 
 #: ../user/forum_help_desk.php:45
-#, fuzzy
 msgid "Questions"
-msgstr "Sürüm"
+msgstr "Sorular"
 
 #: ../user/forum_index.php:53 ../user/team_forum.php:68
 msgid "Discussion among members of %1"
@@ -3835,218 +3798,202 @@ msgstr ""
 "Yanıtlar%2 bölümünü kullanın."
 
 #: ../user/forum_index.php:123
-#, fuzzy
 msgid "Subscribed threads"
-msgstr "Abone ol"
+msgstr "Abone olunan konu başlıkları"
 
 #: ../user/forum_moderate_post.php:43
-#, fuzzy
 msgid "Moderate post"
-msgstr "Son mesaj"
+msgstr "Gönderiyi denetle"
 
 #: ../user/forum_moderate_post.php:52
-#, fuzzy
 msgid "Hide post"
-msgstr "Gizle"
+msgstr "Gönderiyi gizle"
 
 #: ../user/forum_moderate_post.php:57 ../user/forum_moderate_thread.php:54
 msgid "Commercial spam"
-msgstr ""
+msgstr "Ticari reklam"
 
 #: ../user/forum_moderate_post.php:58
 msgid "Doublepost"
-msgstr ""
+msgstr "Çifte gönderi"
 
 #: ../user/forum_moderate_post.php:63
-#, fuzzy
 msgid "Move post"
-msgstr "Sunucu yok"
+msgstr "Gönderiyi taşı"
 
 #: ../user/forum_moderate_post.php:65
-#, fuzzy
 msgid "Destination thread ID:"
-msgstr "Cevap yaz"
+msgstr "Hedef konu numarası"
 
 #: ../user/forum_moderate_post.php:78
-#, fuzzy
 msgid "Banish user"
-msgstr "eşleşen kullanıcı yok"
+msgstr "Kullanıcıyı engelle"
 
 #: ../user/forum_moderate_post.php:80
-#, fuzzy
 msgid "Ban duration"
-msgstr "doÄŸrulama"
+msgstr "Engelleme süresi"
 
 #: ../user/forum_moderate_post.php:81
-#, fuzzy
 msgid "4 hours"
-msgstr "saat"
+msgstr "4 saat"
 
 #: ../user/forum_moderate_post.php:82 ../user/forum_search.php:45
-#, fuzzy
 msgid "1 day"
-msgstr "%1 gün"
+msgstr "1 gün"
 
 #: ../user/forum_moderate_post.php:83
 msgid "1 week"
-msgstr ""
+msgstr "1 hafta"
 
 #: ../user/forum_moderate_post.php:84
 msgid "2 weeks"
-msgstr ""
+msgstr "2 hafta"
 
 #: ../user/forum_moderate_post.php:85
-#, fuzzy
 msgid "1 month"
-msgstr "%1 dakika"
+msgstr "1 ay"
 
 #: ../user/forum_moderate_post.php:86
 msgid "Forever"
-msgstr ""
+msgstr "Süresiz"
 
 #: ../user/forum_moderate_post.php:96
 msgid "Optional explanation %1 This is included in email to user.%2"
 msgstr ""
+"İsteğe bağlı açıklama %1 Bu kullanıcıya gönderilecek e-postaya eklenecek.%2"
 
 #: ../user/forum_moderate_post.php:101 ../user/forum_moderate_thread.php:91
 #: ../user/forum_post.php:130 ../user/forum_report_post.php:84
 #: ../user/forum_rss.php:55 ../user/friend.php:81 ../user/get_passwd.php:41
 #: ../user/get_passwd.php:75
 msgid "OK"
-msgstr ""
+msgstr "Tamam"
 
 #: ../user/forum_moderate_post_action.php:57
-#, fuzzy
 msgid "You are not authorized to moderate this post."
-msgstr "%1 ile artık arkadaşsınız."
+msgstr "Bu gönderiyi denetlemek için yetkili değilsiniz"
 
 #: ../user/forum_moderate_post_action.php:85
 msgid "Can't move to different category type"
-msgstr ""
+msgstr "Farklı kategori tipine taşınamıyor"
 
 #: ../user/forum_moderate_post_action.php:89
 msgid "Can't move to different category"
-msgstr ""
+msgstr "Farklı kategoriye taşınamıyor"
 
 #: ../user/forum_moderate_post_action.php:110
 msgid "Not authorized to banish users"
-msgstr ""
+msgstr "Kullanıcıları engellemek için yetkili değil"
 
 #: ../user/forum_moderate_post_action.php:126
-#, fuzzy
 msgid "Banishment"
-msgstr "Gönderilmemiş"
+msgstr "Engelleme"
 
 #: ../user/forum_moderate_post_action.php:128
-#, fuzzy
 msgid "User %1 has been banished."
-msgstr "Kullanıcı uzaklaştırıldı"
+msgstr "%1 kullanıcısı engellendi."
 
 #: ../user/forum_moderate_post_action.php:131
 msgid "Action failed: possible database problem"
-msgstr ""
+msgstr "Eylem başarısız: Muhtemelen database problemi"
 
 #: ../user/forum_moderate_thread.php:33
 msgid "not authorized"
-msgstr ""
+msgstr "yetkili deÄŸil"
 
 #: ../user/forum_moderate_thread.php:36
 msgid "Moderate thread '%1'"
-msgstr ""
+msgstr "'%1' konu başlığını denetle"
 
 #: ../user/forum_moderate_thread.php:48
 msgid ""
 "Select the reason category, or write a longer description of why you're "
 "hiding or locking the thread; then press OK."
 msgstr ""
+"Bir sebep kategorisi seçin ya da konu başlığını neden kilitlediğinize ya da "
+"gizlediğinize ilişkin bir açıklama yazın; ardından Tamam'ı tıklayın."
 
 #: ../user/forum_moderate_thread.php:72
-#, fuzzy
 msgid "Current forum"
-msgstr "Mevcut parola"
+msgstr "Mevcut forum"
 
 #: ../user/forum_moderate_thread.php:73
-#, fuzzy
 msgid "Destination forum"
-msgstr "Takımın tanıtımı"
+msgstr "Hedef forum"
 
 #: ../user/forum_moderate_thread.php:77
-#, fuzzy
 msgid "New title:"
-msgstr "Başlığı düzenle"
+msgstr "Yeni başlık:"
 
 #: ../user/forum_post.php:40
 msgid ""
 "Only project admins may create a thread here. However, you may reply to "
 "existing threads."
 msgstr ""
+"Burada yalnızca proje yöneticileri konu başlığı yaratabilir. Bununla "
+"birlikte, mevcut konu başlıklarına yanıt yazabilirsiniz."
 
 #: ../user/forum_post.php:60
-#, fuzzy
 msgid ""
 "Your message was flagged as spam by the Akismet anti-spam system. Please "
 "modify your text and try again."
 msgstr ""
-"İlk yanıtınız Akismet anti-spam sistemi tarafından bir saldırı olarak "
-"algılandı.  Lütfen yazdığınızı değiştirip tekrar deneyin."
+"Mesajınız Akismet anti-spam sistemi tarafından bir saldırı olarak "
+"algılandı.  Lütfen yazdığınızı değiştirip, tekrar deneyin."
 
 #: ../user/forum_post.php:70
-#, fuzzy
 msgid "Create new thread"
 msgstr "Yeni konu başlığı oluştur"
 
 #: ../user/forum_post.php:100
 msgid "Create a new thread"
-msgstr "Yeni konu başlığı oluştur"
+msgstr "Yeni bir konu başlığı oluştur"
 
 #: ../user/forum_post.php:105
 msgid "Remember to add a title"
-msgstr ""
+msgstr "Bir başlık eklemeyi unutmayın"
 
 #: ../user/forum_post.php:127
 msgid "Show this item as a Notice in the BOINC Manager"
-msgstr ""
+msgstr "Bunu Bildirim olarak BOINC Manager'da görüntüle"
 
 #: ../user/forum_post.php:127
 msgid "Do so only for items likely to be of interest to all volunteers."
 msgstr ""
+"Sadece, tüm gönüllüleri ilgilendirmesi muhtemel öğeler için bunu yapın."
 
 #: ../user/forum_rate.php:26
 msgid "Rating offline"
 msgstr ""
 
 #: ../user/forum_rate.php:27
-#, fuzzy
 msgid "This function is turned off by the project"
-msgstr "Bu özellik geçici olarak kapatıldı"
+msgstr "Bu özellik proje tarafından kapatıldı"
 
 #: ../user/forum_rate.php:58
-#, fuzzy
 msgid "You need more average or total credit to rate a post."
-msgstr "İleti gönderebilmek için sahip olunması gereken en az ortalama kredi"
+msgstr ""
+"Oylayabilmek için daha fazla ortalama ya da toplam krediye sahip olmalısınız."
 
 #: ../user/forum_rate.php:62
-#, fuzzy
 msgid "You have already rated this post."
-msgstr "Zaten %1 takımının üyesisiniz."
+msgstr ""
 
 #: ../user/forum_rate.php:62 ../user/forum_rate.php:78
 #: ../user/forum_rate.php:83 ../user/forum_report_post.php:68
 #: ../user/forum_report_post.php:93 ../user/forum_subscribe.php:54
 #: ../user/forum_subscribe.php:69 ../user/forum_thread_status.php:51
-#, fuzzy
 msgid "Return to thread"
-msgstr "Takım sayfasına dön"
+msgstr "Konu başlığına dön"
 
 #: ../user/forum_rate.php:72
 #, fuzzy
 msgid "Input Recorded"
-msgstr "Oy Kaydedildi"
+msgstr "Girdi Kaydedildi"
 
 #: ../user/forum_rate.php:73
-#, fuzzy
 msgid "Your input has been recorded. Thanks for your help."
-msgstr "Öneriniz kaydedildi."
+msgstr ""
 
 #: ../user/forum_rate.php:75
 #, fuzzy
@@ -4054,22 +4001,20 @@ msgid "Vote Registered"
 msgstr "Oy Kaydedildi"
 
 #: ../user/forum_rate.php:76
-#, fuzzy
 msgid "Your rating has been recorded. Thanks for your input."
-msgstr "Öneriniz kaydedildi."
+msgstr ""
 
 #: ../user/forum_rate.php:80
 msgid "Vote Submission Problem"
 msgstr ""
 
 #: ../user/forum_reply.php:76
-#, fuzzy
 msgid ""
 "Your post has been flagged as spam by the Akismet anti-spam system. Please "
 "modify your text and try again."
 msgstr ""
-"İlk yanıtınız Akismet anti-spam sistemi tarafından bir saldırı olarak "
-"algılandı.  Lütfen yazdığınızı değiştirip tekrar deneyin."
+"Gönderiniz Akismet anti-spam sistemi tarafından bir saldırı olarak "
+"algılandı.  Lütfen yazdığınızı değiştirip, tekrar deneyin."
 
 #: ../user/forum_reply.php:87 ../user/forum_thread.php:154
 #: ../user/forum_thread.php:274
@@ -4077,49 +4022,46 @@ msgid "Post to thread"
 msgstr "Cevap yaz"
 
 #: ../user/forum_reply.php:127
-#, fuzzy
 msgid "Message:"
-msgstr "Mesaj"
+msgstr "Mesaj:"
 
 #: ../user/forum_reply.php:130
 msgid "reply to %1Message ID%2:"
-msgstr ""
+msgstr "%1Mesaj NO%2'ya yanıt:"
 
 #: ../user/forum_reply.php:154
-#, fuzzy
 msgid "Post reply"
-msgstr "Yanıt yok"
+msgstr "Yanıt gönder"
 
 #: ../user/forum_reply.php:157
-#, fuzzy
 msgid "Add my signature to this reply"
-msgstr "İmzamı bu iletiye ekle"
+msgstr "İmzamı bu yanıta ekle"
 
 #: ../user/forum_report_post.php:45
-#, fuzzy
 msgid "You need more average or total credit to report a post."
-msgstr "İleti gönderebilmek için sahip olunması gereken en az ortalama kredi"
+msgstr ""
+"Gönderi raporlayabilmeniz için daha fazla ortalama ya da toplam krediye "
+"sahip olmalısınız."
 
 #: ../user/forum_report_post.php:64
-#, fuzzy
 msgid "Report Registered"
-msgstr "Son teslim tarihi"
+msgstr "Raporlama kaydedildi"
 
 #: ../user/forum_report_post.php:65
-#, fuzzy
 msgid "Your report has been recorded. Thanks you for your input."
-msgstr "Öneriniz kaydedildi."
+msgstr "Raporunuz kaydedildi. Çabanız için teşekkürler."
 
 #: ../user/forum_report_post.php:66
 msgid ""
 "A moderator will now look at your report and decide what will happen - this "
 "may take a little while, so please be patient"
 msgstr ""
+"Bir yönetici raporunuza bakacak ve ne yapılacağına karar verecek - bu belli "
+"bir süre alabilir, lütfen sabırlı olun"
 
 #: ../user/forum_report_post.php:70
-#, fuzzy
 msgid "Report a forum post"
-msgstr "Son mesaj"
+msgstr "Bir forum gönderisini raporla"
 
 #: ../user/forum_report_post.php:72
 msgid ""
@@ -4127,11 +4069,13 @@ msgid ""
 "enough users rate a post negatively it will eventually be hidden.<br />You "
 "can find the rating system at the bottom of the post."
 msgstr ""
+"Bu gönderiyi raporlamadan önce, +/- oylama sistemini kullanmayı tercih edin. "
+"Eğer yeterli sayıda kullanıcı olumsuz oy kullanırsa, en sonunda gizli hale "
+"gelecek.<br />Oylama sistemini gönderinin altında bulabilirsiniz."
 
 #: ../user/forum_report_post.php:79
-#, fuzzy
 msgid "Report post"
-msgstr "Son mesaj"
+msgstr "Gönderiyi raporla"
 
 #: ../user/forum_report_post.php:80
 msgid ""
@@ -4139,34 +4083,35 @@ msgid ""
 "that a person that\n"
 "has not yet read the thread will quickly be able to identify the issue.%2"
 msgstr ""
+"Gönderiyi neden saldırgan buldunuz: %1Yeterli bilgi eklemeyi unutmayın. "
+"Böylece konu başlığını\n"
+"henüz okumamış bir kişinin sorunu kısa sürede tespit etmesi mümkün olacak.%2"
 
 #: ../user/forum_report_post.php:89
-#, fuzzy
 msgid "Report not registered"
-msgstr "Son teslim tarihi"
+msgstr "Rapor kaydedilmedi"
 
 #: ../user/forum_report_post.php:90
 msgid "Your report could not be recorded. Please wait a while and try again."
-msgstr ""
+msgstr "Raporunuz kaydedilmedi. Bir süre bekleyip tekrar deneyin."
 
 #: ../user/forum_report_post.php:91
 msgid ""
 "If this is not a temporary error, please report it to the project developers."
 msgstr ""
+"Bu geçici bir sorun değilse, lütfen proje yöneticilerine durumu bildirin."
 
 #: ../user/forum_rss.php:41
 msgid "%1 RSS feed"
-msgstr ""
+msgstr "%1 RSS beslemesi"
 
 #: ../user/forum_rss.php:42
-#, fuzzy
 msgid "This message board is available as an RSS feed."
-msgstr "Haberler bir %sRSS beslemesi%s olarak da mevcuttur"
+msgstr "Bu mesaj panosu bir RSS beslemesi olarak da mevcuttur."
 
 #: ../user/forum_rss.php:43
-#, fuzzy
 msgid "Options:"
-msgstr "İsteğe bağlı"
+msgstr "Seçenekler:"
 
 #: ../user/forum_rss.php:47
 msgid "Include only posts by user ID %1 (default: all users)."
@@ -4189,14 +4134,12 @@ msgid "Forum search"
 msgstr "Forum ara"
 
 #: ../user/forum_search.php:31
-#, fuzzy
 msgid "Search query"
-msgstr "Arama tipi"
+msgstr ""
 
 #: ../user/forum_search.php:32
-#, fuzzy
 msgid "Search for keywords:"
-msgstr "Forumlarda ara"
+msgstr ""
 
 #: ../user/forum_search.php:33
 msgid "Posts that contain all the specified words will be displayed"
@@ -4207,9 +4150,8 @@ msgid "For example: \"screensaver freeze\""
 msgstr ""
 
 #: ../user/forum_search.php:36
-#, fuzzy
 msgid "Search for author ID:"
-msgstr "Forumlarda ara"
+msgstr ""
 
 #: ../user/forum_search.php:37
 msgid "Only posts by this author will be displayed"
@@ -4220,23 +4162,20 @@ msgid "For example: \"43214\""
 msgstr ""
 
 #: ../user/forum_search.php:41
-#, fuzzy
 msgid "Search options"
-msgstr "Forumlarda ara"
+msgstr "seçenekler"
 
 #: ../user/forum_search.php:42
-#, fuzzy
 msgid "Search limits"
-msgstr "Arama Sonuçları"
+msgstr ""
 
 #: ../user/forum_search.php:43
 msgid "Search at most this many days back in time"
 msgstr ""
 
 #: ../user/forum_search.php:50 ../user/forum_search.php:51
-#, fuzzy
 msgid "%1 months"
-msgstr "%1 dakika"
+msgstr "%1 ay"
 
 #: ../user/forum_search.php:52
 msgid "1 year"
@@ -4247,9 +4186,8 @@ msgid "Only display posts from this forum"
 msgstr ""
 
 #: ../user/forum_search.php:84
-#, fuzzy
 msgid "Sort by"
-msgstr "Sırala"
+msgstr ""
 
 #: ../user/forum_search.php:88
 msgid "Start the search"
@@ -4260,14 +4198,12 @@ msgid "Forum search results"
 msgstr "Forum arama sonuçları"
 
 #: ../user/forum_search_action.php:174
-#, fuzzy
 msgid "Thread titles matching your query:"
-msgstr "Aramanızla eşleşen profil yok."
+msgstr "Aramanızla eşleşen konu başlıkları:"
 
 #: ../user/forum_search_action.php:194
-#, fuzzy
 msgid "Messages matching your query:"
-msgstr "Aramanızla eşleşen profil yok."
+msgstr "Aramanızla eşleşen mesajlar:"
 
 #: ../user/forum_search_action.php:217
 msgid ""
@@ -4281,12 +4217,11 @@ msgstr ""
 
 #: ../user/forum_search_action.php:224
 msgid "Perform another search"
-msgstr ""
+msgstr "arama sonuçları"
 
 #: ../user/forum_subscribe.php:46
-#, fuzzy
 msgid "Subscription successful"
-msgstr "Güncelleme başarılı"
+msgstr "Abonelik başarılı"
 
 #: ../user/forum_subscribe.php:49
 msgid ""
@@ -4295,22 +4230,17 @@ msgid ""
 msgstr ""
 
 #: ../user/forum_subscribe.php:51
-#, fuzzy
 msgid "Subscription failed"
-msgstr "Takımın tanıtımı"
+msgstr "Abonelik başarısız"
 
 #: ../user/forum_subscribe.php:52
-#, fuzzy
 msgid ""
 "We are currently unable to subscribe you to %1. Please try again later.."
-msgstr ""
-"Şu anda yeni hesap oluşturma seçeneği mevcut değil. Lütfen daha sonra tekrar "
-"deneyin."
+msgstr "Sizi %1 konusuna abone yapamadık. Lütfen daha sonra tekrar deneyin."
 
 #: ../user/forum_subscribe.php:61
-#, fuzzy
 msgid "Unsubscription successful"
-msgstr "Güncelleme başarılı"
+msgstr ""
 
 #: ../user/forum_subscribe.php:64
 msgid ""
@@ -4319,31 +4249,26 @@ msgid ""
 msgstr ""
 
 #: ../user/forum_subscribe.php:66
-#, fuzzy
 msgid "Unsubscription failed"
-msgstr "AboneliÄŸi bitir"
+msgstr ""
 
 #: ../user/forum_subscribe.php:67
-#, fuzzy
 msgid ""
 "We are currently unable to unsubscribe you from %1. Please try again later.."
 msgstr ""
-"Şu anda yeni hesap oluşturma seçeneği mevcut değil. Lütfen daha sonra tekrar "
-"deneyin."
+"%1 konusundan aboneliğinizi kaldıramadık. Lütfen daha sonra tekrar deneyin."
 
 #: ../user/forum_subscribe.php:74
-#, fuzzy
 msgid "Unknown subscription action"
-msgstr "Bilinmeyen eylem"
+msgstr "Bilinmeyen abonelik eylemi"
 
 #: ../user/forum_thread.php:61
 msgid "This forum is not visible to you."
 msgstr "Bu forum sizin tarafınızdan görülebilir değil."
 
 #: ../user/forum_thread.php:69
-#, fuzzy
 msgid "This thread has been hidden by moderators."
-msgstr "Bu konu başlığı moderatörler tarafından gizlendi"
+msgstr "Bu konu başlığı moderatörler tarafından gizlendi."
 
 #: ../user/forum_thread.php:125
 msgid "My question was answered"
@@ -4455,16 +4380,15 @@ msgstr "Sırala"
 
 #: ../user/forum_thread_status.php:49
 msgid "Thread status updated"
-msgstr ""
+msgstr "Konu başlığı durum bilgisi güncellendi"
 
 #: ../user/forum_thread_status.php:50
 msgid "The status has been updated."
-msgstr ""
+msgstr "Durum bilgisi güncellendi."
 
 #: ../user/forum_user_posts.php:73
-#, fuzzy
 msgid "Posts by %1"
-msgstr "Cevaplar"
+msgstr ""
 
 #: ../user/friend.php:33
 msgid "Already friends"
@@ -4491,7 +4415,6 @@ msgid "Add friend"
 msgstr "ArkadaÅŸ ekle"
 
 #: ../user/friend.php:74
-#, fuzzy
 msgid ""
 "You have asked to add %1 as a friend. We will notify %1 and will ask him/her "
 "to confirm that you are friends."
@@ -4512,9 +4435,8 @@ msgid "We have notified %1 of your request."
 msgstr "%1 kullanıcısını isteğiniz konusunda uyardık."
 
 #: ../user/friend.php:126
-#, fuzzy
 msgid "Please log in as %1"
-msgstr "Lütfen oturum açın"
+msgstr ""
 
 #: ../user/friend.php:127
 msgid "You must log in as %1 to view this friend request"
@@ -4525,9 +4447,8 @@ msgid "Friend request"
 msgstr "Arkadaşlık isteği"
 
 #: ../user/friend.php:141
-#, fuzzy
 msgid "%1 has requested friendship with you."
-msgstr "%1 ile %2 üzerinde arkadaşlık isteği aldınız."
+msgstr "%1 sizinle arkadaÅŸ olmak istedi."
 
 #: ../user/friend.php:143
 msgid "%1 says: %2"
@@ -4598,9 +4519,8 @@ msgid "Your friendship with %1 has been cancelled."
 msgstr "%1 ile arkadaşlığınız bitti."
 
 #: ../user/get_passwd.php:25
-#, fuzzy
 msgid "Forgot your account info?"
-msgstr "diÄŸer hesap bilgisi"
+msgstr ""
 
 #: ../user/get_passwd.php:28
 msgid ""
@@ -4649,13 +4569,10 @@ msgid "Paste the string into the field below, and click OK."
 msgstr ""
 
 #: ../user/get_passwd.php:65
-#, fuzzy
 msgid ""
 "You will now be logged in to your account; update the email and password of "
 "your account."
 msgstr ""
-"%1 hesabınızın bağlı olduğu e-posta adresini doğrulamak için bu linke "
-"tıklayın:"
 
 #: ../user/get_passwd.php:71
 msgid "Log in with authenticator"
@@ -4694,62 +4611,55 @@ msgstr "Hesabınız"
 
 #: ../user/host_app_versions.php:26
 msgid "nvidia GPU"
-msgstr ""
+msgstr "nvidia GPU"
 
 #: ../user/host_app_versions.php:36
-#, fuzzy
 msgid "Anonymous platform, missing app"
-msgstr "Anonim platform"
+msgstr "Anonim platform, uygulama mevcut deÄŸil"
 
 #: ../user/host_app_versions.php:39
-#, fuzzy
 msgid "anonymous platform"
-msgstr "Anonim platform"
+msgstr "anonim platform"
 
 #: ../user/host_app_versions.php:43
 msgid "Missing app version"
-msgstr ""
+msgstr "Uygulama sürümü meccut değil"
 
 #: ../user/host_app_versions.php:45
-#, fuzzy
 msgid "Missing app"
-msgstr "geçersiz arama tipi"
+msgstr "Uygulama mevcut deÄŸil"
 
 #: ../user/host_app_versions.php:47
 msgid "Missing platform"
-msgstr ""
+msgstr "Platform mevcut deÄŸil"
 
 #: ../user/host_app_versions.php:56
 msgid "Number of tasks completed"
-msgstr ""
+msgstr "Tamamlanan iş sayısı"
 
 #: ../user/host_app_versions.php:57
-#, fuzzy
 msgid "Max tasks per day"
-msgstr "Görüntülenecek iş yok"
+msgstr ""
 
 #: ../user/host_app_versions.php:58
-#, fuzzy
 msgid "Number of tasks today"
-msgstr "Görüntülenecek iş yok"
+msgstr ""
 
 #: ../user/host_app_versions.php:59
 msgid "Consecutive valid tasks"
 msgstr ""
 
 #: ../user/host_app_versions.php:63
-#, fuzzy
 msgid "Average processing rate"
-msgstr "Ortalama gönderme hızı"
+msgstr "Ortalama hesaplama hızı"
 
 #: ../user/host_app_versions.php:72
 msgid "Application details for host %1"
 msgstr "%1 istemcisi için uygulama detayları"
 
 #: ../user/host_delete.php:31
-#, fuzzy
 msgid "We have no record of that computer."
-msgstr "Bu bilgisayarın yinelenen kayıtlarını birleştir"
+msgstr "Bi bilgisayar hakkında kayda sahip değiliz."
 
 #: ../user/host_delete.php:38
 msgid ""
@@ -4759,29 +4669,24 @@ msgid ""
 msgstr ""
 
 #: ../user/host_delete.php:40
-#, fuzzy
 msgid "Delete record of computer"
-msgstr "Bu bilgisayarı sil"
+msgstr "Bu bilgisayarın kaydını sil"
 
 #: ../user/host_delete.php:41
-#, fuzzy
 msgid "Record deleted."
-msgstr "Son teslim tarihi"
+msgstr "Kayıt silindi."
 
 #: ../user/host_delete.php:42 ../user/host_edit_action.php:65
-#, fuzzy
 msgid "Return to list of your computers"
-msgstr "%1 projesini yalnızca yetkili bilgisayarlarda çalıştırın"
+msgstr ""
 
 #: ../user/host_edit_action.php:39
-#, fuzzy
 msgid "Merge computer records"
-msgstr "Bilgisayarları isme göre birleştir"
+msgstr "Bilgisayar kayıtlarını birleştir"
 
 #: ../user/host_edit_form.php:35
-#, fuzzy
 msgid "Merge computers"
-msgstr "Bilgisayarları isme göre birleştir"
+msgstr "Bilgisayarları birleştir"
 
 #: ../user/host_edit_form.php:38
 msgid ""
@@ -4794,9 +4699,8 @@ msgid "No hosts are eligible for merging with this one."
 msgstr ""
 
 #: ../user/host_edit_form.php:58 ../user/host_edit_form.php:114
-#, fuzzy
 msgid "Show details"
-msgstr "İsimleri göster"
+msgstr "Detaylarını görüntüle"
 
 #: ../user/host_edit_form.php:66
 msgid ""
@@ -4812,32 +4716,29 @@ msgid "created"
 msgstr "oluÅŸturulma"
 
 #: ../user/host_edit_form.php:70
-#, fuzzy
 msgid "computer ID"
-msgstr "Bilgisayar NO"
+msgstr "bilgisayar NO"
 
 #: ../user/host_edit_form.php:77
-#, fuzzy
 msgid "no hostname"
-msgstr "Sunucu yok"
+msgstr "sunucu ismi yok"
 
 #: ../user/host_edit_form.php:109
-#, fuzzy
 msgid "Merge hosts"
-msgstr "BirleÅŸtir"
+msgstr "Sunucuları birleştir"
 
 #: ../user/host_update_credit.php:28
 msgid "Updating computer credit"
-msgstr ""
+msgstr "Blgisayar kredisini güncelle"
 
 #: ../user/host_venue_action.php:41
+#, fuzzy
 msgid "Host venue updated"
-msgstr ""
+msgstr "Bilgisayar toplamı güncellendi"
 
 #: ../user/host_venue_action.php:43
-#, fuzzy
 msgid "none"
-msgstr "Tamamlandı"
+msgstr "yok"
 
 #: ../user/host_venue_action.php:46
 msgid "The venue of this host has been set to %1."
@@ -4850,35 +4751,30 @@ msgid ""
 msgstr ""
 
 #: ../user/host_venue_action.php:50
-#, fuzzy
 msgid "Return to host page"
-msgstr "Takım sayfasına dön"
+msgstr "Sunucu sayfasına dön"
 
 #: ../user/hosts_user.php:53
 msgid "Computers belonging to %1"
 msgstr "%1 kullanıcısına ait bilgisayarlar"
 
 #: ../user/hosts_user.php:55
-#, fuzzy
 msgid "Computers hidden"
-msgstr "Bilgisayar bilgisi"
+msgstr "Gizlenen bilgisayarlar"
 
 #: ../user/hosts_user.php:56
-#, fuzzy
 msgid ""
 "This user has chosen not to show information about his or her computers."
 msgstr ""
 "Bu kullanıcı, bilgisayarları hakkında bilgi gösterilmemesini tercih etti."
 
 #: ../user/hosts_user.php:64
-#, fuzzy
 msgid "Your computers"
-msgstr "En iyi bilgisayarlar"
+msgstr "Bilgisayarlarınız"
 
 #: ../user/html.php:23
-#, fuzzy
 msgid "Allowed HTML tags"
-msgstr "HTML etiketleri kullanmayın."
+msgstr "Ä°zin verilen HTML etiketleri"
 
 #: ../user/html.php:25
 msgid "The following HTML tags are allowed in team descriptions:"
@@ -4905,9 +4801,8 @@ msgid "break"
 msgstr ""
 
 #: ../user/html.php:32
-#, fuzzy
 msgid "preformatted"
-msgstr "OluÅŸturulma"
+msgstr ""
 
 #: ../user/html.php:33
 msgid ""
@@ -4934,8 +4829,8 @@ msgid ""
 "using their computers for projects such as %1."
 msgstr ""
 "%1 projesini yalnızca kendi bilgisayarınızda ya da sahibinin izin verdiği "
-"bilgisayarlarda çalıştırın. Bazı okul ya da şirketlerin, bilgisayarlarının %"
-"1 gibi projeler için kullanılmaması yönünde politikaları bulunabilir."
+"bilgisayarlarda çalıştırın. Bazı okul ya da şirketlerin, bilgisayarlarının "
+"%1 gibi projeler için kullanılmaması yönünde politikaları bulunabilir."
 
 #: ../user/info.php:38
 msgid "How %1 will use your computer"
@@ -5065,7 +4960,7 @@ msgstr ""
 msgid ""
 "%1 was developed by %2. BOINC was developed at the University of California."
 msgstr ""
-"%1, %2 tarafından geliştirildi. BOINC, University of California'da "
+"%1, %2 tarafından geliştirildi. BOINC, Kaliforniya Üniversitesi'nde "
 "geliÅŸtirildi."
 
 #: ../user/info.php:53
@@ -5102,8 +4997,8 @@ msgid ""
 "own risk."
 msgstr ""
 "Bu diğer projeler, %1 ile ortak değildir ve onların güvenlik yöntemlerine ya "
-"da araştırmalarının doğasına kefil olmayız. Diğer projelere, riski "
-"kendinize ait olmak üzere katılın."
+"da araştırmalarının doğasına kefil olmayız. Diğer projelere, riski kendinize "
+"ait olmak üzere katılın."
 
 #: ../user/language_select.php:44
 msgid "Language selection"
@@ -5175,18 +5070,16 @@ msgid "forgot password?"
 msgstr "parolanızı mı unuttunuz?"
 
 #: ../user/login_form.php:57
-#, fuzzy
 msgid "Stay logged in"
-msgstr "Giriş yapılmadı."
+msgstr "Daima bağlı kal"
 
 #: ../user/login_form.php:63
 msgid "or %1create an account%2."
 msgstr "ya da %1bir hesap oluÅŸtur%2."
 
 #: ../user/merge_by_name.php:33
-#, fuzzy
 msgid "Processing %1"
-msgstr "Sürüyor"
+msgstr "Sürüyor %1"
 
 #: ../user/merge_by_name.php:45
 #, fuzzy
@@ -5194,9 +5087,8 @@ msgid "Merged %1 into %2"
 msgstr "Sunucu %1, %2 ile birleÅŸtiriliyor"
 
 #: ../user/merge_by_name.php:74
-#, fuzzy
 msgid "Return to the list of your computers"
-msgstr "%1 projesini yalnızca yetkili bilgisayarlarda çalıştırın"
+msgstr ""
 
 #: ../user/merge_by_name.php:78
 msgid ""
@@ -5213,9 +5105,8 @@ msgid "Go ahead and do this"
 msgstr ""
 
 #: ../user/merge_by_name.php:85
-#, fuzzy
 msgid "Return to the list of computers"
-msgstr "%1 projesini yalnızca yetkili bilgisayarlarda çalıştırın"
+msgstr "Bilgisayarlar sayfasına dön"
 
 #: ../user/moderation.php:26
 msgid ""
@@ -5266,35 +5157,31 @@ msgstr ""
 
 #: ../user/pending.php:66
 msgid "Result ID"
-msgstr ""
+msgstr "Sonuç NO"
 
 #: ../user/pending.php:66
-#, fuzzy
 msgid "Workunit ID"
 msgstr "Ä°ÅŸ birimi NO"
 
 #: ../user/pending.php:66
-#, fuzzy
 msgid "Host ID"
-msgstr "Sunucu"
+msgstr "Sunucu NO"
 
 #: ../user/pending.php:66
 msgid "Claimed credit"
 msgstr "Ä°stenen kredi"
 
 #: ../user/pending.php:79
-#, fuzzy
 msgid "Pending credit: %1"
-msgstr "Beklenen kredi"
+msgstr "Beklenen kredi: %1"
 
 #: ../user/pm.php:32
 msgid "Block messages from this user"
 msgstr ""
 
 #: ../user/pm.php:32
-#, fuzzy
 msgid "Block user"
-msgstr "Böyle bir kullanıcı yok"
+msgstr ""
 
 #: ../user/pm.php:73
 msgid "Your message has been sent."
@@ -5309,22 +5196,20 @@ msgid "Sender and date"
 msgstr "Gönderen ve tarih"
 
 #: ../user/pm.php:106
-#, fuzzy
 msgid "Reply to this message"
-msgstr "Takım sayfasına dön"
+msgstr "konu başlığına yeni bir mesaj ekle"
 
 #: ../user/pm.php:107
-#, fuzzy
 msgid "Delete this message"
-msgstr "Seçili mesajları sil"
+msgstr "Bu mesajı sil"
 
 #: ../user/pm.php:112
 msgid "Select all"
-msgstr ""
+msgstr "Tümünü seç"
 
 #: ../user/pm.php:114
 msgid "Unselect all"
-msgstr ""
+msgstr "Tümünün seçimini kaldır"
 
 #: ../user/pm.php:117
 msgid "Delete selected messages"
@@ -5343,14 +5228,14 @@ msgid "You need to fill all fields to send a private message"
 msgstr "Özel mesaj göndermek için tüm alanları doldurmalısınız"
 
 #: ../user/pm.php:188
-#, fuzzy
 msgid ""
 "Your message was flagged as spam\n"
 "                by the Akismet anti-spam system.\n"
 "                Please modify your text and try again."
 msgstr ""
-"İlk yanıtınız Akismet anti-spam sistemi tarafından bir saldırı olarak "
-"algılandı.  Lütfen yazdığınızı değiştirip tekrar deneyin."
+"İlk yanıtınız Akismet anti-spam sistemi\n"
+"                tarafından bir saldırı olarak algılandı.\n"
+"                Lütfen yazdığınızı değiştirip tekrar deneyin."
 
 #: ../user/pm.php:205
 msgid "Could not find user with id %1"
@@ -5419,21 +5304,19 @@ msgid "To unblock, visit %1message board preferences%2"
 msgstr "Engellemeyi kaldırmak için, %1forum tercihlerini%2 ziyaret edin"
 
 #: ../user/pm.php:302
-#, fuzzy
 msgid "Unknown action"
 msgstr "Bilinmeyen eylem"
 
 #: ../user/prefs.php:36
-#, fuzzy
 msgid ""
 "Your preferences have been updated, and\n"
 "          will take effect when your computer communicates with %1\n"
 "          or you issue the %2Update%3 command from the BOINC Manager."
 msgstr ""
 "Tercihleriniz güncellendi. Güncel tercihler,\n"
-"\t      bilgisayarınız %1 ile ilk bağlantı kurduğunda ya da\n"
-"\t      BOINC Manager'da %2Güncelle%3 komutunu kullandığınızda kullanılmaya "
-"baÅŸlanacak."
+"          bilgisayarınız %1 ile ilk bağlantı kurduğunda ya da\n"
+"          BOINC Manager'da %2Güncelle%3 komutunu kullandığınızda "
+"kullanılmaya başlanacak."
 
 #: ../user/prefs_edit.php:65 ../user/prefs_edit.php:93
 msgid "%1 for %2"
@@ -5553,26 +5436,23 @@ msgstr "Profile dön."
 
 #: ../user/profile_search_action.php:36
 msgid "Profiles containing '%1'"
-msgstr ""
+msgstr "'%1' içeren profiller"
 
 #: ../user/profile_search_action.php:40
-#, fuzzy
 msgid "User name"
-msgstr "İş adı"
+msgstr "Kullanıcı adı"
 
 #: ../user/profile_search_action.php:41
-#, fuzzy
 msgid "Joined project"
-msgstr "%1 takımına katılım"
+msgstr "Katıldığı projeler"
 
 #: ../user/profile_search_action.php:44
-#, fuzzy
 msgid "Recent credit"
-msgstr "güncel krediye sahip"
+msgstr "Güncel ortalama kredi"
 
 #: ../user/profile_search_action.php:54
 msgid "No profiles found containing '%1'"
-msgstr ""
+msgstr "'%1' içeren profil bulunamadı"
 
 #: ../user/result.php:30
 msgid "No such task"
@@ -5755,9 +5635,8 @@ msgid "users in last 24h"
 msgstr "son 24 saatteki yeni üyeler"
 
 #: ../user/show_host_detail.php:40
-#, fuzzy
 msgid "Computer %1"
-msgstr "Bilgisayar"
+msgstr "Bilgisayar %1"
 
 #: ../user/stats.php:21
 msgid "Statistics and leaderboards"
@@ -5803,9 +5682,8 @@ msgstr ""
 "çeşitli sitelerden alabilirsiniz; %1ana sayfanıza%2 bakın."
 
 #: ../user/team.php:25
-#, fuzzy
 msgid "Teams"
-msgstr "Takım"
+msgstr "Takımlar"
 
 #: ../user/team.php:27
 #, fuzzy
@@ -5847,8 +5725,8 @@ msgstr "Üyesi yoksa takımı kaldırma."
 #: ../user/team.php:40
 msgid "To join a team, visit its team page and click %1Join this team%2."
 msgstr ""
-"Bir takıma katılmak için, takımın sayfasını ziyaret edin ve %1Bu takıma "
-"katıl%2 bağlantısına tıklayın."
+"Bir takıma katılmak için, takımın sayfasını ziyaret edin ve %1Bu takıma katıl"
+"%2 bağlantısına tıklayın."
 
 #: ../user/team.php:41 ../user/team_search.php:179
 msgid "Find a team"
@@ -6063,8 +5941,8 @@ msgstr "Takım oluştur"
 msgid ""
 "You belong to %1. You must %2quit this team%3 before creating a new one."
 msgstr ""
-"%1 üyesisiniz. Yeni bir tane oluşturmadan önce %2bu takımdan ayrılmalısınız%"
-"3."
+"%1 üyesisiniz. Yeni bir tane oluşturmadan önce %2bu takımdan ayrılmalısınız"
+"%3."
 
 #: ../user/team_delta.php:65
 msgid "Not founder or admin"
@@ -6136,7 +6014,7 @@ msgstr "%1 için kullanmak üzere bir mesaj panosu oluşturabilirsiniz."
 
 #: ../user/team_forum.php:31
 msgid "Only team members will be able to post."
-msgstr "Yalnızca takım üyeleri ileti gönderebilecek."
+msgstr "Yalnızca takım üyeleri gönderi gönderebilecek."
 
 #: ../user/team_forum.php:32
 msgid "At your option, only members will be able to read."
@@ -6204,8 +6082,8 @@ msgstr "Mesaj panosu kaldırıldı"
 msgid ""
 "Your team's message board has been removed. You may now %1create a new one%2."
 msgstr ""
-"Takımınızın mesaj panosu kaldırıldı. Şimdi yeni bir tane %"
-"1oluÅŸturabilirsiniz%2."
+"Takımınızın mesaj panosu kaldırıldı. Şimdi yeni bir tane %1oluşturabilirsiniz"
+"%2."
 
 #: ../user/team_forum.php:143
 msgid "Team Message Board Updated"
@@ -6220,9 +6098,8 @@ msgid "Update failed"
 msgstr "Güncelleme başarısız"
 
 #: ../user/team_forum.php:154
-#, fuzzy
 msgid "Team has no forum"
-msgstr "takım bir foruma sahip değil"
+msgstr "Takımın forumu yok"
 
 #: ../user/team_founder_transfer_action.php:36
 msgid "You must be a member of a team to access this page."
@@ -6239,8 +6116,8 @@ msgid ""
 "                       If the founder does not respond within 60 days you "
 "will be allowed to become the founder."
 msgstr ""
-"Mevcut kurucu, talebiniz hakkında e-posta ve özel mesaj yollarıyla "
-"uyarıldı.<br /><br />\n"
+"Mevcut kurucu, talebiniz hakkında e-posta ve özel mesaj yollarıyla uyarıldı."
+"<br /><br />\n"
 "                       Kurucu 60 gün içerisinde yanıt vermezse, yeni kurucu "
 "olabileceksiniz."
 
@@ -6328,8 +6205,8 @@ msgid ""
 "                       Are you sure you want to request foundership?"
 msgstr ""
 "Eğer takım kurucusu aktif değilse ve kuruculuğu üstlenmek istiyorsanız, "
-"aşağıdaki butona tıklayın. Mevcut kurucuya isteğinizle ilgili detaylı bir "
-"e-posta gönderilecek ve kuruculuğu size devretme ya da talebi reddetme "
+"aşağıdaki butona tıklayın. Mevcut kurucuya isteğinizle ilgili detaylı bir e-"
+"posta gönderilecek ve kuruculuğu size devretme ya da talebi reddetme "
 "seçenekleri olacak. Kurucu 60 gün içerisinde bir yanıt vermezse, kurucu "
 "olabileceksiniz.<br /><br />\n"
 "                       Kurucu olma talebi göndermek istediğinize emin "
@@ -6520,8 +6397,8 @@ msgid ""
 "Other resources for BOINC team admins are available from a third-party site, "
 "%1www.boincteams.com%2."
 msgstr ""
-"BOINC takım yöneticileri için diğer kaynaklar, üçüncü parti bir sitededir: %"
-"1www.boincteams.com%2."
+"BOINC takım yöneticileri için diğer kaynaklar, üçüncü parti bir sitededir: "
+"%1www.boincteams.com%2."
 
 #: ../user/team_manage.php:91
 msgid "Can't delete non-empty team"
@@ -7125,3 +7002,7 @@ msgstr "(tüm uygulamalar)"
 
 #~ msgid "CHARSET"
 #~ msgstr "UTF-8"
+
+#, fuzzy
+#~ msgid "preferences"
+#~ msgstr "&Tercihler..."
diff --git a/locale/tr/pootle-boinctrunk-tr.prefs b/locale/tr/pootle-boinctrunk-tr.prefs
deleted file mode 100644
index ce9a3d9..0000000
--- a/locale/tr/pootle-boinctrunk-tr.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language tr
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  CanceleratoR = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/uk/pootle-boinctrunk-uk.prefs b/locale/uk/pootle-boinctrunk-uk.prefs
deleted file mode 100644
index f869bb4..0000000
--- a/locale/uk/pootle-boinctrunk-uk.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-# Pootle preferences for project boinctrunk, language uk
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  davea = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  eorit = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/zh_CN/pootle-boinctrunk-zh_CN.prefs b/locale/zh_CN/pootle-boinctrunk-zh_CN.prefs
deleted file mode 100644
index 09c623c..0000000
--- a/locale/zh_CN/pootle-boinctrunk-zh_CN.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-# Pootle preferences for project boinctrunk, language zh_CN
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
-  YG = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/locale/zh_TW/BOINC-Client.mo b/locale/zh_TW/BOINC-Client.mo
index fdf6cd3..db95a9f 100644
Binary files a/locale/zh_TW/BOINC-Client.mo and b/locale/zh_TW/BOINC-Client.mo differ
diff --git a/locale/zh_TW/BOINC-Client.po b/locale/zh_TW/BOINC-Client.po
index 1993383..dfc9b67 100644
--- a/locale/zh_TW/BOINC-Client.po
+++ b/locale/zh_TW/BOINC-Client.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-09 09:39-0800\n"
-"PO-Revision-Date: 2012-05-04 14:32+0200\n"
+"PO-Revision-Date: 2012-08-04 15:29+0200\n"
 "Last-Translator: 宇謙 <df910105 at yahoo.com.tw>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
 "Language: zh_TW\n"
@@ -29,7 +29,7 @@ msgstr "來至於專案的訊息"
 msgid ""
 "Some tasks need more memory than allowed by your preferences.  Please check "
 "the preferences."
-msgstr "部分工作所需要的記憶體超過您設定允許使用的量。 請檢查您的設定值。"
+msgstr "部分工作所需要的記憶體超過您設定允許使用的量。請檢查您的設定值。"
 
 #: client_state.cpp:482
 msgid "Couldn't write state file; check directory permissions"
diff --git a/locale/zh_TW/BOINC-Manager.mo b/locale/zh_TW/BOINC-Manager.mo
index 9687efa..b69d2bb 100644
Binary files a/locale/zh_TW/BOINC-Manager.mo and b/locale/zh_TW/BOINC-Manager.mo differ
diff --git a/locale/zh_TW/BOINC-Manager.po b/locale/zh_TW/BOINC-Manager.po
index 1be5a7c..6c63046 100644
--- a/locale/zh_TW/BOINC-Manager.po
+++ b/locale/zh_TW/BOINC-Manager.po
@@ -7,8 +7,8 @@ msgstr ""
 "Project-Id-Version: BOINC Manager 4.x\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-03-05 10:58-0500\n"
-"PO-Revision-Date: 2012-05-04 15:51+0200\n"
-"Last-Translator: 宇謙 <df910105 at yahoo.com.tw>\n"
+"PO-Revision-Date: 2012-10-01 17:26+0200\n"
+"Last-Translator: Yang <fantasyworldidvtw at gmail.com>\n"
 "Language-Team: BOINC Development Team <boinc_loc at ssl.berkeley.edu>\n"
 "Language: zh_TW\n"
 "MIME-Version: 1.0\n"
@@ -1221,7 +1221,7 @@ msgstr "若您想在使用電腦的同時一起運行工作就打勾"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:157
 msgid "Use GPU while computer is in use"
-msgstr "電腦使用時"
+msgstr "電腦使用時運行 GPU 計算"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:160
 msgid "check this if you want your GPU to do work even when you're using the computer"
@@ -1326,16 +1326,16 @@ msgstr "其他選項"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:330
 msgid "Switch between applications every"
-msgstr "每隔幾分鐘切換應用程式"
+msgstr "切換應用程式的時間間隔"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:339
 msgid "On multiprocessor systems, use at most"
-msgstr "多處理器系統中最多只使用"
+msgstr "多核心系統中最多只使用"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:346
 #, no-c-format, no-c-format
 msgid "% of the processors"
-msgstr "% CPU 使用率"
+msgstr "% CPU 核心數"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:349
 #: clientgui/DlgAdvPreferencesBase.cpp:604
@@ -1388,7 +1388,7 @@ msgstr "天"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:428
 msgid "Minimum work buffer"
-msgstr "取得額外工作的緩衝時間"
+msgstr "最少的工作緩衝時間"
 
 #: clientgui/DlgAdvPreferencesBase.cpp:437
 msgid "Try to maintain enough tasks to keep busy for this many days"
@@ -3512,11 +3512,11 @@ msgstr "帳號"
 
 #: clientgui/ViewProjects.cpp:221
 msgid "Work done"
-msgstr "運算完成"
+msgstr "總積分"
 
 #: clientgui/ViewProjects.cpp:222
 msgid "Avg. work done"
-msgstr "平均完成"
+msgstr "近期平均積分"
 
 #: clientgui/ViewProjects.cpp:224
 #: clientgui/ViewTransfers.cpp:187
diff --git a/locale/zh_TW/pootle-boinctrunk-zh_TW.prefs b/locale/zh_TW/pootle-boinctrunk-zh_TW.prefs
deleted file mode 100644
index 7d34510..0000000
--- a/locale/zh_TW/pootle-boinctrunk-zh_TW.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-# Pootle preferences for project boinctrunk, language zh_TW
-
-rights:
-  default = u'view, suggest, archive, pocompile'
-  nobody = u'view, pocompile'
-  romw = u'view, suggest, translate, overwrite, review, archive, pocompile, assign, admin, commit'
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 1b71dc9..2bd1a8d 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 15375 2008-06-08 22:18:52Z davea $
+## $Id$
 
 EXTRA_DIST = ax_check_gl.m4	  ax_lang_compiler_ms.m4  sah_header_stdcxx.m4 		\
 Makefile.am	ax_check_glu.m4   kc_mysql.m4		  sah_namespace.m4		\
diff --git a/m4/ax_lang_compiler_ms.m4 b/m4/ax_lang_compiler_ms.m4
deleted file mode 100644
index d0c73dc..0000000
--- a/m4/ax_lang_compiler_ms.m4
+++ /dev/null
@@ -1,14 +0,0 @@
-dnl Available from the GNU Autoconf Macro Archive at:
-dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_lang_compiler_ms.html
-dnl
-AC_DEFUN([AX_LANG_COMPILER_MS],
-[AC_CACHE_CHECK([whether we are using the Microsoft _AC_LANG compiler],
-                [ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms],
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef _MSC_VER
-       choke me
-#endif
-]])],
-                   [ax_compiler_ms=yes],
-                   [ax_compiler_ms=no])
-ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms
-])])
diff --git a/m4/kc_mysql.m4 b/m4/kc_mysql.m4
index 6e7c54a..95ded45 100644
--- a/m4/kc_mysql.m4
+++ b/m4/kc_mysql.m4
@@ -1,5 +1,5 @@
 
-dnl $Id: kc_mysql.m4 14996 2008-04-01 21:44:12Z korpela $
+dnl $Id$
 
 AC_DEFUN([AC_CHECK_MYSQL],[
 AC_ARG_VAR([MYSQL_CONFIG], [mysql_config program])
diff --git a/mac_build/BuildMacBOINC.sh b/mac_build/BuildMacBOINC.sh
new file mode 100644
index 0000000..c773241
--- /dev/null
+++ b/mac_build/BuildMacBOINC.sh
@@ -0,0 +1,137 @@
+#!/bin/sh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2010 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+##
+# Script for building Macintosh BOINC Manager, Core Client and libraries
+# by Charlie Fenton 3/27/08
+# with thanks to Reinhard Prix for his assistance
+#
+# Updated for OS 10.7 Lion and XCode 4.2 on 10/19/11
+# Updated 7/9/12 for Xcode 4.3 and later which are not at a fixed address
+#
+## This script requires OS 10.6 or later
+#
+## If you drag-install Xcode 4.3 or later, you must have opened Xcode 
+## and clicked the Install button on the dialog which appears to 
+## complete the Xcode installation before running this script.
+##
+
+## Usage:
+## cd to the mac_build directory of the boinc tree, for example:
+##     cd [path]/boinc/mac_build
+##
+## then invoke this script as follows:
+##      source BuildMacBOINC.sh [-dev] [-noclean] [-all] [-lib] [-client] [-help]
+## or
+##      chmod +x BuildMacBOINC.sh
+##      ./BuildMacBOINC.sh [-dev] [-noclean] [-all] [-lib] [-client] [-help]
+##
+## optional arguments
+## -dev         build the development (debug) version. 
+##              default is deployment (release) version.
+##
+## -noclean     don't do a "clean" of each target before building.
+##              default is to clean all first.
+##
+##  The following arguments determine which targets to build
+##
+## -all         build all targets (i.e. target "Build_All" -- this is the default)
+##
+## -lib         build the five libraries: libboinc_api.a, libboinc_graphics2.a,  
+##              libboinc.a, libboinc_opncl.a, jpeglib.a and the utility 
+##              application MakeAppIcon_h.
+##
+## -client      build two targets: boinc client and command-line utility boinc_cmd
+##              (also builds libboinc.a if needed, since boinc_cmd requires it.)
+##
+## Both -lib and -client may be specified to build five targets (no BOINC Manager)
+##
+
+targets=""
+doclean="clean"
+buildall=0
+buildlibs=0
+buildclient=0
+style="Deployment"
+
+while [ $# -gt 0 ]; do
+  case "$1" in 
+    -noclean ) doclean="" ; shift 1 ;;
+    -dev ) style="Development" ; shift 1 ;;
+    -all ) buildall=1 ; shift 1 ;;
+    -lib ) buildlibs=1 ; shift 1 ;;
+    -client ) buildclient=1 ; shift 1 ;;
+    * ) echo "usage:" ; echo "cd {path}/mac_build/" ; echo "source BuildMacBOINC.sh [-dev] [-noclean] [-all] [-lib] [-client] [-help]" ; return 1 ;;
+  esac
+done
+
+if [ "${doclean}" = "clean" ]; then
+    echo "Clean each target before building"
+fi
+
+if [ "${buildlibs}" = "1" ]; then
+targets="$targets -target libboinc -target gfx2libboinc -target api_libboinc -target boinc_opencl -target jpeg -target MakeAppIcon_h"
+fi
+
+if [ "${buildclient}" = "1" ]; then
+targets="$targets -target BOINC_Client -target cmd_boinc"
+fi
+
+## "-all" overrides "-lib" and "-client" since it includes those targets
+if [ "${buildall}" = "1" ] || [ "${targets}" = "" ]; then
+    targets="-target Build_All"
+fi
+
+version=`uname -r`;
+
+major=`echo $version | sed 's/\([0-9]*\)[.].*/\1/' `;
+# minor=`echo $version | sed 's/[0-9]*[.]\([0-9]*\).*/\1/' `;
+
+# echo "major = $major"
+# echo "minor = $minor"
+#
+# Darwin version 12.x.y corresponds to OS 10.8.x
+# Darwin version 11.x.y corresponds to OS 10.7.x
+# Darwin version 10.x.y corresponds to OS 10.6.x
+# Darwin version 9.x.y corresponds to OS 10.5.x
+# Darwin version 8.x.y corresponds to OS 10.4.x
+# Darwin version 7.x.y corresponds to OS 10.3.x
+# Darwin version 6.x corresponds to OS 10.2.x
+
+if [ "$major" -lt "10" ]; then
+    echo "ERROR: Building BOINC requires System 10.6 or later.  For details, see build instructions at"
+    echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
+    return 1
+fi
+
+if [ "${style}" = "Development" ]; then
+    echo "Development (debug) build"
+else
+    style="Deployment"
+    echo "Deployment (release) build for architectures: i386, x86_64"
+fi
+
+echo ""
+
+SDKPATH=`xcodebuild -version -sdk macosx Path`
+
+xcodebuild -project boinc.xcodeproj ${targets} -configuration ${style} -sdk "${SDKPATH}" ${doclean} build
+
+return $?
diff --git a/mac_build/HowToBuildBOINC_XCode.rtf b/mac_build/HowToBuildBOINC_XCode.rtf
new file mode 100644
index 0000000..da650b2
--- /dev/null
+++ b/mac_build/HowToBuildBOINC_XCode.rtf
@@ -0,0 +1,486 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 Courier;\f2\fswiss\fcharset0 ArialMT;
+\f3\fnil\fcharset0 LucidaGrande;\f4\fnil\fcharset0 Menlo-Regular;}
+{\colortbl;\red255\green255\blue255;\red186\green0\blue0;\red14\green14\blue255;\red246\green246\blue246;
+}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww14740\viewh11840\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\f0\b\fs28 \cf0 Building BOINC Client and Manager on Macintosh OSX\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+\cf0 Written by Charlie Fenton\
+Last updated 8/3/12\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+This document applies to BOINC version 7.0.34 and later.  It has instructions for building the BOINC Client and Manager for Macintosh OSX.  Information for building science project applications to run under BOINC on Macintosh OSX can be found {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/BuildMacApp"}}{\fldrslt here}}.  \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Note:
+\b0  the information in this document changes from time to time for different versions of BOINC.  For any version of BOINC source files, the corresponding version of this document can be found in the source tree at:\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f1\fs26 \cf0                    boinc/mac_build/HowToBuildBOINC_XCode.rtf\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f0\fs24 \cf0 \
+Contents of this document:\
+\'95 Important requirements for building BOINC software for the Mac.\
+\'95 Cross-Platform Development.\
+\'95 Building BOINC Manager with embedded BOINC Client.\
+\'95 Building BOINC Manager Installer.\
+\'95 Code Signing the BOINC Manager Installer and Uninstaller\
+\'95 Debugging and BOINC security.\
+\'95 Debugging into wxWidgets.\
+\'95 Installing and setting up Xcode.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\b\fs28 \cf0 Important requirements for building BOINC software for the Mac
+\b0\fs24 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\pardeftab720\sa260
+\cf0 Building BOINC for Macintosh OS X is complicated by the fact that Mac OS X is actually 2 different platforms:\
+\pard\tx220\tx720\pardeftab720\li720\fi-720
+\ls1\ilvl0\cf0 {\listtext	\'95	}
+\b i686-apple-darwin
+\b0 : 32-bit intel processors running OS 10.4.0 and above\
+{\listtext	\'95	}
+\b x86_64-apple-darwin
+\b0 : 64-bit Intel processors running OS 10.5.0 and above\
+\pard\pardeftab720\sa260
+\cf0 As of version 6.13.0, BOINC does not support Macintosh PowerPC processors.\
+Although BOINC supports 64-bit Intel project applications on Mac OS 10.5.0 and above, the only part of the BOINC client package built as a 64-bit executable is the screensaver coordinator for OS 10.6.x and later.  The BOINC libraries also include a 64-bit build so that they can be linked with 64-bit project applications.\
+You need to take certain steps to ensure that you use only APIs that are available in all the OS versions BOINC supports for each architecture. The best way to accomplish this is to use a single development system running OS 10.7.x or OS 10.8.x and cross-compile for the various platforms. The remainder of this document describes that process.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
+
+\b \cf0 The above requirements apply not only to BOINC itself, but also to the WxWidgets, c-ares, cURL and openSSL libraries, as well as all project applications
+\b0 .  \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 Be sure to follow the directions in this document to ensure that these requirements are met.\
+\
+\pard\pardeftab720\sa260
+\cf0 Starting with version 6.10.58, the BOINC Client supports only Mac OS X 10.4.0 and later. This allows it to be built with XCode 3.2 and later, which do not support the Mac OS 10.3.9 SDK.\
+\pard\pardeftab720\sa260\qc
+
+\b\fs28 \cf0 Cross-Platform Development
+\f2\fs32 \
+\pard\pardeftab720\sa260
+
+\f0\b0\fs24 \cf0 Apple provides the tools necessary to cross-compile for both BOINC Mac platforms on any Mac running OS 10.7.x or OS 10.8.x.\
+You get these tools, including the GCC compilers and system library header files, by installing the Xcode Tools package. \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
+
+\b \cf0 Building BOINC now requires Xcode Tools version 3.2 or later but Xcode 4.3 or later is recommended. 
+\b0  \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\pardeftab720\sa260
+\cf0 You can download Xcode 4.3 or Xcode 4.4 from Apple's App Store (it is large: about 2 GB).  If you are a member of Apple's Mac Developer Program, you can also download it from Apple's web site: {\field{\*\fldinst{HYPERLINK "http://developer.apple.com"}}{\fldrslt http://developer.apple.com}}\cf2 .\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 Source files are now archived using Subversion.  You can download svnX, a free GUI application for running Subversion from either\
+	{\field{\*\fldinst{HYPERLINK "http://www.apple.com/downloads/macosx/development_tools/svnx.html"}}{\fldrslt http://www.apple.com/downloads/macosx/development_tools/svnx.html}}\
+or\
+	{\field{\*\fldinst{HYPERLINK "http://www.lachoseinteractive.net/en/community/subversion/svnx/"}}{\fldrslt http://www.lachoseinteractive.net/en/community/subversion/svnx/}}\
+\
+You also need to install Subversion itself in the 
+\f1\fs26 /usr/local/bin/
+\f3  directory
+\f0\fs24 .  By default, OS X and Xcode install it in 
+\fs26 /
+\f1 usr/bin/
+\f0\fs24 .  To copy it into 
+\f1\fs26 /usr/local/bin/
+\f0 , enter the following in the Terminal utility application:\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f1\fs24 \cf0 cd /usr/bin\
+sudo cp -p svn* /usr/local/bin\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f0 \cf0 \
+Enter your administrator password when prompted to do so.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\b\fs28 \cf0 Building BOINC Manager with embedded Core Client\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 BOINC depends on six third-party libraries: wxMac-2.8.10, c-ares-1.9.1, curl-7.26.0, openssl-1.0.1c,  freetype-2.4.10 and ftgl-2.1.3~rc5.  You can obtain the source files from the following URLs:\
+\
+wxMac-2.8.10 (needed  only if you are building the BOINC Manager):\
+	{\field{\*\fldinst{HYPERLINK "http://www.wxwidgets.org"}}{\fldrslt 
+\f1\fs26 http://www.wxwidgets.org}}
+\f1\fs26 \
+
+\f0\fs24 	{\field{\*\fldinst{HYPERLINK "http://prdownloads.sourceforge.net/wxwindows/wxMac-2.8.10.tar.gz"}}{\fldrslt 
+\f1\fs26 http://prdownloads.sourceforge.net/wxwindows/wxMac-2.8.10.tar.gz}}
+\f1\fs26 \
+
+\f0\fs24 \
+curl-7.26.0:\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\f1\fs26 \cf0 	{\field{\*\fldinst{HYPERLINK "http://curl.haxx.se"}}{\fldrslt http://curl.haxx.se}}\
+	{\field{\*\fldinst{HYPERLINK "http://curl.haxx.se/download/curl-7.26.0.tar.gz"}}{\fldrslt http://curl.haxx.se/download/curl-7.26.0.tar.gz}}\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\f0\fs24 \cf0 c-ares-1.9.1 (used by curl):\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\f1\fs26 \cf0 	{\field{\*\fldinst{HYPERLINK "http://daniel.haxx.se/projects/c-ares/"}}{\fldrslt http://daniel.haxx.se/projects/c-ares/}}\
+	{\field{\*\fldinst{HYPERLINK "http://c-ares.haxx.se/download/c-ares-1.9.1.tar.gz"}}{\fldrslt http://c-ares.haxx.se/download/c-ares-1.9.1.tar.gz}}\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\f0\fs24 \cf0 openssl-1.0.1c:\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\f1\fs26 \cf0 	{\field{\*\fldinst{HYPERLINK "http://www.openssl.org/"}}{\fldrslt http://www.openssl.org/}}\
+	{\field{\*\fldinst{HYPERLINK "http://www.openssl.org/source/openssl-1.0.1c.tar.gz"}}{\fldrslt http://www.openssl.org/source/openssl-1.0.1c.tar.gz}}\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\f0\fs24 \cf0 freetype-2.4.10 (needed  only if you are building the BOINC default screensaver or a project screensaver):\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\f1\fs26 \cf0 	{\field{\*\fldinst{HYPERLINK "http://www.freetype.org/"}}{\fldrslt 
+\f4\fs22 \cf3 \CocoaLigature0 http://www.freetype.org/}}
+\f4\fs22 \cf3 \CocoaLigature0 \
+	{\field{\*\fldinst{HYPERLINK "http://sourceforge.net/projects/freetype/files/freetype2/2.4.10/freetype-2.4.10.tar.bz2"}}{\fldrslt http://sourceforge.net/projects/freetype/files/freetype2/2.4.10/freetype-2.4.10.tar.bz2}}
+\f0\fs24 \cf0 \CocoaLigature1 \
+\
+ftgl-2.1.3~rc5 (needed  only if you are building the BOINC default screensaver or a project screensaver):\
+
+\f1\fs26 	{\field{\*\fldinst{HYPERLINK "http://sourceforge.net/projects/ftgl"}}{\fldrslt 
+\f4\fs22 \cf3 \CocoaLigature0 http://sourceforge.net/projects/ftgl}}\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\f0\fs24 \cf0 	{\field{\*\fldinst{HYPERLINK "http://sourceforge.net/projects/ftgl/files/FTGL%20Source/2.1.3~rc5/ftgl-2.1.3-rc5.tar.gz"}}{\fldrslt http://sourceforge.net/projects/ftgl/files/FTGL%20Source/2.1.3%7Erc5/ftgl-2.1.3-rc5.tar.gz}}\
+	
+\f1\fs26 \
+\pard\pardeftab720\sa260
+
+\f0\fs24 \cf0 (Don't forget to expand the tar files by double-clicking on them.)\
+XCode will automatically check compatibility back to OS 10.4 if the following are defined during compilation:\
+\pard\pardeftab720
+
+\f1\fs26 \cf0 MAC_OS_X_VERSION_MAX_ALLOWED=1040\
+MAC_OS_X_VERSION_MIN_REQUIRED=1040\
+\pard\pardeftab720
+
+\f0\fs24 \cf0 \
+\pard\pardeftab720\sa260
+\cf0 These are not done automatically by either the Xcode projects which come with wxMac-2.8.10, nor  the AutoMake scripts supplied with wxMac-2.8.10, c-ares-1.9.1, curl-7.26.0, openssl-1.0.1c, freetype-2.4.10 and ftgl-2.1.3~rc5.  So be sure to use our special scripts to build these packages.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 [1] Create a parent directory within which to work.  In this description , we will call it BOINC_dev, but you can name it anything you wish.\
+\
+[2] Put the following 3 directories inside the BOINC_dev folder (omit any you don't need):\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f1\fs26 \cf0     c-ares-
+\f0\fs24 1.9.1
+\f1\fs26 \
+    curl-7.26.0\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0     openssl-1.0.1c\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0     wxMac-2.8.10\
+    freetype-2.4.10\
+    ftgl-2.1.3~rc5\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f0\fs24 \cf0 \
+Important: do not change the names of any of these 6 directories.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Note:
+\b0  Building wxMac-2.8.10 requires the MacOSX10.6.sdk, which is not included in Xcode 4.5.  If you are building wxMac-2.8.10 with Xcode 4.5, see the section 
+\i\b Installing and setting up Xcode
+\i0\b0  for further information.\
+\
+[3] Get the BOINC source tree from Subversion, and put it in the same BOINC_dev folder.  To do this, type the following in Terminal:\
+\
+\pard\pardeftab720
+
+\f1\fs26 \cf0 cd \{path\}/BOINC_dev/
+\f0\fs24 \
+
+\f1\fs26 svn co http://boinc.berkeley.edu/svn/trunk/boinc
+\f0\fs24   \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+(You may change the name of the 
+\f1\fs26 boinc
+\f0\fs24  directory to anything you wish.)  Hint: if you have trouble getting this to work, try using 
+\f1\fs26 https
+\f0\fs24  instead of 
+\f1\fs26 http
+\f0\fs24 .\
+\
+The command above retrieves the source code from the HEAD (TRUNK) or development branch of the CVS repository.  For more information on getting the BOINC source code, see:\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+{\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/SourceCode"}}{\fldrslt 
+\f1\fs26 \cf0 http://boinc.berkeley.edu/trac/wiki/SourceCode}}\
+\
+[4] Run the script to build the c-ares, curl, openssl, wxMac, freetype and ftgl libraries as follows:\
+\
+\pard\pardeftab720
+
+\f1\fs26 \cf0 cd \{path\}/BOINC_dev/boinc/mac_build/\
+source setupForBoinc.sh -clean
+\f0\fs24 \
+\
+If you don't wish to force a full rebuild of everything, omit the -clean argument.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Note 1:
+\b0  Be sure to run the script using the 
+\f1\fs26 source
+\f0\fs24  command.  Do not double-click on the scripts or use the 
+\f1\fs26 sh
+\f0\fs24  command to run them.\
+
+\b Note 2:
+\b0  this script tries to build all six third-party libraries: wxMac-2.8.10, c-ares-1.9.1, curl-7.26.0, openssl-1.0.1c,  freetype-2.4.10 and ftgl-2.1.3~rc5.  when the script finishes, it will display a warning about any libraries was unable to build (for example, if you have not downloaded them.)\
+\
+[5] Build BOINC as follows:\
+\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
+\cf0 BOINC itself is built  using the 
+\b boinc.xcodeproj 
+\b0 file.  You can either build directly in Xcode
+\b  
+\b0 (more information below) or run the 
+\b BuildMacBOINC.sh
+\b0  script:\
+\
+\pard\pardeftab720
+
+\f1\fs26 \cf0 cd \{path\}/BOINC_dev/boinc/mac_build/\
+source BuildMacBOINC.sh
+\f0\fs24 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+The complete syntax for this script is\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f1\fs26 \cf0 source BuildMacBOINC.sh [-dev] [-noclean] [-all] [-lib] [-client] [-help]
+\f0\fs24 \
+\
+The options for BuildMacBOINC.sh are:\
+	-dev		build the development (debug) version (native architecture only). \
+			default is deployment (release) version (universal binary: i386 and x86_64).\
+\
+	-noclean	don't do a "clean" of each target before building.\
+			default is to clean all first.\
+\
+  The following arguments determine which targets to build\
+	-all		build all targets (i.e. target "Build_All" -- this is the default)\
+\
+	-lib		build the five libraries: libboinc_api.a, libboinc_graphics_api.a, libboinc.a, libboinc_opencl.a, jpeglib.a\
+\
+	-client		build two targets: boinc client and command-line utility {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/wiki/Boinccmd_tool"}}{\fldrslt boinccmd}}\
+			(also builds libboinc.a, since boinc_cmd requires it.)\
+\
+ Both -lib and -client may be specified to build seven targets (no BOINC Manager or screensaver.)\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Note 1:
+\b0  You may find two Xcode projects in the BOINC_dev/boinc/mac_build/ directory: \
+  \'95 
+\b wxMac-BOINC.xcodeproj
+\b0  was needed for building older versions of the wxMac library in conjunction with the older versions of the setupForBoinc.sh or buildWxMac.sh scripts.  It is not used for BOINC 5.9.2 or later.  \
+  \'95 
+\b boinc.xcodeproj
+\b0  builds BOINC.  It can be used either with the BuildMacBOINC.sh script or as a stand-alone project.  The 
+\i Development
+\i0  build configuration builds only the native architecture and is used for debugging.  The 
+\i Deployment
+\i0  build configuration builds a universal binary and is suitable for release builds.  If there are any other build configurations, they should not be used as they are obsolete.  \
+\
+
+\b Note 2: 
+\b0 To perform a release build under Xcode 4.3 when not using the BuildMacBOINC.sh script, select "Build for archiving" from Xcode's Product menu.  Do 
+\b not
+\b0  select "Archive."\
+\
+
+\b Note 3: 
+\b0 Using the 
+\f1\fs26 BuildMacBOINC.sh
+\f0\fs24  script is generally easier than building directly in Xcode.  The script will place the built products in the directory 
+\f1\fs26 boinc/mac_build/build/Deployment/
+\f0\fs24  or 
+\f1\fs26 boinc/mac_build/build/Development/
+\f0\fs24  where they are easy to find.  Building directly in Xcode places the built products in a somewhat obscure location; you would normally need to determine this location using Xcode's Organizer window.  \
+\
+The BOINC Xcode project has built-in scripts which create a text file with the path to the built products at either 
+\f1\fs26 boinc/mac_build/Build_Deployment_Dir
+\f0\fs24  or 
+\f1\fs26 boinc/mac_build/Build_Development_Dir
+\f0\fs24 .  These files are used by the 
+\f1\fs26 release_boinc.sh
+\f0\fs24  script, but you can also use them to access the built products directly as follows; open the file with TextEdit and copy the path, then enter command-shift-G in the Finder and paste the path into the Finder's  dialog.\
+\
+The standard release of BOINC version 6.13.0 and later builds only for Macintosh computers with Intel processors.  Most of the executables are built only for the i386 architecture.  The BOINC libraries and the screensaver are built as universal binaries containing builds for two architectures: i386 and x86_64.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\b\fs28 \cf0 Building BOINC Manager Installer
+\b0\fs24 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+In order to execute BOINC Manager, you have to install it using BOINC Manager Installer. Otherwise, you will encounter an error prompting for proper installation.\
+\
+To build the Installer for the BOINC Manager, you must be logged in as an administrator.  If you are building BOINC version number x.y.z, type the following in Terminal, then enter your administrator password when prompted by the script:\
+\
+\pard\pardeftab720
+
+\f1\fs26 \cf0 cd \{path\}/BOINC_dev/boinc/\
+source \{path\}/BOINC_dev/boinc/mac_installer/release_boinc.sh x y z\
+\pard\pardeftab720
+
+\f0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 Substitute the 3 parts of the BOINC version number for x y and z in the above.  For example, to build the installer for BOINC version 7.0.32, the command would be\
+\pard\pardeftab720
+
+\f1\fs26 \cf0 source \{path\}/BOINC_dev/boinc/mac_installer/release_boinc.sh 7 0 32\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f0\fs24 \cf0 This will create a directory "BOINC_Installer/New_Release_7_0_32" in the BOINC_dev directory, and the installer will be located in '
+\f1\fs26 \{path\}/BOINC_dev/BOINC_Installer/New_Release_7_0_32/boinc_7.0.32_macOSX_i686
+\f0\fs24 '.
+\f1 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f3 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\f0\b\fs28 \cf0 Code Signing the BOINC Manager Installer and Uninstaller
+\b0\fs24 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f3 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\f0 \cf0 Mac OS 10.8 introduces a security feature called Gatekeeper, whose default settings won't allow a user to run applications or installers downloaded from the Internet unless they are signed by a registered Apple Developer.  The 
+\f1\fs26 release_boinc.sh
+\f0\fs24  script looks for a file 
+\f1\fs26 ~/BOINCCodeSignIdentity.txt
+\f0\fs24  containing the name of a valid code signing identity stored in the user's Keychain.  If this is found, the script will automatically sign the BOINC installer and BOINC uninstaller using that identity.  For example, if your user name is John Smith, the first line of 
+\f1\fs26 ~/BOINCCodeSignIdentity.txt
+\f0\fs24  would be something like the following:
+\f1\fs26 \
+Developer ID Application: John Smith\
+\
+
+\f0\fs24 If there is no 
+\f1\fs26 ~/BOINCCodeSignIdentity.txt
+\f0\fs24  file, then the script will not sign the installer or uninstaller.  For more information on code signing identities see the documentation for the {\field{\*\fldinst{HYPERLINK "https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/codesign.1.html"}}{\fldrslt 
+\f1\fs26 codesign}} utility and Apple's {\field{\*\fldinst{HYPERLINK "https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/"}}{\fldrslt Code Signing Guide}}.  \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\b\fs28 \cf0 Debugging and BOINC security
+\b0\fs24 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 Version 5.5.4 of BOINC Manager for the Macintosh introduced new, stricter security measures.  For details, please see the file 
+\f1\fs26 boinc/mac_installer/Readme.rtf
+\f0\fs24  and {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/sandbox.php"}}{\fldrslt http://boinc.berkeley.edu/sandbox.php}} and {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/SandboxUser"}}{\fldrslt 
+\f1 http://boinc.berkeley.edu/trac/wiki/SandboxUser}}\
+\
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\tx10560\tx11520\tx12480\tx13440\tx14400\tx15360\tx16320\tx17280\tx18240\tx19200\tx20160\tx21120\tx22080\tx23040\tx24000\tx24960\tx25920\tx26880\tx27840\tx28800\tx29760\tx30720\tx31680\tx32640\tx33600\tx34560\tx35520\tx36480\tx37440\tx38400\tx39360\tx40320\tx41280\tx42240\tx43200\tx44160\tx45120\tx46080\tx47040\tx48000\tx48960\tx49920\tx50880\tx51840\tx52800\tx53760\tx54720\tx55680\tx56640\tx57600\tx58560\tx59520\tx60480\tx61440\tx62400\tx63360\tx64320\tx65280\tx66240\tx67200\tx68160\tx69120\tx70080\tx71040\tx72000\tx72960\tx73920\tx74880\tx75840\tx76800\tx77760\tx78720\tx79680\tx80640\tx81600\tx82560\tx83520\tx84480\tx85440\tx86400\tx87360\tx88320\tx89280\tx90240\tx91200\tx92160\tx93120\tx94080\tx95040\tx96000\pardirnatural
+\cf0 \CocoaLigature0 The GDB debugger can't attach to applications which are running as a different user or group so it ignores the S_ISUID and S_ISGID permission bits when launching an application.  To work around this, the BOINC 
+\i \CocoaLigature1 Development
+\i0 \CocoaLigature0  build does not use the special boinc_master or boinc_project users or groups, and so can be run under the debugger from Xcode.  \
+\
+The 
+\i Development
+\i0  build 
+\i only
+\i0  of the BOINC Manager allows you to change the ownership and permission settings of the BOINC Data and executables by entering an administrator user name and password.  This also streamlines the development cycle by avoiding the need to run the installer for every change.  (To generate the development build under Xcode 4.3, choose "Build" from the product menu, or enter command-B on the keyboard.)\
+\
+To restore the standard ownerships and permissions, run the installer.\
+\
+\pard\pardeftab720\sa260
+\cf0 \cb4 \CocoaLigature1 For information on interpreting crash dumps and backtraces, see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/MacBacktrace"}}{\fldrslt \cf2 Mac Backtrace}}.\cb1 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\b\fs28 \cf0 Debugging into wxWidgets
+\b0\fs24 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\tx10560\tx11520\tx12480\tx13440\tx14400\tx15360\tx16320\tx17280\tx18240\tx19200\tx20160\tx21120\tx22080\tx23040\tx24000\tx24960\tx25920\tx26880\tx27840\tx28800\tx29760\tx30720\tx31680\tx32640\tx33600\tx34560\tx35520\tx36480\tx37440\tx38400\tx39360\tx40320\tx41280\tx42240\tx43200\tx44160\tx45120\tx46080\tx47040\tx48000\tx48960\tx49920\tx50880\tx51840\tx52800\tx53760\tx54720\tx55680\tx56640\tx57600\tx58560\tx59520\tx60480\tx61440\tx62400\tx63360\tx64320\tx65280\tx66240\tx67200\tx68160\tx69120\tx70080\tx71040\tx72000\tx72960\tx73920\tx74880\tx75840\tx76800\tx77760\tx78720\tx79680\tx80640\tx81600\tx82560\tx83520\tx84480\tx85440\tx86400\tx87360\tx88320\tx89280\tx90240\tx91200\tx92160\tx93120\tx94080\tx95040\tx96000\pardirnatural
+\cf0 \CocoaLigature0 The BOINC Xcode project normally links the BOINC Manager with the non-debugging (Deployment) build of wxWidgets, even for the Development build configuration of the Manager.  However, there may be times when you wish to link the Development build of the Manager to the Development build of wxWidgets for debugging, as when you want to step into internal wxWidgets code or put breakpoints in wxWidgets.\
+\
+You can find instructions for doing this in the comments in the file 
+\f1\fs26 boinc/clientgui/mac/MacGUI.pch
+\f0\fs24 .\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\b\fs28 \cf0 \CocoaLigature1 Installing and setting up Xcode
+\b0\fs24 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+Versions of Xcode prior to Xcode 4.3 have an installer package. After downloading Xcode, mount the disk image file by double-clicking on it, then double-click the installer package. \
+\
+Starting with Xcode 4.3, the disk image contains a copy of Xcode itself.  After mounting the disk image, drag the Xcode icon to the folder where you wish it to reside.  In most cases, this will be the 
+\f1\fs26 /Applications/
+\f0\fs24  folder.  Unmount the disk image by dragging it to the trash.  Finally, double-click on the installed Xcode icon to run Xcode.  Xcode will display a dialog allowing you to finish the installation; you must do this before running BOINC's build scripts.  (Some versions of Xcode may not display this dialog until you open a file with Xcode.)\
+\
+Building wxMac-2.8.10 requires the MacOSX10.6.sdk, which is not included in Xcode 4.5.  If you are building wxMac-2.8.10 with Xcode 4.5, you must install the OS 10.6 SDK as follows:\
+[1] Download a version of Xcode for OS 10.7 Lion (such as Xcode 4.3.3.)\
+[2] Mount the disk image file by double-clicking on it.  Do 
+\b not
+\b0  drag-install this older version of Xcode.\
+[3] On the disk image, control-click on the Xcode icon and select 
+\f1\fs26 Show Package Contents
+\f0\fs24 .\
+[4] On the older Xcode disk image, browse to the directory:\
+    
+\f1\fs26  /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
+\f0\fs24 \
+You should see a folder named 
+\f1\fs26 MacOSX10.6.sdk
+\f0\fs24 .\
+[5] Control-click on your newer Xcode icon (which you previously installed on your hard drive) and select 
+\f1\fs26 Show Package Contents
+\f0\fs24 .\
+[6] In your newer Xcode Browse to the directory:\
+    
+\f1\fs26  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/\
+
+\f0\fs24 (or the equivalent if you installed it somewhere other than your 
+\f1\fs26 /Applications/
+\f0\fs24  folder.)\
+[7] Copy the 
+\f1\fs26 MacOSX10.6.sdk
+\f0\fs24  folder from the 
+\f1\fs26 SDKs
+\f0\fs24  folder on the older disk image to the 
+\f1\fs26 SDKs
+\f0\fs24  folder in the newer Xcode.\
+[8] Unmount the disk image by dragging it to the trash.\
+}
\ No newline at end of file
diff --git a/mac_build/Info.plist b/mac_build/Info.plist
new file mode 100644
index 0000000..9a60170
--- /dev/null
+++ b/mac_build/Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>BOINCManager</string>
+	<key>CFBundleIconFile</key>
+	<string>BOINCMgr.icns</string>
+	<key>CFBundleIdentifier</key>
+	<string>edu.berkeley.boinc</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>BNC!</string>
+	<key>CFBundleVersion</key>
+	<string>7.0.32</string>
+</dict>
+</plist>
diff --git a/mac_build/Installer-Info.plist b/mac_build/Installer-Info.plist
new file mode 100644
index 0000000..20f3629
--- /dev/null
+++ b/mac_build/Installer-Info.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>BOINC Installer</string>
+	<key>CFBundleIconFile</key>
+	<string>MacInstaller.icns</string>
+	<key>CFBundleIdentifier</key>
+	<string>edu.berkeley.boinc.Installer</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleName</key>
+	<string>BOINC Installer</string>
+	<key>CFBundleVersion</key>
+	<string>5.10.7</string>
+</dict>
+</plist>
diff --git a/mac_build/Mac_SA_Insecure.sh b/mac_build/Mac_SA_Insecure.sh
new file mode 100755
index 0000000..8db0197
--- /dev/null
+++ b/mac_build/Mac_SA_Insecure.sh
@@ -0,0 +1,128 @@
+#! /bin/sh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+# Mac_SA_Insecure.sh user group
+#
+# Undo making a Macintosh BOINC installation secure.  
+# - Set file/dir ownership to the specified user and group
+# - Remove BOINC groups and users
+#
+# IMPORTANT NOTE: earlier versions of the Mac_SA_Insecure.sh and 
+# Mac_SA_Secure.sh scripts had serious problems when run under OS 10.3.x.
+# They sometimes created bad users and groups with IDs that were duplicates 
+# of other users and groups.  They ran correctly under OS 10.4.x
+#
+# If you ran an older version of either script under OS 10.3.x, you should 
+# first run the current version of Mac_SA_Insecure.sh to delete the bad 
+# entries and then run Mac_SA_Secure.sh to create new good entries.
+#
+#
+# Execute this as root in the BOINC directory:
+# cd {path_to_boinc_directory}
+# sudo sh {path}/Mac_SA_Insecure.sh user group
+#
+# After running this script, the boinc client must be run with 
+# the --insecure option.
+# NOTE: running BOINC with security disabled is not recommended.
+#
+# Last updated 1/27/11 for BOINC versions 6.8.19, 6.10.30 and 6.11.1 
+# WARNING: do not use this script with older versions of BOINC older 
+# than 6.8.17 and 6.10.3
+
+function remove_boinc_users() {
+    name=$(dscl . search /users RecordName boinc_master | cut -f1 -s)
+    if [ "$name" = "boinc_master" ] ; then
+        sudo dscl . -delete /users/boinc_master
+    fi
+
+    name=$(dscl . search /groups RecordName boinc_master | cut -f1 -s)
+    if [ "$name" = "boinc_master" ] ; then
+        sudo dscl . -delete /groups/boinc_master
+    fi
+    
+    name=$(dscl . search /users RecordName boinc_project | cut -f1 -s)
+    if [ "$name" = "boinc_project" ] ; then
+        sudo dscl . -delete /users/boinc_project
+    fi
+
+    name=$(dscl . search /groups RecordName boinc_project | cut -f1 -s)
+    if [ "$name" = "boinc_project" ] ; then
+        sudo dscl . -delete /groups/boinc_project
+    fi
+}
+
+function check_login() {
+    if [ `whoami` != 'root' ]
+    then
+        echo 'This script must be run as root'
+        exit
+    fi
+}
+
+check_login
+
+if [ $# -eq 2 ]
+then
+    user=$1
+    group=$2
+else
+    echo "usage: $0 user group"
+    exit
+fi
+
+echo "Changing directory $(pwd) file ownership to user $user and group $group - OK? (y/n)"
+read line
+if [ "$line" != "y" ]
+then
+    exit
+fi
+
+if [ ! -x "switcher/switcher" ]
+then
+    echo "Can't find switcher application in directory $(pwd); exiting"
+    exit
+fi
+
+chown -R ${user}:${group} .
+chmod -R +Xu+rw-s,g+r-w-s,o+r-w .
+chmod 600 gui_rpc_auth.cfg
+
+if [ -f switcher/AppStats ] ; then 
+# AppStats application must run setuid root (used in BOINC 5.7 through 5.8.14 only)
+chown root:${group} switcher/AppStats
+chmod 4550 switcher/AppStats
+fi
+
+if [ -x /Applications/BOINCManager.app/Contents/MacOS/BOINCManager ] ; then 
+    chown ${user}:${group} /Applications/BOINCManager.app/Contents/MacOS/BOINCManager
+    chmod -R u+r-ws,g+r-ws,o+r-ws /Applications/BOINCManager.app/Contents/MacOS/BOINCManager
+fi
+
+if [ -x /Applications/BOINCManager.app/Contents/Resources/boinc ] ; then 
+    chown ${user}:${group} /Applications/BOINCManager.app/Contents/Resources/boinc
+    chmod -R u+r-ws,g+r-ws,o+r-ws /Applications/BOINCManager.app/Contents/Resources/boinc
+fi
+
+# Version 6 screensaver has its own embedded switcher application, but older versions don't.
+if [ -x "/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_switcher" ] ; then 
+    chown ${user}:${group} "/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_switcher"
+    chmod -R u+r-ws,g+r-ws,o+r-ws "/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_switcher"
+fi
+
+remove_boinc_users
diff --git a/mac_build/Mac_SA_Secure.sh b/mac_build/Mac_SA_Secure.sh
new file mode 100755
index 0000000..9ca95ef
--- /dev/null
+++ b/mac_build/Mac_SA_Secure.sh
@@ -0,0 +1,291 @@
+#! /bin/sh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make a BOINC installation "secure" on a Macintosh with stand-alone BOINC Client
+# The BOINC installer does this for a Macintosh installation with BOINC Manager; 
+# the BOINC Manager contains the BOINC client embedded in its bundle.
+# if you ran the BOINC installer, you do not need to use this script unless you 
+# wish to run a separate copy of the stand-alone client in the BOINC Data 
+# directory.
+#
+# Create groups and users, set file/dir ownership and protection
+#
+# IMPORTANT NOTE: earlier versions of the Mac_SA_Insecure.sh and 
+# Mac_SA_Secure.sh scripts had serious problems when run under OS 10.3.x.
+# They sometimes created bad users and groups with IDs that were duplicates 
+# of other users and groups.  They ran correctly under OS 10.4.x
+#
+# If you ran an older version of either script under OS 10.3.x, you should 
+# first run the current version of Mac_SA_Insecure.sh to delete the bad 
+# entries and then run Mac_SA_Secure.sh to create new good entries.
+#
+#
+# Execute this as root in the BOINC directory:
+# cd {path_to_boinc_directory}
+# sudo sh {path}/Mac_SA_Secure.sh
+#
+# Hint: you can enter the path to a directory or file by dragging its 
+# icon from the Finder onto the Terminal window.
+#
+# You must have already put all necessary files into the boinc directory,
+# including the boinc client, boinc_cmd application, ca-bundle.crt, plus 
+# the switcher/ directory and its contents.
+#
+# This script also assumes that the user who runs it will be authorized 
+# to administer BOINC. For convenience in administering BOINC, this script 
+# adds the logged-in user to groups boinc_master and boinc_project 
+# (i.e., adds these groups to the user's supplementary groups list.)
+#
+# In addition, you should add any other users who will administer BOINC 
+# to groups boinc_master and boinc_project; e.g. for user mary:
+# 
+# sudo dscl . -merge /groups/boinc_master GroupMembership mary
+# sudo dscl . -merge /groups/boinc_project GroupMembership mary
+#
+# To remove user mary from group boinc_master:
+# sudo dscl . -delete /groups/boinc_master GroupMembership mary
+# 
+
+# Updated 1/28/10 for BOINC version 6.8.20, 6.10.30 and 6.11.1
+# Updated 10/24/11 for OS 10.7.2 Lion
+# Last updated 3/3/12 to create users and groups with IDs > 500 
+# and to create RealName key with empty string as value (for users)
+#
+# WARNING: do not use this script with versions of BOINC older 
+# than 6.8.20 and 6.10.30
+
+function make_boinc_user() {
+    DarwinVersion=`uname -r`;
+    DarwinMajorVersion=`echo $DarwinVersion | sed 's/\([0-9]*\)[.].*/\1/' `;
+    # DarwinMinorVersion=`echo $version | sed 's/[0-9]*[.]\([0-9]*\).*/\1/' `;
+    #
+    # echo "major = $DarwinMajorVersion"
+    # echo "minor = $DarwinMinorVersion"
+    #
+    # Darwin version 11.x.y corresponds to OS 10.7.x
+    # Darwin version 10.x.y corresponds to OS 10.6.x
+    # Darwin version 8.x.y corresponds to OS 10.4.x
+    # Darwin version 7.x.y corresponds to OS 10.3.x
+    # Darwin version 6.x corresponds to OS 10.2.x
+
+    # Apple Developer Tech Support recommends using UID and GID greater 
+    # than 500, but this causes problems on OS 10.4
+    if [ "$DarwinMajorVersion" -gt 8 ]; then
+        baseID="501"
+    else
+        baseID="25"
+    fi
+
+
+
+    # Check whether group already exists
+    name=$(dscl . search /groups RecordName $1 | cut -f1 -s)
+    if [ "$name" = "$1" ] ; then
+        gid=$(dscl . read /groups/$1 PrimaryGroupID | cut -d" " -f2 -s)
+    else
+        # Find an unused group ID
+        gid="$baseID"
+        while true; do
+            name=$(dscl . search /groups PrimaryGroupID $gid | cut -f1 -s)
+            if [ -z "$name" ] ; then
+                break
+            fi
+            gid=$[$gid +1]
+        done
+        dscl . -create /groups/$1
+        dscl . -create /groups/$1 gid $gid
+    fi
+    
+    # Check whether user already exists
+    name=$(dscl . search /users RecordName $1 | cut -f1 -s)
+    if [ -z "$name" ] ; then
+
+        # Is uid=gid available?
+        uid=$gid
+        name=$(dscl . search /users UniqueID $uid | cut -f1 -s)
+        if [ -n "$name" ] ; then
+            # uid=gid already in use, so find an unused user ID
+            uid="$baseID"
+            while true; do
+                name=$(dscl . search /users UniqueID $uid | cut -f1 -s)
+                if [ -z "$name" ] ; then
+                    break
+                fi
+                uid=$[$uid +1]
+            done
+        fi
+
+        dscl . -create /users/$1
+        dscl . -create /users/$1 uid $uid
+        dscl . -create /users/$1 shell /usr/bin/false
+        dscl . -create /users/$1 home /var/empty
+        dscl . -create /users/$1 gid $gid
+    fi
+    
+    
+    ## Under OS 10.7 dscl won't directly create RealName key with empty 
+    ## string as value but will allow changing value to empty string.
+    ## -create replaces any previous value of the key if it already exists
+    dscl . -create /users/boinc_master RealName $1
+    dscl . -change /users/boinc_master RealName $1 ""
+}
+
+function make_boinc_users() {
+    make_boinc_user boinc_master
+    make_boinc_user boinc_project
+}
+
+function check_login() {
+    if [ `whoami` != 'root' ]
+    then
+        echo 'This script must be run as root'
+        exit
+    fi
+}
+
+# set_perm path user group perm
+#   set a file or directory to the given ownership/permissions
+function set_perm() {
+    chown $2:$3 "$1"
+    chmod $4 "$1"
+}
+
+# same, but apply to all subdirs and files
+#
+function set_perm_recursive() {
+    chown -R $2:$3 "$1"
+    chmod -R $4 "$1"
+}
+
+# same, but apply to items in the given dir
+#
+function set_perm_dir() {
+    for file in $(ls "$1")
+    do
+        path="$1/${file}"
+        set_perm "${path}" $2 $3 $4
+    done
+}
+
+function update_nested_dirs() {
+   for file in $(ls "$1")
+    do
+	if [ -d "${1}/${file}" ] ; then
+        chmod u+x,g+x,o+x "${1}/${file}"
+		update_nested_dirs "${1}/${file}"
+	fi
+    done
+}
+
+check_login
+
+echo "Changing directory $(pwd) file ownership to user and group boinc_master - OK? (y/n)"
+read line
+if [ "$line" != "y" ]
+then
+    exit
+fi
+
+if [ ! -x "switcher/switcher" ]
+then
+    echo "Can't find switcher application in directory $(pwd); exiting"
+    exit
+fi
+
+make_boinc_users
+
+# Check whether user is already a member of group boinc_master
+#dscl . -read /Groups/boinc_master GroupMembership | grep -wq "$(LOGNAME)"
+#if [ $? -ne 0 ]; then
+dscl . -merge /groups/boinc_master GroupMembership "$(LOGNAME)"
+#fi
+
+# Check whether user is already a member of group boinc_project
+#dscl . -read /Groups/boinc_project GroupMembership | grep -wq "$(LOGNAME)"
+#if [ $? -ne 0 ]; then
+dscl . -merge /groups/boinc_project GroupMembership "$(LOGNAME)"
+#fi
+
+# Set permissions of BOINC Data directory's contents:
+#   ss_config.xml is world-readable so screensaver coordinator can read it
+#   all other *.xml are not world-readable to keep authenticators private
+#   gui_rpc_auth.cfg is not world-readable to keep RPC password private
+#   all other files are world-readable so default screensaver can read them
+set_perm_recursive . boinc_master boinc_master u+rw,g+rw,o+r-w
+if [ -f gui_rpc_auth.cfg ] ; then
+    set_perm gui_rpc_auth.cfg boinc_master boinc_master 0660
+fi
+chmod 0660 *.xml
+if [ -f ss_config.xml ] ; then
+    set_perm ss_config.xml boinc_master boinc_master 0661
+fi
+
+# Set permissions of BOINC Data directory itself
+set_perm . boinc_master boinc_master 0771
+
+if [ -d projects ] ; then
+    set_perm_recursive projects boinc_master boinc_project u+rw,g+rw,o+r-w
+    set_perm projects boinc_master boinc_project 0770
+    update_nested_dirs projects
+fi
+
+if [ -d slots ] ; then
+    set_perm_recursive slots boinc_master boinc_project u+rw,g+rw,o+r-w
+    set_perm slots boinc_master boinc_project 0770
+    update_nested_dirs slots
+fi
+
+# AppStats application must run setuid root (used in BOINC 5.7 through 5.8.14 only)
+if [ -f switcher/AppStats ] ; then 
+set_perm switcher/AppStats root boinc_master 4550
+fi
+
+set_perm switcher/switcher root boinc_master 04050
+set_perm switcher/setprojectgrp boinc_master boinc_project 2500
+set_perm switcher boinc_master boinc_master 0550
+
+if [ -d locale ] ; then
+    set_perm_recursive locale boinc_master boinc_master +X
+    set_perm_recursive locale boinc_master boinc_master u+r-w,g+r-w,o+r-w
+fi
+
+if [ -f boinc ] ; then
+    set_perm boinc boinc_master boinc_master 6555       # boinc client
+fi
+
+if [ -f boinccmd ] ; then
+    set_perm boinccmd boinc_master boinc_master 0550
+fi
+
+if [ -f ss_config.xml ] ; then
+    set_perm ss_config.xml boinc_master boinc_master 0664
+fi
+
+if [ -x /Applications/BOINCManager.app/Contents/MacOS/BOINCManager ] ; then 
+    set_perm  /Applications/BOINCManager.app/Contents/MacOS/BOINCManager boinc_master boinc_master 0555
+fi
+
+if [ -x /Applications/BOINCManager.app/Contents/Resources/boinc ] ; then 
+    set_perm /Applications/BOINCManager.app/Contents/Resources/boinc boinc_master boinc_master 6555
+fi
+
+# Version 6 screensaver has its own embedded switcher application, but older versions don't.
+if [ -x "/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_switcher" ] ; then 
+    set_perm  "/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_switcher" root boinc_master 4555
+fi
diff --git a/mac_build/Make_BOINC_Service.sh b/mac_build/Make_BOINC_Service.sh
new file mode 100644
index 0000000..4474c87
--- /dev/null
+++ b/mac_build/Make_BOINC_Service.sh
@@ -0,0 +1,205 @@
+#!/bin/sh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+# 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#
+##
+# Script to set up Macintosh to run BOINC client as a daemon / service
+# by Charlie Fenton 7/26/06 
+# revised 1/6/08 to use launchd
+##
+## Note: this version of this script requires BOINC 5.10.34 or later 
+## and OS 10.4 or later.  
+##
+
+## Usage:
+##
+## source Make_BOINC_Service.sh [path_to_client_dir] [path_to_data_dir]
+##
+## path_to_client_dir is needed only for stand-alone client or if Manager
+##  is at non-standard location.
+##
+## path_to_data_dir is needed only for stand-alone client when data is in 
+##  a different directory than the client.
+##
+## Directions for use:
+##
+## (1) Install BOINC Manager using the BOINC.pkg Installer Package, or 
+##     install stand-alone client. 
+## (2) Make sure you are logged in as a user with administrator 
+##     privileges.
+## (3) Run the Terminal application.
+## (4) In the Terminal window, type "source" and a space.
+## (5) Drag this script file from the Finder into the Terminal window.
+## (6) If using the stand-alone client, or if the Manager is in a non-
+##     standard location, drag the folder containing the client from 
+##     the Finder into the Terminal window (or type the path excluding 
+##     the trailing slash).
+## (7) If using the stand-alone client, but the client is not in the data 
+##     directory, drag the BOINC data folder from the Finder into the 
+##     Terminal window (or type the path excluding the trailing slash).
+## (8) Press the return key.
+## (9) When prompted, enter your administrator password.
+## (10) Restart the computer.
+##
+## The system will now start BOINC client as a daemon / service at 
+## system startup.  You will still be able to control and monitor BOINC 
+## using the BOINC Manager, but BOINC client will remain running after 
+## you quit BOINC Manager, when the ScreenSaver quits, and even when 
+## no user is logged in.
+##
+## Note: the BOINC ScreenSaver may not display graphics for some users 
+## when BOINC Client is running as a daemon / service.  Thus will be 
+## fixed with the release of BOINC 6.0 and project applications updated
+## to use the BOINC 6 graphics API.
+##
+
+##
+## When the system has launched BOINC Client as a daemon, you can stop the 
+## BOINC Client from the Terminal by typing:
+##   sudo launchctl stop edu.berkeley.boinc
+## and you can restart the BOINC Client from the Terminal by typing:
+##   sudo launchctl start edu.berkeley.boinc
+##
+## Note: The BOINC Client will quit immediately after launch if it detects 
+## another instance of BOINC Client already running.  So these launchctl 
+## commands will fail if the BOINC Client was started by the BOINC Manager 
+## or ScreenSaver.
+##
+## If BOINC Client is not already running when the BOINC Manager is launched, 
+## the Manager will start BOINC Client.  This will happen automatically at 
+## login if you have BOINC Manager set as a login item for that user.  If 
+## it was started by the Manager, then BOINC Client will quit when the BOINC 
+## Manager quits.
+##
+## If BOINC Client is not already running when the BOINC ScreenSaver starts, 
+## the ScreenSaver will start BOINC Client and will quit BOINC Client when 
+## the ScreenSaver is dismissed.
+##
+
+## REMOVAL:
+## To undo the effects of this script (i.e., to permanently stop running BOINC 
+## as a daemon / service):
+## (1) In the Finder, browse to the /Library/LaunchDaemons folder.
+## (2) Drag the file edu.berkeley.boinc.plist to the trash.  (Finder will ask 
+##     for your administrator user name and password).
+## (3) Restart the computer.
+##
+## The system will no longer start BOINC client as a daemon / service 
+## at system startup.   
+##
+## If you wish to completely remove BOINC from your computer, first 
+## complete the above steps, then follow the directions in the web 
+## page http://boinc.berkeley.edu/mac_advanced.php or in the README.rtf 
+## file supplied with the BOINC installer. 
+##
+
+if [ $# -eq 0 ] ; then
+    PATH_TO_CLIENT="/Applications/BOINCManager.app/Contents/Resources"
+    PATH_TO_DATA="/Library/Application Support/BOINC Data"
+    # Check for BOINC Manager with embedded BOINC Client
+    if [ ! -f "${PATH_TO_CLIENT}/boinc" ]; then
+        echo "  ***************************** ERROR ***************************"
+        echo "  *                                                             *"
+        echo "  *   Could not find BOINC Manager with embedded BOINC client   *"
+        echo "  *   in Applications Directory.                                *"
+        echo "  *                                                             *"
+        echo "  *   Please install BOINC Manager before running this script.  *"
+        echo "  *                                                             *"
+        echo "  ***************************************************************"
+        return 1
+    fi
+else
+    PATH_TO_CLIENT="$1"
+    PATH_TO_DATA="$1"
+    # Check for stand-alone BOINC Client
+    if [ ! -f "${PATH_TO_CLIENT}/boinc" ]; then
+        echo "  ***************************** ERROR ***************************"
+        echo "  *                                                             *"
+        echo "  *   Could not find BOINC client at specified directory        *"
+        echo "  *                                                             *"
+        echo "  *   Please install BOINC client before running this script.   *"
+        echo "  *                                                             *"
+        echo "  ***************************************************************"
+        return 1
+    fi
+fi
+
+if [ $# -gt 1 ] ; then
+    PATH_TO_DATA="$2"
+fi
+
+# Check for BOINC Data directory
+if [ ! -d "${PATH_TO_DATA}" ]; then
+    echo "  ****************** ERROR ******************"
+    echo "  *                                         *"
+    echo "  *   Could not find BOINC data directory   *"
+    echo "  *                                         *"
+    echo "  *******************************************"
+    return 1
+fi
+
+# Delete the old-style boinc daemon StartupItem if present
+sudo rm -fR /Library/StartupItems/boinc
+
+# Delete old temporary working directory and files if present
+rm -fR ~/boincStartupTemp
+# Create new temporary working directory
+mkdir -p ~/boincStartupTemp/
+
+# Create file edu.berkeley.boinc.plist in temporary directory.
+# (For some reason, we can't create the file directly in the final 
+# destination directory, so we create it here and then move it.)
+cat >> ~/boincStartupTemp/edu.berkeley.boinc.plist << ENDOFFILE
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>GroupName</key>
+	<string>boinc_master</string>
+	<key>Label</key>
+	<string>edu.berkeley.boinc</string>
+	<key>Program</key>
+	<string>${PATH_TO_CLIENT}/boinc</string>
+	<key>ProgramArguments</key>
+	<array>
+		<string>${PATH_TO_CLIENT}/boinc</string>
+		<string>-redirectio</string>
+		<string>-daemon</string>
+	</array>
+	<key>RunAtLoad</key>
+	<true/>
+	<key>UserName</key>
+	<string>boinc_master</string>
+	<key>WorkingDirectory</key>
+	<string>${PATH_TO_DATA}/</string>
+</dict>
+</plist>
+ENDOFFILE
+
+sudo mv -f ~/boincStartupTemp/edu.berkeley.boinc.plist /Library/LaunchDaemons/
+
+# Delete temporary working directory
+rm -fR ~/boincStartupTemp
+
+# Set ownership and permissions for our plist
+sudo chown root:wheel /Library/LaunchDaemons/edu.berkeley.boinc.plist
+sudo chmod 0444 /Library/LaunchDaemons/edu.berkeley.boinc.plist
+
+return 0
diff --git a/mac_build/PostInstall-Info.plist b/mac_build/PostInstall-Info.plist
new file mode 100644
index 0000000..b3f29f0
--- /dev/null
+++ b/mac_build/PostInstall-Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>PostInstall</string>
+	<key>CFBundleIdentifier</key>
+	<string>edu.berkeley.boinc.PostInstall</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>5.10.7</string>
+</dict>
+</plist>
diff --git a/mac_build/ScreenSaver-Info.plist b/mac_build/ScreenSaver-Info.plist
new file mode 100644
index 0000000..673b60d
--- /dev/null
+++ b/mac_build/ScreenSaver-Info.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>BOINCSaver</string>
+	<key>CFBundleIdentifier</key>
+	<string>edu.berkeley.boincsaver</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>BOINCSaver</string>
+	<key>CFBundlePackageType</key>
+	<string>BNDL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>5.10.7</string>
+	<key>NSPrincipalClass</key>
+	<string>BOINC_Saver_ModuleView</string>
+</dict>
+</plist>
diff --git a/mac_build/SystemMenu-Info.plist b/mac_build/SystemMenu-Info.plist
new file mode 100644
index 0000000..164db44
--- /dev/null
+++ b/mac_build/SystemMenu-Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>SystemMenu</string>
+	<key>CFBundleIdentifier</key>
+	<string>edu.berkeley.boinc</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>BNDL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>5.10.7</string>
+</dict>
+</plist>
diff --git a/mac_build/Uninstaller-Info.plist b/mac_build/Uninstaller-Info.plist
new file mode 100644
index 0000000..bcd8b32
--- /dev/null
+++ b/mac_build/Uninstaller-Info.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string>MacUninstaller.icns</string>
+	<key>CFBundleIdentifier</key>
+	<string>edu.berkeley.boinc.Uninstaller</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>Uninstall BOINC</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>5.10.7</string>
+</dict>
+</plist>
diff --git a/mac_build/WaitPermissions-Info.plist b/mac_build/WaitPermissions-Info.plist
new file mode 100644
index 0000000..2aa565b
--- /dev/null
+++ b/mac_build/WaitPermissions-Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>edu.berkeley.boinc.WaitPermissions</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>6.11.0</string>
+</dict>
+</plist>
diff --git a/mac_build/boinc.xcodeproj/project.pbxproj b/mac_build/boinc.xcodeproj/project.pbxproj
new file mode 100755
index 0000000..20b96d1
--- /dev/null
+++ b/mac_build/boinc.xcodeproj/project.pbxproj
@@ -0,0 +1,4643 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 44;
+	objects = {
+
+/* Begin PBXAggregateTarget section */
+		DDBD680D07FA82BB0082C20D /* Build_All */ = {
+			isa = PBXAggregateTarget;
+			buildConfigurationList = DD9E237D091CBDAE0048316E /* Build configuration list for PBXAggregateTarget "Build_All" */;
+			buildPhases = (
+			);
+			dependencies = (
+				DDF9EC11144EB36E005D6144 /* PBXTargetDependency */,
+				DDF9EC13144EB36E005D6144 /* PBXTargetDependency */,
+				DDF9EC15144EB36E005D6144 /* PBXTargetDependency */,
+				DDF9EC17144EB36E005D6144 /* PBXTargetDependency */,
+				DDF9EC0F144EB34E005D6144 /* PBXTargetDependency */,
+				DDF9EC0D144EB338005D6144 /* PBXTargetDependency */,
+				DDBD681107FA830E0082C20D /* PBXTargetDependency */,
+				DDB874670C850DB600E0DE1F /* PBXTargetDependency */,
+				DDBD681507FA830E0082C20D /* PBXTargetDependency */,
+				DD791FF10819063C00BE2906 /* PBXTargetDependency */,
+				DD58247D0B198BDD003B6A2F /* PBXTargetDependency */,
+				DD6178CE1488F09E0042482E /* PBXTargetDependency */,
+				DD127877081F44E5007B5DE1 /* PBXTargetDependency */,
+				DD664F19084321A2009BFB11 /* PBXTargetDependency */,
+				DD6D35F40871509300BBCDEE /* PBXTargetDependency */,
+				DDA12AD10A369DEC00FBDD12 /* PBXTargetDependency */,
+				DDD095510A3EE09900C95BA4 /* PBXTargetDependency */,
+				DD45C4A10A53E73500E923D1 /* PBXTargetDependency */,
+				DDBD52900C16C3790074905B /* PBXTargetDependency */,
+				DD095D1F0F3B22DE000902F5 /* PBXTargetDependency */,
+				DDD3370C106224FF00867C7D /* PBXTargetDependency */,
+				DDB219B410B3BBD000417AEF /* PBXTargetDependency */,
+			);
+			name = Build_All;
+			productName = Build_All;
+		};
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+		DD0052F910CA6F1D0067570C /* cs_proxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD0052F710CA6F1D0067570C /* cs_proxy.cpp */; };
+		DD01B6790C16723C0023A806 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
+		DD01B7120C16723D0023A806 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1929D80918A2F100C31BCF /* Security.framework */; };
+		DD0A06F50869A2D2007CD86E /* prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BE407C5B1670043025C /* prefs.cpp */; };
+		DD0A87FF11D950E00067C1F2 /* BOINCInternetFSHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD0A87FD11D950E00067C1F2 /* BOINCInternetFSHandler.cpp */; };
+		DD0C5A8B0816711400CEC5D7 /* boinc.jpg in Resources */ = {isa = PBXBuildFile; fileRef = DD0C5A8A0816711400CEC5D7 /* boinc.jpg */; };
+		DD1277C4081F3E73007B5DE1 /* PostInstall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1277C0081F3E73007B5DE1 /* PostInstall.cpp */; };
+		DD1277E6081F44C1007B5DE1 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
+		DD130E740820C422001A0291 /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD7C5E7508110AE3002FCE1E /* ScreenSaver.framework */; };
+		DD130F320820C47C001A0291 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDE2552B07C62F3E008E7D6E /* IOKit.framework */; };
+		DD130F340820C4C4001A0291 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
+		DD1682B10F8DC6D90096D714 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD89165E0F3B1BC200DE5B1C /* OpenGL.framework */; };
+		DD16BF7C099D6C90003E4B69 /* cpu_sched.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD16BF7B099D6C90003E4B69 /* cpu_sched.cpp */; };
+		DD1AFEAC0A512D8700EE5B82 /* SetupSecurity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7748B40A356D6C0025D05E /* SetupSecurity.cpp */; };
+		DD1AFEAD0A512D8700EE5B82 /* check_security.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6617870A3FFD8C00FFEBEB /* check_security.cpp */; };
+		DD1AFEAF0A512D8700EE5B82 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
+		DD1AFEB00A512D8700EE5B82 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1929D80918A2F100C31BCF /* Security.framework */; };
+		DD1AFEE80A51301C00EE5B82 /* Installer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1AFEE70A51301C00EE5B82 /* Installer.cpp */; };
+		DD1B4C3114FEFA0000ABB13F /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD89165E0F3B1BC200DE5B1C /* OpenGL.framework */; };
+		DD1CB232154F5BF700BFF282 /* project.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1CB22E154F5BF700BFF282 /* project.cpp */; };
+		DD1CB233154F5BF700BFF282 /* result.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1CB230154F5BF700BFF282 /* result.cpp */; };
+		DD1E4B7B14DCA83F0093C711 /* async_file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1E4B7914DCA83F0093C711 /* async_file.cpp */; };
+		DD205A1A0BAF596E0008D473 /* ProjectListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD205A180BAF596E0008D473 /* ProjectListCtrl.cpp */; };
+		DD21B49D0D750FC600AFFEE5 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDFE854A0B60CFD0009B43D9 /* AppKit.framework */; };
+		DD2370E113F49DF3003149F9 /* LoginItemAPI.c in Sources */ = {isa = PBXBuildFile; fileRef = DD2370DF13F49DF3003149F9 /* LoginItemAPI.c */; };
+		DD247AF90AEA308A0034104A /* SkinManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD247AF70AEA308A0034104A /* SkinManager.cpp */; };
+		DD25F72815914F8C007845B5 /* gpu_nvidia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD25F72315914F8C007845B5 /* gpu_nvidia.cpp */; };
+		DD25F72915914F8C007845B5 /* gpu_amd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD25F72415914F8C007845B5 /* gpu_amd.cpp */; };
+		DD25F72A15914F8C007845B5 /* gpu_opencl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD25F72515914F8C007845B5 /* gpu_opencl.cpp */; };
+		DD25F72B15914F8C007845B5 /* gpu_detect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD25F72615914F8C007845B5 /* gpu_detect.cpp */; };
+		DD262C781366D2A200C9A187 /* cc_config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4AE04B13652BD700285859 /* cc_config.cpp */; };
+		DD262C811366D35A00C9A187 /* cc_config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4AE04B13652BD700285859 /* cc_config.cpp */; };
+		DD262C821366D35D00C9A187 /* cc_config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4AE04B13652BD700285859 /* cc_config.cpp */; };
+		DD262C871366D4D200C9A187 /* proxy_info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BEF07C5B1770043025C /* proxy_info.cpp */; };
+		DD2B6C8013149177005D6F3E /* procinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD2B6C7E13149177005D6F3E /* procinfo.cpp */; };
+		DD2B6C8113149177005D6F3E /* procinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD2B6C7E13149177005D6F3E /* procinfo.cpp */; };
+		DD2B6C8D131491B7005D6F3E /* procinfo_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB6934F0ABFE9C600689FD8 /* procinfo_mac.cpp */; };
+		DD2B6C8E131491B8005D6F3E /* procinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD2B6C7E13149177005D6F3E /* procinfo.cpp */; };
+		DD2FE5C9142DE75A00A1E6F3 /* LoginItemAPI.c in Sources */ = {isa = PBXBuildFile; fileRef = DD2370DF13F49DF3003149F9 /* LoginItemAPI.c */; };
+		DD2FE5CB142DE94700A1E6F3 /* LoginItemAPI.c in Sources */ = {isa = PBXBuildFile; fileRef = DD2370DF13F49DF3003149F9 /* LoginItemAPI.c */; };
+		DD33C6F308B5BAF500768630 /* gui_http.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD33C6F108B5BAF500768630 /* gui_http.cpp */; };
+		DD33C6F808B5BB4500768630 /* acct_setup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD33C6F708B5BB4500768630 /* acct_setup.cpp */; };
+		DD33C70408B5BEDE00768630 /* http_curl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD33C70208B5BEDE00768630 /* http_curl.cpp */; };
+		DD35353607E1E13F00C4718D /* boinc_api.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5755AD302FE063A012012A7 /* boinc_api.cpp */; };
+		DD3741D610FC948C001257EB /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD475031AEFF8018E201A /* filesys.cpp */; };
+		DD3741D910FC94BA001257EB /* url.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC06AB210A3E93F00C8D9A5 /* url.cpp */; };
+		DD3E14DB0A774397007E0084 /* boinc in Resources */ = {isa = PBXBuildFile; fileRef = DDD74D8707CF482E0065AC9D /* boinc */; };
+		DD3E14DC0A774397007E0084 /* BOINCMgr.icns in Resources */ = {isa = PBXBuildFile; fileRef = DDF3028907CCCE2C00701169 /* BOINCMgr.icns */; };
+		DD3E14DD0A774397007E0084 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F51BDF4903086C46012012A7 /* InfoPlist.strings */; };
+		DD3E14DF0A774397007E0084 /* AccountInfoPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C41808F3343F00C1DF66 /* AccountInfoPage.cpp */; };
+		DD3E14E10A774397007E0084 /* AccountManagerInfoPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C41C08F3343F00C1DF66 /* AccountManagerInfoPage.cpp */; };
+		DD3E14E20A774397007E0084 /* AccountManagerProcessingPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C41E08F3343F00C1DF66 /* AccountManagerProcessingPage.cpp */; };
+		DD3E14E30A774397007E0084 /* AccountManagerPropertiesPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C42008F3343F00C1DF66 /* AccountManagerPropertiesPage.cpp */; };
+		DD3E14E50A774397007E0084 /* AlreadyExistsPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C42408F3343F00C1DF66 /* AlreadyExistsPage.cpp */; };
+		DD3E14E60A774397007E0084 /* BOINCBaseView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C3FE07C5D1020098A04D /* BOINCBaseView.cpp */; };
+		DD3E14E70A774397007E0084 /* BOINCBaseWizard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C43408F3347D00C1DF66 /* BOINCBaseWizard.cpp */; };
+		DD3E14E80A774397007E0084 /* BOINCGUIApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C40507C5D1020098A04D /* BOINCGUIApp.cpp */; };
+		DD3E14E90A774397007E0084 /* BOINCListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C40407C5D1020098A04D /* BOINCListCtrl.cpp */; };
+		DD3E14EA0A774397007E0084 /* BOINCTaskBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C40307C5D1020098A04D /* BOINCTaskBar.cpp */; };
+		DD3E14EB0A774397007E0084 /* BOINCTaskCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C40607C5D1020098A04D /* BOINCTaskCtrl.cpp */; };
+		DD3E14EC0A774397007E0084 /* CompletionErrorPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C43708F3347D00C1DF66 /* CompletionErrorPage.cpp */; };
+		DD3E14ED0A774397007E0084 /* CompletionPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C43908F3347D00C1DF66 /* CompletionPage.cpp */; };
+		DD3E14EE0A774397007E0084 /* diagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BA207C5AE5A0043025C /* diagnostics.cpp */; };
+		DD3E14EF0A774397007E0084 /* DlgAbout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C40207C5D1020098A04D /* DlgAbout.cpp */; };
+		DD3E14F00A774397007E0084 /* DlgGenericMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC63EEF0985B89600383FD2 /* DlgGenericMessage.cpp */; };
+		DD3E14F10A774397007E0084 /* DlgOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C3FF07C5D1020098A04D /* DlgOptions.cpp */; };
+		DD3E14F20A774397007E0084 /* DlgSelectComputer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD2D25CB07FAB41700151141 /* DlgSelectComputer.cpp */; };
+		DD3E14F30A774397007E0084 /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD475031AEFF8018E201A /* filesys.cpp */; };
+		DD3E14F40A774397007E0084 /* gui_rpc_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C5CC07C5D7D90098A04D /* gui_rpc_client.cpp */; };
+		DD3E14F50A774397007E0084 /* gui_rpc_client_ops.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD73E34E08A0694000656EB1 /* gui_rpc_client_ops.cpp */; };
+		DD3E14F60A774397007E0084 /* gui_rpc_client_print.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD73E34F08A0694100656EB1 /* gui_rpc_client_print.cpp */; };
+		DD3E14F70A774397007E0084 /* hostinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BB607C5AEEE0043025C /* hostinfo.cpp */; };
+		DD3E14FB0A774397007E0084 /* MacSysMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD2F32F707F2A88B00645DDC /* MacSysMenu.cpp */; };
+		DD3E14FD0A774397007E0084 /* Mac_GUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA9D3BB09189A8C0060E7A7 /* Mac_GUI.cpp */; };
+		DD3E14FE0A774397007E0084 /* MainDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C41607C5D13E0098A04D /* MainDocument.cpp */; };
+		DD3E14FF0A774397007E0084 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = F5159562029EB02001F5651B /* md5.c */; };
+		DD3E15000A774397007E0084 /* md5_file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5159564029EB02001F5651B /* md5_file.cpp */; };
+		DD3E15010A774397007E0084 /* mfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD207C5B1150043025C /* mfile.cpp */; };
+		DD3E15020A774397007E0084 /* miofile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD507C5B1150043025C /* miofile.cpp */; };
+		DD3E15050A774397007E0084 /* network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6D0A8507E9A61B007F882B /* network.cpp */; };
+		DD3E15060A774397007E0084 /* NoInternetConnectionPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C44608F334B500C1DF66 /* NoInternetConnectionPage.cpp */; };
+		DD3E15070A774397007E0084 /* NotDetectedPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C44808F334B500C1DF66 /* NotDetectedPage.cpp */; };
+		DD3E15080A774397007E0084 /* NotFoundPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C44A08F334B500C1DF66 /* NotFoundPage.cpp */; };
+		DD3E15090A774397007E0084 /* parse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B901602AC0A2201FB7237 /* parse.cpp */; };
+		DD3E150A0A774397007E0084 /* prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BE407C5B1670043025C /* prefs.cpp */; };
+		DD3E150B0A774397007E0084 /* ProjectInfoPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C44C08F334B500C1DF66 /* ProjectInfoPage.cpp */; };
+		DD3E150C0A774397007E0084 /* ProjectProcessingPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C44E08F334B500C1DF66 /* ProjectProcessingPage.cpp */; };
+		DD3E150D0A774397007E0084 /* ProjectPropertiesPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C45008F334B500C1DF66 /* ProjectPropertiesPage.cpp */; };
+		DD3E150E0A774397007E0084 /* ProxyInfoPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB506F80958446900181B75 /* ProxyInfoPage.cpp */; };
+		DD3E150F0A774397007E0084 /* ProxyPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C45E08F334EA00C1DF66 /* ProxyPage.cpp */; };
+		DD3E15100A774397007E0084 /* stdwx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C41707C5D13E0098A04D /* stdwx.cpp */; };
+		DD3E15110A774397007E0084 /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD479031AF001018E201A /* util.cpp */; };
+		DD3E15120A774397007E0084 /* ValidateAccountKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C42707C5D1D70098A04D /* ValidateAccountKey.cpp */; };
+		DD3E15130A774397007E0084 /* ValidateEmailAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDBDF4A90987091800464F83 /* ValidateEmailAddress.cpp */; };
+		DD3E15140A774397007E0084 /* ValidateURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C42607C5D1D70098A04D /* ValidateURL.cpp */; };
+		DD3E151A0A774397007E0084 /* ViewStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDEF388E0802B73500E87552 /* ViewStatistics.cpp */; };
+		DD3E151B0A774397007E0084 /* UnavailablePage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C46108F334EA00C1DF66 /* UnavailablePage.cpp */; };
+		DD3E151C0A774397007E0084 /* WelcomePage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C46308F334EA00C1DF66 /* WelcomePage.cpp */; };
+		DD3E151F0A774397007E0084 /* wizardex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD58C46908F334EA00C1DF66 /* wizardex.cpp */; };
+		DD3E15200A774397007E0084 /* BOINCDialupManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD8DD4A509D9432F0043019E /* BOINCDialupManager.cpp */; };
+		DD3E15210A774397007E0084 /* check_security.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6617870A3FFD8C00FFEBEB /* check_security.cpp */; };
+		DD3E15220A774397007E0084 /* SetupSecurity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7748B40A356D6C0025D05E /* SetupSecurity.cpp */; };
+		DD3E15230A774397007E0084 /* AdvancedFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD9C94A00A5A3A4100AB0D10 /* AdvancedFrame.cpp */; };
+		DD3E15240A774397007E0084 /* BOINCBaseFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD9C94A20A5A3A4100AB0D10 /* BOINCBaseFrame.cpp */; };
+		DD3E15260A774397007E0084 /* sg_DlgPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDCAD7D30A6C603A0086C7EE /* sg_DlgPreferences.cpp */; };
+		DD3E152D0A774397007E0084 /* app_ipc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B6B1B046C364400A80164 /* app_ipc.cpp */; };
+		DD3E152E0A774397007E0084 /* proxy_info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BEF07C5B1770043025C /* proxy_info.cpp */; };
+		DD3E15310A774397007E0084 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
+		DD3E15320A774397007E0084 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDE2552B07C62F3E008E7D6E /* IOKit.framework */; };
+		DD3E15330A774397007E0084 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1929D80918A2F100C31BCF /* Security.framework */; };
+		DD3E15360A774397007E0084 /* SystemMenu.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = DD40CDF907F0386A0096C645 /* SystemMenu.bundle */; };
+		DD407A4D07D2FB6500163EF5 /* app_ipc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B6B1B046C364400A80164 /* app_ipc.cpp */; };
+		DD407A4F07D2FB7100163EF5 /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B6307C5ACEB0043025C /* base64.cpp */; };
+		DD407A5307D2FB7C00163EF5 /* diagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BA207C5AE5A0043025C /* diagnostics.cpp */; };
+		DD407A5507D2FB8400163EF5 /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD475031AEFF8018E201A /* filesys.cpp */; };
+		DD407A5807D2FB8D00163EF5 /* hostinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BB607C5AEEE0043025C /* hostinfo.cpp */; };
+		DD407A5B07D2FBA000163EF5 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = F5159562029EB02001F5651B /* md5.c */; };
+		DD407A5D07D2FBA300163EF5 /* md5_file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5159564029EB02001F5651B /* md5_file.cpp */; };
+		DD407A5F07D2FBAE00163EF5 /* mfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD207C5B1150043025C /* mfile.cpp */; };
+		DD407A6207D2FBB300163EF5 /* miofile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD507C5B1150043025C /* miofile.cpp */; };
+		DD407A6307D2FBB600163EF5 /* msg_log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BDA07C5B11E0043025C /* msg_log.cpp */; };
+		DD407A6507D2FBBA00163EF5 /* parse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B901602AC0A2201FB7237 /* parse.cpp */; };
+		DD407A6707D2FBBD00163EF5 /* prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BE407C5B1670043025C /* prefs.cpp */; };
+		DD407A6907D2FBC200163EF5 /* proxy_info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BEF07C5B1770043025C /* proxy_info.cpp */; };
+		DD407A6B07D2FBC700163EF5 /* shmem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAA31C97042157A800A80164 /* shmem.cpp */; };
+		DD407A6D07D2FBD100163EF5 /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD479031AF001018E201A /* util.cpp */; };
+		DD407ABB07D2FC7D00163EF5 /* mem_usage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD407AB707D2FC7D00163EF5 /* mem_usage.cpp */; };
+		DD431F240A415EE70060585A /* SetupSecurity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7748B40A356D6C0025D05E /* SetupSecurity.cpp */; };
+		DD431FAA0A41660D0060585A /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
+		DD4329910BA63DEC007CDF2A /* str_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7BF7D70B8E7A9800A009F7 /* str_util.cpp */; };
+		DD46885A0C1661970089F500 /* uninstall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4688590C1661970089F500 /* uninstall.cpp */; };
+		DD48091F081A66F100A174AA /* BOINCSaver.nib in Resources */ = {isa = PBXBuildFile; fileRef = DD48091E081A66F100A174AA /* BOINCSaver.nib */; };
+		DD4AE04D13652BD700285859 /* cc_config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4AE04B13652BD700285859 /* cc_config.cpp */; };
+		DD4AE05013652C1300285859 /* cc_config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4AE04B13652BD700285859 /* cc_config.cpp */; };
+		DD4E704C0BCDAC360010A522 /* browser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4E70490BCDAC360010A522 /* browser.cpp */; };
+		DD4EC65A08A0A7AF009AA08F /* gui_rpc_client_ops.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD73E34E08A0694000656EB1 /* gui_rpc_client_ops.cpp */; };
+		DD4EC65B08A0A83F009AA08F /* gui_rpc_client_print.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD73E34F08A0694100656EB1 /* gui_rpc_client_print.cpp */; };
+		DD4FA25D121828E400154856 /* BOINCHtmlLBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4FA25B121828E400154856 /* BOINCHtmlLBox.cpp */; };
+		DD4FA2621218290600154856 /* BOINCVListBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4FA2601218290600154856 /* BOINCVListBox.cpp */; };
+		DD51DC8F0A4943A300BD24E6 /* check_security.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6617870A3FFD8C00FFEBEB /* check_security.cpp */; };
+		DD52C81108B5D44D008D9AA4 /* gui_rpc_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C5CC07C5D7D90098A04D /* gui_rpc_client.cpp */; };
+		DD52C81208B5D44E008D9AA4 /* gui_rpc_client_ops.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD73E34E08A0694000656EB1 /* gui_rpc_client_ops.cpp */; };
+		DD52C81308B5D44F008D9AA4 /* gui_rpc_client_print.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD73E34F08A0694100656EB1 /* gui_rpc_client_print.cpp */; };
+		DD52C81408B5D484008D9AA4 /* network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6D0A8507E9A61B007F882B /* network.cpp */; };
+		DD531BC60C193D3800742E50 /* MacInstaller.icns in Resources */ = {isa = PBXBuildFile; fileRef = DD531BC50C193D3800742E50 /* MacInstaller.icns */; };
+		DD531BC80C193D5200742E50 /* MacUninstaller.icns in Resources */ = {isa = PBXBuildFile; fileRef = DD531BC70C193D5200742E50 /* MacUninstaller.icns */; };
+		DD5A3F17142877A5008148CA /* thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD5A3F15142877A5008148CA /* thread.cpp */; };
+		DD5BF77D0D4F3D0C00EDF980 /* mac_icon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6381450870DB78007A2F8E /* mac_icon.cpp */; };
+		DD5D7EBB0FE320F600ACF87B /* Uninstaller.r in Rez */ = {isa = PBXBuildFile; fileRef = DD5D7EBA0FE320F600ACF87B /* Uninstaller.r */; };
+		DD6381F90870DD83007A2F8E /* make_app_icon_h.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6381F80870DD83007A2F8E /* make_app_icon_h.cpp */; };
+		DD6617880A3FFD8C00FFEBEB /* check_security.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6617870A3FFD8C00FFEBEB /* check_security.cpp */; };
+		DD67F8140ADB9DD000B0015E /* wxPieCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD40E75D0ADB87BC00214518 /* wxPieCtrl.cpp */; };
+		DD6802310E701ACD0067D009 /* cert_sig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD68022E0E701ACD0067D009 /* cert_sig.cpp */; };
+		DD6803440E70A61D0067D009 /* diagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BA207C5AE5A0043025C /* diagnostics.cpp */; };
+		DD69FEF508416C6B00C01361 /* gui_rpc_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C5CC07C5D7D90098A04D /* gui_rpc_client.cpp */; };
+		DD69FEF708416C9A00C01361 /* boinc_cmd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD69FEF608416C9A00C01361 /* boinc_cmd.cpp */; };
+		DD69FF0C084171CF00C01361 /* network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6D0A8507E9A61B007F882B /* network.cpp */; };
+		DD6ABCD10BD4C5CA009AA7A1 /* browser_safari.mm in Sources */ = {isa = PBXBuildFile; fileRef = DD6ABCD00BD4C5CA009AA7A1 /* browser_safari.mm */; };
+		DD6D0A8707E9A61E007F882B /* network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6D0A8507E9A61B007F882B /* network.cpp */; };
+		DD73E36E08A0720500656EB1 /* gui_rpc_server_ops.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD73E36208A06ED400656EB1 /* gui_rpc_server_ops.cpp */; };
+		DD73E3A708A07CA600656EB1 /* hostinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BB607C5AEEE0043025C /* hostinfo.cpp */; };
+		DD73E3B608A07FC600656EB1 /* gui_rpc_client_ops.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD73E34E08A0694000656EB1 /* gui_rpc_client_ops.cpp */; };
+		DD7475510D86273300860636 /* coproc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7475500D86273300860636 /* coproc.cpp */; };
+		DD7475520D86273300860636 /* coproc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7475500D86273300860636 /* coproc.cpp */; };
+		DD7748B50A356D6C0025D05E /* SetupSecurity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7748B40A356D6C0025D05E /* SetupSecurity.cpp */; };
+		DD7749680A3596380025D05E /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1929D80918A2F100C31BCF /* Security.framework */; };
+		DD77A71812F2D1C9006B82E9 /* MacBitmapComboBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD77A71612F2D1C9006B82E9 /* MacBitmapComboBox.cpp */; };
+		DD7A5D8312EEBE5E0006268E /* sg_TaskCommandPopup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7A5D8212EEBE5E0006268E /* sg_TaskCommandPopup.cpp */; };
+		DD7A5D9F12EEBFC20006268E /* sg_ProjectWebSitesPopup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7A5D9E12EEBFC20006268E /* sg_ProjectWebSitesPopup.cpp */; };
+		DD7A5DAB12EEC37B0006268E /* sg_ProjectCommandPopup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7A5DAA12EEC37B0006268E /* sg_ProjectCommandPopup.cpp */; };
+		DD7AEB4A0C87CE1300AC3B5C /* screensaver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7AEB490C87CE1300AC3B5C /* screensaver.cpp */; };
+		DD7BF7DA0B8E7A9800A009F7 /* str_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7BF7D70B8E7A9800A009F7 /* str_util.cpp */; };
+		DD7BF7E10B8E7B3700A009F7 /* str_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7BF7D70B8E7A9800A009F7 /* str_util.cpp */; };
+		DD7BF7E40B8E7B5000A009F7 /* str_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7BF7D70B8E7A9800A009F7 /* str_util.cpp */; };
+		DD7BF7E60B8E7B6C00A009F7 /* str_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7BF7D70B8E7A9800A009F7 /* str_util.cpp */; };
+		DD7BF7E80B8E7BBE00A009F7 /* work_fetch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7BF7E70B8E7BBE00A009F7 /* work_fetch.cpp */; };
+		DD7DD79B0B8BFA4000B11279 /* ViewResources.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C42307C5D1D70098A04D /* ViewResources.cpp */; };
+		DD80632D131FAA4100DC8971 /* sg_BoincSimpleFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDAFA7AC12D4834D00997329 /* sg_BoincSimpleFrame.cpp */; };
+		DD806336131FAD9A00DC8971 /* sg_CustomControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1C822F0AF372D900F709AC /* sg_CustomControls.cpp */; };
+		DD806339131FADE700DC8971 /* sg_DlgMessages.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4C560C0AD389A2009E23C6 /* sg_DlgMessages.cpp */; };
+		DD81C7E3144D900B000BE61A /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7A1144D900B000BE61A /* jcapimin.c */; };
+		DD81C7E4144D900B000BE61A /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7A2144D900B000BE61A /* jcapistd.c */; };
+		DD81C7E5144D900B000BE61A /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7A3144D900B000BE61A /* jccoefct.c */; };
+		DD81C7E6144D900B000BE61A /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7A4144D900B000BE61A /* jccolor.c */; };
+		DD81C7E7144D900B000BE61A /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7A5144D900B000BE61A /* jcdctmgr.c */; };
+		DD81C7E8144D900B000BE61A /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7A6144D900B000BE61A /* jchuff.c */; };
+		DD81C7EA144D900B000BE61A /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7A8144D900B000BE61A /* jcinit.c */; };
+		DD81C7EB144D900B000BE61A /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7A9144D900B000BE61A /* jcmainct.c */; };
+		DD81C7EC144D900B000BE61A /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7AA144D900B000BE61A /* jcmarker.c */; };
+		DD81C7ED144D900B000BE61A /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7AB144D900B000BE61A /* jcmaster.c */; };
+		DD81C7EE144D900B000BE61A /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7AC144D900B000BE61A /* jcomapi.c */; };
+		DD81C7F0144D900B000BE61A /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7AE144D900B000BE61A /* jcparam.c */; };
+		DD81C7F1144D900B000BE61A /* jcphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7AF144D900B000BE61A /* jcphuff.c */; };
+		DD81C7F2144D900B000BE61A /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7B0144D900B000BE61A /* jcprepct.c */; };
+		DD81C7F3144D900B000BE61A /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7B1144D900B000BE61A /* jcsample.c */; };
+		DD81C7F4144D900B000BE61A /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7B2144D900B000BE61A /* jctrans.c */; };
+		DD81C7F5144D900B000BE61A /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7B3144D900B000BE61A /* jdapimin.c */; };
+		DD81C7F6144D900B000BE61A /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7B4144D900B000BE61A /* jdapistd.c */; };
+		DD81C7F7144D900B000BE61A /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7B5144D900B000BE61A /* jdatadst.c */; };
+		DD81C7F8144D900B000BE61A /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7B6144D900B000BE61A /* jdatasrc.c */; };
+		DD81C7F9144D900B000BE61A /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7B7144D900B000BE61A /* jdcoefct.c */; };
+		DD81C7FA144D900B000BE61A /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7B8144D900B000BE61A /* jdcolor.c */; };
+		DD81C7FC144D900B000BE61A /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7BA144D900B000BE61A /* jddctmgr.c */; };
+		DD81C7FD144D900B000BE61A /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7BB144D900B000BE61A /* jdhuff.c */; };
+		DD81C7FF144D900B000BE61A /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7BD144D900B000BE61A /* jdinput.c */; };
+		DD81C800144D900B000BE61A /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7BE144D900B000BE61A /* jdmainct.c */; };
+		DD81C801144D900B000BE61A /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7BF144D900B000BE61A /* jdmarker.c */; };
+		DD81C802144D900B000BE61A /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7C0144D900B000BE61A /* jdmaster.c */; };
+		DD81C803144D900B000BE61A /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7C1144D900B000BE61A /* jdmerge.c */; };
+		DD81C804144D900B000BE61A /* jdphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7C2144D900B000BE61A /* jdphuff.c */; };
+		DD81C805144D900B000BE61A /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7C3144D900B000BE61A /* jdpostct.c */; };
+		DD81C806144D900B000BE61A /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7C4144D900B000BE61A /* jdsample.c */; };
+		DD81C807144D900B000BE61A /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7C5144D900B000BE61A /* jdtrans.c */; };
+		DD81C808144D900B000BE61A /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7C6144D900B000BE61A /* jerror.c */; };
+		DD81C80A144D900B000BE61A /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7C8144D900B000BE61A /* jfdctflt.c */; };
+		DD81C80B144D900B000BE61A /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7C9144D900B000BE61A /* jfdctfst.c */; };
+		DD81C80C144D900B000BE61A /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7CA144D900B000BE61A /* jfdctint.c */; };
+		DD81C80D144D900B000BE61A /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7CB144D900B000BE61A /* jidctflt.c */; };
+		DD81C80E144D900B000BE61A /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7CC144D900B000BE61A /* jidctfst.c */; };
+		DD81C80F144D900B000BE61A /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7CD144D900B000BE61A /* jidctint.c */; };
+		DD81C810144D900B000BE61A /* jidctred.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7CE144D900B000BE61A /* jidctred.c */; };
+		DD81C812144D900B000BE61A /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7D0144D900B000BE61A /* jmemmgr.c */; };
+		DD81C813144D900B000BE61A /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7D1144D900B000BE61A /* jmemnobs.c */; };
+		DD81C818144D900B000BE61A /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7D6144D900B000BE61A /* jquant1.c */; };
+		DD81C819144D900B000BE61A /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7D7144D900B000BE61A /* jquant2.c */; };
+		DD81C81A144D900B000BE61A /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7D8144D900B000BE61A /* jutils.c */; };
+		DD81C81C144D900B000BE61A /* rdbmp.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7DA144D900B000BE61A /* rdbmp.c */; };
+		DD81C81D144D900B000BE61A /* rdcolmap.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7DB144D900B000BE61A /* rdcolmap.c */; };
+		DD81C81E144D900B000BE61A /* rdgif.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7DC144D900B000BE61A /* rdgif.c */; };
+		DD81C81F144D900B000BE61A /* rdppm.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7DD144D900B000BE61A /* rdppm.c */; };
+		DD81C820144D900B000BE61A /* rdrle.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7DE144D900B000BE61A /* rdrle.c */; };
+		DD81C821144D900B000BE61A /* rdswitch.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7DF144D900B000BE61A /* rdswitch.c */; };
+		DD81C822144D900B000BE61A /* rdtarga.c in Sources */ = {isa = PBXBuildFile; fileRef = DD81C7E0144D900B000BE61A /* rdtarga.c */; };
+		DD85AE4B0F5D284D0031F7AC /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1929D80918A2F100C31BCF /* Security.framework */; };
+		DD867B7510DCE77700128AB4 /* notice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE1372D10DC5E8D00161D6B /* notice.cpp */; };
+		DD89163D0F3B182700DE5B1C /* ss_app.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD89163C0F3B182700DE5B1C /* ss_app.cpp */; };
+		DD89165A0F3B1B9000DE5B1C /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDFE854A0B60CFD0009B43D9 /* AppKit.framework */; };
+		DD89165F0F3B1BC200DE5B1C /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD89165D0F3B1BC200DE5B1C /* GLUT.framework */; };
+		DD8916600F3B1BC200DE5B1C /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD89165E0F3B1BC200DE5B1C /* OpenGL.framework */; };
+		DD8916950F3B1BFF00DE5B1C /* mac_backtrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD040BD4551F008F7921 /* mac_backtrace.cpp */; };
+		DD8916960F3B1C0000DE5B1C /* QBacktrace.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD060BD4551F008F7921 /* QBacktrace.c */; };
+		DD8916970F3B1C0100DE5B1C /* QCrashReport.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD080BD4551F008F7921 /* QCrashReport.c */; };
+		DD8916980F3B1C0200DE5B1C /* QMachOImage.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0A0BD4551F008F7921 /* QMachOImage.c */; };
+		DD89169A0F3B1C0600DE5B1C /* QMachOImageList.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0C0BD4551F008F7921 /* QMachOImageList.c */; };
+		DD89169B0F3B1C0700DE5B1C /* QSymbols.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0E0BD4551F008F7921 /* QSymbols.c */; };
+		DD89169C0F3B1C0900DE5B1C /* QTaskMemory.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD100BD4551F008F7921 /* QTaskMemory.c */; };
+		DD89179B0F3B206600DE5B1C /* app_ipc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B6B1B046C364400A80164 /* app_ipc.cpp */; };
+		DD8917A30F3B207800DE5B1C /* diagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BA207C5AE5A0043025C /* diagnostics.cpp */; };
+		DD8917A50F3B207E00DE5B1C /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD475031AEFF8018E201A /* filesys.cpp */; };
+		DD8917A70F3B208500DE5B1C /* gui_rpc_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C5CC07C5D7D90098A04D /* gui_rpc_client.cpp */; };
+		DD8917AB0F3B209500DE5B1C /* hostinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BB607C5AEEE0043025C /* hostinfo.cpp */; };
+		DD8917AE0F3B20B100DE5B1C /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = F5159562029EB02001F5651B /* md5.c */; };
+		DD8917B00F3B20B500DE5B1C /* md5_file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5159564029EB02001F5651B /* md5_file.cpp */; };
+		DD8917B80F3B20C600DE5B1C /* mfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD207C5B1150043025C /* mfile.cpp */; };
+		DD8917BA0F3B20CC00DE5B1C /* miofile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD507C5B1150043025C /* miofile.cpp */; };
+		DD8917BF0F3B20D900DE5B1C /* network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6D0A8507E9A61B007F882B /* network.cpp */; };
+		DD8917C50F3B210B00DE5B1C /* parse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B901602AC0A2201FB7237 /* parse.cpp */; };
+		DD8917C70F3B211100DE5B1C /* prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BE407C5B1670043025C /* prefs.cpp */; };
+		DD8917D00F3B212300DE5B1C /* proxy_info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BEF07C5B1770043025C /* proxy_info.cpp */; };
+		DD8917D20F3B212900DE5B1C /* shmem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAA31C97042157A800A80164 /* shmem.cpp */; };
+		DD8917D80F3B213000DE5B1C /* str_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7BF7D70B8E7A9800A009F7 /* str_util.cpp */; };
+		DD8917DD0F3B213D00DE5B1C /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD479031AF001018E201A /* util.cpp */; };
+		DD8917DF0F3B214300DE5B1C /* boinc_api.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5755AD302FE063A012012A7 /* boinc_api.cpp */; };
+		DD8917E10F3B214A00DE5B1C /* graphics2_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE41C250C1FCA8F00CA1F86 /* graphics2_util.cpp */; };
+		DD8917E30F3B214F00DE5B1C /* graphics2_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB874450C850D3000E0DE1F /* graphics2_unix.cpp */; };
+		DD8917E50F3B215400DE5B1C /* graphics2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB874460C850D3000E0DE1F /* graphics2.cpp */; };
+		DD8917E70F3B215B00DE5B1C /* gutil_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD64DF0409DCC5E000668B3A /* gutil_text.cpp */; };
+		DD8917E90F3B216000DE5B1C /* gutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD40825507D3076400163EF5 /* gutil.cpp */; };
+		DD8917EE0F3B21CE00DE5B1C /* macglutfix.m in Sources */ = {isa = PBXBuildFile; fileRef = DD6D82DA08131AB1008F7200 /* macglutfix.m */; };
+		DD8917F00F3B21DA00DE5B1C /* mac_icon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6381450870DB78007A2F8E /* mac_icon.cpp */; };
+		DD9AB0340EB7D5DE00AF1616 /* rr_sim.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD9AB0320EB7D5DE00AF1616 /* rr_sim.cpp */; };
+		DDA0C8350FE1D704001E02E6 /* procinfo_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB6934F0ABFE9C600689FD8 /* procinfo_mac.cpp */; };
+		DDA12A6D0A36974600FBDD12 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1929D80918A2F100C31BCF /* Security.framework */; };
+		DDA12AA20A369B5500FBDD12 /* SetupSecurity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7748B40A356D6C0025D05E /* SetupSecurity.cpp */; };
+		DDA12AAE0A369C5800FBDD12 /* SecurityUtility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA12AAD0A369C5800FBDD12 /* SecurityUtility.cpp */; };
+		DDA165E513B49B0D00CB4DD5 /* url.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC06AB210A3E93F00C8D9A5 /* url.cpp */; };
+		DDA1F1EE126D105B005EFFEB /* current_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA1F1EC126D105B005EFFEB /* current_version.cpp */; };
+		DDA26C5E13977E1500DFDFE1 /* sqlite3.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA26C5D13977E1500DFDFE1 /* sqlite3.c */; };
+		DDA45500140F7DE200D97676 /* synch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD407AED07D2FE7200163EF5 /* synch.cpp */; };
+		DDA45501140F7E7900D97676 /* reduce_main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD40825807D3076400163EF5 /* reduce_main.cpp */; };
+		DDA546610D16964E008CC69A /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDA546600D16964E008CC69A /* QuickTime.framework */; };
+		DDA6BD120BD4551F008F7921 /* mac_backtrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD040BD4551F008F7921 /* mac_backtrace.cpp */; };
+		DDA6BD130BD4551F008F7921 /* QBacktrace.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD060BD4551F008F7921 /* QBacktrace.c */; };
+		DDA6BD140BD4551F008F7921 /* QCrashReport.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD080BD4551F008F7921 /* QCrashReport.c */; };
+		DDA6BD150BD4551F008F7921 /* QMachOImage.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0A0BD4551F008F7921 /* QMachOImage.c */; };
+		DDA6BD160BD4551F008F7921 /* QMachOImageList.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0C0BD4551F008F7921 /* QMachOImageList.c */; };
+		DDA6BD170BD4551F008F7921 /* QSymbols.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0E0BD4551F008F7921 /* QSymbols.c */; };
+		DDA6BD180BD4551F008F7921 /* QTaskMemory.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD100BD4551F008F7921 /* QTaskMemory.c */; };
+		DDA6BD190BD4551F008F7921 /* mac_backtrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD040BD4551F008F7921 /* mac_backtrace.cpp */; };
+		DDA6BD1A0BD4551F008F7921 /* QBacktrace.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD060BD4551F008F7921 /* QBacktrace.c */; };
+		DDA6BD1B0BD4551F008F7921 /* QCrashReport.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD080BD4551F008F7921 /* QCrashReport.c */; };
+		DDA6BD1C0BD4551F008F7921 /* QMachOImage.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0A0BD4551F008F7921 /* QMachOImage.c */; };
+		DDA6BD1D0BD4551F008F7921 /* QMachOImageList.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0C0BD4551F008F7921 /* QMachOImageList.c */; };
+		DDA6BD1E0BD4551F008F7921 /* QSymbols.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0E0BD4551F008F7921 /* QSymbols.c */; };
+		DDA6BD1F0BD4551F008F7921 /* QTaskMemory.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD100BD4551F008F7921 /* QTaskMemory.c */; };
+		DDA6BD210BD4551F008F7921 /* mac_backtrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD040BD4551F008F7921 /* mac_backtrace.cpp */; };
+		DDA6BD230BD4551F008F7921 /* QBacktrace.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD060BD4551F008F7921 /* QBacktrace.c */; };
+		DDA6BD250BD4551F008F7921 /* QCrashReport.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD080BD4551F008F7921 /* QCrashReport.c */; };
+		DDA6BD270BD4551F008F7921 /* QMachOImage.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0A0BD4551F008F7921 /* QMachOImage.c */; };
+		DDA6BD290BD4551F008F7921 /* QMachOImageList.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0C0BD4551F008F7921 /* QMachOImageList.c */; };
+		DDA6BD2B0BD4551F008F7921 /* QSymbols.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD0E0BD4551F008F7921 /* QSymbols.c */; };
+		DDA6BD2D0BD4551F008F7921 /* QTaskMemory.c in Sources */ = {isa = PBXBuildFile; fileRef = DDA6BD100BD4551F008F7921 /* QTaskMemory.c */; };
+		DDA850A41207EED900B473A6 /* WizardAttach.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA850A21207EED900B473A6 /* WizardAttach.cpp */; };
+		DDA99BF41099AF18002F8E9B /* MacAccessiblity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA99BF31099AF18002F8E9B /* MacAccessiblity.cpp */; };
+		DDAD31D80EC26B14002DA09D /* mac_address.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDAD31D60EC26B14002DA09D /* mac_address.cpp */; };
+		DDAD31D90EC26B14002DA09D /* mac_address.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDAD31D60EC26B14002DA09D /* mac_address.cpp */; };
+		DDAEB54012F8295800EDEDBE /* LogBOINC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C41407C5D13E0098A04D /* LogBOINC.cpp */; };
+		DDAEC9FF07FA5A5C00A7BC36 /* SetVersion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDAEC9E707FA58A000A7BC36 /* SetVersion.cpp */; };
+		DDB219B210B3BBA900417AEF /* WaitPermissions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB219B110B3BBA900417AEF /* WaitPermissions.cpp */; };
+		DDB42E3412F1B6A400E6D8A2 /* libwx_mac_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDA90F260B64673D008F2E87 /* libwx_mac_static.a */; };
+		DDB4A91E1411840800032E5D /* proc_control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB4A91C1411840800032E5D /* proc_control.cpp */; };
+		DDB4A91F1411840800032E5D /* proc_control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB4A91C1411840800032E5D /* proc_control.cpp */; };
+		DDB4A9201411871200032E5D /* proc_control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB4A91C1411840800032E5D /* proc_control.cpp */; };
+		DDB693500ABFE9C600689FD8 /* procinfo_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB6934F0ABFE9C600689FD8 /* procinfo_mac.cpp */; };
+		DDB6E3EF0D5B27AA00ED12B8 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
+		DDB74A6C0D74259E00E97A40 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDFE854A0B60CFD0009B43D9 /* AppKit.framework */; };
+		DDB873990C85072500E0DE1F /* mac_saver_module.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB873960C85072500E0DE1F /* mac_saver_module.cpp */; };
+		DDB8739A0C85072500E0DE1F /* Mac_Saver_ModuleView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB873980C85072500E0DE1F /* Mac_Saver_ModuleView.m */; };
+		DDB873EE0C850BC800E0DE1F /* gutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD40825507D3076400163EF5 /* gutil.cpp */; };
+		DDB873EF0C850BC800E0DE1F /* macglutfix.m in Sources */ = {isa = PBXBuildFile; fileRef = DD6D82DA08131AB1008F7200 /* macglutfix.m */; };
+		DDB873F00C850BC800E0DE1F /* reduce_lib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD40825707D3076400163EF5 /* reduce_lib.cpp */; };
+		DDB873F40C850BC800E0DE1F /* gutil_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD64DF0409DCC5E000668B3A /* gutil_text.cpp */; };
+		DDB874470C850D3000E0DE1F /* graphics2_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB874450C850D3000E0DE1F /* graphics2_unix.cpp */; };
+		DDB874480C850D3000E0DE1F /* graphics2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB874460C850D3000E0DE1F /* graphics2.cpp */; };
+		DDBB7E7611D2BCD400598DC1 /* NoticeListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDBB7E7511D2BCD400598DC1 /* NoticeListCtrl.cpp */; };
+		DDBC6CA50D5D458700564C49 /* boinc_ss_logo.png in Resources */ = {isa = PBXBuildFile; fileRef = DDBC6CA40D5D458700564C49 /* boinc_ss_logo.png */; };
+		DDBE74390C03B1C600453BB8 /* cs_platforms.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDBE74380C03B1C600453BB8 /* cs_platforms.cpp */; };
+		DDC06AB410A3E93F00C8D9A5 /* url.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC06AB210A3E93F00C8D9A5 /* url.cpp */; };
+		DDC06AB810A3E97700C8D9A5 /* url.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC06AB210A3E93F00C8D9A5 /* url.cpp */; };
+		DDC06ABC10A3E98D00C8D9A5 /* url.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC06AB210A3E93F00C8D9A5 /* url.cpp */; };
+		DDC132F30E2DAB1B0014D305 /* AsyncRPC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC132F20E2DAB1B0014D305 /* AsyncRPC.cpp */; };
+		DDC321AE12E45162006CB55F /* sg_PanelBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC321AC12E45162006CB55F /* sg_PanelBase.cpp */; };
+		DDC3D55E0D507D1700BE6D23 /* BOINCClientManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC3D55C0D507D1700BE6D23 /* BOINCClientManager.cpp */; };
+		DDC55A6D136013D000D79903 /* procinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD2B6C7E13149177005D6F3E /* procinfo.cpp */; };
+		DDC55A70136013F800D79903 /* procinfo_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB6934F0ABFE9C600689FD8 /* procinfo_mac.cpp */; };
+		DDC836E60EDEA5DB001C2EF9 /* TermsOfUsePage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC836E50EDEA5DB001C2EF9 /* TermsOfUsePage.cpp */; };
+		DDC988FE0F3BD44100EE8D0E /* gui_rpc_client_ops.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD73E34E08A0694000656EB1 /* gui_rpc_client_ops.cpp */; };
+		DDCF84080E1B7C0A005EDC45 /* DlgItemProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDCF84060E1B7C0A005EDC45 /* DlgItemProperties.cpp */; };
+		DDD0697312D70C9400120920 /* sg_TaskPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD0697112D70C9400120920 /* sg_TaskPanel.cpp */; };
+		DDD095490A3EDF2D00C95BA4 /* switcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD095480A3EDF2D00C95BA4 /* switcher.cpp */; };
+		DDD3370A106224E800867C7D /* AddRemoveUser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD33709106224E800867C7D /* AddRemoveUser.cpp */; };
+		DDD3371310622D0800867C7D /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
+		DDD52DCA0C03CAE6009B5FC0 /* ViewProjects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD52DC40C03CAE6009B5FC0 /* ViewProjects.cpp */; };
+		DDD52DCC0C03CAE6009B5FC0 /* ViewTransfers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD52DC60C03CAE6009B5FC0 /* ViewTransfers.cpp */; };
+		DDD52DCE0C03CAE6009B5FC0 /* ViewWork.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD52DC80C03CAE6009B5FC0 /* ViewWork.cpp */; };
+		DDD74D8907CF48E50065AC9D /* acct_mgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B3D07C5ABF40043025C /* acct_mgr.cpp */; };
+		DDD74D8A07CF48E70065AC9D /* app.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FC102AC0A0C01FB7237 /* app.cpp */; };
+		DDD74D8B07CF48E80065AC9D /* app_control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B4807C5AC4C0043025C /* app_control.cpp */; };
+		DDD74D8D07CF48EA0065AC9D /* app_start.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B5A07C5AC9F0043025C /* app_start.cpp */; };
+		DDD74D8F07CF48EC0065AC9D /* client_msgs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B6C07C5AD270043025C /* client_msgs.cpp */; };
+		DDD74D9007CF48ED0065AC9D /* check_state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FC302AC0A0C01FB7237 /* check_state.cpp */; };
+		DDD74D9107CF48EE0065AC9D /* client_types.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FC502AC0A0C01FB7237 /* client_types.cpp */; };
+		DDD74D9207CF48EF0065AC9D /* cs_account.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B7907C5AD970043025C /* cs_account.cpp */; };
+		DDD74D9307CF48F00065AC9D /* cs_apps.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FC702AC0A0C01FB7237 /* cs_apps.cpp */; };
+		DDD74D9407CF48F10065AC9D /* cs_benchmark.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B7F07C5ADC30043025C /* cs_benchmark.cpp */; };
+		DDD74D9507CF48F20065AC9D /* cs_cmdline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B8507C5ADE70043025C /* cs_cmdline.cpp */; };
+		DDD74D9707CF48F30065AC9D /* cs_files.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FC802AC0A0C01FB7237 /* cs_files.cpp */; };
+		DDD74D9807CF48F40065AC9D /* cs_prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B8D07C5ADFA0043025C /* cs_prefs.cpp */; };
+		DDD74D9907CF48F50065AC9D /* cs_scheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FC902AC0A0C01FB7237 /* cs_scheduler.cpp */; };
+		DDD74D9A07CF48F60065AC9D /* cs_statefile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B9307C5AE2E0043025C /* cs_statefile.cpp */; };
+		DDD74D9B07CF48F90065AC9D /* cs_trickle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B9407C5AE2E0043025C /* cs_trickle.cpp */; };
+		DDD74D9C07CF48FA0065AC9D /* dhrystone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B9507C5AE2E0043025C /* dhrystone.cpp */; };
+		DDD74D9D07CF48FB0065AC9D /* dhrystone2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B9707C5AE2E0043025C /* dhrystone2.cpp */; };
+		DDD74D9E07CF48FC0065AC9D /* file_names.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FCB02AC0A0C01FB7237 /* file_names.cpp */; };
+		DDD74D9F07CF48FC0065AC9D /* file_xfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FCD02AC0A0C01FB7237 /* file_xfer.cpp */; };
+		DDD74DA007CF48FD0065AC9D /* gui_rpc_server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BAD07C5AEB70043025C /* gui_rpc_server.cpp */; };
+		DDD74DA207CF48FF0065AC9D /* hostinfo_network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BC007C5AF280043025C /* hostinfo_network.cpp */; };
+		DDD74DA307CF49000065AC9D /* hostinfo_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FD302AC0A0C01FB7237 /* hostinfo_unix.cpp */; };
+		DDD74DA507CF49020065AC9D /* log_flags.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FD602AC0A0C01FB7237 /* log_flags.cpp */; };
+		DDD74DA607CF49030065AC9D /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BCE07C5B0B80043025C /* main.cpp */; };
+		DDD74DA707CF49040065AC9D /* net_stats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FDA02AC0A0C01FB7237 /* net_stats.cpp */; };
+		DDD74DA907CF49090065AC9D /* pers_file_xfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F51CCF1F02EFD37D018DB99A /* pers_file_xfer.cpp */; };
+		DDD74DAD07CF490E0065AC9D /* time_stats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B8FE402AC0A0C01FB7237 /* time_stats.cpp */; };
+		DDD74DAE07CF490F0065AC9D /* whetstone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD5EF07007C5B329007CCE8D /* whetstone.cpp */; };
+		DDD74DC307CF492A0065AC9D /* app_ipc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B6B1B046C364400A80164 /* app_ipc.cpp */; };
+		DDD74DC407CF492A0065AC9D /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B6307C5ACEB0043025C /* base64.cpp */; };
+		DDD74DC507CF492B0065AC9D /* crypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F51DA64D02DB97FF010E292A /* crypt.cpp */; };
+		DDD74DC607CF492C0065AC9D /* diagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BA207C5AE5A0043025C /* diagnostics.cpp */; };
+		DDD74DC707CF492D0065AC9D /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD475031AEFF8018E201A /* filesys.cpp */; };
+		DDD74DC807CF492E0065AC9D /* hostinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BB607C5AEEE0043025C /* hostinfo.cpp */; };
+		DDD74DCB07CF49310065AC9D /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = F5159562029EB02001F5651B /* md5.c */; };
+		DDD74DCC07CF49320065AC9D /* md5_file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5159564029EB02001F5651B /* md5_file.cpp */; };
+		DDD74DCD07CF49330065AC9D /* mfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD207C5B1150043025C /* mfile.cpp */; };
+		DDD74DCE07CF49390065AC9D /* miofile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD507C5B1150043025C /* miofile.cpp */; };
+		DDD74DCF07CF493A0065AC9D /* msg_log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BDA07C5B11E0043025C /* msg_log.cpp */; };
+		DDD74DD007CF493B0065AC9D /* parse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B901602AC0A2201FB7237 /* parse.cpp */; };
+		DDD74DD107CF493C0065AC9D /* prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BE407C5B1670043025C /* prefs.cpp */; };
+		DDD74DD207CF493C0065AC9D /* proxy_info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BEF07C5B1770043025C /* proxy_info.cpp */; };
+		DDD74DD307CF493D0065AC9D /* shmem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAA31C97042157A800A80164 /* shmem.cpp */; };
+		DDD74DD407CF493E0065AC9D /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD479031AF001018E201A /* util.cpp */; };
+		DDD7EF4707F0526E00BA3B90 /* SystemMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = DD40CDFE07F038990096C645 /* SystemMenu.m */; };
+		DDD93E7313E017B600B92D0F /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDE2552B07C62F3E008E7D6E /* IOKit.framework */; };
+		DDD9C5A510CCF61F00A1E4CD /* coproc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7475500D86273300860636 /* coproc.cpp */; };
+		DDD9C5AA10CCF6A000A1E4CD /* coproc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7475500D86273300860636 /* coproc.cpp */; };
+		DDD9C5AB10CCF6A300A1E4CD /* coproc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7475500D86273300860636 /* coproc.cpp */; };
+		DDD9C5AC10CCF6AB00A1E4CD /* coproc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7475500D86273300860636 /* coproc.cpp */; };
+		DDDD6D8012E4611300C258A0 /* sg_ProjectPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDDD6D7E12E4611300C258A0 /* sg_ProjectPanel.cpp */; };
+		DDDE43B10EC04C1800083520 /* DlgExitMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDDE43B00EC04C1800083520 /* DlgExitMessage.cpp */; };
+		DDE1372A10DC5E5300161D6B /* cs_notice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE1372810DC5E5300161D6B /* cs_notice.cpp */; };
+		DDE1372F10DC5E8D00161D6B /* notice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE1372D10DC5E8D00161D6B /* notice.cpp */; };
+		DDE1373210DC5EA400161D6B /* notice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE1372D10DC5E8D00161D6B /* notice.cpp */; };
+		DDE1373D10DC60BB00161D6B /* ViewNotices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE1373B10DC60BB00161D6B /* ViewNotices.cpp */; };
+		DDE1374210DC60E200161D6B /* DlgEventLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE1374010DC60E200161D6B /* DlgEventLog.cpp */; };
+		DDE1374910DC613600161D6B /* DlgEventLogListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE1374710DC613600161D6B /* DlgEventLogListCtrl.cpp */; };
+		DDE3A8800E90D1BF00A363A7 /* client_state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE3A87F0E90D1BF00A363A7 /* client_state.cpp */; };
+		DDE3A8810E90D21A00A363A7 /* sandbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD80C83D0CBAEB4F00F1121D /* sandbox.cpp */; };
+		DDE3A8850E90D23400A363A7 /* scheduler_op.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE3A8840E90D23400A363A7 /* scheduler_op.cpp */; };
+		DDE41C260C1FCA8F00CA1F86 /* graphics2_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE41C250C1FCA8F00CA1F86 /* graphics2_util.cpp */; };
+		DDE5868E10FC8D2200DFA887 /* app_ipc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B6B1B046C364400A80164 /* app_ipc.cpp */; };
+		DDE586A310FC8DD700DFA887 /* miofile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD507C5B1150043025C /* miofile.cpp */; };
+		DDE586A410FC8DD900DFA887 /* parse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B901602AC0A2201FB7237 /* parse.cpp */; };
+		DDE586A710FC8E1200DFA887 /* hostinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BB607C5AEEE0043025C /* hostinfo.cpp */; };
+		DDE586A810FC8E2B00DFA887 /* prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BE407C5B1670043025C /* prefs.cpp */; };
+		DDE586AB10FC8E5100DFA887 /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD479031AF001018E201A /* util.cpp */; };
+		DDE586AC10FC8E6900DFA887 /* str_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7BF7D70B8E7A9800A009F7 /* str_util.cpp */; };
+		DDE586AF10FC8E7B00DFA887 /* proxy_info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BEF07C5B1770043025C /* proxy_info.cpp */; };
+		DDE586B010FC8E9100DFA887 /* coproc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7475500D86273300860636 /* coproc.cpp */; };
+		DDE586B310FC8E9B00DFA887 /* mfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD207C5B1150043025C /* mfile.cpp */; };
+		DDE7A3B115C6739E002B3B96 /* ttfont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE7A3AF15C6739E002B3B96 /* ttfont.cpp */; };
+		DDF5F85A10DD05DB006A50CD /* notice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE1372D10DC5E8D00161D6B /* notice.cpp */; };
+		DDF5F85B10DD05E4006A50CD /* notice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE1372D10DC5E8D00161D6B /* notice.cpp */; };
+		DDF9EC0A144EB2BB005D6144 /* boinc_opencl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDF9EC08144EB2BB005D6144 /* boinc_opencl.cpp */; };
+		DDF9EC0B144EB2BB005D6144 /* boinc_opencl.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF9EC09144EB2BB005D6144 /* boinc_opencl.h */; };
+		DDFA60E20CB3391C0037B88C /* gfx_switcher in Resources */ = {isa = PBXBuildFile; fileRef = DDFA60D40CB337D40037B88C /* gfx_switcher */; };
+		DDFA60E40CB3396C0037B88C /* gfx_switcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDFA60E30CB3396C0037B88C /* gfx_switcher.cpp */; };
+		DDFA61520CB347500037B88C /* app_ipc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B6B1B046C364400A80164 /* app_ipc.cpp */; };
+		DDFA61570CB347730037B88C /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD475031AEFF8018E201A /* filesys.cpp */; };
+		DDFA61780CB348660037B88C /* mfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD207C5B1150043025C /* mfile.cpp */; };
+		DDFA617A0CB3486D0037B88C /* miofile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD507C5B1150043025C /* miofile.cpp */; };
+		DDFA617E0CB3487F0037B88C /* parse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B901602AC0A2201FB7237 /* parse.cpp */; };
+		DDFA61860CB3489E0037B88C /* str_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7BF7D70B8E7A9800A009F7 /* str_util.cpp */; };
+		DDFA61890CB348A90037B88C /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD479031AF001018E201A /* util.cpp */; };
+		DDFA618C0CB348C50037B88C /* hostinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BB607C5AEEE0043025C /* hostinfo.cpp */; };
+		DDFA618F0CB348E80037B88C /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = F5159562029EB02001F5651B /* md5.c */; };
+		DDFA61900CB348E90037B88C /* md5_file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5159564029EB02001F5651B /* md5_file.cpp */; };
+		DDFA61920CB349020037B88C /* proxy_info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BEF07C5B1770043025C /* proxy_info.cpp */; };
+		DDFA61940CB349160037B88C /* prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BE407C5B1670043025C /* prefs.cpp */; };
+		DDFD5F0F0818F2EE002B23D4 /* gui_rpc_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C5CC07C5D7D90098A04D /* gui_rpc_client.cpp */; };
+		DDFD5F270818F329002B23D4 /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD475031AEFF8018E201A /* filesys.cpp */; };
+		DDFD5F280818F33C002B23D4 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = F5159562029EB02001F5651B /* md5.c */; };
+		DDFD5F290818F346002B23D4 /* md5_file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5159564029EB02001F5651B /* md5_file.cpp */; };
+		DDFD5F2A0818F34F002B23D4 /* mfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD207C5B1150043025C /* mfile.cpp */; };
+		DDFD5F2B0818F359002B23D4 /* miofile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BD507C5B1150043025C /* miofile.cpp */; };
+		DDFD5F2C0818F368002B23D4 /* network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6D0A8507E9A61B007F882B /* network.cpp */; };
+		DDFD5F2D0818F372002B23D4 /* parse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F54B901602AC0A2201FB7237 /* parse.cpp */; };
+		DDFD5F2E0818F3A1002B23D4 /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5EAD479031AF001018E201A /* util.cpp */; };
+		DDFE4E3D10AB778100919319 /* url.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC06AB210A3E93F00C8D9A5 /* url.cpp */; };
+		DDFE4E9110AB7C3A00919319 /* url.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC06AB210A3E93F00C8D9A5 /* url.cpp */; };
+		DDFE84E50B60CD66009B43D9 /* DlgAdvPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDFE84E10B60CD66009B43D9 /* DlgAdvPreferences.cpp */; };
+		DDFE84E70B60CD66009B43D9 /* DlgAdvPreferencesBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDFE84E30B60CD66009B43D9 /* DlgAdvPreferencesBase.cpp */; };
+		DDFF2AE90A53D599002BC19D /* setprojectgrp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDFF2AE80A53D599002BC19D /* setprojectgrp.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		DD095D1E0F3B22DE000902F5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD89161C0F3B17E900DE5B1C;
+			remoteInfo = ss_app;
+		};
+		DD127876081F44E5007B5DE1 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD1277B2081F3D67007B5DE1;
+			remoteInfo = Installer;
+		};
+		DD1AFEA60A512D8700EE5B82 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDAEC9E007FA583B00A7BC36;
+			remoteInfo = SetVersion;
+		};
+		DD3E14D50A774397007E0084 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDAEC9E007FA583B00A7BC36;
+			remoteInfo = SetVersion;
+		};
+		DD3E14D70A774397007E0084 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDD74D8607CF482E0065AC9D;
+			remoteInfo = BOINC_Client;
+		};
+		DD3E14D90A774397007E0084 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD40CDF807F0386A0096C645;
+			remoteInfo = SystemMenu;
+		};
+		DD45C4A00A53E73500E923D1 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDFF2ACA0A53D4AE002BC19D;
+			remoteInfo = setprojectgrp;
+		};
+		DD58247C0B198BDD003B6A2F /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD3E14D30A774397007E0084;
+			remoteInfo = mgr_boinc;
+		};
+		DD6178CD1488F09E0042482E /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD1AFEA40A512D8700EE5B82;
+			remoteInfo = Install_BOINC;
+		};
+		DD664F18084321A2009BFB11 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD69FEE708416C1300C01361;
+			remoteInfo = cmd_boinc;
+		};
+		DD69FEFE08416D1000C01361 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD407A4907D2FB1200163EF5;
+			remoteInfo = libboinc;
+		};
+		DD6D35F30871509300BBCDEE /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD6381E90870DC9D007A2F8E;
+			remoteInfo = MakeAppIcon_h;
+		};
+		DD791FF00819063C00BE2906 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD96AFF80811075000A06F22;
+			remoteInfo = ScreenSaver;
+		};
+		DD81C823144D904D000BE61A /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD81C799144D8DA9000BE61A;
+			remoteInfo = jpeg;
+		};
+		DDA12AD00A369DEC00FBDD12 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD7748970A356C880025D05E;
+			remoteInfo = SetUpSecurity;
+		};
+		DDAD19CC09090824004E7DD0 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDAEC9E007FA583B00A7BC36;
+			remoteInfo = SetVersion;
+		};
+		DDAD19CE09090833004E7DD0 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDAEC9E007FA583B00A7BC36;
+			remoteInfo = SetVersion;
+		};
+		DDAD19DE09090914004E7DD0 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDAEC9E007FA583B00A7BC36;
+			remoteInfo = SetVersion;
+		};
+		DDB219B310B3BBD000417AEF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDB219A310B3BB6100417AEF;
+			remoteInfo = WaitPermissions;
+		};
+		DDB874660C850DB600E0DE1F /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDB873E90C850BC800E0DE1F;
+			remoteInfo = gfx2libboinc;
+		};
+		DDBD528F0C16C3790074905B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD4688400C165F3C0089F500;
+			remoteInfo = Uninstaller;
+		};
+		DDBD681007FA830E0082C20D /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD407A4907D2FB1200163EF5;
+			remoteInfo = libboinc;
+		};
+		DDBD681407FA830E0082C20D /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD35353007E1E05C00C4718D;
+			remoteInfo = api_libboinc;
+		};
+		DDD095500A3EE09900C95BA4 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDD0953E0A3EDD2500C95BA4;
+			remoteInfo = switcher;
+		};
+		DDD3370B106224FF00867C7D /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDD336F51062235D00867C7D;
+			remoteInfo = AddRemoveUser;
+		};
+		DDD4D96415A6FE0000612460 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD81C799144D8DA9000BE61A;
+			remoteInfo = jpeg;
+		};
+		DDF9EC0C144EB338005D6144 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD81C799144D8DA9000BE61A;
+			remoteInfo = jpeg;
+		};
+		DDF9EC0E144EB34E005D6144 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDF9EC02144EB14B005D6144;
+			remoteInfo = boinc_opencl;
+		};
+		DDF9EC10144EB36E005D6144 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDD74D8607CF482E0065AC9D;
+			remoteInfo = BOINC_Client;
+		};
+		DDF9EC12144EB36E005D6144 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DD40CDF807F0386A0096C645;
+			remoteInfo = SystemMenu;
+		};
+		DDF9EC14144EB36E005D6144 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDAEC9E007FA583B00A7BC36;
+			remoteInfo = SetVersion;
+		};
+		DDF9EC16144EB36E005D6144 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDFA60C90CB337D40037B88C;
+			remoteInfo = gfx_switcher;
+		};
+		DDFA60DC0CB338940037B88C /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 20286C28FDCF999611CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = DDFA60C90CB337D40037B88C;
+			remoteInfo = gfx_switcher;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		DD3E15350A774397007E0084 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+				DD3E15360A774397007E0084 /* SystemMenu.bundle in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		20286C33FDCF999611CA2CEA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+		AA8B6B1B046C364400A80164 /* app_ipc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = app_ipc.cpp; sourceTree = "<group>"; };
+		AA8B6B1C046C364400A80164 /* app_ipc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = app_ipc.h; path = ../lib/app_ipc.h; sourceTree = SOURCE_ROOT; };
+		AAA31C97042157A800A80164 /* shmem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = shmem.cpp; sourceTree = "<group>"; };
+		AAA31C98042157A800A80164 /* shmem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = shmem.h; path = ../lib/shmem.h; sourceTree = SOURCE_ROOT; };
+		DD0052F710CA6F1D0067570C /* cs_proxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cs_proxy.cpp; path = ../client/cs_proxy.cpp; sourceTree = SOURCE_ROOT; };
+		DD0052F810CA6F1D0067570C /* cs_proxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cs_proxy.h; path = ../client/cs_proxy.h; sourceTree = SOURCE_ROOT; };
+		DD04BE1A0EDD836A006D5603 /* TermsOfUsePage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TermsOfUsePage.h; path = ../clientgui/TermsOfUsePage.h; sourceTree = SOURCE_ROOT; };
+		DD0A87FD11D950E00067C1F2 /* BOINCInternetFSHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCInternetFSHandler.cpp; path = ../clientgui/BOINCInternetFSHandler.cpp; sourceTree = SOURCE_ROOT; };
+		DD0A87FE11D950E00067C1F2 /* BOINCInternetFSHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BOINCInternetFSHandler.h; path = ../clientgui/BOINCInternetFSHandler.h; sourceTree = SOURCE_ROOT; };
+		DD0C5A8A0816711400CEC5D7 /* boinc.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = boinc.jpg; path = ../clientscr/res/boinc.jpg; sourceTree = SOURCE_ROOT; };
+		DD1277B3081F3D67007B5DE1 /* PostInstall.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PostInstall.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD1277B5081F3D67007B5DE1 /* PostInstall-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PostInstall-Info.plist"; sourceTree = "<group>"; };
+		DD1277C0081F3E73007B5DE1 /* PostInstall.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PostInstall.cpp; path = ../mac_installer/PostInstall.cpp; sourceTree = SOURCE_ROOT; };
+		DD127880081F464E007B5DE1 /* postupgrade */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.csh; name = postupgrade; path = ../mac_installer/postupgrade; sourceTree = SOURCE_ROOT; };
+		DD16BF7B099D6C90003E4B69 /* cpu_sched.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cpu_sched.cpp; sourceTree = "<group>"; };
+		DD16BF8F099D6CE5003E4B69 /* cpu_benchmark.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cpu_benchmark.h; path = ../client/cpu_benchmark.h; sourceTree = SOURCE_ROOT; };
+		DD1929D80918A2F100C31BCF /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
+		DD1AFE8F0A512D2600EE5B82 /* Installer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Installer-Info.plist"; sourceTree = "<group>"; };
+		DD1AFEBA0A512D8700EE5B82 /* BOINC Installer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BOINC Installer.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD1AFEE70A51301C00EE5B82 /* Installer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Installer.cpp; path = ../mac_installer/Installer.cpp; sourceTree = SOURCE_ROOT; };
+		DD1C822F0AF372D900F709AC /* sg_CustomControls.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sg_CustomControls.cpp; path = ../clientgui/sg_CustomControls.cpp; sourceTree = SOURCE_ROOT; };
+		DD1C82300AF372D900F709AC /* sg_CustomControls.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sg_CustomControls.h; path = ../clientgui/sg_CustomControls.h; sourceTree = SOURCE_ROOT; };
+		DD1CB22E154F5BF700BFF282 /* project.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = project.cpp; sourceTree = "<group>"; };
+		DD1CB22F154F5BF700BFF282 /* project.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = project.h; sourceTree = "<group>"; };
+		DD1CB230154F5BF700BFF282 /* result.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = result.cpp; sourceTree = "<group>"; };
+		DD1CB231154F5BF700BFF282 /* result.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = result.h; sourceTree = "<group>"; };
+		DD1E4B7914DCA83F0093C711 /* async_file.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = async_file.cpp; sourceTree = "<group>"; };
+		DD1E4B7A14DCA83F0093C711 /* async_file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = async_file.h; sourceTree = "<group>"; };
+		DD1F0ACD0822069E00AFC5FA /* MacGUI.pch */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MacGUI.pch; path = ../clientgui/mac/MacGUI.pch; sourceTree = SOURCE_ROOT; };
+		DD2049DC0D862516009EEE7A /* coproc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = coproc.h; path = ../lib/coproc.h; sourceTree = SOURCE_ROOT; };
+		DD205A180BAF596E0008D473 /* ProjectListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ProjectListCtrl.cpp; path = ../clientgui/ProjectListCtrl.cpp; sourceTree = SOURCE_ROOT; };
+		DD205A190BAF596E0008D473 /* ProjectListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ProjectListCtrl.h; path = ../clientgui/ProjectListCtrl.h; sourceTree = SOURCE_ROOT; };
+		DD2370DF13F49DF3003149F9 /* LoginItemAPI.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = LoginItemAPI.c; path = ../mac_installer/LoginItemAPI.c; sourceTree = "<group>"; };
+		DD2370E013F49DF3003149F9 /* LoginItemAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoginItemAPI.h; path = ../mac_installer/LoginItemAPI.h; sourceTree = "<group>"; };
+		DD247AF70AEA308A0034104A /* SkinManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SkinManager.cpp; path = ../clientgui/SkinManager.cpp; sourceTree = SOURCE_ROOT; };
+		DD247AF80AEA308A0034104A /* SkinManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SkinManager.h; path = ../clientgui/SkinManager.h; sourceTree = SOURCE_ROOT; };
+		DD252F3009E3E014006454D7 /* boinc_glut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = boinc_glut.h; path = ../api/boinc_glut.h; sourceTree = SOURCE_ROOT; };
+		DD25F72315914F8C007845B5 /* gpu_nvidia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gpu_nvidia.cpp; sourceTree = "<group>"; };
+		DD25F72415914F8C007845B5 /* gpu_amd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gpu_amd.cpp; sourceTree = "<group>"; };
+		DD25F72515914F8C007845B5 /* gpu_opencl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gpu_opencl.cpp; sourceTree = "<group>"; };
+		DD25F72615914F8C007845B5 /* gpu_detect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gpu_detect.cpp; sourceTree = "<group>"; };
+		DD25F72715914F8C007845B5 /* gpu_detect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gpu_detect.h; sourceTree = "<group>"; };
+		DD29728E10BB657A00DF3C2E /* MacAccessiblity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MacAccessiblity.h; path = ../clientgui/mac/MacAccessiblity.h; sourceTree = SOURCE_ROOT; };
+		DD2B6C7E13149177005D6F3E /* procinfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = procinfo.cpp; path = ../lib/procinfo.cpp; sourceTree = SOURCE_ROOT; };
+		DD2B6C7F13149177005D6F3E /* procinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = procinfo.h; path = ../lib/procinfo.h; sourceTree = SOURCE_ROOT; };
+		DD2D25CB07FAB41700151141 /* DlgSelectComputer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DlgSelectComputer.cpp; path = ../clientgui/DlgSelectComputer.cpp; sourceTree = SOURCE_ROOT; };
+		DD2D25CC07FAB41700151141 /* DlgSelectComputer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DlgSelectComputer.h; path = ../clientgui/DlgSelectComputer.h; sourceTree = SOURCE_ROOT; };
+		DD2F32EF07F2A83E00645DDC /* MacSysMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MacSysMenu.h; path = ../clientgui/mac/MacSysMenu.h; sourceTree = SOURCE_ROOT; };
+		DD2F32F707F2A88B00645DDC /* MacSysMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MacSysMenu.cpp; path = ../clientgui/mac/MacSysMenu.cpp; sourceTree = SOURCE_ROOT; };
+		DD30446A0864332D00D73756 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../clientgui/mac/config.h; sourceTree = SOURCE_ROOT; };
+		DD33C6F108B5BAF500768630 /* gui_http.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gui_http.cpp; sourceTree = "<group>"; };
+		DD33C6F208B5BAF500768630 /* gui_http.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = gui_http.h; path = ../client/gui_http.h; sourceTree = SOURCE_ROOT; };
+		DD33C6F608B5BB4500768630 /* acct_setup.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = acct_setup.h; path = ../client/acct_setup.h; sourceTree = SOURCE_ROOT; };
+		DD33C6F708B5BB4500768630 /* acct_setup.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = acct_setup.cpp; sourceTree = "<group>"; };
+		DD33C70208B5BEDE00768630 /* http_curl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = http_curl.cpp; sourceTree = "<group>"; };
+		DD33C70308B5BEDE00768630 /* http_curl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = http_curl.h; path = ../client/http_curl.h; sourceTree = SOURCE_ROOT; };
+		DD344B3D07C5ABF40043025C /* acct_mgr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = acct_mgr.cpp; sourceTree = "<group>"; };
+		DD344B3E07C5ABF40043025C /* acct_mgr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = acct_mgr.h; path = ../client/acct_mgr.h; sourceTree = SOURCE_ROOT; };
+		DD344B4807C5AC4C0043025C /* app_control.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = app_control.cpp; sourceTree = "<group>"; };
+		DD344B5A07C5AC9F0043025C /* app_start.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = app_start.cpp; sourceTree = "<group>"; };
+		DD344B6307C5ACEB0043025C /* base64.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = base64.cpp; sourceTree = "<group>"; };
+		DD344B6407C5ACEB0043025C /* base64.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = base64.h; path = ../lib/base64.h; sourceTree = SOURCE_ROOT; };
+		DD344B6C07C5AD270043025C /* client_msgs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = client_msgs.cpp; sourceTree = "<group>"; };
+		DD344B6D07C5AD270043025C /* client_msgs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = client_msgs.h; path = ../client/client_msgs.h; sourceTree = SOURCE_ROOT; };
+		DD344B7907C5AD970043025C /* cs_account.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cs_account.cpp; sourceTree = "<group>"; };
+		DD344B7F07C5ADC30043025C /* cs_benchmark.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cs_benchmark.cpp; sourceTree = "<group>"; };
+		DD344B8507C5ADE70043025C /* cs_cmdline.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cs_cmdline.cpp; sourceTree = "<group>"; };
+		DD344B8D07C5ADFA0043025C /* cs_prefs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cs_prefs.cpp; sourceTree = "<group>"; };
+		DD344B9307C5AE2E0043025C /* cs_statefile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cs_statefile.cpp; sourceTree = "<group>"; };
+		DD344B9407C5AE2E0043025C /* cs_trickle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cs_trickle.cpp; sourceTree = "<group>"; };
+		DD344B9507C5AE2E0043025C /* dhrystone.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dhrystone.cpp; sourceTree = "<group>"; };
+		DD344B9607C5AE2E0043025C /* dhrystone.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = dhrystone.h; path = ../client/dhrystone.h; sourceTree = SOURCE_ROOT; };
+		DD344B9707C5AE2E0043025C /* dhrystone2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dhrystone2.cpp; sourceTree = "<group>"; };
+		DD344BA207C5AE5A0043025C /* diagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = diagnostics.cpp; sourceTree = "<group>"; };
+		DD344BA307C5AE5A0043025C /* diagnostics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = diagnostics.h; path = ../lib/diagnostics.h; sourceTree = SOURCE_ROOT; };
+		DD344BAD07C5AEB70043025C /* gui_rpc_server.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gui_rpc_server.cpp; sourceTree = "<group>"; };
+		DD344BAE07C5AEB70043025C /* gui_rpc_server.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = gui_rpc_server.h; path = ../client/gui_rpc_server.h; sourceTree = SOURCE_ROOT; };
+		DD344BB607C5AEEE0043025C /* hostinfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = hostinfo.cpp; sourceTree = "<group>"; };
+		DD344BB707C5AEEE0043025C /* hostinfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hostinfo.h; path = ../lib/hostinfo.h; sourceTree = SOURCE_ROOT; };
+		DD344BC007C5AF280043025C /* hostinfo_network.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = hostinfo_network.cpp; sourceTree = "<group>"; };
+		DD344BC107C5AF280043025C /* hostinfo_network.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hostinfo_network.h; path = ../client/hostinfo_network.h; sourceTree = SOURCE_ROOT; };
+		DD344BCE07C5B0B80043025C /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
+		DD344BCF07C5B0B80043025C /* main.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = main.h; path = ../client/main.h; sourceTree = SOURCE_ROOT; };
+		DD344BD207C5B1150043025C /* mfile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = mfile.cpp; sourceTree = "<group>"; };
+		DD344BD307C5B1150043025C /* mfile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = mfile.h; path = ../lib/mfile.h; sourceTree = SOURCE_ROOT; };
+		DD344BD407C5B1150043025C /* miofile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = miofile.h; path = ../lib/miofile.h; sourceTree = SOURCE_ROOT; };
+		DD344BD507C5B1150043025C /* miofile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = miofile.cpp; sourceTree = "<group>"; };
+		DD344BDA07C5B11E0043025C /* msg_log.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = msg_log.cpp; sourceTree = "<group>"; };
+		DD344BDB07C5B11E0043025C /* msg_log.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = msg_log.h; path = ../lib/msg_log.h; sourceTree = SOURCE_ROOT; };
+		DD344BE407C5B1670043025C /* prefs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = prefs.cpp; sourceTree = "<group>"; };
+		DD344BE507C5B1670043025C /* prefs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = prefs.h; path = ../lib/prefs.h; sourceTree = SOURCE_ROOT; };
+		DD344BEE07C5B1770043025C /* proxy_info.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = proxy_info.h; path = ../lib/proxy_info.h; sourceTree = SOURCE_ROOT; };
+		DD344BEF07C5B1770043025C /* proxy_info.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = proxy_info.cpp; sourceTree = "<group>"; };
+		DD35353107E1E05C00C4718D /* libboinc_api.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libboinc_api.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD3E15420A774397007E0084 /* BOINCManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BOINCManager.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD407A4A07D2FB1200163EF5 /* libboinc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libboinc.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD407AB707D2FC7D00163EF5 /* mem_usage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = mem_usage.cpp; sourceTree = "<group>"; };
+		DD407AB807D2FC7D00163EF5 /* mem_usage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = mem_usage.h; path = ../lib/mem_usage.h; sourceTree = SOURCE_ROOT; };
+		DD407ADC07D2FDF700163EF5 /* std_fixes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = std_fixes.h; path = ../lib/std_fixes.h; sourceTree = SOURCE_ROOT; };
+		DD407AEA07D2FE6500163EF5 /* synch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = synch.h; path = ../lib/synch.h; sourceTree = SOURCE_ROOT; };
+		DD407AED07D2FE7200163EF5 /* synch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = synch.cpp; path = ../lib/synch.cpp; sourceTree = SOURCE_ROOT; };
+		DD40825507D3076400163EF5 /* gutil.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gutil.cpp; sourceTree = "<group>"; };
+		DD40825607D3076400163EF5 /* gutil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = gutil.h; path = ../api/gutil.h; sourceTree = SOURCE_ROOT; };
+		DD40825707D3076400163EF5 /* reduce_lib.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = reduce_lib.cpp; sourceTree = "<group>"; };
+		DD40825807D3076400163EF5 /* reduce_main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = reduce_main.cpp; sourceTree = "<group>"; };
+		DD40825907D3076400163EF5 /* reduce.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = reduce.h; path = ../api/reduce.h; sourceTree = SOURCE_ROOT; };
+		DD40827D07D30AA800163EF5 /* jpeglib.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = jpeglib.h; path = ../samples/jpeglib/jpeglib.h; sourceTree = SOURCE_ROOT; };
+		DD40CDF907F0386A0096C645 /* SystemMenu.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SystemMenu.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD40CDFA07F0386B0096C645 /* SystemMenu-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SystemMenu-Info.plist"; sourceTree = SOURCE_ROOT; };
+		DD40CDFE07F038990096C645 /* SystemMenu.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = SystemMenu.m; path = ../clientgui/mac/SystemMenu.m; sourceTree = SOURCE_ROOT; };
+		DD40E75D0ADB87BC00214518 /* wxPieCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wxPieCtrl.cpp; path = ../clientgui/common/wxPieCtrl.cpp; sourceTree = SOURCE_ROOT; };
+		DD40E75E0ADB87BC00214518 /* wxPieCtrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wxPieCtrl.h; path = ../clientgui/common/wxPieCtrl.h; sourceTree = SOURCE_ROOT; };
+		DD4688410C165F3C0089F500 /* Uninstall BOINC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Uninstall BOINC.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD4688430C165F3C0089F500 /* Uninstaller-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Uninstaller-Info.plist"; sourceTree = "<group>"; };
+		DD4688590C1661970089F500 /* uninstall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = uninstall.cpp; path = ../mac_installer/uninstall.cpp; sourceTree = SOURCE_ROOT; };
+		DD48091E081A66F100A174AA /* BOINCSaver.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = BOINCSaver.nib; path = ../clientscr/res/BOINCSaver.nib; sourceTree = SOURCE_ROOT; };
+		DD4AE04B13652BD700285859 /* cc_config.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cc_config.cpp; path = ../lib/cc_config.cpp; sourceTree = SOURCE_ROOT; };
+		DD4AE04C13652BD700285859 /* cc_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cc_config.h; path = ../lib/cc_config.h; sourceTree = SOURCE_ROOT; };
+		DD4C560C0AD389A2009E23C6 /* sg_DlgMessages.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sg_DlgMessages.cpp; path = ../clientgui/sg_DlgMessages.cpp; sourceTree = SOURCE_ROOT; };
+		DD4C560D0AD389A2009E23C6 /* sg_DlgMessages.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sg_DlgMessages.h; path = ../clientgui/sg_DlgMessages.h; sourceTree = SOURCE_ROOT; };
+		DD4E70490BCDAC360010A522 /* browser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = browser.cpp; sourceTree = "<group>"; };
+		DD4E704A0BCDAC360010A522 /* browser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = browser.h; path = ../clientgui/browser.h; sourceTree = SOURCE_ROOT; };
+		DD4FA25B121828E400154856 /* BOINCHtmlLBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCHtmlLBox.cpp; path = ../clientgui/BOINCHtmlLBox.cpp; sourceTree = SOURCE_ROOT; };
+		DD4FA25C121828E400154856 /* BOINCHtmlLBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BOINCHtmlLBox.h; path = ../clientgui/BOINCHtmlLBox.h; sourceTree = SOURCE_ROOT; };
+		DD4FA2601218290600154856 /* BOINCVListBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCVListBox.cpp; path = ../clientgui/BOINCVListBox.cpp; sourceTree = SOURCE_ROOT; };
+		DD4FA2611218290600154856 /* BOINCVListBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BOINCVListBox.h; path = ../clientgui/BOINCVListBox.h; sourceTree = SOURCE_ROOT; };
+		DD531BC50C193D3800742E50 /* MacInstaller.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = MacInstaller.icns; path = ../clientgui/res/MacInstaller.icns; sourceTree = SOURCE_ROOT; };
+		DD531BC70C193D5200742E50 /* MacUninstaller.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = MacUninstaller.icns; path = ../clientgui/res/MacUninstaller.icns; sourceTree = SOURCE_ROOT; };
+		DD58C41808F3343F00C1DF66 /* AccountInfoPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AccountInfoPage.cpp; path = ../clientgui/AccountInfoPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C41908F3343F00C1DF66 /* AccountInfoPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AccountInfoPage.h; path = ../clientgui/AccountInfoPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C41C08F3343F00C1DF66 /* AccountManagerInfoPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AccountManagerInfoPage.cpp; path = ../clientgui/AccountManagerInfoPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C41D08F3343F00C1DF66 /* AccountManagerInfoPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AccountManagerInfoPage.h; path = ../clientgui/AccountManagerInfoPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C41E08F3343F00C1DF66 /* AccountManagerProcessingPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AccountManagerProcessingPage.cpp; path = ../clientgui/AccountManagerProcessingPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C41F08F3343F00C1DF66 /* AccountManagerProcessingPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AccountManagerProcessingPage.h; path = ../clientgui/AccountManagerProcessingPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C42008F3343F00C1DF66 /* AccountManagerPropertiesPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AccountManagerPropertiesPage.cpp; path = ../clientgui/AccountManagerPropertiesPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C42108F3343F00C1DF66 /* AccountManagerPropertiesPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AccountManagerPropertiesPage.h; path = ../clientgui/AccountManagerPropertiesPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C42408F3343F00C1DF66 /* AlreadyExistsPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AlreadyExistsPage.cpp; path = ../clientgui/AlreadyExistsPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C42508F3343F00C1DF66 /* AlreadyExistsPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AlreadyExistsPage.h; path = ../clientgui/AlreadyExistsPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C43408F3347D00C1DF66 /* BOINCBaseWizard.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCBaseWizard.cpp; path = ../clientgui/BOINCBaseWizard.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C43508F3347D00C1DF66 /* BOINCBaseWizard.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BOINCBaseWizard.h; path = ../clientgui/BOINCBaseWizard.h; sourceTree = SOURCE_ROOT; };
+		DD58C43708F3347D00C1DF66 /* CompletionErrorPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CompletionErrorPage.cpp; path = ../clientgui/CompletionErrorPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C43808F3347D00C1DF66 /* CompletionErrorPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CompletionErrorPage.h; path = ../clientgui/CompletionErrorPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C43908F3347D00C1DF66 /* CompletionPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CompletionPage.cpp; path = ../clientgui/CompletionPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C43A08F3347D00C1DF66 /* CompletionPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CompletionPage.h; path = ../clientgui/CompletionPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C44608F334B500C1DF66 /* NoInternetConnectionPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = NoInternetConnectionPage.cpp; path = ../clientgui/NoInternetConnectionPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C44708F334B500C1DF66 /* NoInternetConnectionPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = NoInternetConnectionPage.h; path = ../clientgui/NoInternetConnectionPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C44808F334B500C1DF66 /* NotDetectedPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = NotDetectedPage.cpp; path = ../clientgui/NotDetectedPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C44908F334B500C1DF66 /* NotDetectedPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = NotDetectedPage.h; path = ../clientgui/NotDetectedPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C44A08F334B500C1DF66 /* NotFoundPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = NotFoundPage.cpp; path = ../clientgui/NotFoundPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C44B08F334B500C1DF66 /* NotFoundPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = NotFoundPage.h; path = ../clientgui/NotFoundPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C44C08F334B500C1DF66 /* ProjectInfoPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ProjectInfoPage.cpp; path = ../clientgui/ProjectInfoPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C44D08F334B500C1DF66 /* ProjectInfoPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ProjectInfoPage.h; path = ../clientgui/ProjectInfoPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C44E08F334B500C1DF66 /* ProjectProcessingPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ProjectProcessingPage.cpp; path = ../clientgui/ProjectProcessingPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C44F08F334B500C1DF66 /* ProjectProcessingPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ProjectProcessingPage.h; path = ../clientgui/ProjectProcessingPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C45008F334B500C1DF66 /* ProjectPropertiesPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ProjectPropertiesPage.cpp; path = ../clientgui/ProjectPropertiesPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C45108F334B500C1DF66 /* ProjectPropertiesPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ProjectPropertiesPage.h; path = ../clientgui/ProjectPropertiesPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C45E08F334EA00C1DF66 /* ProxyPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ProxyPage.cpp; path = ../clientgui/ProxyPage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C45F08F334EA00C1DF66 /* ProxyPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ProxyPage.h; path = ../clientgui/ProxyPage.h; sourceTree = SOURCE_ROOT; };
+		DD58C46008F334EA00C1DF66 /* resource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = resource.h; path = ../clientgui/resource.h; sourceTree = SOURCE_ROOT; };
+		DD58C46108F334EA00C1DF66 /* UnavailablePage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = UnavailablePage.cpp; path = ../clientgui/UnavailablePage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C46208F334EA00C1DF66 /* UnavailablePage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = UnavailablePage.h; path = ../clientgui/UnavailablePage.h; sourceTree = SOURCE_ROOT; };
+		DD58C46308F334EA00C1DF66 /* WelcomePage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = WelcomePage.cpp; path = ../clientgui/WelcomePage.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C46408F334EA00C1DF66 /* WelcomePage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = WelcomePage.h; path = ../clientgui/WelcomePage.h; sourceTree = SOURCE_ROOT; };
+		DD58C46908F334EA00C1DF66 /* wizardex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wizardex.cpp; path = ../clientgui/wizardex.cpp; sourceTree = SOURCE_ROOT; };
+		DD58C46A08F334EA00C1DF66 /* wizardex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wizardex.h; path = ../clientgui/wizardex.h; sourceTree = SOURCE_ROOT; };
+		DD5A3F15142877A5008148CA /* thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = thread.cpp; sourceTree = "<group>"; };
+		DD5A3F16142877A5008148CA /* thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = thread.h; sourceTree = "<group>"; };
+		DD5D7EBA0FE320F600ACF87B /* Uninstaller.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; name = Uninstaller.r; path = ../mac_installer/Uninstaller.r; sourceTree = SOURCE_ROOT; };
+		DD5EF07007C5B329007CCE8D /* whetstone.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = whetstone.cpp; sourceTree = "<group>"; };
+		DD5EF08807C5B7C7007CCE8D /* version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = version.h; path = ../version.h; sourceTree = SOURCE_ROOT; };
+		DD6381450870DB78007A2F8E /* mac_icon.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = mac_icon.cpp; sourceTree = "<group>"; };
+		DD6381EA0870DC9D007A2F8E /* MakeAppIcon_h */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = MakeAppIcon_h; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD6381F80870DD83007A2F8E /* make_app_icon_h.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = make_app_icon_h.cpp; sourceTree = "<group>"; };
+		DD64DF0409DCC5E000668B3A /* gutil_text.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gutil_text.cpp; sourceTree = "<group>"; };
+		DD64E7D507D89DB800B176C8 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; };
+		DD6617870A3FFD8C00FFEBEB /* check_security.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = check_security.cpp; sourceTree = "<group>"; };
+		DD68022E0E701ACD0067D009 /* cert_sig.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cert_sig.cpp; sourceTree = "<group>"; };
+		DD68022F0E701ACD0067D009 /* cert_sig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cert_sig.h; path = ../lib/cert_sig.h; sourceTree = SOURCE_ROOT; };
+		DD69FEE808416C1300C01361 /* boinccmd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = boinccmd; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD69FEF608416C9A00C01361 /* boinc_cmd.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = boinc_cmd.cpp; sourceTree = "<group>"; };
+		DD6ABCD00BD4C5CA009AA7A1 /* browser_safari.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = browser_safari.mm; path = ../clientgui/mac/browser_safari.mm; sourceTree = SOURCE_ROOT; };
+		DD6D0A8507E9A61B007F882B /* network.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = network.cpp; sourceTree = "<group>"; };
+		DD6D0A8607E9A61B007F882B /* network.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = network.h; path = ../lib/network.h; sourceTree = SOURCE_ROOT; };
+		DD6D82DA08131AB1008F7200 /* macglutfix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = macglutfix.m; sourceTree = "<group>"; };
+		DD7168360AAD72040051642B /* common_defs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = common_defs.h; path = ../lib/common_defs.h; sourceTree = SOURCE_ROOT; };
+		DD73E34E08A0694000656EB1 /* gui_rpc_client_ops.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gui_rpc_client_ops.cpp; sourceTree = "<group>"; };
+		DD73E34F08A0694100656EB1 /* gui_rpc_client_print.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gui_rpc_client_print.cpp; sourceTree = "<group>"; };
+		DD73E36208A06ED400656EB1 /* gui_rpc_server_ops.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gui_rpc_server_ops.cpp; sourceTree = "<group>"; };
+		DD7475500D86273300860636 /* coproc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coproc.cpp; sourceTree = "<group>"; };
+		DD7748980A356C880025D05E /* SetUpSecurity */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SetUpSecurity; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD7748B40A356D6C0025D05E /* SetupSecurity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SetupSecurity.cpp; path = ../clientgui/mac/SetupSecurity.cpp; sourceTree = SOURCE_ROOT; };
+		DD77A71612F2D1C9006B82E9 /* MacBitmapComboBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MacBitmapComboBox.cpp; path = ../clientgui/mac/MacBitmapComboBox.cpp; sourceTree = "<group>"; };
+		DD77A71712F2D1C9006B82E9 /* MacBitmapComboBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MacBitmapComboBox.h; path = ../clientgui/mac/MacBitmapComboBox.h; sourceTree = "<group>"; };
+		DD7A5D8112EEBDF30006268E /* sg_TaskCommandPopup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sg_TaskCommandPopup.h; path = ../clientgui/sg_TaskCommandPopup.h; sourceTree = SOURCE_ROOT; };
+		DD7A5D8212EEBE5E0006268E /* sg_TaskCommandPopup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sg_TaskCommandPopup.cpp; path = ../clientgui/sg_TaskCommandPopup.cpp; sourceTree = SOURCE_ROOT; };
+		DD7A5D9D12EEBFC20006268E /* sg_ProjectWebSitesPopup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sg_ProjectWebSitesPopup.h; path = ../clientgui/sg_ProjectWebSitesPopup.h; sourceTree = SOURCE_ROOT; };
+		DD7A5D9E12EEBFC20006268E /* sg_ProjectWebSitesPopup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sg_ProjectWebSitesPopup.cpp; path = ../clientgui/sg_ProjectWebSitesPopup.cpp; sourceTree = SOURCE_ROOT; };
+		DD7A5DA712EEC33F0006268E /* sg_ProjectCommandPopup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sg_ProjectCommandPopup.h; path = ../clientgui/sg_ProjectCommandPopup.h; sourceTree = SOURCE_ROOT; };
+		DD7A5DAA12EEC37B0006268E /* sg_ProjectCommandPopup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sg_ProjectCommandPopup.cpp; path = ../clientgui/sg_ProjectCommandPopup.cpp; sourceTree = SOURCE_ROOT; };
+		DD7AEB490C87CE1300AC3B5C /* screensaver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = screensaver.cpp; path = ../clientscr/screensaver.cpp; sourceTree = SOURCE_ROOT; };
+		DD7AEB680C87CE6500AC3B5C /* screensaver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = screensaver.h; path = ../clientscr/screensaver.h; sourceTree = SOURCE_ROOT; };
+		DD7BF7D70B8E7A9800A009F7 /* str_util.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = str_util.cpp; sourceTree = "<group>"; };
+		DD7BF7D80B8E7A9800A009F7 /* str_util.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = str_util.h; path = ../lib/str_util.h; sourceTree = SOURCE_ROOT; };
+		DD7BF7E70B8E7BBE00A009F7 /* work_fetch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = work_fetch.cpp; sourceTree = "<group>"; };
+		DD7C5E7508110AE3002FCE1E /* ScreenSaver.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ScreenSaver.framework; path = /System/Library/Frameworks/ScreenSaver.framework; sourceTree = "<absolute>"; };
+		DD80C83D0CBAEB4F00F1121D /* sandbox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = sandbox.cpp; sourceTree = "<group>"; };
+		DD80C83E0CBAEB4F00F1121D /* sandbox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sandbox.h; path = ../client/sandbox.h; sourceTree = SOURCE_ROOT; };
+		DD81C3D507C5CEB50098A04D /* cpp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cpp.h; path = ../client/cpp.h; sourceTree = SOURCE_ROOT; };
+		DD81C3FE07C5D1020098A04D /* BOINCBaseView.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCBaseView.cpp; path = ../clientgui/BOINCBaseView.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C3FF07C5D1020098A04D /* DlgOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DlgOptions.cpp; path = ../clientgui/DlgOptions.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C40207C5D1020098A04D /* DlgAbout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DlgAbout.cpp; path = ../clientgui/DlgAbout.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C40307C5D1020098A04D /* BOINCTaskBar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCTaskBar.cpp; path = ../clientgui/BOINCTaskBar.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C40407C5D1020098A04D /* BOINCListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCListCtrl.cpp; path = ../clientgui/BOINCListCtrl.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C40507C5D1020098A04D /* BOINCGUIApp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCGUIApp.cpp; path = ../clientgui/BOINCGUIApp.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C40607C5D1020098A04D /* BOINCTaskCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCTaskCtrl.cpp; path = ../clientgui/BOINCTaskCtrl.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C41407C5D13E0098A04D /* LogBOINC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = LogBOINC.cpp; path = ../clientgui/LogBOINC.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C41607C5D13E0098A04D /* MainDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MainDocument.cpp; path = ../clientgui/MainDocument.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C41707C5D13E0098A04D /* stdwx.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = stdwx.cpp; path = ../clientgui/stdwx.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C42307C5D1D70098A04D /* ViewResources.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ViewResources.cpp; path = ../clientgui/ViewResources.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C42607C5D1D70098A04D /* ValidateURL.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ValidateURL.cpp; path = ../clientgui/ValidateURL.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C42707C5D1D70098A04D /* ValidateAccountKey.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ValidateAccountKey.cpp; path = ../clientgui/ValidateAccountKey.cpp; sourceTree = SOURCE_ROOT; };
+		DD81C43407C5D2240098A04D /* BOINCBaseView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BOINCBaseView.h; path = ../clientgui/BOINCBaseView.h; sourceTree = SOURCE_ROOT; };
+		DD81C43707C5D2240098A04D /* DlgAbout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DlgAbout.h; path = ../clientgui/DlgAbout.h; sourceTree = SOURCE_ROOT; };
+		DD81C43807C5D2240098A04D /* BOINCTaskCtrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BOINCTaskCtrl.h; path = ../clientgui/BOINCTaskCtrl.h; sourceTree = SOURCE_ROOT; };
+		DD81C43907C5D2240098A04D /* DlgOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DlgOptions.h; path = ../clientgui/DlgOptions.h; sourceTree = SOURCE_ROOT; };
+		DD81C43A07C5D2240098A04D /* BOINCListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BOINCListCtrl.h; path = ../clientgui/BOINCListCtrl.h; sourceTree = SOURCE_ROOT; };
+		DD81C43B07C5D2240098A04D /* BOINCGUIApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BOINCGUIApp.h; path = ../clientgui/BOINCGUIApp.h; sourceTree = SOURCE_ROOT; };
+		DD81C43C07C5D2240098A04D /* _wx_intellisense.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = _wx_intellisense.h; path = ../clientgui/_wx_intellisense.h; sourceTree = SOURCE_ROOT; };
+		DD81C43D07C5D2240098A04D /* BOINCTaskBar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BOINCTaskBar.h; path = ../clientgui/BOINCTaskBar.h; sourceTree = SOURCE_ROOT; };
+		DD81C44D07C5D2470098A04D /* Events.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Events.h; path = ../clientgui/Events.h; sourceTree = SOURCE_ROOT; };
+		DD81C44F07C5D2470098A04D /* MainDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MainDocument.h; path = ../clientgui/MainDocument.h; sourceTree = SOURCE_ROOT; };
+		DD81C45007C5D2470098A04D /* LogBOINC.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LogBOINC.h; path = ../clientgui/LogBOINC.h; sourceTree = SOURCE_ROOT; };
+		DD81C45B07C5D2880098A04D /* stdwx.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stdwx.h; path = ../clientgui/stdwx.h; sourceTree = SOURCE_ROOT; };
+		DD81C46507C5D29F0098A04D /* ValidateURL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ValidateURL.h; path = ../clientgui/ValidateURL.h; sourceTree = SOURCE_ROOT; };
+		DD81C46607C5D29F0098A04D /* ValidateAccountKey.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ValidateAccountKey.h; path = ../clientgui/ValidateAccountKey.h; sourceTree = SOURCE_ROOT; };
+		DD81C47207C5D2BF0098A04D /* ViewResources.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ViewResources.h; path = ../clientgui/ViewResources.h; sourceTree = SOURCE_ROOT; };
+		DD81C5CC07C5D7D90098A04D /* gui_rpc_client.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gui_rpc_client.cpp; sourceTree = "<group>"; };
+		DD81C5F007C5D8290098A04D /* boinc_win.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = boinc_win.h; path = ../lib/boinc_win.h; sourceTree = SOURCE_ROOT; };
+		DD81C60307C5D8630098A04D /* gui_rpc_client.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = gui_rpc_client.h; path = ../lib/gui_rpc_client.h; sourceTree = SOURCE_ROOT; };
+		DD81C79A144D8DA9000BE61A /* libjpeg.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjpeg.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD81C79F144D900B000BE61A /* cderror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cderror.h; path = ../samples/jpeglib/cderror.h; sourceTree = "<group>"; };
+		DD81C7A0144D900B000BE61A /* cdjpeg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cdjpeg.h; path = ../samples/jpeglib/cdjpeg.h; sourceTree = "<group>"; };
+		DD81C7A1144D900B000BE61A /* jcapimin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcapimin.c; path = ../samples/jpeglib/jcapimin.c; sourceTree = "<group>"; };
+		DD81C7A2144D900B000BE61A /* jcapistd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcapistd.c; path = ../samples/jpeglib/jcapistd.c; sourceTree = "<group>"; };
+		DD81C7A3144D900B000BE61A /* jccoefct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jccoefct.c; path = ../samples/jpeglib/jccoefct.c; sourceTree = "<group>"; };
+		DD81C7A4144D900B000BE61A /* jccolor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jccolor.c; path = ../samples/jpeglib/jccolor.c; sourceTree = "<group>"; };
+		DD81C7A5144D900B000BE61A /* jcdctmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcdctmgr.c; path = ../samples/jpeglib/jcdctmgr.c; sourceTree = "<group>"; };
+		DD81C7A6144D900B000BE61A /* jchuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jchuff.c; path = ../samples/jpeglib/jchuff.c; sourceTree = "<group>"; };
+		DD81C7A7144D900B000BE61A /* jchuff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jchuff.h; path = ../samples/jpeglib/jchuff.h; sourceTree = "<group>"; };
+		DD81C7A8144D900B000BE61A /* jcinit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcinit.c; path = ../samples/jpeglib/jcinit.c; sourceTree = "<group>"; };
+		DD81C7A9144D900B000BE61A /* jcmainct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcmainct.c; path = ../samples/jpeglib/jcmainct.c; sourceTree = "<group>"; };
+		DD81C7AA144D900B000BE61A /* jcmarker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcmarker.c; path = ../samples/jpeglib/jcmarker.c; sourceTree = "<group>"; };
+		DD81C7AB144D900B000BE61A /* jcmaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcmaster.c; path = ../samples/jpeglib/jcmaster.c; sourceTree = "<group>"; };
+		DD81C7AC144D900B000BE61A /* jcomapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcomapi.c; path = ../samples/jpeglib/jcomapi.c; sourceTree = "<group>"; };
+		DD81C7AD144D900B000BE61A /* jconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jconfig.h; path = ../samples/jpeglib/jconfig.h; sourceTree = "<group>"; };
+		DD81C7AE144D900B000BE61A /* jcparam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcparam.c; path = ../samples/jpeglib/jcparam.c; sourceTree = "<group>"; };
+		DD81C7AF144D900B000BE61A /* jcphuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcphuff.c; path = ../samples/jpeglib/jcphuff.c; sourceTree = "<group>"; };
+		DD81C7B0144D900B000BE61A /* jcprepct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcprepct.c; path = ../samples/jpeglib/jcprepct.c; sourceTree = "<group>"; };
+		DD81C7B1144D900B000BE61A /* jcsample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcsample.c; path = ../samples/jpeglib/jcsample.c; sourceTree = "<group>"; };
+		DD81C7B2144D900B000BE61A /* jctrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jctrans.c; path = ../samples/jpeglib/jctrans.c; sourceTree = "<group>"; };
+		DD81C7B3144D900B000BE61A /* jdapimin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdapimin.c; path = ../samples/jpeglib/jdapimin.c; sourceTree = "<group>"; };
+		DD81C7B4144D900B000BE61A /* jdapistd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdapistd.c; path = ../samples/jpeglib/jdapistd.c; sourceTree = "<group>"; };
+		DD81C7B5144D900B000BE61A /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdatadst.c; path = ../samples/jpeglib/jdatadst.c; sourceTree = "<group>"; };
+		DD81C7B6144D900B000BE61A /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdatasrc.c; path = ../samples/jpeglib/jdatasrc.c; sourceTree = "<group>"; };
+		DD81C7B7144D900B000BE61A /* jdcoefct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdcoefct.c; path = ../samples/jpeglib/jdcoefct.c; sourceTree = "<group>"; };
+		DD81C7B8144D900B000BE61A /* jdcolor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdcolor.c; path = ../samples/jpeglib/jdcolor.c; sourceTree = "<group>"; };
+		DD81C7B9144D900B000BE61A /* jdct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jdct.h; path = ../samples/jpeglib/jdct.h; sourceTree = "<group>"; };
+		DD81C7BA144D900B000BE61A /* jddctmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jddctmgr.c; path = ../samples/jpeglib/jddctmgr.c; sourceTree = "<group>"; };
+		DD81C7BB144D900B000BE61A /* jdhuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdhuff.c; path = ../samples/jpeglib/jdhuff.c; sourceTree = "<group>"; };
+		DD81C7BC144D900B000BE61A /* jdhuff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jdhuff.h; path = ../samples/jpeglib/jdhuff.h; sourceTree = "<group>"; };
+		DD81C7BD144D900B000BE61A /* jdinput.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdinput.c; path = ../samples/jpeglib/jdinput.c; sourceTree = "<group>"; };
+		DD81C7BE144D900B000BE61A /* jdmainct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdmainct.c; path = ../samples/jpeglib/jdmainct.c; sourceTree = "<group>"; };
+		DD81C7BF144D900B000BE61A /* jdmarker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdmarker.c; path = ../samples/jpeglib/jdmarker.c; sourceTree = "<group>"; };
+		DD81C7C0144D900B000BE61A /* jdmaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdmaster.c; path = ../samples/jpeglib/jdmaster.c; sourceTree = "<group>"; };
+		DD81C7C1144D900B000BE61A /* jdmerge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdmerge.c; path = ../samples/jpeglib/jdmerge.c; sourceTree = "<group>"; };
+		DD81C7C2144D900B000BE61A /* jdphuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdphuff.c; path = ../samples/jpeglib/jdphuff.c; sourceTree = "<group>"; };
+		DD81C7C3144D900B000BE61A /* jdpostct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdpostct.c; path = ../samples/jpeglib/jdpostct.c; sourceTree = "<group>"; };
+		DD81C7C4144D900B000BE61A /* jdsample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdsample.c; path = ../samples/jpeglib/jdsample.c; sourceTree = "<group>"; };
+		DD81C7C5144D900B000BE61A /* jdtrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdtrans.c; path = ../samples/jpeglib/jdtrans.c; sourceTree = "<group>"; };
+		DD81C7C6144D900B000BE61A /* jerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jerror.c; path = ../samples/jpeglib/jerror.c; sourceTree = "<group>"; };
+		DD81C7C7144D900B000BE61A /* jerror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jerror.h; path = ../samples/jpeglib/jerror.h; sourceTree = "<group>"; };
+		DD81C7C8144D900B000BE61A /* jfdctflt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jfdctflt.c; path = ../samples/jpeglib/jfdctflt.c; sourceTree = "<group>"; };
+		DD81C7C9144D900B000BE61A /* jfdctfst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jfdctfst.c; path = ../samples/jpeglib/jfdctfst.c; sourceTree = "<group>"; };
+		DD81C7CA144D900B000BE61A /* jfdctint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jfdctint.c; path = ../samples/jpeglib/jfdctint.c; sourceTree = "<group>"; };
+		DD81C7CB144D900B000BE61A /* jidctflt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jidctflt.c; path = ../samples/jpeglib/jidctflt.c; sourceTree = "<group>"; };
+		DD81C7CC144D900B000BE61A /* jidctfst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jidctfst.c; path = ../samples/jpeglib/jidctfst.c; sourceTree = "<group>"; };
+		DD81C7CD144D900B000BE61A /* jidctint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jidctint.c; path = ../samples/jpeglib/jidctint.c; sourceTree = "<group>"; };
+		DD81C7CE144D900B000BE61A /* jidctred.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jidctred.c; path = ../samples/jpeglib/jidctred.c; sourceTree = "<group>"; };
+		DD81C7CF144D900B000BE61A /* jinclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jinclude.h; path = ../samples/jpeglib/jinclude.h; sourceTree = "<group>"; };
+		DD81C7D0144D900B000BE61A /* jmemmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jmemmgr.c; path = ../samples/jpeglib/jmemmgr.c; sourceTree = "<group>"; };
+		DD81C7D1144D900B000BE61A /* jmemnobs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jmemnobs.c; path = ../samples/jpeglib/jmemnobs.c; sourceTree = "<group>"; };
+		DD81C7D2144D900B000BE61A /* jmemsys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jmemsys.h; path = ../samples/jpeglib/jmemsys.h; sourceTree = "<group>"; };
+		DD81C7D3144D900B000BE61A /* jmorecfg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jmorecfg.h; path = ../samples/jpeglib/jmorecfg.h; sourceTree = "<group>"; };
+		DD81C7D4144D900B000BE61A /* jpegint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jpegint.h; path = ../samples/jpeglib/jpegint.h; sourceTree = "<group>"; };
+		DD81C7D5144D900B000BE61A /* jpeglib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jpeglib.h; path = ../samples/jpeglib/jpeglib.h; sourceTree = "<group>"; };
+		DD81C7D6144D900B000BE61A /* jquant1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jquant1.c; path = ../samples/jpeglib/jquant1.c; sourceTree = "<group>"; };
+		DD81C7D7144D900B000BE61A /* jquant2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jquant2.c; path = ../samples/jpeglib/jquant2.c; sourceTree = "<group>"; };
+		DD81C7D8144D900B000BE61A /* jutils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jutils.c; path = ../samples/jpeglib/jutils.c; sourceTree = "<group>"; };
+		DD81C7D9144D900B000BE61A /* jversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jversion.h; path = ../samples/jpeglib/jversion.h; sourceTree = "<group>"; };
+		DD81C7DA144D900B000BE61A /* rdbmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rdbmp.c; path = ../samples/jpeglib/rdbmp.c; sourceTree = "<group>"; };
+		DD81C7DB144D900B000BE61A /* rdcolmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rdcolmap.c; path = ../samples/jpeglib/rdcolmap.c; sourceTree = "<group>"; };
+		DD81C7DC144D900B000BE61A /* rdgif.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rdgif.c; path = ../samples/jpeglib/rdgif.c; sourceTree = "<group>"; };
+		DD81C7DD144D900B000BE61A /* rdppm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rdppm.c; path = ../samples/jpeglib/rdppm.c; sourceTree = "<group>"; };
+		DD81C7DE144D900B000BE61A /* rdrle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rdrle.c; path = ../samples/jpeglib/rdrle.c; sourceTree = "<group>"; };
+		DD81C7DF144D900B000BE61A /* rdswitch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rdswitch.c; path = ../samples/jpeglib/rdswitch.c; sourceTree = "<group>"; };
+		DD81C7E0144D900B000BE61A /* rdtarga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rdtarga.c; path = ../samples/jpeglib/rdtarga.c; sourceTree = "<group>"; };
+		DD8916280F3B17E900DE5B1C /* boincscr */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = boincscr; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD89163B0F3B182700DE5B1C /* boinc_ss_opengl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = boinc_ss_opengl.h; path = ../clientscr/boinc_ss_opengl.h; sourceTree = SOURCE_ROOT; };
+		DD89163C0F3B182700DE5B1C /* ss_app.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ss_app.cpp; path = ../clientscr/ss_app.cpp; sourceTree = SOURCE_ROOT; };
+		DD89165D0F3B1BC200DE5B1C /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = /System/Library/Frameworks/GLUT.framework; sourceTree = "<absolute>"; };
+		DD89165E0F3B1BC200DE5B1C /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
+		DD8DD4A509D9432F0043019E /* BOINCDialupManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCDialupManager.cpp; path = ../clientgui/BOINCDialupManager.cpp; sourceTree = SOURCE_ROOT; };
+		DD8DD4A609D9432F0043019E /* BOINCDialupManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BOINCDialupManager.h; path = ../clientgui/BOINCDialupManager.h; sourceTree = SOURCE_ROOT; };
+		DD96AFF90811075000A06F22 /* BOINCSaver.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BOINCSaver.saver; sourceTree = BUILT_PRODUCTS_DIR; };
+		DD96AFFA0811075100A06F22 /* ScreenSaver-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ScreenSaver-Info.plist"; sourceTree = SOURCE_ROOT; };
+		DD9AB0320EB7D5DE00AF1616 /* rr_sim.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rr_sim.cpp; sourceTree = "<group>"; };
+		DD9AB0330EB7D5DE00AF1616 /* rr_sim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rr_sim.h; sourceTree = "<group>"; };
+		DD9C94A00A5A3A4100AB0D10 /* AdvancedFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AdvancedFrame.cpp; path = ../clientgui/AdvancedFrame.cpp; sourceTree = SOURCE_ROOT; };
+		DD9C94A10A5A3A4100AB0D10 /* AdvancedFrame.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AdvancedFrame.h; path = ../clientgui/AdvancedFrame.h; sourceTree = SOURCE_ROOT; };
+		DD9C94A20A5A3A4100AB0D10 /* BOINCBaseFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCBaseFrame.cpp; path = ../clientgui/BOINCBaseFrame.cpp; sourceTree = SOURCE_ROOT; };
+		DD9C94A30A5A3A4100AB0D10 /* BOINCBaseFrame.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BOINCBaseFrame.h; path = ../clientgui/BOINCBaseFrame.h; sourceTree = SOURCE_ROOT; };
+		DDA12A910A369AB500FBDD12 /* SetupSecurity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SetupSecurity.h; path = ../clientgui/mac/SetupSecurity.h; sourceTree = SOURCE_ROOT; };
+		DDA12AAD0A369C5800FBDD12 /* SecurityUtility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SecurityUtility.cpp; path = ../clientgui/mac/SecurityUtility.cpp; sourceTree = SOURCE_ROOT; };
+		DDA1F1EC126D105B005EFFEB /* current_version.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = current_version.cpp; path = ../client/current_version.cpp; sourceTree = SOURCE_ROOT; };
+		DDA1F1ED126D105B005EFFEB /* current_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = current_version.h; path = ../client/current_version.h; sourceTree = SOURCE_ROOT; };
+		DDA26C5D13977E1500DFDFE1 /* sqlite3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sqlite3.c; path = ../clientgui/sqlite3.c; sourceTree = SOURCE_ROOT; };
+		DDA290360CB5D80E00512BD8 /* Mac_Saver_Module.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Mac_Saver_Module.h; path = ../clientscr/Mac_Saver_Module.h; sourceTree = SOURCE_ROOT; };
+		DDA45502140F85DD00D97676 /* str_replace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = str_replace.h; sourceTree = "<group>"; };
+		DDA546600D16964E008CC69A /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
+		DDA6BD030BD4551F008F7921 /* dyld_gdb.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = dyld_gdb.h; path = ../lib/mac/dyld_gdb.h; sourceTree = SOURCE_ROOT; };
+		DDA6BD040BD4551F008F7921 /* mac_backtrace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = mac_backtrace.cpp; path = ../lib/mac/mac_backtrace.cpp; sourceTree = SOURCE_ROOT; };
+		DDA6BD050BD4551F008F7921 /* mac_backtrace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = mac_backtrace.h; path = ../lib/mac/mac_backtrace.h; sourceTree = SOURCE_ROOT; };
+		DDA6BD060BD4551F008F7921 /* QBacktrace.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = QBacktrace.c; path = ../lib/mac/QBacktrace.c; sourceTree = SOURCE_ROOT; };
+		DDA6BD070BD4551F008F7921 /* QBacktrace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = QBacktrace.h; path = ../lib/mac/QBacktrace.h; sourceTree = SOURCE_ROOT; };
+		DDA6BD080BD4551F008F7921 /* QCrashReport.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = QCrashReport.c; path = ../lib/mac/QCrashReport.c; sourceTree = SOURCE_ROOT; };
+		DDA6BD090BD4551F008F7921 /* QCrashReport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = QCrashReport.h; path = ../lib/mac/QCrashReport.h; sourceTree = SOURCE_ROOT; };
+		DDA6BD0A0BD4551F008F7921 /* QMachOImage.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = QMachOImage.c; path = ../lib/mac/QMachOImage.c; sourceTree = SOURCE_ROOT; };
+		DDA6BD0B0BD4551F008F7921 /* QMachOImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = QMachOImage.h; path = ../lib/mac/QMachOImage.h; sourceTree = SOURCE_ROOT; };
+		DDA6BD0C0BD4551F008F7921 /* QMachOImageList.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = QMachOImageList.c; path = ../lib/mac/QMachOImageList.c; sourceTree = SOURCE_ROOT; };
+		DDA6BD0D0BD4551F008F7921 /* QMachOImageList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = QMachOImageList.h; path = ../lib/mac/QMachOImageList.h; sourceTree = SOURCE_ROOT; };
+		DDA6BD0E0BD4551F008F7921 /* QSymbols.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = QSymbols.c; path = ../lib/mac/QSymbols.c; sourceTree = SOURCE_ROOT; };
+		DDA6BD0F0BD4551F008F7921 /* QSymbols.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = QSymbols.h; path = ../lib/mac/QSymbols.h; sourceTree = SOURCE_ROOT; };
+		DDA6BD100BD4551F008F7921 /* QTaskMemory.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = QTaskMemory.c; path = ../lib/mac/QTaskMemory.c; sourceTree = SOURCE_ROOT; };
+		DDA6BD110BD4551F008F7921 /* QTaskMemory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = QTaskMemory.h; path = ../lib/mac/QTaskMemory.h; sourceTree = SOURCE_ROOT; };
+		DDA850A21207EED900B473A6 /* WizardAttach.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WizardAttach.cpp; path = ../clientgui/WizardAttach.cpp; sourceTree = SOURCE_ROOT; };
+		DDA850A31207EED900B473A6 /* WizardAttach.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WizardAttach.h; path = ../clientgui/WizardAttach.h; sourceTree = SOURCE_ROOT; };
+		DDA90F260B64673D008F2E87 /* libwx_mac_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwx_mac_static.a; path = "../../wxMac-2.8.10/src/build/Deployment/libwx_mac_static.a"; sourceTree = SOURCE_ROOT; };
+		DDA99BF31099AF18002F8E9B /* MacAccessiblity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MacAccessiblity.cpp; path = ../clientgui/mac/MacAccessiblity.cpp; sourceTree = SOURCE_ROOT; };
+		DDA9D3BB09189A8C0060E7A7 /* Mac_GUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Mac_GUI.cpp; path = ../clientgui/mac/Mac_GUI.cpp; sourceTree = SOURCE_ROOT; };
+		DDAD31D60EC26B14002DA09D /* mac_address.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mac_address.cpp; path = ../lib/mac_address.cpp; sourceTree = SOURCE_ROOT; };
+		DDAD31D70EC26B14002DA09D /* mac_address.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mac_address.h; path = ../lib/mac_address.h; sourceTree = SOURCE_ROOT; };
+		DDAEC9E107FA583B00A7BC36 /* SetVersion */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SetVersion; sourceTree = BUILT_PRODUCTS_DIR; };
+		DDAEC9E707FA58A000A7BC36 /* SetVersion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SetVersion.cpp; path = ../clientgui/mac/SetVersion.cpp; sourceTree = SOURCE_ROOT; };
+		DDAFA7AC12D4834D00997329 /* sg_BoincSimpleFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sg_BoincSimpleFrame.cpp; sourceTree = "<group>"; };
+		DDAFA7AD12D4834D00997329 /* sg_BoincSimpleFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sg_BoincSimpleFrame.h; sourceTree = "<group>"; };
+		DDB219A410B3BB6100417AEF /* WaitPermissions.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WaitPermissions.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		DDB219A610B3BB6200417AEF /* WaitPermissions-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "WaitPermissions-Info.plist"; sourceTree = "<group>"; };
+		DDB219B110B3BBA900417AEF /* WaitPermissions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WaitPermissions.cpp; path = ../mac_installer/WaitPermissions.cpp; sourceTree = SOURCE_ROOT; };
+		DDB4A91C1411840800032E5D /* proc_control.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = proc_control.cpp; sourceTree = "<group>"; };
+		DDB4A91D1411840800032E5D /* proc_control.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = proc_control.h; sourceTree = "<group>"; };
+		DDB506F80958446900181B75 /* ProxyInfoPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ProxyInfoPage.cpp; path = ../clientgui/ProxyInfoPage.cpp; sourceTree = SOURCE_ROOT; };
+		DDB506F90958446900181B75 /* ProxyInfoPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ProxyInfoPage.h; path = ../clientgui/ProxyInfoPage.h; sourceTree = SOURCE_ROOT; };
+		DDB6934F0ABFE9C600689FD8 /* procinfo_mac.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = procinfo_mac.cpp; sourceTree = "<group>"; };
+		DDB873960C85072500E0DE1F /* mac_saver_module.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = mac_saver_module.cpp; path = ../clientscr/mac_saver_module.cpp; sourceTree = SOURCE_ROOT; };
+		DDB873970C85072500E0DE1F /* Mac_Saver_ModuleView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Mac_Saver_ModuleView.h; path = ../clientscr/Mac_Saver_ModuleView.h; sourceTree = SOURCE_ROOT; };
+		DDB873980C85072500E0DE1F /* Mac_Saver_ModuleView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = Mac_Saver_ModuleView.m; path = ../clientscr/Mac_Saver_ModuleView.m; sourceTree = SOURCE_ROOT; };
+		DDB874030C850BC800E0DE1F /* libboinc_graphics2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libboinc_graphics2.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		DDB874450C850D3000E0DE1F /* graphics2_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = graphics2_unix.cpp; sourceTree = "<group>"; };
+		DDB874460C850D3000E0DE1F /* graphics2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = graphics2.cpp; sourceTree = "<group>"; };
+		DDB8D5A5081FC8C700A5A1E8 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.csh; name = postinstall; path = ../mac_installer/postinstall; sourceTree = SOURCE_ROOT; };
+		DDBB7E7511D2BCD400598DC1 /* NoticeListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NoticeListCtrl.cpp; path = ../clientgui/NoticeListCtrl.cpp; sourceTree = SOURCE_ROOT; };
+		DDBB7E7711D2BCF100598DC1 /* NoticeListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NoticeListCtrl.h; path = ../clientgui/NoticeListCtrl.h; sourceTree = SOURCE_ROOT; };
+		DDBC6CA40D5D458700564C49 /* boinc_ss_logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = boinc_ss_logo.png; path = ../clientscr/res/boinc_ss_logo.png; sourceTree = SOURCE_ROOT; };
+		DDBDF4A90987091800464F83 /* ValidateEmailAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ValidateEmailAddress.cpp; path = ../clientgui/ValidateEmailAddress.cpp; sourceTree = SOURCE_ROOT; };
+		DDBDF4AA0987091800464F83 /* ValidateEmailAddress.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ValidateEmailAddress.h; path = ../clientgui/ValidateEmailAddress.h; sourceTree = SOURCE_ROOT; };
+		DDBE74380C03B1C600453BB8 /* cs_platforms.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cs_platforms.cpp; sourceTree = "<group>"; };
+		DDC06AB210A3E93F00C8D9A5 /* url.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = url.cpp; path = ../lib/url.cpp; sourceTree = SOURCE_ROOT; };
+		DDC06AB310A3E93F00C8D9A5 /* url.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = url.h; path = ../lib/url.h; sourceTree = SOURCE_ROOT; };
+		DDC132F10E2DAB1B0014D305 /* AsyncRPC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncRPC.h; sourceTree = "<group>"; };
+		DDC132F20E2DAB1B0014D305 /* AsyncRPC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AsyncRPC.cpp; sourceTree = "<group>"; };
+		DDC321AC12E45162006CB55F /* sg_PanelBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sg_PanelBase.cpp; path = ../clientgui/sg_PanelBase.cpp; sourceTree = SOURCE_ROOT; };
+		DDC321AD12E45162006CB55F /* sg_PanelBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sg_PanelBase.h; path = ../clientgui/sg_PanelBase.h; sourceTree = SOURCE_ROOT; };
+		DDC3D55C0D507D1700BE6D23 /* BOINCClientManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BOINCClientManager.cpp; path = ../clientgui/BOINCClientManager.cpp; sourceTree = SOURCE_ROOT; };
+		DDC3D55D0D507D1700BE6D23 /* BOINCClientManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BOINCClientManager.h; path = ../clientgui/BOINCClientManager.h; sourceTree = SOURCE_ROOT; };
+		DDC63EEF0985B89600383FD2 /* DlgGenericMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DlgGenericMessage.cpp; path = ../clientgui/DlgGenericMessage.cpp; sourceTree = SOURCE_ROOT; };
+		DDC63EF00985B89600383FD2 /* DlgGenericMessage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DlgGenericMessage.h; path = ../clientgui/DlgGenericMessage.h; sourceTree = SOURCE_ROOT; };
+		DDC836E50EDEA5DB001C2EF9 /* TermsOfUsePage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TermsOfUsePage.cpp; path = ../clientgui/TermsOfUsePage.cpp; sourceTree = SOURCE_ROOT; };
+		DDCAD7D30A6C603A0086C7EE /* sg_DlgPreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sg_DlgPreferences.cpp; path = ../clientgui/sg_DlgPreferences.cpp; sourceTree = SOURCE_ROOT; };
+		DDCAD7D40A6C603A0086C7EE /* sg_DlgPreferences.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sg_DlgPreferences.h; path = ../clientgui/sg_DlgPreferences.h; sourceTree = SOURCE_ROOT; };
+		DDCF84060E1B7C0A005EDC45 /* DlgItemProperties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DlgItemProperties.cpp; sourceTree = "<group>"; };
+		DDCF84070E1B7C0A005EDC45 /* DlgItemProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DlgItemProperties.h; sourceTree = "<group>"; };
+		DDD0697112D70C9400120920 /* sg_TaskPanel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sg_TaskPanel.cpp; path = ../clientgui/sg_TaskPanel.cpp; sourceTree = SOURCE_ROOT; };
+		DDD0697212D70C9400120920 /* sg_TaskPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sg_TaskPanel.h; path = ../clientgui/sg_TaskPanel.h; sourceTree = SOURCE_ROOT; };
+		DDD0953F0A3EDD2500C95BA4 /* switcher */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = switcher; sourceTree = BUILT_PRODUCTS_DIR; };
+		DDD095480A3EDF2D00C95BA4 /* switcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = switcher.cpp; sourceTree = "<group>"; };
+		DDD337021062235D00867C7D /* AddRemoveUser */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = AddRemoveUser; sourceTree = BUILT_PRODUCTS_DIR; };
+		DDD33709106224E800867C7D /* AddRemoveUser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddRemoveUser.cpp; path = ../mac_installer/AddRemoveUser.cpp; sourceTree = SOURCE_ROOT; };
+		DDD52DC40C03CAE6009B5FC0 /* ViewProjects.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ViewProjects.cpp; path = ../clientgui/ViewProjects.cpp; sourceTree = SOURCE_ROOT; };
+		DDD52DC50C03CAE6009B5FC0 /* ViewProjects.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ViewProjects.h; path = ../clientgui/ViewProjects.h; sourceTree = SOURCE_ROOT; };
+		DDD52DC60C03CAE6009B5FC0 /* ViewTransfers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ViewTransfers.cpp; path = ../clientgui/ViewTransfers.cpp; sourceTree = SOURCE_ROOT; };
+		DDD52DC70C03CAE6009B5FC0 /* ViewTransfers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ViewTransfers.h; path = ../clientgui/ViewTransfers.h; sourceTree = SOURCE_ROOT; };
+		DDD52DC80C03CAE6009B5FC0 /* ViewWork.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ViewWork.cpp; path = ../clientgui/ViewWork.cpp; sourceTree = SOURCE_ROOT; };
+		DDD52DC90C03CAE6009B5FC0 /* ViewWork.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ViewWork.h; path = ../clientgui/ViewWork.h; sourceTree = SOURCE_ROOT; };
+		DDD74D8707CF482E0065AC9D /* boinc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = boinc; sourceTree = BUILT_PRODUCTS_DIR; };
+		DDDD6D7E12E4611300C258A0 /* sg_ProjectPanel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sg_ProjectPanel.cpp; path = ../clientgui/sg_ProjectPanel.cpp; sourceTree = SOURCE_ROOT; };
+		DDDD6D7F12E4611300C258A0 /* sg_ProjectPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sg_ProjectPanel.h; path = ../clientgui/sg_ProjectPanel.h; sourceTree = SOURCE_ROOT; };
+		DDDE43B00EC04C1800083520 /* DlgExitMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DlgExitMessage.cpp; path = ../clientgui/DlgExitMessage.cpp; sourceTree = SOURCE_ROOT; };
+		DDDE43B80EC04C3C00083520 /* DlgExitMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DlgExitMessage.h; path = ../clientgui/DlgExitMessage.h; sourceTree = SOURCE_ROOT; };
+		DDE1372810DC5E5300161D6B /* cs_notice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cs_notice.cpp; path = ../client/cs_notice.cpp; sourceTree = SOURCE_ROOT; };
+		DDE1372910DC5E5300161D6B /* cs_notice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cs_notice.h; path = ../client/cs_notice.h; sourceTree = SOURCE_ROOT; };
+		DDE1372D10DC5E8D00161D6B /* notice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = notice.cpp; path = ../lib/notice.cpp; sourceTree = SOURCE_ROOT; };
+		DDE1372E10DC5E8D00161D6B /* notice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = notice.h; path = ../lib/notice.h; sourceTree = SOURCE_ROOT; };
+		DDE1373B10DC60BB00161D6B /* ViewNotices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewNotices.cpp; sourceTree = "<group>"; };
+		DDE1373C10DC60BB00161D6B /* ViewNotices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewNotices.h; sourceTree = "<group>"; };
+		DDE1374010DC60E200161D6B /* DlgEventLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DlgEventLog.cpp; path = ../clientgui/DlgEventLog.cpp; sourceTree = SOURCE_ROOT; };
+		DDE1374110DC60E200161D6B /* DlgEventLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DlgEventLog.h; path = ../clientgui/DlgEventLog.h; sourceTree = SOURCE_ROOT; };
+		DDE1374710DC613600161D6B /* DlgEventLogListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DlgEventLogListCtrl.cpp; path = ../clientgui/DlgEventLogListCtrl.cpp; sourceTree = SOURCE_ROOT; };
+		DDE1374810DC613600161D6B /* DlgEventLogListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DlgEventLogListCtrl.h; path = ../clientgui/DlgEventLogListCtrl.h; sourceTree = SOURCE_ROOT; };
+		DDE2552B07C62F3E008E7D6E /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
+		DDE3A87F0E90D1BF00A363A7 /* client_state.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = client_state.cpp; sourceTree = "<group>"; };
+		DDE3A8840E90D23400A363A7 /* scheduler_op.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scheduler_op.cpp; sourceTree = "<group>"; };
+		DDE41C250C1FCA8F00CA1F86 /* graphics2_util.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = graphics2_util.cpp; sourceTree = "<group>"; };
+		DDE7A3AF15C6739E002B3B96 /* ttfont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ttfont.cpp; path = ../api/ttfont.cpp; sourceTree = "<group>"; };
+		DDE7A3B015C6739E002B3B96 /* ttfont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ttfont.h; path = ../api/ttfont.h; sourceTree = "<group>"; };
+		DDEB3CA80981084A0087E200 /* gridrepublic.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = gridrepublic.icns; path = ../clientgui/res/gridrepublic.icns; sourceTree = SOURCE_ROOT; };
+		DDEF388E0802B73500E87552 /* ViewStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ViewStatistics.cpp; path = ../clientgui/ViewStatistics.cpp; sourceTree = SOURCE_ROOT; };
+		DDEF388F0802B73500E87552 /* ViewStatistics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ViewStatistics.h; path = ../clientgui/ViewStatistics.h; sourceTree = SOURCE_ROOT; };
+		DDEFB8A3134689C7001E325E /* cl_boinc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cl_boinc.h; path = ../lib/cl_boinc.h; sourceTree = SOURCE_ROOT; };
+		DDF1F47A09822C3400482C89 /* preinstall */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.csh; name = preinstall; path = ../mac_installer/preinstall; sourceTree = SOURCE_ROOT; };
+		DDF1F4A409822F8A00482C89 /* GR-Branding */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = "GR-Branding"; path = "../mac_installer/GR-Branding"; sourceTree = SOURCE_ROOT; };
+		DDF3028907CCCE2C00701169 /* BOINCMgr.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = BOINCMgr.icns; path = ../clientgui/res/BOINCMgr.icns; sourceTree = SOURCE_ROOT; };
+		DDF9385407E28906004DC076 /* checkin_notes */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = checkin_notes; path = ../checkin_notes; sourceTree = SOURCE_ROOT; };
+		DDF9EC03144EB14B005D6144 /* libboinc_opencl.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libboinc_opencl.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		DDF9EC08144EB2BB005D6144 /* boinc_opencl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = boinc_opencl.cpp; sourceTree = "<group>"; };
+		DDF9EC09144EB2BB005D6144 /* boinc_opencl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = boinc_opencl.h; sourceTree = "<group>"; };
+		DDFA60D40CB337D40037B88C /* gfx_switcher */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = gfx_switcher; sourceTree = BUILT_PRODUCTS_DIR; };
+		DDFA60E30CB3396C0037B88C /* gfx_switcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = gfx_switcher.cpp; path = ../clientscr/gfx_switcher.cpp; sourceTree = SOURCE_ROOT; };
+		DDFE84E10B60CD66009B43D9 /* DlgAdvPreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DlgAdvPreferences.cpp; path = ../clientgui/DlgAdvPreferences.cpp; sourceTree = SOURCE_ROOT; };
+		DDFE84E20B60CD66009B43D9 /* DlgAdvPreferences.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DlgAdvPreferences.h; path = ../clientgui/DlgAdvPreferences.h; sourceTree = SOURCE_ROOT; };
+		DDFE84E30B60CD66009B43D9 /* DlgAdvPreferencesBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DlgAdvPreferencesBase.cpp; path = ../clientgui/DlgAdvPreferencesBase.cpp; sourceTree = SOURCE_ROOT; };
+		DDFE84E40B60CD66009B43D9 /* DlgAdvPreferencesBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DlgAdvPreferencesBase.h; path = ../clientgui/DlgAdvPreferencesBase.h; sourceTree = SOURCE_ROOT; };
+		DDFE854A0B60CFD0009B43D9 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = ../../../../../System/Library/Frameworks/AppKit.framework; sourceTree = SOURCE_ROOT; };
+		DDFF2AD30A53D4AE002BC19D /* setprojectgrp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = setprojectgrp; sourceTree = BUILT_PRODUCTS_DIR; };
+		DDFF2AE80A53D599002BC19D /* setprojectgrp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = setprojectgrp.cpp; sourceTree = "<group>"; };
+		F5159562029EB02001F5651B /* md5.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../lib/md5.c; sourceTree = SOURCE_ROOT; };
+		F5159563029EB02001F5651B /* md5.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = md5.h; path = ../lib/md5.h; sourceTree = SOURCE_ROOT; };
+		F5159564029EB02001F5651B /* md5_file.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = md5_file.cpp; sourceTree = "<group>"; };
+		F5159565029EB02001F5651B /* md5_file.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = md5_file.h; path = ../lib/md5_file.h; sourceTree = SOURCE_ROOT; };
+		F519F98E02C44A7501BDB3CA /* scheduler_op.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = scheduler_op.h; path = ../client/scheduler_op.h; sourceTree = SOURCE_ROOT; };
+		F51BDF4A03086C46012012A7 /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = SOURCE_ROOT; };
+		F51CCF1E02EFD37D018DB99A /* pers_file_xfer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pers_file_xfer.h; path = ../client/pers_file_xfer.h; sourceTree = SOURCE_ROOT; };
+		F51CCF1F02EFD37D018DB99A /* pers_file_xfer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = pers_file_xfer.cpp; sourceTree = "<group>"; };
+		F51DA64D02DB97FF010E292A /* crypt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = crypt.cpp; sourceTree = "<group>"; };
+		F51DA64E02DB97FF010E292A /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = crypt.h; path = ../lib/crypt.h; sourceTree = SOURCE_ROOT; };
+		F51DE2B302DE4D0301D42C55 /* error_numbers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = error_numbers.h; path = ../lib/error_numbers.h; sourceTree = SOURCE_ROOT; };
+		F54B8FC102AC0A0C01FB7237 /* app.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = app.cpp; sourceTree = "<group>"; };
+		F54B8FC202AC0A0C01FB7237 /* app.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = app.h; path = ../client/app.h; sourceTree = SOURCE_ROOT; };
+		F54B8FC302AC0A0C01FB7237 /* check_state.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = check_state.cpp; sourceTree = "<group>"; };
+		F54B8FC402AC0A0C01FB7237 /* client_state.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = client_state.h; path = ../client/client_state.h; sourceTree = SOURCE_ROOT; };
+		F54B8FC502AC0A0C01FB7237 /* client_types.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = client_types.cpp; sourceTree = "<group>"; };
+		F54B8FC602AC0A0C01FB7237 /* client_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = client_types.h; path = ../client/client_types.h; sourceTree = SOURCE_ROOT; };
+		F54B8FC702AC0A0C01FB7237 /* cs_apps.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cs_apps.cpp; sourceTree = "<group>"; };
+		F54B8FC802AC0A0C01FB7237 /* cs_files.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cs_files.cpp; sourceTree = "<group>"; };
+		F54B8FC902AC0A0C01FB7237 /* cs_scheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cs_scheduler.cpp; sourceTree = "<group>"; };
+		F54B8FCB02AC0A0C01FB7237 /* file_names.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = file_names.cpp; sourceTree = "<group>"; };
+		F54B8FCC02AC0A0C01FB7237 /* file_names.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = file_names.h; path = ../client/file_names.h; sourceTree = SOURCE_ROOT; };
+		F54B8FCD02AC0A0C01FB7237 /* file_xfer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = file_xfer.cpp; sourceTree = "<group>"; };
+		F54B8FCE02AC0A0C01FB7237 /* file_xfer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = file_xfer.h; path = ../client/file_xfer.h; sourceTree = SOURCE_ROOT; };
+		F54B8FD302AC0A0C01FB7237 /* hostinfo_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = hostinfo_unix.cpp; sourceTree = "<group>"; };
+		F54B8FD602AC0A0C01FB7237 /* log_flags.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = log_flags.cpp; sourceTree = "<group>"; };
+		F54B8FD702AC0A0C01FB7237 /* log_flags.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = log_flags.h; path = ../client/log_flags.h; sourceTree = SOURCE_ROOT; };
+		F54B8FDA02AC0A0C01FB7237 /* net_stats.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = net_stats.cpp; sourceTree = "<group>"; };
+		F54B8FDB02AC0A0C01FB7237 /* net_stats.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = net_stats.h; path = ../client/net_stats.h; sourceTree = SOURCE_ROOT; };
+		F54B8FE402AC0A0C01FB7237 /* time_stats.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = time_stats.cpp; sourceTree = "<group>"; };
+		F54B8FE502AC0A0C01FB7237 /* time_stats.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = time_stats.h; path = ../client/time_stats.h; sourceTree = SOURCE_ROOT; };
+		F54B901502AC0A2201FB7237 /* parse.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = parse.h; path = ../lib/parse.h; sourceTree = SOURCE_ROOT; };
+		F54B901602AC0A2201FB7237 /* parse.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = parse.cpp; sourceTree = "<group>"; };
+		F5755AD302FE063A012012A7 /* boinc_api.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = boinc_api.cpp; sourceTree = "<group>"; };
+		F5755AD402FE063A012012A7 /* boinc_api.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = boinc_api.h; path = ../api/boinc_api.h; sourceTree = SOURCE_ROOT; };
+		F5EAD474031AEFF8018E201A /* filesys.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = filesys.h; path = ../lib/filesys.h; sourceTree = SOURCE_ROOT; };
+		F5EAD475031AEFF8018E201A /* filesys.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = filesys.cpp; sourceTree = "<group>"; };
+		F5EAD478031AF001018E201A /* util.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = util.h; path = ../lib/util.h; sourceTree = SOURCE_ROOT; };
+		F5EAD479031AF001018E201A /* util.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = util.cpp; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		DD1277B1081F3D67007B5DE1 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD1277E6081F44C1007B5DE1 /* Carbon.framework in Frameworks */,
+				DDA12A6D0A36974600FBDD12 /* Security.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD1AFEAE0A512D8700EE5B82 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD1AFEAF0A512D8700EE5B82 /* Carbon.framework in Frameworks */,
+				DD1AFEB00A512D8700EE5B82 /* Security.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD35352F07E1E05C00C4718D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD3E15300A774397007E0084 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD3E15310A774397007E0084 /* Carbon.framework in Frameworks */,
+				DD3E15320A774397007E0084 /* IOKit.framework in Frameworks */,
+				DD3E15330A774397007E0084 /* Security.framework in Frameworks */,
+				DDA546610D16964E008CC69A /* QuickTime.framework in Frameworks */,
+				DD21B49D0D750FC600AFFEE5 /* AppKit.framework in Frameworks */,
+				DD1682B10F8DC6D90096D714 /* OpenGL.framework in Frameworks */,
+				DDB42E3412F1B6A400E6D8A2 /* libwx_mac_static.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD407A4807D2FB1200163EF5 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD40CDF707F0386A0096C645 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD130F340820C4C4001A0291 /* Carbon.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD46883F0C165F3C0089F500 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD01B6790C16723C0023A806 /* Carbon.framework in Frameworks */,
+				DD01B7120C16723D0023A806 /* Security.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD6381E80870DC9D007A2F8E /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD69FEE608416C1300C01361 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD7748960A356C880025D05E /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD7749680A3596380025D05E /* Security.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD81C797144D8DA9000BE61A /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD89161F0F3B17E900DE5B1C /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD89165A0F3B1B9000DE5B1C /* AppKit.framework in Frameworks */,
+				DD89165F0F3B1BC200DE5B1C /* GLUT.framework in Frameworks */,
+				DD8916600F3B1BC200DE5B1C /* OpenGL.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD96AFF70811075000A06F22 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD130E740820C422001A0291 /* ScreenSaver.framework in Frameworks */,
+				DDB6E3EF0D5B27AA00ED12B8 /* Carbon.framework in Frameworks */,
+				DDB74A6C0D74259E00E97A40 /* AppKit.framework in Frameworks */,
+				DDD93E7313E017B600B92D0F /* IOKit.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDAEC9DF07FA583B00A7BC36 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDB219A210B3BB6100417AEF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDB873F80C850BC800E0DE1F /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDD0953D0A3EDD2500C95BA4 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDD336F81062235D00867C7D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDD3371310622D0800867C7D /* Carbon.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDD74D8507CF482E0065AC9D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD130F320820C47C001A0291 /* IOKit.framework in Frameworks */,
+				DD431FAA0A41660D0060585A /* Carbon.framework in Frameworks */,
+				DD85AE4B0F5D284D0031F7AC /* Security.framework in Frameworks */,
+				DD1B4C3114FEFA0000ABB13F /* OpenGL.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDF9EC00144EB14B005D6144 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDFA60CC0CB337D40037B88C /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDFF2ACD0A53D4AE002BC19D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		195DF8C9FE9D4F0611CA2CBB /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				DDD74D8707CF482E0065AC9D /* boinc */,
+				DD407A4A07D2FB1200163EF5 /* libboinc.a */,
+				DD35353107E1E05C00C4718D /* libboinc_api.a */,
+				DD40CDF907F0386A0096C645 /* SystemMenu.bundle */,
+				DDAEC9E107FA583B00A7BC36 /* SetVersion */,
+				DD96AFF90811075000A06F22 /* BOINCSaver.saver */,
+				DD1277B3081F3D67007B5DE1 /* PostInstall.app */,
+				DD69FEE808416C1300C01361 /* boinccmd */,
+				DD6381EA0870DC9D007A2F8E /* MakeAppIcon_h */,
+				DD7748980A356C880025D05E /* SetUpSecurity */,
+				DDD0953F0A3EDD2500C95BA4 /* switcher */,
+				DD1AFEBA0A512D8700EE5B82 /* BOINC Installer.app */,
+				DDFF2AD30A53D4AE002BC19D /* setprojectgrp */,
+				DD3E15420A774397007E0084 /* BOINCManager.app */,
+				DD4688410C165F3C0089F500 /* Uninstall BOINC.app */,
+				DDB874030C850BC800E0DE1F /* libboinc_graphics2.a */,
+				DDFA60D40CB337D40037B88C /* gfx_switcher */,
+				DD8916280F3B17E900DE5B1C /* boincscr */,
+				DDD337021062235D00867C7D /* AddRemoveUser */,
+				DDB219A410B3BB6100417AEF /* WaitPermissions.app */,
+				DD81C79A144D8DA9000BE61A /* libjpeg.a */,
+				DDF9EC03144EB14B005D6144 /* libboinc_opencl.a */,
+			);
+			name = Products;
+			sourceTree = SOURCE_ROOT;
+		};
+		20286C29FDCF999611CA2CEA /* «PROJECTNAME» */ = {
+			isa = PBXGroup;
+			children = (
+				DD40827D07D30AA800163EF5 /* jpeglib.h */,
+				F54B8FBE02AC0A0C01FB7237 /* client */,
+				DD81C3F707C5D03B0098A04D /* clientgui */,
+				DDB873950C85072500E0DE1F /* clientscr */,
+				DD1277BC081F3E59007B5DE1 /* mac_installer */,
+				DDF9385307E288F0004DC076 /* Documentation */,
+				F54FF8B6029F2FFC012012A7 /* api */,
+				F515955F029EB02001F5651B /* lib */,
+				DD81C79E144D8F97000BE61A /* jpeg */,
+				20286C2CFDCF999611CA2CEA /* Resources */,
+				20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */,
+				195DF8C9FE9D4F0611CA2CBB /* Products */,
+				DD40CDFA07F0386B0096C645 /* SystemMenu-Info.plist */,
+				DD96AFFA0811075100A06F22 /* ScreenSaver-Info.plist */,
+				DD1277B5081F3D67007B5DE1 /* PostInstall-Info.plist */,
+				DD1AFE8F0A512D2600EE5B82 /* Installer-Info.plist */,
+				DD4688430C165F3C0089F500 /* Uninstaller-Info.plist */,
+				DDB219A610B3BB6200417AEF /* WaitPermissions-Info.plist */,
+			);
+			name = "«PROJECTNAME»";
+			sourceTree = "<group>";
+		};
+		20286C2CFDCF999611CA2CEA /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				DD0C5A8A0816711400CEC5D7 /* boinc.jpg */,
+				DDBC6CA40D5D458700564C49 /* boinc_ss_logo.png */,
+				DDF3028907CCCE2C00701169 /* BOINCMgr.icns */,
+				DD531BC50C193D3800742E50 /* MacInstaller.icns */,
+				DD531BC70C193D5200742E50 /* MacUninstaller.icns */,
+				DD5D7EBA0FE320F600ACF87B /* Uninstaller.r */,
+				DD48091E081A66F100A174AA /* BOINCSaver.nib */,
+				DDEB3CA80981084A0087E200 /* gridrepublic.icns */,
+				DDF1F4A409822F8A00482C89 /* GR-Branding */,
+				DD64E7D507D89DB800B176C8 /* Info.plist */,
+				F51BDF4903086C46012012A7 /* InfoPlist.strings */,
+			);
+			name = Resources;
+			sourceTree = SOURCE_ROOT;
+		};
+		20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
+			isa = PBXGroup;
+			children = (
+				DDFE854A0B60CFD0009B43D9 /* AppKit.framework */,
+				DDE2552B07C62F3E008E7D6E /* IOKit.framework */,
+				20286C33FDCF999611CA2CEA /* Carbon.framework */,
+				DDA546600D16964E008CC69A /* QuickTime.framework */,
+				DD7C5E7508110AE3002FCE1E /* ScreenSaver.framework */,
+				DD1929D80918A2F100C31BCF /* Security.framework */,
+				DDA90F260B64673D008F2E87 /* libwx_mac_static.a */,
+				DD89165D0F3B1BC200DE5B1C /* GLUT.framework */,
+				DD89165E0F3B1BC200DE5B1C /* OpenGL.framework */,
+			);
+			name = "External Frameworks and Libraries";
+			sourceTree = SOURCE_ROOT;
+		};
+		DD1277BC081F3E59007B5DE1 /* mac_installer */ = {
+			isa = PBXGroup;
+			children = (
+				DD1AFEE70A51301C00EE5B82 /* Installer.cpp */,
+				DD1277C0081F3E73007B5DE1 /* PostInstall.cpp */,
+				DD4688590C1661970089F500 /* uninstall.cpp */,
+				DDF1F47A09822C3400482C89 /* preinstall */,
+				DDB8D5A5081FC8C700A5A1E8 /* postinstall */,
+				DD127880081F464E007B5DE1 /* postupgrade */,
+				DDD33709106224E800867C7D /* AddRemoveUser.cpp */,
+				DD2370DF13F49DF3003149F9 /* LoginItemAPI.c */,
+				DD2370E013F49DF3003149F9 /* LoginItemAPI.h */,
+				DDB219B110B3BBA900417AEF /* WaitPermissions.cpp */,
+			);
+			name = mac_installer;
+			sourceTree = SOURCE_ROOT;
+		};
+		DD81C3F707C5D03B0098A04D /* clientgui */ = {
+			isa = PBXGroup;
+			children = (
+				DD58C41808F3343F00C1DF66 /* AccountInfoPage.cpp */,
+				DD58C41908F3343F00C1DF66 /* AccountInfoPage.h */,
+				DD58C41C08F3343F00C1DF66 /* AccountManagerInfoPage.cpp */,
+				DD58C41D08F3343F00C1DF66 /* AccountManagerInfoPage.h */,
+				DD58C41E08F3343F00C1DF66 /* AccountManagerProcessingPage.cpp */,
+				DD58C41F08F3343F00C1DF66 /* AccountManagerProcessingPage.h */,
+				DD58C42008F3343F00C1DF66 /* AccountManagerPropertiesPage.cpp */,
+				DD58C42108F3343F00C1DF66 /* AccountManagerPropertiesPage.h */,
+				DD9C94A00A5A3A4100AB0D10 /* AdvancedFrame.cpp */,
+				DD9C94A10A5A3A4100AB0D10 /* AdvancedFrame.h */,
+				DD58C42408F3343F00C1DF66 /* AlreadyExistsPage.cpp */,
+				DD58C42508F3343F00C1DF66 /* AlreadyExistsPage.h */,
+				DDC132F10E2DAB1B0014D305 /* AsyncRPC.h */,
+				DDC132F20E2DAB1B0014D305 /* AsyncRPC.cpp */,
+				DD9C94A20A5A3A4100AB0D10 /* BOINCBaseFrame.cpp */,
+				DD9C94A30A5A3A4100AB0D10 /* BOINCBaseFrame.h */,
+				DD81C3FE07C5D1020098A04D /* BOINCBaseView.cpp */,
+				DD81C43407C5D2240098A04D /* BOINCBaseView.h */,
+				DD58C43408F3347D00C1DF66 /* BOINCBaseWizard.cpp */,
+				DD58C43508F3347D00C1DF66 /* BOINCBaseWizard.h */,
+				DDC3D55C0D507D1700BE6D23 /* BOINCClientManager.cpp */,
+				DDC3D55D0D507D1700BE6D23 /* BOINCClientManager.h */,
+				DD8DD4A509D9432F0043019E /* BOINCDialupManager.cpp */,
+				DD8DD4A609D9432F0043019E /* BOINCDialupManager.h */,
+				DD81C40507C5D1020098A04D /* BOINCGUIApp.cpp */,
+				DD81C43B07C5D2240098A04D /* BOINCGUIApp.h */,
+				DD4FA25B121828E400154856 /* BOINCHtmlLBox.cpp */,
+				DD4FA25C121828E400154856 /* BOINCHtmlLBox.h */,
+				DD0A87FD11D950E00067C1F2 /* BOINCInternetFSHandler.cpp */,
+				DD0A87FE11D950E00067C1F2 /* BOINCInternetFSHandler.h */,
+				DD81C40407C5D1020098A04D /* BOINCListCtrl.cpp */,
+				DD81C43A07C5D2240098A04D /* BOINCListCtrl.h */,
+				DD81C40307C5D1020098A04D /* BOINCTaskBar.cpp */,
+				DD81C43D07C5D2240098A04D /* BOINCTaskBar.h */,
+				DD81C40607C5D1020098A04D /* BOINCTaskCtrl.cpp */,
+				DD81C43807C5D2240098A04D /* BOINCTaskCtrl.h */,
+				DD4FA2601218290600154856 /* BOINCVListBox.cpp */,
+				DD4FA2611218290600154856 /* BOINCVListBox.h */,
+				DD4E70490BCDAC360010A522 /* browser.cpp */,
+				DD4E704A0BCDAC360010A522 /* browser.h */,
+				DDCE78220A70BD29008218B6 /* common */,
+				DD58C43708F3347D00C1DF66 /* CompletionErrorPage.cpp */,
+				DD58C43808F3347D00C1DF66 /* CompletionErrorPage.h */,
+				DD58C43908F3347D00C1DF66 /* CompletionPage.cpp */,
+				DD58C43A08F3347D00C1DF66 /* CompletionPage.h */,
+				DD81C40207C5D1020098A04D /* DlgAbout.cpp */,
+				DD81C43707C5D2240098A04D /* DlgAbout.h */,
+				DDFE84E10B60CD66009B43D9 /* DlgAdvPreferences.cpp */,
+				DDFE84E20B60CD66009B43D9 /* DlgAdvPreferences.h */,
+				DDFE84E30B60CD66009B43D9 /* DlgAdvPreferencesBase.cpp */,
+				DDFE84E40B60CD66009B43D9 /* DlgAdvPreferencesBase.h */,
+				DDE1374710DC613600161D6B /* DlgEventLogListCtrl.cpp */,
+				DDE1374810DC613600161D6B /* DlgEventLogListCtrl.h */,
+				DDE1374010DC60E200161D6B /* DlgEventLog.cpp */,
+				DDE1374110DC60E200161D6B /* DlgEventLog.h */,
+				DDDE43B00EC04C1800083520 /* DlgExitMessage.cpp */,
+				DDDE43B80EC04C3C00083520 /* DlgExitMessage.h */,
+				DDC63EEF0985B89600383FD2 /* DlgGenericMessage.cpp */,
+				DDC63EF00985B89600383FD2 /* DlgGenericMessage.h */,
+				DDCF84060E1B7C0A005EDC45 /* DlgItemProperties.cpp */,
+				DDCF84070E1B7C0A005EDC45 /* DlgItemProperties.h */,
+				DD81C3FF07C5D1020098A04D /* DlgOptions.cpp */,
+				DD81C43907C5D2240098A04D /* DlgOptions.h */,
+				DD2D25CB07FAB41700151141 /* DlgSelectComputer.cpp */,
+				DD2D25CC07FAB41700151141 /* DlgSelectComputer.h */,
+				DD81C44D07C5D2470098A04D /* Events.h */,
+				DD81C41407C5D13E0098A04D /* LogBOINC.cpp */,
+				DD81C45007C5D2470098A04D /* LogBOINC.h */,
+				F5C5403402BFC5C701BEDAB8 /* mac */,
+				DD81C41607C5D13E0098A04D /* MainDocument.cpp */,
+				DD81C44F07C5D2470098A04D /* MainDocument.h */,
+				DD58C44608F334B500C1DF66 /* NoInternetConnectionPage.cpp */,
+				DD58C44708F334B500C1DF66 /* NoInternetConnectionPage.h */,
+				DD58C44808F334B500C1DF66 /* NotDetectedPage.cpp */,
+				DD58C44908F334B500C1DF66 /* NotDetectedPage.h */,
+				DD58C44A08F334B500C1DF66 /* NotFoundPage.cpp */,
+				DD58C44B08F334B500C1DF66 /* NotFoundPage.h */,
+				DDBB7E7511D2BCD400598DC1 /* NoticeListCtrl.cpp */,
+				DDBB7E7711D2BCF100598DC1 /* NoticeListCtrl.h */,
+				DD58C44C08F334B500C1DF66 /* ProjectInfoPage.cpp */,
+				DD58C44D08F334B500C1DF66 /* ProjectInfoPage.h */,
+				DD205A180BAF596E0008D473 /* ProjectListCtrl.cpp */,
+				DD205A190BAF596E0008D473 /* ProjectListCtrl.h */,
+				DD58C44E08F334B500C1DF66 /* ProjectProcessingPage.cpp */,
+				DD58C44F08F334B500C1DF66 /* ProjectProcessingPage.h */,
+				DD58C45008F334B500C1DF66 /* ProjectPropertiesPage.cpp */,
+				DD58C45108F334B500C1DF66 /* ProjectPropertiesPage.h */,
+				DDB506F80958446900181B75 /* ProxyInfoPage.cpp */,
+				DDB506F90958446900181B75 /* ProxyInfoPage.h */,
+				DD58C45E08F334EA00C1DF66 /* ProxyPage.cpp */,
+				DD58C45F08F334EA00C1DF66 /* ProxyPage.h */,
+				DD58C46008F334EA00C1DF66 /* resource.h */,
+				DD81C41707C5D13E0098A04D /* stdwx.cpp */,
+				DDAFA7AC12D4834D00997329 /* sg_BoincSimpleFrame.cpp */,
+				DDAFA7AD12D4834D00997329 /* sg_BoincSimpleFrame.h */,
+				DD1C822F0AF372D900F709AC /* sg_CustomControls.cpp */,
+				DD1C82300AF372D900F709AC /* sg_CustomControls.h */,
+				DD4C560C0AD389A2009E23C6 /* sg_DlgMessages.cpp */,
+				DD4C560D0AD389A2009E23C6 /* sg_DlgMessages.h */,
+				DDCAD7D30A6C603A0086C7EE /* sg_DlgPreferences.cpp */,
+				DDCAD7D40A6C603A0086C7EE /* sg_DlgPreferences.h */,
+				DDC321AC12E45162006CB55F /* sg_PanelBase.cpp */,
+				DDC321AD12E45162006CB55F /* sg_PanelBase.h */,
+				DDDD6D7E12E4611300C258A0 /* sg_ProjectPanel.cpp */,
+				DDDD6D7F12E4611300C258A0 /* sg_ProjectPanel.h */,
+				DD7A5DAA12EEC37B0006268E /* sg_ProjectCommandPopup.cpp */,
+				DD7A5DA712EEC33F0006268E /* sg_ProjectCommandPopup.h */,
+				DD7A5D9E12EEBFC20006268E /* sg_ProjectWebSitesPopup.cpp */,
+				DD7A5D9D12EEBFC20006268E /* sg_ProjectWebSitesPopup.h */,
+				DD7A5D8212EEBE5E0006268E /* sg_TaskCommandPopup.cpp */,
+				DD7A5D8112EEBDF30006268E /* sg_TaskCommandPopup.h */,
+				DDD0697112D70C9400120920 /* sg_TaskPanel.cpp */,
+				DDD0697212D70C9400120920 /* sg_TaskPanel.h */,
+				DD247AF70AEA308A0034104A /* SkinManager.cpp */,
+				DD247AF80AEA308A0034104A /* SkinManager.h */,
+				DDA26C5D13977E1500DFDFE1 /* sqlite3.c */,
+				DD81C45B07C5D2880098A04D /* stdwx.h */,
+				DDC836E50EDEA5DB001C2EF9 /* TermsOfUsePage.cpp */,
+				DD04BE1A0EDD836A006D5603 /* TermsOfUsePage.h */,
+				DD58C46108F334EA00C1DF66 /* UnavailablePage.cpp */,
+				DD58C46208F334EA00C1DF66 /* UnavailablePage.h */,
+				DD81C42707C5D1D70098A04D /* ValidateAccountKey.cpp */,
+				DD81C46607C5D29F0098A04D /* ValidateAccountKey.h */,
+				DDBDF4A90987091800464F83 /* ValidateEmailAddress.cpp */,
+				DDBDF4AA0987091800464F83 /* ValidateEmailAddress.h */,
+				DD81C42607C5D1D70098A04D /* ValidateURL.cpp */,
+				DD81C46507C5D29F0098A04D /* ValidateURL.h */,
+				DDE1373B10DC60BB00161D6B /* ViewNotices.cpp */,
+				DDE1373C10DC60BB00161D6B /* ViewNotices.h */,
+				DDD52DC40C03CAE6009B5FC0 /* ViewProjects.cpp */,
+				DDD52DC50C03CAE6009B5FC0 /* ViewProjects.h */,
+				DD81C42307C5D1D70098A04D /* ViewResources.cpp */,
+				DD81C47207C5D2BF0098A04D /* ViewResources.h */,
+				DDEF388E0802B73500E87552 /* ViewStatistics.cpp */,
+				DDEF388F0802B73500E87552 /* ViewStatistics.h */,
+				DDD52DC60C03CAE6009B5FC0 /* ViewTransfers.cpp */,
+				DDD52DC70C03CAE6009B5FC0 /* ViewTransfers.h */,
+				DDD52DC80C03CAE6009B5FC0 /* ViewWork.cpp */,
+				DDD52DC90C03CAE6009B5FC0 /* ViewWork.h */,
+				DD58C46308F334EA00C1DF66 /* WelcomePage.cpp */,
+				DD58C46408F334EA00C1DF66 /* WelcomePage.h */,
+				DDA850A21207EED900B473A6 /* WizardAttach.cpp */,
+				DDA850A31207EED900B473A6 /* WizardAttach.h */,
+				DD58C46908F334EA00C1DF66 /* wizardex.cpp */,
+				DD58C46A08F334EA00C1DF66 /* wizardex.h */,
+				DD81C43C07C5D2240098A04D /* _wx_intellisense.h */,
+			);
+			name = clientgui;
+			path = ../clientgui;
+			sourceTree = SOURCE_ROOT;
+		};
+		DD81C79E144D8F97000BE61A /* jpeg */ = {
+			isa = PBXGroup;
+			children = (
+				DD81C79F144D900B000BE61A /* cderror.h */,
+				DD81C7A0144D900B000BE61A /* cdjpeg.h */,
+				DD81C7A1144D900B000BE61A /* jcapimin.c */,
+				DD81C7A2144D900B000BE61A /* jcapistd.c */,
+				DD81C7A3144D900B000BE61A /* jccoefct.c */,
+				DD81C7A4144D900B000BE61A /* jccolor.c */,
+				DD81C7A5144D900B000BE61A /* jcdctmgr.c */,
+				DD81C7A6144D900B000BE61A /* jchuff.c */,
+				DD81C7A7144D900B000BE61A /* jchuff.h */,
+				DD81C7A8144D900B000BE61A /* jcinit.c */,
+				DD81C7A9144D900B000BE61A /* jcmainct.c */,
+				DD81C7AA144D900B000BE61A /* jcmarker.c */,
+				DD81C7AB144D900B000BE61A /* jcmaster.c */,
+				DD81C7AC144D900B000BE61A /* jcomapi.c */,
+				DD81C7AD144D900B000BE61A /* jconfig.h */,
+				DD81C7AE144D900B000BE61A /* jcparam.c */,
+				DD81C7AF144D900B000BE61A /* jcphuff.c */,
+				DD81C7B0144D900B000BE61A /* jcprepct.c */,
+				DD81C7B1144D900B000BE61A /* jcsample.c */,
+				DD81C7B2144D900B000BE61A /* jctrans.c */,
+				DD81C7B3144D900B000BE61A /* jdapimin.c */,
+				DD81C7B4144D900B000BE61A /* jdapistd.c */,
+				DD81C7B5144D900B000BE61A /* jdatadst.c */,
+				DD81C7B6144D900B000BE61A /* jdatasrc.c */,
+				DD81C7B7144D900B000BE61A /* jdcoefct.c */,
+				DD81C7B8144D900B000BE61A /* jdcolor.c */,
+				DD81C7B9144D900B000BE61A /* jdct.h */,
+				DD81C7BA144D900B000BE61A /* jddctmgr.c */,
+				DD81C7BB144D900B000BE61A /* jdhuff.c */,
+				DD81C7BC144D900B000BE61A /* jdhuff.h */,
+				DD81C7BD144D900B000BE61A /* jdinput.c */,
+				DD81C7BE144D900B000BE61A /* jdmainct.c */,
+				DD81C7BF144D900B000BE61A /* jdmarker.c */,
+				DD81C7C0144D900B000BE61A /* jdmaster.c */,
+				DD81C7C1144D900B000BE61A /* jdmerge.c */,
+				DD81C7C2144D900B000BE61A /* jdphuff.c */,
+				DD81C7C3144D900B000BE61A /* jdpostct.c */,
+				DD81C7C4144D900B000BE61A /* jdsample.c */,
+				DD81C7C5144D900B000BE61A /* jdtrans.c */,
+				DD81C7C6144D900B000BE61A /* jerror.c */,
+				DD81C7C7144D900B000BE61A /* jerror.h */,
+				DD81C7C8144D900B000BE61A /* jfdctflt.c */,
+				DD81C7C9144D900B000BE61A /* jfdctfst.c */,
+				DD81C7CA144D900B000BE61A /* jfdctint.c */,
+				DD81C7CB144D900B000BE61A /* jidctflt.c */,
+				DD81C7CC144D900B000BE61A /* jidctfst.c */,
+				DD81C7CD144D900B000BE61A /* jidctint.c */,
+				DD81C7CE144D900B000BE61A /* jidctred.c */,
+				DD81C7CF144D900B000BE61A /* jinclude.h */,
+				DD81C7D0144D900B000BE61A /* jmemmgr.c */,
+				DD81C7D1144D900B000BE61A /* jmemnobs.c */,
+				DD81C7D2144D900B000BE61A /* jmemsys.h */,
+				DD81C7D3144D900B000BE61A /* jmorecfg.h */,
+				DD81C7D4144D900B000BE61A /* jpegint.h */,
+				DD81C7D5144D900B000BE61A /* jpeglib.h */,
+				DD81C7D6144D900B000BE61A /* jquant1.c */,
+				DD81C7D7144D900B000BE61A /* jquant2.c */,
+				DD81C7D8144D900B000BE61A /* jutils.c */,
+				DD81C7D9144D900B000BE61A /* jversion.h */,
+				DD81C7DA144D900B000BE61A /* rdbmp.c */,
+				DD81C7DB144D900B000BE61A /* rdcolmap.c */,
+				DD81C7DC144D900B000BE61A /* rdgif.c */,
+				DD81C7DD144D900B000BE61A /* rdppm.c */,
+				DD81C7DE144D900B000BE61A /* rdrle.c */,
+				DD81C7DF144D900B000BE61A /* rdswitch.c */,
+				DD81C7E0144D900B000BE61A /* rdtarga.c */,
+			);
+			name = jpeg;
+			path = ../api;
+			sourceTree = "<group>";
+		};
+		DDA6BCED0BD4546D008F7921 /* mac */ = {
+			isa = PBXGroup;
+			children = (
+				DDA6BD030BD4551F008F7921 /* dyld_gdb.h */,
+				DDA6BD040BD4551F008F7921 /* mac_backtrace.cpp */,
+				DDA6BD050BD4551F008F7921 /* mac_backtrace.h */,
+				DDA6BD060BD4551F008F7921 /* QBacktrace.c */,
+				DDA6BD070BD4551F008F7921 /* QBacktrace.h */,
+				DDA6BD080BD4551F008F7921 /* QCrashReport.c */,
+				DDA6BD090BD4551F008F7921 /* QCrashReport.h */,
+				DDA6BD0A0BD4551F008F7921 /* QMachOImage.c */,
+				DDA6BD0B0BD4551F008F7921 /* QMachOImage.h */,
+				DDA6BD0C0BD4551F008F7921 /* QMachOImageList.c */,
+				DDA6BD0D0BD4551F008F7921 /* QMachOImageList.h */,
+				DDA6BD0E0BD4551F008F7921 /* QSymbols.c */,
+				DDA6BD0F0BD4551F008F7921 /* QSymbols.h */,
+				DDA6BD100BD4551F008F7921 /* QTaskMemory.c */,
+				DDA6BD110BD4551F008F7921 /* QTaskMemory.h */,
+			);
+			name = mac;
+			path = ../mac_build;
+			sourceTree = "<group>";
+		};
+		DDB873950C85072500E0DE1F /* clientscr */ = {
+			isa = PBXGroup;
+			children = (
+				DD89163B0F3B182700DE5B1C /* boinc_ss_opengl.h */,
+				DD89163C0F3B182700DE5B1C /* ss_app.cpp */,
+				DDB873960C85072500E0DE1F /* mac_saver_module.cpp */,
+				DDA290360CB5D80E00512BD8 /* Mac_Saver_Module.h */,
+				DDB873980C85072500E0DE1F /* Mac_Saver_ModuleView.m */,
+				DDB873970C85072500E0DE1F /* Mac_Saver_ModuleView.h */,
+				DD7AEB490C87CE1300AC3B5C /* screensaver.cpp */,
+				DD7AEB680C87CE6500AC3B5C /* screensaver.h */,
+				DDE7A3AF15C6739E002B3B96 /* ttfont.cpp */,
+				DDE7A3B015C6739E002B3B96 /* ttfont.h */,
+				DDFA60E30CB3396C0037B88C /* gfx_switcher.cpp */,
+			);
+			name = clientscr;
+			sourceTree = SOURCE_ROOT;
+		};
+		DDCE78220A70BD29008218B6 /* common */ = {
+			isa = PBXGroup;
+			children = (
+				DD40E75D0ADB87BC00214518 /* wxPieCtrl.cpp */,
+				DD40E75E0ADB87BC00214518 /* wxPieCtrl.h */,
+			);
+			name = common;
+			sourceTree = "<group>";
+		};
+		DDF9385307E288F0004DC076 /* Documentation */ = {
+			isa = PBXGroup;
+			children = (
+				DDF9385407E28906004DC076 /* checkin_notes */,
+			);
+			name = Documentation;
+			sourceTree = SOURCE_ROOT;
+		};
+		F515955F029EB02001F5651B /* lib */ = {
+			isa = PBXGroup;
+			children = (
+				AA8B6B1B046C364400A80164 /* app_ipc.cpp */,
+				AA8B6B1C046C364400A80164 /* app_ipc.h */,
+				DD344B6307C5ACEB0043025C /* base64.cpp */,
+				DD344B6407C5ACEB0043025C /* base64.h */,
+				DD81C5F007C5D8290098A04D /* boinc_win.h */,
+				DD4AE04B13652BD700285859 /* cc_config.cpp */,
+				DD4AE04C13652BD700285859 /* cc_config.h */,
+				DD7168360AAD72040051642B /* common_defs.h */,
+				DD68022E0E701ACD0067D009 /* cert_sig.cpp */,
+				DD68022F0E701ACD0067D009 /* cert_sig.h */,
+				DDEFB8A3134689C7001E325E /* cl_boinc.h */,
+				DD7475500D86273300860636 /* coproc.cpp */,
+				DD2049DC0D862516009EEE7A /* coproc.h */,
+				F51DA64D02DB97FF010E292A /* crypt.cpp */,
+				F51DA64E02DB97FF010E292A /* crypt.h */,
+				DD344BA207C5AE5A0043025C /* diagnostics.cpp */,
+				DD344BA307C5AE5A0043025C /* diagnostics.h */,
+				F51DE2B302DE4D0301D42C55 /* error_numbers.h */,
+				F5EAD475031AEFF8018E201A /* filesys.cpp */,
+				F5EAD474031AEFF8018E201A /* filesys.h */,
+				DD81C5CC07C5D7D90098A04D /* gui_rpc_client.cpp */,
+				DD73E34E08A0694000656EB1 /* gui_rpc_client_ops.cpp */,
+				DD73E34F08A0694100656EB1 /* gui_rpc_client_print.cpp */,
+				DD81C60307C5D8630098A04D /* gui_rpc_client.h */,
+				DD344BB607C5AEEE0043025C /* hostinfo.cpp */,
+				DD344BB707C5AEEE0043025C /* hostinfo.h */,
+				DDA6BCED0BD4546D008F7921 /* mac */,
+				DDAD31D60EC26B14002DA09D /* mac_address.cpp */,
+				DDAD31D70EC26B14002DA09D /* mac_address.h */,
+				F5159562029EB02001F5651B /* md5.c */,
+				F5159563029EB02001F5651B /* md5.h */,
+				F5159564029EB02001F5651B /* md5_file.cpp */,
+				F5159565029EB02001F5651B /* md5_file.h */,
+				DD407AB707D2FC7D00163EF5 /* mem_usage.cpp */,
+				DD407AB807D2FC7D00163EF5 /* mem_usage.h */,
+				DD344BD207C5B1150043025C /* mfile.cpp */,
+				DD344BD307C5B1150043025C /* mfile.h */,
+				DD344BD507C5B1150043025C /* miofile.cpp */,
+				DD344BD407C5B1150043025C /* miofile.h */,
+				DD344BDA07C5B11E0043025C /* msg_log.cpp */,
+				DD344BDB07C5B11E0043025C /* msg_log.h */,
+				DD6D0A8507E9A61B007F882B /* network.cpp */,
+				DD6D0A8607E9A61B007F882B /* network.h */,
+				F54B901602AC0A2201FB7237 /* parse.cpp */,
+				DDE1372D10DC5E8D00161D6B /* notice.cpp */,
+				DDE1372E10DC5E8D00161D6B /* notice.h */,
+				F54B901502AC0A2201FB7237 /* parse.h */,
+				DD344BE407C5B1670043025C /* prefs.cpp */,
+				DD344BE507C5B1670043025C /* prefs.h */,
+				DDB4A91C1411840800032E5D /* proc_control.cpp */,
+				DDB4A91D1411840800032E5D /* proc_control.h */,
+				DDB6934F0ABFE9C600689FD8 /* procinfo_mac.cpp */,
+				DD2B6C7E13149177005D6F3E /* procinfo.cpp */,
+				DD2B6C7F13149177005D6F3E /* procinfo.h */,
+				DD344BEF07C5B1770043025C /* proxy_info.cpp */,
+				DD344BEE07C5B1770043025C /* proxy_info.h */,
+				AAA31C97042157A800A80164 /* shmem.cpp */,
+				AAA31C98042157A800A80164 /* shmem.h */,
+				DD407ADC07D2FDF700163EF5 /* std_fixes.h */,
+				DDA45502140F85DD00D97676 /* str_replace.h */,
+				DD7BF7D70B8E7A9800A009F7 /* str_util.cpp */,
+				DD7BF7D80B8E7A9800A009F7 /* str_util.h */,
+				DD407AED07D2FE7200163EF5 /* synch.cpp */,
+				DD407AEA07D2FE6500163EF5 /* synch.h */,
+				DD5A3F15142877A5008148CA /* thread.cpp */,
+				DD5A3F16142877A5008148CA /* thread.h */,
+				DDC06AB210A3E93F00C8D9A5 /* url.cpp */,
+				DDC06AB310A3E93F00C8D9A5 /* url.h */,
+				F5EAD479031AF001018E201A /* util.cpp */,
+				F5EAD478031AF001018E201A /* util.h */,
+			);
+			name = lib;
+			path = ../lib;
+			sourceTree = SOURCE_ROOT;
+		};
+		F54B8FBE02AC0A0C01FB7237 /* client */ = {
+			isa = PBXGroup;
+			children = (
+				DD344B3D07C5ABF40043025C /* acct_mgr.cpp */,
+				DD344B3E07C5ABF40043025C /* acct_mgr.h */,
+				DD33C6F608B5BB4500768630 /* acct_setup.h */,
+				DD33C6F708B5BB4500768630 /* acct_setup.cpp */,
+				F54B8FC102AC0A0C01FB7237 /* app.cpp */,
+				F54B8FC202AC0A0C01FB7237 /* app.h */,
+				DD344B4807C5AC4C0043025C /* app_control.cpp */,
+				DD344B5A07C5AC9F0043025C /* app_start.cpp */,
+				DD1E4B7914DCA83F0093C711 /* async_file.cpp */,
+				DD1E4B7A14DCA83F0093C711 /* async_file.h */,
+				DD6617870A3FFD8C00FFEBEB /* check_security.cpp */,
+				F54B8FC302AC0A0C01FB7237 /* check_state.cpp */,
+				DD344B6C07C5AD270043025C /* client_msgs.cpp */,
+				DDE3A87F0E90D1BF00A363A7 /* client_state.cpp */,
+				DD344B6D07C5AD270043025C /* client_msgs.h */,
+				F54B8FC402AC0A0C01FB7237 /* client_state.h */,
+				F54B8FC502AC0A0C01FB7237 /* client_types.cpp */,
+				F54B8FC602AC0A0C01FB7237 /* client_types.h */,
+				DDA1F1EC126D105B005EFFEB /* current_version.cpp */,
+				DDA1F1ED126D105B005EFFEB /* current_version.h */,
+				DD69FEF608416C9A00C01361 /* boinc_cmd.cpp */,
+				DD81C3D507C5CEB50098A04D /* cpp.h */,
+				DD344B7F07C5ADC30043025C /* cs_benchmark.cpp */,
+				DD16BF8F099D6CE5003E4B69 /* cpu_benchmark.h */,
+				DD16BF7B099D6C90003E4B69 /* cpu_sched.cpp */,
+				DD344B7907C5AD970043025C /* cs_account.cpp */,
+				F54B8FC702AC0A0C01FB7237 /* cs_apps.cpp */,
+				DD344B8507C5ADE70043025C /* cs_cmdline.cpp */,
+				F54B8FC802AC0A0C01FB7237 /* cs_files.cpp */,
+				DDE1372810DC5E5300161D6B /* cs_notice.cpp */,
+				DDE1372910DC5E5300161D6B /* cs_notice.h */,
+				DDBE74380C03B1C600453BB8 /* cs_platforms.cpp */,
+				DD344B8D07C5ADFA0043025C /* cs_prefs.cpp */,
+				DD0052F710CA6F1D0067570C /* cs_proxy.cpp */,
+				DD0052F810CA6F1D0067570C /* cs_proxy.h */,
+				F54B8FC902AC0A0C01FB7237 /* cs_scheduler.cpp */,
+				DD344B9307C5AE2E0043025C /* cs_statefile.cpp */,
+				DD344B9407C5AE2E0043025C /* cs_trickle.cpp */,
+				DD344B9507C5AE2E0043025C /* dhrystone.cpp */,
+				DD344B9607C5AE2E0043025C /* dhrystone.h */,
+				DD344B9707C5AE2E0043025C /* dhrystone2.cpp */,
+				F54B8FCB02AC0A0C01FB7237 /* file_names.cpp */,
+				F54B8FCC02AC0A0C01FB7237 /* file_names.h */,
+				F54B8FCD02AC0A0C01FB7237 /* file_xfer.cpp */,
+				F54B8FCE02AC0A0C01FB7237 /* file_xfer.h */,
+				DD25F72415914F8C007845B5 /* gpu_amd.cpp */,
+				DD25F72615914F8C007845B5 /* gpu_detect.cpp */,
+				DD25F72715914F8C007845B5 /* gpu_detect.h */,
+				DD25F72315914F8C007845B5 /* gpu_nvidia.cpp */,
+				DD25F72515914F8C007845B5 /* gpu_opencl.cpp */,
+				DD33C6F108B5BAF500768630 /* gui_http.cpp */,
+				DD33C6F208B5BAF500768630 /* gui_http.h */,
+				DD344BAD07C5AEB70043025C /* gui_rpc_server.cpp */,
+				DD73E36208A06ED400656EB1 /* gui_rpc_server_ops.cpp */,
+				DD344BAE07C5AEB70043025C /* gui_rpc_server.h */,
+				DD344BC007C5AF280043025C /* hostinfo_network.cpp */,
+				DD344BC107C5AF280043025C /* hostinfo_network.h */,
+				F54B8FD302AC0A0C01FB7237 /* hostinfo_unix.cpp */,
+				DD33C70208B5BEDE00768630 /* http_curl.cpp */,
+				DD33C70308B5BEDE00768630 /* http_curl.h */,
+				F54B8FD602AC0A0C01FB7237 /* log_flags.cpp */,
+				F54B8FD702AC0A0C01FB7237 /* log_flags.h */,
+				DD344BCE07C5B0B80043025C /* main.cpp */,
+				DD344BCF07C5B0B80043025C /* main.h */,
+				F54B8FDA02AC0A0C01FB7237 /* net_stats.cpp */,
+				F54B8FDB02AC0A0C01FB7237 /* net_stats.h */,
+				F51CCF1F02EFD37D018DB99A /* pers_file_xfer.cpp */,
+				F51CCF1E02EFD37D018DB99A /* pers_file_xfer.h */,
+				DD1CB22E154F5BF700BFF282 /* project.cpp */,
+				DD1CB22F154F5BF700BFF282 /* project.h */,
+				DD1CB230154F5BF700BFF282 /* result.cpp */,
+				DD1CB231154F5BF700BFF282 /* result.h */,
+				DD9AB0320EB7D5DE00AF1616 /* rr_sim.cpp */,
+				DD9AB0330EB7D5DE00AF1616 /* rr_sim.h */,
+				DD80C83D0CBAEB4F00F1121D /* sandbox.cpp */,
+				DD80C83E0CBAEB4F00F1121D /* sandbox.h */,
+				DDE3A8840E90D23400A363A7 /* scheduler_op.cpp */,
+				F519F98E02C44A7501BDB3CA /* scheduler_op.h */,
+				F54B8FE402AC0A0C01FB7237 /* time_stats.cpp */,
+				F54B8FE502AC0A0C01FB7237 /* time_stats.h */,
+				DD5EF08807C5B7C7007CCE8D /* version.h */,
+				DD5EF07007C5B329007CCE8D /* whetstone.cpp */,
+				DD7BF7E70B8E7BBE00A009F7 /* work_fetch.cpp */,
+				DDFF2AE80A53D599002BC19D /* setprojectgrp.cpp */,
+				DDD095480A3EDF2D00C95BA4 /* switcher.cpp */,
+			);
+			name = client;
+			path = ../client;
+			sourceTree = SOURCE_ROOT;
+		};
+		F54FF8B6029F2FFC012012A7 /* api */ = {
+			isa = PBXGroup;
+			children = (
+				F5755AD302FE063A012012A7 /* boinc_api.cpp */,
+				F5755AD402FE063A012012A7 /* boinc_api.h */,
+				DDF9EC08144EB2BB005D6144 /* boinc_opencl.cpp */,
+				DDF9EC09144EB2BB005D6144 /* boinc_opencl.h */,
+				DDE41C250C1FCA8F00CA1F86 /* graphics2_util.cpp */,
+				DDB874450C850D3000E0DE1F /* graphics2_unix.cpp */,
+				DDB874460C850D3000E0DE1F /* graphics2.cpp */,
+				DD252F3009E3E014006454D7 /* boinc_glut.h */,
+				DD64DF0409DCC5E000668B3A /* gutil_text.cpp */,
+				DD40825507D3076400163EF5 /* gutil.cpp */,
+				DD40825607D3076400163EF5 /* gutil.h */,
+				DD6D82DA08131AB1008F7200 /* macglutfix.m */,
+				DD6381450870DB78007A2F8E /* mac_icon.cpp */,
+				DD6381F80870DD83007A2F8E /* make_app_icon_h.cpp */,
+				DD40825707D3076400163EF5 /* reduce_lib.cpp */,
+				DD40825807D3076400163EF5 /* reduce_main.cpp */,
+				DD40825907D3076400163EF5 /* reduce.h */,
+			);
+			name = api;
+			path = ../api;
+			sourceTree = SOURCE_ROOT;
+		};
+		F5C5403402BFC5C701BEDAB8 /* mac */ = {
+			isa = PBXGroup;
+			children = (
+				DD6ABCD00BD4C5CA009AA7A1 /* browser_safari.mm */,
+				DD30446A0864332D00D73756 /* config.h */,
+				DD1F0ACD0822069E00AFC5FA /* MacGUI.pch */,
+				DDA99BF31099AF18002F8E9B /* MacAccessiblity.cpp */,
+				DD29728E10BB657A00DF3C2E /* MacAccessiblity.h */,
+				DD77A71612F2D1C9006B82E9 /* MacBitmapComboBox.cpp */,
+				DD77A71712F2D1C9006B82E9 /* MacBitmapComboBox.h */,
+				DD2F32F707F2A88B00645DDC /* MacSysMenu.cpp */,
+				DDA9D3BB09189A8C0060E7A7 /* Mac_GUI.cpp */,
+				DD2F32EF07F2A83E00645DDC /* MacSysMenu.h */,
+				DD40CDFE07F038990096C645 /* SystemMenu.m */,
+				DDA12AAD0A369C5800FBDD12 /* SecurityUtility.cpp */,
+				DD7748B40A356D6C0025D05E /* SetupSecurity.cpp */,
+				DDA12A910A369AB500FBDD12 /* SetupSecurity.h */,
+				DDAEC9E707FA58A000A7BC36 /* SetVersion.cpp */,
+			);
+			name = mac;
+			sourceTree = SOURCE_ROOT;
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		DDF9EC01144EB14B005D6144 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDF9EC0B144EB2BB005D6144 /* boinc_opencl.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		DD1277B2081F3D67007B5DE1 /* PostInstall */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD9E2371091CBDAE0048316E /* Build configuration list for PBXNativeTarget "PostInstall" */;
+			buildPhases = (
+				DD1277AF081F3D67007B5DE1 /* Resources */,
+				DD1277B0081F3D67007B5DE1 /* Sources */,
+				DD1277B1081F3D67007B5DE1 /* Frameworks */,
+				DD5FD59B0A0234400093C19F /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				DDAD19DF09090914004E7DD0 /* PBXTargetDependency */,
+			);
+			name = PostInstall;
+			productName = Installer;
+			productReference = DD1277B3081F3D67007B5DE1 /* PostInstall.app */;
+			productType = "com.apple.product-type.application";
+		};
+		DD1AFEA40A512D8700EE5B82 /* Install_BOINC */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD1AFEB50A512D8700EE5B82 /* Build configuration list for PBXNativeTarget "Install_BOINC" */;
+			buildPhases = (
+				DD1AFEA70A512D8700EE5B82 /* Resources */,
+				DD1AFEA90A512D8700EE5B82 /* Sources */,
+				DD1AFEAE0A512D8700EE5B82 /* Frameworks */,
+				DD1AFEB10A512D8700EE5B82 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				DD1AFEA50A512D8700EE5B82 /* PBXTargetDependency */,
+			);
+			name = Install_BOINC;
+			productName = Installer;
+			productReference = DD1AFEBA0A512D8700EE5B82 /* BOINC Installer.app */;
+			productType = "com.apple.product-type.application";
+		};
+		DD35353007E1E05C00C4718D /* api_libboinc */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD9E2359091CBDAE0048316E /* Build configuration list for PBXNativeTarget "api_libboinc" */;
+			buildPhases = (
+				DD35352E07E1E05C00C4718D /* Sources */,
+				DD35352F07E1E05C00C4718D /* Frameworks */,
+				DD5E20A8140CE842000FADAA /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = api_libboinc;
+			productName = api_libboinc;
+			productReference = DD35353107E1E05C00C4718D /* libboinc_api.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		DD3E14D30A774397007E0084 /* mgr_boinc */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD3E153D0A774397007E0084 /* Build configuration list for PBXNativeTarget "mgr_boinc" */;
+			buildPhases = (
+				DD3E14DA0A774397007E0084 /* Resources */,
+				DD3E14DE0A774397007E0084 /* Sources */,
+				DD3E15300A774397007E0084 /* Frameworks */,
+				DD3E15350A774397007E0084 /* CopyFiles */,
+				DD73550C0D91105F0006A9D1 /* ShellScript */,
+				DD3E15380A774397007E0084 /* ShellScript */,
+				DD3E15390A774397007E0084 /* ShellScript */,
+				DDEE5E8E0D9112AF0056A99E /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				DD3E14D40A774397007E0084 /* PBXTargetDependency */,
+				DD3E14D60A774397007E0084 /* PBXTargetDependency */,
+				DD3E14D80A774397007E0084 /* PBXTargetDependency */,
+			);
+			name = mgr_boinc;
+			productName = mgr_boinc;
+			productReference = DD3E15420A774397007E0084 /* BOINCManager.app */;
+			productType = "com.apple.product-type.application";
+		};
+		DD407A4907D2FB1200163EF5 /* libboinc */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD9E2351091CBDAE0048316E /* Build configuration list for PBXNativeTarget "libboinc" */;
+			buildPhases = (
+				DD407A4707D2FB1200163EF5 /* Sources */,
+				DD407A4807D2FB1200163EF5 /* Frameworks */,
+				DD3B67F6140CFFA20088683F /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = libboinc;
+			productName = libboinc;
+			productReference = DD407A4A07D2FB1200163EF5 /* libboinc.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		DD40CDF807F0386A0096C645 /* SystemMenu */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD9E2369091CBDAE0048316E /* Build configuration list for PBXNativeTarget "SystemMenu" */;
+			buildPhases = (
+				DD40CDF507F0386A0096C645 /* Resources */,
+				DD40CDF607F0386A0096C645 /* Sources */,
+				DD40CDF707F0386A0096C645 /* Frameworks */,
+				DD5FD5830A0232F30093C19F /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				DDAD19CD09090824004E7DD0 /* PBXTargetDependency */,
+			);
+			name = SystemMenu;
+			productName = SystemMenu;
+			productReference = DD40CDF907F0386A0096C645 /* SystemMenu.bundle */;
+			productType = "com.apple.product-type.bundle";
+		};
+		DD4688400C165F3C0089F500 /* Uninstaller */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD4688440C165F3C0089F500 /* Build configuration list for PBXNativeTarget "Uninstaller" */;
+			buildPhases = (
+				DD46883D0C165F3C0089F500 /* Resources */,
+				DD46883E0C165F3C0089F500 /* Sources */,
+				DD46883F0C165F3C0089F500 /* Frameworks */,
+				DD32CC900C27CFB90016F571 /* ShellScript */,
+				DDDC700C0C7A7D8B00179273 /* Rez */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = Uninstaller;
+			productName = Uninstaller;
+			productReference = DD4688410C165F3C0089F500 /* Uninstall BOINC.app */;
+			productType = "com.apple.product-type.application";
+		};
+		DD6381E90870DC9D007A2F8E /* MakeAppIcon_h */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD9E2379091CBDAE0048316E /* Build configuration list for PBXNativeTarget "MakeAppIcon_h" */;
+			buildPhases = (
+				DD6381E70870DC9D007A2F8E /* Sources */,
+				DD6381E80870DC9D007A2F8E /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = MakeAppIcon_h;
+			productName = MakeAppIcon_h;
+			productReference = DD6381EA0870DC9D007A2F8E /* MakeAppIcon_h */;
+			productType = "com.apple.product-type.tool";
+		};
+		DD69FEE708416C1300C01361 /* cmd_boinc */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD9E2375091CBDAE0048316E /* Build configuration list for PBXNativeTarget "cmd_boinc" */;
+			buildPhases = (
+				DD69FEE508416C1300C01361 /* Sources */,
+				DD69FEE608416C1300C01361 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				DD69FEFF08416D1000C01361 /* PBXTargetDependency */,
+			);
+			name = cmd_boinc;
+			productName = cmd_boinc;
+			productReference = DD69FEE808416C1300C01361 /* boinccmd */;
+			productType = "com.apple.product-type.tool";
+		};
+		DD7748970A356C880025D05E /* SetUpSecurity */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD7748A50A356CAE0025D05E /* Build configuration list for PBXNativeTarget "SetUpSecurity" */;
+			buildPhases = (
+				DD7748950A356C880025D05E /* Sources */,
+				DD7748960A356C880025D05E /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = SetUpSecurity;
+			productName = Security;
+			productReference = DD7748980A356C880025D05E /* SetUpSecurity */;
+			productType = "com.apple.product-type.tool";
+		};
+		DD81C799144D8DA9000BE61A /* jpeg */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD81C79B144D8DA9000BE61A /* Build configuration list for PBXNativeTarget "jpeg" */;
+			buildPhases = (
+				DD81C796144D8DA9000BE61A /* Sources */,
+				DD81C797144D8DA9000BE61A /* Frameworks */,
+				DD81C827144D90FC000BE61A /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = jpeg;
+			productName = libjpeg;
+			productReference = DD81C79A144D8DA9000BE61A /* libjpeg.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		DD89161C0F3B17E900DE5B1C /* ss_app */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD8916200F3B17E900DE5B1C /* Build configuration list for PBXNativeTarget "ss_app" */;
+			buildPhases = (
+				DD89161D0F3B17E900DE5B1C /* Sources */,
+				DD89161F0F3B17E900DE5B1C /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				DDD4D96515A6FE0000612460 /* PBXTargetDependency */,
+			);
+			name = ss_app;
+			productName = switcher;
+			productReference = DD8916280F3B17E900DE5B1C /* boincscr */;
+			productType = "com.apple.product-type.tool";
+		};
+		DD96AFF80811075000A06F22 /* ScreenSaver */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD9E2361091CBDAE0048316E /* Build configuration list for PBXNativeTarget "ScreenSaver" */;
+			buildPhases = (
+				DD96AFF50811075000A06F22 /* Resources */,
+				DD96AFF60811075000A06F22 /* Sources */,
+				DD96AFF70811075000A06F22 /* Frameworks */,
+				DD5FD5990A0233D60093C19F /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				DDAD19CF09090833004E7DD0 /* PBXTargetDependency */,
+				DDFA60DD0CB338940037B88C /* PBXTargetDependency */,
+			);
+			name = ScreenSaver;
+			productName = ScreenSaver;
+			productReference = DD96AFF90811075000A06F22 /* BOINCSaver.saver */;
+			productType = "com.apple.product-type.bundle";
+		};
+		DDAEC9E007FA583B00A7BC36 /* SetVersion */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD9E235D091CBDAE0048316E /* Build configuration list for PBXNativeTarget "SetVersion" */;
+			buildPhases = (
+				DDAEC9DE07FA583B00A7BC36 /* Sources */,
+				DDAEC9DF07FA583B00A7BC36 /* Frameworks */,
+				DDAD1A380909139E004E7DD0 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = SetVersion;
+			productName = SetVersion;
+			productReference = DDAEC9E107FA583B00A7BC36 /* SetVersion */;
+			productType = "com.apple.product-type.tool";
+		};
+		DDB219A310B3BB6100417AEF /* WaitPermissions */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DDB219AE10B3BB6200417AEF /* Build configuration list for PBXNativeTarget "WaitPermissions" */;
+			buildPhases = (
+				DDB219A010B3BB6100417AEF /* Resources */,
+				DDB219A110B3BB6100417AEF /* Sources */,
+				DDB219A210B3BB6100417AEF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = WaitPermissions;
+			productName = WaitPermissions;
+			productReference = DDB219A410B3BB6100417AEF /* WaitPermissions.app */;
+			productType = "com.apple.product-type.application";
+		};
+		DDB873E90C850BC800E0DE1F /* gfx2libboinc */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DDB873FC0C850BC800E0DE1F /* Build configuration list for PBXNativeTarget "gfx2libboinc" */;
+			buildPhases = (
+				DDB873EA0C850BC800E0DE1F /* Sources */,
+				DDB873F80C850BC800E0DE1F /* Frameworks */,
+				DD5E20A7140CE808000FADAA /* Run Script */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				DD81C824144D904D000BE61A /* PBXTargetDependency */,
+			);
+			name = gfx2libboinc;
+			productName = libboincgfx;
+			productReference = DDB874030C850BC800E0DE1F /* libboinc_graphics2.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		DDD0953E0A3EDD2500C95BA4 /* switcher */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DDD095410A3EDD4300C95BA4 /* Build configuration list for PBXNativeTarget "switcher" */;
+			buildPhases = (
+				DDD0953C0A3EDD2500C95BA4 /* Sources */,
+				DDD0953D0A3EDD2500C95BA4 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = switcher;
+			productName = switcher;
+			productReference = DDD0953F0A3EDD2500C95BA4 /* switcher */;
+			productType = "com.apple.product-type.tool";
+		};
+		DDD336F51062235D00867C7D /* AddRemoveUser */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DDD336FA1062235D00867C7D /* Build configuration list for PBXNativeTarget "AddRemoveUser" */;
+			buildPhases = (
+				DDD336F61062235D00867C7D /* Sources */,
+				DDD336F81062235D00867C7D /* Frameworks */,
+				DDD336F91062235D00867C7D /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = AddRemoveUser;
+			productName = SetVersion;
+			productReference = DDD337021062235D00867C7D /* AddRemoveUser */;
+			productType = "com.apple.product-type.tool";
+		};
+		DDD74D8607CF482E0065AC9D /* BOINC_Client */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DD9E2365091CBDAE0048316E /* Build configuration list for PBXNativeTarget "BOINC_Client" */;
+			buildPhases = (
+				DDD74D8407CF482E0065AC9D /* Sources */,
+				DDD74D8507CF482E0065AC9D /* Frameworks */,
+				DD7355180D9110AE0006A9D1 /* ShellScript */,
+				DD1B90070A954C9A00FF5591 /* ShellScript */,
+				DD73551E0D9111150006A9D1 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = BOINC_Client;
+			productName = BOINC_Client;
+			productReference = DDD74D8707CF482E0065AC9D /* boinc */;
+			productType = "com.apple.product-type.tool";
+		};
+		DDF9EC02144EB14B005D6144 /* boinc_opencl */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DDF9EC06144EB14B005D6144 /* Build configuration list for PBXNativeTarget "boinc_opencl" */;
+			buildPhases = (
+				DDF9EBFF144EB14B005D6144 /* Sources */,
+				DDF9EC00144EB14B005D6144 /* Frameworks */,
+				DDF9EC01144EB14B005D6144 /* Headers */,
+				DDF9EC07144EB255005D6144 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = boinc_opencl;
+			productName = boinc_opencl;
+			productReference = DDF9EC03144EB14B005D6144 /* libboinc_opencl.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		DDFA60C90CB337D40037B88C /* gfx_switcher */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DDFA60CD0CB337D40037B88C /* Build configuration list for PBXNativeTarget "gfx_switcher" */;
+			buildPhases = (
+				DDFA60CA0CB337D40037B88C /* Sources */,
+				DDFA60CC0CB337D40037B88C /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = gfx_switcher;
+			productName = switcher;
+			productReference = DDFA60D40CB337D40037B88C /* gfx_switcher */;
+			productType = "com.apple.product-type.tool";
+		};
+		DDFF2ACA0A53D4AE002BC19D /* setprojectgrp */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DDFF2ACE0A53D4AE002BC19D /* Build configuration list for PBXNativeTarget "setprojectgrp" */;
+			buildPhases = (
+				DDFF2ACB0A53D4AE002BC19D /* Sources */,
+				DDFF2ACD0A53D4AE002BC19D /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = setprojectgrp;
+			productName = switcher;
+			productReference = DDFF2AD30A53D4AE002BC19D /* setprojectgrp */;
+			productType = "com.apple.product-type.tool";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		20286C28FDCF999611CA2CEA /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0420;
+			};
+			buildConfigurationList = DD9E2381091CBDAE0048316E /* Build configuration list for PBXProject "boinc" */;
+			compatibilityVersion = "Xcode 3.0";
+			developmentRegion = English;
+			hasScannedForEncodings = 1;
+			knownRegions = (
+				English,
+				Japanese,
+				French,
+				German,
+			);
+			mainGroup = 20286C29FDCF999611CA2CEA /* «PROJECTNAME» */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				DDBD680D07FA82BB0082C20D /* Build_All */,
+				DDD74D8607CF482E0065AC9D /* BOINC_Client */,
+				DD69FEE708416C1300C01361 /* cmd_boinc */,
+				DD407A4907D2FB1200163EF5 /* libboinc */,
+				DDB873E90C850BC800E0DE1F /* gfx2libboinc */,
+				DD35353007E1E05C00C4718D /* api_libboinc */,
+				DD81C799144D8DA9000BE61A /* jpeg */,
+				DDF9EC02144EB14B005D6144 /* boinc_opencl */,
+				DD40CDF807F0386A0096C645 /* SystemMenu */,
+				DDAEC9E007FA583B00A7BC36 /* SetVersion */,
+				DD96AFF80811075000A06F22 /* ScreenSaver */,
+				DD1277B2081F3D67007B5DE1 /* PostInstall */,
+				DD6381E90870DC9D007A2F8E /* MakeAppIcon_h */,
+				DD7748970A356C880025D05E /* SetUpSecurity */,
+				DDD0953E0A3EDD2500C95BA4 /* switcher */,
+				DD1AFEA40A512D8700EE5B82 /* Install_BOINC */,
+				DDFF2ACA0A53D4AE002BC19D /* setprojectgrp */,
+				DD3E14D30A774397007E0084 /* mgr_boinc */,
+				DD4688400C165F3C0089F500 /* Uninstaller */,
+				DDFA60C90CB337D40037B88C /* gfx_switcher */,
+				DD89161C0F3B17E900DE5B1C /* ss_app */,
+				DDD336F51062235D00867C7D /* AddRemoveUser */,
+				DDB219A310B3BB6100417AEF /* WaitPermissions */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		DD1277AF081F3D67007B5DE1 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD1AFEA70A512D8700EE5B82 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD531BC60C193D3800742E50 /* MacInstaller.icns in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD3E14DA0A774397007E0084 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD3E14DB0A774397007E0084 /* boinc in Resources */,
+				DD3E14DC0A774397007E0084 /* BOINCMgr.icns in Resources */,
+				DD3E14DD0A774397007E0084 /* InfoPlist.strings in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD40CDF507F0386A0096C645 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD46883D0C165F3C0089F500 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD531BC80C193D5200742E50 /* MacUninstaller.icns in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD96AFF50811075000A06F22 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDFA60E20CB3391C0037B88C /* gfx_switcher in Resources */,
+				DD0C5A8B0816711400CEC5D7 /* boinc.jpg in Resources */,
+				DD48091F081A66F100A174AA /* BOINCSaver.nib in Resources */,
+				DDBC6CA50D5D458700564C49 /* boinc_ss_logo.png in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDB219A010B3BB6100417AEF /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXRezBuildPhase section */
+		DDDC700C0C7A7D8B00179273 /* Rez */ = {
+			isa = PBXRezBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD5D7EBB0FE320F600ACF87B /* Uninstaller.r in Rez */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXRezBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		DD1AFEB10A512D8700EE5B82 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${SRCROOT}/English.lproj/Installer-InfoPlist.strings",
+			);
+			outputPaths = (
+				"${BUILT_PRODUCTS_DIR}/BOINC Installer.app/Contents/Resources/English.lproj/InfoPlist.strings",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/BOINC Installer.app/Contents/Resources/English.lproj\"\ncp -fpv \"${SRCROOT}/English.lproj/Installer-InfoPlist.strings\" \"${BUILT_PRODUCTS_DIR}/BOINC Installer.app/Contents/Resources/English.lproj/InfoPlist.strings\"";
+		};
+		DD1B90070A954C9A00FF5591 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "chown -R ${USER}:${GROUP} \"${BUILT_PRODUCTS_DIR}/boinc\"\nchmod u+s,g+s \"${BUILT_PRODUCTS_DIR}/boinc\"\n";
+		};
+		DD32CC900C27CFB90016F571 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${SRCROOT}/English.lproj/Uninstaller-InfoPlist.strings",
+			);
+			outputPaths = (
+				"${BUILT_PRODUCTS_DIR}/Uninstall BOINC.app/Contents/Resources/English.lproj/InfoPlist.string",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/Uninstall BOINC.app/Contents/Resources/English.lproj/\"\ncp -fpRv \"${SRCROOT}/English.lproj/Uninstaller-InfoPlist.strings\" \"${BUILT_PRODUCTS_DIR}/Uninstall BOINC.app/Contents/Resources/English.lproj/InfoPlist.strings\"";
+		};
+		DD3B67F6140CFFA20088683F /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "## echo \"BuiltProductsDir = ${BUILT_PRODUCTS_DIR}\"\n# echo \"SRC ROOT = ${SRCROOT}\"\n# echo \"CONFIGURATION = ${CONFIGURATION}\"\n# echo \"PRODUCT_NAME = ${PRODUCT_NAME}\"\nmkdir -p \"${SRCROOT}/build/${CONFIGURATION}\"\nif [ \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" -nt \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\" ]; then\n    cp -fp \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n    if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n        strip -S \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n    fi\nfi\n";
+		};
+		DD3E15380A774397007E0084 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${SRCROOT}/Info.plist",
+			);
+			outputPaths = (
+				"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/Info.plist",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "cp -fpv \"${SRCROOT}/Info.plist\" \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/Info.plist\"";
+		};
+		DD3E15390A774397007E0084 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "chown -R ${USER}:${GROUP} \"${BUILT_PRODUCTS_DIR}/BOINCManager.app\"\nchmod g+s \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\"\nchmod u+s,g+s \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/Resources/boinc\"\n";
+		};
+		DD5E20A7140CE808000FADAA /* Run Script */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Run Script";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "# echo \"BuiltProductsDir = ${BUILT_PRODUCTS_DIR}\"\n# echo \"SRC ROOT = ${SRCROOT}\"\n# echo \"CONFIGURATION = ${CONFIGURATION}\"\n# echo \"PRODUCT_NAME = ${PRODUCT_NAME}\"\nmkdir -p \"${SRCROOT}/build/${CONFIGURATION}\"\nif [ \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" -nt \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\" ]; then\n    cp -fp \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n    if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n        strip -S \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n    fi\nfi";
+		};
+		DD5E20A8140CE842000FADAA /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "# echo \"BuiltProductsDir = ${BUILT_PRODUCTS_DIR}\"\n# echo \"SRC ROOT = ${SRCROOT}\"\n# echo \"CONFIGURATION = ${CONFIGURATION}\"\n# echo \"PRODUCT_NAME = ${PRODUCT_NAME}\"\nmkdir -p \"${SRCROOT}/build/${CONFIGURATION}\"\nif [ \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" -nt \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\" ]; then\n    cp -fp \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n    if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n        strip -S \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n    fi\nfi";
+		};
+		DD5FD5830A0232F30093C19F /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${SRCROOT}/SystemMenu-Info.plist",
+			);
+			outputPaths = (
+				"${BUILT_PRODUCTS_DIR}/SystemMenu.bundle/Contents/Info.plist",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "cp -fpv \"${SRCROOT}/SystemMenu-Info.plist\" \"${BUILT_PRODUCTS_DIR}/SystemMenu.bundle/Contents/Info.plist\"";
+		};
+		DD5FD5990A0233D60093C19F /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${SRCROOT}/English.lproj/ScreenSaver-InfoPlist.strings",
+			);
+			outputPaths = (
+				"${BUILT_PRODUCTS_DIR}/BOINCSaver.saver/Contents/Resources/English.lproj/InfoPlist.strings",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/BOINCSaver.saver/Contents/Resources/English.lproj\"\ncp -fpv \"${SRCROOT}/English.lproj/ScreenSaver-InfoPlist.strings\" \"${BUILT_PRODUCTS_DIR}/BOINCSaver.saver/Contents/Resources/English.lproj/InfoPlist.strings\"";
+		};
+		DD5FD59B0A0234400093C19F /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${SRCROOT}/English.lproj/PostInstall-InfoPlist.strings",
+			);
+			outputPaths = (
+				"${BUILT_PRODUCTS_DIR}/Postinstall.app/Contents/Resources/English.lproj/InfoPlist.strings",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/Postinstall.app/Contents/Resources/English.lproj\"\ncp -fpv \"${SRCROOT}/English.lproj/PostInstall-InfoPlist.strings\" \"${BUILT_PRODUCTS_DIR}/Postinstall.app/Contents/Resources/English.lproj/InfoPlist.strings\"";
+		};
+		DD73550C0D91105F0006A9D1 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager",
+			);
+			outputPaths = (
+				"${BUILT_PRODUCTS_DIR}/SymbolTables/sgBOINCManager_i386",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n  ## echo \"Starting script 1\"\n  echo ${BUILT_PRODUCTS_DIR}  > \"${PROJECT_DIR}/Build_Deployment_Dir\"\n  mkdir -p \"${BUILT_PRODUCTS_DIR}/SymbolTables\"\n  if [ \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\" -nt \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_i386\" ]; then\n    ## echo \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager is newer than ${TARGET_BUILD_DIR}/SymbolTables/BOINCManager_i386\"\n    rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_i386\"\n    rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_ppc\"\n    cp -fp \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\" \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_i386\"\n    touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_i386\"\n    strip \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\"\n  fi\nelse\n  echo ${BUILT_PRODUCTS_DIR}  > \"${PROJECT_DIR}/Build_Development_Dir\"\nfi\n";
+		};
+		DD7355180D9110AE0006A9D1 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${BUILT_PRODUCTS_DIR}/$PRODUCT_NAME",
+			);
+			outputPaths = (
+				"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n  ## echo \"Starting script 1\"\n  echo ${BUILT_PRODUCTS_DIR}  > \"${PROJECT_DIR}/Build_Deployment_Dir\"\nmkdir -p \"${BUILT_PRODUCTS_DIR}/SymbolTables\"\n  if [ \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" -nt \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386\" ]; then\n    ## echo \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME} is newer than ${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386\"\n    rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386\"\n    rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_ppc\"\n    cp -fp \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386\"\n    touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386\"\n    strip \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\"\n  fi\nelse\n  echo ${BUILT_PRODUCTS_DIR}  > \"${PROJECT_DIR}/Build_Development_Dir\"\n\nfi";
+		};
+		DD73551E0D9111150006A9D1 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${BUILT_PRODUCTS_DIR}/$PRODUCT_NAME",
+			);
+			outputPaths = (
+				"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n  touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386\"\nfi";
+		};
+		DD81C827144D90FC000BE61A /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "## echo \"BuiltProductsDir = ${BUILT_PRODUCTS_DIR}\"\n# echo \"SRC ROOT = ${SRCROOT}\"\n# echo \"CONFIGURATION = ${CONFIGURATION}\"\n# echo \"PRODUCT_NAME = ${PRODUCT_NAME}\"\nmkdir -p \"${SRCROOT}/build/${CONFIGURATION}\"\nif [ \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" -nt \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\" ]; then\n    cp -fp \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n    if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n        strip -S \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n    fi\nfi\n";
+		};
+		DDAD1A380909139E004E7DD0 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"$(SRCROOT)/../client/version.h",
+			);
+			outputPaths = (
+				"$(SRCROOT)/English.lproj/InfoPlist.strings",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "# echo \"BuiltProductsDir = ${BUILT_PRODUCTS_DIR}\"\n# echo \"CONFIGURATIONTEMPDIR = ${CONFIGURATION_TEMP_DIR}\"\n# echo \"SRC ROOT = ${SRCROOT}\"\n# echo \"architecture = ${ARCHS}\"\n# echo \"native architecture = ${ARCHS}\"\n\"${BUILT_PRODUCTS_DIR}/SetVersion\"\n";
+		};
+		DDD336F91062235D00867C7D /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"$(SRCROOT)/../client/version.h",
+			);
+			outputPaths = (
+				"$(SRCROOT)/English.lproj/InfoPlist.strings",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "# echo \"BuiltProductsDir = ${BUILT_PRODUCTS_DIR}\"\n# echo \"CONFIGURATIONTEMPDIR = ${CONFIGURATION_TEMP_DIR}\"\n# echo \"SRC ROOT = ${SRCROOT}\"\n# echo \"architecture = ${ARCHS}\"\n# echo \"native architecture = ${ARCHS}\"\n\"${BUILT_PRODUCTS_DIR}/SetVersion\"\n";
+		};
+		DDEE5E8E0D9112AF0056A99E /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${BUILT_PRODUCTS_DIR}/$PRODUCT_NAME",
+			);
+			outputPaths = (
+				"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n\ttouch \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_i386\"\nfi";
+		};
+		DDF9EC07144EB255005D6144 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "## echo \"BuiltProductsDir = ${BUILT_PRODUCTS_DIR}\"\n# echo \"SRC ROOT = ${SRCROOT}\"\n# echo \"CONFIGURATION = ${CONFIGURATION}\"\n# echo \"PRODUCT_NAME = ${PRODUCT_NAME}\"\nmkdir -p \"${SRCROOT}/build/${CONFIGURATION}\"\nif [ \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" -nt \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\" ]; then\n    cp -fp \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n    if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n        strip -S \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n    fi\nfi\n";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		DD1277B0081F3D67007B5DE1 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD1277C4081F3E73007B5DE1 /* PostInstall.cpp in Sources */,
+				DDA12AA20A369B5500FBDD12 /* SetupSecurity.cpp in Sources */,
+				DD51DC8F0A4943A300BD24E6 /* check_security.cpp in Sources */,
+				DD2FE5CB142DE94700A1E6F3 /* LoginItemAPI.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD1AFEA90A512D8700EE5B82 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD1AFEAC0A512D8700EE5B82 /* SetupSecurity.cpp in Sources */,
+				DD1AFEAD0A512D8700EE5B82 /* check_security.cpp in Sources */,
+				DD1AFEE80A51301C00EE5B82 /* Installer.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD35352E07E1E05C00C4718D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD35353607E1E13F00C4718D /* boinc_api.cpp in Sources */,
+				DDE41C260C1FCA8F00CA1F86 /* graphics2_util.cpp in Sources */,
+				DDA45501140F7E7900D97676 /* reduce_main.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD3E14DE0A774397007E0084 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD3E14DF0A774397007E0084 /* AccountInfoPage.cpp in Sources */,
+				DD3E14E10A774397007E0084 /* AccountManagerInfoPage.cpp in Sources */,
+				DD3E14E20A774397007E0084 /* AccountManagerProcessingPage.cpp in Sources */,
+				DD3E14E30A774397007E0084 /* AccountManagerPropertiesPage.cpp in Sources */,
+				DD3E14E50A774397007E0084 /* AlreadyExistsPage.cpp in Sources */,
+				DD3E14E60A774397007E0084 /* BOINCBaseView.cpp in Sources */,
+				DD3E14E70A774397007E0084 /* BOINCBaseWizard.cpp in Sources */,
+				DD3E14E80A774397007E0084 /* BOINCGUIApp.cpp in Sources */,
+				DD3E14E90A774397007E0084 /* BOINCListCtrl.cpp in Sources */,
+				DD3E14EA0A774397007E0084 /* BOINCTaskBar.cpp in Sources */,
+				DD3E14EB0A774397007E0084 /* BOINCTaskCtrl.cpp in Sources */,
+				DD3E14EC0A774397007E0084 /* CompletionErrorPage.cpp in Sources */,
+				DD3E14ED0A774397007E0084 /* CompletionPage.cpp in Sources */,
+				DD3E14EE0A774397007E0084 /* diagnostics.cpp in Sources */,
+				DD3E14EF0A774397007E0084 /* DlgAbout.cpp in Sources */,
+				DD3E14F00A774397007E0084 /* DlgGenericMessage.cpp in Sources */,
+				DD3E14F10A774397007E0084 /* DlgOptions.cpp in Sources */,
+				DD3E14F20A774397007E0084 /* DlgSelectComputer.cpp in Sources */,
+				DD3E14F30A774397007E0084 /* filesys.cpp in Sources */,
+				DD3E14F40A774397007E0084 /* gui_rpc_client.cpp in Sources */,
+				DD3E14F50A774397007E0084 /* gui_rpc_client_ops.cpp in Sources */,
+				DD3E14F60A774397007E0084 /* gui_rpc_client_print.cpp in Sources */,
+				DD3E14F70A774397007E0084 /* hostinfo.cpp in Sources */,
+				DD3E14FB0A774397007E0084 /* MacSysMenu.cpp in Sources */,
+				DD3E14FD0A774397007E0084 /* Mac_GUI.cpp in Sources */,
+				DD3E14FE0A774397007E0084 /* MainDocument.cpp in Sources */,
+				DD3E14FF0A774397007E0084 /* md5.c in Sources */,
+				DD3E15000A774397007E0084 /* md5_file.cpp in Sources */,
+				DD3E15010A774397007E0084 /* mfile.cpp in Sources */,
+				DD3E15020A774397007E0084 /* miofile.cpp in Sources */,
+				DD3E15050A774397007E0084 /* network.cpp in Sources */,
+				DD3E15060A774397007E0084 /* NoInternetConnectionPage.cpp in Sources */,
+				DD3E15070A774397007E0084 /* NotDetectedPage.cpp in Sources */,
+				DD3E15080A774397007E0084 /* NotFoundPage.cpp in Sources */,
+				DD3E15090A774397007E0084 /* parse.cpp in Sources */,
+				DD3E150A0A774397007E0084 /* prefs.cpp in Sources */,
+				DD3E150B0A774397007E0084 /* ProjectInfoPage.cpp in Sources */,
+				DD3E150C0A774397007E0084 /* ProjectProcessingPage.cpp in Sources */,
+				DD3E150D0A774397007E0084 /* ProjectPropertiesPage.cpp in Sources */,
+				DD3E150E0A774397007E0084 /* ProxyInfoPage.cpp in Sources */,
+				DD3E150F0A774397007E0084 /* ProxyPage.cpp in Sources */,
+				DD3E15100A774397007E0084 /* stdwx.cpp in Sources */,
+				DD3E15110A774397007E0084 /* util.cpp in Sources */,
+				DD3E15120A774397007E0084 /* ValidateAccountKey.cpp in Sources */,
+				DD3E15130A774397007E0084 /* ValidateEmailAddress.cpp in Sources */,
+				DD3E15140A774397007E0084 /* ValidateURL.cpp in Sources */,
+				DD3E151A0A774397007E0084 /* ViewStatistics.cpp in Sources */,
+				DD3E151B0A774397007E0084 /* UnavailablePage.cpp in Sources */,
+				DD3E151C0A774397007E0084 /* WelcomePage.cpp in Sources */,
+				DD3E151F0A774397007E0084 /* wizardex.cpp in Sources */,
+				DD3E15200A774397007E0084 /* BOINCDialupManager.cpp in Sources */,
+				DD3E15210A774397007E0084 /* check_security.cpp in Sources */,
+				DD3E15220A774397007E0084 /* SetupSecurity.cpp in Sources */,
+				DD3E15230A774397007E0084 /* AdvancedFrame.cpp in Sources */,
+				DD3E15240A774397007E0084 /* BOINCBaseFrame.cpp in Sources */,
+				DD3E15260A774397007E0084 /* sg_DlgPreferences.cpp in Sources */,
+				DD3E152D0A774397007E0084 /* app_ipc.cpp in Sources */,
+				DD3E152E0A774397007E0084 /* proxy_info.cpp in Sources */,
+				DD67F8140ADB9DD000B0015E /* wxPieCtrl.cpp in Sources */,
+				DD247AF90AEA308A0034104A /* SkinManager.cpp in Sources */,
+				DDFE84E50B60CD66009B43D9 /* DlgAdvPreferences.cpp in Sources */,
+				DDFE84E70B60CD66009B43D9 /* DlgAdvPreferencesBase.cpp in Sources */,
+				DD7DD79B0B8BFA4000B11279 /* ViewResources.cpp in Sources */,
+				DD7BF7E60B8E7B6C00A009F7 /* str_util.cpp in Sources */,
+				DD205A1A0BAF596E0008D473 /* ProjectListCtrl.cpp in Sources */,
+				DD4E704C0BCDAC360010A522 /* browser.cpp in Sources */,
+				DDA6BD210BD4551F008F7921 /* mac_backtrace.cpp in Sources */,
+				DDA6BD230BD4551F008F7921 /* QBacktrace.c in Sources */,
+				DDA6BD250BD4551F008F7921 /* QCrashReport.c in Sources */,
+				DDA6BD270BD4551F008F7921 /* QMachOImage.c in Sources */,
+				DDA6BD290BD4551F008F7921 /* QMachOImageList.c in Sources */,
+				DDA6BD2B0BD4551F008F7921 /* QSymbols.c in Sources */,
+				DDA6BD2D0BD4551F008F7921 /* QTaskMemory.c in Sources */,
+				DD6ABCD10BD4C5CA009AA7A1 /* browser_safari.mm in Sources */,
+				DDD52DCA0C03CAE6009B5FC0 /* ViewProjects.cpp in Sources */,
+				DDD52DCC0C03CAE6009B5FC0 /* ViewTransfers.cpp in Sources */,
+				DDD52DCE0C03CAE6009B5FC0 /* ViewWork.cpp in Sources */,
+				DDC3D55E0D507D1700BE6D23 /* BOINCClientManager.cpp in Sources */,
+				DDCF84080E1B7C0A005EDC45 /* DlgItemProperties.cpp in Sources */,
+				DDC132F30E2DAB1B0014D305 /* AsyncRPC.cpp in Sources */,
+				DDDE43B10EC04C1800083520 /* DlgExitMessage.cpp in Sources */,
+				DDC836E60EDEA5DB001C2EF9 /* TermsOfUsePage.cpp in Sources */,
+				DDA0C8350FE1D704001E02E6 /* procinfo_mac.cpp in Sources */,
+				DDA99BF41099AF18002F8E9B /* MacAccessiblity.cpp in Sources */,
+				DDC06ABC10A3E98D00C8D9A5 /* url.cpp in Sources */,
+				DDD9C5A510CCF61F00A1E4CD /* coproc.cpp in Sources */,
+				DDE1373D10DC60BB00161D6B /* ViewNotices.cpp in Sources */,
+				DDE1374210DC60E200161D6B /* DlgEventLog.cpp in Sources */,
+				DDE1374910DC613600161D6B /* DlgEventLogListCtrl.cpp in Sources */,
+				DD867B7510DCE77700128AB4 /* notice.cpp in Sources */,
+				DDBB7E7611D2BCD400598DC1 /* NoticeListCtrl.cpp in Sources */,
+				DD0A87FF11D950E00067C1F2 /* BOINCInternetFSHandler.cpp in Sources */,
+				DDA850A41207EED900B473A6 /* WizardAttach.cpp in Sources */,
+				DD4FA25D121828E400154856 /* BOINCHtmlLBox.cpp in Sources */,
+				DD4FA2621218290600154856 /* BOINCVListBox.cpp in Sources */,
+				DDD0697312D70C9400120920 /* sg_TaskPanel.cpp in Sources */,
+				DDC321AE12E45162006CB55F /* sg_PanelBase.cpp in Sources */,
+				DDDD6D8012E4611300C258A0 /* sg_ProjectPanel.cpp in Sources */,
+				DD7A5D8312EEBE5E0006268E /* sg_TaskCommandPopup.cpp in Sources */,
+				DD7A5D9F12EEBFC20006268E /* sg_ProjectWebSitesPopup.cpp in Sources */,
+				DD7A5DAB12EEC37B0006268E /* sg_ProjectCommandPopup.cpp in Sources */,
+				DD77A71812F2D1C9006B82E9 /* MacBitmapComboBox.cpp in Sources */,
+				DDAEB54012F8295800EDEDBE /* LogBOINC.cpp in Sources */,
+				DD2B6C8013149177005D6F3E /* procinfo.cpp in Sources */,
+				DD80632D131FAA4100DC8971 /* sg_BoincSimpleFrame.cpp in Sources */,
+				DD806336131FAD9A00DC8971 /* sg_CustomControls.cpp in Sources */,
+				DD806339131FADE700DC8971 /* sg_DlgMessages.cpp in Sources */,
+				DD262C781366D2A200C9A187 /* cc_config.cpp in Sources */,
+				DDA26C5E13977E1500DFDFE1 /* sqlite3.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD407A4707D2FB1200163EF5 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD407A4D07D2FB6500163EF5 /* app_ipc.cpp in Sources */,
+				DD407A4F07D2FB7100163EF5 /* base64.cpp in Sources */,
+				DD4AE05013652C1300285859 /* cc_config.cpp in Sources */,
+				DD7475510D86273300860636 /* coproc.cpp in Sources */,
+				DD407A5307D2FB7C00163EF5 /* diagnostics.cpp in Sources */,
+				DD407A5507D2FB8400163EF5 /* filesys.cpp in Sources */,
+				DD52C81108B5D44D008D9AA4 /* gui_rpc_client.cpp in Sources */,
+				DD52C81208B5D44E008D9AA4 /* gui_rpc_client_ops.cpp in Sources */,
+				DD52C81308B5D44F008D9AA4 /* gui_rpc_client_print.cpp in Sources */,
+				DD407A5807D2FB8D00163EF5 /* hostinfo.cpp in Sources */,
+				DDAD31D80EC26B14002DA09D /* mac_address.cpp in Sources */,
+				DD407A5B07D2FBA000163EF5 /* md5.c in Sources */,
+				DD407A5D07D2FBA300163EF5 /* md5_file.cpp in Sources */,
+				DD407ABB07D2FC7D00163EF5 /* mem_usage.cpp in Sources */,
+				DD407A5F07D2FBAE00163EF5 /* mfile.cpp in Sources */,
+				DD407A6207D2FBB300163EF5 /* miofile.cpp in Sources */,
+				DD407A6307D2FBB600163EF5 /* msg_log.cpp in Sources */,
+				DD52C81408B5D484008D9AA4 /* network.cpp in Sources */,
+				DDE1372F10DC5E8D00161D6B /* notice.cpp in Sources */,
+				DD407A6507D2FBBA00163EF5 /* parse.cpp in Sources */,
+				DD407A6707D2FBBD00163EF5 /* prefs.cpp in Sources */,
+				DD2B6C8E131491B8005D6F3E /* procinfo.cpp in Sources */,
+				DD2B6C8D131491B7005D6F3E /* procinfo_mac.cpp in Sources */,
+				DD407A6907D2FBC200163EF5 /* proxy_info.cpp in Sources */,
+				DD407A6B07D2FBC700163EF5 /* shmem.cpp in Sources */,
+				DD4329910BA63DEC007CDF2A /* str_util.cpp in Sources */,
+				DDA45500140F7DE200D97676 /* synch.cpp in Sources */,
+				DDC06AB410A3E93F00C8D9A5 /* url.cpp in Sources */,
+				DD407A6D07D2FBD100163EF5 /* util.cpp in Sources */,
+				DDA6BD190BD4551F008F7921 /* mac_backtrace.cpp in Sources */,
+				DDA6BD1A0BD4551F008F7921 /* QBacktrace.c in Sources */,
+				DDA6BD1B0BD4551F008F7921 /* QCrashReport.c in Sources */,
+				DDA6BD1C0BD4551F008F7921 /* QMachOImage.c in Sources */,
+				DDA6BD1D0BD4551F008F7921 /* QMachOImageList.c in Sources */,
+				DDA6BD1E0BD4551F008F7921 /* QSymbols.c in Sources */,
+				DDA6BD1F0BD4551F008F7921 /* QTaskMemory.c in Sources */,
+				DDB4A91F1411840800032E5D /* proc_control.cpp in Sources */,
+				DD5A3F17142877A5008148CA /* thread.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD40CDF607F0386A0096C645 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDD7EF4707F0526E00BA3B90 /* SystemMenu.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD46883E0C165F3C0089F500 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD2FE5C9142DE75A00A1E6F3 /* LoginItemAPI.c in Sources */,
+				DD46885A0C1661970089F500 /* uninstall.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD6381E70870DC9D007A2F8E /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD6381F90870DD83007A2F8E /* make_app_icon_h.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD69FEE508416C1300C01361 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD69FEF708416C9A00C01361 /* boinc_cmd.cpp in Sources */,
+				DD69FEF508416C6B00C01361 /* gui_rpc_client.cpp in Sources */,
+				DD4EC65A08A0A7AF009AA08F /* gui_rpc_client_ops.cpp in Sources */,
+				DD4EC65B08A0A83F009AA08F /* gui_rpc_client_print.cpp in Sources */,
+				DD69FF0C084171CF00C01361 /* network.cpp in Sources */,
+				DD7BF7E10B8E7B3700A009F7 /* str_util.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD7748950A356C880025D05E /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD7748B50A356D6C0025D05E /* SetupSecurity.cpp in Sources */,
+				DDA12AAE0A369C5800FBDD12 /* SecurityUtility.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD81C796144D8DA9000BE61A /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD81C7E3144D900B000BE61A /* jcapimin.c in Sources */,
+				DD81C7E4144D900B000BE61A /* jcapistd.c in Sources */,
+				DD81C7E5144D900B000BE61A /* jccoefct.c in Sources */,
+				DD81C7E6144D900B000BE61A /* jccolor.c in Sources */,
+				DD81C7E7144D900B000BE61A /* jcdctmgr.c in Sources */,
+				DD81C7E8144D900B000BE61A /* jchuff.c in Sources */,
+				DD81C7EA144D900B000BE61A /* jcinit.c in Sources */,
+				DD81C7EB144D900B000BE61A /* jcmainct.c in Sources */,
+				DD81C7EC144D900B000BE61A /* jcmarker.c in Sources */,
+				DD81C7ED144D900B000BE61A /* jcmaster.c in Sources */,
+				DD81C7EE144D900B000BE61A /* jcomapi.c in Sources */,
+				DD81C7F0144D900B000BE61A /* jcparam.c in Sources */,
+				DD81C7F1144D900B000BE61A /* jcphuff.c in Sources */,
+				DD81C7F2144D900B000BE61A /* jcprepct.c in Sources */,
+				DD81C7F3144D900B000BE61A /* jcsample.c in Sources */,
+				DD81C7F4144D900B000BE61A /* jctrans.c in Sources */,
+				DD81C7F5144D900B000BE61A /* jdapimin.c in Sources */,
+				DD81C7F6144D900B000BE61A /* jdapistd.c in Sources */,
+				DD81C7F7144D900B000BE61A /* jdatadst.c in Sources */,
+				DD81C7F8144D900B000BE61A /* jdatasrc.c in Sources */,
+				DD81C7F9144D900B000BE61A /* jdcoefct.c in Sources */,
+				DD81C7FA144D900B000BE61A /* jdcolor.c in Sources */,
+				DD81C7FC144D900B000BE61A /* jddctmgr.c in Sources */,
+				DD81C7FD144D900B000BE61A /* jdhuff.c in Sources */,
+				DD81C7FF144D900B000BE61A /* jdinput.c in Sources */,
+				DD81C800144D900B000BE61A /* jdmainct.c in Sources */,
+				DD81C801144D900B000BE61A /* jdmarker.c in Sources */,
+				DD81C802144D900B000BE61A /* jdmaster.c in Sources */,
+				DD81C803144D900B000BE61A /* jdmerge.c in Sources */,
+				DD81C804144D900B000BE61A /* jdphuff.c in Sources */,
+				DD81C805144D900B000BE61A /* jdpostct.c in Sources */,
+				DD81C806144D900B000BE61A /* jdsample.c in Sources */,
+				DD81C807144D900B000BE61A /* jdtrans.c in Sources */,
+				DD81C808144D900B000BE61A /* jerror.c in Sources */,
+				DD81C80A144D900B000BE61A /* jfdctflt.c in Sources */,
+				DD81C80B144D900B000BE61A /* jfdctfst.c in Sources */,
+				DD81C80C144D900B000BE61A /* jfdctint.c in Sources */,
+				DD81C80D144D900B000BE61A /* jidctflt.c in Sources */,
+				DD81C80E144D900B000BE61A /* jidctfst.c in Sources */,
+				DD81C80F144D900B000BE61A /* jidctint.c in Sources */,
+				DD81C810144D900B000BE61A /* jidctred.c in Sources */,
+				DD81C812144D900B000BE61A /* jmemmgr.c in Sources */,
+				DD81C813144D900B000BE61A /* jmemnobs.c in Sources */,
+				DD81C818144D900B000BE61A /* jquant1.c in Sources */,
+				DD81C819144D900B000BE61A /* jquant2.c in Sources */,
+				DD81C81A144D900B000BE61A /* jutils.c in Sources */,
+				DD81C81C144D900B000BE61A /* rdbmp.c in Sources */,
+				DD81C81D144D900B000BE61A /* rdcolmap.c in Sources */,
+				DD81C81E144D900B000BE61A /* rdgif.c in Sources */,
+				DD81C81F144D900B000BE61A /* rdppm.c in Sources */,
+				DD81C820144D900B000BE61A /* rdrle.c in Sources */,
+				DD81C821144D900B000BE61A /* rdswitch.c in Sources */,
+				DD81C822144D900B000BE61A /* rdtarga.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD89161D0F3B17E900DE5B1C /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DD89163D0F3B182700DE5B1C /* ss_app.cpp in Sources */,
+				DD8916950F3B1BFF00DE5B1C /* mac_backtrace.cpp in Sources */,
+				DD8916960F3B1C0000DE5B1C /* QBacktrace.c in Sources */,
+				DD8916970F3B1C0100DE5B1C /* QCrashReport.c in Sources */,
+				DD8916980F3B1C0200DE5B1C /* QMachOImage.c in Sources */,
+				DD89169A0F3B1C0600DE5B1C /* QMachOImageList.c in Sources */,
+				DD89169B0F3B1C0700DE5B1C /* QSymbols.c in Sources */,
+				DD89169C0F3B1C0900DE5B1C /* QTaskMemory.c in Sources */,
+				DD89179B0F3B206600DE5B1C /* app_ipc.cpp in Sources */,
+				DD8917A30F3B207800DE5B1C /* diagnostics.cpp in Sources */,
+				DD8917A50F3B207E00DE5B1C /* filesys.cpp in Sources */,
+				DD8917A70F3B208500DE5B1C /* gui_rpc_client.cpp in Sources */,
+				DD8917AB0F3B209500DE5B1C /* hostinfo.cpp in Sources */,
+				DD8917AE0F3B20B100DE5B1C /* md5.c in Sources */,
+				DD8917B00F3B20B500DE5B1C /* md5_file.cpp in Sources */,
+				DD8917B80F3B20C600DE5B1C /* mfile.cpp in Sources */,
+				DD8917BA0F3B20CC00DE5B1C /* miofile.cpp in Sources */,
+				DD8917BF0F3B20D900DE5B1C /* network.cpp in Sources */,
+				DD8917C50F3B210B00DE5B1C /* parse.cpp in Sources */,
+				DD8917C70F3B211100DE5B1C /* prefs.cpp in Sources */,
+				DD8917D00F3B212300DE5B1C /* proxy_info.cpp in Sources */,
+				DD8917D20F3B212900DE5B1C /* shmem.cpp in Sources */,
+				DD8917D80F3B213000DE5B1C /* str_util.cpp in Sources */,
+				DD8917DD0F3B213D00DE5B1C /* util.cpp in Sources */,
+				DD8917DF0F3B214300DE5B1C /* boinc_api.cpp in Sources */,
+				DD8917E10F3B214A00DE5B1C /* graphics2_util.cpp in Sources */,
+				DD8917E30F3B214F00DE5B1C /* graphics2_unix.cpp in Sources */,
+				DD8917E50F3B215400DE5B1C /* graphics2.cpp in Sources */,
+				DD8917E70F3B215B00DE5B1C /* gutil_text.cpp in Sources */,
+				DD8917E90F3B216000DE5B1C /* gutil.cpp in Sources */,
+				DD8917EE0F3B21CE00DE5B1C /* macglutfix.m in Sources */,
+				DD8917F00F3B21DA00DE5B1C /* mac_icon.cpp in Sources */,
+				DDC988FE0F3BD44100EE8D0E /* gui_rpc_client_ops.cpp in Sources */,
+				DDFE4E9110AB7C3A00919319 /* url.cpp in Sources */,
+				DDD9C5AB10CCF6A300A1E4CD /* coproc.cpp in Sources */,
+				DDF5F85A10DD05DB006A50CD /* notice.cpp in Sources */,
+				DDC55A6D136013D000D79903 /* procinfo.cpp in Sources */,
+				DDC55A70136013F800D79903 /* procinfo_mac.cpp in Sources */,
+				DD262C811366D35A00C9A187 /* cc_config.cpp in Sources */,
+				DDB4A9201411871200032E5D /* proc_control.cpp in Sources */,
+				DDE7A3B115C6739E002B3B96 /* ttfont.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DD96AFF60811075000A06F22 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDFD5F0F0818F2EE002B23D4 /* gui_rpc_client.cpp in Sources */,
+				DD73E3B608A07FC600656EB1 /* gui_rpc_client_ops.cpp in Sources */,
+				DDFD5F270818F329002B23D4 /* filesys.cpp in Sources */,
+				DD73E3A708A07CA600656EB1 /* hostinfo.cpp in Sources */,
+				DDFD5F280818F33C002B23D4 /* md5.c in Sources */,
+				DDFD5F290818F346002B23D4 /* md5_file.cpp in Sources */,
+				DDFD5F2A0818F34F002B23D4 /* mfile.cpp in Sources */,
+				DDFD5F2B0818F359002B23D4 /* miofile.cpp in Sources */,
+				DDFD5F2C0818F368002B23D4 /* network.cpp in Sources */,
+				DDFD5F2D0818F372002B23D4 /* parse.cpp in Sources */,
+				DDFD5F2E0818F3A1002B23D4 /* util.cpp in Sources */,
+				DD0A06F50869A2D2007CD86E /* prefs.cpp in Sources */,
+				DD7BF7DA0B8E7A9800A009F7 /* str_util.cpp in Sources */,
+				DDB873990C85072500E0DE1F /* mac_saver_module.cpp in Sources */,
+				DDB8739A0C85072500E0DE1F /* Mac_Saver_ModuleView.m in Sources */,
+				DD7AEB4A0C87CE1300AC3B5C /* screensaver.cpp in Sources */,
+				DD6803440E70A61D0067D009 /* diagnostics.cpp in Sources */,
+				DDD9C5AC10CCF6AB00A1E4CD /* coproc.cpp in Sources */,
+				DDF5F85B10DD05E4006A50CD /* notice.cpp in Sources */,
+				DD262C821366D35D00C9A187 /* cc_config.cpp in Sources */,
+				DD262C871366D4D200C9A187 /* proxy_info.cpp in Sources */,
+				DDA165E513B49B0D00CB4DD5 /* url.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDAEC9DE07FA583B00A7BC36 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDAEC9FF07FA5A5C00A7BC36 /* SetVersion.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDB219A110B3BB6100417AEF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDB219B210B3BBA900417AEF /* WaitPermissions.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDB873EA0C850BC800E0DE1F /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDB874470C850D3000E0DE1F /* graphics2_unix.cpp in Sources */,
+				DDB874480C850D3000E0DE1F /* graphics2.cpp in Sources */,
+				DDB873F40C850BC800E0DE1F /* gutil_text.cpp in Sources */,
+				DDB873EE0C850BC800E0DE1F /* gutil.cpp in Sources */,
+				DDB873EF0C850BC800E0DE1F /* macglutfix.m in Sources */,
+				DDB873F00C850BC800E0DE1F /* reduce_lib.cpp in Sources */,
+				DD5BF77D0D4F3D0C00EDF980 /* mac_icon.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDD0953C0A3EDD2500C95BA4 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDD095490A3EDF2D00C95BA4 /* switcher.cpp in Sources */,
+				DDE5868E10FC8D2200DFA887 /* app_ipc.cpp in Sources */,
+				DDE586A310FC8DD700DFA887 /* miofile.cpp in Sources */,
+				DDE586A410FC8DD900DFA887 /* parse.cpp in Sources */,
+				DDE586A710FC8E1200DFA887 /* hostinfo.cpp in Sources */,
+				DDE586A810FC8E2B00DFA887 /* prefs.cpp in Sources */,
+				DDE586AB10FC8E5100DFA887 /* util.cpp in Sources */,
+				DDE586AC10FC8E6900DFA887 /* str_util.cpp in Sources */,
+				DDE586AF10FC8E7B00DFA887 /* proxy_info.cpp in Sources */,
+				DDE586B010FC8E9100DFA887 /* coproc.cpp in Sources */,
+				DDE586B310FC8E9B00DFA887 /* mfile.cpp in Sources */,
+				DD3741D610FC948C001257EB /* filesys.cpp in Sources */,
+				DD3741D910FC94BA001257EB /* url.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDD336F61062235D00867C7D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDD3370A106224E800867C7D /* AddRemoveUser.cpp in Sources */,
+				DD2370E113F49DF3003149F9 /* LoginItemAPI.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDD74D8407CF482E0065AC9D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDD74D8907CF48E50065AC9D /* acct_mgr.cpp in Sources */,
+				DD33C6F808B5BB4500768630 /* acct_setup.cpp in Sources */,
+				DDD74D8A07CF48E70065AC9D /* app.cpp in Sources */,
+				DDD74D8B07CF48E80065AC9D /* app_control.cpp in Sources */,
+				DDD74DC307CF492A0065AC9D /* app_ipc.cpp in Sources */,
+				DDD74D8D07CF48EA0065AC9D /* app_start.cpp in Sources */,
+				DDD74D8F07CF48EC0065AC9D /* client_msgs.cpp in Sources */,
+				DDD74D9007CF48ED0065AC9D /* check_state.cpp in Sources */,
+				DDD74D9107CF48EE0065AC9D /* client_types.cpp in Sources */,
+				DD16BF7C099D6C90003E4B69 /* cpu_sched.cpp in Sources */,
+				DDD74D9207CF48EF0065AC9D /* cs_account.cpp in Sources */,
+				DDD74D9307CF48F00065AC9D /* cs_apps.cpp in Sources */,
+				DDD74D9407CF48F10065AC9D /* cs_benchmark.cpp in Sources */,
+				DDD74D9507CF48F20065AC9D /* cs_cmdline.cpp in Sources */,
+				DDD74D9707CF48F30065AC9D /* cs_files.cpp in Sources */,
+				DDD74D9807CF48F40065AC9D /* cs_prefs.cpp in Sources */,
+				DDD74D9907CF48F50065AC9D /* cs_scheduler.cpp in Sources */,
+				DDD74D9A07CF48F60065AC9D /* cs_statefile.cpp in Sources */,
+				DDD74D9B07CF48F90065AC9D /* cs_trickle.cpp in Sources */,
+				DDD74D9C07CF48FA0065AC9D /* dhrystone.cpp in Sources */,
+				DDD74D9D07CF48FB0065AC9D /* dhrystone2.cpp in Sources */,
+				DDD74D9E07CF48FC0065AC9D /* file_names.cpp in Sources */,
+				DDD74D9F07CF48FC0065AC9D /* file_xfer.cpp in Sources */,
+				DDD74DA007CF48FD0065AC9D /* gui_rpc_server.cpp in Sources */,
+				DDD74DA207CF48FF0065AC9D /* hostinfo_network.cpp in Sources */,
+				DDD74DA307CF49000065AC9D /* hostinfo_unix.cpp in Sources */,
+				DDD74DA507CF49020065AC9D /* log_flags.cpp in Sources */,
+				DDD74DA607CF49030065AC9D /* main.cpp in Sources */,
+				DDD74DA707CF49040065AC9D /* net_stats.cpp in Sources */,
+				DDD74DA907CF49090065AC9D /* pers_file_xfer.cpp in Sources */,
+				DDD74DAD07CF490E0065AC9D /* time_stats.cpp in Sources */,
+				DDD74DAE07CF490F0065AC9D /* whetstone.cpp in Sources */,
+				DDD74DC407CF492A0065AC9D /* base64.cpp in Sources */,
+				DDD74DC507CF492B0065AC9D /* crypt.cpp in Sources */,
+				DDD74DC607CF492C0065AC9D /* diagnostics.cpp in Sources */,
+				DDD74DC707CF492D0065AC9D /* filesys.cpp in Sources */,
+				DD33C6F308B5BAF500768630 /* gui_http.cpp in Sources */,
+				DD73E36E08A0720500656EB1 /* gui_rpc_server_ops.cpp in Sources */,
+				DDD74DC807CF492E0065AC9D /* hostinfo.cpp in Sources */,
+				DD33C70408B5BEDE00768630 /* http_curl.cpp in Sources */,
+				DDD74DCB07CF49310065AC9D /* md5.c in Sources */,
+				DDD74DCC07CF49320065AC9D /* md5_file.cpp in Sources */,
+				DDD74DCD07CF49330065AC9D /* mfile.cpp in Sources */,
+				DDD74DCE07CF49390065AC9D /* miofile.cpp in Sources */,
+				DDD74DCF07CF493A0065AC9D /* msg_log.cpp in Sources */,
+				DD6D0A8707E9A61E007F882B /* network.cpp in Sources */,
+				DDD74DD007CF493B0065AC9D /* parse.cpp in Sources */,
+				DDD74DD107CF493C0065AC9D /* prefs.cpp in Sources */,
+				DDD74DD207CF493C0065AC9D /* proxy_info.cpp in Sources */,
+				DDD74DD307CF493D0065AC9D /* shmem.cpp in Sources */,
+				DDD74DD407CF493E0065AC9D /* util.cpp in Sources */,
+				DD6617880A3FFD8C00FFEBEB /* check_security.cpp in Sources */,
+				DD431F240A415EE70060585A /* SetupSecurity.cpp in Sources */,
+				DDB693500ABFE9C600689FD8 /* procinfo_mac.cpp in Sources */,
+				DD7BF7E40B8E7B5000A009F7 /* str_util.cpp in Sources */,
+				DD7BF7E80B8E7BBE00A009F7 /* work_fetch.cpp in Sources */,
+				DDA6BD120BD4551F008F7921 /* mac_backtrace.cpp in Sources */,
+				DDA6BD130BD4551F008F7921 /* QBacktrace.c in Sources */,
+				DDA6BD140BD4551F008F7921 /* QCrashReport.c in Sources */,
+				DDA6BD150BD4551F008F7921 /* QMachOImage.c in Sources */,
+				DDA6BD160BD4551F008F7921 /* QMachOImageList.c in Sources */,
+				DDA6BD170BD4551F008F7921 /* QSymbols.c in Sources */,
+				DDA6BD180BD4551F008F7921 /* QTaskMemory.c in Sources */,
+				DDBE74390C03B1C600453BB8 /* cs_platforms.cpp in Sources */,
+				DD7475520D86273300860636 /* coproc.cpp in Sources */,
+				DD6802310E701ACD0067D009 /* cert_sig.cpp in Sources */,
+				DDE3A8800E90D1BF00A363A7 /* client_state.cpp in Sources */,
+				DDE3A8810E90D21A00A363A7 /* sandbox.cpp in Sources */,
+				DDE3A8850E90D23400A363A7 /* scheduler_op.cpp in Sources */,
+				DD9AB0340EB7D5DE00AF1616 /* rr_sim.cpp in Sources */,
+				DDAD31D90EC26B14002DA09D /* mac_address.cpp in Sources */,
+				DDC06AB810A3E97700C8D9A5 /* url.cpp in Sources */,
+				DD0052F910CA6F1D0067570C /* cs_proxy.cpp in Sources */,
+				DDE1372A10DC5E5300161D6B /* cs_notice.cpp in Sources */,
+				DDE1373210DC5EA400161D6B /* notice.cpp in Sources */,
+				DDA1F1EE126D105B005EFFEB /* current_version.cpp in Sources */,
+				DD2B6C8113149177005D6F3E /* procinfo.cpp in Sources */,
+				DD4AE04D13652BD700285859 /* cc_config.cpp in Sources */,
+				DDB4A91E1411840800032E5D /* proc_control.cpp in Sources */,
+				DD1E4B7B14DCA83F0093C711 /* async_file.cpp in Sources */,
+				DD1CB232154F5BF700BFF282 /* project.cpp in Sources */,
+				DD1CB233154F5BF700BFF282 /* result.cpp in Sources */,
+				DD25F72815914F8C007845B5 /* gpu_nvidia.cpp in Sources */,
+				DD25F72915914F8C007845B5 /* gpu_amd.cpp in Sources */,
+				DD25F72A15914F8C007845B5 /* gpu_opencl.cpp in Sources */,
+				DD25F72B15914F8C007845B5 /* gpu_detect.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDF9EBFF144EB14B005D6144 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDF9EC0A144EB2BB005D6144 /* boinc_opencl.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDFA60CA0CB337D40037B88C /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDFA60E40CB3396C0037B88C /* gfx_switcher.cpp in Sources */,
+				DDFA61520CB347500037B88C /* app_ipc.cpp in Sources */,
+				DDFA61570CB347730037B88C /* filesys.cpp in Sources */,
+				DDFA61780CB348660037B88C /* mfile.cpp in Sources */,
+				DDFA617A0CB3486D0037B88C /* miofile.cpp in Sources */,
+				DDFA617E0CB3487F0037B88C /* parse.cpp in Sources */,
+				DDFA61860CB3489E0037B88C /* str_util.cpp in Sources */,
+				DDFA61890CB348A90037B88C /* util.cpp in Sources */,
+				DDFA618C0CB348C50037B88C /* hostinfo.cpp in Sources */,
+				DDFA618F0CB348E80037B88C /* md5.c in Sources */,
+				DDFA61900CB348E90037B88C /* md5_file.cpp in Sources */,
+				DDFA61920CB349020037B88C /* proxy_info.cpp in Sources */,
+				DDFA61940CB349160037B88C /* prefs.cpp in Sources */,
+				DDFE4E3D10AB778100919319 /* url.cpp in Sources */,
+				DDD9C5AA10CCF6A000A1E4CD /* coproc.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DDFF2ACB0A53D4AE002BC19D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DDFF2AE90A53D599002BC19D /* setprojectgrp.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		DD095D1F0F3B22DE000902F5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD89161C0F3B17E900DE5B1C /* ss_app */;
+			targetProxy = DD095D1E0F3B22DE000902F5 /* PBXContainerItemProxy */;
+		};
+		DD127877081F44E5007B5DE1 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD1277B2081F3D67007B5DE1 /* PostInstall */;
+			targetProxy = DD127876081F44E5007B5DE1 /* PBXContainerItemProxy */;
+		};
+		DD1AFEA50A512D8700EE5B82 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDAEC9E007FA583B00A7BC36 /* SetVersion */;
+			targetProxy = DD1AFEA60A512D8700EE5B82 /* PBXContainerItemProxy */;
+		};
+		DD3E14D40A774397007E0084 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDAEC9E007FA583B00A7BC36 /* SetVersion */;
+			targetProxy = DD3E14D50A774397007E0084 /* PBXContainerItemProxy */;
+		};
+		DD3E14D60A774397007E0084 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDD74D8607CF482E0065AC9D /* BOINC_Client */;
+			targetProxy = DD3E14D70A774397007E0084 /* PBXContainerItemProxy */;
+		};
+		DD3E14D80A774397007E0084 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD40CDF807F0386A0096C645 /* SystemMenu */;
+			targetProxy = DD3E14D90A774397007E0084 /* PBXContainerItemProxy */;
+		};
+		DD45C4A10A53E73500E923D1 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDFF2ACA0A53D4AE002BC19D /* setprojectgrp */;
+			targetProxy = DD45C4A00A53E73500E923D1 /* PBXContainerItemProxy */;
+		};
+		DD58247D0B198BDD003B6A2F /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD3E14D30A774397007E0084 /* mgr_boinc */;
+			targetProxy = DD58247C0B198BDD003B6A2F /* PBXContainerItemProxy */;
+		};
+		DD6178CE1488F09E0042482E /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD1AFEA40A512D8700EE5B82 /* Install_BOINC */;
+			targetProxy = DD6178CD1488F09E0042482E /* PBXContainerItemProxy */;
+		};
+		DD664F19084321A2009BFB11 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD69FEE708416C1300C01361 /* cmd_boinc */;
+			targetProxy = DD664F18084321A2009BFB11 /* PBXContainerItemProxy */;
+		};
+		DD69FEFF08416D1000C01361 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD407A4907D2FB1200163EF5 /* libboinc */;
+			targetProxy = DD69FEFE08416D1000C01361 /* PBXContainerItemProxy */;
+		};
+		DD6D35F40871509300BBCDEE /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD6381E90870DC9D007A2F8E /* MakeAppIcon_h */;
+			targetProxy = DD6D35F30871509300BBCDEE /* PBXContainerItemProxy */;
+		};
+		DD791FF10819063C00BE2906 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD96AFF80811075000A06F22 /* ScreenSaver */;
+			targetProxy = DD791FF00819063C00BE2906 /* PBXContainerItemProxy */;
+		};
+		DD81C824144D904D000BE61A /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD81C799144D8DA9000BE61A /* jpeg */;
+			targetProxy = DD81C823144D904D000BE61A /* PBXContainerItemProxy */;
+		};
+		DDA12AD10A369DEC00FBDD12 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD7748970A356C880025D05E /* SetUpSecurity */;
+			targetProxy = DDA12AD00A369DEC00FBDD12 /* PBXContainerItemProxy */;
+		};
+		DDAD19CD09090824004E7DD0 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDAEC9E007FA583B00A7BC36 /* SetVersion */;
+			targetProxy = DDAD19CC09090824004E7DD0 /* PBXContainerItemProxy */;
+		};
+		DDAD19CF09090833004E7DD0 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDAEC9E007FA583B00A7BC36 /* SetVersion */;
+			targetProxy = DDAD19CE09090833004E7DD0 /* PBXContainerItemProxy */;
+		};
+		DDAD19DF09090914004E7DD0 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDAEC9E007FA583B00A7BC36 /* SetVersion */;
+			targetProxy = DDAD19DE09090914004E7DD0 /* PBXContainerItemProxy */;
+		};
+		DDB219B410B3BBD000417AEF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDB219A310B3BB6100417AEF /* WaitPermissions */;
+			targetProxy = DDB219B310B3BBD000417AEF /* PBXContainerItemProxy */;
+		};
+		DDB874670C850DB600E0DE1F /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDB873E90C850BC800E0DE1F /* gfx2libboinc */;
+			targetProxy = DDB874660C850DB600E0DE1F /* PBXContainerItemProxy */;
+		};
+		DDBD52900C16C3790074905B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD4688400C165F3C0089F500 /* Uninstaller */;
+			targetProxy = DDBD528F0C16C3790074905B /* PBXContainerItemProxy */;
+		};
+		DDBD681107FA830E0082C20D /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD407A4907D2FB1200163EF5 /* libboinc */;
+			targetProxy = DDBD681007FA830E0082C20D /* PBXContainerItemProxy */;
+		};
+		DDBD681507FA830E0082C20D /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD35353007E1E05C00C4718D /* api_libboinc */;
+			targetProxy = DDBD681407FA830E0082C20D /* PBXContainerItemProxy */;
+		};
+		DDD095510A3EE09900C95BA4 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDD0953E0A3EDD2500C95BA4 /* switcher */;
+			targetProxy = DDD095500A3EE09900C95BA4 /* PBXContainerItemProxy */;
+		};
+		DDD3370C106224FF00867C7D /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDD336F51062235D00867C7D /* AddRemoveUser */;
+			targetProxy = DDD3370B106224FF00867C7D /* PBXContainerItemProxy */;
+		};
+		DDD4D96515A6FE0000612460 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD81C799144D8DA9000BE61A /* jpeg */;
+			targetProxy = DDD4D96415A6FE0000612460 /* PBXContainerItemProxy */;
+		};
+		DDF9EC0D144EB338005D6144 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD81C799144D8DA9000BE61A /* jpeg */;
+			targetProxy = DDF9EC0C144EB338005D6144 /* PBXContainerItemProxy */;
+		};
+		DDF9EC0F144EB34E005D6144 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDF9EC02144EB14B005D6144 /* boinc_opencl */;
+			targetProxy = DDF9EC0E144EB34E005D6144 /* PBXContainerItemProxy */;
+		};
+		DDF9EC11144EB36E005D6144 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDD74D8607CF482E0065AC9D /* BOINC_Client */;
+			targetProxy = DDF9EC10144EB36E005D6144 /* PBXContainerItemProxy */;
+		};
+		DDF9EC13144EB36E005D6144 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DD40CDF807F0386A0096C645 /* SystemMenu */;
+			targetProxy = DDF9EC12144EB36E005D6144 /* PBXContainerItemProxy */;
+		};
+		DDF9EC15144EB36E005D6144 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDAEC9E007FA583B00A7BC36 /* SetVersion */;
+			targetProxy = DDF9EC14144EB36E005D6144 /* PBXContainerItemProxy */;
+		};
+		DDF9EC17144EB36E005D6144 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDFA60C90CB337D40037B88C /* gfx_switcher */;
+			targetProxy = DDF9EC16144EB36E005D6144 /* PBXContainerItemProxy */;
+		};
+		DDFA60DD0CB338940037B88C /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = DDFA60C90CB337D40037B88C /* gfx_switcher */;
+			targetProxy = DDFA60DC0CB338940037B88C /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		F51BDF4903086C46012012A7 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				F51BDF4A03086C46012012A7 /* English */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = SOURCE_ROOT;
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		DD1AFEB60A512D8700EE5B82 /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				HEADER_SEARCH_PATHS = ../lib;
+				INFOPLIST_FILE = "Installer-Info.plist";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Carbon,
+				);
+				PRODUCT_NAME = "BOINC Installer";
+			};
+			name = Development;
+		};
+		DD1AFEB90A512D8700EE5B82 /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				HEADER_SEARCH_PATHS = ../lib;
+				INFOPLIST_FILE = "Installer-Info.plist";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Carbon,
+				);
+				PRODUCT_NAME = "BOINC Installer";
+				STRIP_INSTALLED_PRODUCT = YES;
+			};
+			name = Deployment;
+		};
+		DD3E153E0A774397007E0084 /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				DEAD_CODE_STRIPPING = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				DEPLOYMENT_POSTPROCESSING = YES;
+				GCC_PFE_FILE_C_DIALECTS = "c++";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = ../clientgui/mac/MacGUI.pch;
+				HEADER_SEARCH_PATHS = (
+					"../../wxMac-2.8.10/src/build/include/",
+					"../../wxMac-2.8.10/include",
+					../clientgui,
+				);
+				INFOPLIST_FILE = Info.plist;
+				LIBRARY_SEARCH_PATHS = (
+					"../../wxMac-2.8.10/src/build/Deployment/",
+					"\"$(SRCROOT)/../../wxMac-2.8.10/src/build/Deployment\"",
+				);
+				OTHER_CFLAGS = (
+					"-DHAVE_CONFIG_H",
+					"-D_FILE_OFFSET_BITS=64",
+					"-D_LARGE_FILES",
+					"-DNO_GCC_PRAGMA",
+					"-DNOCLIPBOARD",
+					"-D_THREAD_SAFE",
+					"-D__WXMAC__",
+					"-DSANDBOX",
+					"-D_DEBUG",
+					"-DHAVE_STRCASECMP_IN_STRING_H",
+				);
+				OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+				OTHER_LDFLAGS = (
+					"-bind_at_load",
+					"-D_THREAD_SAFE",
+					"-lz",
+					"-lpthread",
+					"-lz",
+					"-lm",
+				);
+				PRODUCT_NAME = BOINCManager;
+				SKIP_INSTALL = NO;
+				STRIP_INSTALLED_PRODUCT = NO;
+			};
+			name = Development;
+		};
+		DD3E15410A774397007E0084 /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				DEAD_CODE_STRIPPING = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				DEPLOYMENT_POSTPROCESSING = YES;
+				GCC_PFE_FILE_C_DIALECTS = "c++";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = ../clientgui/mac/MacGUI.pch;
+				HEADER_SEARCH_PATHS = (
+					"../../wxMac-2.8.10/src/build/include/",
+					"../../wxMac-2.8.10/include",
+					../clientgui,
+				);
+				INFOPLIST_FILE = Info.plist;
+				LIBRARY_SEARCH_PATHS = (
+					"../../wxMac-2.8.10/src/build/Deployment/",
+					"\"$(SRCROOT)/../../wxMac-2.8.10/src/build/Deployment\"",
+				);
+				OTHER_CFLAGS = (
+					"-DHAVE_CONFIG_H",
+					"-D_FILE_OFFSET_BITS=64",
+					"-D_LARGE_FILES",
+					"-DNO_GCC_PRAGMA",
+					"-DNOCLIPBOARD",
+					"-D_THREAD_SAFE",
+					"-D__WXMAC__",
+					"-DSANDBOX",
+					"-DNDEBUG",
+					"-DHAVE_STRCASECMP_IN_STRING_H",
+					"-DBUILDING_MANAGER",
+				);
+				OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+				OTHER_LDFLAGS = (
+					"-bind_at_load",
+					"-D_THREAD_SAFE",
+					"-lz",
+					"-lpthread",
+					"-lz",
+					"-lm",
+				);
+				PRODUCT_NAME = BOINCManager;
+				SKIP_INSTALL = NO;
+				STRIP_INSTALLED_PRODUCT = NO;
+			};
+			name = Deployment;
+		};
+		DD4688450C165F3C0089F500 /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INFOPLIST_FILE = "Uninstaller-Info.plist";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Carbon,
+				);
+				PRODUCT_NAME = "Uninstall BOINC";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Development;
+		};
+		DD4688490C165F3C0089F500 /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INFOPLIST_FILE = "Uninstaller-Info.plist";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Carbon,
+				);
+				PRODUCT_NAME = "Uninstall BOINC";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Deployment;
+		};
+		DD7748A60A356CAE0025D05E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				OTHER_LDFLAGS = (
+					"-framework",
+					Carbon,
+				);
+				PRODUCT_NAME = SetUpSecurity;
+			};
+			name = Development;
+		};
+		DD7748A90A356CAE0025D05E /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				OTHER_LDFLAGS = (
+					"-framework",
+					Carbon,
+				);
+				PRODUCT_NAME = SetUpSecurity;
+			};
+			name = Deployment;
+		};
+		DD81C79C144D8DA9000BE61A /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+				ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
+				EXECUTABLE_PREFIX = lib;
+				PRODUCT_NAME = jpeg;
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+					"-Wno-write-strings",
+					"-Wno-main",
+				);
+			};
+			name = Development;
+		};
+		DD81C79D144D8DA9000BE61A /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					i386,
+					x86_64,
+				);
+				EXECUTABLE_PREFIX = lib;
+				PRODUCT_NAME = jpeg;
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+					"-Wno-write-strings",
+					"-Wno-main",
+				);
+			};
+			name = Deployment;
+		};
+		DD8916210F3B17E900DE5B1C /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				HEADER_SEARCH_PATHS = (
+					../api/,
+					../samples/jpeglib/,
+					"../../freetype-2.4.10/include",
+					"../../ftgl-2.1.3~rc5/src",
+				);
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"${BUILT_PRODUCTS_DIR}/",
+				);
+				OTHER_LDFLAGS = (
+					"-lresolv",
+					"-ljpeg",
+					"../../freetype-2.4.10/objs/.libs/libfreetype.a",
+					"../../ftgl-2.1.3~rc5/src/.libs/libftgl.a",
+					"-lz",
+					"-lbz2",
+				);
+				PRODUCT_NAME = boincscr;
+			};
+			name = Development;
+		};
+		DD8916250F3B17E900DE5B1C /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				HEADER_SEARCH_PATHS = (
+					../api/,
+					../samples/jpeglib/,
+					"../../freetype-2.4.10/include",
+					"../../ftgl-2.1.3~rc5/src",
+				);
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"${BUILT_PRODUCTS_DIR}/",
+				);
+				OTHER_LDFLAGS = (
+					"-lresolv",
+					"-ljpeg",
+					"../../freetype-2.4.10/objs/.libs/libfreetype.a",
+					"../../ftgl-2.1.3~rc5/src/.libs/libftgl.a",
+					"-lz",
+					"-lbz2",
+				);
+				PRODUCT_NAME = boincscr;
+			};
+			name = Deployment;
+		};
+		DD9843D909920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					i386,
+					x86_64,
+				);
+				HEADER_SEARCH_PATHS = "";
+				OTHER_CFLAGS = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				"OTHER_CFLAGS[arch=ppc]" = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				"OTHER_CFLAGS[arch=x86_64]" = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				OTHER_LDFLAGS = "";
+				PRODUCT_NAME = boinc;
+			};
+			name = Deployment;
+		};
+		DD9843DB09920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					i386,
+					x86_64,
+				);
+				HEADER_SEARCH_PATHS = ../lib;
+				LIBRARY_SEARCH_PATHS = ../lib;
+				"OTHER_CFLAGS[arch=ppc]" = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				"OTHER_CFLAGS[arch=x86_64]" = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				PRODUCT_NAME = boinc_api;
+			};
+			name = Deployment;
+		};
+		DD9843DC09920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = SetVersion;
+				STRINGS_FILE_OUTPUT_ENCODING = "UTF-16";
+			};
+			name = Deployment;
+		};
+		DD9843DD09920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					i386,
+					x86_64,
+				);
+				GCC_ENABLE_OBJC_GC = supported;
+				HEADER_SEARCH_PATHS = "";
+				INFOPLIST_FILE = "ScreenSaver-Info.plist";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PRODUCT_NAME = BOINCSaver;
+				WRAPPER_EXTENSION = saver;
+			};
+			name = Deployment;
+		};
+		DD9843DE09920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				DEPLOYMENT_POSTPROCESSING = YES;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				HEADER_SEARCH_PATHS = "../../curl-7.26.0/include";
+				INFOPLIST_PREPROCESSOR_DEFINITIONS = "";
+				LIBRARY_SEARCH_PATHS = "";
+				"OTHER_CFLAGS[arch=x86_64]" = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				OTHER_LDFLAGS = (
+					"-L.",
+					"../../curl-7.26.0/lib/.libs/libcurl.a",
+					"../../c-ares-1.9.1/.libs/libcares.a",
+					"../../openssl-1.0.1c/libcrypto.a",
+					"../../openssl-1.0.1c/libssl.a",
+					"-lldap",
+					"-lz",
+				);
+				PRODUCT_NAME = boinc;
+				SKIP_INSTALL = NO;
+				STRIP_INSTALLED_PRODUCT = NO;
+				USER_HEADER_SEARCH_PATHS = "../../curl-7.26.0/include";
+			};
+			name = Deployment;
+		};
+		DD9843DF09920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				INFOPLIST_FILE = "SystemMenu-Info.plist";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PRODUCT_NAME = SystemMenu;
+			};
+			name = Deployment;
+		};
+		DD9843E109920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				HEADER_SEARCH_PATHS = ../lib;
+				INFOPLIST_FILE = "PostInstall-Info.plist";
+				OTHER_CFLAGS = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-D_MAC_INSTALLER",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				OTHER_LDFLAGS = (
+					"-framework",
+					Carbon,
+				);
+				PRODUCT_NAME = PostInstall;
+			};
+			name = Deployment;
+		};
+		DD9843E209920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				OTHER_LDFLAGS = "-lboinc";
+				PRODUCT_NAME = boinccmd;
+			};
+			name = Deployment;
+		};
+		DD9843E309920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = MakeAppIcon_h;
+			};
+			name = Deployment;
+		};
+		DD9843E409920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				DEPLOYMENT_POSTPROCESSING = YES;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				OTHER_LDFLAGS = "";
+				OTHER_REZFLAGS = "";
+				PRODUCT_NAME = Build_All;
+				SECTORDER_FLAGS = "";
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+				);
+				ZERO_LINK = NO;
+			};
+			name = Deployment;
+		};
+		DD9843E509920F220090855B /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = i386;
+				COPY_PHASE_STRIP = YES;
+				DEAD_CODE_STRIPPING = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				DEPLOYMENT_POSTPROCESSING = YES;
+				GCC_FAST_MATH = NO;
+				GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
+				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+				GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO;
+				LIBRARY_STYLE = STATIC;
+				MACOSX_DEPLOYMENT_TARGET = 10.4;
+				"MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.4;
+				"MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5;
+				OTHER_CFLAGS = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				PREBINDING = NO;
+				SDKROOT = "";
+				STRIP_INSTALLED_PRODUCT = YES;
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+					"-Wno-write-strings",
+				);
+			};
+			name = Deployment;
+		};
+		DD9E2352091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+				ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
+				HEADER_SEARCH_PATHS = "";
+				OTHER_LDFLAGS = "";
+				PRODUCT_NAME = boinc;
+			};
+			name = Development;
+		};
+		DD9E235A091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+				ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
+				HEADER_SEARCH_PATHS = ../lib;
+				LIBRARY_SEARCH_PATHS = ../lib;
+				PRODUCT_NAME = boinc_api;
+			};
+			name = Development;
+		};
+		DD9E235E091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = SetVersion;
+				STRINGS_FILE_OUTPUT_ENCODING = "UTF-16";
+			};
+			name = Development;
+		};
+		DD9E2362091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(NATIVE_ARCH_ACTUAL)";
+				GCC_ENABLE_OBJC_GC = supported;
+				HEADER_SEARCH_PATHS = "";
+				INFOPLIST_FILE = "ScreenSaver-Info.plist";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PRODUCT_NAME = BOINCSaver;
+				WRAPPER_EXTENSION = saver;
+			};
+			name = Development;
+		};
+		DD9E2366091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				DEPLOYMENT_POSTPROCESSING = YES;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				HEADER_SEARCH_PATHS = "../../curl-7.26.0/include";
+				INFOPLIST_PREPROCESSOR_DEFINITIONS = "";
+				LIBRARY_SEARCH_PATHS = "";
+				OTHER_LDFLAGS = (
+					"-L.",
+					"../../curl-7.26.0/lib/.libs/libcurl.a",
+					"../../c-ares-1.9.1/.libs/libcares.a",
+					"../../openssl-1.0.1c/libcrypto.a",
+					"../../openssl-1.0.1c/libssl.a",
+					"-lldap",
+					"-lz",
+				);
+				PRODUCT_NAME = boinc;
+				SKIP_INSTALL = NO;
+				STRIP_INSTALLED_PRODUCT = NO;
+				USER_HEADER_SEARCH_PATHS = "../../curl-7.26.0/include";
+			};
+			name = Development;
+		};
+		DD9E236A091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				INFOPLIST_FILE = "SystemMenu-Info.plist";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PRODUCT_NAME = SystemMenu;
+			};
+			name = Development;
+		};
+		DD9E2372091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				HEADER_SEARCH_PATHS = ../lib;
+				INFOPLIST_FILE = "PostInstall-Info.plist";
+				OTHER_CFLAGS = (
+					"-D_THREAD_SAFE",
+					"-D_DEBUG",
+					"-D_MAC_INSTALLER",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				OTHER_LDFLAGS = (
+					"-framework",
+					Carbon,
+				);
+				PRODUCT_NAME = PostInstall;
+			};
+			name = Development;
+		};
+		DD9E2376091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				OTHER_LDFLAGS = "-lboinc";
+				PRODUCT_NAME = boinccmd;
+			};
+			name = Development;
+		};
+		DD9E237A091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = MakeAppIcon_h;
+			};
+			name = Development;
+		};
+		DD9E237E091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				OTHER_LDFLAGS = "";
+				OTHER_REZFLAGS = "";
+				PRODUCT_NAME = Build_All;
+				SECTORDER_FLAGS = "";
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+				);
+				ZERO_LINK = NO;
+			};
+			name = Development;
+		};
+		DD9E2382091CBDAE0048316E /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				DEPLOYMENT_POSTPROCESSING = NO;
+				GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+				GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO;
+				LIBRARY_STYLE = STATIC;
+				MACOSX_DEPLOYMENT_TARGET = 10.4;
+				"MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.4;
+				"MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5;
+				OTHER_CFLAGS = (
+					"-D_THREAD_SAFE",
+					"-D_DEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				PREBINDING = NO;
+				SDKROOT = "";
+				STRIP_INSTALLED_PRODUCT = NO;
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+					"-Wno-write-strings",
+				);
+			};
+			name = Development;
+		};
+		DDB219A710B3BB6200417AEF /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PRECOMPILE_PREFIX_HEADER = NO;
+				GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+				INFOPLIST_FILE = "WaitPermissions-Info.plist";
+				INSTALL_PATH = "$(HOME)/Applications";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Carbon,
+				);
+				PREBINDING = NO;
+				PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
+				PRODUCT_NAME = WaitPermissions;
+			};
+			name = Development;
+		};
+		DDB219AB10B3BB6200417AEF /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				GCC_PRECOMPILE_PREFIX_HEADER = NO;
+				GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+				INFOPLIST_FILE = "WaitPermissions-Info.plist";
+				INSTALL_PATH = "$(HOME)/Applications";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Carbon,
+				);
+				PREBINDING = NO;
+				PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
+				PRODUCT_NAME = WaitPermissions;
+				ZERO_LINK = NO;
+			};
+			name = Deployment;
+		};
+		DDB873FD0C850BC800E0DE1F /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+				ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
+				HEADER_SEARCH_PATHS = ../samples/jpeglib;
+				PRODUCT_NAME = boinc_graphics2;
+			};
+			name = Development;
+		};
+		DDB874010C850BC800E0DE1F /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					i386,
+					x86_64,
+				);
+				HEADER_SEARCH_PATHS = ../samples/jpeglib;
+				"OTHER_CFLAGS[arch=ppc]" = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				"OTHER_CFLAGS[arch=x86_64]" = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				PRODUCT_NAME = boinc_graphics2;
+			};
+			name = Deployment;
+		};
+		DDD095420A3EDD4300C95BA4 /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = switcher;
+			};
+			name = Development;
+		};
+		DDD095450A3EDD4300C95BA4 /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = switcher;
+			};
+			name = Deployment;
+		};
+		DDD336FB1062235D00867C7D /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = AddRemoveUser;
+				STRINGS_FILE_OUTPUT_ENCODING = "UTF-16";
+			};
+			name = Development;
+		};
+		DDD336FF1062235D00867C7D /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = AddRemoveUser;
+				STRINGS_FILE_OUTPUT_ENCODING = "UTF-16";
+			};
+			name = Deployment;
+		};
+		DDF9EC04144EB14B005D6144 /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
+				EXECUTABLE_PREFIX = lib;
+				ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Development;
+		};
+		DDF9EC05144EB14B005D6144 /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					i386,
+					x86_64,
+				);
+				EXECUTABLE_PREFIX = lib;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Deployment;
+		};
+		DDFA60CE0CB337D40037B88C /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				OTHER_CFLAGS = (
+					"-D_THREAD_SAFE",
+					"-D_DEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				PRODUCT_NAME = gfx_switcher;
+			};
+			name = Development;
+		};
+		DDFA60D20CB337D40037B88C /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				OTHER_CFLAGS = (
+					"-D_THREAD_SAFE",
+					"-DNDEBUG",
+					"-DSANDBOX",
+					"-include",
+					../clientgui/mac/config.h,
+				);
+				PRODUCT_NAME = gfx_switcher;
+			};
+			name = Deployment;
+		};
+		DDFF2ACF0A53D4AE002BC19D /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = setprojectgrp;
+			};
+			name = Development;
+		};
+		DDFF2AD20A53D4AE002BC19D /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = setprojectgrp;
+			};
+			name = Deployment;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		DD1AFEB50A512D8700EE5B82 /* Build configuration list for PBXNativeTarget "Install_BOINC" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD1AFEB60A512D8700EE5B82 /* Development */,
+				DD1AFEB90A512D8700EE5B82 /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD3E153D0A774397007E0084 /* Build configuration list for PBXNativeTarget "mgr_boinc" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD3E153E0A774397007E0084 /* Development */,
+				DD3E15410A774397007E0084 /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD4688440C165F3C0089F500 /* Build configuration list for PBXNativeTarget "Uninstaller" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD4688450C165F3C0089F500 /* Development */,
+				DD4688490C165F3C0089F500 /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD7748A50A356CAE0025D05E /* Build configuration list for PBXNativeTarget "SetUpSecurity" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD7748A60A356CAE0025D05E /* Development */,
+				DD7748A90A356CAE0025D05E /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD81C79B144D8DA9000BE61A /* Build configuration list for PBXNativeTarget "jpeg" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD81C79C144D8DA9000BE61A /* Development */,
+				DD81C79D144D8DA9000BE61A /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD8916200F3B17E900DE5B1C /* Build configuration list for PBXNativeTarget "ss_app" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD8916210F3B17E900DE5B1C /* Development */,
+				DD8916250F3B17E900DE5B1C /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E2351091CBDAE0048316E /* Build configuration list for PBXNativeTarget "libboinc" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E2352091CBDAE0048316E /* Development */,
+				DD9843D909920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E2359091CBDAE0048316E /* Build configuration list for PBXNativeTarget "api_libboinc" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E235A091CBDAE0048316E /* Development */,
+				DD9843DB09920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E235D091CBDAE0048316E /* Build configuration list for PBXNativeTarget "SetVersion" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E235E091CBDAE0048316E /* Development */,
+				DD9843DC09920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E2361091CBDAE0048316E /* Build configuration list for PBXNativeTarget "ScreenSaver" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E2362091CBDAE0048316E /* Development */,
+				DD9843DD09920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E2365091CBDAE0048316E /* Build configuration list for PBXNativeTarget "BOINC_Client" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E2366091CBDAE0048316E /* Development */,
+				DD9843DE09920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E2369091CBDAE0048316E /* Build configuration list for PBXNativeTarget "SystemMenu" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E236A091CBDAE0048316E /* Development */,
+				DD9843DF09920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E2371091CBDAE0048316E /* Build configuration list for PBXNativeTarget "PostInstall" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E2372091CBDAE0048316E /* Development */,
+				DD9843E109920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E2375091CBDAE0048316E /* Build configuration list for PBXNativeTarget "cmd_boinc" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E2376091CBDAE0048316E /* Development */,
+				DD9843E209920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E2379091CBDAE0048316E /* Build configuration list for PBXNativeTarget "MakeAppIcon_h" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E237A091CBDAE0048316E /* Development */,
+				DD9843E309920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E237D091CBDAE0048316E /* Build configuration list for PBXAggregateTarget "Build_All" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E237E091CBDAE0048316E /* Development */,
+				DD9843E409920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DD9E2381091CBDAE0048316E /* Build configuration list for PBXProject "boinc" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DD9E2382091CBDAE0048316E /* Development */,
+				DD9843E509920F220090855B /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DDB219AE10B3BB6200417AEF /* Build configuration list for PBXNativeTarget "WaitPermissions" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DDB219A710B3BB6200417AEF /* Development */,
+				DDB219AB10B3BB6200417AEF /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DDB873FC0C850BC800E0DE1F /* Build configuration list for PBXNativeTarget "gfx2libboinc" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DDB873FD0C850BC800E0DE1F /* Development */,
+				DDB874010C850BC800E0DE1F /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DDD095410A3EDD4300C95BA4 /* Build configuration list for PBXNativeTarget "switcher" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DDD095420A3EDD4300C95BA4 /* Development */,
+				DDD095450A3EDD4300C95BA4 /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DDD336FA1062235D00867C7D /* Build configuration list for PBXNativeTarget "AddRemoveUser" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DDD336FB1062235D00867C7D /* Development */,
+				DDD336FF1062235D00867C7D /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DDF9EC06144EB14B005D6144 /* Build configuration list for PBXNativeTarget "boinc_opencl" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DDF9EC04144EB14B005D6144 /* Development */,
+				DDF9EC05144EB14B005D6144 /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DDFA60CD0CB337D40037B88C /* Build configuration list for PBXNativeTarget "gfx_switcher" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DDFA60CE0CB337D40037B88C /* Development */,
+				DDFA60D20CB337D40037B88C /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		DDFF2ACE0A53D4AE002BC19D /* Build configuration list for PBXNativeTarget "setprojectgrp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DDFF2ACF0A53D4AE002BC19D /* Development */,
+				DDFF2AD20A53D4AE002BC19D /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 20286C28FDCF999611CA2CEA /* Project object */;
+}
diff --git a/mac_build/buildWxMac.sh b/mac_build/buildWxMac.sh
new file mode 100644
index 0000000..c6ffa81
--- /dev/null
+++ b/mac_build/buildWxMac.sh
@@ -0,0 +1,160 @@
+#!/bin/sh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# Script to build the wxMac-2.8.10 library for BOINC as a Universal Binary
+#
+# by Charlie Fenton    7/21/06
+# Updated for wx-Mac 2.8.10 and Unicode 4/17/09
+# Updated for OS 10.7 and XCode 4.1 with OS 10.4 compatibility 9/26/11
+# Updated for partial OS 10.8 and XCode 4.5 compatibility 7/27/12
+## NOTE: To run with XCode 4.5, you must first obtain a copy of the 
+##  MacOSX10.6.sdk and copy it into the folder: 
+##  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
+#
+## This script requires OS 10.6 or later
+##
+## In Terminal, CD to the wxMac-2.8.10 directory.
+##    cd [path]/wxMac-2.8.10/
+## then run this script:
+##    source [ path_to_this_script ] [ -clean ]
+##
+## the -clean argument will force a full rebuild.
+#
+
+Path=$PWD
+echo "${Path}" | grep " " > /dev/null 2>&1
+if [ "$?" -eq "0" ]; then
+    echo "**********************************************************"
+    echo "**********************************************************"
+    echo "**********                                      **********"
+    echo "********** ERROR: Path must not contain spaces! **********"
+    echo "**********                                      **********"
+    echo "**********************************************************"
+    echo "**********************************************************"
+    echo "**********************************************************"
+    return 1
+fi
+
+if [ "$1" = "-clean" ]; then
+  doclean="clean "
+else
+  doclean=""
+fi
+
+xcodebuild -version -sdk macosx10.6 > /dev/null
+if [ ! "$?" = "0" ]; then
+    echo "ERROR: System 10.6 SDK is missing.  For details, see build instructions at"
+    echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
+    return 1
+fi
+
+## By default, wxMac 2.8.10 links with libiconv.dyld, but building with OS 10.6 SDK 
+## makes it require libiconv.2.4.0.dylib, while OS 10.4 supplies only libiconv.2.2.0.dylib.
+## This causes the Manager to fail under OS 10.4 with a dyld error.  
+## But libiconv is not really needed for BOINC Manager, so we patch wxMac's config file to 
+## avoid using libiconv.
+if [ ! -f "include/wx/mac/carbon/config_xcode.h.orig" ]; then
+    ## Make sure sed uses UTF-8 text encoding
+    unset LC_CTYPE
+    unset LC_MESSAGES
+    unset __CF_USER_TEXT_ENCODING
+    export LANG=en_US.UTF-8
+
+    echo "patching file include/wx/mac/carbon/config_xcode.h"
+    sed -i ".orig" s%"#define HAVE_ICONV 1"%"//#undef HAVE_ICONV"%g "include/wx/mac/carbon/config_xcode.h"
+else
+    echo "config_xcode.h already patched"
+fi
+
+## Fix a bug in wxMutex.  This patch should not be needed for wxMac-2.8.11 and later
+if [ ! -f src/mac/carbon/thread.cpp.orig ]; then
+
+cat >> /tmp/wxmutex_diff << ENDOFFILE
+--- src/mac/carbon/thread-old.cpp	2009-03-06 04:23:14.000000000 -0800
++++ src/mac/carbon/thread.cpp	2009-05-05 04:34:41.000000000 -0700
+@@ -138,8 +138,8 @@
+ 
+ #if TARGET_API_MAC_OSX
+ #define wxUSE_MAC_SEMAPHORE_MUTEX 0
+-#define wxUSE_MAC_CRITICAL_REGION_MUTEX 1
+-#define wxUSE_MAC_PTHREADS_MUTEX 0
++#define wxUSE_MAC_CRITICAL_REGION_MUTEX 0
++#define wxUSE_MAC_PTHREADS_MUTEX 1
+ #else
+ #define wxUSE_MAC_SEMAPHORE_MUTEX 0
+ #define wxUSE_MAC_CRITICAL_REGION_MUTEX 1
+ENDOFFILE
+
+patch -bfi /tmp/wxmutex_diff src/mac/carbon/thread.cpp
+
+rm -f /tmp/wxmutex_diff
+else
+    echo "thread.cpp already patched"
+fi
+
+## Fix a compile error in mac/carbon/graphics.cpp.
+if [ ! -f src/mac/carbon/graphics.cpp.orig ]; then
+
+cat >> /tmp/wxgraphics_diff << ENDOFFILE
+--- src/mac/carbon/graphics-old.cpp	2009-03-06 04:23:13.000000000 -0800
++++ src/mac/carbon/graphics.cpp	2012-07-06 02:49:23.000000000 -0700
+@@ -1069,7 +1069,7 @@
+     virtual void Transform( const wxGraphicsMatrixData* matrix );
+ 
+     // gets the bounding box enclosing all points (possibly including control points)
+-    virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *y) const;
++    virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) const;
+ 
+     virtual bool Contains( wxDouble x, wxDouble y, int fillStyle = wxODDEVEN_RULE) const;
+ private :
+ENDOFFILE
+
+patch -bfi /tmp/wxgraphics_diff src/mac/carbon/graphics.cpp
+
+rm -f /tmp/wxgraphics_diff
+else
+    echo "graphics.cpp already patched"
+fi
+
+
+
+
+if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac_static.a ]; then
+    echo "Deployment libwx_mac_static.a already built"
+else
+##    export DEVELOPER_SDK_DIR="/Developer/SDKs"
+    ## We must override some of the build settings in wxWindows.xcodeproj 
+    xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Deployment $doclean build -sdk macosx10.6 GCC_VERSION_i386="" MACOSX_DEPLOYMENT_TARGET_i386=10.4 ARCHS="i386" OTHER_CPLUSPLUSFLAGS="-DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -fvisibility=hidden -fvisibility-inlines-hidden"
+
+if [  $? -ne 0 ]; then return 1; fi
+fi
+
+if [ "$1" != "-clean" ] && [ -f src/build/Development/libwx_mac_static.a ]; then
+    echo "Development libwx_mac_static.a already built"
+else
+##    export DEVELOPER_SDK_DIR="/Developer/SDKs"
+    ## We must override some of the build settings in wxWindows.xcodeproj 
+    xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Development $doclean build -sdk macosx10.6 GCC_VERSION_i386="" MACOSX_DEPLOYMENT_TARGET_i386=10.4 ARCHS="i386" OTHER_CPLUSPLUSFLAGS="-DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -fvisibility=hidden -fvisibility-inlines-hidden"
+
+if [  $? -ne 0 ]; then return 1; fi
+fi
+
+return 0
+
diff --git a/mac_build/buildc-ares.sh b/mac_build/buildc-ares.sh
new file mode 100644
index 0000000..1d946ff
--- /dev/null
+++ b/mac_build/buildc-ares.sh
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# Script to build Macintosh 32-bit Intel library of c-ares-1.9.1 for
+# use in building BOINC.
+#
+# by Charlie Fenton 7/21/06
+# Updated 10/18/11 for OS 10.7 Lion and XCode 4.2
+# Updated 6/25/12 for c-ares 1.9.1
+# Updated 7/10/12 for Xcode 4.3 and later which are not at a fixed address
+#
+## This script requires OS 10.6 or later
+#
+## If you drag-install Xcode 4.3 or later, you must have opened Xcode 
+## and clicked the Install button on the dialog which appears to 
+## complete the Xcode installation before running this script.
+#
+## In Terminal, CD to the c-ares-1.9.1 directory.
+##     cd [path]/c-ares-1.9.1/
+## then run this script:
+##     source [path]/buildc-ares.sh [ -clean ]
+##
+## the -clean argument will force a full rebuild.
+##
+
+if [ "$1" != "-clean" ]; then
+    if [ -f .libs/libcares.a ]; then
+        echo "c-ares-1.9.1 already built"
+        return 0
+    fi
+fi
+
+GCCPATH=`xcrun -find gcc`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find gcc compiler"
+    return 1
+fi
+
+GPPPATH=`xcrun -find g++`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find g++ compiler"
+    return 1
+fi
+
+MAKEPATH=`xcrun -find make`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find make tool"
+    return 1
+fi
+
+TOOLSPATH1=${MAKEPATH%/make}
+
+ARPATH=`xcrun -find ar`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find ar tool"
+    return 1
+fi
+
+TOOLSPATH2=${ARPATH%/ar}
+
+export PATH="${TOOLSPATH1}":"${TOOLSPATH2}":/usr/local/bin:$PATH
+
+SDKPATH=`xcodebuild -version -sdk macosx Path`
+
+rm -f .libs/libcares.a
+
+if [  $? -ne 0 ]; then return 1; fi
+
+export CC="${GCCPATH}";export CXX="${GPPPATH}"
+export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,i386"
+export CPPFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
+export CFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
+export SDKROOT="${SDKPATH}"
+export MACOSX_DEPLOYMENT_TARGET=10.4
+
+./configure --enable-shared=NO prefix=/tmp/installed-c-ares --host=i386
+if [  $? -ne 0 ]; then return 1; fi
+
+if [ "$1" = "-clean" ]; then
+    make clean
+fi
+
+make
+if [  $? -ne 0 ]; then return 1; fi
+
+export CC="";export CXX=""
+export LDFLAGS=""
+export CPPFLAGS=""
+export CFLAGS=""
+export SDKROOT=""
+
+return 0
diff --git a/mac_build/buildcurl.sh b/mac_build/buildcurl.sh
new file mode 100644
index 0000000..8eacb22
--- /dev/null
+++ b/mac_build/buildcurl.sh
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# Script to build Macintosh 32-bit Intel library of curl-7.26.0 for
+# use in building BOINC.
+#
+# by Charlie Fenton 7/21/06
+# Updated 12/3/09 for OS 10.7 Lion and XCode 4.2
+# Updated 6/25/12 for curl 7.26.0
+# Updated 7/10/12 for Xcode 4.3 and later which are not at a fixed address
+#
+## This script requires OS 10.6 or later
+## This script requires OS 10.6 or later
+#
+## If you drag-install Xcode 4.3 or later, you must have opened Xcode 
+## and clicked the Install button on the dialog which appears to 
+## complete the Xcode installation before running this script.
+#
+## In Terminal, CD to the curl-7.26.0 directory.
+##     cd [path]/curl-7.26.0/
+## then run this script:
+##     source [path]/buildcurl.sh [ -clean ]
+##
+## the -clean argument will force a full rebuild.
+##
+
+if [ "$1" != "-clean" ]; then
+    if [ -f lib/.libs/libcurl.a ]; then
+        echo "curl-7.26.0 already built"
+        return 0
+    fi
+fi
+
+export PATH=/usr/local/bin:$PATH
+
+GCCPATH=`xcrun -find gcc`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find gcc compiler"
+    return 1
+fi
+
+GPPPATH=`xcrun -find g++`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find g++ compiler"
+    return 1
+fi
+
+MAKEPATH=`xcrun -find make`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find make tool"
+    return 1
+fi
+
+TOOLSPATH1=${MAKEPATH%/make}
+
+ARPATH=`xcrun -find ar`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find ar tool"
+    return 1
+fi
+
+TOOLSPATH2=${ARPATH%/ar}
+
+export PATH="${TOOLSPATH1}":"${TOOLSPATH2}":/usr/local/bin:$PATH
+
+SDKPATH=`xcodebuild -version -sdk macosx Path`
+
+CURL_DIR=`pwd`
+# curl configure and make expect a path to _installed_ c-ares-1.9.1
+# so temporarily install c-ares at a path that does not contain spaces.
+cd ../c-ares-1.9.1
+make install 
+cd "${CURL_DIR}"
+
+
+rm -f lib/.libs/libcurl.a
+
+if [  $? -ne 0 ]; then return 1; fi
+
+export PATH=/usr/local/bin:$PATH
+export CC="${GCCPATH}";export CXX="${GPPPATH}"
+export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,i386"
+export CPPFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
+export CFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
+export SDKROOT="${SDKPATH}"
+export MACOSX_DEPLOYMENT_TARGET=10.4
+
+./configure --enable-shared=NO --enable-ares=/tmp/installed-c-ares --host=i386
+if [  $? -ne 0 ]; then return 1; fi
+
+if [ "$1" = "-clean" ]; then
+    make clean
+fi
+
+make
+if [  $? -ne 0 ]; then return 1; fi
+
+export CC="";export CXX=""
+export LDFLAGS=""
+export CPPFLAGS=""
+export CFLAGS=""
+export SDKROOT=""
+
+# Delete temporarily installed c-ares.
+rm -Rf /tmp/installed-c-ares/
+
+return 0
diff --git a/mac_build/buildjpeg.sh b/mac_build/buildjpeg.sh
new file mode 100644
index 0000000..946912f
--- /dev/null
+++ b/mac_build/buildjpeg.sh
@@ -0,0 +1,127 @@
+#!/bin/sh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# Script to build Macintosh Universal Binary library of jpeg-6b for
+# use in building BOINC.
+#
+# by Charlie Fenton 12/19/07
+# Updated 12/3/09 for OS 10.6 Snow Leopard and XCode 3.2.1
+# Updated 10/11/10
+#
+## In Terminal, CD to the jpeg-6b directory.
+##     cd [path]/jpeg-6b/
+## then run this script:
+##    source [ path_to_this_script ] [ -clean ]
+#
+# the -clean argument will force a full rebuild.
+#
+
+if [ "$1" != "-clean" ]; then
+    if [ -f libjpeg_ppc.a ] && [ -f libjpeg_i386.a ] && [ -f libjpeg_x86_64.a ] && [ -f libjpeg.a ]; then
+        echo "jpeg-6b already built"
+        return 0
+    fi
+fi
+
+if [ ! -d /Developer/SDKs/MacOSX10.4u.sdk/ ]; then
+    echo "ERROR: System 10.4u SDK is missing.  For details, see build instructions at"
+    echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
+    return 1
+fi
+
+if [ ! -d /Developer/SDKs/MacOSX10.5.sdk/ ]; then
+    echo "ERROR: System 10.5 SDK is missing.  For details, see build instructions at"
+    echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
+    return 1
+fi
+
+export PATH=/usr/local/bin:$PATH
+export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
+export LDFLAGS="-arch ppc -D_NONSTD_SOURCE -isystem /Developer/SDKs/MacOSX10.4u.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
+export CPPFLAGS="-arch ppc -D_NONSTD_SOURCE -isystem /Developer/SDKs/MacOSX10.4u.sdk -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
+export CFLAGS="-arch ppc -D_NONSTD_SOURCE -isystem /Developer/SDKs/MacOSX10.4u.sdk -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
+export SDKROOT="/Developer/SDKs/MacOSX10.4u.sdk"
+export MACOSX_DEPLOYMENT_TARGET=10.3
+
+./configure --disable-shared --host=ppc
+if [  $? -ne 0 ]; then return 1; fi
+
+rm -f libjpeg_ppc.a
+rm -f libjpeg_i386.a
+rm -f libjpeg_x86_64.a
+rm -f libjpeg.a
+make clean
+
+make -e
+if [  $? -ne 0 ]; then return 1; fi
+mv -f libjpeg.a libjpeg_ppc.a
+
+make clean
+if [  $? -ne 0 ]; then return 1; fi
+
+export PATH=/usr/local/bin:$PATH
+export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
+export LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386"
+export CPPFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
+export CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
+export SDKROOT="/Developer/SDKs/MacOSX10.4u.sdk"
+export MACOSX_DEPLOYMENT_TARGET=10.4
+
+./configure --disable-shared --host=i386
+if [  $? -ne 0 ]; then return 1; fi
+
+
+make -e
+if [  $? -ne 0 ]; then return 1; fi
+mv libjpeg.a libjpeg_i386.a
+
+# Build for x86_64 architecture using OS 10.5 SDK
+make clean
+if [  $? -ne 0 ]; then return 1; fi
+
+export PATH=/usr/local/bin:$PATH
+export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
+export LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64"
+export CPPFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
+export CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
+export SDKROOT="/Developer/SDKs/MacOSX10.5.sdk"
+export MACOSX_DEPLOYMENT_TARGET=10.5
+
+./configure --disable-shared --host=x86_64
+if [  $? -ne 0 ]; then return 1; fi
+
+
+make -e
+if [  $? -ne 0 ]; then return 1; fi
+
+mv libjpeg.a libjpeg_x86_64.a
+
+
+lipo -create libjpeg_i386.a libjpeg_ppc.a libjpeg_x86_64.a -output libjpeg.a
+
+if [  $? -ne 0 ]; then return 1; fi
+
+export CC="";export CXX=""
+export LDFLAGS=""
+export CPPFLAGS=""
+export CFLAGS=""
+export SDKROOT=""
+
+return 0
diff --git a/mac_build/buildopenssl.sh b/mac_build/buildopenssl.sh
new file mode 100644
index 0000000..2c819ef
--- /dev/null
+++ b/mac_build/buildopenssl.sh
@@ -0,0 +1,111 @@
+#!/bin/sh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# Script to build Macintosh 32-bit Intel openssl-1.0.1c libraries 
+# libcrypto.a and libssl.a for use in building BOINC.
+#
+# by Charlie Fenton 6/25/12
+# Updated 7/10/12 for Xcode 4.3 and later which are not at a fixed address
+#
+## This script requires OS 10.6 or later
+#
+## If you drag-install Xcode 4.3 or later, you must have opened Xcode 
+## and clicked the Install button on the dialog which appears to 
+## complete the Xcode installation before running this script.
+#
+## In Terminal, CD to the openssl-1.0.1c directory.
+##     cd [path]/openssl-1.0.1c/
+## then run this script:
+##     source [path]/buildopenssl.sh [ -clean ]
+##
+## the -clean argument will force a full rebuild.
+##
+
+if [ "$1" != "-clean" ]; then
+    if [ -f libssl.a ]&& [ -f libcrypto.a ]; then
+        echo "openssl-1.0.1c libraries already built"
+        return 0
+    fi
+fi
+
+export PATH=/usr/local/bin:$PATH
+
+GCCPATH=`xcrun -find gcc`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find gcc compiler"
+    return 1
+fi
+
+GPPPATH=`xcrun -find g++`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find g++ compiler"
+    return 1
+fi
+
+MAKEPATH=`xcrun -find make`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find make tool"
+    return 1
+fi
+
+TOOLSPATH1=${MAKEPATH%/make}
+
+ARPATH=`xcrun -find ar`
+if [  $? -ne 0 ]; then
+    echo "ERROR: can't find ar tool"
+    return 1
+fi
+
+TOOLSPATH2=${ARPATH%/ar}
+
+SDKPATH=`xcodebuild -version -sdk macosx Path`
+
+export PATH="${TOOLSPATH1}":"${TOOLSPATH2}":/usr/local/bin:$PATH
+
+rm -f libssl.a
+rm -f libcrypto.a
+
+if [  $? -ne 0 ]; then return 1; fi
+
+export CC="${GCCPATH}";export CXX="${GPPPATH}"
+export LDFLAGS="-Wl,-sysroot,${SDKPATH},-syslibroot,${SDKPATH},-arch,i386"
+export CPPFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
+export CFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
+export SDKROOT="${SDKPATH}"
+export MACOSX_DEPLOYMENT_TARGET=10.4
+export LIBRARY_PATH="${SDKPATH}/usr/lib"
+
+./config no-shared
+if [  $? -ne 0 ]; then return 1; fi
+
+if [ "$1" = "-clean" ]; then
+    make clean
+fi
+
+make
+if [  $? -ne 0 ]; then return 1; fi
+
+export CC="";export CXX=""
+export LDFLAGS=""
+export CPPFLAGS=""
+export CFLAGS=""
+export SDKROOT=""
+
+return 0
diff --git a/mac_build/setupForBOINC.sh b/mac_build/setupForBOINC.sh
new file mode 100644
index 0000000..e71a764
--- /dev/null
+++ b/mac_build/setupForBOINC.sh
@@ -0,0 +1,217 @@
+#!/bin/sh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# Master script to build Universal Binary libraries needed by BOINC:
+# curl-7.26.0 with c-ares-1.9.1, openssl-1.0.1c and wxMac-2.8.10
+#
+# by Charlie Fenton 7/21/06
+# Updated 10/18/11 for OS 10.7 lion and XCode 4.2
+# Updated 7/6/11 for wxMac-2.8.10 and Unicode
+# Updated 6/25/12 for curl-7.26.0 and c-ares-1.9.1
+# Updated 6/26/12 for openssl-1.0.1c
+# Updated 8/3/12 for FreeType-2.4.10 and FTGL-2.1.3~rc5
+#
+# Download these three packages and place them in a common parent 
+# directory with the BOINC source tree.
+#
+## In Terminal, cd to the mac_build directory of the boinc tree; for 
+## example:
+##     cd [path]/boinc/mac_build/
+## then run this script:
+##     source setupForBoinc.sh [ -clean ]
+#
+# the -clean argument will force a full rebuild of everything.
+#
+# This script will work even if you have renamed the boinc/ directory
+#
+
+if [ "$1" = "-clean" ]; then
+  doclean="-clean"
+else
+  doclean=""
+fi
+
+caresOK="NO"
+curlOK="NO"
+opensslOK="NO"
+wxWidgetsOK="NO"
+freetypeOK="NO"
+ftglOK="NO"
+
+SCRIPT_DIR=`pwd`
+
+echo ""
+echo "----------------------------------"
+echo "------- BUILD C-ARES-1.9.1 -------"
+echo "----------------------------------"
+echo ""
+
+cd ../../c-ares-1.9.1/
+if [  $? -eq 0 ]; then
+    source "${SCRIPT_DIR}/buildc-ares.sh" ${doclean}
+    if [  $? -eq 0 ]; then
+        caresOK="YES"
+    fi
+fi
+
+echo ""
+echo "----------------------------------"
+echo "------- BUILD CURL-7.26.0 --------"
+echo "----------------------------------"
+echo ""
+
+cd "${SCRIPT_DIR}"
+
+cd ../../curl-7.26.0/
+if [  $? -eq 0 ]; then
+    source "${SCRIPT_DIR}/buildcurl.sh" ${doclean}
+    if [  $? -eq 0 ]; then
+        curlOK="YES"
+    fi
+fi
+
+echo ""
+echo "----------------------------------"
+echo "----- BUILD OPENSSL-1.0.1c -------"
+echo "----------------------------------"
+echo ""
+
+cd "${SCRIPT_DIR}"
+
+cd ../../openssl-1.0.1c/
+if [  $? -eq 0 ]; then
+    source "${SCRIPT_DIR}/buildopenssl.sh" ${doclean}
+    if [  $? -eq 0 ]; then
+        opensslOK="YES"
+    fi
+fi
+
+echo ""
+echo "----------------------------------"
+echo "------- BUILD wxMac-2.8.10 -------"
+echo "----------------------------------"
+echo ""
+
+cd "${SCRIPT_DIR}"
+
+cd ../../wxMac-2.8.10/
+if [  $? -eq 0 ]; then
+    source "${SCRIPT_DIR}/buildWxMac.sh" ${doclean}
+    if [  $? -eq 0 ]; then
+        wxWidgetsOK="YES"
+    fi
+fi
+
+echo ""
+echo "----------------------------------"
+echo "----- BUILD FreeType-2.4.10 ------"
+echo "----------------------------------"
+echo ""
+
+cd "${SCRIPT_DIR}"
+
+cd ../../freetype-2.4.10/
+if [  $? -eq 0 ]; then
+    source "${SCRIPT_DIR}/buildfreetype.sh" ${doclean}
+    if [  $? -eq 0 ]; then
+        freetypeOK="YES"
+    fi
+fi
+
+echo ""
+echo "----------------------------------"
+echo "------ BUILD FTGL-2.1.3~rc5 ------"
+echo "----------------------------------"
+echo ""
+
+cd "${SCRIPT_DIR}"
+
+cd ../../ftgl-2.1.3~rc5/
+if [  $? -eq 0 ]; then
+    source "${SCRIPT_DIR}/buildFTGL.sh" ${doclean}
+    if [  $? -eq 0 ]; then
+        ftglOK="YES"
+    fi
+fi
+
+if [ "${caresOK}" = "NO" ]; then
+    echo ""
+    echo "----------------------------------"
+    echo "------------ WARNING -------------"
+    echo "------------         -------------"
+    echo "-- COULD NOT BUILD C-ARES-1.9.1 --"
+    echo "----------------------------------"
+    echo ""
+fi
+
+if [ "${curlOK}" = "NO" ]; then
+    echo ""
+    echo "-----------------------------------"
+    echo "------------ WARNING --------------"
+    echo "------------         --------------"
+    echo "--- COULD NOT BUILD CURL-7.26.0 ---"
+    echo "-----------------------------------"
+    echo ""
+fi
+
+if [ "${opensslOK}" = "NO" ]; then
+    echo ""
+    echo "----------------------------------"
+    echo "------------ WARNING -------------"
+    echo "------------         -------------"
+    echo "- COULD NOT BUILD OPENSSL-1.0.1c -"
+    echo "----------------------------------"
+    echo ""
+fi
+
+if [ "${wxWidgetsOK}" = "NO" ]; then
+    echo ""
+    echo "----------------------------------"
+    echo "------------ WARNING -------------"
+    echo "------------         -------------"
+    echo "-- COULD NOT BUILD wxMac-2.8.10 --"
+    echo "----------------------------------"
+    echo ""
+fi
+
+if [ "${freetypeOK}" = "NO" ]; then
+    echo ""
+    echo "-----------------------------------"
+    echo "------------ WARNING --------------"
+    echo "------------         -------------"
+    echo "- COULD NOT BUILD FreeType-2.4.10 -"
+    echo "-----------------------------------"
+    echo ""
+fi
+
+if [ "${ftglOK}" = "NO" ]; then
+    echo ""
+    echo "-----------------------------------"
+    echo "------------ WARNING --------------"
+    echo "------------         -------------"
+    echo "- COULD NOT BUILD FTGL-2.1.3~rc50 -"
+    echo "-----------------------------------"
+    echo ""
+fi
+
+echo ""
+cd "${SCRIPT_DIR}"
+
+return 0
diff --git a/mac_build/wxMac-BOINC.xcodeproj/project.pbxproj b/mac_build/wxMac-BOINC.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..33e767f
--- /dev/null
+++ b/mac_build/wxMac-BOINC.xcodeproj/project.pbxproj
@@ -0,0 +1,4767 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 42;
+	objects = {
+
+/* Begin PBXAggregateTarget section */
+		4086D1FA063BC03E00D4CD53 /* Build All */ = {
+			isa = PBXAggregateTarget;
+			buildConfigurationList = 18B5B99A08564B5D002803C9 /* Build configuration list for PBXAggregateTarget "Build All" */;
+			buildPhases = (
+			);
+			dependencies = (
+				4086D203063BC05E00D4CD53 /* PBXTargetDependency */,
+				4086D207063BC05E00D4CD53 /* PBXTargetDependency */,
+			);
+			name = "Build All";
+			productName = "Build All";
+		};
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+		0A98CB6B07146A06007B4289 /* statbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A98CB6A07146A06007B4289 /* statbar.cpp */; };
+		0A98CB6D07146A06007B4289 /* statbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A98CB6A07146A06007B4289 /* statbar.cpp */; };
+		0A98CC480715CFBC007B4289 /* gdiobj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A98CC470715CFBC007B4289 /* gdiobj.cpp */; };
+		0A98CC4A0715CFBC007B4289 /* gdiobj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A98CC470715CFBC007B4289 /* gdiobj.cpp */; };
+		0A98CC4C0715D03E007B4289 /* taskbarcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA0CB57F0450773900000102 /* taskbarcmn.cpp */; };
+		0A98CC4E0715D04C007B4289 /* taskbarcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA0CB57F0450773900000102 /* taskbarcmn.cpp */; };
+		0A98CD2307172992007B4289 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A98CD2207172992007B4289 /* QuickTime.framework */; };
+		0A98CD2507172992007B4289 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A98CD2207172992007B4289 /* QuickTime.framework */; };
+		40011CBC0893D5B400E4DE95 /* utilsexc_base.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40011CBB0893D5B400E4DE95 /* utilsexc_base.cpp */; };
+		40011CBD0893D5B400E4DE95 /* utilsexc_base.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40011CBB0893D5B400E4DE95 /* utilsexc_base.cpp */; };
+		40011F3C0897D8DF00E4DE95 /* setup0.h in Headers */ = {isa = PBXBuildFile; fileRef = 40011F3B0897D8DF00E4DE95 /* setup0.h */; };
+		40011F3D0897D8DF00E4DE95 /* setup0.h in Headers */ = {isa = PBXBuildFile; fileRef = 40011F3B0897D8DF00E4DE95 /* setup0.h */; };
+		400EDEB3089D4FFD00E848D9 /* propdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 400EDEB2089D4FFD00E848D9 /* propdlg.cpp */; };
+		400EDEB4089D4FFD00E848D9 /* propdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 400EDEB2089D4FFD00E848D9 /* propdlg.cpp */; };
+		401640E607F94B2800A8837A /* imaglist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 401640E507F94B2800A8837A /* imaglist.cpp */; };
+		401640E907F94B2800A8837A /* imaglist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 401640E507F94B2800A8837A /* imaglist.cpp */; };
+		402AB25E0AFF554A00C0D0C9 /* arcall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2540AFF554A00C0D0C9 /* arcall.cpp */; };
+		402AB25F0AFF554A00C0D0C9 /* arcfind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2550AFF554A00C0D0C9 /* arcfind.cpp */; };
+		402AB2600AFF554A00C0D0C9 /* dcgraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2560AFF554A00C0D0C9 /* dcgraph.cpp */; };
+		402AB2610AFF554A00C0D0C9 /* fileback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2570AFF554A00C0D0C9 /* fileback.cpp */; };
+		402AB2620AFF554A00C0D0C9 /* filtall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2580AFF554A00C0D0C9 /* filtall.cpp */; };
+		402AB2630AFF554A00C0D0C9 /* filtfind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2590AFF554A00C0D0C9 /* filtfind.cpp */; };
+		402AB2640AFF554A00C0D0C9 /* fs_arc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB25A0AFF554A00C0D0C9 /* fs_arc.cpp */; };
+		402AB2650AFF554A00C0D0C9 /* fs_filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB25B0AFF554A00C0D0C9 /* fs_filter.cpp */; };
+		402AB2660AFF554A00C0D0C9 /* overlaycmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB25C0AFF554A00C0D0C9 /* overlaycmn.cpp */; };
+		402AB2670AFF554A00C0D0C9 /* tarstrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB25D0AFF554A00C0D0C9 /* tarstrm.cpp */; };
+		402AB2680AFF554A00C0D0C9 /* arcall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2540AFF554A00C0D0C9 /* arcall.cpp */; };
+		402AB2690AFF554A00C0D0C9 /* arcfind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2550AFF554A00C0D0C9 /* arcfind.cpp */; };
+		402AB26A0AFF554A00C0D0C9 /* dcgraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2560AFF554A00C0D0C9 /* dcgraph.cpp */; };
+		402AB26B0AFF554A00C0D0C9 /* fileback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2570AFF554A00C0D0C9 /* fileback.cpp */; };
+		402AB26C0AFF554A00C0D0C9 /* filtall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2580AFF554A00C0D0C9 /* filtall.cpp */; };
+		402AB26D0AFF554A00C0D0C9 /* filtfind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2590AFF554A00C0D0C9 /* filtfind.cpp */; };
+		402AB26E0AFF554A00C0D0C9 /* fs_arc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB25A0AFF554A00C0D0C9 /* fs_arc.cpp */; };
+		402AB26F0AFF554A00C0D0C9 /* fs_filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB25B0AFF554A00C0D0C9 /* fs_filter.cpp */; };
+		402AB2700AFF554A00C0D0C9 /* overlaycmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB25C0AFF554A00C0D0C9 /* overlaycmn.cpp */; };
+		402AB2710AFF554A00C0D0C9 /* tarstrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB25D0AFF554A00C0D0C9 /* tarstrm.cpp */; };
+		402AB2730AFF55AF00C0D0C9 /* overlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2720AFF55AF00C0D0C9 /* overlay.cpp */; };
+		402AB2740AFF55B000C0D0C9 /* overlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2720AFF55AF00C0D0C9 /* overlay.cpp */; };
+		402AB2760AFF55E300C0D0C9 /* collpaneg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2750AFF55E300C0D0C9 /* collpaneg.cpp */; };
+		402AB2770AFF55E300C0D0C9 /* collpaneg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB2750AFF55E300C0D0C9 /* collpaneg.cpp */; };
+		402AB27D0AFF567500C0D0C9 /* xh_animatctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB27A0AFF567500C0D0C9 /* xh_animatctrl.cpp */; };
+		402AB27E0AFF567600C0D0C9 /* xh_collpane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB27B0AFF567500C0D0C9 /* xh_collpane.cpp */; };
+		402AB27F0AFF567600C0D0C9 /* xh_htmllbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB27C0AFF567500C0D0C9 /* xh_htmllbox.cpp */; };
+		402AB2800AFF567600C0D0C9 /* xh_animatctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB27A0AFF567500C0D0C9 /* xh_animatctrl.cpp */; };
+		402AB2810AFF567600C0D0C9 /* xh_collpane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB27B0AFF567500C0D0C9 /* xh_collpane.cpp */; };
+		402AB2820AFF567600C0D0C9 /* xh_htmllbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB27C0AFF567500C0D0C9 /* xh_htmllbox.cpp */; };
+		402AB42B0AFF574600C0D0C9 /* imagtga.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB42A0AFF574600C0D0C9 /* imagtga.cpp */; };
+		402AB42C0AFF574600C0D0C9 /* imagtga.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 402AB42A0AFF574600C0D0C9 /* imagtga.cpp */; };
+		403F73950AC9985500FF2BCB /* listctrl_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 403F73940AC9985500FF2BCB /* listctrl_mac.cpp */; };
+		403F73960AC9985500FF2BCB /* listctrl_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 403F73940AC9985500FF2BCB /* listctrl_mac.cpp */; };
+		403F73980AC9986E00FF2BCB /* listctrlcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 403F73970AC9986E00FF2BCB /* listctrlcmn.cpp */; };
+		403F73990AC9986E00FF2BCB /* listctrlcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 403F73970AC9986E00FF2BCB /* listctrlcmn.cpp */; };
+		404DAED40ADD137500687775 /* aboutdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DAED30ADD137500687775 /* aboutdlg.cpp */; };
+		404DAED50ADD137500687775 /* aboutdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DAED30ADD137500687775 /* aboutdlg.cpp */; };
+		404DAED70ADD138E00687775 /* animateg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DAED60ADD138E00687775 /* animateg.cpp */; };
+		404DAED80ADD138E00687775 /* animateg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DAED60ADD138E00687775 /* animateg.cpp */; };
+		404DAEDC0ADD13E600687775 /* anidecod.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DAEDA0ADD13E600687775 /* anidecod.cpp */; };
+		404DAEDD0ADD13E600687775 /* animatecmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DAEDB0ADD13E600687775 /* animatecmn.cpp */; };
+		404DAEDE0ADD13E600687775 /* anidecod.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DAEDA0ADD13E600687775 /* anidecod.cpp */; };
+		404DAEDF0ADD13E600687775 /* animatecmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DAEDB0ADD13E600687775 /* animatecmn.cpp */; };
+		404DAEEB0ADD143200687775 /* aboutdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DAEEA0ADD143200687775 /* aboutdlgg.cpp */; };
+		404DAEEC0ADD143200687775 /* aboutdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DAEEA0ADD143200687775 /* aboutdlgg.cpp */; };
+		404DB0EC0ADD36E900687775 /* richtextformatdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DB0DE0ADD36E800687775 /* richtextformatdlg.cpp */; };
+		404DB1630ADD3EC100687775 /* richtextbuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F185B90AB722BC00E3BEF9 /* richtextbuffer.cpp */; };
+		404DB1640ADD3EC100687775 /* richtextctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F185BA0AB722BC00E3BEF9 /* richtextctrl.cpp */; };
+		404DB1650ADD3EC200687775 /* richtexthtml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F185BB0AB722BC00E3BEF9 /* richtexthtml.cpp */; };
+		404DB1660ADD3EC200687775 /* richtextstyles.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F185BC0AB722BC00E3BEF9 /* richtextstyles.cpp */; };
+		404DB1670ADD3EC300687775 /* richtextxml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F185BD0AB722BC00E3BEF9 /* richtextxml.cpp */; };
+		404DB2500ADD40EA00687775 /* richtextformatdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DB0DE0ADD36E800687775 /* richtextformatdlg.cpp */; };
+		404DB2640ADD41B300687775 /* richtextsymboldlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DB2630ADD41B300687775 /* richtextsymboldlg.cpp */; };
+		404DB2650ADD41B300687775 /* richtextsymboldlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DB2630ADD41B300687775 /* richtextsymboldlg.cpp */; };
+		404DB2720ADD429D00687775 /* dcbufcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DB2710ADD429D00687775 /* dcbufcmn.cpp */; };
+		404DB2730ADD429D00687775 /* dcbufcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 404DB2710ADD429D00687775 /* dcbufcmn.cpp */; };
+		4054154E0AB6A0B000450E09 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 405415210AB6A0B000450E09 /* WebKit.framework */; };
+		4054154F0AB6A0B000450E09 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 405415210AB6A0B000450E09 /* WebKit.framework */; };
+		405DD168063C2BFC00F579EE /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 405DD167063C2BFC00F579EE /* libiconv.dylib */; };
+		40607C1607493C3F00DC0420 /* archive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40607C1407493C3F00DC0420 /* archive.cpp */; };
+		40607C1A07493C3F00DC0420 /* archive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40607C1407493C3F00DC0420 /* archive.cpp */; };
+		40607C760749432A00DC0420 /* gsockosx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40607C740749432A00DC0420 /* gsockosx.cpp */; };
+		40607C770749432A00DC0420 /* utilsexc_cf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40607C750749432A00DC0420 /* utilsexc_cf.cpp */; };
+		40607C7A0749432A00DC0420 /* gsockosx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40607C740749432A00DC0420 /* gsockosx.cpp */; };
+		40607C7B0749432B00DC0420 /* utilsexc_cf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40607C750749432A00DC0420 /* utilsexc_cf.cpp */; };
+		40670A8407377A6400F7C08C /* cfstring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A8207377A6300F7C08C /* cfstring.cpp */; };
+		40670A8507377A6400F7C08C /* stdpaths_cf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A8307377A6300F7C08C /* stdpaths_cf.cpp */; };
+		40670A8807377A6400F7C08C /* cfstring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A8207377A6300F7C08C /* cfstring.cpp */; };
+		40670A8907377A6400F7C08C /* stdpaths_cf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A8307377A6300F7C08C /* stdpaths_cf.cpp */; };
+		40670A9707377B1000F7C08C /* gbsizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A9307377B1000F7C08C /* gbsizer.cpp */; };
+		40670A9807377B1000F7C08C /* sstream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A9407377B1000F7C08C /* sstream.cpp */; };
+		40670A9907377B1000F7C08C /* stdpbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A9507377B1000F7C08C /* stdpbase.cpp */; };
+		40670A9A07377B1000F7C08C /* uri.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A9607377B1000F7C08C /* uri.cpp */; };
+		40670A9F07377B1000F7C08C /* gbsizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A9307377B1000F7C08C /* gbsizer.cpp */; };
+		40670AA007377B1000F7C08C /* sstream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A9407377B1000F7C08C /* sstream.cpp */; };
+		40670AA107377B1000F7C08C /* stdpbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A9507377B1000F7C08C /* stdpbase.cpp */; };
+		40670AA207377B1000F7C08C /* uri.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40670A9607377B1000F7C08C /* uri.cpp */; };
+		4067EF250ACD43BC004A2D14 /* graphcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4067EF240ACD43BC004A2D14 /* graphcmn.cpp */; };
+		4067EF260ACD43BC004A2D14 /* graphcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4067EF240ACD43BC004A2D14 /* graphcmn.cpp */; };
+		4067EFC10ACD5306004A2D14 /* xh_bmpcbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4067EFC00ACD5306004A2D14 /* xh_bmpcbox.cpp */; };
+		4067EFC20ACD5306004A2D14 /* xh_bmpcbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4067EFC00ACD5306004A2D14 /* xh_bmpcbox.cpp */; };
+		4067EFC50ACD53B1004A2D14 /* bmpcboxg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4067EFC40ACD53B1004A2D14 /* bmpcboxg.cpp */; };
+		4067EFC60ACD53B1004A2D14 /* bmpcboxg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4067EFC40ACD53B1004A2D14 /* bmpcboxg.cpp */; };
+		4067EFC90ACD53ED004A2D14 /* graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4067EFC80ACD53ED004A2D14 /* graphics.cpp */; };
+		4067EFCA0ACD53ED004A2D14 /* graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4067EFC80ACD53ED004A2D14 /* graphics.cpp */; };
+		407A90F7065742ED00F01665 /* spinctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407A90F6065742ED00F01665 /* spinctrl.cpp */; };
+		407A90FA065742ED00F01665 /* spinctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407A90F6065742ED00F01665 /* spinctrl.cpp */; };
+		407C6ADD0A899E260056252A /* auibook.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407C6AD70A899E260056252A /* auibook.cpp */; };
+		407C6ADE0A899E260056252A /* dockart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407C6AD90A899E260056252A /* dockart.cpp */; };
+		407C6ADF0A899E260056252A /* floatpane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407C6ADA0A899E260056252A /* floatpane.cpp */; };
+		407C6AE00A899E260056252A /* framemanager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407C6ADB0A899E260056252A /* framemanager.cpp */; };
+		407C6AE10A899E260056252A /* tabmdi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407C6ADC0A899E260056252A /* tabmdi.cpp */; };
+		407C6AE20A899E260056252A /* auibook.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407C6AD70A899E260056252A /* auibook.cpp */; };
+		407C6AE40A899E260056252A /* dockart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407C6AD90A899E260056252A /* dockart.cpp */; };
+		407C6AE50A899E260056252A /* floatpane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407C6ADA0A899E260056252A /* floatpane.cpp */; };
+		407C6AE60A899E260056252A /* framemanager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407C6ADB0A899E260056252A /* framemanager.cpp */; };
+		407C6AE70A899E260056252A /* tabmdi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 407C6ADC0A899E260056252A /* tabmdi.cpp */; };
+		4086C745063AB2FF00D4CD53 /* setup.h in Headers */ = {isa = PBXBuildFile; fileRef = F5FD822102CCECE601000133 /* setup.h */; };
+		4086C747063AB2FF00D4CD53 /* file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600801FA022B0175ACA7 /* file.cpp */; };
+		4086C748063AB2FF00D4CD53 /* appcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FDF01FA022B0175ACA7 /* appcmn.cpp */; };
+		4086C749063AB2FF00D4CD53 /* bmpbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE101FA022B0175ACA7 /* bmpbase.cpp */; };
+		4086C74A063AB2FF00D4CD53 /* choiccmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE201FA022B0175ACA7 /* choiccmn.cpp */; };
+		4086C74B063AB2FF00D4CD53 /* clipcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE301FA022B0175ACA7 /* clipcmn.cpp */; };
+		4086C74C063AB2FF00D4CD53 /* clntdata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE401FA022B0175ACA7 /* clntdata.cpp */; };
+		4086C74D063AB2FF00D4CD53 /* cmdline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE501FA022B0175ACA7 /* cmdline.cpp */; };
+		4086C74E063AB2FF00D4CD53 /* cmdproc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE601FA022B0175ACA7 /* cmdproc.cpp */; };
+		4086C74F063AB2FF00D4CD53 /* config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE801FA022B0175ACA7 /* config.cpp */; };
+		4086C750063AB2FF00D4CD53 /* containr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE901FA022B0175ACA7 /* containr.cpp */; };
+		4086C751063AB2FF00D4CD53 /* cmndata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE701FA022B0175ACA7 /* cmndata.cpp */; };
+		4086C752063AB2FF00D4CD53 /* dseldlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FFE01FA022B0175ACA7 /* dseldlg.cpp */; };
+		4086C753063AB2FF00D4CD53 /* docview.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FFB01FA022B0175ACA7 /* docview.cpp */; };
+		4086C754063AB2FF00D4CD53 /* docmdi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FFA01FA022B0175ACA7 /* docmdi.cpp */; };
+		4086C755063AB2FF00D4CD53 /* dobjcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF901FA022B0175ACA7 /* dobjcmn.cpp */; };
+		4086C756063AB2FF00D4CD53 /* dndcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF801FA022B0175ACA7 /* dndcmn.cpp */; };
+		4086C757063AB2FF00D4CD53 /* dlgcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF701FA022B0175ACA7 /* dlgcmn.cpp */; };
+		4086C758063AB2FF00D4CD53 /* dircmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF601FA022B0175ACA7 /* dircmn.cpp */; };
+		4086C759063AB2FF00D4CD53 /* dcbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF401FA022B0175ACA7 /* dcbase.cpp */; };
+		4086C75A063AB2FF00D4CD53 /* dbtable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF301FA022B0175ACA7 /* dbtable.cpp */; };
+		4086C75B063AB2FF00D4CD53 /* db.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF101FA022B0175ACA7 /* db.cpp */; };
+		4086C75C063AB2FF00D4CD53 /* datstrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF001FA022B0175ACA7 /* datstrm.cpp */; };
+		4086C75D063AB2FF00D4CD53 /* datetime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FEF01FA022B0175ACA7 /* datetime.cpp */; };
+		4086C75E063AB2FF00D4CD53 /* ctrlsub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FEC01FA022B0175ACA7 /* ctrlsub.cpp */; };
+		4086C75F063AB2FF00D4CD53 /* ctrlcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FEB01FA022B0175ACA7 /* ctrlcmn.cpp */; };
+		4086C760063AB2FF00D4CD53 /* cshelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FEA01FA022B0175ACA7 /* cshelp.cpp */; };
+		4086C761063AB2FF00D4CD53 /* dynload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600101FA022B0175ACA7 /* dynload.cpp */; };
+		4086C762063AB2FF00D4CD53 /* dynlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600001FA022B0175ACA7 /* dynlib.cpp */; };
+		4086C763063AB2FF00D4CD53 /* dynarray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FFF01FA022B0175ACA7 /* dynarray.cpp */; };
+		4086C764063AB2FF00D4CD53 /* ffile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600701FA022B0175ACA7 /* ffile.cpp */; };
+		4086C765063AB2FF00D4CD53 /* fddlgcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600601FA022B0175ACA7 /* fddlgcmn.cpp */; };
+		4086C766063AB2FF00D4CD53 /* extended.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600501FA022B0175ACA7 /* extended.c */; };
+		4086C767063AB2FF00D4CD53 /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600401FA022B0175ACA7 /* event.cpp */; };
+		4086C768063AB2FF00D4CD53 /* encconv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600301FA022B0175ACA7 /* encconv.cpp */; };
+		4086C769063AB2FF00D4CD53 /* effects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600201FA022B0175ACA7 /* effects.cpp */; };
+		4086C76A063AB2FF00D4CD53 /* imagjpeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602101FA022B0175ACA7 /* imagjpeg.cpp */; };
+		4086C76B063AB2FF00D4CD53 /* imagiff.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602001FA022B0175ACA7 /* imagiff.cpp */; };
+		4086C76C063AB2FF00D4CD53 /* imaggif.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601F01FA022B0175ACA7 /* imaggif.cpp */; };
+		4086C76D063AB2FF00D4CD53 /* image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601E01FA022B0175ACA7 /* image.cpp */; };
+		4086C76E063AB2FF00D4CD53 /* imagbmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601D01FA022B0175ACA7 /* imagbmp.cpp */; };
+		4086C76F063AB2FF00D4CD53 /* imagall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601C01FA022B0175ACA7 /* imagall.cpp */; };
+		4086C770063AB2FF00D4CD53 /* http.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601B01FA022B0175ACA7 /* http.cpp */; };
+		4086C771063AB2FF00D4CD53 /* helpbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601A01FA022B0175ACA7 /* helpbase.cpp */; };
+		4086C772063AB2FF00D4CD53 /* hash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601901FA022B0175ACA7 /* hash.cpp */; };
+		4086C773063AB2FF00D4CD53 /* gifdecod.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601701FA022B0175ACA7 /* gifdecod.cpp */; };
+		4086C774063AB2FF00D4CD53 /* geometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601601FA022B0175ACA7 /* geometry.cpp */; };
+		4086C775063AB2FF00D4CD53 /* gdicmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601501FA022B0175ACA7 /* gdicmn.cpp */; };
+		4086C776063AB2FF00D4CD53 /* gaugecmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601401FA022B0175ACA7 /* gaugecmn.cpp */; };
+		4086C777063AB2FF00D4CD53 /* ftp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601301FA022B0175ACA7 /* ftp.cpp */; };
+		4086C779063AB2FF00D4CD53 /* fs_mem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601101FA022B0175ACA7 /* fs_mem.cpp */; };
+		4086C77A063AB2FF00D4CD53 /* fs_inet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601001FA022B0175ACA7 /* fs_inet.cpp */; };
+		4086C77B063AB2FF00D4CD53 /* framecmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600F01FA022B0175ACA7 /* framecmn.cpp */; };
+		4086C77C063AB2FF00D4CD53 /* fontmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600E01FA022B0175ACA7 /* fontmap.cpp */; };
+		4086C77D063AB2FF00D4CD53 /* fontcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600D01FA022B0175ACA7 /* fontcmn.cpp */; };
+		4086C77E063AB2FF00D4CD53 /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600C01FA022B0175ACA7 /* filesys.cpp */; };
+		4086C77F063AB2FF00D4CD53 /* filename.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600B01FA022B0175ACA7 /* filename.cpp */; };
+		4086C780063AB2FF00D4CD53 /* filefn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600A01FA022B0175ACA7 /* filefn.cpp */; };
+		4086C781063AB2FF00D4CD53 /* fileconf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600901FA022B0175ACA7 /* fileconf.cpp */; };
+		4086C782063AB2FF00D4CD53 /* imagpcx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602201FA022B0175ACA7 /* imagpcx.cpp */; };
+		4086C783063AB2FF00D4CD53 /* imagpng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602301FA022B0175ACA7 /* imagpng.cpp */; };
+		4086C784063AB2FF00D4CD53 /* imagpnm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602401FA022B0175ACA7 /* imagpnm.cpp */; };
+		4086C785063AB2FF00D4CD53 /* imagtiff.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602501FA022B0175ACA7 /* imagtiff.cpp */; };
+		4086C786063AB2FF00D4CD53 /* imagxpm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602601FA022B0175ACA7 /* imagxpm.cpp */; };
+		4086C787063AB2FF00D4CD53 /* intl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602801FA022B0175ACA7 /* intl.cpp */; };
+		4086C788063AB2FF00D4CD53 /* ipcbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602901FA022B0175ACA7 /* ipcbase.cpp */; };
+		4086C789063AB2FF00D4CD53 /* layout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602A01FA022B0175ACA7 /* layout.cpp */; };
+		4086C78A063AB2FF00D4CD53 /* lboxcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602B01FA022B0175ACA7 /* lboxcmn.cpp */; };
+		4086C78B063AB2FF00D4CD53 /* list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602E01FA022B0175ACA7 /* list.cpp */; };
+		4086C78C063AB2FF00D4CD53 /* log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602F01FA022B0175ACA7 /* log.cpp */; };
+		4086C78D063AB2FF00D4CD53 /* longlong.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603001FA022B0175ACA7 /* longlong.cpp */; };
+		4086C78E063AB2FF00D4CD53 /* matrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603101FA022B0175ACA7 /* matrix.cpp */; };
+		4086C78F063AB2FF00D4CD53 /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603201FA022B0175ACA7 /* memory.cpp */; };
+		4086C790063AB2FF00D4CD53 /* menucmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603301FA022B0175ACA7 /* menucmn.cpp */; };
+		4086C791063AB2FF00D4CD53 /* mimecmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603401FA022B0175ACA7 /* mimecmn.cpp */; };
+		4086C792063AB2FF00D4CD53 /* nbkbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603701FA022B0175ACA7 /* nbkbase.cpp */; };
+		4086C793063AB2FF00D4CD53 /* module.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603501FA022B0175ACA7 /* module.cpp */; };
+		4086C794063AB2FF00D4CD53 /* mstream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603601FA022B0175ACA7 /* mstream.cpp */; };
+		4086C795063AB2FF00D4CD53 /* object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603801FA022B0175ACA7 /* object.cpp */; };
+		4086C796063AB2FF00D4CD53 /* popupcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603D01FA022C0175ACA7 /* popupcmn.cpp */; };
+		4086C797063AB2FF00D4CD53 /* prntbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603E01FA022C0175ACA7 /* prntbase.cpp */; };
+		4086C798063AB2FF00D4CD53 /* paper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603A01FA022B0175ACA7 /* paper.cpp */; };
+		4086C799063AB2FF00D4CD53 /* sckaddr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604601FA022C0175ACA7 /* sckaddr.cpp */; };
+		4086C79A063AB2FF00D4CD53 /* regex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604301FA022C0175ACA7 /* regex.cpp */; };
+		4086C79B063AB2FF00D4CD53 /* quantize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604101FA022C0175ACA7 /* quantize.cpp */; };
+		4086C79C063AB2FF00D4CD53 /* protocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604001FA022C0175ACA7 /* protocol.cpp */; };
+		4086C79D063AB2FF00D4CD53 /* process.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603F01FA022C0175ACA7 /* process.cpp */; };
+		4086C79E063AB2FF00D4CD53 /* sckfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604701FA022C0175ACA7 /* sckfile.cpp */; };
+		4086C79F063AB2FF00D4CD53 /* sckipc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604801FA022C0175ACA7 /* sckipc.cpp */; };
+		4086C7A0063AB2FF00D4CD53 /* sckstrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604901FA022C0175ACA7 /* sckstrm.cpp */; };
+		4086C7A1063AB2FF00D4CD53 /* sizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604A01FA022C0175ACA7 /* sizer.cpp */; };
+		4086C7A2063AB2FF00D4CD53 /* socket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604B01FA022C0175ACA7 /* socket.cpp */; };
+		4086C7A3063AB2FF00D4CD53 /* stockitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604C01FA022C0175ACA7 /* stockitem.cpp */; };
+		4086C7A4063AB2FF00D4CD53 /* strconv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604D01FA022C0175ACA7 /* strconv.cpp */; };
+		4086C7A5063AB2FF00D4CD53 /* stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604E01FA022C0175ACA7 /* stream.cpp */; };
+		4086C7A6063AB2FF00D4CD53 /* string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604F01FA022C0175ACA7 /* string.cpp */; };
+		4086C7A7063AB2FF00D4CD53 /* sysopt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605001FA022C0175ACA7 /* sysopt.cpp */; };
+		4086C7A8063AB2FF00D4CD53 /* tbarbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605101FA022C0175ACA7 /* tbarbase.cpp */; };
+		4086C7A9063AB2FF00D4CD53 /* textbuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605201FA022C0175ACA7 /* textbuf.cpp */; };
+		4086C7AA063AB2FF00D4CD53 /* textcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605301FA022C0175ACA7 /* textcmn.cpp */; };
+		4086C7AB063AB2FF00D4CD53 /* textfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605401FA022C0175ACA7 /* textfile.cpp */; };
+		4086C7AC063AB2FF00D4CD53 /* timercmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605501FA022C0175ACA7 /* timercmn.cpp */; };
+		4086C7AD063AB2FF00D4CD53 /* tokenzr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605601FA022C0175ACA7 /* tokenzr.cpp */; };
+		4086C7AE063AB2FF00D4CD53 /* toplvcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605701FA022C0175ACA7 /* toplvcmn.cpp */; };
+		4086C7AF063AB2FF00D4CD53 /* treebase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605801FA022C0175ACA7 /* treebase.cpp */; };
+		4086C7B0063AB2FF00D4CD53 /* txtstrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605901FA022C0175ACA7 /* txtstrm.cpp */; };
+		4086C7B3063AB2FF00D4CD53 /* url.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605D01FA022C0175ACA7 /* url.cpp */; };
+		4086C7B4063AB2FF00D4CD53 /* valgen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605F01FA022C0175ACA7 /* valgen.cpp */; };
+		4086C7B5063AB2FF00D4CD53 /* validate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606001FA022C0175ACA7 /* validate.cpp */; };
+		4086C7B6063AB2FF00D4CD53 /* valtext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606101FA022C0175ACA7 /* valtext.cpp */; };
+		4086C7B7063AB2FF00D4CD53 /* variant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606201FA022C0175ACA7 /* variant.cpp */; };
+		4086C7B8063AB2FF00D4CD53 /* wfstream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606301FA022C0175ACA7 /* wfstream.cpp */; };
+		4086C7B9063AB2FF00D4CD53 /* wxchar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606501FA022C0175ACA7 /* wxchar.cpp */; };
+		4086C7BA063AB2FF00D4CD53 /* xpmdecod.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606701FA022C0175ACA7 /* xpmdecod.cpp */; };
+		4086C7BB063AB2FF00D4CD53 /* zipstrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606801FA022C0175ACA7 /* zipstrm.cpp */; };
+		4086C7BC063AB2FF00D4CD53 /* wincmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606401FA022C0175ACA7 /* wincmn.cpp */; };
+		4086C7BD063AB2FF00D4CD53 /* zstream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606901FA022C0175ACA7 /* zstream.cpp */; };
+		4086C7BE063AB2FF00D4CD53 /* busyinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607001FA022C0175ACA7 /* busyinfo.cpp */; };
+		4086C7BF063AB2FF00D4CD53 /* calctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607101FA022C0175ACA7 /* calctrl.cpp */; };
+		4086C7C0063AB2FF00D4CD53 /* caret.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607201FA022C0175ACA7 /* caret.cpp */; };
+		4086C7C1063AB2FF00D4CD53 /* choicdgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607301FA022C0175ACA7 /* choicdgg.cpp */; };
+		4086C7C2063AB2FF00D4CD53 /* grid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607D01FA022C0175ACA7 /* grid.cpp */; };
+		4086C7C3063AB2FF00D4CD53 /* fontdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607C01FA022C0175ACA7 /* fontdlgg.cpp */; };
+		4086C7C4063AB2FF00D4CD53 /* fdrepdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607A01FA022C0175ACA7 /* fdrepdlg.cpp */; };
+		4086C7C5063AB2FF00D4CD53 /* dragimgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607901FA022C0175ACA7 /* dragimgg.cpp */; };
+		4086C7C6063AB2FF00D4CD53 /* dirdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607801FA022C0175ACA7 /* dirdlgg.cpp */; };
+		4086C7C7063AB2FF00D4CD53 /* dirctrlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607701FA022C0175ACA7 /* dirctrlg.cpp */; };
+		4086C7C8063AB2FF00D4CD53 /* dcpsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607501FA022C0175ACA7 /* dcpsg.cpp */; };
+		4086C7C9063AB2FF00D4CD53 /* colrdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607401FA022C0175ACA7 /* colrdlgg.cpp */; };
+		4086C7CA063AB2FF00D4CD53 /* printps.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608E01FA022C0175ACA7 /* printps.cpp */; };
+		4086C7CB063AB2FF00D4CD53 /* panelg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608D01FA022C0175ACA7 /* panelg.cpp */; };
+		4086C7CC063AB2FF00D4CD53 /* numdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608B01FA022C0175ACA7 /* numdlgg.cpp */; };
+		4086C7CE063AB2FF00D4CD53 /* logg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608801FA022C0175ACA7 /* logg.cpp */; };
+		4086C7CF063AB2FF00D4CD53 /* listctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608701FA022C0175ACA7 /* listctrl.cpp */; };
+		4086C7D0063AB2FF00D4CD53 /* laywin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608601FA022C0175ACA7 /* laywin.cpp */; };
+		4086C7D2063AB2FF00D4CD53 /* helpext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608101FA022C0175ACA7 /* helpext.cpp */; };
+		4086C7D3063AB2FF00D4CD53 /* gridsel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608001FA022C0175ACA7 /* gridsel.cpp */; };
+		4086C7D4063AB2FF00D4CD53 /* gridctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607E01FA022C0175ACA7 /* gridctrl.cpp */; };
+		4086C7D5063AB2FF00D4CD53 /* prntdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608F01FA022C0175ACA7 /* prntdlgg.cpp */; };
+		4086C7D6063AB2FF00D4CD53 /* wizard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A860A201FA022C0175ACA7 /* wizard.cpp */; };
+		4086C7D7063AB2FF00D4CD53 /* treectlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A860A001FA022C0175ACA7 /* treectlg.cpp */; };
+		4086C7D8063AB2FF00D4CD53 /* tipwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609F01FA022C0175ACA7 /* tipwin.cpp */; };
+		4086C7D9063AB2FF00D4CD53 /* tipdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609E01FA022C0175ACA7 /* tipdlg.cpp */; };
+		4086C7DA063AB2FF00D4CD53 /* textdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609D01FA022C0175ACA7 /* textdlgg.cpp */; };
+		4086C7DB063AB2FF00D4CD53 /* tabg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609B01FA022C0175ACA7 /* tabg.cpp */; };
+		4086C7DC063AB2FF00D4CD53 /* statusbr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609A01FA022C0175ACA7 /* statusbr.cpp */; };
+		4086C7DD063AB2FF00D4CD53 /* splitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609801FA022C0175ACA7 /* splitter.cpp */; };
+		4086C7DE063AB2FF00D4CD53 /* splash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609701FA022C0175ACA7 /* splash.cpp */; };
+		4086C7E0063AB2FF00D4CD53 /* scrlwing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609501FA022C0175ACA7 /* scrlwing.cpp */; };
+		4086C7E1063AB2FF00D4CD53 /* sashwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609401FA022C0175ACA7 /* sashwin.cpp */; };
+		4086C7E2063AB2FF00D4CD53 /* progdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609001FA022C0175ACA7 /* progdlgg.cpp */; };
+		4086C7E3063AB2FF00D4CD53 /* helpctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610401FA022C0175ACA7 /* helpctrl.cpp */; };
+		4086C7E4063AB2FF00D4CD53 /* helpdata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610501FA022C0175ACA7 /* helpdata.cpp */; };
+		4086C7E5063AB2FF00D4CD53 /* helpfrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610601FA022C0175ACA7 /* helpfrm.cpp */; };
+		4086C7E6063AB2FF00D4CD53 /* htmlcell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610701FA022C0175ACA7 /* htmlcell.cpp */; };
+		4086C7E7063AB2FF00D4CD53 /* m_fonts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610E01FA022C0175ACA7 /* m_fonts.cpp */; };
+		4086C7E8063AB2FF00D4CD53 /* m_dflist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610D01FA022C0175ACA7 /* m_dflist.cpp */; };
+		4086C7E9063AB2FF00D4CD53 /* htmprint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610C01FA022C0175ACA7 /* htmprint.cpp */; };
+		4086C7EA063AB2FF00D4CD53 /* htmlwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610B01FA022C0175ACA7 /* htmlwin.cpp */; };
+		4086C7EB063AB2FF00D4CD53 /* htmltag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610A01FA022C0175ACA7 /* htmltag.cpp */; };
+		4086C7EC063AB2FF00D4CD53 /* htmlpars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610901FA022C0175ACA7 /* htmlpars.cpp */; };
+		4086C7ED063AB2FF00D4CD53 /* htmlfilt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610801FA022C0175ACA7 /* htmlfilt.cpp */; };
+		4086C7EE063AB2FF00D4CD53 /* m_hline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610F01FA022C0175ACA7 /* m_hline.cpp */; };
+		4086C7EF063AB2FF00D4CD53 /* winpars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611701FA022C0175ACA7 /* winpars.cpp */; };
+		4086C7F0063AB2FF00D4CD53 /* m_tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611601FA022C0175ACA7 /* m_tables.cpp */; };
+		4086C7F1063AB2FF00D4CD53 /* m_pre.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611501FA022C0175ACA7 /* m_pre.cpp */; };
+		4086C7F2063AB2FF00D4CD53 /* m_list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611301FA022C0175ACA7 /* m_list.cpp */; };
+		4086C7F3063AB2FF00D4CD53 /* m_links.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611201FA022C0175ACA7 /* m_links.cpp */; };
+		4086C7F4063AB2FF00D4CD53 /* m_layout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611101FA022C0175ACA7 /* m_layout.cpp */; };
+		4086C7F5063AB2FF00D4CD53 /* m_image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611001FA022C0175ACA7 /* m_image.cpp */; };
+		4086C7F6063AB2FF00D4CD53 /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615B01FA022C0175ACA7 /* jdcolor.c */; };
+		4086C7F7063AB2FF00D4CD53 /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615901FA022C0175ACA7 /* jdatasrc.c */; };
+		4086C7F8063AB2FF00D4CD53 /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615A01FA022C0175ACA7 /* jdcoefct.c */; };
+		4086C7F9063AB2FF00D4CD53 /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615801FA022C0175ACA7 /* jdatadst.c */; };
+		4086C7FA063AB2FF00D4CD53 /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615701FA022C0175ACA7 /* jdapistd.c */; };
+		4086C7FB063AB2FF00D4CD53 /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615601FA022C0175ACA7 /* jdapimin.c */; };
+		4086C7FC063AB2FF00D4CD53 /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615501FA022C0175ACA7 /* jctrans.c */; };
+		4086C7FD063AB2FF00D4CD53 /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615401FA022C0175ACA7 /* jcsample.c */; };
+		4086C7FE063AB2FF00D4CD53 /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615301FA022C0175ACA7 /* jcprepct.c */; };
+		4086C7FF063AB2FF00D4CD53 /* jcphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615201FA022C0175ACA7 /* jcphuff.c */; };
+		4086C800063AB2FF00D4CD53 /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615101FA022C0175ACA7 /* jcparam.c */; };
+		4086C801063AB2FF00D4CD53 /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614E01FA022C0175ACA7 /* jcomapi.c */; };
+		4086C802063AB2FF00D4CD53 /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614D01FA022C0175ACA7 /* jcmaster.c */; };
+		4086C803063AB2FF00D4CD53 /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614C01FA022C0175ACA7 /* jcmarker.c */; };
+		4086C804063AB2FF00D4CD53 /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614B01FA022C0175ACA7 /* jcmainct.c */; };
+		4086C805063AB2FF00D4CD53 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614A01FA022C0175ACA7 /* jcinit.c */; };
+		4086C806063AB2FF00D4CD53 /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614801FA022C0175ACA7 /* jchuff.c */; };
+		4086C807063AB2FF00D4CD53 /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614701FA022C0175ACA7 /* jcdctmgr.c */; };
+		4086C808063AB2FF00D4CD53 /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614601FA022C0175ACA7 /* jccolor.c */; };
+		4086C809063AB2FF00D4CD53 /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614501FA022C0175ACA7 /* jccoefct.c */; };
+		4086C80A063AB2FF00D4CD53 /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614401FA022C0175ACA7 /* jcapistd.c */; };
+		4086C80B063AB2FF00D4CD53 /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614301FA022C0175ACA7 /* jcapimin.c */; };
+		4086C80C063AB2FF00D4CD53 /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615D01FA022C0175ACA7 /* jddctmgr.c */; };
+		4086C80D063AB2FF00D4CD53 /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8618F01FA022C0175ACA7 /* jutils.c */; };
+		4086C80E063AB2FF00D4CD53 /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8618E01FA022C0175ACA7 /* jquant2.c */; };
+		4086C80F063AB2FF00D4CD53 /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8618D01FA022C0175ACA7 /* jquant1.c */; };
+		4086C810063AB2FF00D4CD53 /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8617901FA022C0175ACA7 /* jmemnobs.c */; };
+		4086C811063AB2FF00D4CD53 /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8617701FA022C0175ACA7 /* jmemmgr.c */; };
+		4086C812063AB2FF00D4CD53 /* jidctred.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8617101FA022C0175ACA7 /* jidctred.c */; };
+		4086C813063AB2FF00D4CD53 /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8617001FA022C0175ACA7 /* jidctint.c */; };
+		4086C814063AB2FF00D4CD53 /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616F01FA022C0175ACA7 /* jidctfst.c */; };
+		4086C815063AB2FF00D4CD53 /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616E01FA022C0175ACA7 /* jidctflt.c */; };
+		4086C816063AB2FF00D4CD53 /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616D01FA022C0175ACA7 /* jfdctint.c */; };
+		4086C817063AB2FF00D4CD53 /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616C01FA022C0175ACA7 /* jfdctfst.c */; };
+		4086C818063AB2FF00D4CD53 /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615E01FA022C0175ACA7 /* jdhuff.c */; };
+		4086C819063AB2FF00D4CD53 /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616001FA022C0175ACA7 /* jdinput.c */; };
+		4086C81A063AB2FF00D4CD53 /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616101FA022C0175ACA7 /* jdmainct.c */; };
+		4086C81B063AB2FF00D4CD53 /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616201FA022C0175ACA7 /* jdmarker.c */; };
+		4086C81C063AB2FF00D4CD53 /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616301FA022C0175ACA7 /* jdmaster.c */; };
+		4086C81D063AB2FF00D4CD53 /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616401FA022C0175ACA7 /* jdmerge.c */; };
+		4086C81E063AB2FF00D4CD53 /* jdphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616501FA022C0175ACA7 /* jdphuff.c */; };
+		4086C81F063AB2FF00D4CD53 /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616601FA022C0175ACA7 /* jdpostct.c */; };
+		4086C820063AB2FF00D4CD53 /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616701FA022C0175ACA7 /* jdsample.c */; };
+		4086C821063AB2FF00D4CD53 /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616801FA022C0175ACA7 /* jdtrans.c */; };
+		4086C822063AB2FF00D4CD53 /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616901FA022C0175ACA7 /* jerror.c */; };
+		4086C823063AB2FF00D4CD53 /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616B01FA022C0175ACA7 /* jfdctflt.c */; };
+		4086C824063AB2FF00D4CD53 /* accel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8619A01FA022C0175ACA7 /* accel.cpp */; };
+		4086C826063AB2FF00D4CD53 /* app.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8619C01FA022C0175ACA7 /* app.cpp */; };
+		4086C827063AB2FF00D4CD53 /* bitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8619F01FA022C0175ACA7 /* bitmap.cpp */; };
+		4086C828063AB2FF00D4CD53 /* bmpbuttn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A001FA022C0175ACA7 /* bmpbuttn.cpp */; };
+		4086C829063AB2FF00D4CD53 /* brush.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A101FA022C0175ACA7 /* brush.cpp */; };
+		4086C82A063AB2FF00D4CD53 /* button.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A201FA022C0175ACA7 /* button.cpp */; };
+		4086C82B063AB2FF00D4CD53 /* checkbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A401FA022C0175ACA7 /* checkbox.cpp */; };
+		4086C82C063AB2FF00D4CD53 /* checklst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A501FA022C0175ACA7 /* checklst.cpp */; };
+		4086C82D063AB2FF00D4CD53 /* clipbrd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A701FA022C0175ACA7 /* clipbrd.cpp */; };
+		4086C82E063AB2FF00D4CD53 /* colordlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A801FA022C0175ACA7 /* colordlg.cpp */; };
+		4086C82F063AB2FF00D4CD53 /* colour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A901FA022C0175ACA7 /* colour.cpp */; };
+		4086C831063AB2FF00D4CD53 /* control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861AB01FA022C0175ACA7 /* control.cpp */; };
+		4086C832063AB2FF00D4CD53 /* choice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A601FA022C0175ACA7 /* choice.cpp */; };
+		4086C833063AB2FF00D4CD53 /* cursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861AD01FA022C0175ACA7 /* cursor.cpp */; };
+		4086C834063AB2FF00D4CD53 /* data.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861AE01FA022C0175ACA7 /* data.cpp */; };
+		4086C835063AB2FF00D4CD53 /* dataobj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861AF01FA022C0175ACA7 /* dataobj.cpp */; };
+		4086C836063AB2FF00D4CD53 /* dc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B001FA022C0175ACA7 /* dc.cpp */; };
+		4086C837063AB2FF00D4CD53 /* minifram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861D101FA022C0175ACA7 /* minifram.cpp */; };
+		4086C838063AB2FF00D4CD53 /* mimetmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861D001FA022C0175ACA7 /* mimetmac.cpp */; };
+		4086C839063AB2FF00D4CD53 /* metafile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861CF01FA022C0175ACA7 /* metafile.cpp */; };
+		4086C83A063AB2FF00D4CD53 /* msgdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861E701FA022C0175ACA7 /* msgdlg.cpp */; };
+		4086C83B063AB2FF00D4CD53 /* notebmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861E801FA022C0175ACA7 /* notebmac.cpp */; };
+		4086C83C063AB2FF00D4CD53 /* palette.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861E901FA022C0175ACA7 /* palette.cpp */; };
+		4086C83D063AB2FF00D4CD53 /* pen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861EA01FA022C0175ACA7 /* pen.cpp */; };
+		4086C83F063AB2FF00D4CD53 /* printmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861EE01FA022C0175ACA7 /* printmac.cpp */; };
+		4086C840063AB2FF00D4CD53 /* radiobox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861EF01FA022C0175ACA7 /* radiobox.cpp */; };
+		4086C841063AB2FF00D4CD53 /* printdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861ED01FA022C0175ACA7 /* printdlg.cpp */; };
+		4086C842063AB2FF00D4CD53 /* radiobut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F001FA022C0175ACA7 /* radiobut.cpp */; };
+		4086C843063AB2FF00D4CD53 /* region.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F101FA022C0175ACA7 /* region.cpp */; };
+		4086C844063AB2FF00D4CD53 /* scrolbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F201FA022C0175ACA7 /* scrolbar.cpp */; };
+		4086C845063AB2FF00D4CD53 /* settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F301FA022C0175ACA7 /* settings.cpp */; };
+		4086C846063AB2FF00D4CD53 /* slider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F401FA022C0175ACA7 /* slider.cpp */; };
+		4086C847063AB2FF00D4CD53 /* spinbutt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F501FA022C0175ACA7 /* spinbutt.cpp */; };
+		4086C848063AB2FF00D4CD53 /* statbmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F701FA022C0175ACA7 /* statbmp.cpp */; };
+		4086C849063AB2FF00D4CD53 /* statbrma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F901FA022C0175ACA7 /* statbrma.cpp */; };
+		4086C84A063AB2FF00D4CD53 /* statlmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861FB01FA022C0175ACA7 /* statlmac.cpp */; };
+		4086C84B063AB2FF00D4CD53 /* stattext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861FC01FA022C0175ACA7 /* stattext.cpp */; };
+		4086C84C063AB2FF00D4CD53 /* tabctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861FD01FA022C0175ACA7 /* tabctrl.cpp */; };
+		4086C84D063AB2FF00D4CD53 /* statbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F801FA022C0175ACA7 /* statbox.cpp */; };
+		4086C84E063AB2FF00D4CD53 /* toolbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620201FA022C0175ACA7 /* toolbar.cpp */; };
+		4086C84F063AB2FF00D4CD53 /* textctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861FF01FA022C0175ACA7 /* textctrl.cpp */; };
+		4086C850063AB2FF00D4CD53 /* timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620101FA022C0175ACA7 /* timer.cpp */; };
+		4086C851063AB2FF00D4CD53 /* tooltip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620301FA022C0175ACA7 /* tooltip.cpp */; };
+		4086C852063AB2FF00D4CD53 /* window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620A01FA022C0175ACA7 /* window.cpp */; };
+		4086C853063AB2FF00D4CD53 /* utilsexc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620801FA022C0175ACA7 /* utilsexc.cpp */; };
+		4086C854063AB2FF00D4CD53 /* utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620701FA022C0175ACA7 /* utils.cpp */; };
+		4086C855063AB2FF00D4CD53 /* uma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620601FA022C0175ACA7 /* uma.cpp */; };
+		4086C856063AB2FF00D4CD53 /* toplevel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620401FA022C0175ACA7 /* toplevel.cpp */; };
+		4086C857063AB2FF00D4CD53 /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863DD01FA022D0175ACA7 /* pngwutil.c */; };
+		4086C858063AB2FF00D4CD53 /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863DC01FA022D0175ACA7 /* pngwtran.c */; };
+		4086C859063AB2FF00D4CD53 /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863DB01FA022D0175ACA7 /* pngwrite.c */; };
+		4086C85A063AB2FF00D4CD53 /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863DA01FA022D0175ACA7 /* pngwio.c */; };
+		4086C85B063AB2FF00D4CD53 /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D901FA022D0175ACA7 /* pngtrans.c */; };
+		4086C85C063AB2FF00D4CD53 /* pngtest.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D801FA022D0175ACA7 /* pngtest.c */; };
+		4086C85D063AB2FF00D4CD53 /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D701FA022D0175ACA7 /* pngset.c */; };
+		4086C85E063AB2FF00D4CD53 /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D601FA022D0175ACA7 /* pngrutil.c */; };
+		4086C85F063AB2FF00D4CD53 /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D501FA022D0175ACA7 /* pngrtran.c */; };
+		4086C860063AB2FF00D4CD53 /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D401FA022D0175ACA7 /* pngrio.c */; };
+		4086C861063AB2FF00D4CD53 /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D301FA022D0175ACA7 /* pngread.c */; };
+		4086C862063AB2FF00D4CD53 /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D201FA022D0175ACA7 /* pngpread.c */; };
+		4086C863063AB2FF00D4CD53 /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D101FA022D0175ACA7 /* pngmem.c */; };
+		4086C864063AB2FF00D4CD53 /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863C501FA022D0175ACA7 /* pngget.c */; };
+		4086C865063AB2FF00D4CD53 /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863C401FA022D0175ACA7 /* pngerror.c */; };
+		4086C866063AB2FF00D4CD53 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863BF01FA022D0175ACA7 /* png.c */; };
+		4086C867063AB2FF00D4CD53 /* menuitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861CE01FA022C0175ACA7 /* menuitem.cpp */; };
+		4086C868063AB2FF00D4CD53 /* menu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861CD01FA022C0175ACA7 /* menu.cpp */; };
+		4086C869063AB2FF00D4CD53 /* mdi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861CC01FA022C0175ACA7 /* mdi.cpp */; };
+		4086C86A063AB2FF00D4CD53 /* macnotfy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861C801FA022C0175ACA7 /* macnotfy.cpp */; };
+		4086C86B063AB2FF00D4CD53 /* listbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861C701FA022C0175ACA7 /* listbox.cpp */; };
+		4086C86D063AB2FF00D4CD53 /* icon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861C501FA022C0175ACA7 /* icon.cpp */; };
+		4086C86E063AB2FF00D4CD53 /* taskbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861C101FA022C0175ACA7 /* taskbar.cpp */; };
+		4086C86F063AB2FF00D4CD53 /* gauge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861C001FA022C0175ACA7 /* gauge.cpp */; };
+		4086C870063AB2FF00D4CD53 /* frame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861BF01FA022C0175ACA7 /* frame.cpp */; };
+		4086C871063AB2FF00D4CD53 /* fontutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861BE01FA022C0175ACA7 /* fontutil.cpp */; };
+		4086C872063AB2FF00D4CD53 /* fontenum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861BD01FA022C0175ACA7 /* fontenum.cpp */; };
+		4086C874063AB2FF00D4CD53 /* font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861BB01FA022C0175ACA7 /* font.cpp */; };
+		4086C875063AB2FF00D4CD53 /* filedlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B901FA022C0175ACA7 /* filedlg.cpp */; };
+		4086C876063AB2FF00D4CD53 /* dnd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B801FA022C0175ACA7 /* dnd.cpp */; };
+		4086C877063AB2FF00D4CD53 /* dirmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B701FA022C0175ACA7 /* dirmac.cpp */; };
+		4086C878063AB2FF00D4CD53 /* dirdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B601FA022C0175ACA7 /* dirdlg.cpp */; };
+		4086C879063AB2FF00D4CD53 /* dialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B501FA022C0175ACA7 /* dialog.cpp */; };
+		4086C87A063AB2FF00D4CD53 /* dcscreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B401FA022C0175ACA7 /* dcscreen.cpp */; };
+		4086C87B063AB2FF00D4CD53 /* dcprint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B301FA022C0175ACA7 /* dcprint.cpp */; };
+		4086C87C063AB2FF00D4CD53 /* dcmemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B201FA022C0175ACA7 /* dcmemory.cpp */; };
+		4086C87D063AB2FF00D4CD53 /* dcclient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B101FA022C0175ACA7 /* dcclient.cpp */; };
+		4086C87E063AB2FF00D4CD53 /* tif_print.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644101FA022D0175ACA7 /* tif_print.c */; };
+		4086C87F063AB2FF00D4CD53 /* tif_predict.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643F01FA022D0175ACA7 /* tif_predict.c */; };
+		4086C880063AB2FF00D4CD53 /* tif_pixarlog.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643E01FA022D0175ACA7 /* tif_pixarlog.c */; };
+		4086C881063AB2FF00D4CD53 /* tif_packbits.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643D01FA022D0175ACA7 /* tif_packbits.c */; };
+		4086C882063AB2FF00D4CD53 /* tif_open.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643B01FA022D0175ACA7 /* tif_open.c */; };
+		4086C883063AB2FF00D4CD53 /* tif_next.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643A01FA022D0175ACA7 /* tif_next.c */; };
+		4086C884063AB2FF00D4CD53 /* tif_lzw.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643801FA022D0175ACA7 /* tif_lzw.c */; };
+		4086C885063AB2FF00D4CD53 /* tif_luv.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643701FA022D0175ACA7 /* tif_luv.c */; };
+		4086C886063AB2FF00D4CD53 /* tif_jpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643601FA022D0175ACA7 /* tif_jpeg.c */; };
+		4086C887063AB2FF00D4CD53 /* tif_getimage.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643501FA022D0175ACA7 /* tif_getimage.c */; };
+		4086C888063AB2FF00D4CD53 /* tif_flush.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643401FA022D0175ACA7 /* tif_flush.c */; };
+		4086C889063AB2FF00D4CD53 /* tif_fax3sm.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643301FA022D0175ACA7 /* tif_fax3sm.c */; };
+		4086C88A063AB2FF00D4CD53 /* tif_fax3.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643101FA022D0175ACA7 /* tif_fax3.c */; };
+		4086C88B063AB2FF00D4CD53 /* tif_error.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643001FA022D0175ACA7 /* tif_error.c */; };
+		4086C88C063AB2FF00D4CD53 /* tif_dumpmode.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642F01FA022D0175ACA7 /* tif_dumpmode.c */; };
+		4086C88D063AB2FF00D4CD53 /* tif_dirwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642E01FA022D0175ACA7 /* tif_dirwrite.c */; };
+		4086C88E063AB2FF00D4CD53 /* tif_dirread.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642D01FA022D0175ACA7 /* tif_dirread.c */; };
+		4086C88F063AB2FF00D4CD53 /* tif_dirinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642C01FA022D0175ACA7 /* tif_dirinfo.c */; };
+		4086C890063AB2FF00D4CD53 /* tif_dir.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642A01FA022D0175ACA7 /* tif_dir.c */; };
+		4086C891063AB2FF00D4CD53 /* tif_compress.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642901FA022D0175ACA7 /* tif_compress.c */; };
+		4086C892063AB2FF00D4CD53 /* tif_codec.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642801FA022D0175ACA7 /* tif_codec.c */; };
+		4086C893063AB2FF00D4CD53 /* tif_close.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642701FA022D0175ACA7 /* tif_close.c */; };
+		4086C894063AB2FF00D4CD53 /* tif_aux.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642601FA022D0175ACA7 /* tif_aux.c */; };
+		4086C895063AB2FF00D4CD53 /* tif_zip.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644E01FA022D0175ACA7 /* tif_zip.c */; };
+		4086C896063AB2FF00D4CD53 /* tif_write.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644D01FA022D0175ACA7 /* tif_write.c */; };
+		4086C897063AB2FF00D4CD53 /* tif_warning.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644A01FA022D0175ACA7 /* tif_warning.c */; };
+		4086C898063AB2FF00D4CD53 /* tif_version.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644801FA022D0175ACA7 /* tif_version.c */; };
+		4086C899063AB2FF00D4CD53 /* tif_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644701FA022D0175ACA7 /* tif_unix.c */; };
+		4086C89A063AB2FF00D4CD53 /* tif_tile.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644601FA022D0175ACA7 /* tif_tile.c */; };
+		4086C89B063AB2FF00D4CD53 /* tif_thunder.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644501FA022D0175ACA7 /* tif_thunder.c */; };
+		4086C89C063AB2FF00D4CD53 /* tif_swab.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644401FA022D0175ACA7 /* tif_swab.c */; };
+		4086C89D063AB2FF00D4CD53 /* tif_strip.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644301FA022D0175ACA7 /* tif_strip.c */; };
+		4086C89E063AB2FF00D4CD53 /* tif_read.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644201FA022D0175ACA7 /* tif_read.c */; };
+		4086C89F063AB2FF00D4CD53 /* hashmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F5A69F02CDB27401000133 /* hashmap.cpp */; };
+		4086C8A0063AB2FF00D4CD53 /* artprov.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F5A6A102CDB6CA01000133 /* artprov.cpp */; };
+		4086C8A1063AB2FF00D4CD53 /* artstd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F5A6A202CDB6CA01000133 /* artstd.cpp */; };
+		4086C8A2063AB2FF00D4CD53 /* iconbndl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F5A6A302CDB6CA01000133 /* iconbndl.cpp */; };
+		4086C8A3063AB2FF00D4CD53 /* imagfill.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F5A6A402CDB6CA01000133 /* imagfill.cpp */; };
+		4086C8A4063AB2FF00D4CD53 /* utilsunx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8649401FA022D0175ACA7 /* utilsunx.cpp */; };
+		4086C8A5063AB2FF00D4CD53 /* snglinst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8649201FA022D0175ACA7 /* snglinst.cpp */; };
+		4086C8A6063AB2FF00D4CD53 /* msgout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F58E04FD02F11FA701A8020C /* msgout.cpp */; };
+		4086C8A7063AB2FF00D4CD53 /* radiocmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AC2EDD03803A3601000133 /* radiocmn.cpp */; };
+		4086C8A8063AB2FF00D4CD53 /* settcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AC2EDE03803A3601000133 /* settcmn.cpp */; };
+		4086C8A9063AB2FF00D4CD53 /* display.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CADEF54103C8C0A800000133 /* display.cpp */; };
+		4086C8AA063AB2FF00D4CD53 /* MoreFilesX.c in Sources */ = {isa = PBXBuildFile; fileRef = CADEF54303C8C0A800000133 /* MoreFilesX.c */; };
+		4086C8AB063AB2FF00D4CD53 /* accesscmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA0CB57B0450773900000102 /* accesscmn.cpp */; };
+		4086C8AC063AB2FF00D4CD53 /* datacmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA0CB57C0450773900000102 /* datacmn.cpp */; };
+		4086C8AD063AB2FF00D4CD53 /* dpycmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA0CB57D0450773900000102 /* dpycmn.cpp */; };
+		4086C8AE063AB2FF00D4CD53 /* rgncmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA0CB57E0450773900000102 /* rgncmn.cpp */; };
+		4086C8AF063AB2FF00D4CD53 /* appbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60175604D43A2700000080 /* appbase.cpp */; };
+		4086C8B0063AB2FF00D4CD53 /* dbgrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60175904D43A5400000080 /* dbgrid.cpp */; };
+		4086C8B1063AB2FF00D4CD53 /* fldlgcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60175C04D43A8100000080 /* fldlgcmn.cpp */; };
+		4086C8B2063AB2FF00D4CD53 /* fmapbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60175D04D43A8100000080 /* fmapbase.cpp */; };
+		4086C8B3063AB2FF00D4CD53 /* stopwatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60175E04D43A8100000080 /* stopwatch.cpp */; };
+		4086C8B4063AB2FF00D4CD53 /* renderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60176504D43AE200000080 /* renderer.cpp */; };
+		4086C8B5063AB2FF00D4CD53 /* init.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60176904D43BF100000080 /* init.cpp */; };
+		4086C8B6063AB2FF00D4CD53 /* renderg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60176C04D43CAA00000080 /* renderg.cpp */; };
+		4086C8B7063AB2FF00D4CD53 /* selstore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60176D04D43CAA00000080 /* selstore.cpp */; };
+		4086C8B8063AB2FF00D4CD53 /* baseunix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60177204D43D2300000080 /* baseunix.cpp */; };
+		4086C8B9063AB2FF00D4CD53 /* rendcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA89578504D7052700000080 /* rendcmn.cpp */; };
+		4086C8BA063AB2FF00D4CD53 /* m_style.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA89578904D705D700000080 /* m_style.cpp */; };
+		4086C8BB063AB2FF00D4CD53 /* xti.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA8CC823050E6CD800000080 /* xti.cpp */; };
+		4086C8BC063AB2FF00D4CD53 /* xtistrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA8CC824050E6CD800000080 /* xtistrm.cpp */; };
+		4086C8BD063AB2FF00D4CD53 /* xtixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA8CC825050E6CD800000080 /* xtixml.cpp */; };
+		4086C8BE063AB2FF00D4CD53 /* bookctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA8CC832050EE2BD00000080 /* bookctrl.cpp */; };
+		4086C8BF063AB2FF00D4CD53 /* sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4086C3A2063A454900D4CD53 /* sound.cpp */; };
+		4086C8C1063AB2FF00D4CD53 /* glcanvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4086C59F063AA5C700D4CD53 /* glcanvas.cpp */; };
+		4086C8C4063AB2FF00D4CD53 /* regcomp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4086C638063AAD4A00D4CD53 /* regcomp.c */; };
+		4086C8C5063AB2FF00D4CD53 /* regerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 4086C63B063AAD4A00D4CD53 /* regerror.c */; };
+		4086C8C6063AB2FF00D4CD53 /* regexec.c in Sources */ = {isa = PBXBuildFile; fileRef = 4086C641063AAD4A00D4CD53 /* regexec.c */; };
+		4086C8C7063AB2FF00D4CD53 /* regfree.c in Sources */ = {isa = PBXBuildFile; fileRef = 4086C643063AAD4A00D4CD53 /* regfree.c */; };
+		4086CA58063AB30000D4CD53 /* setup.h in Headers */ = {isa = PBXBuildFile; fileRef = F5FD822102CCECE601000133 /* setup.h */; };
+		4086CA5A063AB30000D4CD53 /* file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600801FA022B0175ACA7 /* file.cpp */; };
+		4086CA5B063AB30000D4CD53 /* appcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FDF01FA022B0175ACA7 /* appcmn.cpp */; };
+		4086CA5C063AB30000D4CD53 /* bmpbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE101FA022B0175ACA7 /* bmpbase.cpp */; };
+		4086CA5D063AB30000D4CD53 /* choiccmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE201FA022B0175ACA7 /* choiccmn.cpp */; };
+		4086CA5E063AB30000D4CD53 /* clipcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE301FA022B0175ACA7 /* clipcmn.cpp */; };
+		4086CA5F063AB30000D4CD53 /* clntdata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE401FA022B0175ACA7 /* clntdata.cpp */; };
+		4086CA60063AB30000D4CD53 /* cmdline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE501FA022B0175ACA7 /* cmdline.cpp */; };
+		4086CA61063AB30000D4CD53 /* cmdproc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE601FA022B0175ACA7 /* cmdproc.cpp */; };
+		4086CA62063AB30000D4CD53 /* config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE801FA022B0175ACA7 /* config.cpp */; };
+		4086CA63063AB30000D4CD53 /* containr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE901FA022B0175ACA7 /* containr.cpp */; };
+		4086CA64063AB30000D4CD53 /* cmndata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FE701FA022B0175ACA7 /* cmndata.cpp */; };
+		4086CA65063AB30000D4CD53 /* dseldlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FFE01FA022B0175ACA7 /* dseldlg.cpp */; };
+		4086CA66063AB30000D4CD53 /* docview.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FFB01FA022B0175ACA7 /* docview.cpp */; };
+		4086CA67063AB30000D4CD53 /* docmdi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FFA01FA022B0175ACA7 /* docmdi.cpp */; };
+		4086CA68063AB30000D4CD53 /* dobjcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF901FA022B0175ACA7 /* dobjcmn.cpp */; };
+		4086CA69063AB30000D4CD53 /* dndcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF801FA022B0175ACA7 /* dndcmn.cpp */; };
+		4086CA6A063AB30000D4CD53 /* dlgcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF701FA022B0175ACA7 /* dlgcmn.cpp */; };
+		4086CA6B063AB30000D4CD53 /* dircmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF601FA022B0175ACA7 /* dircmn.cpp */; };
+		4086CA6C063AB30000D4CD53 /* dcbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF401FA022B0175ACA7 /* dcbase.cpp */; };
+		4086CA6D063AB30000D4CD53 /* dbtable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF301FA022B0175ACA7 /* dbtable.cpp */; };
+		4086CA6E063AB30000D4CD53 /* db.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF101FA022B0175ACA7 /* db.cpp */; };
+		4086CA6F063AB30000D4CD53 /* datstrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FF001FA022B0175ACA7 /* datstrm.cpp */; };
+		4086CA70063AB30000D4CD53 /* datetime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FEF01FA022B0175ACA7 /* datetime.cpp */; };
+		4086CA71063AB30000D4CD53 /* ctrlsub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FEC01FA022B0175ACA7 /* ctrlsub.cpp */; };
+		4086CA72063AB30000D4CD53 /* ctrlcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FEB01FA022B0175ACA7 /* ctrlcmn.cpp */; };
+		4086CA73063AB30000D4CD53 /* cshelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FEA01FA022B0175ACA7 /* cshelp.cpp */; };
+		4086CA74063AB30000D4CD53 /* dynload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600101FA022B0175ACA7 /* dynload.cpp */; };
+		4086CA75063AB30000D4CD53 /* dynlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600001FA022B0175ACA7 /* dynlib.cpp */; };
+		4086CA76063AB30000D4CD53 /* dynarray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A85FFF01FA022B0175ACA7 /* dynarray.cpp */; };
+		4086CA77063AB30000D4CD53 /* ffile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600701FA022B0175ACA7 /* ffile.cpp */; };
+		4086CA78063AB30000D4CD53 /* fddlgcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600601FA022B0175ACA7 /* fddlgcmn.cpp */; };
+		4086CA79063AB30000D4CD53 /* extended.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600501FA022B0175ACA7 /* extended.c */; };
+		4086CA7A063AB30000D4CD53 /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600401FA022B0175ACA7 /* event.cpp */; };
+		4086CA7B063AB30000D4CD53 /* encconv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600301FA022B0175ACA7 /* encconv.cpp */; };
+		4086CA7C063AB30000D4CD53 /* effects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600201FA022B0175ACA7 /* effects.cpp */; };
+		4086CA7D063AB30000D4CD53 /* imagjpeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602101FA022B0175ACA7 /* imagjpeg.cpp */; };
+		4086CA7E063AB30000D4CD53 /* imagiff.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602001FA022B0175ACA7 /* imagiff.cpp */; };
+		4086CA7F063AB30000D4CD53 /* imaggif.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601F01FA022B0175ACA7 /* imaggif.cpp */; };
+		4086CA80063AB30000D4CD53 /* image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601E01FA022B0175ACA7 /* image.cpp */; };
+		4086CA81063AB30000D4CD53 /* imagbmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601D01FA022B0175ACA7 /* imagbmp.cpp */; };
+		4086CA82063AB30000D4CD53 /* imagall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601C01FA022B0175ACA7 /* imagall.cpp */; };
+		4086CA83063AB30000D4CD53 /* http.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601B01FA022B0175ACA7 /* http.cpp */; };
+		4086CA84063AB30000D4CD53 /* helpbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601A01FA022B0175ACA7 /* helpbase.cpp */; };
+		4086CA85063AB30000D4CD53 /* hash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601901FA022B0175ACA7 /* hash.cpp */; };
+		4086CA86063AB30000D4CD53 /* gifdecod.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601701FA022B0175ACA7 /* gifdecod.cpp */; };
+		4086CA87063AB30000D4CD53 /* geometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601601FA022B0175ACA7 /* geometry.cpp */; };
+		4086CA88063AB30000D4CD53 /* gdicmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601501FA022B0175ACA7 /* gdicmn.cpp */; };
+		4086CA89063AB30000D4CD53 /* gaugecmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601401FA022B0175ACA7 /* gaugecmn.cpp */; };
+		4086CA8A063AB30000D4CD53 /* ftp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601301FA022B0175ACA7 /* ftp.cpp */; };
+		4086CA8C063AB30000D4CD53 /* fs_mem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601101FA022B0175ACA7 /* fs_mem.cpp */; };
+		4086CA8D063AB30000D4CD53 /* fs_inet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8601001FA022B0175ACA7 /* fs_inet.cpp */; };
+		4086CA8E063AB30000D4CD53 /* framecmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600F01FA022B0175ACA7 /* framecmn.cpp */; };
+		4086CA8F063AB30000D4CD53 /* fontmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600E01FA022B0175ACA7 /* fontmap.cpp */; };
+		4086CA90063AB30000D4CD53 /* fontcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600D01FA022B0175ACA7 /* fontcmn.cpp */; };
+		4086CA91063AB30000D4CD53 /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600C01FA022B0175ACA7 /* filesys.cpp */; };
+		4086CA92063AB30000D4CD53 /* filename.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600B01FA022B0175ACA7 /* filename.cpp */; };
+		4086CA93063AB30000D4CD53 /* filefn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600A01FA022B0175ACA7 /* filefn.cpp */; };
+		4086CA94063AB30000D4CD53 /* fileconf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8600901FA022B0175ACA7 /* fileconf.cpp */; };
+		4086CA95063AB30000D4CD53 /* imagpcx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602201FA022B0175ACA7 /* imagpcx.cpp */; };
+		4086CA96063AB30000D4CD53 /* imagpng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602301FA022B0175ACA7 /* imagpng.cpp */; };
+		4086CA97063AB30000D4CD53 /* imagpnm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602401FA022B0175ACA7 /* imagpnm.cpp */; };
+		4086CA98063AB30000D4CD53 /* imagtiff.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602501FA022B0175ACA7 /* imagtiff.cpp */; };
+		4086CA99063AB30000D4CD53 /* imagxpm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602601FA022B0175ACA7 /* imagxpm.cpp */; };
+		4086CA9A063AB30000D4CD53 /* intl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602801FA022B0175ACA7 /* intl.cpp */; };
+		4086CA9B063AB30000D4CD53 /* ipcbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602901FA022B0175ACA7 /* ipcbase.cpp */; };
+		4086CA9C063AB30000D4CD53 /* layout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602A01FA022B0175ACA7 /* layout.cpp */; };
+		4086CA9D063AB30000D4CD53 /* lboxcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602B01FA022B0175ACA7 /* lboxcmn.cpp */; };
+		4086CA9E063AB30000D4CD53 /* list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602E01FA022B0175ACA7 /* list.cpp */; };
+		4086CA9F063AB30000D4CD53 /* log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8602F01FA022B0175ACA7 /* log.cpp */; };
+		4086CAA0063AB30000D4CD53 /* longlong.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603001FA022B0175ACA7 /* longlong.cpp */; };
+		4086CAA1063AB30000D4CD53 /* matrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603101FA022B0175ACA7 /* matrix.cpp */; };
+		4086CAA2063AB30000D4CD53 /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603201FA022B0175ACA7 /* memory.cpp */; };
+		4086CAA3063AB30000D4CD53 /* menucmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603301FA022B0175ACA7 /* menucmn.cpp */; };
+		4086CAA4063AB30000D4CD53 /* mimecmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603401FA022B0175ACA7 /* mimecmn.cpp */; };
+		4086CAA5063AB30000D4CD53 /* nbkbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603701FA022B0175ACA7 /* nbkbase.cpp */; };
+		4086CAA6063AB30000D4CD53 /* module.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603501FA022B0175ACA7 /* module.cpp */; };
+		4086CAA7063AB30000D4CD53 /* mstream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603601FA022B0175ACA7 /* mstream.cpp */; };
+		4086CAA8063AB30000D4CD53 /* object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603801FA022B0175ACA7 /* object.cpp */; };
+		4086CAA9063AB30000D4CD53 /* popupcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603D01FA022C0175ACA7 /* popupcmn.cpp */; };
+		4086CAAA063AB30000D4CD53 /* prntbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603E01FA022C0175ACA7 /* prntbase.cpp */; };
+		4086CAAB063AB30000D4CD53 /* paper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603A01FA022B0175ACA7 /* paper.cpp */; };
+		4086CAAC063AB30000D4CD53 /* sckaddr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604601FA022C0175ACA7 /* sckaddr.cpp */; };
+		4086CAAD063AB30000D4CD53 /* regex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604301FA022C0175ACA7 /* regex.cpp */; };
+		4086CAAE063AB30000D4CD53 /* quantize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604101FA022C0175ACA7 /* quantize.cpp */; };
+		4086CAAF063AB30000D4CD53 /* protocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604001FA022C0175ACA7 /* protocol.cpp */; };
+		4086CAB0063AB30000D4CD53 /* process.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8603F01FA022C0175ACA7 /* process.cpp */; };
+		4086CAB1063AB30000D4CD53 /* sckfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604701FA022C0175ACA7 /* sckfile.cpp */; };
+		4086CAB2063AB30000D4CD53 /* sckipc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604801FA022C0175ACA7 /* sckipc.cpp */; };
+		4086CAB3063AB30000D4CD53 /* sckstrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604901FA022C0175ACA7 /* sckstrm.cpp */; };
+		4086CAB4063AB30000D4CD53 /* sizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604A01FA022C0175ACA7 /* sizer.cpp */; };
+		4086CAB5063AB30000D4CD53 /* socket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604B01FA022C0175ACA7 /* socket.cpp */; };
+		4086CAB6063AB30000D4CD53 /* stockitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604C01FA022C0175ACA7 /* stockitem.cpp */; };
+		4086CAB7063AB30000D4CD53 /* strconv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604D01FA022C0175ACA7 /* strconv.cpp */; };
+		4086CAB8063AB30000D4CD53 /* stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604E01FA022C0175ACA7 /* stream.cpp */; };
+		4086CAB9063AB30000D4CD53 /* string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8604F01FA022C0175ACA7 /* string.cpp */; };
+		4086CABA063AB30000D4CD53 /* sysopt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605001FA022C0175ACA7 /* sysopt.cpp */; };
+		4086CABB063AB30000D4CD53 /* tbarbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605101FA022C0175ACA7 /* tbarbase.cpp */; };
+		4086CABC063AB30000D4CD53 /* textbuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605201FA022C0175ACA7 /* textbuf.cpp */; };
+		4086CABD063AB30000D4CD53 /* textcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605301FA022C0175ACA7 /* textcmn.cpp */; };
+		4086CABE063AB30000D4CD53 /* textfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605401FA022C0175ACA7 /* textfile.cpp */; };
+		4086CABF063AB30000D4CD53 /* timercmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605501FA022C0175ACA7 /* timercmn.cpp */; };
+		4086CAC0063AB30000D4CD53 /* tokenzr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605601FA022C0175ACA7 /* tokenzr.cpp */; };
+		4086CAC1063AB30000D4CD53 /* toplvcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605701FA022C0175ACA7 /* toplvcmn.cpp */; };
+		4086CAC2063AB30000D4CD53 /* treebase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605801FA022C0175ACA7 /* treebase.cpp */; };
+		4086CAC3063AB30000D4CD53 /* txtstrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605901FA022C0175ACA7 /* txtstrm.cpp */; };
+		4086CAC5063AB30000D4CD53 /* utilscmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605E01FA022C0175ACA7 /* utilscmn.cpp */; };
+		4086CAC6063AB30000D4CD53 /* url.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605D01FA022C0175ACA7 /* url.cpp */; };
+		4086CAC7063AB30000D4CD53 /* valgen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605F01FA022C0175ACA7 /* valgen.cpp */; };
+		4086CAC8063AB30000D4CD53 /* validate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606001FA022C0175ACA7 /* validate.cpp */; };
+		4086CAC9063AB30000D4CD53 /* valtext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606101FA022C0175ACA7 /* valtext.cpp */; };
+		4086CACA063AB30000D4CD53 /* variant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606201FA022C0175ACA7 /* variant.cpp */; };
+		4086CACB063AB30000D4CD53 /* wfstream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606301FA022C0175ACA7 /* wfstream.cpp */; };
+		4086CACC063AB30000D4CD53 /* wxchar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606501FA022C0175ACA7 /* wxchar.cpp */; };
+		4086CACD063AB30000D4CD53 /* xpmdecod.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606701FA022C0175ACA7 /* xpmdecod.cpp */; };
+		4086CACE063AB30000D4CD53 /* zipstrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606801FA022C0175ACA7 /* zipstrm.cpp */; };
+		4086CACF063AB30000D4CD53 /* wincmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606401FA022C0175ACA7 /* wincmn.cpp */; };
+		4086CAD0063AB30000D4CD53 /* zstream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8606901FA022C0175ACA7 /* zstream.cpp */; };
+		4086CAD1063AB30000D4CD53 /* busyinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607001FA022C0175ACA7 /* busyinfo.cpp */; };
+		4086CAD2063AB30000D4CD53 /* calctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607101FA022C0175ACA7 /* calctrl.cpp */; };
+		4086CAD3063AB30000D4CD53 /* caret.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607201FA022C0175ACA7 /* caret.cpp */; };
+		4086CAD4063AB30000D4CD53 /* choicdgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607301FA022C0175ACA7 /* choicdgg.cpp */; };
+		4086CAD5063AB30000D4CD53 /* grid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607D01FA022C0175ACA7 /* grid.cpp */; };
+		4086CAD6063AB30000D4CD53 /* fontdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607C01FA022C0175ACA7 /* fontdlgg.cpp */; };
+		4086CAD7063AB30000D4CD53 /* fdrepdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607A01FA022C0175ACA7 /* fdrepdlg.cpp */; };
+		4086CAD8063AB30000D4CD53 /* dragimgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607901FA022C0175ACA7 /* dragimgg.cpp */; };
+		4086CAD9063AB30000D4CD53 /* dirdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607801FA022C0175ACA7 /* dirdlgg.cpp */; };
+		4086CADA063AB30000D4CD53 /* dirctrlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607701FA022C0175ACA7 /* dirctrlg.cpp */; };
+		4086CADB063AB30000D4CD53 /* dcpsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607501FA022C0175ACA7 /* dcpsg.cpp */; };
+		4086CADC063AB30000D4CD53 /* colrdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607401FA022C0175ACA7 /* colrdlgg.cpp */; };
+		4086CADD063AB30000D4CD53 /* printps.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608E01FA022C0175ACA7 /* printps.cpp */; };
+		4086CADE063AB30000D4CD53 /* panelg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608D01FA022C0175ACA7 /* panelg.cpp */; };
+		4086CADF063AB30000D4CD53 /* numdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608B01FA022C0175ACA7 /* numdlgg.cpp */; };
+		4086CAE1063AB30000D4CD53 /* logg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608801FA022C0175ACA7 /* logg.cpp */; };
+		4086CAE2063AB30000D4CD53 /* listctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608701FA022C0175ACA7 /* listctrl.cpp */; };
+		4086CAE3063AB30000D4CD53 /* laywin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608601FA022C0175ACA7 /* laywin.cpp */; };
+		4086CAE5063AB30000D4CD53 /* helpext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608101FA022C0175ACA7 /* helpext.cpp */; };
+		4086CAE6063AB30000D4CD53 /* gridsel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608001FA022C0175ACA7 /* gridsel.cpp */; };
+		4086CAE7063AB30000D4CD53 /* gridctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8607E01FA022C0175ACA7 /* gridctrl.cpp */; };
+		4086CAE8063AB30000D4CD53 /* prntdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8608F01FA022C0175ACA7 /* prntdlgg.cpp */; };
+		4086CAE9063AB30000D4CD53 /* wizard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A860A201FA022C0175ACA7 /* wizard.cpp */; };
+		4086CAEA063AB30000D4CD53 /* treectlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A860A001FA022C0175ACA7 /* treectlg.cpp */; };
+		4086CAEB063AB30000D4CD53 /* tipwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609F01FA022C0175ACA7 /* tipwin.cpp */; };
+		4086CAEC063AB30000D4CD53 /* tipdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609E01FA022C0175ACA7 /* tipdlg.cpp */; };
+		4086CAED063AB30000D4CD53 /* textdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609D01FA022C0175ACA7 /* textdlgg.cpp */; };
+		4086CAEE063AB30000D4CD53 /* tabg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609B01FA022C0175ACA7 /* tabg.cpp */; };
+		4086CAEF063AB30000D4CD53 /* statusbr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609A01FA022C0175ACA7 /* statusbr.cpp */; };
+		4086CAF0063AB30000D4CD53 /* splitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609801FA022C0175ACA7 /* splitter.cpp */; };
+		4086CAF1063AB30000D4CD53 /* splash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609701FA022C0175ACA7 /* splash.cpp */; };
+		4086CAF3063AB30000D4CD53 /* scrlwing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609501FA022C0175ACA7 /* scrlwing.cpp */; };
+		4086CAF4063AB30000D4CD53 /* sashwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609401FA022C0175ACA7 /* sashwin.cpp */; };
+		4086CAF5063AB30000D4CD53 /* progdlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8609001FA022C0175ACA7 /* progdlgg.cpp */; };
+		4086CAF6063AB30000D4CD53 /* helpctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610401FA022C0175ACA7 /* helpctrl.cpp */; };
+		4086CAF7063AB30000D4CD53 /* helpdata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610501FA022C0175ACA7 /* helpdata.cpp */; };
+		4086CAF8063AB30000D4CD53 /* helpfrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610601FA022C0175ACA7 /* helpfrm.cpp */; };
+		4086CAF9063AB30000D4CD53 /* htmlcell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610701FA022C0175ACA7 /* htmlcell.cpp */; };
+		4086CAFA063AB30000D4CD53 /* m_fonts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610E01FA022C0175ACA7 /* m_fonts.cpp */; };
+		4086CAFB063AB30000D4CD53 /* m_dflist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610D01FA022C0175ACA7 /* m_dflist.cpp */; };
+		4086CAFC063AB30000D4CD53 /* htmprint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610C01FA022C0175ACA7 /* htmprint.cpp */; };
+		4086CAFD063AB30000D4CD53 /* htmlwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610B01FA022C0175ACA7 /* htmlwin.cpp */; };
+		4086CAFE063AB30000D4CD53 /* htmltag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610A01FA022C0175ACA7 /* htmltag.cpp */; };
+		4086CAFF063AB30000D4CD53 /* htmlpars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610901FA022C0175ACA7 /* htmlpars.cpp */; };
+		4086CB00063AB30000D4CD53 /* htmlfilt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610801FA022C0175ACA7 /* htmlfilt.cpp */; };
+		4086CB01063AB30000D4CD53 /* m_hline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8610F01FA022C0175ACA7 /* m_hline.cpp */; };
+		4086CB02063AB30000D4CD53 /* winpars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611701FA022C0175ACA7 /* winpars.cpp */; };
+		4086CB03063AB30000D4CD53 /* m_tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611601FA022C0175ACA7 /* m_tables.cpp */; };
+		4086CB04063AB30000D4CD53 /* m_pre.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611501FA022C0175ACA7 /* m_pre.cpp */; };
+		4086CB05063AB30000D4CD53 /* m_list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611301FA022C0175ACA7 /* m_list.cpp */; };
+		4086CB06063AB30000D4CD53 /* m_links.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611201FA022C0175ACA7 /* m_links.cpp */; };
+		4086CB07063AB30000D4CD53 /* m_layout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611101FA022C0175ACA7 /* m_layout.cpp */; };
+		4086CB08063AB30000D4CD53 /* m_image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8611001FA022C0175ACA7 /* m_image.cpp */; };
+		4086CB09063AB30000D4CD53 /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615B01FA022C0175ACA7 /* jdcolor.c */; };
+		4086CB0A063AB30000D4CD53 /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615901FA022C0175ACA7 /* jdatasrc.c */; };
+		4086CB0B063AB30000D4CD53 /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615A01FA022C0175ACA7 /* jdcoefct.c */; };
+		4086CB0C063AB30000D4CD53 /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615801FA022C0175ACA7 /* jdatadst.c */; };
+		4086CB0D063AB30000D4CD53 /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615701FA022C0175ACA7 /* jdapistd.c */; };
+		4086CB0E063AB30000D4CD53 /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615601FA022C0175ACA7 /* jdapimin.c */; };
+		4086CB0F063AB30000D4CD53 /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615501FA022C0175ACA7 /* jctrans.c */; };
+		4086CB10063AB30000D4CD53 /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615401FA022C0175ACA7 /* jcsample.c */; };
+		4086CB11063AB30000D4CD53 /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615301FA022C0175ACA7 /* jcprepct.c */; };
+		4086CB12063AB30000D4CD53 /* jcphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615201FA022C0175ACA7 /* jcphuff.c */; };
+		4086CB13063AB30000D4CD53 /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615101FA022C0175ACA7 /* jcparam.c */; };
+		4086CB14063AB30000D4CD53 /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614E01FA022C0175ACA7 /* jcomapi.c */; };
+		4086CB15063AB30000D4CD53 /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614D01FA022C0175ACA7 /* jcmaster.c */; };
+		4086CB16063AB30000D4CD53 /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614C01FA022C0175ACA7 /* jcmarker.c */; };
+		4086CB17063AB30000D4CD53 /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614B01FA022C0175ACA7 /* jcmainct.c */; };
+		4086CB18063AB30000D4CD53 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614A01FA022C0175ACA7 /* jcinit.c */; };
+		4086CB19063AB30000D4CD53 /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614801FA022C0175ACA7 /* jchuff.c */; };
+		4086CB1A063AB30000D4CD53 /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614701FA022C0175ACA7 /* jcdctmgr.c */; };
+		4086CB1B063AB30000D4CD53 /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614601FA022C0175ACA7 /* jccolor.c */; };
+		4086CB1C063AB30000D4CD53 /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614501FA022C0175ACA7 /* jccoefct.c */; };
+		4086CB1D063AB30000D4CD53 /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614401FA022C0175ACA7 /* jcapistd.c */; };
+		4086CB1E063AB30000D4CD53 /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8614301FA022C0175ACA7 /* jcapimin.c */; };
+		4086CB1F063AB30000D4CD53 /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615D01FA022C0175ACA7 /* jddctmgr.c */; };
+		4086CB20063AB30000D4CD53 /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8618F01FA022C0175ACA7 /* jutils.c */; };
+		4086CB21063AB30000D4CD53 /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8618E01FA022C0175ACA7 /* jquant2.c */; };
+		4086CB22063AB30000D4CD53 /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8618D01FA022C0175ACA7 /* jquant1.c */; };
+		4086CB23063AB30000D4CD53 /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8617901FA022C0175ACA7 /* jmemnobs.c */; };
+		4086CB24063AB30000D4CD53 /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8617701FA022C0175ACA7 /* jmemmgr.c */; };
+		4086CB25063AB30000D4CD53 /* jidctred.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8617101FA022C0175ACA7 /* jidctred.c */; };
+		4086CB26063AB30000D4CD53 /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8617001FA022C0175ACA7 /* jidctint.c */; };
+		4086CB27063AB30000D4CD53 /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616F01FA022C0175ACA7 /* jidctfst.c */; };
+		4086CB28063AB30000D4CD53 /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616E01FA022C0175ACA7 /* jidctflt.c */; };
+		4086CB29063AB30000D4CD53 /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616D01FA022C0175ACA7 /* jfdctint.c */; };
+		4086CB2A063AB30000D4CD53 /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616C01FA022C0175ACA7 /* jfdctfst.c */; };
+		4086CB2B063AB30000D4CD53 /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8615E01FA022C0175ACA7 /* jdhuff.c */; };
+		4086CB2C063AB30000D4CD53 /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616001FA022C0175ACA7 /* jdinput.c */; };
+		4086CB2D063AB30000D4CD53 /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616101FA022C0175ACA7 /* jdmainct.c */; };
+		4086CB2E063AB30000D4CD53 /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616201FA022C0175ACA7 /* jdmarker.c */; };
+		4086CB2F063AB30000D4CD53 /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616301FA022C0175ACA7 /* jdmaster.c */; };
+		4086CB30063AB30000D4CD53 /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616401FA022C0175ACA7 /* jdmerge.c */; };
+		4086CB31063AB30000D4CD53 /* jdphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616501FA022C0175ACA7 /* jdphuff.c */; };
+		4086CB32063AB30000D4CD53 /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616601FA022C0175ACA7 /* jdpostct.c */; };
+		4086CB33063AB30000D4CD53 /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616701FA022C0175ACA7 /* jdsample.c */; };
+		4086CB34063AB30000D4CD53 /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616801FA022C0175ACA7 /* jdtrans.c */; };
+		4086CB35063AB30000D4CD53 /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616901FA022C0175ACA7 /* jerror.c */; };
+		4086CB36063AB30000D4CD53 /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8616B01FA022C0175ACA7 /* jfdctflt.c */; };
+		4086CB37063AB30000D4CD53 /* accel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8619A01FA022C0175ACA7 /* accel.cpp */; };
+		4086CB39063AB30000D4CD53 /* app.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8619C01FA022C0175ACA7 /* app.cpp */; };
+		4086CB3A063AB30000D4CD53 /* bitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8619F01FA022C0175ACA7 /* bitmap.cpp */; };
+		4086CB3B063AB30000D4CD53 /* bmpbuttn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A001FA022C0175ACA7 /* bmpbuttn.cpp */; };
+		4086CB3C063AB30000D4CD53 /* brush.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A101FA022C0175ACA7 /* brush.cpp */; };
+		4086CB3D063AB30000D4CD53 /* button.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A201FA022C0175ACA7 /* button.cpp */; };
+		4086CB3E063AB30000D4CD53 /* checkbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A401FA022C0175ACA7 /* checkbox.cpp */; };
+		4086CB3F063AB30000D4CD53 /* checklst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A501FA022C0175ACA7 /* checklst.cpp */; };
+		4086CB40063AB30000D4CD53 /* clipbrd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A701FA022C0175ACA7 /* clipbrd.cpp */; };
+		4086CB41063AB30000D4CD53 /* colordlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A801FA022C0175ACA7 /* colordlg.cpp */; };
+		4086CB42063AB30000D4CD53 /* colour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A901FA022C0175ACA7 /* colour.cpp */; };
+		4086CB44063AB30000D4CD53 /* control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861AB01FA022C0175ACA7 /* control.cpp */; };
+		4086CB45063AB30000D4CD53 /* choice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861A601FA022C0175ACA7 /* choice.cpp */; };
+		4086CB46063AB30000D4CD53 /* cursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861AD01FA022C0175ACA7 /* cursor.cpp */; };
+		4086CB47063AB30000D4CD53 /* data.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861AE01FA022C0175ACA7 /* data.cpp */; };
+		4086CB48063AB30000D4CD53 /* dataobj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861AF01FA022C0175ACA7 /* dataobj.cpp */; };
+		4086CB49063AB30000D4CD53 /* dc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B001FA022C0175ACA7 /* dc.cpp */; };
+		4086CB4A063AB30000D4CD53 /* minifram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861D101FA022C0175ACA7 /* minifram.cpp */; };
+		4086CB4B063AB30000D4CD53 /* mimetmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861D001FA022C0175ACA7 /* mimetmac.cpp */; };
+		4086CB4C063AB30000D4CD53 /* metafile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861CF01FA022C0175ACA7 /* metafile.cpp */; };
+		4086CB4D063AB30000D4CD53 /* msgdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861E701FA022C0175ACA7 /* msgdlg.cpp */; };
+		4086CB4E063AB30000D4CD53 /* notebmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861E801FA022C0175ACA7 /* notebmac.cpp */; };
+		4086CB4F063AB30000D4CD53 /* palette.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861E901FA022C0175ACA7 /* palette.cpp */; };
+		4086CB50063AB30000D4CD53 /* pen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861EA01FA022C0175ACA7 /* pen.cpp */; };
+		4086CB52063AB30000D4CD53 /* printmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861EE01FA022C0175ACA7 /* printmac.cpp */; };
+		4086CB53063AB30000D4CD53 /* radiobox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861EF01FA022C0175ACA7 /* radiobox.cpp */; };
+		4086CB54063AB30000D4CD53 /* printdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861ED01FA022C0175ACA7 /* printdlg.cpp */; };
+		4086CB55063AB30000D4CD53 /* radiobut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F001FA022C0175ACA7 /* radiobut.cpp */; };
+		4086CB56063AB30000D4CD53 /* region.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F101FA022C0175ACA7 /* region.cpp */; };
+		4086CB57063AB30000D4CD53 /* scrolbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F201FA022C0175ACA7 /* scrolbar.cpp */; };
+		4086CB58063AB30000D4CD53 /* settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F301FA022C0175ACA7 /* settings.cpp */; };
+		4086CB59063AB30000D4CD53 /* slider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F401FA022C0175ACA7 /* slider.cpp */; };
+		4086CB5A063AB30000D4CD53 /* spinbutt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F501FA022C0175ACA7 /* spinbutt.cpp */; };
+		4086CB5B063AB30000D4CD53 /* statbmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F701FA022C0175ACA7 /* statbmp.cpp */; };
+		4086CB5C063AB30000D4CD53 /* statbrma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F901FA022C0175ACA7 /* statbrma.cpp */; };
+		4086CB5D063AB30000D4CD53 /* statlmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861FB01FA022C0175ACA7 /* statlmac.cpp */; };
+		4086CB5E063AB30000D4CD53 /* stattext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861FC01FA022C0175ACA7 /* stattext.cpp */; };
+		4086CB5F063AB30000D4CD53 /* tabctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861FD01FA022C0175ACA7 /* tabctrl.cpp */; };
+		4086CB60063AB30000D4CD53 /* statbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861F801FA022C0175ACA7 /* statbox.cpp */; };
+		4086CB61063AB30000D4CD53 /* toolbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620201FA022C0175ACA7 /* toolbar.cpp */; };
+		4086CB62063AB30000D4CD53 /* textctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861FF01FA022C0175ACA7 /* textctrl.cpp */; };
+		4086CB63063AB30000D4CD53 /* timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620101FA022C0175ACA7 /* timer.cpp */; };
+		4086CB64063AB30000D4CD53 /* tooltip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620301FA022C0175ACA7 /* tooltip.cpp */; };
+		4086CB65063AB30000D4CD53 /* window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620A01FA022C0175ACA7 /* window.cpp */; };
+		4086CB66063AB30000D4CD53 /* utilsexc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620801FA022C0175ACA7 /* utilsexc.cpp */; };
+		4086CB67063AB30000D4CD53 /* utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620701FA022C0175ACA7 /* utils.cpp */; };
+		4086CB68063AB30000D4CD53 /* uma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620601FA022C0175ACA7 /* uma.cpp */; };
+		4086CB69063AB30000D4CD53 /* toplevel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8620401FA022C0175ACA7 /* toplevel.cpp */; };
+		4086CB6A063AB30000D4CD53 /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863DD01FA022D0175ACA7 /* pngwutil.c */; };
+		4086CB6B063AB30000D4CD53 /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863DC01FA022D0175ACA7 /* pngwtran.c */; };
+		4086CB6C063AB30000D4CD53 /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863DB01FA022D0175ACA7 /* pngwrite.c */; };
+		4086CB6D063AB30000D4CD53 /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863DA01FA022D0175ACA7 /* pngwio.c */; };
+		4086CB6E063AB30000D4CD53 /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D901FA022D0175ACA7 /* pngtrans.c */; };
+		4086CB6F063AB30000D4CD53 /* pngtest.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D801FA022D0175ACA7 /* pngtest.c */; };
+		4086CB70063AB30000D4CD53 /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D701FA022D0175ACA7 /* pngset.c */; };
+		4086CB71063AB30000D4CD53 /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D601FA022D0175ACA7 /* pngrutil.c */; };
+		4086CB72063AB30000D4CD53 /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D501FA022D0175ACA7 /* pngrtran.c */; };
+		4086CB73063AB30000D4CD53 /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D401FA022D0175ACA7 /* pngrio.c */; };
+		4086CB74063AB30000D4CD53 /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D301FA022D0175ACA7 /* pngread.c */; };
+		4086CB75063AB30000D4CD53 /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D201FA022D0175ACA7 /* pngpread.c */; };
+		4086CB76063AB30000D4CD53 /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863D101FA022D0175ACA7 /* pngmem.c */; };
+		4086CB77063AB30000D4CD53 /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863C501FA022D0175ACA7 /* pngget.c */; };
+		4086CB78063AB30000D4CD53 /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863C401FA022D0175ACA7 /* pngerror.c */; };
+		4086CB79063AB30000D4CD53 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A863BF01FA022D0175ACA7 /* png.c */; };
+		4086CB7A063AB30000D4CD53 /* menuitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861CE01FA022C0175ACA7 /* menuitem.cpp */; };
+		4086CB7B063AB30000D4CD53 /* menu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861CD01FA022C0175ACA7 /* menu.cpp */; };
+		4086CB7C063AB30000D4CD53 /* mdi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861CC01FA022C0175ACA7 /* mdi.cpp */; };
+		4086CB7D063AB30000D4CD53 /* macnotfy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861C801FA022C0175ACA7 /* macnotfy.cpp */; };
+		4086CB7E063AB30000D4CD53 /* listbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861C701FA022C0175ACA7 /* listbox.cpp */; };
+		4086CB80063AB30000D4CD53 /* icon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861C501FA022C0175ACA7 /* icon.cpp */; };
+		4086CB81063AB30000D4CD53 /* taskbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861C101FA022C0175ACA7 /* taskbar.cpp */; };
+		4086CB82063AB30000D4CD53 /* gauge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861C001FA022C0175ACA7 /* gauge.cpp */; };
+		4086CB83063AB30000D4CD53 /* frame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861BF01FA022C0175ACA7 /* frame.cpp */; };
+		4086CB84063AB30000D4CD53 /* fontutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861BE01FA022C0175ACA7 /* fontutil.cpp */; };
+		4086CB85063AB30000D4CD53 /* fontenum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861BD01FA022C0175ACA7 /* fontenum.cpp */; };
+		4086CB86063AB30000D4CD53 /* fontdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861BC01FA022C0175ACA7 /* fontdlg.cpp */; };
+		4086CB87063AB30000D4CD53 /* font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861BB01FA022C0175ACA7 /* font.cpp */; };
+		4086CB88063AB30000D4CD53 /* filedlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B901FA022C0175ACA7 /* filedlg.cpp */; };
+		4086CB89063AB30000D4CD53 /* dnd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B801FA022C0175ACA7 /* dnd.cpp */; };
+		4086CB8A063AB30000D4CD53 /* dirmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B701FA022C0175ACA7 /* dirmac.cpp */; };
+		4086CB8B063AB30000D4CD53 /* dirdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B601FA022C0175ACA7 /* dirdlg.cpp */; };
+		4086CB8C063AB30000D4CD53 /* dialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B501FA022C0175ACA7 /* dialog.cpp */; };
+		4086CB8D063AB30000D4CD53 /* dcscreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B401FA022C0175ACA7 /* dcscreen.cpp */; };
+		4086CB8E063AB30000D4CD53 /* dcprint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B301FA022C0175ACA7 /* dcprint.cpp */; };
+		4086CB8F063AB30000D4CD53 /* dcmemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B201FA022C0175ACA7 /* dcmemory.cpp */; };
+		4086CB90063AB30000D4CD53 /* dcclient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861B101FA022C0175ACA7 /* dcclient.cpp */; };
+		4086CB91063AB30000D4CD53 /* tif_print.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644101FA022D0175ACA7 /* tif_print.c */; };
+		4086CB92063AB30000D4CD53 /* tif_predict.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643F01FA022D0175ACA7 /* tif_predict.c */; };
+		4086CB93063AB30000D4CD53 /* tif_pixarlog.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643E01FA022D0175ACA7 /* tif_pixarlog.c */; };
+		4086CB94063AB30000D4CD53 /* tif_packbits.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643D01FA022D0175ACA7 /* tif_packbits.c */; };
+		4086CB95063AB30000D4CD53 /* tif_open.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643B01FA022D0175ACA7 /* tif_open.c */; };
+		4086CB96063AB30000D4CD53 /* tif_next.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643A01FA022D0175ACA7 /* tif_next.c */; };
+		4086CB97063AB30000D4CD53 /* tif_lzw.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643801FA022D0175ACA7 /* tif_lzw.c */; };
+		4086CB98063AB30000D4CD53 /* tif_luv.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643701FA022D0175ACA7 /* tif_luv.c */; };
+		4086CB99063AB30000D4CD53 /* tif_jpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643601FA022D0175ACA7 /* tif_jpeg.c */; };
+		4086CB9A063AB30000D4CD53 /* tif_getimage.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643501FA022D0175ACA7 /* tif_getimage.c */; };
+		4086CB9B063AB30000D4CD53 /* tif_flush.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643401FA022D0175ACA7 /* tif_flush.c */; };
+		4086CB9C063AB30000D4CD53 /* tif_fax3sm.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643301FA022D0175ACA7 /* tif_fax3sm.c */; };
+		4086CB9D063AB30000D4CD53 /* tif_fax3.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643101FA022D0175ACA7 /* tif_fax3.c */; };
+		4086CB9E063AB30000D4CD53 /* tif_error.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8643001FA022D0175ACA7 /* tif_error.c */; };
+		4086CB9F063AB30000D4CD53 /* tif_dumpmode.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642F01FA022D0175ACA7 /* tif_dumpmode.c */; };
+		4086CBA0063AB30000D4CD53 /* tif_dirwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642E01FA022D0175ACA7 /* tif_dirwrite.c */; };
+		4086CBA1063AB30000D4CD53 /* tif_dirread.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642D01FA022D0175ACA7 /* tif_dirread.c */; };
+		4086CBA2063AB30000D4CD53 /* tif_dirinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642C01FA022D0175ACA7 /* tif_dirinfo.c */; };
+		4086CBA3063AB30000D4CD53 /* tif_dir.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642A01FA022D0175ACA7 /* tif_dir.c */; };
+		4086CBA4063AB30000D4CD53 /* tif_compress.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642901FA022D0175ACA7 /* tif_compress.c */; };
+		4086CBA5063AB30000D4CD53 /* tif_codec.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642801FA022D0175ACA7 /* tif_codec.c */; };
+		4086CBA6063AB30000D4CD53 /* tif_close.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642701FA022D0175ACA7 /* tif_close.c */; };
+		4086CBA7063AB30000D4CD53 /* tif_aux.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8642601FA022D0175ACA7 /* tif_aux.c */; };
+		4086CBA8063AB30000D4CD53 /* tif_zip.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644E01FA022D0175ACA7 /* tif_zip.c */; };
+		4086CBA9063AB30000D4CD53 /* tif_write.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644D01FA022D0175ACA7 /* tif_write.c */; };
+		4086CBAA063AB30000D4CD53 /* tif_warning.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644A01FA022D0175ACA7 /* tif_warning.c */; };
+		4086CBAB063AB30000D4CD53 /* tif_version.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644801FA022D0175ACA7 /* tif_version.c */; };
+		4086CBAC063AB30000D4CD53 /* tif_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644701FA022D0175ACA7 /* tif_unix.c */; };
+		4086CBAD063AB30000D4CD53 /* tif_tile.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644601FA022D0175ACA7 /* tif_tile.c */; };
+		4086CBAE063AB30000D4CD53 /* tif_thunder.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644501FA022D0175ACA7 /* tif_thunder.c */; };
+		4086CBAF063AB30000D4CD53 /* tif_swab.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644401FA022D0175ACA7 /* tif_swab.c */; };
+		4086CBB0063AB30000D4CD53 /* tif_strip.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644301FA022D0175ACA7 /* tif_strip.c */; };
+		4086CBB1063AB30000D4CD53 /* tif_read.c in Sources */ = {isa = PBXBuildFile; fileRef = F5A8644201FA022D0175ACA7 /* tif_read.c */; };
+		4086CBB2063AB30000D4CD53 /* hashmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F5A69F02CDB27401000133 /* hashmap.cpp */; };
+		4086CBB3063AB30000D4CD53 /* artprov.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F5A6A102CDB6CA01000133 /* artprov.cpp */; };
+		4086CBB4063AB30000D4CD53 /* artstd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F5A6A202CDB6CA01000133 /* artstd.cpp */; };
+		4086CBB5063AB30000D4CD53 /* iconbndl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F5A6A302CDB6CA01000133 /* iconbndl.cpp */; };
+		4086CBB6063AB30000D4CD53 /* imagfill.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F5A6A402CDB6CA01000133 /* imagfill.cpp */; };
+		4086CBB7063AB30000D4CD53 /* utilsunx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8649401FA022D0175ACA7 /* utilsunx.cpp */; };
+		4086CBB8063AB30000D4CD53 /* snglinst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8649201FA022D0175ACA7 /* snglinst.cpp */; };
+		4086CBB9063AB30000D4CD53 /* msgout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F58E04FD02F11FA701A8020C /* msgout.cpp */; };
+		4086CBBA063AB30000D4CD53 /* radiocmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AC2EDD03803A3601000133 /* radiocmn.cpp */; };
+		4086CBBB063AB30000D4CD53 /* settcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5AC2EDE03803A3601000133 /* settcmn.cpp */; };
+		4086CBBC063AB30000D4CD53 /* display.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CADEF54103C8C0A800000133 /* display.cpp */; };
+		4086CBBD063AB30000D4CD53 /* MoreFilesX.c in Sources */ = {isa = PBXBuildFile; fileRef = CADEF54303C8C0A800000133 /* MoreFilesX.c */; };
+		4086CBBE063AB30000D4CD53 /* accesscmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA0CB57B0450773900000102 /* accesscmn.cpp */; };
+		4086CBBF063AB30000D4CD53 /* datacmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA0CB57C0450773900000102 /* datacmn.cpp */; };
+		4086CBC0063AB30000D4CD53 /* dpycmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA0CB57D0450773900000102 /* dpycmn.cpp */; };
+		4086CBC1063AB30000D4CD53 /* rgncmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA0CB57E0450773900000102 /* rgncmn.cpp */; };
+		4086CBC2063AB30000D4CD53 /* appbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60175604D43A2700000080 /* appbase.cpp */; };
+		4086CBC3063AB30000D4CD53 /* dbgrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60175904D43A5400000080 /* dbgrid.cpp */; };
+		4086CBC4063AB30000D4CD53 /* fldlgcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60175C04D43A8100000080 /* fldlgcmn.cpp */; };
+		4086CBC5063AB30000D4CD53 /* fmapbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60175D04D43A8100000080 /* fmapbase.cpp */; };
+		4086CBC6063AB30000D4CD53 /* stopwatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60175E04D43A8100000080 /* stopwatch.cpp */; };
+		4086CBC7063AB30000D4CD53 /* renderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60176504D43AE200000080 /* renderer.cpp */; };
+		4086CBC8063AB30000D4CD53 /* init.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60176904D43BF100000080 /* init.cpp */; };
+		4086CBC9063AB30000D4CD53 /* renderg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60176C04D43CAA00000080 /* renderg.cpp */; };
+		4086CBCA063AB30000D4CD53 /* selstore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60176D04D43CAA00000080 /* selstore.cpp */; };
+		4086CBCB063AB30000D4CD53 /* baseunix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA60177204D43D2300000080 /* baseunix.cpp */; };
+		4086CBCC063AB30000D4CD53 /* rendcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA89578504D7052700000080 /* rendcmn.cpp */; };
+		4086CBCD063AB30000D4CD53 /* m_style.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA89578904D705D700000080 /* m_style.cpp */; };
+		4086CBCE063AB30000D4CD53 /* xti.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA8CC823050E6CD800000080 /* xti.cpp */; };
+		4086CBCF063AB30000D4CD53 /* xtistrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA8CC824050E6CD800000080 /* xtistrm.cpp */; };
+		4086CBD0063AB30000D4CD53 /* xtixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA8CC825050E6CD800000080 /* xtixml.cpp */; };
+		4086CBD1063AB30000D4CD53 /* bookctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA8CC832050EE2BD00000080 /* bookctrl.cpp */; };
+		4086CBD2063AB30000D4CD53 /* sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4086C3A2063A454900D4CD53 /* sound.cpp */; };
+		4086CBD4063AB30000D4CD53 /* glcanvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4086C59F063AA5C700D4CD53 /* glcanvas.cpp */; };
+		4086CBD7063AB30000D4CD53 /* regcomp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4086C638063AAD4A00D4CD53 /* regcomp.c */; };
+		4086CBD8063AB30000D4CD53 /* regerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 4086C63B063AAD4A00D4CD53 /* regerror.c */; };
+		4086CBD9063AB30000D4CD53 /* regexec.c in Sources */ = {isa = PBXBuildFile; fileRef = 4086C641063AAD4A00D4CD53 /* regexec.c */; };
+		4086CBDA063AB30000D4CD53 /* regfree.c in Sources */ = {isa = PBXBuildFile; fileRef = 4086C643063AAD4A00D4CD53 /* regfree.c */; };
+		4086CBDC063AB30000D4CD53 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB77AAFE841565C02AAC07 /* Carbon.framework */; };
+		4086CBDD063AB30000D4CD53 /* System.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C5D3DF01FA2D0A01D0F0BA /* System.framework */; };
+		4086CBDE063AB30000D4CD53 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F55E08F801FDF9CC01000133 /* libz.dylib */; };
+		408A597D0A8998750014D20E /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 408A595D0A8998750014D20E /* AGL.framework */; };
+		408A597E0A8998750014D20E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 408A595E0A8998750014D20E /* OpenGL.framework */; };
+		408A597F0A8998750014D20E /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 408A595D0A8998750014D20E /* AGL.framework */; };
+		408A59800A8998750014D20E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 408A595E0A8998750014D20E /* OpenGL.framework */; };
+		408A59850A8998A40014D20E /* buttonbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59820A8998A40014D20E /* buttonbar.cpp */; };
+		408A59860A8998A40014D20E /* toolbkg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59830A8998A40014D20E /* toolbkg.cpp */; };
+		408A59870A8998A40014D20E /* treebkg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59840A8998A40014D20E /* treebkg.cpp */; };
+		408A59880A8998A40014D20E /* buttonbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59820A8998A40014D20E /* buttonbar.cpp */; };
+		408A59890A8998A40014D20E /* toolbkg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59830A8998A40014D20E /* toolbkg.cpp */; };
+		408A598A0A8998A40014D20E /* treebkg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59840A8998A40014D20E /* treebkg.cpp */; };
+		408A59910A8998DB0014D20E /* clrpickerg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A598C0A8998DA0014D20E /* clrpickerg.cpp */; };
+		408A59920A8998DB0014D20E /* filepickerg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A598D0A8998DA0014D20E /* filepickerg.cpp */; };
+		408A59930A8998DB0014D20E /* fontpickerg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A598E0A8998DA0014D20E /* fontpickerg.cpp */; };
+		408A59940A8998DB0014D20E /* hyperlink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A598F0A8998DA0014D20E /* hyperlink.cpp */; };
+		408A59950A8998DB0014D20E /* odcombo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59900A8998DA0014D20E /* odcombo.cpp */; };
+		408A59960A8998DB0014D20E /* clrpickerg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A598C0A8998DA0014D20E /* clrpickerg.cpp */; };
+		408A59970A8998DB0014D20E /* filepickerg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A598D0A8998DA0014D20E /* filepickerg.cpp */; };
+		408A59980A8998DB0014D20E /* fontpickerg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A598E0A8998DA0014D20E /* fontpickerg.cpp */; };
+		408A59990A8998DB0014D20E /* hyperlink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A598F0A8998DA0014D20E /* hyperlink.cpp */; };
+		408A599A0A8998DB0014D20E /* odcombo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59900A8998DA0014D20E /* odcombo.cpp */; };
+		408A59A50A89992F0014D20E /* clrpickercmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A599F0A89992F0014D20E /* clrpickercmn.cpp */; };
+		408A59A60A89992F0014D20E /* combocmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59A00A89992F0014D20E /* combocmn.cpp */; };
+		408A59A70A89992F0014D20E /* filepickercmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59A10A89992F0014D20E /* filepickercmn.cpp */; };
+		408A59A80A89992F0014D20E /* fontpickercmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59A20A89992F0014D20E /* fontpickercmn.cpp */; };
+		408A59A90A89992F0014D20E /* pickerbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59A30A89992F0014D20E /* pickerbase.cpp */; };
+		408A59AA0A89992F0014D20E /* powercmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59A40A89992F0014D20E /* powercmn.cpp */; };
+		408A59AB0A89992F0014D20E /* clrpickercmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A599F0A89992F0014D20E /* clrpickercmn.cpp */; };
+		408A59AC0A89992F0014D20E /* combocmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59A00A89992F0014D20E /* combocmn.cpp */; };
+		408A59AD0A89992F0014D20E /* filepickercmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59A10A89992F0014D20E /* filepickercmn.cpp */; };
+		408A59AE0A89992F0014D20E /* fontpickercmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59A20A89992F0014D20E /* fontpickercmn.cpp */; };
+		408A59AF0A89992F0014D20E /* pickerbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59A30A89992F0014D20E /* pickerbase.cpp */; };
+		408A59B00A89992F0014D20E /* powercmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59A40A89992F0014D20E /* powercmn.cpp */; };
+		408A59B30A8999500014D20E /* combog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59B20A8999500014D20E /* combog.cpp */; };
+		408A59B40A8999500014D20E /* combog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59B20A8999500014D20E /* combog.cpp */; };
+		408A59BD0A8999800014D20E /* xh_clrpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59B60A8999800014D20E /* xh_clrpicker.cpp */; };
+		408A59BE0A8999800014D20E /* xh_dirpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59B70A8999800014D20E /* xh_dirpicker.cpp */; };
+		408A59BF0A8999800014D20E /* xh_filepicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59B80A8999800014D20E /* xh_filepicker.cpp */; };
+		408A59C00A8999800014D20E /* xh_fontpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59B90A8999800014D20E /* xh_fontpicker.cpp */; };
+		408A59C10A8999800014D20E /* xh_hyperlink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59BA0A8999800014D20E /* xh_hyperlink.cpp */; };
+		408A59C20A8999800014D20E /* xh_odcombo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59BB0A8999800014D20E /* xh_odcombo.cpp */; };
+		408A59C30A8999800014D20E /* xh_treebk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59BC0A8999800014D20E /* xh_treebk.cpp */; };
+		408A59C40A8999800014D20E /* xh_clrpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59B60A8999800014D20E /* xh_clrpicker.cpp */; };
+		408A59C50A8999800014D20E /* xh_dirpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59B70A8999800014D20E /* xh_dirpicker.cpp */; };
+		408A59C60A8999800014D20E /* xh_filepicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59B80A8999800014D20E /* xh_filepicker.cpp */; };
+		408A59C70A8999800014D20E /* xh_fontpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59B90A8999800014D20E /* xh_fontpicker.cpp */; };
+		408A59C80A8999800014D20E /* xh_hyperlink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59BA0A8999800014D20E /* xh_hyperlink.cpp */; };
+		408A59C90A8999800014D20E /* xh_odcombo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59BB0A8999800014D20E /* xh_odcombo.cpp */; };
+		408A59CA0A8999800014D20E /* xh_treebk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 408A59BC0A8999800014D20E /* xh_treebk.cpp */; };
+		408A5A710A8999A00014D20E /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 408A59CC0A8999A00014D20E /* AppKit.framework */; };
+		408A5A720A8999A00014D20E /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 408A59CC0A8999A00014D20E /* AppKit.framework */; };
+		409F02700976CA5600D1030F /* xh_grid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 409F026F0976CA5600D1030F /* xh_grid.cpp */; };
+		409F02710976CA5600D1030F /* xh_grid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 409F026F0976CA5600D1030F /* xh_grid.cpp */; };
+		40ADC34A08156AE40009DA36 /* debugrpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC34908156AE40009DA36 /* debugrpt.cpp */; };
+		40ADC34D08156AE40009DA36 /* debugrpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC34908156AE40009DA36 /* debugrpt.cpp */; };
+		40ADC36008156DC10009DA36 /* xml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC35F08156DC10009DA36 /* xml.cpp */; };
+		40ADC36308156DC10009DA36 /* xml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC35F08156DC10009DA36 /* xml.cpp */; };
+		40ADC39008156DEB0009DA36 /* xh_bmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36508156DEB0009DA36 /* xh_bmp.cpp */; };
+		40ADC39108156DEB0009DA36 /* xh_bmpbt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36608156DEB0009DA36 /* xh_bmpbt.cpp */; };
+		40ADC39208156DEB0009DA36 /* xh_bttn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36708156DEB0009DA36 /* xh_bttn.cpp */; };
+		40ADC39308156DEB0009DA36 /* xh_cald.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36808156DEB0009DA36 /* xh_cald.cpp */; };
+		40ADC39408156DEB0009DA36 /* xh_chckb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36908156DEB0009DA36 /* xh_chckb.cpp */; };
+		40ADC39508156DEB0009DA36 /* xh_chckl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36A08156DEB0009DA36 /* xh_chckl.cpp */; };
+		40ADC39608156DEB0009DA36 /* xh_choic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36B08156DEB0009DA36 /* xh_choic.cpp */; };
+		40ADC39708156DEB0009DA36 /* xh_choicbk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36C08156DEB0009DA36 /* xh_choicbk.cpp */; };
+		40ADC39808156DEB0009DA36 /* xh_combo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36D08156DEB0009DA36 /* xh_combo.cpp */; };
+		40ADC39908156DEB0009DA36 /* xh_datectrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36E08156DEB0009DA36 /* xh_datectrl.cpp */; };
+		40ADC39A08156DEB0009DA36 /* xh_dlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36F08156DEB0009DA36 /* xh_dlg.cpp */; };
+		40ADC39B08156DEB0009DA36 /* xh_frame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37008156DEB0009DA36 /* xh_frame.cpp */; };
+		40ADC39C08156DEB0009DA36 /* xh_gauge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37108156DEB0009DA36 /* xh_gauge.cpp */; };
+		40ADC39D08156DEB0009DA36 /* xh_gdctl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37208156DEB0009DA36 /* xh_gdctl.cpp */; };
+		40ADC39E08156DEB0009DA36 /* xh_html.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37308156DEB0009DA36 /* xh_html.cpp */; };
+		40ADC39F08156DEB0009DA36 /* xh_listb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37408156DEB0009DA36 /* xh_listb.cpp */; };
+		40ADC3A008156DEB0009DA36 /* xh_listbk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37508156DEB0009DA36 /* xh_listbk.cpp */; };
+		40ADC3A108156DEB0009DA36 /* xh_listc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37608156DEB0009DA36 /* xh_listc.cpp */; };
+		40ADC3A208156DEB0009DA36 /* xh_mdi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37708156DEB0009DA36 /* xh_mdi.cpp */; };
+		40ADC3A308156DEB0009DA36 /* xh_menu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37808156DEB0009DA36 /* xh_menu.cpp */; };
+		40ADC3A408156DEB0009DA36 /* xh_notbk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37908156DEB0009DA36 /* xh_notbk.cpp */; };
+		40ADC3A508156DEB0009DA36 /* xh_panel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37A08156DEB0009DA36 /* xh_panel.cpp */; };
+		40ADC3A608156DEB0009DA36 /* xh_radbt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37B08156DEB0009DA36 /* xh_radbt.cpp */; };
+		40ADC3A708156DEB0009DA36 /* xh_radbx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37C08156DEB0009DA36 /* xh_radbx.cpp */; };
+		40ADC3A808156DEB0009DA36 /* xh_scrol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37D08156DEB0009DA36 /* xh_scrol.cpp */; };
+		40ADC3A908156DEB0009DA36 /* xh_scwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37E08156DEB0009DA36 /* xh_scwin.cpp */; };
+		40ADC3AA08156DEB0009DA36 /* xh_sizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37F08156DEB0009DA36 /* xh_sizer.cpp */; };
+		40ADC3AB08156DEB0009DA36 /* xh_slidr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38008156DEB0009DA36 /* xh_slidr.cpp */; };
+		40ADC3AC08156DEB0009DA36 /* xh_spin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38108156DEB0009DA36 /* xh_spin.cpp */; };
+		40ADC3AD08156DEB0009DA36 /* xh_split.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38208156DEB0009DA36 /* xh_split.cpp */; };
+		40ADC3AE08156DEB0009DA36 /* xh_statbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38308156DEB0009DA36 /* xh_statbar.cpp */; };
+		40ADC3AF08156DEB0009DA36 /* xh_stbmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38408156DEB0009DA36 /* xh_stbmp.cpp */; };
+		40ADC3B008156DEB0009DA36 /* xh_stbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38508156DEB0009DA36 /* xh_stbox.cpp */; };
+		40ADC3B108156DEB0009DA36 /* xh_stlin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38608156DEB0009DA36 /* xh_stlin.cpp */; };
+		40ADC3B208156DEB0009DA36 /* xh_sttxt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38708156DEB0009DA36 /* xh_sttxt.cpp */; };
+		40ADC3B308156DEB0009DA36 /* xh_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38808156DEB0009DA36 /* xh_text.cpp */; };
+		40ADC3B408156DEB0009DA36 /* xh_tglbtn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38908156DEB0009DA36 /* xh_tglbtn.cpp */; };
+		40ADC3B508156DEB0009DA36 /* xh_toolb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38A08156DEB0009DA36 /* xh_toolb.cpp */; };
+		40ADC3B608156DEB0009DA36 /* xh_tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38B08156DEB0009DA36 /* xh_tree.cpp */; };
+		40ADC3B708156DEB0009DA36 /* xh_unkwn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38C08156DEB0009DA36 /* xh_unkwn.cpp */; };
+		40ADC3B808156DEB0009DA36 /* xh_wizrd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38D08156DEB0009DA36 /* xh_wizrd.cpp */; };
+		40ADC3B908156DEB0009DA36 /* xmlres.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38E08156DEB0009DA36 /* xmlres.cpp */; };
+		40ADC3BA08156DEB0009DA36 /* xmlrsall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38F08156DEB0009DA36 /* xmlrsall.cpp */; };
+		40ADC41108156DEB0009DA36 /* xh_bmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36508156DEB0009DA36 /* xh_bmp.cpp */; };
+		40ADC41208156DEB0009DA36 /* xh_bmpbt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36608156DEB0009DA36 /* xh_bmpbt.cpp */; };
+		40ADC41308156DEB0009DA36 /* xh_bttn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36708156DEB0009DA36 /* xh_bttn.cpp */; };
+		40ADC41408156DEB0009DA36 /* xh_cald.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36808156DEB0009DA36 /* xh_cald.cpp */; };
+		40ADC41508156DEB0009DA36 /* xh_chckb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36908156DEB0009DA36 /* xh_chckb.cpp */; };
+		40ADC41608156DEB0009DA36 /* xh_chckl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36A08156DEB0009DA36 /* xh_chckl.cpp */; };
+		40ADC41708156DEB0009DA36 /* xh_choic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36B08156DEB0009DA36 /* xh_choic.cpp */; };
+		40ADC41808156DEB0009DA36 /* xh_choicbk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36C08156DEB0009DA36 /* xh_choicbk.cpp */; };
+		40ADC41908156DEB0009DA36 /* xh_combo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36D08156DEB0009DA36 /* xh_combo.cpp */; };
+		40ADC41A08156DEB0009DA36 /* xh_datectrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36E08156DEB0009DA36 /* xh_datectrl.cpp */; };
+		40ADC41B08156DEB0009DA36 /* xh_dlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC36F08156DEB0009DA36 /* xh_dlg.cpp */; };
+		40ADC41C08156DEB0009DA36 /* xh_frame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37008156DEB0009DA36 /* xh_frame.cpp */; };
+		40ADC41D08156DEB0009DA36 /* xh_gauge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37108156DEB0009DA36 /* xh_gauge.cpp */; };
+		40ADC41E08156DEB0009DA36 /* xh_gdctl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37208156DEB0009DA36 /* xh_gdctl.cpp */; };
+		40ADC41F08156DEB0009DA36 /* xh_html.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37308156DEB0009DA36 /* xh_html.cpp */; };
+		40ADC42008156DEB0009DA36 /* xh_listb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37408156DEB0009DA36 /* xh_listb.cpp */; };
+		40ADC42108156DEB0009DA36 /* xh_listbk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37508156DEB0009DA36 /* xh_listbk.cpp */; };
+		40ADC42208156DEB0009DA36 /* xh_listc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37608156DEB0009DA36 /* xh_listc.cpp */; };
+		40ADC42308156DEB0009DA36 /* xh_mdi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37708156DEB0009DA36 /* xh_mdi.cpp */; };
+		40ADC42408156DEB0009DA36 /* xh_menu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37808156DEB0009DA36 /* xh_menu.cpp */; };
+		40ADC42508156DEB0009DA36 /* xh_notbk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37908156DEB0009DA36 /* xh_notbk.cpp */; };
+		40ADC42608156DEB0009DA36 /* xh_panel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37A08156DEB0009DA36 /* xh_panel.cpp */; };
+		40ADC42708156DEB0009DA36 /* xh_radbt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37B08156DEB0009DA36 /* xh_radbt.cpp */; };
+		40ADC42808156DEB0009DA36 /* xh_radbx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37C08156DEB0009DA36 /* xh_radbx.cpp */; };
+		40ADC42908156DEB0009DA36 /* xh_scrol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37D08156DEB0009DA36 /* xh_scrol.cpp */; };
+		40ADC42A08156DEB0009DA36 /* xh_scwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37E08156DEB0009DA36 /* xh_scwin.cpp */; };
+		40ADC42B08156DEB0009DA36 /* xh_sizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC37F08156DEB0009DA36 /* xh_sizer.cpp */; };
+		40ADC42C08156DEB0009DA36 /* xh_slidr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38008156DEB0009DA36 /* xh_slidr.cpp */; };
+		40ADC42D08156DEB0009DA36 /* xh_spin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38108156DEB0009DA36 /* xh_spin.cpp */; };
+		40ADC42E08156DEB0009DA36 /* xh_split.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38208156DEB0009DA36 /* xh_split.cpp */; };
+		40ADC42F08156DEB0009DA36 /* xh_statbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38308156DEB0009DA36 /* xh_statbar.cpp */; };
+		40ADC43008156DEB0009DA36 /* xh_stbmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38408156DEB0009DA36 /* xh_stbmp.cpp */; };
+		40ADC43108156DEB0009DA36 /* xh_stbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38508156DEB0009DA36 /* xh_stbox.cpp */; };
+		40ADC43208156DEB0009DA36 /* xh_stlin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38608156DEB0009DA36 /* xh_stlin.cpp */; };
+		40ADC43308156DEB0009DA36 /* xh_sttxt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38708156DEB0009DA36 /* xh_sttxt.cpp */; };
+		40ADC43408156DEB0009DA36 /* xh_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38808156DEB0009DA36 /* xh_text.cpp */; };
+		40ADC43508156DEB0009DA36 /* xh_tglbtn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38908156DEB0009DA36 /* xh_tglbtn.cpp */; };
+		40ADC43608156DEB0009DA36 /* xh_toolb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38A08156DEB0009DA36 /* xh_toolb.cpp */; };
+		40ADC43708156DEB0009DA36 /* xh_tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38B08156DEB0009DA36 /* xh_tree.cpp */; };
+		40ADC43808156DEB0009DA36 /* xh_unkwn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38C08156DEB0009DA36 /* xh_unkwn.cpp */; };
+		40ADC43908156DEB0009DA36 /* xh_wizrd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38D08156DEB0009DA36 /* xh_wizrd.cpp */; };
+		40ADC43A08156DEB0009DA36 /* xmlres.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38E08156DEB0009DA36 /* xmlres.cpp */; };
+		40ADC43B08156DEB0009DA36 /* xmlrsall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC38F08156DEB0009DA36 /* xmlrsall.cpp */; };
+		40ADC44508156EDC0009DA36 /* xmlparse.c in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC44208156EDC0009DA36 /* xmlparse.c */; };
+		40ADC44608156EDC0009DA36 /* xmlrole.c in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC44308156EDC0009DA36 /* xmlrole.c */; };
+		40ADC44708156EDC0009DA36 /* xmltok.c in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC44408156EDC0009DA36 /* xmltok.c */; };
+		40ADC44E08156EDC0009DA36 /* xmlparse.c in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC44208156EDC0009DA36 /* xmlparse.c */; };
+		40ADC44F08156EDC0009DA36 /* xmlrole.c in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC44308156EDC0009DA36 /* xmlrole.c */; };
+		40ADC45008156EDC0009DA36 /* xmltok.c in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC44408156EDC0009DA36 /* xmltok.c */; };
+		40ADC47408160C200009DA36 /* choicbkg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC47208160C200009DA36 /* choicbkg.cpp */; };
+		40ADC47508160C200009DA36 /* listbkg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC47308160C200009DA36 /* listbkg.cpp */; };
+		40ADC47A08160C200009DA36 /* choicbkg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC47208160C200009DA36 /* choicbkg.cpp */; };
+		40ADC47B08160C200009DA36 /* listbkg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC47308160C200009DA36 /* listbkg.cpp */; };
+		40ADC48708160CAD0009DA36 /* dbgrptg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC48608160CAD0009DA36 /* dbgrptg.cpp */; };
+		40ADC48A08160CAD0009DA36 /* dbgrptg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ADC48608160CAD0009DA36 /* dbgrptg.cpp */; };
+		40AEF28C0AB5EC0800B2C19A /* platinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AEF28B0AB5EC0800B2C19A /* platinfo.cpp */; };
+		40AEF28D0AB5EC0800B2C19A /* platinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AEF28B0AB5EC0800B2C19A /* platinfo.cpp */; };
+		40AF909107C8A926006A6D3C /* mediactrlcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909007C8A926006A6D3C /* mediactrlcmn.cpp */; };
+		40AF909307C8A926006A6D3C /* mediactrlcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909007C8A926006A6D3C /* mediactrlcmn.cpp */; };
+		40AF909B07C8A976006A6D3C /* datectlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909507C8A976006A6D3C /* datectlg.cpp */; };
+		40AF909C07C8A976006A6D3C /* filedlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909607C8A976006A6D3C /* filedlgg.cpp */; };
+		40AF909D07C8A976006A6D3C /* htmllbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909707C8A976006A6D3C /* htmllbox.cpp */; };
+		40AF909F07C8A976006A6D3C /* vlbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909907C8A976006A6D3C /* vlbox.cpp */; };
+		40AF90A007C8A976006A6D3C /* vscroll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909A07C8A976006A6D3C /* vscroll.cpp */; };
+		40AF90A707C8A976006A6D3C /* datectlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909507C8A976006A6D3C /* datectlg.cpp */; };
+		40AF90A807C8A976006A6D3C /* filedlgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909607C8A976006A6D3C /* filedlgg.cpp */; };
+		40AF90A907C8A976006A6D3C /* htmllbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909707C8A976006A6D3C /* htmllbox.cpp */; };
+		40AF90AB07C8A976006A6D3C /* vlbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909907C8A976006A6D3C /* vlbox.cpp */; };
+		40AF90AC07C8A976006A6D3C /* vscroll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF909A07C8A976006A6D3C /* vscroll.cpp */; };
+		40AF90B507C8A9CF006A6D3C /* hid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90B307C8A9CF006A6D3C /* hid.cpp */; };
+		40AF90B607C8A9CF006A6D3C /* hidjoystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90B407C8A9CF006A6D3C /* hidjoystick.cpp */; };
+		40AF90B907C8A9CF006A6D3C /* hid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90B307C8A9CF006A6D3C /* hid.cpp */; };
+		40AF90BA07C8A9CF006A6D3C /* hidjoystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90B407C8A9CF006A6D3C /* hidjoystick.cpp */; };
+		40AF90BE07C8AA08006A6D3C /* dlunix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90BD07C8AA08006A6D3C /* dlunix.cpp */; };
+		40AF90C007C8AA08006A6D3C /* dlunix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90BD07C8AA08006A6D3C /* dlunix.cpp */; };
+		40AF90C307C8AA17006A6D3C /* chm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90C207C8AA17006A6D3C /* chm.cpp */; };
+		40AF90C507C8AA17006A6D3C /* chm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90C207C8AA17006A6D3C /* chm.cpp */; };
+		40AF90EB07C8B18C006A6D3C /* dccg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90E407C8B18C006A6D3C /* dccg.cpp */; };
+		40AF90EC07C8B18C006A6D3C /* drawer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90E507C8B18C006A6D3C /* drawer.cpp */; };
+		40AF90EF07C8B18C006A6D3C /* mediactrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90E807C8B18C006A6D3C /* mediactrl.cpp */; };
+		40AF90F707C8B18C006A6D3C /* colordlgosx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90E207C8B18C006A6D3C /* colordlgosx.mm */; };
+		40AF90F907C8B18C006A6D3C /* dccg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90E407C8B18C006A6D3C /* dccg.cpp */; };
+		40AF90FA07C8B18C006A6D3C /* drawer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90E507C8B18C006A6D3C /* drawer.cpp */; };
+		40AF90FB07C8B18C006A6D3C /* fontdlgosx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90E607C8B18C006A6D3C /* fontdlgosx.mm */; };
+		40AF90FD07C8B18C006A6D3C /* mediactrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90E807C8B18C006A6D3C /* mediactrl.cpp */; };
+		40AF913607C8BD1F006A6D3C /* combobox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF913507C8BD1F006A6D3C /* combobox.cpp */; };
+		40AF913807C8BD1F006A6D3C /* combobox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40AF913507C8BD1F006A6D3C /* combobox.cpp */; };
+		40AF915207C8C912006A6D3C /* tif_color.c in Sources */ = {isa = PBXBuildFile; fileRef = 40AF915007C8C912006A6D3C /* tif_color.c */; };
+		40AF915307C8C912006A6D3C /* tif_extension.c in Sources */ = {isa = PBXBuildFile; fileRef = 40AF915107C8C912006A6D3C /* tif_extension.c */; };
+		40AF915607C8C912006A6D3C /* tif_color.c in Sources */ = {isa = PBXBuildFile; fileRef = 40AF915007C8C912006A6D3C /* tif_color.c */; };
+		40AF915707C8C912006A6D3C /* tif_extension.c in Sources */ = {isa = PBXBuildFile; fileRef = 40AF915107C8C912006A6D3C /* tif_extension.c */; };
+		40CDE8D20982505E00E8156D /* evtloopcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40CDE8D00982505E00E8156D /* evtloopcmn.cpp */; };
+		40CDE8D40982505E00E8156D /* evtloopcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40CDE8D00982505E00E8156D /* evtloopcmn.cpp */; };
+		40CDE8DA098250AB00E8156D /* evtloop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40CDE8D9098250AB00E8156D /* evtloop.cpp */; };
+		40CDE8DB098250AB00E8156D /* evtloop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40CDE8D9098250AB00E8156D /* evtloop.cpp */; };
+		40DCE35006C744C90000D83E /* gsocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40DCE34F06C744C90000D83E /* gsocket.cpp */; };
+		40DCE35206C744C90000D83E /* gsocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40DCE34F06C744C90000D83E /* gsocket.cpp */; };
+		40ECB13A074BD1D0005AAC48 /* stdpaths.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ECB139074BD1D0005AAC48 /* stdpaths.cpp */; };
+		40ECB13C074BD1D0005AAC48 /* stdpaths.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ECB139074BD1D0005AAC48 /* stdpaths.cpp */; };
+		40F0173A0A30684000AC9076 /* colourcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F017380A30683F00AC9076 /* colourcmn.cpp */; };
+		40F0173B0A30684000AC9076 /* convauto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F017390A30683F00AC9076 /* convauto.cpp */; };
+		40F0173C0A30684000AC9076 /* colourcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F017380A30683F00AC9076 /* colourcmn.cpp */; };
+		40F0173D0A30684000AC9076 /* convauto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F017390A30683F00AC9076 /* convauto.cpp */; };
+		40F017420A306C7600AC9076 /* fontenumcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F017410A306C7600AC9076 /* fontenumcmn.cpp */; };
+		40F017430A306C7600AC9076 /* fontenumcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F017410A306C7600AC9076 /* fontenumcmn.cpp */; };
+		40F10E5806AD0230003C7AC3 /* tglbtn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F10E5606AD0230003C7AC3 /* tglbtn.cpp */; };
+		40F10E5906AD0230003C7AC3 /* thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F10E5706AD0230003C7AC3 /* thread.cpp */; };
+		40F10E5C06AD0230003C7AC3 /* tglbtn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F10E5606AD0230003C7AC3 /* tglbtn.cpp */; };
+		40F10E5D06AD0230003C7AC3 /* thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F10E5706AD0230003C7AC3 /* thread.cpp */; };
+		40F185C30AB722BC00E3BEF9 /* richtextbuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F185B90AB722BC00E3BEF9 /* richtextbuffer.cpp */; };
+		40F185C40AB722BC00E3BEF9 /* richtextctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F185BA0AB722BC00E3BEF9 /* richtextctrl.cpp */; };
+		40F185C50AB722BC00E3BEF9 /* richtexthtml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F185BB0AB722BC00E3BEF9 /* richtexthtml.cpp */; };
+		40F185C60AB722BC00E3BEF9 /* richtextstyles.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F185BC0AB722BC00E3BEF9 /* richtextstyles.cpp */; };
+		40F185C70AB722BC00E3BEF9 /* richtextxml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40F185BD0AB722BC00E3BEF9 /* richtextxml.cpp */; };
+		40FF2B0D0869B1530013E961 /* webkit.mm in Sources */ = {isa = PBXBuildFile; fileRef = 40FF2B0C0869B1530013E961 /* webkit.mm */; };
+		40FF2B0E0869B1530013E961 /* webkit.mm in Sources */ = {isa = PBXBuildFile; fileRef = 40FF2B0C0869B1530013E961 /* webkit.mm */; };
+		43DFF59D09926B080033000B /* helpdlg.h in Headers */ = {isa = PBXBuildFile; fileRef = 43DFF59B09926B080033000B /* helpdlg.h */; };
+		43DFF59E09926B080033000B /* helpwnd.h in Headers */ = {isa = PBXBuildFile; fileRef = 43DFF59C09926B080033000B /* helpwnd.h */; };
+		43DFF59F09926B080033000B /* helpdlg.h in Headers */ = {isa = PBXBuildFile; fileRef = 43DFF59B09926B080033000B /* helpdlg.h */; };
+		43DFF5A009926B080033000B /* helpwnd.h in Headers */ = {isa = PBXBuildFile; fileRef = 43DFF59C09926B080033000B /* helpwnd.h */; };
+		43DFF5BA09926F7B0033000B /* helpdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43DFF5B809926F7B0033000B /* helpdlg.cpp */; };
+		43DFF5BB09926F7B0033000B /* helpwnd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43DFF5B909926F7B0033000B /* helpwnd.cpp */; };
+		43DFF5BC09926F7B0033000B /* helpdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43DFF5B809926F7B0033000B /* helpdlg.cpp */; };
+		43DFF5BD09926F7B0033000B /* helpwnd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43DFF5B909926F7B0033000B /* helpwnd.cpp */; };
+		DDFE85360B60CF2F009B43D9 /* utilscmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A8605E01FA022C0175ACA7 /* utilscmn.cpp */; };
+		DDFE85370B60CF41009B43D9 /* fontdlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5A861BC01FA022C0175ACA7 /* fontdlg.cpp */; };
+		DDFE85380B60CF41009B43D9 /* fontdlgosx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90E607C8B18C006A6D3C /* fontdlgosx.mm */; };
+		DDFE85390B60CF46009B43D9 /* colordlgosx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 40AF90E207C8B18C006A6D3C /* colordlgosx.mm */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXBuildRule section */
+		40EEBF1E08BE1E8B000BD0A5 /* PBXBuildRule */ = {
+			isa = PBXBuildRule;
+			compilerSpec = com.apple.compilers.gcc.4_0;
+			fileType = sourcecode.c;
+			isEditable = 1;
+			outputFiles = (
+			);
+		};
+/* End PBXBuildRule section */
+
+/* Begin PBXContainerItemProxy section */
+		4086D202063BC05E00D4CD53 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 4086C742063AB2FF00D4CD53;
+			remoteInfo = wxStaticDebug;
+		};
+		4086D206063BC05E00D4CD53 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 4086CA55063AB30000D4CD53;
+			remoteInfo = wxDynamicDebug;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		409E9DD5065140690091DE7E /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 7;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		08FB77AAFE841565C02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+		0A98CB6A07146A06007B4289 /* statbar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = statbar.cpp; sourceTree = "<group>"; };
+		0A98CC470715CFBC007B4289 /* gdiobj.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gdiobj.cpp; sourceTree = "<group>"; };
+		0A98CD2207172992007B4289 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
+		40011CBB0893D5B400E4DE95 /* utilsexc_base.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = utilsexc_base.cpp; path = mac/corefoundation/utilsexc_base.cpp; sourceTree = SOURCE_ROOT; };
+		40011F3B0897D8DF00E4DE95 /* setup0.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = setup0.h; path = wx/mac/setup0.h; sourceTree = "<group>"; };
+		400EDEB2089D4FFD00E848D9 /* propdlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = propdlg.cpp; sourceTree = "<group>"; };
+		401640E507F94B2800A8837A /* imaglist.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = imaglist.cpp; sourceTree = "<group>"; };
+		402AB2540AFF554A00C0D0C9 /* arcall.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = arcall.cpp; sourceTree = "<group>"; };
+		402AB2550AFF554A00C0D0C9 /* arcfind.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = arcfind.cpp; sourceTree = "<group>"; };
+		402AB2560AFF554A00C0D0C9 /* dcgraph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dcgraph.cpp; sourceTree = "<group>"; };
+		402AB2570AFF554A00C0D0C9 /* fileback.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fileback.cpp; sourceTree = "<group>"; };
+		402AB2580AFF554A00C0D0C9 /* filtall.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = filtall.cpp; sourceTree = "<group>"; };
+		402AB2590AFF554A00C0D0C9 /* filtfind.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = filtfind.cpp; sourceTree = "<group>"; };
+		402AB25A0AFF554A00C0D0C9 /* fs_arc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fs_arc.cpp; sourceTree = "<group>"; };
+		402AB25B0AFF554A00C0D0C9 /* fs_filter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fs_filter.cpp; sourceTree = "<group>"; };
+		402AB25C0AFF554A00C0D0C9 /* overlaycmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = overlaycmn.cpp; sourceTree = "<group>"; };
+		402AB25D0AFF554A00C0D0C9 /* tarstrm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tarstrm.cpp; sourceTree = "<group>"; };
+		402AB2720AFF55AF00C0D0C9 /* overlay.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = overlay.cpp; sourceTree = "<group>"; };
+		402AB2750AFF55E300C0D0C9 /* collpaneg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = collpaneg.cpp; sourceTree = "<group>"; };
+		402AB27A0AFF567500C0D0C9 /* xh_animatctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_animatctrl.cpp; path = xrc/xh_animatctrl.cpp; sourceTree = "<group>"; };
+		402AB27B0AFF567500C0D0C9 /* xh_collpane.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_collpane.cpp; path = xrc/xh_collpane.cpp; sourceTree = "<group>"; };
+		402AB27C0AFF567500C0D0C9 /* xh_htmllbox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_htmllbox.cpp; path = xrc/xh_htmllbox.cpp; sourceTree = "<group>"; };
+		402AB42A0AFF574600C0D0C9 /* imagtga.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = imagtga.cpp; sourceTree = "<group>"; };
+		403F73940AC9985500FF2BCB /* listctrl_mac.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = listctrl_mac.cpp; sourceTree = "<group>"; };
+		403F73970AC9986E00FF2BCB /* listctrlcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = listctrlcmn.cpp; sourceTree = "<group>"; };
+		404DAED30ADD137500687775 /* aboutdlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = aboutdlg.cpp; sourceTree = "<group>"; };
+		404DAED60ADD138E00687775 /* animateg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = animateg.cpp; sourceTree = "<group>"; };
+		404DAEDA0ADD13E600687775 /* anidecod.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = anidecod.cpp; sourceTree = "<group>"; };
+		404DAEDB0ADD13E600687775 /* animatecmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = animatecmn.cpp; sourceTree = "<group>"; };
+		404DAEEA0ADD143200687775 /* aboutdlgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = aboutdlgg.cpp; sourceTree = "<group>"; };
+		404DB0DE0ADD36E800687775 /* richtextformatdlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = richtextformatdlg.cpp; sourceTree = "<group>"; };
+		404DB2630ADD41B300687775 /* richtextsymboldlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = richtextsymboldlg.cpp; sourceTree = "<group>"; };
+		404DB2710ADD429D00687775 /* dcbufcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dcbufcmn.cpp; sourceTree = "<group>"; };
+		4054137C0AB69C9300450E09 /* datavgen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = datavgen.cpp; sourceTree = "<group>"; };
+		405415210AB6A0B000450E09 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
+		405415540AB6A0D900450E09 /* datavcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = datavcmn.cpp; sourceTree = "<group>"; };
+		405DD167063C2BFC00F579EE /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = /usr/lib/libiconv.dylib; sourceTree = "<absolute>"; };
+		40607C1407493C3F00DC0420 /* archive.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = archive.cpp; sourceTree = "<group>"; };
+		40607C740749432A00DC0420 /* gsockosx.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = gsockosx.cpp; path = mac/corefoundation/gsockosx.cpp; sourceTree = SOURCE_ROOT; };
+		40607C750749432A00DC0420 /* utilsexc_cf.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = utilsexc_cf.cpp; path = mac/corefoundation/utilsexc_cf.cpp; sourceTree = SOURCE_ROOT; };
+		40670A8207377A6300F7C08C /* cfstring.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = cfstring.cpp; path = mac/corefoundation/cfstring.cpp; sourceTree = SOURCE_ROOT; };
+		40670A8307377A6300F7C08C /* stdpaths_cf.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = stdpaths_cf.cpp; path = mac/corefoundation/stdpaths_cf.cpp; sourceTree = SOURCE_ROOT; };
+		40670A9307377B1000F7C08C /* gbsizer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gbsizer.cpp; sourceTree = "<group>"; };
+		40670A9407377B1000F7C08C /* sstream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = sstream.cpp; sourceTree = "<group>"; };
+		40670A9507377B1000F7C08C /* stdpbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = stdpbase.cpp; sourceTree = "<group>"; };
+		40670A9607377B1000F7C08C /* uri.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = uri.cpp; sourceTree = "<group>"; };
+		4067EF240ACD43BC004A2D14 /* graphcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = graphcmn.cpp; sourceTree = "<group>"; };
+		4067EFC00ACD5306004A2D14 /* xh_bmpcbox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_bmpcbox.cpp; path = xrc/xh_bmpcbox.cpp; sourceTree = "<group>"; };
+		4067EFC40ACD53B1004A2D14 /* bmpcboxg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = bmpcboxg.cpp; sourceTree = "<group>"; };
+		4067EFC80ACD53ED004A2D14 /* graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = graphics.cpp; sourceTree = "<group>"; };
+		407A90F6065742ED00F01665 /* spinctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = spinctrl.cpp; sourceTree = "<group>"; };
+		407C6AD70A899E260056252A /* auibook.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = auibook.cpp; sourceTree = "<group>"; };
+		407C6AD90A899E260056252A /* dockart.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dockart.cpp; sourceTree = "<group>"; };
+		407C6ADA0A899E260056252A /* floatpane.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = floatpane.cpp; sourceTree = "<group>"; };
+		407C6ADB0A899E260056252A /* framemanager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = framemanager.cpp; sourceTree = "<group>"; };
+		407C6ADC0A899E260056252A /* tabmdi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tabmdi.cpp; sourceTree = "<group>"; };
+		4086C3A2063A454900D4CD53 /* sound.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = sound.cpp; sourceTree = "<group>"; };
+		4086C59F063AA5C700D4CD53 /* glcanvas.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = glcanvas.cpp; sourceTree = "<group>"; };
+		4086C638063AAD4A00D4CD53 /* regcomp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = regcomp.c; sourceTree = "<group>"; };
+		4086C63B063AAD4A00D4CD53 /* regerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = regerror.c; sourceTree = "<group>"; };
+		4086C641063AAD4A00D4CD53 /* regexec.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = regexec.c; sourceTree = "<group>"; };
+		4086C643063AAD4A00D4CD53 /* regfree.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = regfree.c; sourceTree = "<group>"; };
+		4086C8CB063AB30000D4CD53 /* libwx_mac_static.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libwx_mac_static.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		4086CBE1063AB30000D4CD53 /* libwx_mac.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwx_mac.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		408A595D0A8998750014D20E /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
+		408A595E0A8998750014D20E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
+		408A59820A8998A40014D20E /* buttonbar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = buttonbar.cpp; sourceTree = "<group>"; };
+		408A59830A8998A40014D20E /* toolbkg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = toolbkg.cpp; sourceTree = "<group>"; };
+		408A59840A8998A40014D20E /* treebkg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = treebkg.cpp; sourceTree = "<group>"; };
+		408A598C0A8998DA0014D20E /* clrpickerg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = clrpickerg.cpp; sourceTree = "<group>"; };
+		408A598D0A8998DA0014D20E /* filepickerg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = filepickerg.cpp; sourceTree = "<group>"; };
+		408A598E0A8998DA0014D20E /* fontpickerg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fontpickerg.cpp; sourceTree = "<group>"; };
+		408A598F0A8998DA0014D20E /* hyperlink.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = hyperlink.cpp; sourceTree = "<group>"; };
+		408A59900A8998DA0014D20E /* odcombo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = odcombo.cpp; sourceTree = "<group>"; };
+		408A599F0A89992F0014D20E /* clrpickercmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = clrpickercmn.cpp; sourceTree = "<group>"; };
+		408A59A00A89992F0014D20E /* combocmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = combocmn.cpp; sourceTree = "<group>"; };
+		408A59A10A89992F0014D20E /* filepickercmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = filepickercmn.cpp; sourceTree = "<group>"; };
+		408A59A20A89992F0014D20E /* fontpickercmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fontpickercmn.cpp; sourceTree = "<group>"; };
+		408A59A30A89992F0014D20E /* pickerbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = pickerbase.cpp; sourceTree = "<group>"; };
+		408A59A40A89992F0014D20E /* powercmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = powercmn.cpp; sourceTree = "<group>"; };
+		408A59B20A8999500014D20E /* combog.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = combog.cpp; sourceTree = "<group>"; };
+		408A59B60A8999800014D20E /* xh_clrpicker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_clrpicker.cpp; path = xrc/xh_clrpicker.cpp; sourceTree = "<group>"; };
+		408A59B70A8999800014D20E /* xh_dirpicker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_dirpicker.cpp; path = xrc/xh_dirpicker.cpp; sourceTree = "<group>"; };
+		408A59B80A8999800014D20E /* xh_filepicker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_filepicker.cpp; path = xrc/xh_filepicker.cpp; sourceTree = "<group>"; };
+		408A59B90A8999800014D20E /* xh_fontpicker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_fontpicker.cpp; path = xrc/xh_fontpicker.cpp; sourceTree = "<group>"; };
+		408A59BA0A8999800014D20E /* xh_hyperlink.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_hyperlink.cpp; path = xrc/xh_hyperlink.cpp; sourceTree = "<group>"; };
+		408A59BB0A8999800014D20E /* xh_odcombo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_odcombo.cpp; path = xrc/xh_odcombo.cpp; sourceTree = "<group>"; };
+		408A59BC0A8999800014D20E /* xh_treebk.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_treebk.cpp; path = xrc/xh_treebk.cpp; sourceTree = "<group>"; };
+		408A59CC0A8999A00014D20E /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+		409F026F0976CA5600D1030F /* xh_grid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_grid.cpp; path = xrc/xh_grid.cpp; sourceTree = "<group>"; };
+		40ADC34908156AE40009DA36 /* debugrpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = debugrpt.cpp; sourceTree = "<group>"; };
+		40ADC35F08156DC10009DA36 /* xml.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xml.cpp; path = xml/xml.cpp; sourceTree = "<group>"; };
+		40ADC36508156DEB0009DA36 /* xh_bmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_bmp.cpp; path = xrc/xh_bmp.cpp; sourceTree = "<group>"; };
+		40ADC36608156DEB0009DA36 /* xh_bmpbt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_bmpbt.cpp; path = xrc/xh_bmpbt.cpp; sourceTree = "<group>"; };
+		40ADC36708156DEB0009DA36 /* xh_bttn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_bttn.cpp; path = xrc/xh_bttn.cpp; sourceTree = "<group>"; };
+		40ADC36808156DEB0009DA36 /* xh_cald.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_cald.cpp; path = xrc/xh_cald.cpp; sourceTree = "<group>"; };
+		40ADC36908156DEB0009DA36 /* xh_chckb.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_chckb.cpp; path = xrc/xh_chckb.cpp; sourceTree = "<group>"; };
+		40ADC36A08156DEB0009DA36 /* xh_chckl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_chckl.cpp; path = xrc/xh_chckl.cpp; sourceTree = "<group>"; };
+		40ADC36B08156DEB0009DA36 /* xh_choic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_choic.cpp; path = xrc/xh_choic.cpp; sourceTree = "<group>"; };
+		40ADC36C08156DEB0009DA36 /* xh_choicbk.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_choicbk.cpp; path = xrc/xh_choicbk.cpp; sourceTree = "<group>"; };
+		40ADC36D08156DEB0009DA36 /* xh_combo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_combo.cpp; path = xrc/xh_combo.cpp; sourceTree = "<group>"; };
+		40ADC36E08156DEB0009DA36 /* xh_datectrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_datectrl.cpp; path = xrc/xh_datectrl.cpp; sourceTree = "<group>"; };
+		40ADC36F08156DEB0009DA36 /* xh_dlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_dlg.cpp; path = xrc/xh_dlg.cpp; sourceTree = "<group>"; };
+		40ADC37008156DEB0009DA36 /* xh_frame.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_frame.cpp; path = xrc/xh_frame.cpp; sourceTree = "<group>"; };
+		40ADC37108156DEB0009DA36 /* xh_gauge.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_gauge.cpp; path = xrc/xh_gauge.cpp; sourceTree = "<group>"; };
+		40ADC37208156DEB0009DA36 /* xh_gdctl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_gdctl.cpp; path = xrc/xh_gdctl.cpp; sourceTree = "<group>"; };
+		40ADC37308156DEB0009DA36 /* xh_html.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_html.cpp; path = xrc/xh_html.cpp; sourceTree = "<group>"; };
+		40ADC37408156DEB0009DA36 /* xh_listb.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_listb.cpp; path = xrc/xh_listb.cpp; sourceTree = "<group>"; };
+		40ADC37508156DEB0009DA36 /* xh_listbk.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_listbk.cpp; path = xrc/xh_listbk.cpp; sourceTree = "<group>"; };
+		40ADC37608156DEB0009DA36 /* xh_listc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_listc.cpp; path = xrc/xh_listc.cpp; sourceTree = "<group>"; };
+		40ADC37708156DEB0009DA36 /* xh_mdi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_mdi.cpp; path = xrc/xh_mdi.cpp; sourceTree = "<group>"; };
+		40ADC37808156DEB0009DA36 /* xh_menu.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_menu.cpp; path = xrc/xh_menu.cpp; sourceTree = "<group>"; };
+		40ADC37908156DEB0009DA36 /* xh_notbk.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_notbk.cpp; path = xrc/xh_notbk.cpp; sourceTree = "<group>"; };
+		40ADC37A08156DEB0009DA36 /* xh_panel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_panel.cpp; path = xrc/xh_panel.cpp; sourceTree = "<group>"; };
+		40ADC37B08156DEB0009DA36 /* xh_radbt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_radbt.cpp; path = xrc/xh_radbt.cpp; sourceTree = "<group>"; };
+		40ADC37C08156DEB0009DA36 /* xh_radbx.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_radbx.cpp; path = xrc/xh_radbx.cpp; sourceTree = "<group>"; };
+		40ADC37D08156DEB0009DA36 /* xh_scrol.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_scrol.cpp; path = xrc/xh_scrol.cpp; sourceTree = "<group>"; };
+		40ADC37E08156DEB0009DA36 /* xh_scwin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_scwin.cpp; path = xrc/xh_scwin.cpp; sourceTree = "<group>"; };
+		40ADC37F08156DEB0009DA36 /* xh_sizer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_sizer.cpp; path = xrc/xh_sizer.cpp; sourceTree = "<group>"; };
+		40ADC38008156DEB0009DA36 /* xh_slidr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_slidr.cpp; path = xrc/xh_slidr.cpp; sourceTree = "<group>"; };
+		40ADC38108156DEB0009DA36 /* xh_spin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_spin.cpp; path = xrc/xh_spin.cpp; sourceTree = "<group>"; };
+		40ADC38208156DEB0009DA36 /* xh_split.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_split.cpp; path = xrc/xh_split.cpp; sourceTree = "<group>"; };
+		40ADC38308156DEB0009DA36 /* xh_statbar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_statbar.cpp; path = xrc/xh_statbar.cpp; sourceTree = "<group>"; };
+		40ADC38408156DEB0009DA36 /* xh_stbmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_stbmp.cpp; path = xrc/xh_stbmp.cpp; sourceTree = "<group>"; };
+		40ADC38508156DEB0009DA36 /* xh_stbox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_stbox.cpp; path = xrc/xh_stbox.cpp; sourceTree = "<group>"; };
+		40ADC38608156DEB0009DA36 /* xh_stlin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_stlin.cpp; path = xrc/xh_stlin.cpp; sourceTree = "<group>"; };
+		40ADC38708156DEB0009DA36 /* xh_sttxt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_sttxt.cpp; path = xrc/xh_sttxt.cpp; sourceTree = "<group>"; };
+		40ADC38808156DEB0009DA36 /* xh_text.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_text.cpp; path = xrc/xh_text.cpp; sourceTree = "<group>"; };
+		40ADC38908156DEB0009DA36 /* xh_tglbtn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_tglbtn.cpp; path = xrc/xh_tglbtn.cpp; sourceTree = "<group>"; };
+		40ADC38A08156DEB0009DA36 /* xh_toolb.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_toolb.cpp; path = xrc/xh_toolb.cpp; sourceTree = "<group>"; };
+		40ADC38B08156DEB0009DA36 /* xh_tree.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_tree.cpp; path = xrc/xh_tree.cpp; sourceTree = "<group>"; };
+		40ADC38C08156DEB0009DA36 /* xh_unkwn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_unkwn.cpp; path = xrc/xh_unkwn.cpp; sourceTree = "<group>"; };
+		40ADC38D08156DEB0009DA36 /* xh_wizrd.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xh_wizrd.cpp; path = xrc/xh_wizrd.cpp; sourceTree = "<group>"; };
+		40ADC38E08156DEB0009DA36 /* xmlres.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xmlres.cpp; path = xrc/xmlres.cpp; sourceTree = "<group>"; };
+		40ADC38F08156DEB0009DA36 /* xmlrsall.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = xmlrsall.cpp; path = xrc/xmlrsall.cpp; sourceTree = "<group>"; };
+		40ADC44208156EDC0009DA36 /* xmlparse.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = xmlparse.c; path = expat/lib/xmlparse.c; sourceTree = "<group>"; };
+		40ADC44308156EDC0009DA36 /* xmlrole.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = xmlrole.c; path = expat/lib/xmlrole.c; sourceTree = "<group>"; };
+		40ADC44408156EDC0009DA36 /* xmltok.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = xmltok.c; path = expat/lib/xmltok.c; sourceTree = "<group>"; };
+		40ADC47208160C200009DA36 /* choicbkg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = choicbkg.cpp; sourceTree = "<group>"; };
+		40ADC47308160C200009DA36 /* listbkg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = listbkg.cpp; sourceTree = "<group>"; };
+		40ADC48608160CAD0009DA36 /* dbgrptg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dbgrptg.cpp; sourceTree = "<group>"; };
+		40AEF28B0AB5EC0800B2C19A /* platinfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = platinfo.cpp; sourceTree = "<group>"; };
+		40AF909007C8A926006A6D3C /* mediactrlcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = mediactrlcmn.cpp; sourceTree = "<group>"; };
+		40AF909507C8A976006A6D3C /* datectlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = datectlg.cpp; sourceTree = "<group>"; };
+		40AF909607C8A976006A6D3C /* filedlgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = filedlgg.cpp; sourceTree = "<group>"; };
+		40AF909707C8A976006A6D3C /* htmllbox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = htmllbox.cpp; sourceTree = "<group>"; };
+		40AF909907C8A976006A6D3C /* vlbox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = vlbox.cpp; sourceTree = "<group>"; };
+		40AF909A07C8A976006A6D3C /* vscroll.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = vscroll.cpp; sourceTree = "<group>"; };
+		40AF90B307C8A9CF006A6D3C /* hid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = hid.cpp; path = mac/corefoundation/hid.cpp; sourceTree = SOURCE_ROOT; };
+		40AF90B407C8A9CF006A6D3C /* hidjoystick.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = hidjoystick.cpp; path = mac/corefoundation/hidjoystick.cpp; sourceTree = SOURCE_ROOT; };
+		40AF90BD07C8AA08006A6D3C /* dlunix.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dlunix.cpp; sourceTree = "<group>"; };
+		40AF90C207C8AA17006A6D3C /* chm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = chm.cpp; sourceTree = "<group>"; };
+		40AF90E207C8B18C006A6D3C /* colordlgosx.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = colordlgosx.mm; sourceTree = "<group>"; };
+		40AF90E407C8B18C006A6D3C /* dccg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dccg.cpp; sourceTree = "<group>"; };
+		40AF90E507C8B18C006A6D3C /* drawer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = drawer.cpp; sourceTree = "<group>"; };
+		40AF90E607C8B18C006A6D3C /* fontdlgosx.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = fontdlgosx.mm; sourceTree = "<group>"; };
+		40AF90E807C8B18C006A6D3C /* mediactrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = mediactrl.cpp; sourceTree = "<group>"; };
+		40AF913507C8BD1F006A6D3C /* combobox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = combobox.cpp; sourceTree = "<group>"; };
+		40AF915007C8C912006A6D3C /* tif_color.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_color.c; sourceTree = "<group>"; };
+		40AF915107C8C912006A6D3C /* tif_extension.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_extension.c; sourceTree = "<group>"; };
+		40CDE8D00982505E00E8156D /* evtloopcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = evtloopcmn.cpp; sourceTree = "<group>"; };
+		40CDE8D9098250AB00E8156D /* evtloop.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = evtloop.cpp; sourceTree = "<group>"; };
+		40DCE34F06C744C90000D83E /* gsocket.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gsocket.cpp; sourceTree = "<group>"; };
+		40ECB139074BD1D0005AAC48 /* stdpaths.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = stdpaths.cpp; sourceTree = "<group>"; };
+		40F017380A30683F00AC9076 /* colourcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = colourcmn.cpp; sourceTree = "<group>"; };
+		40F017390A30683F00AC9076 /* convauto.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = convauto.cpp; sourceTree = "<group>"; };
+		40F017410A306C7600AC9076 /* fontenumcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fontenumcmn.cpp; sourceTree = "<group>"; };
+		40F10E5606AD0230003C7AC3 /* tglbtn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tglbtn.cpp; sourceTree = "<group>"; };
+		40F10E5706AD0230003C7AC3 /* thread.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = thread.cpp; sourceTree = "<group>"; };
+		40F185B90AB722BC00E3BEF9 /* richtextbuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = richtextbuffer.cpp; sourceTree = "<group>"; };
+		40F185BA0AB722BC00E3BEF9 /* richtextctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = richtextctrl.cpp; sourceTree = "<group>"; };
+		40F185BB0AB722BC00E3BEF9 /* richtexthtml.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = richtexthtml.cpp; sourceTree = "<group>"; };
+		40F185BC0AB722BC00E3BEF9 /* richtextstyles.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = richtextstyles.cpp; sourceTree = "<group>"; };
+		40F185BD0AB722BC00E3BEF9 /* richtextxml.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = richtextxml.cpp; sourceTree = "<group>"; };
+		40FF2B0C0869B1530013E961 /* webkit.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = webkit.mm; path = htmlctrl/webkit/webkit.mm; sourceTree = "<group>"; };
+		43DFF59B09926B080033000B /* helpdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = helpdlg.h; sourceTree = "<group>"; };
+		43DFF59C09926B080033000B /* helpwnd.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = helpwnd.h; sourceTree = "<group>"; };
+		43DFF5B809926F7B0033000B /* helpdlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = helpdlg.cpp; sourceTree = "<group>"; };
+		43DFF5B909926F7B0033000B /* helpwnd.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = helpwnd.cpp; sourceTree = "<group>"; };
+		CA0CB57B0450773900000102 /* accesscmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = accesscmn.cpp; sourceTree = "<group>"; };
+		CA0CB57C0450773900000102 /* datacmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = datacmn.cpp; sourceTree = "<group>"; };
+		CA0CB57D0450773900000102 /* dpycmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dpycmn.cpp; sourceTree = "<group>"; };
+		CA0CB57E0450773900000102 /* rgncmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = rgncmn.cpp; sourceTree = "<group>"; };
+		CA0CB57F0450773900000102 /* taskbarcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = taskbarcmn.cpp; sourceTree = "<group>"; };
+		CA60175604D43A2700000080 /* appbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = appbase.cpp; sourceTree = "<group>"; };
+		CA60175904D43A5400000080 /* dbgrid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dbgrid.cpp; sourceTree = "<group>"; };
+		CA60175C04D43A8100000080 /* fldlgcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fldlgcmn.cpp; sourceTree = "<group>"; };
+		CA60175D04D43A8100000080 /* fmapbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fmapbase.cpp; sourceTree = "<group>"; };
+		CA60175E04D43A8100000080 /* stopwatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = stopwatch.cpp; sourceTree = "<group>"; };
+		CA60176504D43AE200000080 /* renderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = renderer.cpp; sourceTree = "<group>"; };
+		CA60176904D43BF100000080 /* init.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = init.cpp; sourceTree = "<group>"; };
+		CA60176C04D43CAA00000080 /* renderg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = renderg.cpp; sourceTree = "<group>"; };
+		CA60176D04D43CAA00000080 /* selstore.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = selstore.cpp; sourceTree = "<group>"; };
+		CA60177204D43D2300000080 /* baseunix.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = baseunix.cpp; sourceTree = "<group>"; };
+		CA89578504D7052700000080 /* rendcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = rendcmn.cpp; sourceTree = "<group>"; };
+		CA89578904D705D700000080 /* m_style.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = m_style.cpp; sourceTree = "<group>"; };
+		CA8CC823050E6CD800000080 /* xti.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = xti.cpp; sourceTree = "<group>"; };
+		CA8CC824050E6CD800000080 /* xtistrm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = xtistrm.cpp; sourceTree = "<group>"; };
+		CA8CC825050E6CD800000080 /* xtixml.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = xtixml.cpp; sourceTree = "<group>"; };
+		CA8CC832050EE2BD00000080 /* bookctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = bookctrl.cpp; sourceTree = "<group>"; };
+		CADEF54103C8C0A800000133 /* display.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = display.cpp; sourceTree = "<group>"; };
+		CADEF54303C8C0A800000133 /* MoreFilesX.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = MoreFilesX.c; sourceTree = "<group>"; };
+		CADEF54C03C8C11300000133 /* display.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = display.h; sourceTree = "<group>"; };
+		F55E08F801FDF9CC01000133 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; };
+		F58E04FD02F11FA701A8020C /* msgout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = msgout.cpp; sourceTree = "<group>"; };
+		F5A85C1E01FA022A0175ACA7 /* accel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = accel.h; sourceTree = "<group>"; };
+		F5A85C1F01FA022A0175ACA7 /* app.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = app.h; sourceTree = "<group>"; };
+		F5A85C2001FA022A0175ACA7 /* arrimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = arrimpl.cpp; sourceTree = "<group>"; };
+		F5A85C2101FA022A0175ACA7 /* bitmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = bitmap.h; sourceTree = "<group>"; };
+		F5A85C2201FA022A0175ACA7 /* bmpbuttn.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = bmpbuttn.h; sourceTree = "<group>"; };
+		F5A85C2301FA022A0175ACA7 /* brush.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = brush.h; sourceTree = "<group>"; };
+		F5A85C2401FA022A0175ACA7 /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = "<group>"; };
+		F5A85C2501FA022A0175ACA7 /* busyinfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = busyinfo.h; sourceTree = "<group>"; };
+		F5A85C2601FA022A0175ACA7 /* button.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = button.h; sourceTree = "<group>"; };
+		F5A85C2701FA022A0175ACA7 /* calctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = calctrl.h; sourceTree = "<group>"; };
+		F5A85C2801FA022A0175ACA7 /* caret.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = caret.h; sourceTree = "<group>"; };
+		F5A85C2901FA022A0175ACA7 /* checkbox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = checkbox.h; sourceTree = "<group>"; };
+		F5A85C2A01FA022A0175ACA7 /* checklst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = checklst.h; sourceTree = "<group>"; };
+		F5A85C2B01FA022A0175ACA7 /* chkconf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = chkconf.h; sourceTree = "<group>"; };
+		F5A85C2C01FA022A0175ACA7 /* choicdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = choicdlg.h; sourceTree = "<group>"; };
+		F5A85C2D01FA022A0175ACA7 /* choice.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = choice.h; sourceTree = "<group>"; };
+		F5A85C2E01FA022A0175ACA7 /* clipbrd.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = clipbrd.h; sourceTree = "<group>"; };
+		F5A85C2F01FA022A0175ACA7 /* clntdata.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = clntdata.h; sourceTree = "<group>"; };
+		F5A85C3001FA022A0175ACA7 /* cmdline.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cmdline.h; sourceTree = "<group>"; };
+		F5A85C3101FA022A0175ACA7 /* cmdproc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cmdproc.h; sourceTree = "<group>"; };
+		F5A85C3201FA022A0175ACA7 /* cmndata.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cmndata.h; sourceTree = "<group>"; };
+		F5A85C3301FA022A0175ACA7 /* colordlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = colordlg.h; sourceTree = "<group>"; };
+		F5A85C3401FA022A0175ACA7 /* colour.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = colour.h; sourceTree = "<group>"; };
+		F5A85C3501FA022A0175ACA7 /* combobox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = combobox.h; sourceTree = "<group>"; };
+		F5A85C3601FA022A0175ACA7 /* confbase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = confbase.h; sourceTree = "<group>"; };
+		F5A85C3701FA022A0175ACA7 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
+		F5A85C3801FA022A0175ACA7 /* containr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = containr.h; sourceTree = "<group>"; };
+		F5A85C3901FA022A0175ACA7 /* control.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = control.h; sourceTree = "<group>"; };
+		F5A85C3A01FA022A0175ACA7 /* cshelp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cshelp.h; sourceTree = "<group>"; };
+		F5A85C3B01FA022A0175ACA7 /* ctrlsub.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ctrlsub.h; sourceTree = "<group>"; };
+		F5A85C3C01FA022A0175ACA7 /* cursor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cursor.h; sourceTree = "<group>"; };
+		F5A85C3D01FA022A0175ACA7 /* dataobj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dataobj.h; sourceTree = "<group>"; };
+		F5A85C3F01FA022A0175ACA7 /* datetime.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = datetime.h; sourceTree = "<group>"; };
+		F5A85C4101FA022A0175ACA7 /* datstrm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = datstrm.h; sourceTree = "<group>"; };
+		F5A85C4201FA022A0175ACA7 /* db.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = db.h; sourceTree = "<group>"; };
+		F5A85C4301FA022A0175ACA7 /* dbgrid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dbgrid.h; sourceTree = "<group>"; };
+		F5A85C4401FA022A0175ACA7 /* dbkeyg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dbkeyg.h; sourceTree = "<group>"; };
+		F5A85C4501FA022A0175ACA7 /* dbtable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dbtable.h; sourceTree = "<group>"; };
+		F5A85C4601FA022A0175ACA7 /* dc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dc.h; sourceTree = "<group>"; };
+		F5A85C4701FA022A0175ACA7 /* dcclient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dcclient.h; sourceTree = "<group>"; };
+		F5A85C4801FA022A0175ACA7 /* dcmemory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dcmemory.h; sourceTree = "<group>"; };
+		F5A85C4901FA022A0175ACA7 /* dcprint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dcprint.h; sourceTree = "<group>"; };
+		F5A85C4A01FA022A0175ACA7 /* dcps.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dcps.h; sourceTree = "<group>"; };
+		F5A85C4B01FA022A0175ACA7 /* dcscreen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dcscreen.h; sourceTree = "<group>"; };
+		F5A85C4C01FA022A0175ACA7 /* dde.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dde.h; sourceTree = "<group>"; };
+		F5A85C4D01FA022A0175ACA7 /* debug.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = debug.h; sourceTree = "<group>"; };
+		F5A85C4E01FA022A0175ACA7 /* defs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = defs.h; sourceTree = "<group>"; };
+		F5A85C4F01FA022A0175ACA7 /* dialog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dialog.h; sourceTree = "<group>"; };
+		F5A85C5001FA022A0175ACA7 /* dialup.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dialup.h; sourceTree = "<group>"; };
+		F5A85C5101FA022A0175ACA7 /* dir.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dir.h; sourceTree = "<group>"; };
+		F5A85C5201FA022A0175ACA7 /* dirctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dirctrl.h; sourceTree = "<group>"; };
+		F5A85C5301FA022A0175ACA7 /* dirdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dirdlg.h; sourceTree = "<group>"; };
+		F5A85C5401FA022A0175ACA7 /* dnd.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dnd.h; sourceTree = "<group>"; };
+		F5A85C5501FA022A0175ACA7 /* docmdi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = docmdi.h; sourceTree = "<group>"; };
+		F5A85C5601FA022A0175ACA7 /* docview.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = docview.h; sourceTree = "<group>"; };
+		F5A85C5701FA022A0175ACA7 /* dragimag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dragimag.h; sourceTree = "<group>"; };
+		F5A85C5801FA022A0175ACA7 /* dynarray.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dynarray.h; sourceTree = "<group>"; };
+		F5A85C5901FA022A0175ACA7 /* dynlib.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dynlib.h; sourceTree = "<group>"; };
+		F5A85C5A01FA022A0175ACA7 /* dynload.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dynload.h; sourceTree = "<group>"; };
+		F5A85C5B01FA022A0175ACA7 /* effects.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = effects.h; sourceTree = "<group>"; };
+		F5A85C5C01FA022A0175ACA7 /* encconv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = encconv.h; sourceTree = "<group>"; };
+		F5A85C5D01FA022A0175ACA7 /* event.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = event.h; sourceTree = "<group>"; };
+		F5A85C5E01FA022A0175ACA7 /* evtloop.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = evtloop.h; sourceTree = "<group>"; };
+		F5A85C6001FA022A0175ACA7 /* fdrepdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fdrepdlg.h; sourceTree = "<group>"; };
+		F5A85C6101FA022A0175ACA7 /* ffile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ffile.h; sourceTree = "<group>"; };
+		F5A85C6201FA022A0175ACA7 /* file.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = file.h; sourceTree = "<group>"; };
+		F5A85C6301FA022A0175ACA7 /* fileconf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fileconf.h; sourceTree = "<group>"; };
+		F5A85C6401FA022A0175ACA7 /* filedlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = filedlg.h; sourceTree = "<group>"; };
+		F5A85C6501FA022A0175ACA7 /* filefn.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = filefn.h; sourceTree = "<group>"; };
+		F5A85C6601FA022A0175ACA7 /* filename.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = filename.h; sourceTree = "<group>"; };
+		F5A85C6701FA022A0175ACA7 /* filesys.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = filesys.h; sourceTree = "<group>"; };
+		F5A85C6801FA022A0175ACA7 /* font.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = font.h; sourceTree = "<group>"; };
+		F5A85C6901FA022A0175ACA7 /* fontdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fontdlg.h; sourceTree = "<group>"; };
+		F5A85C6A01FA022A0175ACA7 /* fontenc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fontenc.h; sourceTree = "<group>"; };
+		F5A85C6B01FA022A0175ACA7 /* fontenum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fontenum.h; sourceTree = "<group>"; };
+		F5A85C6C01FA022A0175ACA7 /* fontmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fontmap.h; sourceTree = "<group>"; };
+		F5A85C6D01FA022A0175ACA7 /* fontutil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fontutil.h; sourceTree = "<group>"; };
+		F5A85C6E01FA022A0175ACA7 /* frame.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = frame.h; sourceTree = "<group>"; };
+		F5A85C6F01FA022A0175ACA7 /* fs_inet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fs_inet.h; sourceTree = "<group>"; };
+		F5A85C7001FA022A0175ACA7 /* fs_mem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fs_mem.h; sourceTree = "<group>"; };
+		F5A85C7101FA022A0175ACA7 /* fs_zip.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fs_zip.h; sourceTree = "<group>"; };
+		F5A85C7201FA022A0175ACA7 /* gauge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gauge.h; sourceTree = "<group>"; };
+		F5A85C7301FA022A0175ACA7 /* gdicmn.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gdicmn.h; sourceTree = "<group>"; };
+		F5A85C7401FA022A0175ACA7 /* gdiobj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gdiobj.h; sourceTree = "<group>"; };
+		F5A85C7701FA022A0175ACA7 /* accel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = accel.h; sourceTree = "<group>"; };
+		F5A85C7801FA022A0175ACA7 /* calctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = calctrl.h; sourceTree = "<group>"; };
+		F5A85C7901FA022A0175ACA7 /* caret.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = caret.h; sourceTree = "<group>"; };
+		F5A85C7A01FA022A0175ACA7 /* choicdgg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = choicdgg.h; sourceTree = "<group>"; };
+		F5A85C7B01FA022A0175ACA7 /* colrdlgg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = colrdlgg.h; sourceTree = "<group>"; };
+		F5A85C7D01FA022A0175ACA7 /* dcpsg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dcpsg.h; sourceTree = "<group>"; };
+		F5A85C8001FA022A0175ACA7 /* dirctrlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dirctrlg.h; sourceTree = "<group>"; };
+		F5A85C8101FA022A0175ACA7 /* dirdlgg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dirdlgg.h; sourceTree = "<group>"; };
+		F5A85C8201FA022A0175ACA7 /* dragimgg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dragimgg.h; sourceTree = "<group>"; };
+		F5A85C8501FA022A0175ACA7 /* fdrepdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fdrepdlg.h; sourceTree = "<group>"; };
+		F5A85C8601FA022A0175ACA7 /* filedlgg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = filedlgg.h; sourceTree = "<group>"; };
+		F5A85C8801FA022A0175ACA7 /* fontdlgg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fontdlgg.h; sourceTree = "<group>"; };
+		F5A85C8901FA022A0175ACA7 /* grid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = grid.h; sourceTree = "<group>"; };
+		F5A85C8A01FA022A0175ACA7 /* gridctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gridctrl.h; sourceTree = "<group>"; };
+		F5A85C8C01FA022A0175ACA7 /* gridsel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gridsel.h; sourceTree = "<group>"; };
+		F5A85C8D01FA022A0175ACA7 /* helpext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = helpext.h; sourceTree = "<group>"; };
+		F5A85C9201FA022A0175ACA7 /* imaglist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imaglist.h; sourceTree = "<group>"; };
+		F5A85C9401FA022A0175ACA7 /* laywin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = laywin.h; sourceTree = "<group>"; };
+		F5A85C9501FA022A0175ACA7 /* listctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = listctrl.h; sourceTree = "<group>"; };
+		F5A85C9701FA022A0175ACA7 /* msgdlgg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = msgdlgg.h; sourceTree = "<group>"; };
+		F5A85C9901FA022A0175ACA7 /* notebook.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = notebook.h; sourceTree = "<group>"; };
+		F5A85C9A01FA022A0175ACA7 /* paletteg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = paletteg.h; sourceTree = "<group>"; };
+		F5A85C9B01FA022A0175ACA7 /* panelg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = panelg.h; sourceTree = "<group>"; };
+		F5A85C9C01FA022A0175ACA7 /* printps.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = printps.h; sourceTree = "<group>"; };
+		F5A85C9D01FA022A0175ACA7 /* prntdlgg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = prntdlgg.h; sourceTree = "<group>"; };
+		F5A85C9E01FA022A0175ACA7 /* progdlgg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = progdlgg.h; sourceTree = "<group>"; };
+		F5A85CA101FA022A0175ACA7 /* sashwin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sashwin.h; sourceTree = "<group>"; };
+		F5A85CA201FA022A0175ACA7 /* scrolwin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = scrolwin.h; sourceTree = "<group>"; };
+		F5A85CA301FA022A0175ACA7 /* spinctlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = spinctlg.h; sourceTree = "<group>"; };
+		F5A85CA401FA022A0175ACA7 /* splash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = splash.h; sourceTree = "<group>"; };
+		F5A85CA501FA022A0175ACA7 /* splitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = splitter.h; sourceTree = "<group>"; };
+		F5A85CA601FA022A0175ACA7 /* statline.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = statline.h; sourceTree = "<group>"; };
+		F5A85CA701FA022A0175ACA7 /* statusbr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = statusbr.h; sourceTree = "<group>"; };
+		F5A85CA801FA022A0175ACA7 /* tabg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tabg.h; sourceTree = "<group>"; };
+		F5A85CA901FA022A0175ACA7 /* textdlgg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = textdlgg.h; sourceTree = "<group>"; };
+		F5A85CAC01FA022A0175ACA7 /* treectlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = treectlg.h; sourceTree = "<group>"; };
+		F5A85CAF01FA022A0175ACA7 /* wizard.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wizard.h; sourceTree = "<group>"; };
+		F5A85CB001FA022A0175ACA7 /* geometry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = geometry.h; sourceTree = "<group>"; };
+		F5A85CB101FA022A0175ACA7 /* gifdecod.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gifdecod.h; sourceTree = "<group>"; };
+		F5A85CB201FA022A0175ACA7 /* glcanvas.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = glcanvas.h; sourceTree = "<group>"; };
+		F5A85CB301FA022A0175ACA7 /* grid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = grid.h; sourceTree = "<group>"; };
+		F5A85CB401FA022A0175ACA7 /* gsocket.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gsocket.h; sourceTree = "<group>"; };
+		F5A85CF901FA022B0175ACA7 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = hash.h; sourceTree = "<group>"; };
+		F5A85CFA01FA022B0175ACA7 /* help.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = help.h; sourceTree = "<group>"; };
+		F5A85CFB01FA022B0175ACA7 /* helpbase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = helpbase.h; sourceTree = "<group>"; };
+		F5A85CFC01FA022B0175ACA7 /* helphtml.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = helphtml.h; sourceTree = "<group>"; };
+		F5A85CFD01FA022B0175ACA7 /* helpwin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = helpwin.h; sourceTree = "<group>"; };
+		F5A85D0101FA022B0175ACA7 /* forcelnk.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = forcelnk.h; sourceTree = "<group>"; };
+		F5A85D0201FA022B0175ACA7 /* helpctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = helpctrl.h; sourceTree = "<group>"; };
+		F5A85D0301FA022B0175ACA7 /* helpdata.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = helpdata.h; sourceTree = "<group>"; };
+		F5A85D0401FA022B0175ACA7 /* helpfrm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = helpfrm.h; sourceTree = "<group>"; };
+		F5A85D0501FA022B0175ACA7 /* htmlcell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = htmlcell.h; sourceTree = "<group>"; };
+		F5A85D0601FA022B0175ACA7 /* htmldefs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = htmldefs.h; sourceTree = "<group>"; };
+		F5A85D0701FA022B0175ACA7 /* htmlfilt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = htmlfilt.h; sourceTree = "<group>"; };
+		F5A85D0801FA022B0175ACA7 /* htmlpars.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = htmlpars.h; sourceTree = "<group>"; };
+		F5A85D0901FA022B0175ACA7 /* htmlproc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = htmlproc.h; sourceTree = "<group>"; };
+		F5A85D0A01FA022B0175ACA7 /* htmltag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = htmltag.h; sourceTree = "<group>"; };
+		F5A85D0B01FA022B0175ACA7 /* htmlwin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = htmlwin.h; sourceTree = "<group>"; };
+		F5A85D0C01FA022B0175ACA7 /* htmprint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = htmprint.h; sourceTree = "<group>"; };
+		F5A85D0D01FA022B0175ACA7 /* m_templ.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = m_templ.h; sourceTree = "<group>"; };
+		F5A85D2001FA022B0175ACA7 /* winpars.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = winpars.h; sourceTree = "<group>"; };
+		F5A85D2101FA022B0175ACA7 /* icon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = icon.h; sourceTree = "<group>"; };
+		F5A85D2201FA022B0175ACA7 /* imagbmp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imagbmp.h; sourceTree = "<group>"; };
+		F5A85D2301FA022B0175ACA7 /* image.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = image.h; sourceTree = "<group>"; };
+		F5A85D2401FA022B0175ACA7 /* imaggif.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imaggif.h; sourceTree = "<group>"; };
+		F5A85D2501FA022B0175ACA7 /* imagiff.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imagiff.h; sourceTree = "<group>"; };
+		F5A85D2601FA022B0175ACA7 /* imagjpeg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imagjpeg.h; sourceTree = "<group>"; };
+		F5A85D2701FA022B0175ACA7 /* imaglist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imaglist.h; sourceTree = "<group>"; };
+		F5A85D2801FA022B0175ACA7 /* imagpcx.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imagpcx.h; sourceTree = "<group>"; };
+		F5A85D2901FA022B0175ACA7 /* imagpng.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imagpng.h; sourceTree = "<group>"; };
+		F5A85D2A01FA022B0175ACA7 /* imagpnm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imagpnm.h; sourceTree = "<group>"; };
+		F5A85D2B01FA022B0175ACA7 /* imagtiff.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imagtiff.h; sourceTree = "<group>"; };
+		F5A85D2C01FA022B0175ACA7 /* imagxpm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imagxpm.h; sourceTree = "<group>"; };
+		F5A85D2D01FA022B0175ACA7 /* intl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = intl.h; sourceTree = "<group>"; };
+		F5A85D2E01FA022B0175ACA7 /* ioswrap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ioswrap.h; sourceTree = "<group>"; };
+		F5A85D2F01FA022B0175ACA7 /* ipcbase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ipcbase.h; sourceTree = "<group>"; };
+		F5A85D3001FA022B0175ACA7 /* isql.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = isql.h; sourceTree = "<group>"; };
+		F5A85D3101FA022B0175ACA7 /* isqlext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = isqlext.h; sourceTree = "<group>"; };
+		F5A85D3201FA022B0175ACA7 /* joystick.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = joystick.h; sourceTree = "<group>"; };
+		F5A85D3301FA022B0175ACA7 /* layout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = layout.h; sourceTree = "<group>"; };
+		F5A85D3401FA022B0175ACA7 /* laywin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = laywin.h; sourceTree = "<group>"; };
+		F5A85D3501FA022B0175ACA7 /* list.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = list.h; sourceTree = "<group>"; };
+		F5A85D3601FA022B0175ACA7 /* listbox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = listbox.h; sourceTree = "<group>"; };
+		F5A85D3701FA022B0175ACA7 /* listctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = listctrl.h; sourceTree = "<group>"; };
+		F5A85D3901FA022B0175ACA7 /* log.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = log.h; sourceTree = "<group>"; };
+		F5A85D3A01FA022B0175ACA7 /* longlong.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = longlong.h; sourceTree = "<group>"; };
+		F5A85D3C01FA022B0175ACA7 /* accel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = accel.h; sourceTree = "<group>"; };
+		F5A85D3D01FA022B0175ACA7 /* aga.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = aga.h; sourceTree = "<group>"; };
+		F5A85D3E01FA022B0175ACA7 /* app.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = app.h; sourceTree = "<group>"; };
+		F5A85D3F01FA022B0175ACA7 /* bitmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = bitmap.h; sourceTree = "<group>"; };
+		F5A85D4001FA022B0175ACA7 /* bmpbuttn.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = bmpbuttn.h; sourceTree = "<group>"; };
+		F5A85D4101FA022B0175ACA7 /* brush.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = brush.h; sourceTree = "<group>"; };
+		F5A85D4201FA022B0175ACA7 /* button.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = button.h; sourceTree = "<group>"; };
+		F5A85D4301FA022B0175ACA7 /* checkbox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = checkbox.h; sourceTree = "<group>"; };
+		F5A85D4401FA022B0175ACA7 /* checklst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = checklst.h; sourceTree = "<group>"; };
+		F5A85D4501FA022B0175ACA7 /* choice.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = choice.h; sourceTree = "<group>"; };
+		F5A85D4601FA022B0175ACA7 /* clipbrd.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = clipbrd.h; sourceTree = "<group>"; };
+		F5A85D4701FA022B0175ACA7 /* colordlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = colordlg.h; sourceTree = "<group>"; };
+		F5A85D4801FA022B0175ACA7 /* colour.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = colour.h; sourceTree = "<group>"; };
+		F5A85D4901FA022B0175ACA7 /* combobox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = combobox.h; sourceTree = "<group>"; };
+		F5A85D4A01FA022B0175ACA7 /* control.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = control.h; sourceTree = "<group>"; };
+		F5A85D4B01FA022B0175ACA7 /* cursor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cursor.h; sourceTree = "<group>"; };
+		F5A85D4C01FA022B0175ACA7 /* dataform.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dataform.h; sourceTree = "<group>"; };
+		F5A85D4D01FA022B0175ACA7 /* dataobj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dataobj.h; sourceTree = "<group>"; };
+		F5A85D4E01FA022B0175ACA7 /* dataobj2.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dataobj2.h; sourceTree = "<group>"; };
+		F5A85D4F01FA022B0175ACA7 /* dc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dc.h; sourceTree = "<group>"; };
+		F5A85D5001FA022B0175ACA7 /* dcclient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dcclient.h; sourceTree = "<group>"; };
+		F5A85D5101FA022B0175ACA7 /* dcmemory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dcmemory.h; sourceTree = "<group>"; };
+		F5A85D5201FA022B0175ACA7 /* dcprint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dcprint.h; sourceTree = "<group>"; };
+		F5A85D5301FA022B0175ACA7 /* dcscreen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dcscreen.h; sourceTree = "<group>"; };
+		F5A85D5401FA022B0175ACA7 /* dialog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dialog.h; sourceTree = "<group>"; };
+		F5A85D5501FA022B0175ACA7 /* dirdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dirdlg.h; sourceTree = "<group>"; };
+		F5A85D5601FA022B0175ACA7 /* dnd.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dnd.h; sourceTree = "<group>"; };
+		F5A85D5701FA022B0175ACA7 /* filedlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = filedlg.h; sourceTree = "<group>"; };
+		F5A85D5801FA022B0175ACA7 /* font.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = font.h; sourceTree = "<group>"; };
+		F5A85D5901FA022B0175ACA7 /* fontdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fontdlg.h; sourceTree = "<group>"; };
+		F5A85D5A01FA022B0175ACA7 /* frame.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = frame.h; sourceTree = "<group>"; };
+		F5A85D5B01FA022B0175ACA7 /* gauge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gauge.h; sourceTree = "<group>"; };
+		F5A85D5C01FA022B0175ACA7 /* gdiobj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gdiobj.h; sourceTree = "<group>"; };
+		F5A85D5D01FA022B0175ACA7 /* glcanvas.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = glcanvas.h; sourceTree = "<group>"; };
+		F5A85D5E01FA022B0175ACA7 /* gsockmac.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gsockmac.h; sourceTree = "<group>"; };
+		F5A85D6001FA022B0175ACA7 /* icon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = icon.h; sourceTree = "<group>"; };
+		F5A85D6101FA022B0175ACA7 /* imaglist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imaglist.h; sourceTree = "<group>"; };
+		F5A85D6201FA022B0175ACA7 /* joystick.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = joystick.h; sourceTree = "<group>"; };
+		F5A85D6301FA022B0175ACA7 /* listbox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = listbox.h; sourceTree = "<group>"; };
+		F5A85D6401FA022B0175ACA7 /* listctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = listctrl.h; sourceTree = "<group>"; };
+		F5A85D6501FA022B0175ACA7 /* macnotfy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = macnotfy.h; sourceTree = "<group>"; };
+		F5A85D6601FA022B0175ACA7 /* macsock.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = macsock.h; sourceTree = "<group>"; };
+		F5A85D6701FA022B0175ACA7 /* mdi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mdi.h; sourceTree = "<group>"; };
+		F5A85D6801FA022B0175ACA7 /* menu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = menu.h; sourceTree = "<group>"; };
+		F5A85D6901FA022B0175ACA7 /* menuitem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = menuitem.h; sourceTree = "<group>"; };
+		F5A85D6A01FA022B0175ACA7 /* metafile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = metafile.h; sourceTree = "<group>"; };
+		F5A85D6B01FA022B0175ACA7 /* mimetype.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mimetype.h; sourceTree = "<group>"; };
+		F5A85D6C01FA022B0175ACA7 /* minifram.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = minifram.h; sourceTree = "<group>"; };
+		F5A85D6D01FA022B0175ACA7 /* msgdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = msgdlg.h; sourceTree = "<group>"; };
+		F5A85D6E01FA022B0175ACA7 /* notebook.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = notebook.h; sourceTree = "<group>"; };
+		F5A85D6F01FA022B0175ACA7 /* palette.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = palette.h; sourceTree = "<group>"; };
+		F5A85D7001FA022B0175ACA7 /* pen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = pen.h; sourceTree = "<group>"; };
+		F5A85D7101FA022B0175ACA7 /* pnghand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = pnghand.h; sourceTree = "<group>"; };
+		F5A85D7201FA022B0175ACA7 /* pngread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = pngread.h; sourceTree = "<group>"; };
+		F5A85D7401FA022B0175ACA7 /* printdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = printdlg.h; sourceTree = "<group>"; };
+		F5A85D7501FA022B0175ACA7 /* printmac.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = printmac.h; sourceTree = "<group>"; };
+		F5A85D7601FA022B0175ACA7 /* private.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = private.h; sourceTree = "<group>"; };
+		F5A85D7701FA022B0175ACA7 /* radiobox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = radiobox.h; sourceTree = "<group>"; };
+		F5A85D7801FA022B0175ACA7 /* radiobut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = radiobut.h; sourceTree = "<group>"; };
+		F5A85D7901FA022B0175ACA7 /* region.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = region.h; sourceTree = "<group>"; };
+		F5A85D7A01FA022B0175ACA7 /* scrolbar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = scrolbar.h; sourceTree = "<group>"; };
+		F5A85D7C01FA022B0175ACA7 /* slider.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = slider.h; sourceTree = "<group>"; };
+		F5A85D7D01FA022B0175ACA7 /* spinbutt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = spinbutt.h; sourceTree = "<group>"; };
+		F5A85D7E01FA022B0175ACA7 /* statbmp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = statbmp.h; sourceTree = "<group>"; };
+		F5A85D7F01FA022B0175ACA7 /* statbox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = statbox.h; sourceTree = "<group>"; };
+		F5A85D8001FA022B0175ACA7 /* statline.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = statline.h; sourceTree = "<group>"; };
+		F5A85D8101FA022B0175ACA7 /* stattext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stattext.h; sourceTree = "<group>"; };
+		F5A85D8201FA022B0175ACA7 /* statusbr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = statusbr.h; sourceTree = "<group>"; };
+		F5A85D8301FA022B0175ACA7 /* tabctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tabctrl.h; sourceTree = "<group>"; };
+		F5A85D8501FA022B0175ACA7 /* textctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = textctrl.h; sourceTree = "<group>"; };
+		F5A85D8601FA022B0175ACA7 /* timer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = timer.h; sourceTree = "<group>"; };
+		F5A85D8701FA022B0175ACA7 /* toolbar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = toolbar.h; sourceTree = "<group>"; };
+		F5A85D8801FA022B0175ACA7 /* tooltip.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tooltip.h; sourceTree = "<group>"; };
+		F5A85D8901FA022B0175ACA7 /* toplevel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = toplevel.h; sourceTree = "<group>"; };
+		F5A85D8A01FA022B0175ACA7 /* treectrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = treectrl.h; sourceTree = "<group>"; };
+		F5A85D8B01FA022B0175ACA7 /* uma.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = uma.h; sourceTree = "<group>"; };
+		F5A85D8D01FA022B0175ACA7 /* window.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = window.h; sourceTree = "<group>"; };
+		F5A85D8E01FA022B0175ACA7 /* matrix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = matrix.h; sourceTree = "<group>"; };
+		F5A85D8F01FA022B0175ACA7 /* mdi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mdi.h; sourceTree = "<group>"; };
+		F5A85D9001FA022B0175ACA7 /* memconf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = memconf.h; sourceTree = "<group>"; };
+		F5A85D9101FA022B0175ACA7 /* memory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = memory.h; sourceTree = "<group>"; };
+		F5A85D9201FA022B0175ACA7 /* memtext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = memtext.h; sourceTree = "<group>"; };
+		F5A85D9301FA022B0175ACA7 /* menu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = menu.h; sourceTree = "<group>"; };
+		F5A85D9401FA022B0175ACA7 /* menuitem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = menuitem.h; sourceTree = "<group>"; };
+		F5A85D9501FA022B0175ACA7 /* metafile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = metafile.h; sourceTree = "<group>"; };
+		F5A85DAD01FA022B0175ACA7 /* mimetype.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mimetype.h; sourceTree = "<group>"; };
+		F5A85DAE01FA022B0175ACA7 /* minifram.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = minifram.h; sourceTree = "<group>"; };
+		F5A85DAF01FA022B0175ACA7 /* module.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = module.h; sourceTree = "<group>"; };
+		F5A85DF101FA022B0175ACA7 /* msgdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = msgdlg.h; sourceTree = "<group>"; };
+		F5A85DF201FA022B0175ACA7 /* mstream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mstream.h; sourceTree = "<group>"; };
+		F5A85E9701FA022B0175ACA7 /* notebook.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = notebook.h; sourceTree = "<group>"; };
+		F5A85E9801FA022B0175ACA7 /* object.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = object.h; sourceTree = "<group>"; };
+		F5A85EFF01FA022B0175ACA7 /* ownerdrw.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ownerdrw.h; sourceTree = "<group>"; };
+		F5A85F0001FA022B0175ACA7 /* palette.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = palette.h; sourceTree = "<group>"; };
+		F5A85F0101FA022B0175ACA7 /* panel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = panel.h; sourceTree = "<group>"; };
+		F5A85F0201FA022B0175ACA7 /* paper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = paper.h; sourceTree = "<group>"; };
+		F5A85F0301FA022B0175ACA7 /* pen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = pen.h; sourceTree = "<group>"; };
+		F5A85F0401FA022B0175ACA7 /* platform.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = "<group>"; };
+		F5A85F0501FA022B0175ACA7 /* popupwin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = popupwin.h; sourceTree = "<group>"; };
+		F5A85F0601FA022B0175ACA7 /* print.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = print.h; sourceTree = "<group>"; };
+		F5A85F0701FA022B0175ACA7 /* printdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = printdlg.h; sourceTree = "<group>"; };
+		F5A85F0801FA022B0175ACA7 /* prntbase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = prntbase.h; sourceTree = "<group>"; };
+		F5A85F0901FA022B0175ACA7 /* process.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = process.h; sourceTree = "<group>"; };
+		F5A85F0A01FA022B0175ACA7 /* progdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = progdlg.h; sourceTree = "<group>"; };
+		F5A85F1001FA022B0175ACA7 /* file.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = file.h; sourceTree = "<group>"; };
+		F5A85F1101FA022B0175ACA7 /* ftp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ftp.h; sourceTree = "<group>"; };
+		F5A85F1201FA022B0175ACA7 /* http.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = http.h; sourceTree = "<group>"; };
+		F5A85F1301FA022B0175ACA7 /* protocol.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = protocol.h; sourceTree = "<group>"; };
+		F5A85F1401FA022B0175ACA7 /* quantize.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = quantize.h; sourceTree = "<group>"; };
+		F5A85F1501FA022B0175ACA7 /* radiobox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = radiobox.h; sourceTree = "<group>"; };
+		F5A85F1601FA022B0175ACA7 /* radiobut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = radiobut.h; sourceTree = "<group>"; };
+		F5A85F1701FA022B0175ACA7 /* regex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = regex.h; sourceTree = "<group>"; };
+		F5A85F1801FA022B0175ACA7 /* region.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = region.h; sourceTree = "<group>"; };
+		F5A85F1A01FA022B0175ACA7 /* sashwin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sashwin.h; sourceTree = "<group>"; };
+		F5A85F1B01FA022B0175ACA7 /* sckaddr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sckaddr.h; sourceTree = "<group>"; };
+		F5A85F1C01FA022B0175ACA7 /* sckipc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sckipc.h; sourceTree = "<group>"; };
+		F5A85F1D01FA022B0175ACA7 /* sckstrm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sckstrm.h; sourceTree = "<group>"; };
+		F5A85F1E01FA022B0175ACA7 /* scrolbar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = scrolbar.h; sourceTree = "<group>"; };
+		F5A85F1F01FA022B0175ACA7 /* scrolwin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = scrolwin.h; sourceTree = "<group>"; };
+		F5A85F2001FA022B0175ACA7 /* settings.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = settings.h; sourceTree = "<group>"; };
+		F5A85F2201FA022B0175ACA7 /* sizer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sizer.h; sourceTree = "<group>"; };
+		F5A85F2301FA022B0175ACA7 /* slider.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = slider.h; sourceTree = "<group>"; };
+		F5A85F2401FA022B0175ACA7 /* snglinst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = snglinst.h; sourceTree = "<group>"; };
+		F5A85F2501FA022B0175ACA7 /* socket.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = socket.h; sourceTree = "<group>"; };
+		F5A85F2701FA022B0175ACA7 /* spinbutt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = spinbutt.h; sourceTree = "<group>"; };
+		F5A85F2801FA022B0175ACA7 /* spinctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = spinctrl.h; sourceTree = "<group>"; };
+		F5A85F2901FA022B0175ACA7 /* splash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = splash.h; sourceTree = "<group>"; };
+		F5A85F2A01FA022B0175ACA7 /* splitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = splitter.h; sourceTree = "<group>"; };
+		F5A85F2B01FA022B0175ACA7 /* stack.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stack.h; sourceTree = "<group>"; };
+		F5A85F2C01FA022B0175ACA7 /* statbmp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = statbmp.h; sourceTree = "<group>"; };
+		F5A85F2D01FA022B0175ACA7 /* statbox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = statbox.h; sourceTree = "<group>"; };
+		F5A85F2E01FA022B0175ACA7 /* statline.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = statline.h; sourceTree = "<group>"; };
+		F5A85F2F01FA022B0175ACA7 /* stattext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stattext.h; sourceTree = "<group>"; };
+		F5A85F3001FA022B0175ACA7 /* statusbr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = statusbr.h; sourceTree = "<group>"; };
+		F5A85F3101FA022B0175ACA7 /* strconv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = strconv.h; sourceTree = "<group>"; };
+		F5A85F3201FA022B0175ACA7 /* stream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stream.h; sourceTree = "<group>"; };
+		F5A85F3301FA022B0175ACA7 /* string.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = string.h; sourceTree = "<group>"; };
+		F5A85F3401FA022B0175ACA7 /* sysopt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sysopt.h; sourceTree = "<group>"; };
+		F5A85F3501FA022B0175ACA7 /* tab.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tab.h; sourceTree = "<group>"; };
+		F5A85F3601FA022B0175ACA7 /* tabctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tabctrl.h; sourceTree = "<group>"; };
+		F5A85F3701FA022B0175ACA7 /* taskbar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = taskbar.h; sourceTree = "<group>"; };
+		F5A85F3801FA022B0175ACA7 /* tbarbase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tbarbase.h; sourceTree = "<group>"; };
+		F5A85F3A01FA022B0175ACA7 /* textbuf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = textbuf.h; sourceTree = "<group>"; };
+		F5A85F3B01FA022B0175ACA7 /* textctrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = textctrl.h; sourceTree = "<group>"; };
+		F5A85F3C01FA022B0175ACA7 /* textdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = textdlg.h; sourceTree = "<group>"; };
+		F5A85F3D01FA022B0175ACA7 /* textfile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = textfile.h; sourceTree = "<group>"; };
+		F5A85F3E01FA022B0175ACA7 /* tglbtn.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tglbtn.h; sourceTree = "<group>"; };
+		F5A85F3F01FA022B0175ACA7 /* thread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = thread.h; sourceTree = "<group>"; };
+		F5A85F4101FA022B0175ACA7 /* timer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = timer.h; sourceTree = "<group>"; };
+		F5A85F4201FA022B0175ACA7 /* tipdlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tipdlg.h; sourceTree = "<group>"; };
+		F5A85F4301FA022B0175ACA7 /* tipwin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tipwin.h; sourceTree = "<group>"; };
+		F5A85F4401FA022B0175ACA7 /* tokenzr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tokenzr.h; sourceTree = "<group>"; };
+		F5A85F4501FA022B0175ACA7 /* toolbar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = toolbar.h; sourceTree = "<group>"; };
+		F5A85F4601FA022B0175ACA7 /* tooltip.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tooltip.h; sourceTree = "<group>"; };
+		F5A85F4701FA022B0175ACA7 /* toplevel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = toplevel.h; sourceTree = "<group>"; };
+		F5A85F4801FA022B0175ACA7 /* treebase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = treebase.h; sourceTree = "<group>"; };
+		F5A85F4901FA022B0175ACA7 /* treectrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = treectrl.h; sourceTree = "<group>"; };
+		F5A85F4B01FA022B0175ACA7 /* txtstrm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = txtstrm.h; sourceTree = "<group>"; };
+		F5A85F4C01FA022B0175ACA7 /* types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = "<group>"; };
+		F5A85F7501FA022B0175ACA7 /* execute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = execute.h; sourceTree = "<group>"; };
+		F5A85F7601FA022B0175ACA7 /* fontutil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fontutil.h; sourceTree = "<group>"; };
+		F5A85F7701FA022B0175ACA7 /* gsockunx.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gsockunx.h; sourceTree = "<group>"; };
+		F5A85F7801FA022B0175ACA7 /* mimetype.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mimetype.h; sourceTree = "<group>"; };
+		F5A85F7901FA022B0175ACA7 /* url.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = url.h; sourceTree = "<group>"; };
+		F5A85F7A01FA022B0175ACA7 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = "<group>"; };
+		F5A85F7B01FA022B0175ACA7 /* valgen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = valgen.h; sourceTree = "<group>"; };
+		F5A85F7C01FA022B0175ACA7 /* validate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = validate.h; sourceTree = "<group>"; };
+		F5A85F7D01FA022B0175ACA7 /* valtext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = valtext.h; sourceTree = "<group>"; };
+		F5A85F7E01FA022B0175ACA7 /* variant.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = variant.h; sourceTree = "<group>"; };
+		F5A85F7F01FA022B0175ACA7 /* vector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vector.h; sourceTree = "<group>"; };
+		F5A85F8001FA022B0175ACA7 /* version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = "<group>"; };
+		F5A85F8201FA022B0175ACA7 /* wave.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wave.h; sourceTree = "<group>"; };
+		F5A85F8301FA022B0175ACA7 /* wfstream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wfstream.h; sourceTree = "<group>"; };
+		F5A85F8401FA022B0175ACA7 /* window.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = window.h; sourceTree = "<group>"; };
+		F5A85F8501FA022B0175ACA7 /* wizard.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wizard.h; sourceTree = "<group>"; };
+		F5A85F8601FA022B0175ACA7 /* wx.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wx.h; sourceTree = "<group>"; };
+		F5A85F8D01FA022B0175ACA7 /* wxchar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wxchar.h; sourceTree = "<group>"; };
+		F5A85F8F01FA022B0175ACA7 /* wxhtml.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wxhtml.h; sourceTree = "<group>"; };
+		F5A85F9001FA022B0175ACA7 /* wxprec.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wxprec.h; sourceTree = "<group>"; };
+		F5A85F9101FA022B0175ACA7 /* xpmdecod.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = xpmdecod.h; sourceTree = "<group>"; };
+		F5A85F9201FA022B0175ACA7 /* xpmhand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = xpmhand.h; sourceTree = "<group>"; };
+		F5A85F9301FA022B0175ACA7 /* zipstrm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = zipstrm.h; sourceTree = "<group>"; };
+		F5A85F9401FA022B0175ACA7 /* zstream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = zstream.h; sourceTree = "<group>"; };
+		F5A85FDF01FA022B0175ACA7 /* appcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = appcmn.cpp; path = common/appcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FE101FA022B0175ACA7 /* bmpbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = bmpbase.cpp; path = common/bmpbase.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FE201FA022B0175ACA7 /* choiccmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = choiccmn.cpp; path = common/choiccmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FE301FA022B0175ACA7 /* clipcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = clipcmn.cpp; path = common/clipcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FE401FA022B0175ACA7 /* clntdata.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = clntdata.cpp; path = common/clntdata.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FE501FA022B0175ACA7 /* cmdline.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = cmdline.cpp; path = common/cmdline.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FE601FA022B0175ACA7 /* cmdproc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = cmdproc.cpp; path = common/cmdproc.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FE701FA022B0175ACA7 /* cmndata.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = cmndata.cpp; path = common/cmndata.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FE801FA022B0175ACA7 /* config.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = config.cpp; path = common/config.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FE901FA022B0175ACA7 /* containr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = containr.cpp; path = common/containr.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FEA01FA022B0175ACA7 /* cshelp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = cshelp.cpp; path = common/cshelp.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FEB01FA022B0175ACA7 /* ctrlcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ctrlcmn.cpp; path = common/ctrlcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FEC01FA022B0175ACA7 /* ctrlsub.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ctrlsub.cpp; path = common/ctrlsub.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FEF01FA022B0175ACA7 /* datetime.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = datetime.cpp; path = common/datetime.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FF001FA022B0175ACA7 /* datstrm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = datstrm.cpp; path = common/datstrm.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FF101FA022B0175ACA7 /* db.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = db.cpp; path = common/db.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FF301FA022B0175ACA7 /* dbtable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dbtable.cpp; path = common/dbtable.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FF401FA022B0175ACA7 /* dcbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dcbase.cpp; path = common/dcbase.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FF601FA022B0175ACA7 /* dircmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dircmn.cpp; path = common/dircmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FF701FA022B0175ACA7 /* dlgcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dlgcmn.cpp; path = common/dlgcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FF801FA022B0175ACA7 /* dndcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dndcmn.cpp; path = common/dndcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FF901FA022B0175ACA7 /* dobjcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dobjcmn.cpp; path = common/dobjcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FFA01FA022B0175ACA7 /* docmdi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = docmdi.cpp; path = common/docmdi.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FFB01FA022B0175ACA7 /* docview.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = docview.cpp; path = common/docview.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FFE01FA022B0175ACA7 /* dseldlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dseldlg.cpp; path = common/dseldlg.cpp; sourceTree = SOURCE_ROOT; };
+		F5A85FFF01FA022B0175ACA7 /* dynarray.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dynarray.cpp; path = common/dynarray.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600001FA022B0175ACA7 /* dynlib.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dynlib.cpp; path = common/dynlib.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600101FA022B0175ACA7 /* dynload.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dynload.cpp; path = common/dynload.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600201FA022B0175ACA7 /* effects.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = effects.cpp; path = common/effects.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600301FA022B0175ACA7 /* encconv.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = encconv.cpp; path = common/encconv.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600401FA022B0175ACA7 /* event.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = event.cpp; path = common/event.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600501FA022B0175ACA7 /* extended.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = extended.c; path = common/extended.c; sourceTree = SOURCE_ROOT; };
+		F5A8600601FA022B0175ACA7 /* fddlgcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fddlgcmn.cpp; path = common/fddlgcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600701FA022B0175ACA7 /* ffile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ffile.cpp; path = common/ffile.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600801FA022B0175ACA7 /* file.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = file.cpp; path = common/file.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600901FA022B0175ACA7 /* fileconf.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fileconf.cpp; path = common/fileconf.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600A01FA022B0175ACA7 /* filefn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = filefn.cpp; path = common/filefn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600B01FA022B0175ACA7 /* filename.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = filename.cpp; path = common/filename.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600C01FA022B0175ACA7 /* filesys.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = filesys.cpp; path = common/filesys.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600D01FA022B0175ACA7 /* fontcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fontcmn.cpp; path = common/fontcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600E01FA022B0175ACA7 /* fontmap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fontmap.cpp; path = common/fontmap.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8600F01FA022B0175ACA7 /* framecmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = framecmn.cpp; path = common/framecmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601001FA022B0175ACA7 /* fs_inet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fs_inet.cpp; path = common/fs_inet.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601101FA022B0175ACA7 /* fs_mem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fs_mem.cpp; path = common/fs_mem.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601301FA022B0175ACA7 /* ftp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ftp.cpp; path = common/ftp.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601401FA022B0175ACA7 /* gaugecmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = gaugecmn.cpp; path = common/gaugecmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601501FA022B0175ACA7 /* gdicmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = gdicmn.cpp; path = common/gdicmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601601FA022B0175ACA7 /* geometry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = geometry.cpp; path = common/geometry.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601701FA022B0175ACA7 /* gifdecod.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = gifdecod.cpp; path = common/gifdecod.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601901FA022B0175ACA7 /* hash.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = hash.cpp; path = common/hash.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601A01FA022B0175ACA7 /* helpbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = helpbase.cpp; path = common/helpbase.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601B01FA022B0175ACA7 /* http.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = http.cpp; path = common/http.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601C01FA022B0175ACA7 /* imagall.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imagall.cpp; path = common/imagall.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601D01FA022B0175ACA7 /* imagbmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imagbmp.cpp; path = common/imagbmp.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601E01FA022B0175ACA7 /* image.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = image.cpp; path = common/image.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8601F01FA022B0175ACA7 /* imaggif.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imaggif.cpp; path = common/imaggif.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602001FA022B0175ACA7 /* imagiff.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imagiff.cpp; path = common/imagiff.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602101FA022B0175ACA7 /* imagjpeg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imagjpeg.cpp; path = common/imagjpeg.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602201FA022B0175ACA7 /* imagpcx.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imagpcx.cpp; path = common/imagpcx.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602301FA022B0175ACA7 /* imagpng.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imagpng.cpp; path = common/imagpng.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602401FA022B0175ACA7 /* imagpnm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imagpnm.cpp; path = common/imagpnm.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602501FA022B0175ACA7 /* imagtiff.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imagtiff.cpp; path = common/imagtiff.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602601FA022B0175ACA7 /* imagxpm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imagxpm.cpp; path = common/imagxpm.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602801FA022B0175ACA7 /* intl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = intl.cpp; path = common/intl.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602901FA022B0175ACA7 /* ipcbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ipcbase.cpp; path = common/ipcbase.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602A01FA022B0175ACA7 /* layout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = layout.cpp; path = common/layout.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602B01FA022B0175ACA7 /* lboxcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = lboxcmn.cpp; path = common/lboxcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602E01FA022B0175ACA7 /* list.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = list.cpp; path = common/list.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8602F01FA022B0175ACA7 /* log.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = log.cpp; path = common/log.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603001FA022B0175ACA7 /* longlong.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = longlong.cpp; path = common/longlong.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603101FA022B0175ACA7 /* matrix.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = matrix.cpp; path = common/matrix.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603201FA022B0175ACA7 /* memory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = memory.cpp; path = common/memory.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603301FA022B0175ACA7 /* menucmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = menucmn.cpp; path = common/menucmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603401FA022B0175ACA7 /* mimecmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = mimecmn.cpp; path = common/mimecmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603501FA022B0175ACA7 /* module.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = module.cpp; path = common/module.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603601FA022B0175ACA7 /* mstream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = mstream.cpp; path = common/mstream.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603701FA022B0175ACA7 /* nbkbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = nbkbase.cpp; path = common/nbkbase.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603801FA022B0175ACA7 /* object.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = object.cpp; path = common/object.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603A01FA022B0175ACA7 /* paper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = paper.cpp; path = common/paper.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603D01FA022C0175ACA7 /* popupcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = popupcmn.cpp; path = common/popupcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603E01FA022C0175ACA7 /* prntbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = prntbase.cpp; path = common/prntbase.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8603F01FA022C0175ACA7 /* process.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = process.cpp; path = common/process.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604001FA022C0175ACA7 /* protocol.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = protocol.cpp; path = common/protocol.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604101FA022C0175ACA7 /* quantize.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = quantize.cpp; path = common/quantize.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604301FA022C0175ACA7 /* regex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = regex.cpp; path = common/regex.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604601FA022C0175ACA7 /* sckaddr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sckaddr.cpp; path = common/sckaddr.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604701FA022C0175ACA7 /* sckfile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sckfile.cpp; path = common/sckfile.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604801FA022C0175ACA7 /* sckipc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sckipc.cpp; path = common/sckipc.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604901FA022C0175ACA7 /* sckstrm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sckstrm.cpp; path = common/sckstrm.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604A01FA022C0175ACA7 /* sizer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sizer.cpp; path = common/sizer.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604B01FA022C0175ACA7 /* socket.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = socket.cpp; path = common/socket.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604C01FA022C0175ACA7 /* stockitem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = stockitem.cpp; path = common/stockitem.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604D01FA022C0175ACA7 /* strconv.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = strconv.cpp; path = common/strconv.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604E01FA022C0175ACA7 /* stream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = stream.cpp; path = common/stream.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8604F01FA022C0175ACA7 /* string.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = string.cpp; path = common/string.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8605001FA022C0175ACA7 /* sysopt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sysopt.cpp; path = common/sysopt.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8605101FA022C0175ACA7 /* tbarbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = tbarbase.cpp; path = common/tbarbase.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8605201FA022C0175ACA7 /* textbuf.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = textbuf.cpp; path = common/textbuf.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8605301FA022C0175ACA7 /* textcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = textcmn.cpp; path = common/textcmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8605401FA022C0175ACA7 /* textfile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = textfile.cpp; path = common/textfile.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8605501FA022C0175ACA7 /* timercmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = timercmn.cpp; path = common/timercmn.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8605601FA022C0175ACA7 /* tokenzr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = tokenzr.cpp; path = common/tokenzr.cpp; sourceTree = SOURCE_ROOT; };
+		F5A8605701FA022C0175ACA7 /* toplvcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = toplvcmn.cpp; sourceTree = "<group>"; };
+		F5A8605801FA022C0175ACA7 /* treebase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = treebase.cpp; sourceTree = "<group>"; };
+		F5A8605901FA022C0175ACA7 /* txtstrm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = txtstrm.cpp; sourceTree = "<group>"; };
+		F5A8605D01FA022C0175ACA7 /* url.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = url.cpp; sourceTree = "<group>"; };
+		F5A8605E01FA022C0175ACA7 /* utilscmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = utilscmn.cpp; sourceTree = "<group>"; };
+		F5A8605F01FA022C0175ACA7 /* valgen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = valgen.cpp; sourceTree = "<group>"; };
+		F5A8606001FA022C0175ACA7 /* validate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = validate.cpp; sourceTree = "<group>"; };
+		F5A8606101FA022C0175ACA7 /* valtext.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = valtext.cpp; sourceTree = "<group>"; };
+		F5A8606201FA022C0175ACA7 /* variant.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = variant.cpp; sourceTree = "<group>"; };
+		F5A8606301FA022C0175ACA7 /* wfstream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = wfstream.cpp; sourceTree = "<group>"; };
+		F5A8606401FA022C0175ACA7 /* wincmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = wincmn.cpp; sourceTree = "<group>"; };
+		F5A8606501FA022C0175ACA7 /* wxchar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = wxchar.cpp; sourceTree = "<group>"; };
+		F5A8606701FA022C0175ACA7 /* xpmdecod.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = xpmdecod.cpp; sourceTree = "<group>"; };
+		F5A8606801FA022C0175ACA7 /* zipstrm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = zipstrm.cpp; sourceTree = "<group>"; };
+		F5A8606901FA022C0175ACA7 /* zstream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = zstream.cpp; sourceTree = "<group>"; };
+		F5A8607001FA022C0175ACA7 /* busyinfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = busyinfo.cpp; sourceTree = "<group>"; };
+		F5A8607101FA022C0175ACA7 /* calctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = calctrl.cpp; sourceTree = "<group>"; };
+		F5A8607201FA022C0175ACA7 /* caret.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = caret.cpp; sourceTree = "<group>"; };
+		F5A8607301FA022C0175ACA7 /* choicdgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = choicdgg.cpp; sourceTree = "<group>"; };
+		F5A8607401FA022C0175ACA7 /* colrdlgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = colrdlgg.cpp; sourceTree = "<group>"; };
+		F5A8607501FA022C0175ACA7 /* dcpsg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dcpsg.cpp; sourceTree = "<group>"; };
+		F5A8607701FA022C0175ACA7 /* dirctrlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dirctrlg.cpp; sourceTree = "<group>"; };
+		F5A8607801FA022C0175ACA7 /* dirdlgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dirdlgg.cpp; sourceTree = "<group>"; };
+		F5A8607901FA022C0175ACA7 /* dragimgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dragimgg.cpp; sourceTree = "<group>"; };
+		F5A8607A01FA022C0175ACA7 /* fdrepdlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fdrepdlg.cpp; sourceTree = "<group>"; };
+		F5A8607C01FA022C0175ACA7 /* fontdlgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fontdlgg.cpp; sourceTree = "<group>"; };
+		F5A8607D01FA022C0175ACA7 /* grid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = grid.cpp; sourceTree = "<group>"; };
+		F5A8607E01FA022C0175ACA7 /* gridctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gridctrl.cpp; sourceTree = "<group>"; };
+		F5A8608001FA022C0175ACA7 /* gridsel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gridsel.cpp; sourceTree = "<group>"; };
+		F5A8608101FA022C0175ACA7 /* helpext.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = helpext.cpp; sourceTree = "<group>"; };
+		F5A8608601FA022C0175ACA7 /* laywin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = laywin.cpp; sourceTree = "<group>"; };
+		F5A8608701FA022C0175ACA7 /* listctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = listctrl.cpp; sourceTree = "<group>"; };
+		F5A8608801FA022C0175ACA7 /* logg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = logg.cpp; sourceTree = "<group>"; };
+		F5A8608B01FA022C0175ACA7 /* numdlgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = numdlgg.cpp; sourceTree = "<group>"; };
+		F5A8608D01FA022C0175ACA7 /* panelg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = panelg.cpp; sourceTree = "<group>"; };
+		F5A8608E01FA022C0175ACA7 /* printps.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = printps.cpp; sourceTree = "<group>"; };
+		F5A8608F01FA022C0175ACA7 /* prntdlgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = prntdlgg.cpp; sourceTree = "<group>"; };
+		F5A8609001FA022C0175ACA7 /* progdlgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = progdlgg.cpp; sourceTree = "<group>"; };
+		F5A8609401FA022C0175ACA7 /* sashwin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = sashwin.cpp; sourceTree = "<group>"; };
+		F5A8609501FA022C0175ACA7 /* scrlwing.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = scrlwing.cpp; sourceTree = "<group>"; };
+		F5A8609701FA022C0175ACA7 /* splash.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = splash.cpp; sourceTree = "<group>"; };
+		F5A8609801FA022C0175ACA7 /* splitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = splitter.cpp; sourceTree = "<group>"; };
+		F5A8609A01FA022C0175ACA7 /* statusbr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = statusbr.cpp; sourceTree = "<group>"; };
+		F5A8609B01FA022C0175ACA7 /* tabg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tabg.cpp; sourceTree = "<group>"; };
+		F5A8609D01FA022C0175ACA7 /* textdlgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = textdlgg.cpp; sourceTree = "<group>"; };
+		F5A8609E01FA022C0175ACA7 /* tipdlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tipdlg.cpp; sourceTree = "<group>"; };
+		F5A8609F01FA022C0175ACA7 /* tipwin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tipwin.cpp; sourceTree = "<group>"; };
+		F5A860A001FA022C0175ACA7 /* treectlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = treectlg.cpp; sourceTree = "<group>"; };
+		F5A860A201FA022C0175ACA7 /* wizard.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = wizard.cpp; sourceTree = "<group>"; };
+		F5A8610401FA022C0175ACA7 /* helpctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = helpctrl.cpp; sourceTree = "<group>"; };
+		F5A8610501FA022C0175ACA7 /* helpdata.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = helpdata.cpp; sourceTree = "<group>"; };
+		F5A8610601FA022C0175ACA7 /* helpfrm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = helpfrm.cpp; sourceTree = "<group>"; };
+		F5A8610701FA022C0175ACA7 /* htmlcell.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = htmlcell.cpp; sourceTree = "<group>"; };
+		F5A8610801FA022C0175ACA7 /* htmlfilt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = htmlfilt.cpp; sourceTree = "<group>"; };
+		F5A8610901FA022C0175ACA7 /* htmlpars.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = htmlpars.cpp; sourceTree = "<group>"; };
+		F5A8610A01FA022C0175ACA7 /* htmltag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = htmltag.cpp; sourceTree = "<group>"; };
+		F5A8610B01FA022C0175ACA7 /* htmlwin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = htmlwin.cpp; sourceTree = "<group>"; };
+		F5A8610C01FA022C0175ACA7 /* htmprint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = htmprint.cpp; sourceTree = "<group>"; };
+		F5A8610D01FA022C0175ACA7 /* m_dflist.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = m_dflist.cpp; sourceTree = "<group>"; };
+		F5A8610E01FA022C0175ACA7 /* m_fonts.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = m_fonts.cpp; sourceTree = "<group>"; };
+		F5A8610F01FA022C0175ACA7 /* m_hline.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = m_hline.cpp; sourceTree = "<group>"; };
+		F5A8611001FA022C0175ACA7 /* m_image.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = m_image.cpp; sourceTree = "<group>"; };
+		F5A8611101FA022C0175ACA7 /* m_layout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = m_layout.cpp; sourceTree = "<group>"; };
+		F5A8611201FA022C0175ACA7 /* m_links.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = m_links.cpp; sourceTree = "<group>"; };
+		F5A8611301FA022C0175ACA7 /* m_list.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = m_list.cpp; sourceTree = "<group>"; };
+		F5A8611501FA022C0175ACA7 /* m_pre.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = m_pre.cpp; sourceTree = "<group>"; };
+		F5A8611601FA022C0175ACA7 /* m_tables.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = m_tables.cpp; sourceTree = "<group>"; };
+		F5A8611701FA022C0175ACA7 /* winpars.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = winpars.cpp; sourceTree = "<group>"; };
+		F5A8614301FA022C0175ACA7 /* jcapimin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcapimin.c; sourceTree = "<group>"; };
+		F5A8614401FA022C0175ACA7 /* jcapistd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcapistd.c; sourceTree = "<group>"; };
+		F5A8614501FA022C0175ACA7 /* jccoefct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jccoefct.c; sourceTree = "<group>"; };
+		F5A8614601FA022C0175ACA7 /* jccolor.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jccolor.c; sourceTree = "<group>"; };
+		F5A8614701FA022C0175ACA7 /* jcdctmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcdctmgr.c; sourceTree = "<group>"; };
+		F5A8614801FA022C0175ACA7 /* jchuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jchuff.c; sourceTree = "<group>"; };
+		F5A8614A01FA022C0175ACA7 /* jcinit.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcinit.c; sourceTree = "<group>"; };
+		F5A8614B01FA022C0175ACA7 /* jcmainct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmainct.c; sourceTree = "<group>"; };
+		F5A8614C01FA022C0175ACA7 /* jcmarker.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmarker.c; sourceTree = "<group>"; };
+		F5A8614D01FA022C0175ACA7 /* jcmaster.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmaster.c; sourceTree = "<group>"; };
+		F5A8614E01FA022C0175ACA7 /* jcomapi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcomapi.c; sourceTree = "<group>"; };
+		F5A8615101FA022C0175ACA7 /* jcparam.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcparam.c; sourceTree = "<group>"; };
+		F5A8615201FA022C0175ACA7 /* jcphuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcphuff.c; sourceTree = "<group>"; };
+		F5A8615301FA022C0175ACA7 /* jcprepct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcprepct.c; sourceTree = "<group>"; };
+		F5A8615401FA022C0175ACA7 /* jcsample.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcsample.c; sourceTree = "<group>"; };
+		F5A8615501FA022C0175ACA7 /* jctrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jctrans.c; sourceTree = "<group>"; };
+		F5A8615601FA022C0175ACA7 /* jdapimin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdapimin.c; sourceTree = "<group>"; };
+		F5A8615701FA022C0175ACA7 /* jdapistd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdapistd.c; sourceTree = "<group>"; };
+		F5A8615801FA022C0175ACA7 /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdatadst.c; sourceTree = "<group>"; };
+		F5A8615901FA022C0175ACA7 /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdatasrc.c; sourceTree = "<group>"; };
+		F5A8615A01FA022C0175ACA7 /* jdcoefct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdcoefct.c; sourceTree = "<group>"; };
+		F5A8615B01FA022C0175ACA7 /* jdcolor.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdcolor.c; sourceTree = "<group>"; };
+		F5A8615D01FA022C0175ACA7 /* jddctmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jddctmgr.c; sourceTree = "<group>"; };
+		F5A8615E01FA022C0175ACA7 /* jdhuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdhuff.c; sourceTree = "<group>"; };
+		F5A8616001FA022C0175ACA7 /* jdinput.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdinput.c; sourceTree = "<group>"; };
+		F5A8616101FA022C0175ACA7 /* jdmainct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmainct.c; sourceTree = "<group>"; };
+		F5A8616201FA022C0175ACA7 /* jdmarker.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmarker.c; sourceTree = "<group>"; };
+		F5A8616301FA022C0175ACA7 /* jdmaster.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmaster.c; sourceTree = "<group>"; };
+		F5A8616401FA022C0175ACA7 /* jdmerge.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmerge.c; sourceTree = "<group>"; };
+		F5A8616501FA022C0175ACA7 /* jdphuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdphuff.c; sourceTree = "<group>"; };
+		F5A8616601FA022C0175ACA7 /* jdpostct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdpostct.c; sourceTree = "<group>"; };
+		F5A8616701FA022C0175ACA7 /* jdsample.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdsample.c; sourceTree = "<group>"; };
+		F5A8616801FA022C0175ACA7 /* jdtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdtrans.c; sourceTree = "<group>"; };
+		F5A8616901FA022C0175ACA7 /* jerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jerror.c; sourceTree = "<group>"; };
+		F5A8616B01FA022C0175ACA7 /* jfdctflt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctflt.c; sourceTree = "<group>"; };
+		F5A8616C01FA022C0175ACA7 /* jfdctfst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctfst.c; sourceTree = "<group>"; };
+		F5A8616D01FA022C0175ACA7 /* jfdctint.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctint.c; sourceTree = "<group>"; };
+		F5A8616E01FA022C0175ACA7 /* jidctflt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctflt.c; sourceTree = "<group>"; };
+		F5A8616F01FA022C0175ACA7 /* jidctfst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctfst.c; sourceTree = "<group>"; };
+		F5A8617001FA022C0175ACA7 /* jidctint.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctint.c; sourceTree = "<group>"; };
+		F5A8617101FA022C0175ACA7 /* jidctred.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctred.c; sourceTree = "<group>"; };
+		F5A8617701FA022C0175ACA7 /* jmemmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jmemmgr.c; sourceTree = "<group>"; };
+		F5A8617901FA022C0175ACA7 /* jmemnobs.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jmemnobs.c; sourceTree = "<group>"; };
+		F5A8618D01FA022C0175ACA7 /* jquant1.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jquant1.c; sourceTree = "<group>"; };
+		F5A8618E01FA022C0175ACA7 /* jquant2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jquant2.c; sourceTree = "<group>"; };
+		F5A8618F01FA022C0175ACA7 /* jutils.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jutils.c; sourceTree = "<group>"; };
+		F5A8619A01FA022C0175ACA7 /* accel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = accel.cpp; sourceTree = "<group>"; };
+		F5A8619C01FA022C0175ACA7 /* app.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = app.cpp; sourceTree = "<group>"; };
+		F5A8619F01FA022C0175ACA7 /* bitmap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = bitmap.cpp; sourceTree = "<group>"; };
+		F5A861A001FA022C0175ACA7 /* bmpbuttn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = bmpbuttn.cpp; sourceTree = "<group>"; };
+		F5A861A101FA022C0175ACA7 /* brush.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = brush.cpp; sourceTree = "<group>"; };
+		F5A861A201FA022C0175ACA7 /* button.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = button.cpp; sourceTree = "<group>"; };
+		F5A861A401FA022C0175ACA7 /* checkbox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = checkbox.cpp; sourceTree = "<group>"; };
+		F5A861A501FA022C0175ACA7 /* checklst.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = checklst.cpp; sourceTree = "<group>"; };
+		F5A861A601FA022C0175ACA7 /* choice.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = choice.cpp; sourceTree = "<group>"; };
+		F5A861A701FA022C0175ACA7 /* clipbrd.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = clipbrd.cpp; sourceTree = "<group>"; };
+		F5A861A801FA022C0175ACA7 /* colordlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = colordlg.cpp; sourceTree = "<group>"; };
+		F5A861A901FA022C0175ACA7 /* colour.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = colour.cpp; sourceTree = "<group>"; };
+		F5A861AB01FA022C0175ACA7 /* control.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = control.cpp; sourceTree = "<group>"; };
+		F5A861AD01FA022C0175ACA7 /* cursor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cursor.cpp; sourceTree = "<group>"; };
+		F5A861AE01FA022C0175ACA7 /* data.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = data.cpp; sourceTree = "<group>"; };
+		F5A861AF01FA022C0175ACA7 /* dataobj.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dataobj.cpp; sourceTree = "<group>"; };
+		F5A861B001FA022C0175ACA7 /* dc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dc.cpp; sourceTree = "<group>"; };
+		F5A861B101FA022C0175ACA7 /* dcclient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dcclient.cpp; sourceTree = "<group>"; };
+		F5A861B201FA022C0175ACA7 /* dcmemory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dcmemory.cpp; sourceTree = "<group>"; };
+		F5A861B301FA022C0175ACA7 /* dcprint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dcprint.cpp; sourceTree = "<group>"; };
+		F5A861B401FA022C0175ACA7 /* dcscreen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dcscreen.cpp; sourceTree = "<group>"; };
+		F5A861B501FA022C0175ACA7 /* dialog.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dialog.cpp; sourceTree = "<group>"; };
+		F5A861B601FA022C0175ACA7 /* dirdlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dirdlg.cpp; sourceTree = "<group>"; };
+		F5A861B701FA022C0175ACA7 /* dirmac.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dirmac.cpp; sourceTree = "<group>"; };
+		F5A861B801FA022C0175ACA7 /* dnd.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dnd.cpp; sourceTree = "<group>"; };
+		F5A861B901FA022C0175ACA7 /* filedlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = filedlg.cpp; sourceTree = "<group>"; };
+		F5A861BB01FA022C0175ACA7 /* font.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = font.cpp; sourceTree = "<group>"; };
+		F5A861BC01FA022C0175ACA7 /* fontdlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fontdlg.cpp; sourceTree = "<group>"; };
+		F5A861BD01FA022C0175ACA7 /* fontenum.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fontenum.cpp; sourceTree = "<group>"; };
+		F5A861BE01FA022C0175ACA7 /* fontutil.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fontutil.cpp; sourceTree = "<group>"; };
+		F5A861BF01FA022C0175ACA7 /* frame.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = frame.cpp; sourceTree = "<group>"; };
+		F5A861C001FA022C0175ACA7 /* gauge.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gauge.cpp; sourceTree = "<group>"; };
+		F5A861C101FA022C0175ACA7 /* taskbar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = taskbar.cpp; sourceTree = "<group>"; };
+		F5A861C501FA022C0175ACA7 /* icon.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = icon.cpp; sourceTree = "<group>"; };
+		F5A861C701FA022C0175ACA7 /* listbox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = listbox.cpp; sourceTree = "<group>"; };
+		F5A861C801FA022C0175ACA7 /* macnotfy.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = macnotfy.cpp; sourceTree = "<group>"; };
+		F5A861CC01FA022C0175ACA7 /* mdi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = mdi.cpp; sourceTree = "<group>"; };
+		F5A861CD01FA022C0175ACA7 /* menu.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = menu.cpp; sourceTree = "<group>"; };
+		F5A861CE01FA022C0175ACA7 /* menuitem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = menuitem.cpp; sourceTree = "<group>"; };
+		F5A861CF01FA022C0175ACA7 /* metafile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = metafile.cpp; sourceTree = "<group>"; };
+		F5A861D001FA022C0175ACA7 /* mimetmac.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = mimetmac.cpp; sourceTree = "<group>"; };
+		F5A861D101FA022C0175ACA7 /* minifram.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = minifram.cpp; sourceTree = "<group>"; };
+		F5A861D301FA022C0175ACA7 /* DirectoryCopy.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = DirectoryCopy.c; sourceTree = "<group>"; };
+		F5A861D501FA022C0175ACA7 /* FileCopy.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = FileCopy.c; sourceTree = "<group>"; };
+		F5A861D701FA022C0175ACA7 /* FSpCompat.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = FSpCompat.c; sourceTree = "<group>"; };
+		F5A861D901FA022C0175ACA7 /* FullPath.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = FullPath.c; sourceTree = "<group>"; };
+		F5A861DB01FA022C0175ACA7 /* IterateDirectory.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = IterateDirectory.c; sourceTree = "<group>"; };
+		F5A861DD01FA022C0175ACA7 /* MoreDesktopMgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = MoreDesktopMgr.c; sourceTree = "<group>"; };
+		F5A861DF01FA022C0175ACA7 /* MoreFiles.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = MoreFiles.c; sourceTree = "<group>"; };
+		F5A861E101FA022C0175ACA7 /* MoreFilesExtras.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = MoreFilesExtras.c; sourceTree = "<group>"; };
+		F5A861E501FA022C0175ACA7 /* Search.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = Search.c; sourceTree = "<group>"; };
+		F5A861E701FA022C0175ACA7 /* msgdlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = msgdlg.cpp; sourceTree = "<group>"; };
+		F5A861E801FA022C0175ACA7 /* notebmac.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = notebmac.cpp; sourceTree = "<group>"; };
+		F5A861E901FA022C0175ACA7 /* palette.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = palette.cpp; sourceTree = "<group>"; };
+		F5A861EA01FA022C0175ACA7 /* pen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = pen.cpp; sourceTree = "<group>"; };
+		F5A861ED01FA022C0175ACA7 /* printdlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = printdlg.cpp; sourceTree = "<group>"; };
+		F5A861EE01FA022C0175ACA7 /* printmac.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = printmac.cpp; sourceTree = "<group>"; };
+		F5A861EF01FA022C0175ACA7 /* radiobox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = radiobox.cpp; sourceTree = "<group>"; };
+		F5A861F001FA022C0175ACA7 /* radiobut.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = radiobut.cpp; sourceTree = "<group>"; };
+		F5A861F101FA022C0175ACA7 /* region.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = region.cpp; sourceTree = "<group>"; };
+		F5A861F201FA022C0175ACA7 /* scrolbar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = scrolbar.cpp; sourceTree = "<group>"; };
+		F5A861F301FA022C0175ACA7 /* settings.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = settings.cpp; sourceTree = "<group>"; };
+		F5A861F401FA022C0175ACA7 /* slider.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = slider.cpp; sourceTree = "<group>"; };
+		F5A861F501FA022C0175ACA7 /* spinbutt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = spinbutt.cpp; sourceTree = "<group>"; };
+		F5A861F701FA022C0175ACA7 /* statbmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = statbmp.cpp; sourceTree = "<group>"; };
+		F5A861F801FA022C0175ACA7 /* statbox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = statbox.cpp; sourceTree = "<group>"; };
+		F5A861F901FA022C0175ACA7 /* statbrma.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = statbrma.cpp; sourceTree = "<group>"; };
+		F5A861FB01FA022C0175ACA7 /* statlmac.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = statlmac.cpp; sourceTree = "<group>"; };
+		F5A861FC01FA022C0175ACA7 /* stattext.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = stattext.cpp; sourceTree = "<group>"; };
+		F5A861FD01FA022C0175ACA7 /* tabctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tabctrl.cpp; sourceTree = "<group>"; };
+		F5A861FF01FA022C0175ACA7 /* textctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = textctrl.cpp; sourceTree = "<group>"; };
+		F5A8620101FA022C0175ACA7 /* timer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = timer.cpp; sourceTree = "<group>"; };
+		F5A8620201FA022C0175ACA7 /* toolbar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = toolbar.cpp; sourceTree = "<group>"; };
+		F5A8620301FA022C0175ACA7 /* tooltip.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tooltip.cpp; sourceTree = "<group>"; };
+		F5A8620401FA022C0175ACA7 /* toplevel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = toplevel.cpp; sourceTree = "<group>"; };
+		F5A8620601FA022C0175ACA7 /* uma.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = uma.cpp; sourceTree = "<group>"; };
+		F5A8620701FA022C0175ACA7 /* utils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = utils.cpp; sourceTree = "<group>"; };
+		F5A8620801FA022C0175ACA7 /* utilsexc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = utilsexc.cpp; sourceTree = "<group>"; };
+		F5A8620A01FA022C0175ACA7 /* window.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = window.cpp; sourceTree = "<group>"; };
+		F5A863BF01FA022D0175ACA7 /* png.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = png.c; sourceTree = "<group>"; };
+		F5A863C401FA022D0175ACA7 /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngerror.c; sourceTree = "<group>"; };
+		F5A863C501FA022D0175ACA7 /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngget.c; sourceTree = "<group>"; };
+		F5A863D101FA022D0175ACA7 /* pngmem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngmem.c; sourceTree = "<group>"; };
+		F5A863D201FA022D0175ACA7 /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngpread.c; sourceTree = "<group>"; };
+		F5A863D301FA022D0175ACA7 /* pngread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngread.c; sourceTree = "<group>"; };
+		F5A863D401FA022D0175ACA7 /* pngrio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngrio.c; sourceTree = "<group>"; };
+		F5A863D501FA022D0175ACA7 /* pngrtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngrtran.c; sourceTree = "<group>"; };
+		F5A863D601FA022D0175ACA7 /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngrutil.c; sourceTree = "<group>"; };
+		F5A863D701FA022D0175ACA7 /* pngset.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngset.c; sourceTree = "<group>"; };
+		F5A863D801FA022D0175ACA7 /* pngtest.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngtest.c; sourceTree = "<group>"; };
+		F5A863D901FA022D0175ACA7 /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngtrans.c; sourceTree = "<group>"; };
+		F5A863DA01FA022D0175ACA7 /* pngwio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngwio.c; sourceTree = "<group>"; };
+		F5A863DB01FA022D0175ACA7 /* pngwrite.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngwrite.c; sourceTree = "<group>"; };
+		F5A863DC01FA022D0175ACA7 /* pngwtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngwtran.c; sourceTree = "<group>"; };
+		F5A863DD01FA022D0175ACA7 /* pngwutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngwutil.c; sourceTree = "<group>"; };
+		F5A8642601FA022D0175ACA7 /* tif_aux.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_aux.c; sourceTree = "<group>"; };
+		F5A8642701FA022D0175ACA7 /* tif_close.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_close.c; sourceTree = "<group>"; };
+		F5A8642801FA022D0175ACA7 /* tif_codec.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_codec.c; sourceTree = "<group>"; };
+		F5A8642901FA022D0175ACA7 /* tif_compress.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_compress.c; sourceTree = "<group>"; };
+		F5A8642A01FA022D0175ACA7 /* tif_dir.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_dir.c; sourceTree = "<group>"; };
+		F5A8642C01FA022D0175ACA7 /* tif_dirinfo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_dirinfo.c; sourceTree = "<group>"; };
+		F5A8642D01FA022D0175ACA7 /* tif_dirread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_dirread.c; sourceTree = "<group>"; };
+		F5A8642E01FA022D0175ACA7 /* tif_dirwrite.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_dirwrite.c; sourceTree = "<group>"; };
+		F5A8642F01FA022D0175ACA7 /* tif_dumpmode.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_dumpmode.c; sourceTree = "<group>"; };
+		F5A8643001FA022D0175ACA7 /* tif_error.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_error.c; sourceTree = "<group>"; };
+		F5A8643101FA022D0175ACA7 /* tif_fax3.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_fax3.c; sourceTree = "<group>"; };
+		F5A8643301FA022D0175ACA7 /* tif_fax3sm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_fax3sm.c; sourceTree = "<group>"; };
+		F5A8643401FA022D0175ACA7 /* tif_flush.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_flush.c; sourceTree = "<group>"; };
+		F5A8643501FA022D0175ACA7 /* tif_getimage.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_getimage.c; sourceTree = "<group>"; };
+		F5A8643601FA022D0175ACA7 /* tif_jpeg.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_jpeg.c; sourceTree = "<group>"; };
+		F5A8643701FA022D0175ACA7 /* tif_luv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_luv.c; sourceTree = "<group>"; };
+		F5A8643801FA022D0175ACA7 /* tif_lzw.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_lzw.c; sourceTree = "<group>"; };
+		F5A8643A01FA022D0175ACA7 /* tif_next.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_next.c; sourceTree = "<group>"; };
+		F5A8643B01FA022D0175ACA7 /* tif_open.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_open.c; sourceTree = "<group>"; };
+		F5A8643D01FA022D0175ACA7 /* tif_packbits.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_packbits.c; sourceTree = "<group>"; };
+		F5A8643E01FA022D0175ACA7 /* tif_pixarlog.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_pixarlog.c; sourceTree = "<group>"; };
+		F5A8643F01FA022D0175ACA7 /* tif_predict.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_predict.c; sourceTree = "<group>"; };
+		F5A8644101FA022D0175ACA7 /* tif_print.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_print.c; sourceTree = "<group>"; };
+		F5A8644201FA022D0175ACA7 /* tif_read.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_read.c; sourceTree = "<group>"; };
+		F5A8644301FA022D0175ACA7 /* tif_strip.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_strip.c; sourceTree = "<group>"; };
+		F5A8644401FA022D0175ACA7 /* tif_swab.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_swab.c; sourceTree = "<group>"; };
+		F5A8644501FA022D0175ACA7 /* tif_thunder.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_thunder.c; sourceTree = "<group>"; };
+		F5A8644601FA022D0175ACA7 /* tif_tile.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_tile.c; sourceTree = "<group>"; };
+		F5A8644701FA022D0175ACA7 /* tif_unix.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_unix.c; sourceTree = "<group>"; };
+		F5A8644801FA022D0175ACA7 /* tif_version.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_version.c; sourceTree = "<group>"; };
+		F5A8644A01FA022D0175ACA7 /* tif_warning.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_warning.c; sourceTree = "<group>"; };
+		F5A8644D01FA022D0175ACA7 /* tif_write.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_write.c; sourceTree = "<group>"; };
+		F5A8644E01FA022D0175ACA7 /* tif_zip.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tif_zip.c; sourceTree = "<group>"; };
+		F5A8649201FA022D0175ACA7 /* snglinst.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = snglinst.cpp; sourceTree = "<group>"; };
+		F5A8649401FA022D0175ACA7 /* utilsunx.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = utilsunx.cpp; sourceTree = "<group>"; };
+		F5A8703A01FA0B7F0175ACA7 /* listimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = listimpl.cpp; path = ../include/wx/listimpl.cpp; sourceTree = SOURCE_ROOT; };
+		F5AC2EDC03803A3601000133 /* execcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = execcmn.cpp; sourceTree = "<group>"; };
+		F5AC2EDD03803A3601000133 /* radiocmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = radiocmn.cpp; sourceTree = "<group>"; };
+		F5AC2EDE03803A3601000133 /* settcmn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = settcmn.cpp; sourceTree = "<group>"; };
+		F5C5D3DF01FA2D0A01D0F0BA /* System.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = System.framework; path = /System/Library/Frameworks/System.framework; sourceTree = "<absolute>"; };
+		F5CC83D90379C17C01000133 /* artprov.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = artprov.h; sourceTree = "<group>"; };
+		F5CC83DA0379C17C01000133 /* build.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = build.h; sourceTree = "<group>"; };
+		F5CC83E80379C20901000133 /* thrimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = thrimpl.cpp; sourceTree = "<group>"; };
+		F5CC83E90379C20901000133 /* volume.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = volume.h; sourceTree = "<group>"; };
+		F5F5A69F02CDB27401000133 /* hashmap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = hashmap.cpp; path = common/hashmap.cpp; sourceTree = SOURCE_ROOT; };
+		F5F5A6A102CDB6CA01000133 /* artprov.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = artprov.cpp; path = common/artprov.cpp; sourceTree = SOURCE_ROOT; };
+		F5F5A6A202CDB6CA01000133 /* artstd.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = artstd.cpp; path = common/artstd.cpp; sourceTree = SOURCE_ROOT; };
+		F5F5A6A302CDB6CA01000133 /* iconbndl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = iconbndl.cpp; path = common/iconbndl.cpp; sourceTree = SOURCE_ROOT; };
+		F5F5A6A402CDB6CA01000133 /* imagfill.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = imagfill.cpp; path = common/imagfill.cpp; sourceTree = SOURCE_ROOT; };
+		F5FD822102CCECE601000133 /* setup.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = setup.h; path = build/include/wx/setup.h; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		4086C8C8063AB2FF00D4CD53 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				0A98CD2307172992007B4289 /* QuickTime.framework in Frameworks */,
+				408A597F0A8998750014D20E /* AGL.framework in Frameworks */,
+				408A59800A8998750014D20E /* OpenGL.framework in Frameworks */,
+				408A5A720A8999A00014D20E /* AppKit.framework in Frameworks */,
+				4054154F0AB6A0B000450E09 /* WebKit.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		4086CBDB063AB30000D4CD53 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				4086CBDC063AB30000D4CD53 /* Carbon.framework in Frameworks */,
+				4086CBDD063AB30000D4CD53 /* System.framework in Frameworks */,
+				4086CBDE063AB30000D4CD53 /* libz.dylib in Frameworks */,
+				405DD168063C2BFC00F579EE /* libiconv.dylib in Frameworks */,
+				0A98CD2507172992007B4289 /* QuickTime.framework in Frameworks */,
+				408A597D0A8998750014D20E /* AGL.framework in Frameworks */,
+				408A597E0A8998750014D20E /* OpenGL.framework in Frameworks */,
+				408A5A710A8999A00014D20E /* AppKit.framework in Frameworks */,
+				4054154E0AB6A0B000450E09 /* WebKit.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		034768DDFF38A45A11DB9C8B /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				4086C8CB063AB30000D4CD53 /* libwx_mac_static.a */,
+				4086CBE1063AB30000D4CD53 /* libwx_mac.dylib */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		0867D691FE84028FC02AAC07 /* wxWindows */ = {
+			isa = PBXGroup;
+			children = (
+				F5A85C1A01FA022A0175ACA7 /* include */,
+				F5A85FA901FA022B0175ACA7 /* src */,
+				0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
+				034768DDFF38A45A11DB9C8B /* Products */,
+			);
+			name = wxWindows;
+			sourceTree = "<group>";
+		};
+		0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
+			isa = PBXGroup;
+			children = (
+				408A59CC0A8999A00014D20E /* AppKit.framework */,
+				405415210AB6A0B000450E09 /* WebKit.framework */,
+				408A595D0A8998750014D20E /* AGL.framework */,
+				408A595E0A8998750014D20E /* OpenGL.framework */,
+				0A98CD2207172992007B4289 /* QuickTime.framework */,
+				08FB77AAFE841565C02AAC07 /* Carbon.framework */,
+				F5C5D3DF01FA2D0A01D0F0BA /* System.framework */,
+				F55E08F801FDF9CC01000133 /* libz.dylib */,
+				405DD167063C2BFC00F579EE /* libiconv.dylib */,
+			);
+			name = "External Frameworks and Libraries";
+			sourceTree = "<group>";
+		};
+		40670A8107377A3600F7C08C /* mac/corefoundation */ = {
+			isa = PBXGroup;
+			children = (
+				40670A8207377A6300F7C08C /* cfstring.cpp */,
+				40607C740749432A00DC0420 /* gsockosx.cpp */,
+				40AF90B307C8A9CF006A6D3C /* hid.cpp */,
+				40AF90B407C8A9CF006A6D3C /* hidjoystick.cpp */,
+				40670A8307377A6300F7C08C /* stdpaths_cf.cpp */,
+				40011CBB0893D5B400E4DE95 /* utilsexc_base.cpp */,
+				40607C750749432A00DC0420 /* utilsexc_cf.cpp */,
+			);
+			name = mac/corefoundation;
+			path = mac/carbon;
+			sourceTree = "<group>";
+		};
+		407C6AD60A899E260056252A /* aui */ = {
+			isa = PBXGroup;
+			children = (
+				407C6AD70A899E260056252A /* auibook.cpp */,
+				407C6AD90A899E260056252A /* dockart.cpp */,
+				407C6ADA0A899E260056252A /* floatpane.cpp */,
+				407C6ADB0A899E260056252A /* framemanager.cpp */,
+				407C6ADC0A899E260056252A /* tabmdi.cpp */,
+			);
+			path = aui;
+			sourceTree = "<group>";
+		};
+		4086C62E063AAD4A00D4CD53 /* regex */ = {
+			isa = PBXGroup;
+			children = (
+				4086C638063AAD4A00D4CD53 /* regcomp.c */,
+				4086C63B063AAD4A00D4CD53 /* regerror.c */,
+				4086C641063AAD4A00D4CD53 /* regexec.c */,
+				4086C643063AAD4A00D4CD53 /* regfree.c */,
+			);
+			path = regex;
+			sourceTree = "<group>";
+		};
+		40ADC35E08156DA90009DA36 /* xml */ = {
+			isa = PBXGroup;
+			children = (
+				40ADC44208156EDC0009DA36 /* xmlparse.c */,
+				40ADC44308156EDC0009DA36 /* xmlrole.c */,
+				40ADC44408156EDC0009DA36 /* xmltok.c */,
+				40ADC35F08156DC10009DA36 /* xml.cpp */,
+			);
+			name = xml;
+			sourceTree = "<group>";
+		};
+		40ADC36408156DCA0009DA36 /* xrc */ = {
+			isa = PBXGroup;
+			children = (
+				402AB27A0AFF567500C0D0C9 /* xh_animatctrl.cpp */,
+				4067EFC00ACD5306004A2D14 /* xh_bmpcbox.cpp */,
+				40ADC36508156DEB0009DA36 /* xh_bmp.cpp */,
+				40ADC36608156DEB0009DA36 /* xh_bmpbt.cpp */,
+				40ADC36708156DEB0009DA36 /* xh_bttn.cpp */,
+				40ADC36808156DEB0009DA36 /* xh_cald.cpp */,
+				40ADC36908156DEB0009DA36 /* xh_chckb.cpp */,
+				40ADC36A08156DEB0009DA36 /* xh_chckl.cpp */,
+				40ADC36B08156DEB0009DA36 /* xh_choic.cpp */,
+				40ADC36C08156DEB0009DA36 /* xh_choicbk.cpp */,
+				408A59B60A8999800014D20E /* xh_clrpicker.cpp */,
+				402AB27B0AFF567500C0D0C9 /* xh_collpane.cpp */,
+				40ADC36D08156DEB0009DA36 /* xh_combo.cpp */,
+				40ADC36E08156DEB0009DA36 /* xh_datectrl.cpp */,
+				408A59B70A8999800014D20E /* xh_dirpicker.cpp */,
+				40ADC36F08156DEB0009DA36 /* xh_dlg.cpp */,
+				408A59B80A8999800014D20E /* xh_filepicker.cpp */,
+				408A59B90A8999800014D20E /* xh_fontpicker.cpp */,
+				40ADC37008156DEB0009DA36 /* xh_frame.cpp */,
+				40ADC37108156DEB0009DA36 /* xh_gauge.cpp */,
+				40ADC37208156DEB0009DA36 /* xh_gdctl.cpp */,
+				409F026F0976CA5600D1030F /* xh_grid.cpp */,
+				40ADC37308156DEB0009DA36 /* xh_html.cpp */,
+				402AB27C0AFF567500C0D0C9 /* xh_htmllbox.cpp */,
+				408A59BA0A8999800014D20E /* xh_hyperlink.cpp */,
+				40ADC37408156DEB0009DA36 /* xh_listb.cpp */,
+				40ADC37508156DEB0009DA36 /* xh_listbk.cpp */,
+				40ADC37608156DEB0009DA36 /* xh_listc.cpp */,
+				40ADC37708156DEB0009DA36 /* xh_mdi.cpp */,
+				40ADC37808156DEB0009DA36 /* xh_menu.cpp */,
+				40ADC37908156DEB0009DA36 /* xh_notbk.cpp */,
+				408A59BB0A8999800014D20E /* xh_odcombo.cpp */,
+				40ADC37A08156DEB0009DA36 /* xh_panel.cpp */,
+				40ADC37B08156DEB0009DA36 /* xh_radbt.cpp */,
+				40ADC37C08156DEB0009DA36 /* xh_radbx.cpp */,
+				40ADC37D08156DEB0009DA36 /* xh_scrol.cpp */,
+				40ADC37E08156DEB0009DA36 /* xh_scwin.cpp */,
+				40ADC37F08156DEB0009DA36 /* xh_sizer.cpp */,
+				40ADC38008156DEB0009DA36 /* xh_slidr.cpp */,
+				40ADC38108156DEB0009DA36 /* xh_spin.cpp */,
+				40ADC38208156DEB0009DA36 /* xh_split.cpp */,
+				40ADC38308156DEB0009DA36 /* xh_statbar.cpp */,
+				40ADC38408156DEB0009DA36 /* xh_stbmp.cpp */,
+				40ADC38508156DEB0009DA36 /* xh_stbox.cpp */,
+				40ADC38608156DEB0009DA36 /* xh_stlin.cpp */,
+				40ADC38708156DEB0009DA36 /* xh_sttxt.cpp */,
+				40ADC38808156DEB0009DA36 /* xh_text.cpp */,
+				40ADC38908156DEB0009DA36 /* xh_tglbtn.cpp */,
+				40ADC38A08156DEB0009DA36 /* xh_toolb.cpp */,
+				40ADC38B08156DEB0009DA36 /* xh_tree.cpp */,
+				408A59BC0A8999800014D20E /* xh_treebk.cpp */,
+				40ADC38C08156DEB0009DA36 /* xh_unkwn.cpp */,
+				40ADC38D08156DEB0009DA36 /* xh_wizrd.cpp */,
+				40ADC38E08156DEB0009DA36 /* xmlres.cpp */,
+				40ADC38F08156DEB0009DA36 /* xmlrsall.cpp */,
+			);
+			name = xrc;
+			sourceTree = "<group>";
+		};
+		40F185B80AB722BC00E3BEF9 /* richtext */ = {
+			isa = PBXGroup;
+			children = (
+				40F185B90AB722BC00E3BEF9 /* richtextbuffer.cpp */,
+				40F185BA0AB722BC00E3BEF9 /* richtextctrl.cpp */,
+				404DB0DE0ADD36E800687775 /* richtextformatdlg.cpp */,
+				40F185BB0AB722BC00E3BEF9 /* richtexthtml.cpp */,
+				40F185BC0AB722BC00E3BEF9 /* richtextstyles.cpp */,
+				404DB2630ADD41B300687775 /* richtextsymboldlg.cpp */,
+				40F185BD0AB722BC00E3BEF9 /* richtextxml.cpp */,
+			);
+			path = richtext;
+			sourceTree = "<group>";
+		};
+		CADEF54203C8C0A800000133 /* morefilex */ = {
+			isa = PBXGroup;
+			children = (
+				CADEF54303C8C0A800000133 /* MoreFilesX.c */,
+			);
+			name = morefilex;
+			path = mac/carbon/morefilex;
+			sourceTree = SOURCE_ROOT;
+		};
+		F5A85C1A01FA022A0175ACA7 /* include */ = {
+			isa = PBXGroup;
+			children = (
+				F5A85C1C01FA022A0175ACA7 /* wx */,
+				40011F3B0897D8DF00E4DE95 /* setup0.h */,
+				F5FD822102CCECE601000133 /* setup.h */,
+			);
+			name = include;
+			path = ../include;
+			sourceTree = SOURCE_ROOT;
+		};
+		F5A85C1C01FA022A0175ACA7 /* wx */ = {
+			isa = PBXGroup;
+			children = (
+				F5A85C1E01FA022A0175ACA7 /* accel.h */,
+				F5A85C1F01FA022A0175ACA7 /* app.h */,
+				F5A85C2001FA022A0175ACA7 /* arrimpl.cpp */,
+				F5CC83D90379C17C01000133 /* artprov.h */,
+				F5A85C2101FA022A0175ACA7 /* bitmap.h */,
+				F5A85C2201FA022A0175ACA7 /* bmpbuttn.h */,
+				F5A85C2301FA022A0175ACA7 /* brush.h */,
+				F5A85C2401FA022A0175ACA7 /* buffer.h */,
+				F5CC83DA0379C17C01000133 /* build.h */,
+				F5A85C2501FA022A0175ACA7 /* busyinfo.h */,
+				F5A85C2601FA022A0175ACA7 /* button.h */,
+				F5A85C2701FA022A0175ACA7 /* calctrl.h */,
+				F5A85C2801FA022A0175ACA7 /* caret.h */,
+				F5A85C2901FA022A0175ACA7 /* checkbox.h */,
+				F5A85C2A01FA022A0175ACA7 /* checklst.h */,
+				F5A85C2B01FA022A0175ACA7 /* chkconf.h */,
+				F5A85C2C01FA022A0175ACA7 /* choicdlg.h */,
+				F5A85C2D01FA022A0175ACA7 /* choice.h */,
+				F5A85C2E01FA022A0175ACA7 /* clipbrd.h */,
+				F5A85C2F01FA022A0175ACA7 /* clntdata.h */,
+				F5A85C3001FA022A0175ACA7 /* cmdline.h */,
+				F5A85C3101FA022A0175ACA7 /* cmdproc.h */,
+				F5A85C3201FA022A0175ACA7 /* cmndata.h */,
+				F5A85C3301FA022A0175ACA7 /* colordlg.h */,
+				F5A85C3401FA022A0175ACA7 /* colour.h */,
+				F5A85C3501FA022A0175ACA7 /* combobox.h */,
+				F5A85C3601FA022A0175ACA7 /* confbase.h */,
+				F5A85C3701FA022A0175ACA7 /* config.h */,
+				F5A85C3801FA022A0175ACA7 /* containr.h */,
+				F5A85C3901FA022A0175ACA7 /* control.h */,
+				F5A85C3A01FA022A0175ACA7 /* cshelp.h */,
+				F5A85C3B01FA022A0175ACA7 /* ctrlsub.h */,
+				F5A85C3C01FA022A0175ACA7 /* cursor.h */,
+				F5A85C3D01FA022A0175ACA7 /* dataobj.h */,
+				F5A85C3F01FA022A0175ACA7 /* datetime.h */,
+				F5A85C4101FA022A0175ACA7 /* datstrm.h */,
+				F5A85C4201FA022A0175ACA7 /* db.h */,
+				F5A85C4301FA022A0175ACA7 /* dbgrid.h */,
+				F5A85C4401FA022A0175ACA7 /* dbkeyg.h */,
+				F5A85C4501FA022A0175ACA7 /* dbtable.h */,
+				F5A85C4601FA022A0175ACA7 /* dc.h */,
+				F5A85C4701FA022A0175ACA7 /* dcclient.h */,
+				F5A85C4801FA022A0175ACA7 /* dcmemory.h */,
+				F5A85C4901FA022A0175ACA7 /* dcprint.h */,
+				F5A85C4A01FA022A0175ACA7 /* dcps.h */,
+				F5A85C4B01FA022A0175ACA7 /* dcscreen.h */,
+				F5A85C4C01FA022A0175ACA7 /* dde.h */,
+				F5A85C4D01FA022A0175ACA7 /* debug.h */,
+				F5A85C4E01FA022A0175ACA7 /* defs.h */,
+				F5A85C4F01FA022A0175ACA7 /* dialog.h */,
+				F5A85C5001FA022A0175ACA7 /* dialup.h */,
+				F5A85C5101FA022A0175ACA7 /* dir.h */,
+				F5A85C5201FA022A0175ACA7 /* dirctrl.h */,
+				F5A85C5301FA022A0175ACA7 /* dirdlg.h */,
+				F5A85C5401FA022A0175ACA7 /* dnd.h */,
+				F5A85C5501FA022A0175ACA7 /* docmdi.h */,
+				F5A85C5601FA022A0175ACA7 /* docview.h */,
+				F5A85C5701FA022A0175ACA7 /* dragimag.h */,
+				F5A85C5801FA022A0175ACA7 /* dynarray.h */,
+				F5A85C5901FA022A0175ACA7 /* dynlib.h */,
+				F5A85C5A01FA022A0175ACA7 /* dynload.h */,
+				F5A85C5B01FA022A0175ACA7 /* effects.h */,
+				F5A85C5C01FA022A0175ACA7 /* encconv.h */,
+				F5A85C5D01FA022A0175ACA7 /* event.h */,
+				F5A85C5E01FA022A0175ACA7 /* evtloop.h */,
+				F5A85C6001FA022A0175ACA7 /* fdrepdlg.h */,
+				F5A85C6101FA022A0175ACA7 /* ffile.h */,
+				F5A85C6201FA022A0175ACA7 /* file.h */,
+				F5A85C6301FA022A0175ACA7 /* fileconf.h */,
+				F5A85C6401FA022A0175ACA7 /* filedlg.h */,
+				F5A85C6501FA022A0175ACA7 /* filefn.h */,
+				F5A85C6601FA022A0175ACA7 /* filename.h */,
+				F5A85C6701FA022A0175ACA7 /* filesys.h */,
+				F5A85C6801FA022A0175ACA7 /* font.h */,
+				F5A85C6901FA022A0175ACA7 /* fontdlg.h */,
+				F5A85C6A01FA022A0175ACA7 /* fontenc.h */,
+				F5A85C6B01FA022A0175ACA7 /* fontenum.h */,
+				F5A85C6C01FA022A0175ACA7 /* fontmap.h */,
+				F5A85C6D01FA022A0175ACA7 /* fontutil.h */,
+				F5A85C6E01FA022A0175ACA7 /* frame.h */,
+				F5A85C6F01FA022A0175ACA7 /* fs_inet.h */,
+				F5A85C7001FA022A0175ACA7 /* fs_mem.h */,
+				F5A85C7101FA022A0175ACA7 /* fs_zip.h */,
+				F5A85C7201FA022A0175ACA7 /* gauge.h */,
+				F5A85C7301FA022A0175ACA7 /* gdicmn.h */,
+				F5A85C7401FA022A0175ACA7 /* gdiobj.h */,
+				F5A85C7501FA022A0175ACA7 /* generic */,
+				F5A85CB001FA022A0175ACA7 /* geometry.h */,
+				F5A85CB101FA022A0175ACA7 /* gifdecod.h */,
+				F5A85CB201FA022A0175ACA7 /* glcanvas.h */,
+				F5A85CB301FA022A0175ACA7 /* grid.h */,
+				F5A85CB401FA022A0175ACA7 /* gsocket.h */,
+				F5A85CF901FA022B0175ACA7 /* hash.h */,
+				F5A85CFA01FA022B0175ACA7 /* help.h */,
+				F5A85CFB01FA022B0175ACA7 /* helpbase.h */,
+				F5A85CFC01FA022B0175ACA7 /* helphtml.h */,
+				F5A85CFD01FA022B0175ACA7 /* helpwin.h */,
+				F5A85CFF01FA022B0175ACA7 /* html */,
+				F5A85D2101FA022B0175ACA7 /* icon.h */,
+				F5A85D2201FA022B0175ACA7 /* imagbmp.h */,
+				F5A85D2301FA022B0175ACA7 /* image.h */,
+				F5A85D2401FA022B0175ACA7 /* imaggif.h */,
+				F5A85D2501FA022B0175ACA7 /* imagiff.h */,
+				F5A85D2601FA022B0175ACA7 /* imagjpeg.h */,
+				F5A85D2701FA022B0175ACA7 /* imaglist.h */,
+				F5A85D2801FA022B0175ACA7 /* imagpcx.h */,
+				F5A85D2901FA022B0175ACA7 /* imagpng.h */,
+				F5A85D2A01FA022B0175ACA7 /* imagpnm.h */,
+				F5A85D2B01FA022B0175ACA7 /* imagtiff.h */,
+				F5A85D2C01FA022B0175ACA7 /* imagxpm.h */,
+				F5A85D2D01FA022B0175ACA7 /* intl.h */,
+				F5A85D2E01FA022B0175ACA7 /* ioswrap.h */,
+				F5A85D2F01FA022B0175ACA7 /* ipcbase.h */,
+				F5A85D3001FA022B0175ACA7 /* isql.h */,
+				F5A85D3101FA022B0175ACA7 /* isqlext.h */,
+				F5A85D3201FA022B0175ACA7 /* joystick.h */,
+				F5A85D3301FA022B0175ACA7 /* layout.h */,
+				F5A85D3401FA022B0175ACA7 /* laywin.h */,
+				F5A85D3501FA022B0175ACA7 /* list.h */,
+				F5A85D3601FA022B0175ACA7 /* listbox.h */,
+				F5A85D3701FA022B0175ACA7 /* listctrl.h */,
+				F5A8703A01FA0B7F0175ACA7 /* listimpl.cpp */,
+				F5A85D3901FA022B0175ACA7 /* log.h */,
+				F5A85D3A01FA022B0175ACA7 /* longlong.h */,
+				F5A85D3B01FA022B0175ACA7 /* mac/carbon */,
+				F5A85D8E01FA022B0175ACA7 /* matrix.h */,
+				F5A85D8F01FA022B0175ACA7 /* mdi.h */,
+				F5A85D9001FA022B0175ACA7 /* memconf.h */,
+				F5A85D9101FA022B0175ACA7 /* memory.h */,
+				F5A85D9201FA022B0175ACA7 /* memtext.h */,
+				F5A85D9301FA022B0175ACA7 /* menu.h */,
+				F5A85D9401FA022B0175ACA7 /* menuitem.h */,
+				F5A85D9501FA022B0175ACA7 /* metafile.h */,
+				F5A85DAD01FA022B0175ACA7 /* mimetype.h */,
+				F5A85DAE01FA022B0175ACA7 /* minifram.h */,
+				F5A85DAF01FA022B0175ACA7 /* module.h */,
+				F5A85DF101FA022B0175ACA7 /* msgdlg.h */,
+				F5A85DF201FA022B0175ACA7 /* mstream.h */,
+				F5A85E9701FA022B0175ACA7 /* notebook.h */,
+				F5A85E9801FA022B0175ACA7 /* object.h */,
+				F5A85EFF01FA022B0175ACA7 /* ownerdrw.h */,
+				F5A85F0001FA022B0175ACA7 /* palette.h */,
+				F5A85F0101FA022B0175ACA7 /* panel.h */,
+				F5A85F0201FA022B0175ACA7 /* paper.h */,
+				F5A85F0301FA022B0175ACA7 /* pen.h */,
+				F5A85F0401FA022B0175ACA7 /* platform.h */,
+				F5A85F0501FA022B0175ACA7 /* popupwin.h */,
+				F5A85F0601FA022B0175ACA7 /* print.h */,
+				F5A85F0701FA022B0175ACA7 /* printdlg.h */,
+				F5A85F0801FA022B0175ACA7 /* prntbase.h */,
+				F5A85F0901FA022B0175ACA7 /* process.h */,
+				F5A85F0A01FA022B0175ACA7 /* progdlg.h */,
+				F5A85F0E01FA022B0175ACA7 /* protocol */,
+				F5A85F1401FA022B0175ACA7 /* quantize.h */,
+				F5A85F1501FA022B0175ACA7 /* radiobox.h */,
+				F5A85F1601FA022B0175ACA7 /* radiobut.h */,
+				F5A85F1701FA022B0175ACA7 /* regex.h */,
+				F5A85F1801FA022B0175ACA7 /* region.h */,
+				F5A85F1A01FA022B0175ACA7 /* sashwin.h */,
+				F5A85F1B01FA022B0175ACA7 /* sckaddr.h */,
+				F5A85F1C01FA022B0175ACA7 /* sckipc.h */,
+				F5A85F1D01FA022B0175ACA7 /* sckstrm.h */,
+				F5A85F1E01FA022B0175ACA7 /* scrolbar.h */,
+				F5A85F1F01FA022B0175ACA7 /* scrolwin.h */,
+				F5A85F2001FA022B0175ACA7 /* settings.h */,
+				F5A85F2201FA022B0175ACA7 /* sizer.h */,
+				F5A85F2301FA022B0175ACA7 /* slider.h */,
+				F5A85F2401FA022B0175ACA7 /* snglinst.h */,
+				F5A85F2501FA022B0175ACA7 /* socket.h */,
+				F5A85F2701FA022B0175ACA7 /* spinbutt.h */,
+				F5A85F2801FA022B0175ACA7 /* spinctrl.h */,
+				F5A85F2901FA022B0175ACA7 /* splash.h */,
+				F5A85F2A01FA022B0175ACA7 /* splitter.h */,
+				F5A85F2B01FA022B0175ACA7 /* stack.h */,
+				F5A85F2C01FA022B0175ACA7 /* statbmp.h */,
+				F5A85F2D01FA022B0175ACA7 /* statbox.h */,
+				F5A85F3001FA022B0175ACA7 /* statusbr.h */,
+				F5A85F2E01FA022B0175ACA7 /* statline.h */,
+				F5A85F2F01FA022B0175ACA7 /* stattext.h */,
+				F5A85F3101FA022B0175ACA7 /* strconv.h */,
+				F5A85F3201FA022B0175ACA7 /* stream.h */,
+				F5A85F3301FA022B0175ACA7 /* string.h */,
+				F5A85F3401FA022B0175ACA7 /* sysopt.h */,
+				F5A85F3501FA022B0175ACA7 /* tab.h */,
+				F5A85F3601FA022B0175ACA7 /* tabctrl.h */,
+				F5A85F3701FA022B0175ACA7 /* taskbar.h */,
+				F5A85F3801FA022B0175ACA7 /* tbarbase.h */,
+				F5A85F3A01FA022B0175ACA7 /* textbuf.h */,
+				F5A85F3B01FA022B0175ACA7 /* textctrl.h */,
+				F5A85F3C01FA022B0175ACA7 /* textdlg.h */,
+				F5A85F3D01FA022B0175ACA7 /* textfile.h */,
+				F5A85F3E01FA022B0175ACA7 /* tglbtn.h */,
+				F5A85F3F01FA022B0175ACA7 /* thread.h */,
+				F5CC83E80379C20901000133 /* thrimpl.cpp */,
+				F5A85F4101FA022B0175ACA7 /* timer.h */,
+				F5A85F4201FA022B0175ACA7 /* tipdlg.h */,
+				F5A85F4301FA022B0175ACA7 /* tipwin.h */,
+				F5A85F4401FA022B0175ACA7 /* tokenzr.h */,
+				F5A85F4501FA022B0175ACA7 /* toolbar.h */,
+				F5A85F4601FA022B0175ACA7 /* tooltip.h */,
+				F5A85F4701FA022B0175ACA7 /* toplevel.h */,
+				F5A85F4801FA022B0175ACA7 /* treebase.h */,
+				F5A85F4901FA022B0175ACA7 /* treectrl.h */,
+				F5A85F4B01FA022B0175ACA7 /* txtstrm.h */,
+				F5A85F4C01FA022B0175ACA7 /* types.h */,
+				F5A85F7301FA022B0175ACA7 /* unix */,
+				F5A85F7901FA022B0175ACA7 /* url.h */,
+				F5A85F7A01FA022B0175ACA7 /* utils.h */,
+				F5A85F7B01FA022B0175ACA7 /* valgen.h */,
+				F5A85F7C01FA022B0175ACA7 /* validate.h */,
+				F5A85F7D01FA022B0175ACA7 /* valtext.h */,
+				F5A85F7E01FA022B0175ACA7 /* variant.h */,
+				F5A85F7F01FA022B0175ACA7 /* vector.h */,
+				F5A85F8001FA022B0175ACA7 /* version.h */,
+				F5CC83E90379C20901000133 /* volume.h */,
+				F5A85F8201FA022B0175ACA7 /* wave.h */,
+				F5A85F8301FA022B0175ACA7 /* wfstream.h */,
+				F5A85F8401FA022B0175ACA7 /* window.h */,
+				F5A85F8501FA022B0175ACA7 /* wizard.h */,
+				F5A85F8601FA022B0175ACA7 /* wx.h */,
+				F5A85F8D01FA022B0175ACA7 /* wxchar.h */,
+				F5A85F8F01FA022B0175ACA7 /* wxhtml.h */,
+				F5A85F9001FA022B0175ACA7 /* wxprec.h */,
+				F5A85F9101FA022B0175ACA7 /* xpmdecod.h */,
+				F5A85F9201FA022B0175ACA7 /* xpmhand.h */,
+				F5A85F9301FA022B0175ACA7 /* zipstrm.h */,
+				F5A85F9401FA022B0175ACA7 /* zstream.h */,
+			);
+			path = wx;
+			sourceTree = "<group>";
+		};
+		F5A85C7501FA022A0175ACA7 /* generic */ = {
+			isa = PBXGroup;
+			children = (
+				F5A85C7701FA022A0175ACA7 /* accel.h */,
+				F5A85C7801FA022A0175ACA7 /* calctrl.h */,
+				F5A85C7901FA022A0175ACA7 /* caret.h */,
+				F5A85C7A01FA022A0175ACA7 /* choicdgg.h */,
+				F5A85C7B01FA022A0175ACA7 /* colrdlgg.h */,
+				F5A85C7D01FA022A0175ACA7 /* dcpsg.h */,
+				F5A85C8001FA022A0175ACA7 /* dirctrlg.h */,
+				F5A85C8101FA022A0175ACA7 /* dirdlgg.h */,
+				F5A85C8201FA022A0175ACA7 /* dragimgg.h */,
+				F5A85C8501FA022A0175ACA7 /* fdrepdlg.h */,
+				F5A85C8601FA022A0175ACA7 /* filedlgg.h */,
+				F5A85C8801FA022A0175ACA7 /* fontdlgg.h */,
+				F5A85C8901FA022A0175ACA7 /* grid.h */,
+				F5A85C8A01FA022A0175ACA7 /* gridctrl.h */,
+				F5A85C8C01FA022A0175ACA7 /* gridsel.h */,
+				F5A85C8D01FA022A0175ACA7 /* helpext.h */,
+				F5A85C9201FA022A0175ACA7 /* imaglist.h */,
+				F5A85C9401FA022A0175ACA7 /* laywin.h */,
+				F5A85C9501FA022A0175ACA7 /* listctrl.h */,
+				F5A85C9701FA022A0175ACA7 /* msgdlgg.h */,
+				F5A85C9901FA022A0175ACA7 /* notebook.h */,
+				F5A85C9A01FA022A0175ACA7 /* paletteg.h */,
+				F5A85C9B01FA022A0175ACA7 /* panelg.h */,
+				F5A85C9C01FA022A0175ACA7 /* printps.h */,
+				F5A85C9D01FA022A0175ACA7 /* prntdlgg.h */,
+				F5A85C9E01FA022A0175ACA7 /* progdlgg.h */,
+				F5A85CA101FA022A0175ACA7 /* sashwin.h */,
+				F5A85CA201FA022A0175ACA7 /* scrolwin.h */,
+				F5A85CA301FA022A0175ACA7 /* spinctlg.h */,
+				F5A85CA401FA022A0175ACA7 /* splash.h */,
+				F5A85CA501FA022A0175ACA7 /* splitter.h */,
+				F5A85CA601FA022A0175ACA7 /* statline.h */,
+				F5A85CA701FA022A0175ACA7 /* statusbr.h */,
+				F5A85CA801FA022A0175ACA7 /* tabg.h */,
+				F5A85CA901FA022A0175ACA7 /* textdlgg.h */,
+				F5A85CAC01FA022A0175ACA7 /* treectlg.h */,
+				F5A85CAF01FA022A0175ACA7 /* wizard.h */,
+			);
+			path = generic;
+			sourceTree = "<group>";
+		};
+		F5A85CFF01FA022B0175ACA7 /* html */ = {
+			isa = PBXGroup;
+			children = (
+				F5A85D0101FA022B0175ACA7 /* forcelnk.h */,
+				F5A85D0201FA022B0175ACA7 /* helpctrl.h */,
+				F5A85D0301FA022B0175ACA7 /* helpdata.h */,
+				43DFF59B09926B080033000B /* helpdlg.h */,
+				F5A85D0401FA022B0175ACA7 /* helpfrm.h */,
+				43DFF59C09926B080033000B /* helpwnd.h */,
+				F5A85D0501FA022B0175ACA7 /* htmlcell.h */,
+				F5A85D0601FA022B0175ACA7 /* htmldefs.h */,
+				F5A85D0701FA022B0175ACA7 /* htmlfilt.h */,
+				F5A85D0801FA022B0175ACA7 /* htmlpars.h */,
+				F5A85D0901FA022B0175ACA7 /* htmlproc.h */,
+				F5A85D0A01FA022B0175ACA7 /* htmltag.h */,
+				F5A85D0B01FA022B0175ACA7 /* htmlwin.h */,
+				F5A85D0C01FA022B0175ACA7 /* htmprint.h */,
+				F5A85D0D01FA022B0175ACA7 /* m_templ.h */,
+				F5A85D2001FA022B0175ACA7 /* winpars.h */,
+			);
+			path = html;
+			sourceTree = "<group>";
+		};
+		F5A85D3B01FA022B0175ACA7 /* mac/carbon */ = {
+			isa = PBXGroup;
+			children = (
+				F5A85D3C01FA022B0175ACA7 /* accel.h */,
+				F5A85D3D01FA022B0175ACA7 /* aga.h */,
+				F5A85D3E01FA022B0175ACA7 /* app.h */,
+				F5A85D3F01FA022B0175ACA7 /* bitmap.h */,
+				F5A85D4001FA022B0175ACA7 /* bmpbuttn.h */,
+				F5A85D4101FA022B0175ACA7 /* brush.h */,
+				F5A85D4201FA022B0175ACA7 /* button.h */,
+				F5A85D4301FA022B0175ACA7 /* checkbox.h */,
+				F5A85D4401FA022B0175ACA7 /* checklst.h */,
+				F5A85D4501FA022B0175ACA7 /* choice.h */,
+				F5A85D4601FA022B0175ACA7 /* clipbrd.h */,
+				F5A85D4701FA022B0175ACA7 /* colordlg.h */,
+				F5A85D4801FA022B0175ACA7 /* colour.h */,
+				F5A85D4901FA022B0175ACA7 /* combobox.h */,
+				F5A85D4A01FA022B0175ACA7 /* control.h */,
+				F5A85D4B01FA022B0175ACA7 /* cursor.h */,
+				F5A85D4C01FA022B0175ACA7 /* dataform.h */,
+				F5A85D4D01FA022B0175ACA7 /* dataobj.h */,
+				F5A85D4E01FA022B0175ACA7 /* dataobj2.h */,
+				F5A85D4F01FA022B0175ACA7 /* dc.h */,
+				F5A85D5001FA022B0175ACA7 /* dcclient.h */,
+				F5A85D5101FA022B0175ACA7 /* dcmemory.h */,
+				F5A85D5201FA022B0175ACA7 /* dcprint.h */,
+				F5A85D5301FA022B0175ACA7 /* dcscreen.h */,
+				F5A85D5401FA022B0175ACA7 /* dialog.h */,
+				F5A85D5501FA022B0175ACA7 /* dirdlg.h */,
+				CADEF54C03C8C11300000133 /* display.h */,
+				F5A85D5601FA022B0175ACA7 /* dnd.h */,
+				F5A85D5701FA022B0175ACA7 /* filedlg.h */,
+				F5A85D5801FA022B0175ACA7 /* font.h */,
+				F5A85D5901FA022B0175ACA7 /* fontdlg.h */,
+				F5A85D5A01FA022B0175ACA7 /* frame.h */,
+				F5A85D5B01FA022B0175ACA7 /* gauge.h */,
+				F5A85D5C01FA022B0175ACA7 /* gdiobj.h */,
+				F5A85D5D01FA022B0175ACA7 /* glcanvas.h */,
+				F5A85D5E01FA022B0175ACA7 /* gsockmac.h */,
+				F5A85D6001FA022B0175ACA7 /* icon.h */,
+				F5A85D6101FA022B0175ACA7 /* imaglist.h */,
+				F5A85D6201FA022B0175ACA7 /* joystick.h */,
+				F5A85D6301FA022B0175ACA7 /* listbox.h */,
+				F5A85D6401FA022B0175ACA7 /* listctrl.h */,
+				F5A85D6501FA022B0175ACA7 /* macnotfy.h */,
+				F5A85D6601FA022B0175ACA7 /* macsock.h */,
+				F5A85D6701FA022B0175ACA7 /* mdi.h */,
+				F5A85D6801FA022B0175ACA7 /* menu.h */,
+				F5A85D6901FA022B0175ACA7 /* menuitem.h */,
+				F5A85D6A01FA022B0175ACA7 /* metafile.h */,
+				F5A85D6B01FA022B0175ACA7 /* mimetype.h */,
+				F5A85D6C01FA022B0175ACA7 /* minifram.h */,
+				F5A85D6D01FA022B0175ACA7 /* msgdlg.h */,
+				F5A85D6E01FA022B0175ACA7 /* notebook.h */,
+				F5A85D6F01FA022B0175ACA7 /* palette.h */,
+				F5A85D7001FA022B0175ACA7 /* pen.h */,
+				F5A85D7101FA022B0175ACA7 /* pnghand.h */,
+				F5A85D7201FA022B0175ACA7 /* pngread.h */,
+				F5A85D7401FA022B0175ACA7 /* printdlg.h */,
+				F5A85D7501FA022B0175ACA7 /* printmac.h */,
+				F5A85D7601FA022B0175ACA7 /* private.h */,
+				F5A85D7701FA022B0175ACA7 /* radiobox.h */,
+				F5A85D7801FA022B0175ACA7 /* radiobut.h */,
+				F5A85D7901FA022B0175ACA7 /* region.h */,
+				F5A85D7A01FA022B0175ACA7 /* scrolbar.h */,
+				F5A85D7C01FA022B0175ACA7 /* slider.h */,
+				F5A85D7D01FA022B0175ACA7 /* spinbutt.h */,
+				F5A85D7E01FA022B0175ACA7 /* statbmp.h */,
+				F5A85D7F01FA022B0175ACA7 /* statbox.h */,
+				F5A85D8001FA022B0175ACA7 /* statline.h */,
+				F5A85D8101FA022B0175ACA7 /* stattext.h */,
+				F5A85D8201FA022B0175ACA7 /* statusbr.h */,
+				F5A85D8301FA022B0175ACA7 /* tabctrl.h */,
+				F5A85D8501FA022B0175ACA7 /* textctrl.h */,
+				F5A85D8601FA022B0175ACA7 /* timer.h */,
+				F5A85D8701FA022B0175ACA7 /* toolbar.h */,
+				F5A85D8801FA022B0175ACA7 /* tooltip.h */,
+				F5A85D8901FA022B0175ACA7 /* toplevel.h */,
+				F5A85D8A01FA022B0175ACA7 /* treectrl.h */,
+				F5A85D8B01FA022B0175ACA7 /* uma.h */,
+				F5A85D8D01FA022B0175ACA7 /* window.h */,
+			);
+			path = mac/carbon;
+			sourceTree = "<group>";
+		};
+		F5A85F0E01FA022B0175ACA7 /* protocol */ = {
+			isa = PBXGroup;
+			children = (
+				F5A85F1001FA022B0175ACA7 /* file.h */,
+				F5A85F1101FA022B0175ACA7 /* ftp.h */,
+				F5A85F1201FA022B0175ACA7 /* http.h */,
+				F5A85F1301FA022B0175ACA7 /* protocol.h */,
+			);
+			path = protocol;
+			sourceTree = "<group>";
+		};
+		F5A85F7301FA022B0175ACA7 /* unix */ = {
+			isa = PBXGroup;
+			children = (
+				F5A85F7501FA022B0175ACA7 /* execute.h */,
+				F5A85F7601FA022B0175ACA7 /* fontutil.h */,
+				F5A85F7701FA022B0175ACA7 /* gsockunx.h */,
+				F5A85F7801FA022B0175ACA7 /* mimetype.h */,
+			);
+			path = unix;
+			sourceTree = "<group>";
+		};
+		F5A85FA901FA022B0175ACA7 /* src */ = {
+			isa = PBXGroup;
+			children = (
+				407C6AD60A899E260056252A /* aui */,
+				F5A85FDD01FA022B0175ACA7 /* common */,
+				F5A8606E01FA022C0175ACA7 /* generic */,
+				F5A860F101FA022C0175ACA7 /* html */,
+				F5A8613E01FA022C0175ACA7 /* jpeg */,
+				40670A8107377A3600F7C08C /* mac/corefoundation */,
+				F5A8619901FA022C0175ACA7 /* mac/carbon */,
+				F5A863AB01FA022C0175ACA7 /* png */,
+				4086C62E063AAD4A00D4CD53 /* regex */,
+				40F185B80AB722BC00E3BEF9 /* richtext */,
+				F5A8641801FA022D0175ACA7 /* tiff */,
+				F5A8648A01FA022D0175ACA7 /* unix */,
+				40ADC35E08156DA90009DA36 /* xml */,
+				40ADC36408156DCA0009DA36 /* xrc */,
+			);
+			name = src;
+			sourceTree = SOURCE_ROOT;
+		};
+		F5A85FDD01FA022B0175ACA7 /* common */ = {
+			isa = PBXGroup;
+			children = (
+				402AB2540AFF554A00C0D0C9 /* arcall.cpp */,
+				402AB2550AFF554A00C0D0C9 /* arcfind.cpp */,
+				CA0CB57B0450773900000102 /* accesscmn.cpp */,
+				404DAEDA0ADD13E600687775 /* anidecod.cpp */,
+				404DAEDB0ADD13E600687775 /* animatecmn.cpp */,
+				CA60175604D43A2700000080 /* appbase.cpp */,
+				F5A85FDF01FA022B0175ACA7 /* appcmn.cpp */,
+				40607C1407493C3F00DC0420 /* archive.cpp */,
+				F5F5A6A102CDB6CA01000133 /* artprov.cpp */,
+				F5F5A6A202CDB6CA01000133 /* artstd.cpp */,
+				F5A85FE101FA022B0175ACA7 /* bmpbase.cpp */,
+				CA8CC832050EE2BD00000080 /* bookctrl.cpp */,
+				F5A85FE201FA022B0175ACA7 /* choiccmn.cpp */,
+				F5A85FE301FA022B0175ACA7 /* clipcmn.cpp */,
+				F5A85FE401FA022B0175ACA7 /* clntdata.cpp */,
+				408A599F0A89992F0014D20E /* clrpickercmn.cpp */,
+				F5A85FE501FA022B0175ACA7 /* cmdline.cpp */,
+				F5A85FE601FA022B0175ACA7 /* cmdproc.cpp */,
+				F5A85FE701FA022B0175ACA7 /* cmndata.cpp */,
+				40F017380A30683F00AC9076 /* colourcmn.cpp */,
+				408A59A00A89992F0014D20E /* combocmn.cpp */,
+				F5A85FE801FA022B0175ACA7 /* config.cpp */,
+				F5A85FE901FA022B0175ACA7 /* containr.cpp */,
+				40F017390A30683F00AC9076 /* convauto.cpp */,
+				F5A85FEA01FA022B0175ACA7 /* cshelp.cpp */,
+				F5A85FEB01FA022B0175ACA7 /* ctrlcmn.cpp */,
+				F5A85FEC01FA022B0175ACA7 /* ctrlsub.cpp */,
+				CA0CB57C0450773900000102 /* datacmn.cpp */,
+				405415540AB6A0D900450E09 /* datavcmn.cpp */,
+				F5A85FEF01FA022B0175ACA7 /* datetime.cpp */,
+				F5A85FF001FA022B0175ACA7 /* datstrm.cpp */,
+				F5A85FF401FA022B0175ACA7 /* dcbase.cpp */,
+				404DB2710ADD429D00687775 /* dcbufcmn.cpp */,
+				402AB2560AFF554A00C0D0C9 /* dcgraph.cpp */,
+				F5A85FF101FA022B0175ACA7 /* db.cpp */,
+				CA60175904D43A5400000080 /* dbgrid.cpp */,
+				F5A85FF301FA022B0175ACA7 /* dbtable.cpp */,
+				40ADC34908156AE40009DA36 /* debugrpt.cpp */,
+				F5A85FF601FA022B0175ACA7 /* dircmn.cpp */,
+				F5A85FF701FA022B0175ACA7 /* dlgcmn.cpp */,
+				F5A85FF801FA022B0175ACA7 /* dndcmn.cpp */,
+				F5A85FF901FA022B0175ACA7 /* dobjcmn.cpp */,
+				F5A85FFA01FA022B0175ACA7 /* docmdi.cpp */,
+				F5A85FFB01FA022B0175ACA7 /* docview.cpp */,
+				CA0CB57D0450773900000102 /* dpycmn.cpp */,
+				F5A85FFE01FA022B0175ACA7 /* dseldlg.cpp */,
+				F5A85FFF01FA022B0175ACA7 /* dynarray.cpp */,
+				F5A8600001FA022B0175ACA7 /* dynlib.cpp */,
+				F5A8600101FA022B0175ACA7 /* dynload.cpp */,
+				F5A8600201FA022B0175ACA7 /* effects.cpp */,
+				F5A8600301FA022B0175ACA7 /* encconv.cpp */,
+				F5A8600401FA022B0175ACA7 /* event.cpp */,
+				40CDE8D00982505E00E8156D /* evtloopcmn.cpp */,
+				F5AC2EDC03803A3601000133 /* execcmn.cpp */,
+				F5A8600501FA022B0175ACA7 /* extended.c */,
+				F5A8600601FA022B0175ACA7 /* fddlgcmn.cpp */,
+				F5A8600701FA022B0175ACA7 /* ffile.cpp */,
+				F5A8600801FA022B0175ACA7 /* file.cpp */,
+				F5A8600901FA022B0175ACA7 /* fileconf.cpp */,
+				402AB2570AFF554A00C0D0C9 /* fileback.cpp */,
+				F5A8600A01FA022B0175ACA7 /* filefn.cpp */,
+				F5A8600B01FA022B0175ACA7 /* filename.cpp */,
+				408A59A10A89992F0014D20E /* filepickercmn.cpp */,
+				F5A8600C01FA022B0175ACA7 /* filesys.cpp */,
+				402AB2580AFF554A00C0D0C9 /* filtall.cpp */,
+				402AB2590AFF554A00C0D0C9 /* filtfind.cpp */,
+				CA60175C04D43A8100000080 /* fldlgcmn.cpp */,
+				CA60175D04D43A8100000080 /* fmapbase.cpp */,
+				F5A8600D01FA022B0175ACA7 /* fontcmn.cpp */,
+				40F017410A306C7600AC9076 /* fontenumcmn.cpp */,
+				F5A8600E01FA022B0175ACA7 /* fontmap.cpp */,
+				408A59A20A89992F0014D20E /* fontpickercmn.cpp */,
+				F5A8600F01FA022B0175ACA7 /* framecmn.cpp */,
+				402AB25A0AFF554A00C0D0C9 /* fs_arc.cpp */,
+				402AB25B0AFF554A00C0D0C9 /* fs_filter.cpp */,
+				F5A8601001FA022B0175ACA7 /* fs_inet.cpp */,
+				F5A8601101FA022B0175ACA7 /* fs_mem.cpp */,
+				F5A8601301FA022B0175ACA7 /* ftp.cpp */,
+				F5A8601401FA022B0175ACA7 /* gaugecmn.cpp */,
+				40670A9307377B1000F7C08C /* gbsizer.cpp */,
+				F5A8601501FA022B0175ACA7 /* gdicmn.cpp */,
+				F5A8601601FA022B0175ACA7 /* geometry.cpp */,
+				F5A8601701FA022B0175ACA7 /* gifdecod.cpp */,
+				4067EF240ACD43BC004A2D14 /* graphcmn.cpp */,
+				F5A8601901FA022B0175ACA7 /* hash.cpp */,
+				F5F5A69F02CDB27401000133 /* hashmap.cpp */,
+				F5A8601A01FA022B0175ACA7 /* helpbase.cpp */,
+				F5A8601B01FA022B0175ACA7 /* http.cpp */,
+				F5F5A6A302CDB6CA01000133 /* iconbndl.cpp */,
+				F5A8601C01FA022B0175ACA7 /* imagall.cpp */,
+				F5A8601D01FA022B0175ACA7 /* imagbmp.cpp */,
+				F5A8601E01FA022B0175ACA7 /* image.cpp */,
+				F5F5A6A402CDB6CA01000133 /* imagfill.cpp */,
+				F5A8601F01FA022B0175ACA7 /* imaggif.cpp */,
+				F5A8602001FA022B0175ACA7 /* imagiff.cpp */,
+				F5A8602101FA022B0175ACA7 /* imagjpeg.cpp */,
+				F5A8602201FA022B0175ACA7 /* imagpcx.cpp */,
+				F5A8602301FA022B0175ACA7 /* imagpng.cpp */,
+				F5A8602401FA022B0175ACA7 /* imagpnm.cpp */,
+				402AB42A0AFF574600C0D0C9 /* imagtga.cpp */,
+				F5A8602501FA022B0175ACA7 /* imagtiff.cpp */,
+				F5A8602601FA022B0175ACA7 /* imagxpm.cpp */,
+				CA60176904D43BF100000080 /* init.cpp */,
+				F5A8602801FA022B0175ACA7 /* intl.cpp */,
+				F5A8602901FA022B0175ACA7 /* ipcbase.cpp */,
+				F5A8602A01FA022B0175ACA7 /* layout.cpp */,
+				F5A8602B01FA022B0175ACA7 /* lboxcmn.cpp */,
+				F5A8602E01FA022B0175ACA7 /* list.cpp */,
+				403F73970AC9986E00FF2BCB /* listctrlcmn.cpp */,
+				F5A8602F01FA022B0175ACA7 /* log.cpp */,
+				F5A8603001FA022B0175ACA7 /* longlong.cpp */,
+				F5A8603101FA022B0175ACA7 /* matrix.cpp */,
+				40AF909007C8A926006A6D3C /* mediactrlcmn.cpp */,
+				F5A8603201FA022B0175ACA7 /* memory.cpp */,
+				F5A8603301FA022B0175ACA7 /* menucmn.cpp */,
+				F5A8603401FA022B0175ACA7 /* mimecmn.cpp */,
+				F5A8603501FA022B0175ACA7 /* module.cpp */,
+				F58E04FD02F11FA701A8020C /* msgout.cpp */,
+				F5A8603601FA022B0175ACA7 /* mstream.cpp */,
+				F5A8603701FA022B0175ACA7 /* nbkbase.cpp */,
+				F5A8603801FA022B0175ACA7 /* object.cpp */,
+				402AB25C0AFF554A00C0D0C9 /* overlaycmn.cpp */,
+				F5A8603A01FA022B0175ACA7 /* paper.cpp */,
+				408A59A30A89992F0014D20E /* pickerbase.cpp */,
+				40AEF28B0AB5EC0800B2C19A /* platinfo.cpp */,
+				F5A8603D01FA022C0175ACA7 /* popupcmn.cpp */,
+				408A59A40A89992F0014D20E /* powercmn.cpp */,
+				F5A8603E01FA022C0175ACA7 /* prntbase.cpp */,
+				F5A8603F01FA022C0175ACA7 /* process.cpp */,
+				F5A8604001FA022C0175ACA7 /* protocol.cpp */,
+				F5A8604101FA022C0175ACA7 /* quantize.cpp */,
+				F5AC2EDD03803A3601000133 /* radiocmn.cpp */,
+				F5A8604301FA022C0175ACA7 /* regex.cpp */,
+				CA89578504D7052700000080 /* rendcmn.cpp */,
+				CA0CB57E0450773900000102 /* rgncmn.cpp */,
+				F5A8604601FA022C0175ACA7 /* sckaddr.cpp */,
+				F5A8604701FA022C0175ACA7 /* sckfile.cpp */,
+				F5A8604801FA022C0175ACA7 /* sckipc.cpp */,
+				F5A8604901FA022C0175ACA7 /* sckstrm.cpp */,
+				F5AC2EDE03803A3601000133 /* settcmn.cpp */,
+				F5A8604A01FA022C0175ACA7 /* sizer.cpp */,
+				F5A8604B01FA022C0175ACA7 /* socket.cpp */,
+				40670A9407377B1000F7C08C /* sstream.cpp */,
+				0A98CB6A07146A06007B4289 /* statbar.cpp */,
+				40670A9507377B1000F7C08C /* stdpbase.cpp */,
+				F5A8604C01FA022C0175ACA7 /* stockitem.cpp */,
+				CA60175E04D43A8100000080 /* stopwatch.cpp */,
+				F5A8604D01FA022C0175ACA7 /* strconv.cpp */,
+				F5A8604E01FA022C0175ACA7 /* stream.cpp */,
+				F5A8604F01FA022C0175ACA7 /* string.cpp */,
+				F5A8605001FA022C0175ACA7 /* sysopt.cpp */,
+				402AB25D0AFF554A00C0D0C9 /* tarstrm.cpp */,
+				CA0CB57F0450773900000102 /* taskbarcmn.cpp */,
+				F5A8605101FA022C0175ACA7 /* tbarbase.cpp */,
+				F5A8605201FA022C0175ACA7 /* textbuf.cpp */,
+				F5A8605301FA022C0175ACA7 /* textcmn.cpp */,
+				F5A8605401FA022C0175ACA7 /* textfile.cpp */,
+				F5A8605501FA022C0175ACA7 /* timercmn.cpp */,
+				F5A8605601FA022C0175ACA7 /* tokenzr.cpp */,
+				F5A8605701FA022C0175ACA7 /* toplvcmn.cpp */,
+				F5A8605801FA022C0175ACA7 /* treebase.cpp */,
+				F5A8605901FA022C0175ACA7 /* txtstrm.cpp */,
+				40670A9607377B1000F7C08C /* uri.cpp */,
+				F5A8605D01FA022C0175ACA7 /* url.cpp */,
+				F5A8605E01FA022C0175ACA7 /* utilscmn.cpp */,
+				F5A8605F01FA022C0175ACA7 /* valgen.cpp */,
+				F5A8606001FA022C0175ACA7 /* validate.cpp */,
+				F5A8606101FA022C0175ACA7 /* valtext.cpp */,
+				F5A8606201FA022C0175ACA7 /* variant.cpp */,
+				F5A8606301FA022C0175ACA7 /* wfstream.cpp */,
+				F5A8606401FA022C0175ACA7 /* wincmn.cpp */,
+				F5A8606501FA022C0175ACA7 /* wxchar.cpp */,
+				CA8CC823050E6CD800000080 /* xti.cpp */,
+				CA8CC824050E6CD800000080 /* xtistrm.cpp */,
+				CA8CC825050E6CD800000080 /* xtixml.cpp */,
+				F5A8606701FA022C0175ACA7 /* xpmdecod.cpp */,
+				F5A8606801FA022C0175ACA7 /* zipstrm.cpp */,
+				F5A8606901FA022C0175ACA7 /* zstream.cpp */,
+			);
+			path = common;
+			sourceTree = "<group>";
+		};
+		F5A8606E01FA022C0175ACA7 /* generic */ = {
+			isa = PBXGroup;
+			children = (
+				404DAEEA0ADD143200687775 /* aboutdlgg.cpp */,
+				404DAED60ADD138E00687775 /* animateg.cpp */,
+				4067EFC40ACD53B1004A2D14 /* bmpcboxg.cpp */,
+				408A59820A8998A40014D20E /* buttonbar.cpp */,
+				F5A8607001FA022C0175ACA7 /* busyinfo.cpp */,
+				F5A8607101FA022C0175ACA7 /* calctrl.cpp */,
+				F5A8607201FA022C0175ACA7 /* caret.cpp */,
+				40ADC47208160C200009DA36 /* choicbkg.cpp */,
+				F5A8607301FA022C0175ACA7 /* choicdgg.cpp */,
+				408A598C0A8998DA0014D20E /* clrpickerg.cpp */,
+				F5A8607401FA022C0175ACA7 /* colrdlgg.cpp */,
+				402AB2750AFF55E300C0D0C9 /* collpaneg.cpp */,
+				408A59B20A8999500014D20E /* combog.cpp */,
+				4054137C0AB69C9300450E09 /* datavgen.cpp */,
+				40AF909507C8A976006A6D3C /* datectlg.cpp */,
+				40ADC48608160CAD0009DA36 /* dbgrptg.cpp */,
+				F5A8607501FA022C0175ACA7 /* dcpsg.cpp */,
+				F5A8607701FA022C0175ACA7 /* dirctrlg.cpp */,
+				F5A8607801FA022C0175ACA7 /* dirdlgg.cpp */,
+				F5A8607901FA022C0175ACA7 /* dragimgg.cpp */,
+				F5A8607A01FA022C0175ACA7 /* fdrepdlg.cpp */,
+				40AF909607C8A976006A6D3C /* filedlgg.cpp */,
+				408A598D0A8998DA0014D20E /* filepickerg.cpp */,
+				F5A8607C01FA022C0175ACA7 /* fontdlgg.cpp */,
+				408A598E0A8998DA0014D20E /* fontpickerg.cpp */,
+				F5A8607D01FA022C0175ACA7 /* grid.cpp */,
+				F5A8607E01FA022C0175ACA7 /* gridctrl.cpp */,
+				F5A8608001FA022C0175ACA7 /* gridsel.cpp */,
+				F5A8608101FA022C0175ACA7 /* helpext.cpp */,
+				40AF909707C8A976006A6D3C /* htmllbox.cpp */,
+				408A598F0A8998DA0014D20E /* hyperlink.cpp */,
+				F5A8608601FA022C0175ACA7 /* laywin.cpp */,
+				40ADC47308160C200009DA36 /* listbkg.cpp */,
+				F5A8608701FA022C0175ACA7 /* listctrl.cpp */,
+				F5A8608801FA022C0175ACA7 /* logg.cpp */,
+				F5A8608B01FA022C0175ACA7 /* numdlgg.cpp */,
+				408A59900A8998DA0014D20E /* odcombo.cpp */,
+				F5A8608D01FA022C0175ACA7 /* panelg.cpp */,
+				F5A8608E01FA022C0175ACA7 /* printps.cpp */,
+				F5A8608F01FA022C0175ACA7 /* prntdlgg.cpp */,
+				F5A8609001FA022C0175ACA7 /* progdlgg.cpp */,
+				400EDEB2089D4FFD00E848D9 /* propdlg.cpp */,
+				CA60176C04D43CAA00000080 /* renderg.cpp */,
+				F5A8609401FA022C0175ACA7 /* sashwin.cpp */,
+				F5A8609501FA022C0175ACA7 /* scrlwing.cpp */,
+				CA60176D04D43CAA00000080 /* selstore.cpp */,
+				F5A8609701FA022C0175ACA7 /* splash.cpp */,
+				F5A8609801FA022C0175ACA7 /* splitter.cpp */,
+				F5A8609A01FA022C0175ACA7 /* statusbr.cpp */,
+				F5A8609B01FA022C0175ACA7 /* tabg.cpp */,
+				F5A8609D01FA022C0175ACA7 /* textdlgg.cpp */,
+				F5A8609E01FA022C0175ACA7 /* tipdlg.cpp */,
+				F5A8609F01FA022C0175ACA7 /* tipwin.cpp */,
+				408A59830A8998A40014D20E /* toolbkg.cpp */,
+				408A59840A8998A40014D20E /* treebkg.cpp */,
+				F5A860A001FA022C0175ACA7 /* treectlg.cpp */,
+				40AF909907C8A976006A6D3C /* vlbox.cpp */,
+				40AF909A07C8A976006A6D3C /* vscroll.cpp */,
+				F5A860A201FA022C0175ACA7 /* wizard.cpp */,
+			);
+			path = generic;
+			sourceTree = "<group>";
+		};
+		F5A860F101FA022C0175ACA7 /* html */ = {
+			isa = PBXGroup;
+			children = (
+				40FF2B0C0869B1530013E961 /* webkit.mm */,
+				40AF90C207C8AA17006A6D3C /* chm.cpp */,
+				F5A8610401FA022C0175ACA7 /* helpctrl.cpp */,
+				F5A8610501FA022C0175ACA7 /* helpdata.cpp */,
+				43DFF5B809926F7B0033000B /* helpdlg.cpp */,
+				F5A8610601FA022C0175ACA7 /* helpfrm.cpp */,
+				43DFF5B909926F7B0033000B /* helpwnd.cpp */,
+				F5A8610701FA022C0175ACA7 /* htmlcell.cpp */,
+				F5A8610801FA022C0175ACA7 /* htmlfilt.cpp */,
+				F5A8610901FA022C0175ACA7 /* htmlpars.cpp */,
+				F5A8610A01FA022C0175ACA7 /* htmltag.cpp */,
+				F5A8610B01FA022C0175ACA7 /* htmlwin.cpp */,
+				F5A8610C01FA022C0175ACA7 /* htmprint.cpp */,
+				F5A8610D01FA022C0175ACA7 /* m_dflist.cpp */,
+				F5A8610E01FA022C0175ACA7 /* m_fonts.cpp */,
+				F5A8610F01FA022C0175ACA7 /* m_hline.cpp */,
+				F5A8611001FA022C0175ACA7 /* m_image.cpp */,
+				F5A8611101FA022C0175ACA7 /* m_layout.cpp */,
+				F5A8611201FA022C0175ACA7 /* m_links.cpp */,
+				F5A8611301FA022C0175ACA7 /* m_list.cpp */,
+				F5A8611501FA022C0175ACA7 /* m_pre.cpp */,
+				CA89578904D705D700000080 /* m_style.cpp */,
+				F5A8611601FA022C0175ACA7 /* m_tables.cpp */,
+				F5A8611701FA022C0175ACA7 /* winpars.cpp */,
+			);
+			path = html;
+			sourceTree = "<group>";
+		};
+		F5A8613E01FA022C0175ACA7 /* jpeg */ = {
+			isa = PBXGroup;
+			children = (
+				F5A8614301FA022C0175ACA7 /* jcapimin.c */,
+				F5A8614401FA022C0175ACA7 /* jcapistd.c */,
+				F5A8614501FA022C0175ACA7 /* jccoefct.c */,
+				F5A8614601FA022C0175ACA7 /* jccolor.c */,
+				F5A8614701FA022C0175ACA7 /* jcdctmgr.c */,
+				F5A8614801FA022C0175ACA7 /* jchuff.c */,
+				F5A8614A01FA022C0175ACA7 /* jcinit.c */,
+				F5A8614B01FA022C0175ACA7 /* jcmainct.c */,
+				F5A8614C01FA022C0175ACA7 /* jcmarker.c */,
+				F5A8614D01FA022C0175ACA7 /* jcmaster.c */,
+				F5A8614E01FA022C0175ACA7 /* jcomapi.c */,
+				F5A8615101FA022C0175ACA7 /* jcparam.c */,
+				F5A8615201FA022C0175ACA7 /* jcphuff.c */,
+				F5A8615301FA022C0175ACA7 /* jcprepct.c */,
+				F5A8615401FA022C0175ACA7 /* jcsample.c */,
+				F5A8615501FA022C0175ACA7 /* jctrans.c */,
+				F5A8615601FA022C0175ACA7 /* jdapimin.c */,
+				F5A8615701FA022C0175ACA7 /* jdapistd.c */,
+				F5A8615801FA022C0175ACA7 /* jdatadst.c */,
+				F5A8615901FA022C0175ACA7 /* jdatasrc.c */,
+				F5A8615A01FA022C0175ACA7 /* jdcoefct.c */,
+				F5A8615B01FA022C0175ACA7 /* jdcolor.c */,
+				F5A8615D01FA022C0175ACA7 /* jddctmgr.c */,
+				F5A8615E01FA022C0175ACA7 /* jdhuff.c */,
+				F5A8616001FA022C0175ACA7 /* jdinput.c */,
+				F5A8616101FA022C0175ACA7 /* jdmainct.c */,
+				F5A8616201FA022C0175ACA7 /* jdmarker.c */,
+				F5A8616301FA022C0175ACA7 /* jdmaster.c */,
+				F5A8616401FA022C0175ACA7 /* jdmerge.c */,
+				F5A8616501FA022C0175ACA7 /* jdphuff.c */,
+				F5A8616601FA022C0175ACA7 /* jdpostct.c */,
+				F5A8616701FA022C0175ACA7 /* jdsample.c */,
+				F5A8616801FA022C0175ACA7 /* jdtrans.c */,
+				F5A8616901FA022C0175ACA7 /* jerror.c */,
+				F5A8616B01FA022C0175ACA7 /* jfdctflt.c */,
+				F5A8616C01FA022C0175ACA7 /* jfdctfst.c */,
+				F5A8616D01FA022C0175ACA7 /* jfdctint.c */,
+				F5A8616E01FA022C0175ACA7 /* jidctflt.c */,
+				F5A8616F01FA022C0175ACA7 /* jidctfst.c */,
+				F5A8617001FA022C0175ACA7 /* jidctint.c */,
+				F5A8617101FA022C0175ACA7 /* jidctred.c */,
+				F5A8617701FA022C0175ACA7 /* jmemmgr.c */,
+				F5A8617901FA022C0175ACA7 /* jmemnobs.c */,
+				F5A8618D01FA022C0175ACA7 /* jquant1.c */,
+				F5A8618E01FA022C0175ACA7 /* jquant2.c */,
+				F5A8618F01FA022C0175ACA7 /* jutils.c */,
+			);
+			path = jpeg;
+			sourceTree = "<group>";
+		};
+		F5A8619901FA022C0175ACA7 /* mac/carbon */ = {
+			isa = PBXGroup;
+			children = (
+				404DAED30ADD137500687775 /* aboutdlg.cpp */,
+				F5A8619A01FA022C0175ACA7 /* accel.cpp */,
+				F5A8619C01FA022C0175ACA7 /* app.cpp */,
+				F5A861A201FA022C0175ACA7 /* button.cpp */,
+				F5A8619F01FA022C0175ACA7 /* bitmap.cpp */,
+				F5A861A001FA022C0175ACA7 /* bmpbuttn.cpp */,
+				F5A861A101FA022C0175ACA7 /* brush.cpp */,
+				F5A861A401FA022C0175ACA7 /* checkbox.cpp */,
+				F5A861A501FA022C0175ACA7 /* checklst.cpp */,
+				F5A861A601FA022C0175ACA7 /* choice.cpp */,
+				F5A861A701FA022C0175ACA7 /* clipbrd.cpp */,
+				F5A861A801FA022C0175ACA7 /* colordlg.cpp */,
+				40AF90E207C8B18C006A6D3C /* colordlgosx.mm */,
+				F5A861A901FA022C0175ACA7 /* colour.cpp */,
+				40AF913507C8BD1F006A6D3C /* combobox.cpp */,
+				F5A861AB01FA022C0175ACA7 /* control.cpp */,
+				F5A861AD01FA022C0175ACA7 /* cursor.cpp */,
+				F5A861AE01FA022C0175ACA7 /* data.cpp */,
+				F5A861AF01FA022C0175ACA7 /* dataobj.cpp */,
+				F5A861B001FA022C0175ACA7 /* dc.cpp */,
+				40AF90E407C8B18C006A6D3C /* dccg.cpp */,
+				F5A861B101FA022C0175ACA7 /* dcclient.cpp */,
+				F5A861B201FA022C0175ACA7 /* dcmemory.cpp */,
+				F5A861B301FA022C0175ACA7 /* dcprint.cpp */,
+				F5A861B401FA022C0175ACA7 /* dcscreen.cpp */,
+				F5A861B501FA022C0175ACA7 /* dialog.cpp */,
+				F5A861B601FA022C0175ACA7 /* dirdlg.cpp */,
+				F5A861B701FA022C0175ACA7 /* dirmac.cpp */,
+				CADEF54103C8C0A800000133 /* display.cpp */,
+				F5A861B801FA022C0175ACA7 /* dnd.cpp */,
+				40AF90E507C8B18C006A6D3C /* drawer.cpp */,
+				40CDE8D9098250AB00E8156D /* evtloop.cpp */,
+				F5A861B901FA022C0175ACA7 /* filedlg.cpp */,
+				F5A861BB01FA022C0175ACA7 /* font.cpp */,
+				F5A861BC01FA022C0175ACA7 /* fontdlg.cpp */,
+				40AF90E607C8B18C006A6D3C /* fontdlgosx.mm */,
+				F5A861BD01FA022C0175ACA7 /* fontenum.cpp */,
+				F5A861BE01FA022C0175ACA7 /* fontutil.cpp */,
+				F5A861BF01FA022C0175ACA7 /* frame.cpp */,
+				F5A861C001FA022C0175ACA7 /* gauge.cpp */,
+				0A98CC470715CFBC007B4289 /* gdiobj.cpp */,
+				4086C59F063AA5C700D4CD53 /* glcanvas.cpp */,
+				4067EFC80ACD53ED004A2D14 /* graphics.cpp */,
+				F5A861C501FA022C0175ACA7 /* icon.cpp */,
+				401640E507F94B2800A8837A /* imaglist.cpp */,
+				F5A861C701FA022C0175ACA7 /* listbox.cpp */,
+				403F73940AC9985500FF2BCB /* listctrl_mac.cpp */,
+				F5A861C801FA022C0175ACA7 /* macnotfy.cpp */,
+				40AF90E807C8B18C006A6D3C /* mediactrl.cpp */,
+				F5A861CC01FA022C0175ACA7 /* mdi.cpp */,
+				F5A861CD01FA022C0175ACA7 /* menu.cpp */,
+				F5A861CE01FA022C0175ACA7 /* menuitem.cpp */,
+				F5A861CF01FA022C0175ACA7 /* metafile.cpp */,
+				F5A861D001FA022C0175ACA7 /* mimetmac.cpp */,
+				F5A861D101FA022C0175ACA7 /* minifram.cpp */,
+				F5A861D201FA022C0175ACA7 /* morefile */,
+				CADEF54203C8C0A800000133 /* morefilex */,
+				F5A861E701FA022C0175ACA7 /* msgdlg.cpp */,
+				F5A861E801FA022C0175ACA7 /* notebmac.cpp */,
+				402AB2720AFF55AF00C0D0C9 /* overlay.cpp */,
+				F5A861E901FA022C0175ACA7 /* palette.cpp */,
+				F5A861EA01FA022C0175ACA7 /* pen.cpp */,
+				F5A861ED01FA022C0175ACA7 /* printdlg.cpp */,
+				F5A861EE01FA022C0175ACA7 /* printmac.cpp */,
+				F5A861EF01FA022C0175ACA7 /* radiobox.cpp */,
+				F5A861F001FA022C0175ACA7 /* radiobut.cpp */,
+				F5A861F101FA022C0175ACA7 /* region.cpp */,
+				CA60176504D43AE200000080 /* renderer.cpp */,
+				F5A861F201FA022C0175ACA7 /* scrolbar.cpp */,
+				F5A861F301FA022C0175ACA7 /* settings.cpp */,
+				F5A861F401FA022C0175ACA7 /* slider.cpp */,
+				4086C3A2063A454900D4CD53 /* sound.cpp */,
+				F5A861F501FA022C0175ACA7 /* spinbutt.cpp */,
+				407A90F6065742ED00F01665 /* spinctrl.cpp */,
+				F5A861F701FA022C0175ACA7 /* statbmp.cpp */,
+				F5A861F801FA022C0175ACA7 /* statbox.cpp */,
+				F5A861F901FA022C0175ACA7 /* statbrma.cpp */,
+				F5A861FB01FA022C0175ACA7 /* statlmac.cpp */,
+				F5A861FC01FA022C0175ACA7 /* stattext.cpp */,
+				F5A861FD01FA022C0175ACA7 /* tabctrl.cpp */,
+				F5A861C101FA022C0175ACA7 /* taskbar.cpp */,
+				F5A861FF01FA022C0175ACA7 /* textctrl.cpp */,
+				40F10E5606AD0230003C7AC3 /* tglbtn.cpp */,
+				40F10E5706AD0230003C7AC3 /* thread.cpp */,
+				F5A8620101FA022C0175ACA7 /* timer.cpp */,
+				F5A8620201FA022C0175ACA7 /* toolbar.cpp */,
+				F5A8620301FA022C0175ACA7 /* tooltip.cpp */,
+				F5A8620401FA022C0175ACA7 /* toplevel.cpp */,
+				F5A8620601FA022C0175ACA7 /* uma.cpp */,
+				F5A8620701FA022C0175ACA7 /* utils.cpp */,
+				F5A8620801FA022C0175ACA7 /* utilsexc.cpp */,
+				F5A8620A01FA022C0175ACA7 /* window.cpp */,
+			);
+			path = mac/carbon;
+			sourceTree = "<group>";
+		};
+		F5A861D201FA022C0175ACA7 /* morefile */ = {
+			isa = PBXGroup;
+			children = (
+				F5A861D301FA022C0175ACA7 /* DirectoryCopy.c */,
+				F5A861D501FA022C0175ACA7 /* FileCopy.c */,
+				F5A861D701FA022C0175ACA7 /* FSpCompat.c */,
+				F5A861D901FA022C0175ACA7 /* FullPath.c */,
+				F5A861DB01FA022C0175ACA7 /* IterateDirectory.c */,
+				F5A861DD01FA022C0175ACA7 /* MoreDesktopMgr.c */,
+				F5A861DF01FA022C0175ACA7 /* MoreFiles.c */,
+				F5A861E101FA022C0175ACA7 /* MoreFilesExtras.c */,
+				F5A861E501FA022C0175ACA7 /* Search.c */,
+			);
+			path = morefile;
+			sourceTree = "<group>";
+		};
+		F5A863AB01FA022C0175ACA7 /* png */ = {
+			isa = PBXGroup;
+			children = (
+				F5A863BF01FA022D0175ACA7 /* png.c */,
+				F5A863C401FA022D0175ACA7 /* pngerror.c */,
+				F5A863C501FA022D0175ACA7 /* pngget.c */,
+				F5A863D101FA022D0175ACA7 /* pngmem.c */,
+				F5A863D201FA022D0175ACA7 /* pngpread.c */,
+				F5A863D301FA022D0175ACA7 /* pngread.c */,
+				F5A863D401FA022D0175ACA7 /* pngrio.c */,
+				F5A863D501FA022D0175ACA7 /* pngrtran.c */,
+				F5A863D601FA022D0175ACA7 /* pngrutil.c */,
+				F5A863D701FA022D0175ACA7 /* pngset.c */,
+				F5A863D801FA022D0175ACA7 /* pngtest.c */,
+				F5A863D901FA022D0175ACA7 /* pngtrans.c */,
+				F5A863DA01FA022D0175ACA7 /* pngwio.c */,
+				F5A863DB01FA022D0175ACA7 /* pngwrite.c */,
+				F5A863DC01FA022D0175ACA7 /* pngwtran.c */,
+				F5A863DD01FA022D0175ACA7 /* pngwutil.c */,
+			);
+			path = png;
+			sourceTree = "<group>";
+		};
+		F5A8641801FA022D0175ACA7 /* tiff */ = {
+			isa = PBXGroup;
+			children = (
+				F5A8642601FA022D0175ACA7 /* tif_aux.c */,
+				F5A8642701FA022D0175ACA7 /* tif_close.c */,
+				F5A8642801FA022D0175ACA7 /* tif_codec.c */,
+				40AF915007C8C912006A6D3C /* tif_color.c */,
+				F5A8642901FA022D0175ACA7 /* tif_compress.c */,
+				F5A8642A01FA022D0175ACA7 /* tif_dir.c */,
+				F5A8642C01FA022D0175ACA7 /* tif_dirinfo.c */,
+				F5A8642D01FA022D0175ACA7 /* tif_dirread.c */,
+				F5A8642E01FA022D0175ACA7 /* tif_dirwrite.c */,
+				F5A8642F01FA022D0175ACA7 /* tif_dumpmode.c */,
+				F5A8643001FA022D0175ACA7 /* tif_error.c */,
+				40AF915107C8C912006A6D3C /* tif_extension.c */,
+				F5A8643101FA022D0175ACA7 /* tif_fax3.c */,
+				F5A8643301FA022D0175ACA7 /* tif_fax3sm.c */,
+				F5A8643401FA022D0175ACA7 /* tif_flush.c */,
+				F5A8643501FA022D0175ACA7 /* tif_getimage.c */,
+				F5A8643601FA022D0175ACA7 /* tif_jpeg.c */,
+				F5A8643701FA022D0175ACA7 /* tif_luv.c */,
+				F5A8643801FA022D0175ACA7 /* tif_lzw.c */,
+				F5A8643A01FA022D0175ACA7 /* tif_next.c */,
+				F5A8643B01FA022D0175ACA7 /* tif_open.c */,
+				F5A8643D01FA022D0175ACA7 /* tif_packbits.c */,
+				F5A8643E01FA022D0175ACA7 /* tif_pixarlog.c */,
+				F5A8643F01FA022D0175ACA7 /* tif_predict.c */,
+				F5A8644101FA022D0175ACA7 /* tif_print.c */,
+				F5A8644201FA022D0175ACA7 /* tif_read.c */,
+				F5A8644301FA022D0175ACA7 /* tif_strip.c */,
+				F5A8644401FA022D0175ACA7 /* tif_swab.c */,
+				F5A8644501FA022D0175ACA7 /* tif_thunder.c */,
+				F5A8644601FA022D0175ACA7 /* tif_tile.c */,
+				F5A8644701FA022D0175ACA7 /* tif_unix.c */,
+				F5A8644801FA022D0175ACA7 /* tif_version.c */,
+				F5A8644A01FA022D0175ACA7 /* tif_warning.c */,
+				F5A8644D01FA022D0175ACA7 /* tif_write.c */,
+				F5A8644E01FA022D0175ACA7 /* tif_zip.c */,
+			);
+			path = tiff;
+			sourceTree = "<group>";
+		};
+		F5A8648A01FA022D0175ACA7 /* unix */ = {
+			isa = PBXGroup;
+			children = (
+				CA60177204D43D2300000080 /* baseunix.cpp */,
+				40AF90BD07C8AA08006A6D3C /* dlunix.cpp */,
+				40DCE34F06C744C90000D83E /* gsocket.cpp */,
+				F5A8649201FA022D0175ACA7 /* snglinst.cpp */,
+				40ECB139074BD1D0005AAC48 /* stdpaths.cpp */,
+				F5A8649401FA022D0175ACA7 /* utilsunx.cpp */,
+			);
+			path = unix;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		4086C744063AB2FF00D4CD53 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				4086C745063AB2FF00D4CD53 /* setup.h in Headers */,
+				40011F3D0897D8DF00E4DE95 /* setup0.h in Headers */,
+				43DFF59D09926B080033000B /* helpdlg.h in Headers */,
+				43DFF59E09926B080033000B /* helpwnd.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		4086CA57063AB30000D4CD53 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				4086CA58063AB30000D4CD53 /* setup.h in Headers */,
+				40011F3C0897D8DF00E4DE95 /* setup0.h in Headers */,
+				43DFF59F09926B080033000B /* helpdlg.h in Headers */,
+				43DFF5A009926B080033000B /* helpwnd.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		4086C742063AB2FF00D4CD53 /* static */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 18B5B98A08564B5D002803C9 /* Build configuration list for PBXNativeTarget "static" */;
+			buildPhases = (
+				409E9DD5065140690091DE7E /* CopyFiles */,
+				4086C744063AB2FF00D4CD53 /* Headers */,
+				4086C746063AB2FF00D4CD53 /* Sources */,
+				4086C8C8063AB2FF00D4CD53 /* Frameworks */,
+				4086C8C9063AB2FF00D4CD53 /* Rez */,
+			);
+			buildRules = (
+				40EEBF1E08BE1E8B000BD0A5 /* PBXBuildRule */,
+			);
+			dependencies = (
+			);
+			name = static;
+			productName = "wx library";
+			productReference = 4086C8CB063AB30000D4CD53 /* libwx_mac_static.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		4086CA55063AB30000D4CD53 /* dynamic */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 18B5B99208564B5D002803C9 /* Build configuration list for PBXNativeTarget "dynamic" */;
+			buildPhases = (
+				4086CA56063AB30000D4CD53 /* ShellScript */,
+				4086CA57063AB30000D4CD53 /* Headers */,
+				4086CA59063AB30000D4CD53 /* Sources */,
+				4086CBDB063AB30000D4CD53 /* Frameworks */,
+				4086CBDF063AB30000D4CD53 /* Rez */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = dynamic;
+			productName = "wx library";
+			productReference = 4086CBE1063AB30000D4CD53 /* libwx_mac.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		0867D690FE84028FC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = 18B5B99E08564B5D002803C9 /* Build configuration list for PBXProject "wxMac-BOINC" */;
+			hasScannedForEncodings = 1;
+			mainGroup = 0867D691FE84028FC02AAC07 /* wxWindows */;
+			productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
+			projectDirPath = "";
+			targets = (
+				4086C742063AB2FF00D4CD53 /* static */,
+				4086CA55063AB30000D4CD53 /* dynamic */,
+				4086D1FA063BC03E00D4CD53 /* Build All */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXRezBuildPhase section */
+		4086C8C9063AB2FF00D4CD53 /* Rez */ = {
+			isa = PBXRezBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		4086CBDF063AB30000D4CD53 /* Rez */ = {
+			isa = PBXRezBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXRezBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		4086CA56063AB30000D4CD53 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "$SRCROOT/../distrib/mac/pbsetup-sh \"${SRCROOT}\" \"${SYMROOT}\"";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		4086C746063AB2FF00D4CD53 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				4086C747063AB2FF00D4CD53 /* file.cpp in Sources */,
+				4086C748063AB2FF00D4CD53 /* appcmn.cpp in Sources */,
+				4086C749063AB2FF00D4CD53 /* bmpbase.cpp in Sources */,
+				4086C74A063AB2FF00D4CD53 /* choiccmn.cpp in Sources */,
+				4086C74B063AB2FF00D4CD53 /* clipcmn.cpp in Sources */,
+				4086C74C063AB2FF00D4CD53 /* clntdata.cpp in Sources */,
+				4086C74D063AB2FF00D4CD53 /* cmdline.cpp in Sources */,
+				4086C74E063AB2FF00D4CD53 /* cmdproc.cpp in Sources */,
+				4086C74F063AB2FF00D4CD53 /* config.cpp in Sources */,
+				4086C750063AB2FF00D4CD53 /* containr.cpp in Sources */,
+				4086C751063AB2FF00D4CD53 /* cmndata.cpp in Sources */,
+				4086C752063AB2FF00D4CD53 /* dseldlg.cpp in Sources */,
+				4086C753063AB2FF00D4CD53 /* docview.cpp in Sources */,
+				4086C754063AB2FF00D4CD53 /* docmdi.cpp in Sources */,
+				4086C755063AB2FF00D4CD53 /* dobjcmn.cpp in Sources */,
+				4086C756063AB2FF00D4CD53 /* dndcmn.cpp in Sources */,
+				4086C757063AB2FF00D4CD53 /* dlgcmn.cpp in Sources */,
+				4086C758063AB2FF00D4CD53 /* dircmn.cpp in Sources */,
+				4086C759063AB2FF00D4CD53 /* dcbase.cpp in Sources */,
+				4086C75A063AB2FF00D4CD53 /* dbtable.cpp in Sources */,
+				4086C75B063AB2FF00D4CD53 /* db.cpp in Sources */,
+				4086C75C063AB2FF00D4CD53 /* datstrm.cpp in Sources */,
+				4086C75D063AB2FF00D4CD53 /* datetime.cpp in Sources */,
+				4086C75E063AB2FF00D4CD53 /* ctrlsub.cpp in Sources */,
+				4086C75F063AB2FF00D4CD53 /* ctrlcmn.cpp in Sources */,
+				4086C760063AB2FF00D4CD53 /* cshelp.cpp in Sources */,
+				4086C761063AB2FF00D4CD53 /* dynload.cpp in Sources */,
+				4086C762063AB2FF00D4CD53 /* dynlib.cpp in Sources */,
+				4086C763063AB2FF00D4CD53 /* dynarray.cpp in Sources */,
+				4086C764063AB2FF00D4CD53 /* ffile.cpp in Sources */,
+				4086C765063AB2FF00D4CD53 /* fddlgcmn.cpp in Sources */,
+				4086C766063AB2FF00D4CD53 /* extended.c in Sources */,
+				4086C767063AB2FF00D4CD53 /* event.cpp in Sources */,
+				4086C768063AB2FF00D4CD53 /* encconv.cpp in Sources */,
+				4086C769063AB2FF00D4CD53 /* effects.cpp in Sources */,
+				4086C76A063AB2FF00D4CD53 /* imagjpeg.cpp in Sources */,
+				4086C76B063AB2FF00D4CD53 /* imagiff.cpp in Sources */,
+				4086C76C063AB2FF00D4CD53 /* imaggif.cpp in Sources */,
+				4086C76D063AB2FF00D4CD53 /* image.cpp in Sources */,
+				4086C76E063AB2FF00D4CD53 /* imagbmp.cpp in Sources */,
+				4086C76F063AB2FF00D4CD53 /* imagall.cpp in Sources */,
+				4086C770063AB2FF00D4CD53 /* http.cpp in Sources */,
+				4086C771063AB2FF00D4CD53 /* helpbase.cpp in Sources */,
+				4086C772063AB2FF00D4CD53 /* hash.cpp in Sources */,
+				4086C773063AB2FF00D4CD53 /* gifdecod.cpp in Sources */,
+				4086C774063AB2FF00D4CD53 /* geometry.cpp in Sources */,
+				4086C775063AB2FF00D4CD53 /* gdicmn.cpp in Sources */,
+				4086C776063AB2FF00D4CD53 /* gaugecmn.cpp in Sources */,
+				4086C777063AB2FF00D4CD53 /* ftp.cpp in Sources */,
+				4086C779063AB2FF00D4CD53 /* fs_mem.cpp in Sources */,
+				4086C77A063AB2FF00D4CD53 /* fs_inet.cpp in Sources */,
+				4086C77B063AB2FF00D4CD53 /* framecmn.cpp in Sources */,
+				4086C77C063AB2FF00D4CD53 /* fontmap.cpp in Sources */,
+				4086C77D063AB2FF00D4CD53 /* fontcmn.cpp in Sources */,
+				4086C77E063AB2FF00D4CD53 /* filesys.cpp in Sources */,
+				4086C77F063AB2FF00D4CD53 /* filename.cpp in Sources */,
+				4086C780063AB2FF00D4CD53 /* filefn.cpp in Sources */,
+				4086C781063AB2FF00D4CD53 /* fileconf.cpp in Sources */,
+				4086C782063AB2FF00D4CD53 /* imagpcx.cpp in Sources */,
+				4086C783063AB2FF00D4CD53 /* imagpng.cpp in Sources */,
+				4086C784063AB2FF00D4CD53 /* imagpnm.cpp in Sources */,
+				4086C785063AB2FF00D4CD53 /* imagtiff.cpp in Sources */,
+				4086C786063AB2FF00D4CD53 /* imagxpm.cpp in Sources */,
+				4086C787063AB2FF00D4CD53 /* intl.cpp in Sources */,
+				4086C788063AB2FF00D4CD53 /* ipcbase.cpp in Sources */,
+				4086C789063AB2FF00D4CD53 /* layout.cpp in Sources */,
+				4086C78A063AB2FF00D4CD53 /* lboxcmn.cpp in Sources */,
+				4086C78B063AB2FF00D4CD53 /* list.cpp in Sources */,
+				4086C78C063AB2FF00D4CD53 /* log.cpp in Sources */,
+				4086C78D063AB2FF00D4CD53 /* longlong.cpp in Sources */,
+				4086C78E063AB2FF00D4CD53 /* matrix.cpp in Sources */,
+				4086C78F063AB2FF00D4CD53 /* memory.cpp in Sources */,
+				4086C790063AB2FF00D4CD53 /* menucmn.cpp in Sources */,
+				4086C791063AB2FF00D4CD53 /* mimecmn.cpp in Sources */,
+				4086C792063AB2FF00D4CD53 /* nbkbase.cpp in Sources */,
+				4086C793063AB2FF00D4CD53 /* module.cpp in Sources */,
+				4086C794063AB2FF00D4CD53 /* mstream.cpp in Sources */,
+				4086C795063AB2FF00D4CD53 /* object.cpp in Sources */,
+				4086C796063AB2FF00D4CD53 /* popupcmn.cpp in Sources */,
+				4086C797063AB2FF00D4CD53 /* prntbase.cpp in Sources */,
+				4086C798063AB2FF00D4CD53 /* paper.cpp in Sources */,
+				4086C799063AB2FF00D4CD53 /* sckaddr.cpp in Sources */,
+				4086C79A063AB2FF00D4CD53 /* regex.cpp in Sources */,
+				4086C79B063AB2FF00D4CD53 /* quantize.cpp in Sources */,
+				4086C79C063AB2FF00D4CD53 /* protocol.cpp in Sources */,
+				4086C79D063AB2FF00D4CD53 /* process.cpp in Sources */,
+				4086C79E063AB2FF00D4CD53 /* sckfile.cpp in Sources */,
+				4086C79F063AB2FF00D4CD53 /* sckipc.cpp in Sources */,
+				4086C7A0063AB2FF00D4CD53 /* sckstrm.cpp in Sources */,
+				4086C7A1063AB2FF00D4CD53 /* sizer.cpp in Sources */,
+				4086C7A2063AB2FF00D4CD53 /* socket.cpp in Sources */,
+				4086C7A3063AB2FF00D4CD53 /* stockitem.cpp in Sources */,
+				4086C7A4063AB2FF00D4CD53 /* strconv.cpp in Sources */,
+				4086C7A5063AB2FF00D4CD53 /* stream.cpp in Sources */,
+				4086C7A6063AB2FF00D4CD53 /* string.cpp in Sources */,
+				4086C7A7063AB2FF00D4CD53 /* sysopt.cpp in Sources */,
+				4086C7A8063AB2FF00D4CD53 /* tbarbase.cpp in Sources */,
+				4086C7A9063AB2FF00D4CD53 /* textbuf.cpp in Sources */,
+				4086C7AA063AB2FF00D4CD53 /* textcmn.cpp in Sources */,
+				4086C7AB063AB2FF00D4CD53 /* textfile.cpp in Sources */,
+				4086C7AC063AB2FF00D4CD53 /* timercmn.cpp in Sources */,
+				4086C7AD063AB2FF00D4CD53 /* tokenzr.cpp in Sources */,
+				4086C7AE063AB2FF00D4CD53 /* toplvcmn.cpp in Sources */,
+				4086C7AF063AB2FF00D4CD53 /* treebase.cpp in Sources */,
+				4086C7B0063AB2FF00D4CD53 /* txtstrm.cpp in Sources */,
+				4086C7B3063AB2FF00D4CD53 /* url.cpp in Sources */,
+				4086C7B4063AB2FF00D4CD53 /* valgen.cpp in Sources */,
+				4086C7B5063AB2FF00D4CD53 /* validate.cpp in Sources */,
+				4086C7B6063AB2FF00D4CD53 /* valtext.cpp in Sources */,
+				4086C7B7063AB2FF00D4CD53 /* variant.cpp in Sources */,
+				4086C7B8063AB2FF00D4CD53 /* wfstream.cpp in Sources */,
+				4086C7B9063AB2FF00D4CD53 /* wxchar.cpp in Sources */,
+				4086C7BA063AB2FF00D4CD53 /* xpmdecod.cpp in Sources */,
+				4086C7BB063AB2FF00D4CD53 /* zipstrm.cpp in Sources */,
+				4086C7BC063AB2FF00D4CD53 /* wincmn.cpp in Sources */,
+				4086C7BD063AB2FF00D4CD53 /* zstream.cpp in Sources */,
+				4086C7BE063AB2FF00D4CD53 /* busyinfo.cpp in Sources */,
+				4086C7BF063AB2FF00D4CD53 /* calctrl.cpp in Sources */,
+				4086C7C0063AB2FF00D4CD53 /* caret.cpp in Sources */,
+				4086C7C1063AB2FF00D4CD53 /* choicdgg.cpp in Sources */,
+				4086C7C2063AB2FF00D4CD53 /* grid.cpp in Sources */,
+				4086C7C3063AB2FF00D4CD53 /* fontdlgg.cpp in Sources */,
+				4086C7C4063AB2FF00D4CD53 /* fdrepdlg.cpp in Sources */,
+				4086C7C5063AB2FF00D4CD53 /* dragimgg.cpp in Sources */,
+				4086C7C6063AB2FF00D4CD53 /* dirdlgg.cpp in Sources */,
+				4086C7C7063AB2FF00D4CD53 /* dirctrlg.cpp in Sources */,
+				4086C7C8063AB2FF00D4CD53 /* dcpsg.cpp in Sources */,
+				4086C7C9063AB2FF00D4CD53 /* colrdlgg.cpp in Sources */,
+				4086C7CA063AB2FF00D4CD53 /* printps.cpp in Sources */,
+				4086C7CB063AB2FF00D4CD53 /* panelg.cpp in Sources */,
+				4086C7CC063AB2FF00D4CD53 /* numdlgg.cpp in Sources */,
+				4086C7CE063AB2FF00D4CD53 /* logg.cpp in Sources */,
+				4086C7CF063AB2FF00D4CD53 /* listctrl.cpp in Sources */,
+				4086C7D0063AB2FF00D4CD53 /* laywin.cpp in Sources */,
+				4086C7D2063AB2FF00D4CD53 /* helpext.cpp in Sources */,
+				4086C7D3063AB2FF00D4CD53 /* gridsel.cpp in Sources */,
+				4086C7D4063AB2FF00D4CD53 /* gridctrl.cpp in Sources */,
+				4086C7D5063AB2FF00D4CD53 /* prntdlgg.cpp in Sources */,
+				4086C7D6063AB2FF00D4CD53 /* wizard.cpp in Sources */,
+				4086C7D7063AB2FF00D4CD53 /* treectlg.cpp in Sources */,
+				4086C7D8063AB2FF00D4CD53 /* tipwin.cpp in Sources */,
+				4086C7D9063AB2FF00D4CD53 /* tipdlg.cpp in Sources */,
+				4086C7DA063AB2FF00D4CD53 /* textdlgg.cpp in Sources */,
+				4086C7DB063AB2FF00D4CD53 /* tabg.cpp in Sources */,
+				4086C7DC063AB2FF00D4CD53 /* statusbr.cpp in Sources */,
+				4086C7DD063AB2FF00D4CD53 /* splitter.cpp in Sources */,
+				4086C7DE063AB2FF00D4CD53 /* splash.cpp in Sources */,
+				4086C7E0063AB2FF00D4CD53 /* scrlwing.cpp in Sources */,
+				4086C7E1063AB2FF00D4CD53 /* sashwin.cpp in Sources */,
+				4086C7E2063AB2FF00D4CD53 /* progdlgg.cpp in Sources */,
+				4086C7E3063AB2FF00D4CD53 /* helpctrl.cpp in Sources */,
+				4086C7E4063AB2FF00D4CD53 /* helpdata.cpp in Sources */,
+				4086C7E5063AB2FF00D4CD53 /* helpfrm.cpp in Sources */,
+				4086C7E6063AB2FF00D4CD53 /* htmlcell.cpp in Sources */,
+				4086C7E7063AB2FF00D4CD53 /* m_fonts.cpp in Sources */,
+				4086C7E8063AB2FF00D4CD53 /* m_dflist.cpp in Sources */,
+				4086C7E9063AB2FF00D4CD53 /* htmprint.cpp in Sources */,
+				4086C7EA063AB2FF00D4CD53 /* htmlwin.cpp in Sources */,
+				4086C7EB063AB2FF00D4CD53 /* htmltag.cpp in Sources */,
+				4086C7EC063AB2FF00D4CD53 /* htmlpars.cpp in Sources */,
+				4086C7ED063AB2FF00D4CD53 /* htmlfilt.cpp in Sources */,
+				4086C7EE063AB2FF00D4CD53 /* m_hline.cpp in Sources */,
+				4086C7EF063AB2FF00D4CD53 /* winpars.cpp in Sources */,
+				4086C7F0063AB2FF00D4CD53 /* m_tables.cpp in Sources */,
+				4086C7F1063AB2FF00D4CD53 /* m_pre.cpp in Sources */,
+				4086C7F2063AB2FF00D4CD53 /* m_list.cpp in Sources */,
+				4086C7F3063AB2FF00D4CD53 /* m_links.cpp in Sources */,
+				4086C7F4063AB2FF00D4CD53 /* m_layout.cpp in Sources */,
+				4086C7F5063AB2FF00D4CD53 /* m_image.cpp in Sources */,
+				4086C7F6063AB2FF00D4CD53 /* jdcolor.c in Sources */,
+				4086C7F7063AB2FF00D4CD53 /* jdatasrc.c in Sources */,
+				4086C7F8063AB2FF00D4CD53 /* jdcoefct.c in Sources */,
+				4086C7F9063AB2FF00D4CD53 /* jdatadst.c in Sources */,
+				4086C7FA063AB2FF00D4CD53 /* jdapistd.c in Sources */,
+				4086C7FB063AB2FF00D4CD53 /* jdapimin.c in Sources */,
+				4086C7FC063AB2FF00D4CD53 /* jctrans.c in Sources */,
+				4086C7FD063AB2FF00D4CD53 /* jcsample.c in Sources */,
+				4086C7FE063AB2FF00D4CD53 /* jcprepct.c in Sources */,
+				4086C7FF063AB2FF00D4CD53 /* jcphuff.c in Sources */,
+				4086C800063AB2FF00D4CD53 /* jcparam.c in Sources */,
+				4086C801063AB2FF00D4CD53 /* jcomapi.c in Sources */,
+				4086C802063AB2FF00D4CD53 /* jcmaster.c in Sources */,
+				4086C803063AB2FF00D4CD53 /* jcmarker.c in Sources */,
+				4086C804063AB2FF00D4CD53 /* jcmainct.c in Sources */,
+				4086C805063AB2FF00D4CD53 /* jcinit.c in Sources */,
+				4086C806063AB2FF00D4CD53 /* jchuff.c in Sources */,
+				4086C807063AB2FF00D4CD53 /* jcdctmgr.c in Sources */,
+				4086C808063AB2FF00D4CD53 /* jccolor.c in Sources */,
+				4086C809063AB2FF00D4CD53 /* jccoefct.c in Sources */,
+				4086C80A063AB2FF00D4CD53 /* jcapistd.c in Sources */,
+				4086C80B063AB2FF00D4CD53 /* jcapimin.c in Sources */,
+				4086C80C063AB2FF00D4CD53 /* jddctmgr.c in Sources */,
+				4086C80D063AB2FF00D4CD53 /* jutils.c in Sources */,
+				4086C80E063AB2FF00D4CD53 /* jquant2.c in Sources */,
+				4086C80F063AB2FF00D4CD53 /* jquant1.c in Sources */,
+				4086C810063AB2FF00D4CD53 /* jmemnobs.c in Sources */,
+				4086C811063AB2FF00D4CD53 /* jmemmgr.c in Sources */,
+				4086C812063AB2FF00D4CD53 /* jidctred.c in Sources */,
+				4086C813063AB2FF00D4CD53 /* jidctint.c in Sources */,
+				4086C814063AB2FF00D4CD53 /* jidctfst.c in Sources */,
+				4086C815063AB2FF00D4CD53 /* jidctflt.c in Sources */,
+				4086C816063AB2FF00D4CD53 /* jfdctint.c in Sources */,
+				4086C817063AB2FF00D4CD53 /* jfdctfst.c in Sources */,
+				4086C818063AB2FF00D4CD53 /* jdhuff.c in Sources */,
+				4086C819063AB2FF00D4CD53 /* jdinput.c in Sources */,
+				4086C81A063AB2FF00D4CD53 /* jdmainct.c in Sources */,
+				4086C81B063AB2FF00D4CD53 /* jdmarker.c in Sources */,
+				4086C81C063AB2FF00D4CD53 /* jdmaster.c in Sources */,
+				4086C81D063AB2FF00D4CD53 /* jdmerge.c in Sources */,
+				4086C81E063AB2FF00D4CD53 /* jdphuff.c in Sources */,
+				4086C81F063AB2FF00D4CD53 /* jdpostct.c in Sources */,
+				4086C820063AB2FF00D4CD53 /* jdsample.c in Sources */,
+				4086C821063AB2FF00D4CD53 /* jdtrans.c in Sources */,
+				4086C822063AB2FF00D4CD53 /* jerror.c in Sources */,
+				4086C823063AB2FF00D4CD53 /* jfdctflt.c in Sources */,
+				4086C824063AB2FF00D4CD53 /* accel.cpp in Sources */,
+				4086C826063AB2FF00D4CD53 /* app.cpp in Sources */,
+				4086C827063AB2FF00D4CD53 /* bitmap.cpp in Sources */,
+				4086C828063AB2FF00D4CD53 /* bmpbuttn.cpp in Sources */,
+				4086C829063AB2FF00D4CD53 /* brush.cpp in Sources */,
+				4086C82A063AB2FF00D4CD53 /* button.cpp in Sources */,
+				4086C82B063AB2FF00D4CD53 /* checkbox.cpp in Sources */,
+				4086C82C063AB2FF00D4CD53 /* checklst.cpp in Sources */,
+				4086C82D063AB2FF00D4CD53 /* clipbrd.cpp in Sources */,
+				4086C82E063AB2FF00D4CD53 /* colordlg.cpp in Sources */,
+				4086C82F063AB2FF00D4CD53 /* colour.cpp in Sources */,
+				4086C831063AB2FF00D4CD53 /* control.cpp in Sources */,
+				4086C832063AB2FF00D4CD53 /* choice.cpp in Sources */,
+				4086C833063AB2FF00D4CD53 /* cursor.cpp in Sources */,
+				4086C834063AB2FF00D4CD53 /* data.cpp in Sources */,
+				4086C835063AB2FF00D4CD53 /* dataobj.cpp in Sources */,
+				4086C836063AB2FF00D4CD53 /* dc.cpp in Sources */,
+				4086C837063AB2FF00D4CD53 /* minifram.cpp in Sources */,
+				4086C838063AB2FF00D4CD53 /* mimetmac.cpp in Sources */,
+				4086C839063AB2FF00D4CD53 /* metafile.cpp in Sources */,
+				4086C83A063AB2FF00D4CD53 /* msgdlg.cpp in Sources */,
+				4086C83B063AB2FF00D4CD53 /* notebmac.cpp in Sources */,
+				4086C83C063AB2FF00D4CD53 /* palette.cpp in Sources */,
+				4086C83D063AB2FF00D4CD53 /* pen.cpp in Sources */,
+				4086C83F063AB2FF00D4CD53 /* printmac.cpp in Sources */,
+				4086C840063AB2FF00D4CD53 /* radiobox.cpp in Sources */,
+				4086C841063AB2FF00D4CD53 /* printdlg.cpp in Sources */,
+				4086C842063AB2FF00D4CD53 /* radiobut.cpp in Sources */,
+				4086C843063AB2FF00D4CD53 /* region.cpp in Sources */,
+				4086C844063AB2FF00D4CD53 /* scrolbar.cpp in Sources */,
+				4086C845063AB2FF00D4CD53 /* settings.cpp in Sources */,
+				4086C846063AB2FF00D4CD53 /* slider.cpp in Sources */,
+				4086C847063AB2FF00D4CD53 /* spinbutt.cpp in Sources */,
+				4086C848063AB2FF00D4CD53 /* statbmp.cpp in Sources */,
+				4086C849063AB2FF00D4CD53 /* statbrma.cpp in Sources */,
+				4086C84A063AB2FF00D4CD53 /* statlmac.cpp in Sources */,
+				4086C84B063AB2FF00D4CD53 /* stattext.cpp in Sources */,
+				4086C84C063AB2FF00D4CD53 /* tabctrl.cpp in Sources */,
+				4086C84D063AB2FF00D4CD53 /* statbox.cpp in Sources */,
+				4086C84E063AB2FF00D4CD53 /* toolbar.cpp in Sources */,
+				4086C84F063AB2FF00D4CD53 /* textctrl.cpp in Sources */,
+				4086C850063AB2FF00D4CD53 /* timer.cpp in Sources */,
+				4086C851063AB2FF00D4CD53 /* tooltip.cpp in Sources */,
+				4086C852063AB2FF00D4CD53 /* window.cpp in Sources */,
+				4086C853063AB2FF00D4CD53 /* utilsexc.cpp in Sources */,
+				4086C854063AB2FF00D4CD53 /* utils.cpp in Sources */,
+				4086C855063AB2FF00D4CD53 /* uma.cpp in Sources */,
+				4086C856063AB2FF00D4CD53 /* toplevel.cpp in Sources */,
+				4086C857063AB2FF00D4CD53 /* pngwutil.c in Sources */,
+				4086C858063AB2FF00D4CD53 /* pngwtran.c in Sources */,
+				4086C859063AB2FF00D4CD53 /* pngwrite.c in Sources */,
+				4086C85A063AB2FF00D4CD53 /* pngwio.c in Sources */,
+				4086C85B063AB2FF00D4CD53 /* pngtrans.c in Sources */,
+				4086C85C063AB2FF00D4CD53 /* pngtest.c in Sources */,
+				4086C85D063AB2FF00D4CD53 /* pngset.c in Sources */,
+				4086C85E063AB2FF00D4CD53 /* pngrutil.c in Sources */,
+				4086C85F063AB2FF00D4CD53 /* pngrtran.c in Sources */,
+				4086C860063AB2FF00D4CD53 /* pngrio.c in Sources */,
+				4086C861063AB2FF00D4CD53 /* pngread.c in Sources */,
+				4086C862063AB2FF00D4CD53 /* pngpread.c in Sources */,
+				4086C863063AB2FF00D4CD53 /* pngmem.c in Sources */,
+				4086C864063AB2FF00D4CD53 /* pngget.c in Sources */,
+				4086C865063AB2FF00D4CD53 /* pngerror.c in Sources */,
+				4086C866063AB2FF00D4CD53 /* png.c in Sources */,
+				4086C867063AB2FF00D4CD53 /* menuitem.cpp in Sources */,
+				4086C868063AB2FF00D4CD53 /* menu.cpp in Sources */,
+				4086C869063AB2FF00D4CD53 /* mdi.cpp in Sources */,
+				4086C86A063AB2FF00D4CD53 /* macnotfy.cpp in Sources */,
+				4086C86B063AB2FF00D4CD53 /* listbox.cpp in Sources */,
+				4086C86D063AB2FF00D4CD53 /* icon.cpp in Sources */,
+				4086C86E063AB2FF00D4CD53 /* taskbar.cpp in Sources */,
+				4086C86F063AB2FF00D4CD53 /* gauge.cpp in Sources */,
+				4086C870063AB2FF00D4CD53 /* frame.cpp in Sources */,
+				4086C871063AB2FF00D4CD53 /* fontutil.cpp in Sources */,
+				4086C872063AB2FF00D4CD53 /* fontenum.cpp in Sources */,
+				4086C874063AB2FF00D4CD53 /* font.cpp in Sources */,
+				4086C875063AB2FF00D4CD53 /* filedlg.cpp in Sources */,
+				4086C876063AB2FF00D4CD53 /* dnd.cpp in Sources */,
+				4086C877063AB2FF00D4CD53 /* dirmac.cpp in Sources */,
+				4086C878063AB2FF00D4CD53 /* dirdlg.cpp in Sources */,
+				4086C879063AB2FF00D4CD53 /* dialog.cpp in Sources */,
+				4086C87A063AB2FF00D4CD53 /* dcscreen.cpp in Sources */,
+				4086C87B063AB2FF00D4CD53 /* dcprint.cpp in Sources */,
+				4086C87C063AB2FF00D4CD53 /* dcmemory.cpp in Sources */,
+				4086C87D063AB2FF00D4CD53 /* dcclient.cpp in Sources */,
+				4086C87E063AB2FF00D4CD53 /* tif_print.c in Sources */,
+				4086C87F063AB2FF00D4CD53 /* tif_predict.c in Sources */,
+				4086C880063AB2FF00D4CD53 /* tif_pixarlog.c in Sources */,
+				4086C881063AB2FF00D4CD53 /* tif_packbits.c in Sources */,
+				4086C882063AB2FF00D4CD53 /* tif_open.c in Sources */,
+				4086C883063AB2FF00D4CD53 /* tif_next.c in Sources */,
+				4086C884063AB2FF00D4CD53 /* tif_lzw.c in Sources */,
+				4086C885063AB2FF00D4CD53 /* tif_luv.c in Sources */,
+				4086C886063AB2FF00D4CD53 /* tif_jpeg.c in Sources */,
+				4086C887063AB2FF00D4CD53 /* tif_getimage.c in Sources */,
+				4086C888063AB2FF00D4CD53 /* tif_flush.c in Sources */,
+				4086C889063AB2FF00D4CD53 /* tif_fax3sm.c in Sources */,
+				4086C88A063AB2FF00D4CD53 /* tif_fax3.c in Sources */,
+				4086C88B063AB2FF00D4CD53 /* tif_error.c in Sources */,
+				4086C88C063AB2FF00D4CD53 /* tif_dumpmode.c in Sources */,
+				4086C88D063AB2FF00D4CD53 /* tif_dirwrite.c in Sources */,
+				4086C88E063AB2FF00D4CD53 /* tif_dirread.c in Sources */,
+				4086C88F063AB2FF00D4CD53 /* tif_dirinfo.c in Sources */,
+				4086C890063AB2FF00D4CD53 /* tif_dir.c in Sources */,
+				4086C891063AB2FF00D4CD53 /* tif_compress.c in Sources */,
+				4086C892063AB2FF00D4CD53 /* tif_codec.c in Sources */,
+				4086C893063AB2FF00D4CD53 /* tif_close.c in Sources */,
+				4086C894063AB2FF00D4CD53 /* tif_aux.c in Sources */,
+				4086C895063AB2FF00D4CD53 /* tif_zip.c in Sources */,
+				4086C896063AB2FF00D4CD53 /* tif_write.c in Sources */,
+				4086C897063AB2FF00D4CD53 /* tif_warning.c in Sources */,
+				4086C898063AB2FF00D4CD53 /* tif_version.c in Sources */,
+				4086C899063AB2FF00D4CD53 /* tif_unix.c in Sources */,
+				4086C89A063AB2FF00D4CD53 /* tif_tile.c in Sources */,
+				4086C89B063AB2FF00D4CD53 /* tif_thunder.c in Sources */,
+				4086C89C063AB2FF00D4CD53 /* tif_swab.c in Sources */,
+				4086C89D063AB2FF00D4CD53 /* tif_strip.c in Sources */,
+				4086C89E063AB2FF00D4CD53 /* tif_read.c in Sources */,
+				4086C89F063AB2FF00D4CD53 /* hashmap.cpp in Sources */,
+				4086C8A0063AB2FF00D4CD53 /* artprov.cpp in Sources */,
+				4086C8A1063AB2FF00D4CD53 /* artstd.cpp in Sources */,
+				4086C8A2063AB2FF00D4CD53 /* iconbndl.cpp in Sources */,
+				4086C8A3063AB2FF00D4CD53 /* imagfill.cpp in Sources */,
+				4086C8A4063AB2FF00D4CD53 /* utilsunx.cpp in Sources */,
+				4086C8A5063AB2FF00D4CD53 /* snglinst.cpp in Sources */,
+				4086C8A6063AB2FF00D4CD53 /* msgout.cpp in Sources */,
+				4086C8A7063AB2FF00D4CD53 /* radiocmn.cpp in Sources */,
+				4086C8A8063AB2FF00D4CD53 /* settcmn.cpp in Sources */,
+				4086C8A9063AB2FF00D4CD53 /* display.cpp in Sources */,
+				4086C8AA063AB2FF00D4CD53 /* MoreFilesX.c in Sources */,
+				4086C8AB063AB2FF00D4CD53 /* accesscmn.cpp in Sources */,
+				4086C8AC063AB2FF00D4CD53 /* datacmn.cpp in Sources */,
+				4086C8AD063AB2FF00D4CD53 /* dpycmn.cpp in Sources */,
+				4086C8AE063AB2FF00D4CD53 /* rgncmn.cpp in Sources */,
+				4086C8AF063AB2FF00D4CD53 /* appbase.cpp in Sources */,
+				4086C8B0063AB2FF00D4CD53 /* dbgrid.cpp in Sources */,
+				4086C8B1063AB2FF00D4CD53 /* fldlgcmn.cpp in Sources */,
+				4086C8B2063AB2FF00D4CD53 /* fmapbase.cpp in Sources */,
+				4086C8B3063AB2FF00D4CD53 /* stopwatch.cpp in Sources */,
+				4086C8B4063AB2FF00D4CD53 /* renderer.cpp in Sources */,
+				4086C8B5063AB2FF00D4CD53 /* init.cpp in Sources */,
+				4086C8B6063AB2FF00D4CD53 /* renderg.cpp in Sources */,
+				4086C8B7063AB2FF00D4CD53 /* selstore.cpp in Sources */,
+				4086C8B8063AB2FF00D4CD53 /* baseunix.cpp in Sources */,
+				4086C8B9063AB2FF00D4CD53 /* rendcmn.cpp in Sources */,
+				4086C8BA063AB2FF00D4CD53 /* m_style.cpp in Sources */,
+				4086C8BB063AB2FF00D4CD53 /* xti.cpp in Sources */,
+				4086C8BC063AB2FF00D4CD53 /* xtistrm.cpp in Sources */,
+				4086C8BD063AB2FF00D4CD53 /* xtixml.cpp in Sources */,
+				4086C8BE063AB2FF00D4CD53 /* bookctrl.cpp in Sources */,
+				4086C8BF063AB2FF00D4CD53 /* sound.cpp in Sources */,
+				4086C8C1063AB2FF00D4CD53 /* glcanvas.cpp in Sources */,
+				4086C8C4063AB2FF00D4CD53 /* regcomp.c in Sources */,
+				4086C8C5063AB2FF00D4CD53 /* regerror.c in Sources */,
+				4086C8C6063AB2FF00D4CD53 /* regexec.c in Sources */,
+				4086C8C7063AB2FF00D4CD53 /* regfree.c in Sources */,
+				407A90FA065742ED00F01665 /* spinctrl.cpp in Sources */,
+				40F10E5806AD0230003C7AC3 /* tglbtn.cpp in Sources */,
+				40F10E5906AD0230003C7AC3 /* thread.cpp in Sources */,
+				40DCE35006C744C90000D83E /* gsocket.cpp in Sources */,
+				0A98CB6B07146A06007B4289 /* statbar.cpp in Sources */,
+				0A98CC480715CFBC007B4289 /* gdiobj.cpp in Sources */,
+				0A98CC4C0715D03E007B4289 /* taskbarcmn.cpp in Sources */,
+				40670A8407377A6400F7C08C /* cfstring.cpp in Sources */,
+				40670A8507377A6400F7C08C /* stdpaths_cf.cpp in Sources */,
+				40670A9707377B1000F7C08C /* gbsizer.cpp in Sources */,
+				40670A9807377B1000F7C08C /* sstream.cpp in Sources */,
+				40670A9907377B1000F7C08C /* stdpbase.cpp in Sources */,
+				40670A9A07377B1000F7C08C /* uri.cpp in Sources */,
+				40607C1607493C3F00DC0420 /* archive.cpp in Sources */,
+				40607C760749432A00DC0420 /* gsockosx.cpp in Sources */,
+				40607C770749432A00DC0420 /* utilsexc_cf.cpp in Sources */,
+				40ECB13A074BD1D0005AAC48 /* stdpaths.cpp in Sources */,
+				40AF909107C8A926006A6D3C /* mediactrlcmn.cpp in Sources */,
+				40AF909B07C8A976006A6D3C /* datectlg.cpp in Sources */,
+				40AF909C07C8A976006A6D3C /* filedlgg.cpp in Sources */,
+				40AF909D07C8A976006A6D3C /* htmllbox.cpp in Sources */,
+				40AF909F07C8A976006A6D3C /* vlbox.cpp in Sources */,
+				40AF90A007C8A976006A6D3C /* vscroll.cpp in Sources */,
+				40AF90B507C8A9CF006A6D3C /* hid.cpp in Sources */,
+				40AF90B607C8A9CF006A6D3C /* hidjoystick.cpp in Sources */,
+				40AF90BE07C8AA08006A6D3C /* dlunix.cpp in Sources */,
+				40AF90C307C8AA17006A6D3C /* chm.cpp in Sources */,
+				40AF90EB07C8B18C006A6D3C /* dccg.cpp in Sources */,
+				40AF90EC07C8B18C006A6D3C /* drawer.cpp in Sources */,
+				40AF90EF07C8B18C006A6D3C /* mediactrl.cpp in Sources */,
+				40AF913607C8BD1F006A6D3C /* combobox.cpp in Sources */,
+				40AF915207C8C912006A6D3C /* tif_color.c in Sources */,
+				40AF915307C8C912006A6D3C /* tif_extension.c in Sources */,
+				401640E907F94B2800A8837A /* imaglist.cpp in Sources */,
+				40ADC34D08156AE40009DA36 /* debugrpt.cpp in Sources */,
+				40ADC36308156DC10009DA36 /* xml.cpp in Sources */,
+				40ADC41108156DEB0009DA36 /* xh_bmp.cpp in Sources */,
+				40ADC41208156DEB0009DA36 /* xh_bmpbt.cpp in Sources */,
+				40ADC41308156DEB0009DA36 /* xh_bttn.cpp in Sources */,
+				40ADC41408156DEB0009DA36 /* xh_cald.cpp in Sources */,
+				40ADC41508156DEB0009DA36 /* xh_chckb.cpp in Sources */,
+				40ADC41608156DEB0009DA36 /* xh_chckl.cpp in Sources */,
+				40ADC41708156DEB0009DA36 /* xh_choic.cpp in Sources */,
+				40ADC41808156DEB0009DA36 /* xh_choicbk.cpp in Sources */,
+				40ADC41908156DEB0009DA36 /* xh_combo.cpp in Sources */,
+				40ADC41A08156DEB0009DA36 /* xh_datectrl.cpp in Sources */,
+				40ADC41B08156DEB0009DA36 /* xh_dlg.cpp in Sources */,
+				40ADC41C08156DEB0009DA36 /* xh_frame.cpp in Sources */,
+				40ADC41D08156DEB0009DA36 /* xh_gauge.cpp in Sources */,
+				40ADC41E08156DEB0009DA36 /* xh_gdctl.cpp in Sources */,
+				40ADC41F08156DEB0009DA36 /* xh_html.cpp in Sources */,
+				40ADC42008156DEB0009DA36 /* xh_listb.cpp in Sources */,
+				40ADC42108156DEB0009DA36 /* xh_listbk.cpp in Sources */,
+				40ADC42208156DEB0009DA36 /* xh_listc.cpp in Sources */,
+				40ADC42308156DEB0009DA36 /* xh_mdi.cpp in Sources */,
+				40ADC42408156DEB0009DA36 /* xh_menu.cpp in Sources */,
+				40ADC42508156DEB0009DA36 /* xh_notbk.cpp in Sources */,
+				40ADC42608156DEB0009DA36 /* xh_panel.cpp in Sources */,
+				40ADC42708156DEB0009DA36 /* xh_radbt.cpp in Sources */,
+				40ADC42808156DEB0009DA36 /* xh_radbx.cpp in Sources */,
+				40ADC42908156DEB0009DA36 /* xh_scrol.cpp in Sources */,
+				40ADC42A08156DEB0009DA36 /* xh_scwin.cpp in Sources */,
+				40ADC42B08156DEB0009DA36 /* xh_sizer.cpp in Sources */,
+				40ADC42C08156DEB0009DA36 /* xh_slidr.cpp in Sources */,
+				40ADC42D08156DEB0009DA36 /* xh_spin.cpp in Sources */,
+				40ADC42E08156DEB0009DA36 /* xh_split.cpp in Sources */,
+				40ADC42F08156DEB0009DA36 /* xh_statbar.cpp in Sources */,
+				40ADC43008156DEB0009DA36 /* xh_stbmp.cpp in Sources */,
+				40ADC43108156DEB0009DA36 /* xh_stbox.cpp in Sources */,
+				40ADC43208156DEB0009DA36 /* xh_stlin.cpp in Sources */,
+				40ADC43308156DEB0009DA36 /* xh_sttxt.cpp in Sources */,
+				40ADC43408156DEB0009DA36 /* xh_text.cpp in Sources */,
+				40ADC43508156DEB0009DA36 /* xh_tglbtn.cpp in Sources */,
+				40ADC43608156DEB0009DA36 /* xh_toolb.cpp in Sources */,
+				40ADC43708156DEB0009DA36 /* xh_tree.cpp in Sources */,
+				40ADC43808156DEB0009DA36 /* xh_unkwn.cpp in Sources */,
+				40ADC43908156DEB0009DA36 /* xh_wizrd.cpp in Sources */,
+				40ADC43A08156DEB0009DA36 /* xmlres.cpp in Sources */,
+				40ADC43B08156DEB0009DA36 /* xmlrsall.cpp in Sources */,
+				40ADC44E08156EDC0009DA36 /* xmlparse.c in Sources */,
+				40ADC44F08156EDC0009DA36 /* xmlrole.c in Sources */,
+				40ADC45008156EDC0009DA36 /* xmltok.c in Sources */,
+				40ADC47A08160C200009DA36 /* choicbkg.cpp in Sources */,
+				40ADC47B08160C200009DA36 /* listbkg.cpp in Sources */,
+				40ADC48A08160CAD0009DA36 /* dbgrptg.cpp in Sources */,
+				40FF2B0E0869B1530013E961 /* webkit.mm in Sources */,
+				40011CBD0893D5B400E4DE95 /* utilsexc_base.cpp in Sources */,
+				400EDEB4089D4FFD00E848D9 /* propdlg.cpp in Sources */,
+				409F02710976CA5600D1030F /* xh_grid.cpp in Sources */,
+				40CDE8D40982505E00E8156D /* evtloopcmn.cpp in Sources */,
+				40CDE8DB098250AB00E8156D /* evtloop.cpp in Sources */,
+				43DFF5BA09926F7B0033000B /* helpdlg.cpp in Sources */,
+				43DFF5BB09926F7B0033000B /* helpwnd.cpp in Sources */,
+				40F0173A0A30684000AC9076 /* colourcmn.cpp in Sources */,
+				40F0173B0A30684000AC9076 /* convauto.cpp in Sources */,
+				40F017420A306C7600AC9076 /* fontenumcmn.cpp in Sources */,
+				408A59880A8998A40014D20E /* buttonbar.cpp in Sources */,
+				408A59890A8998A40014D20E /* toolbkg.cpp in Sources */,
+				408A598A0A8998A40014D20E /* treebkg.cpp in Sources */,
+				408A59960A8998DB0014D20E /* clrpickerg.cpp in Sources */,
+				408A59970A8998DB0014D20E /* filepickerg.cpp in Sources */,
+				408A59980A8998DB0014D20E /* fontpickerg.cpp in Sources */,
+				408A59990A8998DB0014D20E /* hyperlink.cpp in Sources */,
+				408A599A0A8998DB0014D20E /* odcombo.cpp in Sources */,
+				408A59AB0A89992F0014D20E /* clrpickercmn.cpp in Sources */,
+				408A59AC0A89992F0014D20E /* combocmn.cpp in Sources */,
+				408A59AD0A89992F0014D20E /* filepickercmn.cpp in Sources */,
+				408A59AE0A89992F0014D20E /* fontpickercmn.cpp in Sources */,
+				408A59AF0A89992F0014D20E /* pickerbase.cpp in Sources */,
+				408A59B00A89992F0014D20E /* powercmn.cpp in Sources */,
+				408A59B40A8999500014D20E /* combog.cpp in Sources */,
+				408A59C40A8999800014D20E /* xh_clrpicker.cpp in Sources */,
+				408A59C50A8999800014D20E /* xh_dirpicker.cpp in Sources */,
+				408A59C60A8999800014D20E /* xh_filepicker.cpp in Sources */,
+				408A59C70A8999800014D20E /* xh_fontpicker.cpp in Sources */,
+				408A59C80A8999800014D20E /* xh_hyperlink.cpp in Sources */,
+				408A59C90A8999800014D20E /* xh_odcombo.cpp in Sources */,
+				408A59CA0A8999800014D20E /* xh_treebk.cpp in Sources */,
+				407C6AE20A899E260056252A /* auibook.cpp in Sources */,
+				407C6AE40A899E260056252A /* dockart.cpp in Sources */,
+				407C6AE50A899E260056252A /* floatpane.cpp in Sources */,
+				407C6AE60A899E260056252A /* framemanager.cpp in Sources */,
+				407C6AE70A899E260056252A /* tabmdi.cpp in Sources */,
+				40AEF28D0AB5EC0800B2C19A /* platinfo.cpp in Sources */,
+				40F185C30AB722BC00E3BEF9 /* richtextbuffer.cpp in Sources */,
+				40F185C40AB722BC00E3BEF9 /* richtextctrl.cpp in Sources */,
+				40F185C50AB722BC00E3BEF9 /* richtexthtml.cpp in Sources */,
+				40F185C60AB722BC00E3BEF9 /* richtextstyles.cpp in Sources */,
+				40F185C70AB722BC00E3BEF9 /* richtextxml.cpp in Sources */,
+				403F73960AC9985500FF2BCB /* listctrl_mac.cpp in Sources */,
+				403F73990AC9986E00FF2BCB /* listctrlcmn.cpp in Sources */,
+				4067EF260ACD43BC004A2D14 /* graphcmn.cpp in Sources */,
+				4067EFC20ACD5306004A2D14 /* xh_bmpcbox.cpp in Sources */,
+				4067EFC60ACD53B1004A2D14 /* bmpcboxg.cpp in Sources */,
+				4067EFCA0ACD53ED004A2D14 /* graphics.cpp in Sources */,
+				404DAED50ADD137500687775 /* aboutdlg.cpp in Sources */,
+				404DAED80ADD138E00687775 /* animateg.cpp in Sources */,
+				404DAEDE0ADD13E600687775 /* anidecod.cpp in Sources */,
+				404DAEDF0ADD13E600687775 /* animatecmn.cpp in Sources */,
+				404DAEEC0ADD143200687775 /* aboutdlgg.cpp in Sources */,
+				404DB0EC0ADD36E900687775 /* richtextformatdlg.cpp in Sources */,
+				404DB2650ADD41B300687775 /* richtextsymboldlg.cpp in Sources */,
+				404DB2730ADD429D00687775 /* dcbufcmn.cpp in Sources */,
+				402AB2680AFF554A00C0D0C9 /* arcall.cpp in Sources */,
+				402AB2690AFF554A00C0D0C9 /* arcfind.cpp in Sources */,
+				402AB26A0AFF554A00C0D0C9 /* dcgraph.cpp in Sources */,
+				402AB26B0AFF554A00C0D0C9 /* fileback.cpp in Sources */,
+				402AB26C0AFF554A00C0D0C9 /* filtall.cpp in Sources */,
+				402AB26D0AFF554A00C0D0C9 /* filtfind.cpp in Sources */,
+				402AB26E0AFF554A00C0D0C9 /* fs_arc.cpp in Sources */,
+				402AB26F0AFF554A00C0D0C9 /* fs_filter.cpp in Sources */,
+				402AB2700AFF554A00C0D0C9 /* overlaycmn.cpp in Sources */,
+				402AB2710AFF554A00C0D0C9 /* tarstrm.cpp in Sources */,
+				402AB2740AFF55B000C0D0C9 /* overlay.cpp in Sources */,
+				402AB2770AFF55E300C0D0C9 /* collpaneg.cpp in Sources */,
+				402AB2800AFF567600C0D0C9 /* xh_animatctrl.cpp in Sources */,
+				402AB2810AFF567600C0D0C9 /* xh_collpane.cpp in Sources */,
+				402AB2820AFF567600C0D0C9 /* xh_htmllbox.cpp in Sources */,
+				402AB42C0AFF574600C0D0C9 /* imagtga.cpp in Sources */,
+				DDFE85360B60CF2F009B43D9 /* utilscmn.cpp in Sources */,
+				DDFE85370B60CF41009B43D9 /* fontdlg.cpp in Sources */,
+				DDFE85380B60CF41009B43D9 /* fontdlgosx.mm in Sources */,
+				DDFE85390B60CF46009B43D9 /* colordlgosx.mm in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		4086CA59063AB30000D4CD53 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				4086CA5A063AB30000D4CD53 /* file.cpp in Sources */,
+				4086CA5B063AB30000D4CD53 /* appcmn.cpp in Sources */,
+				4086CA5C063AB30000D4CD53 /* bmpbase.cpp in Sources */,
+				4086CA5D063AB30000D4CD53 /* choiccmn.cpp in Sources */,
+				4086CA5E063AB30000D4CD53 /* clipcmn.cpp in Sources */,
+				4086CA5F063AB30000D4CD53 /* clntdata.cpp in Sources */,
+				4086CA60063AB30000D4CD53 /* cmdline.cpp in Sources */,
+				4086CA61063AB30000D4CD53 /* cmdproc.cpp in Sources */,
+				4086CA62063AB30000D4CD53 /* config.cpp in Sources */,
+				4086CA63063AB30000D4CD53 /* containr.cpp in Sources */,
+				4086CA64063AB30000D4CD53 /* cmndata.cpp in Sources */,
+				4086CA65063AB30000D4CD53 /* dseldlg.cpp in Sources */,
+				4086CA66063AB30000D4CD53 /* docview.cpp in Sources */,
+				4086CA67063AB30000D4CD53 /* docmdi.cpp in Sources */,
+				4086CA68063AB30000D4CD53 /* dobjcmn.cpp in Sources */,
+				4086CA69063AB30000D4CD53 /* dndcmn.cpp in Sources */,
+				4086CA6A063AB30000D4CD53 /* dlgcmn.cpp in Sources */,
+				4086CA6B063AB30000D4CD53 /* dircmn.cpp in Sources */,
+				4086CA6C063AB30000D4CD53 /* dcbase.cpp in Sources */,
+				4086CA6D063AB30000D4CD53 /* dbtable.cpp in Sources */,
+				4086CA6E063AB30000D4CD53 /* db.cpp in Sources */,
+				4086CA6F063AB30000D4CD53 /* datstrm.cpp in Sources */,
+				4086CA70063AB30000D4CD53 /* datetime.cpp in Sources */,
+				4086CA71063AB30000D4CD53 /* ctrlsub.cpp in Sources */,
+				4086CA72063AB30000D4CD53 /* ctrlcmn.cpp in Sources */,
+				4086CA73063AB30000D4CD53 /* cshelp.cpp in Sources */,
+				4086CA74063AB30000D4CD53 /* dynload.cpp in Sources */,
+				4086CA75063AB30000D4CD53 /* dynlib.cpp in Sources */,
+				4086CA76063AB30000D4CD53 /* dynarray.cpp in Sources */,
+				4086CA77063AB30000D4CD53 /* ffile.cpp in Sources */,
+				4086CA78063AB30000D4CD53 /* fddlgcmn.cpp in Sources */,
+				4086CA79063AB30000D4CD53 /* extended.c in Sources */,
+				4086CA7A063AB30000D4CD53 /* event.cpp in Sources */,
+				4086CA7B063AB30000D4CD53 /* encconv.cpp in Sources */,
+				4086CA7C063AB30000D4CD53 /* effects.cpp in Sources */,
+				4086CA7D063AB30000D4CD53 /* imagjpeg.cpp in Sources */,
+				4086CA7E063AB30000D4CD53 /* imagiff.cpp in Sources */,
+				4086CA7F063AB30000D4CD53 /* imaggif.cpp in Sources */,
+				4086CA80063AB30000D4CD53 /* image.cpp in Sources */,
+				4086CA81063AB30000D4CD53 /* imagbmp.cpp in Sources */,
+				4086CA82063AB30000D4CD53 /* imagall.cpp in Sources */,
+				4086CA83063AB30000D4CD53 /* http.cpp in Sources */,
+				4086CA84063AB30000D4CD53 /* helpbase.cpp in Sources */,
+				4086CA85063AB30000D4CD53 /* hash.cpp in Sources */,
+				4086CA86063AB30000D4CD53 /* gifdecod.cpp in Sources */,
+				4086CA87063AB30000D4CD53 /* geometry.cpp in Sources */,
+				4086CA88063AB30000D4CD53 /* gdicmn.cpp in Sources */,
+				4086CA89063AB30000D4CD53 /* gaugecmn.cpp in Sources */,
+				4086CA8A063AB30000D4CD53 /* ftp.cpp in Sources */,
+				4086CA8C063AB30000D4CD53 /* fs_mem.cpp in Sources */,
+				4086CA8D063AB30000D4CD53 /* fs_inet.cpp in Sources */,
+				4086CA8E063AB30000D4CD53 /* framecmn.cpp in Sources */,
+				4086CA8F063AB30000D4CD53 /* fontmap.cpp in Sources */,
+				4086CA90063AB30000D4CD53 /* fontcmn.cpp in Sources */,
+				4086CA91063AB30000D4CD53 /* filesys.cpp in Sources */,
+				4086CA92063AB30000D4CD53 /* filename.cpp in Sources */,
+				4086CA93063AB30000D4CD53 /* filefn.cpp in Sources */,
+				4086CA94063AB30000D4CD53 /* fileconf.cpp in Sources */,
+				4086CA95063AB30000D4CD53 /* imagpcx.cpp in Sources */,
+				4086CA96063AB30000D4CD53 /* imagpng.cpp in Sources */,
+				4086CA97063AB30000D4CD53 /* imagpnm.cpp in Sources */,
+				4086CA98063AB30000D4CD53 /* imagtiff.cpp in Sources */,
+				4086CA99063AB30000D4CD53 /* imagxpm.cpp in Sources */,
+				4086CA9A063AB30000D4CD53 /* intl.cpp in Sources */,
+				4086CA9B063AB30000D4CD53 /* ipcbase.cpp in Sources */,
+				4086CA9C063AB30000D4CD53 /* layout.cpp in Sources */,
+				4086CA9D063AB30000D4CD53 /* lboxcmn.cpp in Sources */,
+				4086CA9E063AB30000D4CD53 /* list.cpp in Sources */,
+				4086CA9F063AB30000D4CD53 /* log.cpp in Sources */,
+				4086CAA0063AB30000D4CD53 /* longlong.cpp in Sources */,
+				4086CAA1063AB30000D4CD53 /* matrix.cpp in Sources */,
+				4086CAA2063AB30000D4CD53 /* memory.cpp in Sources */,
+				4086CAA3063AB30000D4CD53 /* menucmn.cpp in Sources */,
+				4086CAA4063AB30000D4CD53 /* mimecmn.cpp in Sources */,
+				4086CAA5063AB30000D4CD53 /* nbkbase.cpp in Sources */,
+				4086CAA6063AB30000D4CD53 /* module.cpp in Sources */,
+				4086CAA7063AB30000D4CD53 /* mstream.cpp in Sources */,
+				4086CAA8063AB30000D4CD53 /* object.cpp in Sources */,
+				4086CAA9063AB30000D4CD53 /* popupcmn.cpp in Sources */,
+				4086CAAA063AB30000D4CD53 /* prntbase.cpp in Sources */,
+				4086CAAB063AB30000D4CD53 /* paper.cpp in Sources */,
+				4086CAAC063AB30000D4CD53 /* sckaddr.cpp in Sources */,
+				4086CAAD063AB30000D4CD53 /* regex.cpp in Sources */,
+				4086CAAE063AB30000D4CD53 /* quantize.cpp in Sources */,
+				4086CAAF063AB30000D4CD53 /* protocol.cpp in Sources */,
+				4086CAB0063AB30000D4CD53 /* process.cpp in Sources */,
+				4086CAB1063AB30000D4CD53 /* sckfile.cpp in Sources */,
+				4086CAB2063AB30000D4CD53 /* sckipc.cpp in Sources */,
+				4086CAB3063AB30000D4CD53 /* sckstrm.cpp in Sources */,
+				4086CAB4063AB30000D4CD53 /* sizer.cpp in Sources */,
+				4086CAB5063AB30000D4CD53 /* socket.cpp in Sources */,
+				4086CAB6063AB30000D4CD53 /* stockitem.cpp in Sources */,
+				4086CAB7063AB30000D4CD53 /* strconv.cpp in Sources */,
+				4086CAB8063AB30000D4CD53 /* stream.cpp in Sources */,
+				4086CAB9063AB30000D4CD53 /* string.cpp in Sources */,
+				4086CABA063AB30000D4CD53 /* sysopt.cpp in Sources */,
+				4086CABB063AB30000D4CD53 /* tbarbase.cpp in Sources */,
+				4086CABC063AB30000D4CD53 /* textbuf.cpp in Sources */,
+				4086CABD063AB30000D4CD53 /* textcmn.cpp in Sources */,
+				4086CABE063AB30000D4CD53 /* textfile.cpp in Sources */,
+				4086CABF063AB30000D4CD53 /* timercmn.cpp in Sources */,
+				4086CAC0063AB30000D4CD53 /* tokenzr.cpp in Sources */,
+				4086CAC1063AB30000D4CD53 /* toplvcmn.cpp in Sources */,
+				4086CAC2063AB30000D4CD53 /* treebase.cpp in Sources */,
+				4086CAC3063AB30000D4CD53 /* txtstrm.cpp in Sources */,
+				4086CAC5063AB30000D4CD53 /* utilscmn.cpp in Sources */,
+				4086CAC6063AB30000D4CD53 /* url.cpp in Sources */,
+				4086CAC7063AB30000D4CD53 /* valgen.cpp in Sources */,
+				4086CAC8063AB30000D4CD53 /* validate.cpp in Sources */,
+				4086CAC9063AB30000D4CD53 /* valtext.cpp in Sources */,
+				4086CACA063AB30000D4CD53 /* variant.cpp in Sources */,
+				4086CACB063AB30000D4CD53 /* wfstream.cpp in Sources */,
+				4086CACC063AB30000D4CD53 /* wxchar.cpp in Sources */,
+				4086CACD063AB30000D4CD53 /* xpmdecod.cpp in Sources */,
+				4086CACE063AB30000D4CD53 /* zipstrm.cpp in Sources */,
+				4086CACF063AB30000D4CD53 /* wincmn.cpp in Sources */,
+				4086CAD0063AB30000D4CD53 /* zstream.cpp in Sources */,
+				4086CAD1063AB30000D4CD53 /* busyinfo.cpp in Sources */,
+				4086CAD2063AB30000D4CD53 /* calctrl.cpp in Sources */,
+				4086CAD3063AB30000D4CD53 /* caret.cpp in Sources */,
+				4086CAD4063AB30000D4CD53 /* choicdgg.cpp in Sources */,
+				4086CAD5063AB30000D4CD53 /* grid.cpp in Sources */,
+				4086CAD6063AB30000D4CD53 /* fontdlgg.cpp in Sources */,
+				4086CAD7063AB30000D4CD53 /* fdrepdlg.cpp in Sources */,
+				4086CAD8063AB30000D4CD53 /* dragimgg.cpp in Sources */,
+				4086CAD9063AB30000D4CD53 /* dirdlgg.cpp in Sources */,
+				4086CADA063AB30000D4CD53 /* dirctrlg.cpp in Sources */,
+				4086CADB063AB30000D4CD53 /* dcpsg.cpp in Sources */,
+				4086CADC063AB30000D4CD53 /* colrdlgg.cpp in Sources */,
+				4086CADD063AB30000D4CD53 /* printps.cpp in Sources */,
+				4086CADE063AB30000D4CD53 /* panelg.cpp in Sources */,
+				4086CADF063AB30000D4CD53 /* numdlgg.cpp in Sources */,
+				4086CAE1063AB30000D4CD53 /* logg.cpp in Sources */,
+				4086CAE2063AB30000D4CD53 /* listctrl.cpp in Sources */,
+				4086CAE3063AB30000D4CD53 /* laywin.cpp in Sources */,
+				4086CAE5063AB30000D4CD53 /* helpext.cpp in Sources */,
+				4086CAE6063AB30000D4CD53 /* gridsel.cpp in Sources */,
+				4086CAE7063AB30000D4CD53 /* gridctrl.cpp in Sources */,
+				4086CAE8063AB30000D4CD53 /* prntdlgg.cpp in Sources */,
+				4086CAE9063AB30000D4CD53 /* wizard.cpp in Sources */,
+				4086CAEA063AB30000D4CD53 /* treectlg.cpp in Sources */,
+				4086CAEB063AB30000D4CD53 /* tipwin.cpp in Sources */,
+				4086CAEC063AB30000D4CD53 /* tipdlg.cpp in Sources */,
+				4086CAED063AB30000D4CD53 /* textdlgg.cpp in Sources */,
+				4086CAEE063AB30000D4CD53 /* tabg.cpp in Sources */,
+				4086CAEF063AB30000D4CD53 /* statusbr.cpp in Sources */,
+				4086CAF0063AB30000D4CD53 /* splitter.cpp in Sources */,
+				4086CAF1063AB30000D4CD53 /* splash.cpp in Sources */,
+				4086CAF3063AB30000D4CD53 /* scrlwing.cpp in Sources */,
+				4086CAF4063AB30000D4CD53 /* sashwin.cpp in Sources */,
+				4086CAF5063AB30000D4CD53 /* progdlgg.cpp in Sources */,
+				4086CAF6063AB30000D4CD53 /* helpctrl.cpp in Sources */,
+				4086CAF7063AB30000D4CD53 /* helpdata.cpp in Sources */,
+				4086CAF8063AB30000D4CD53 /* helpfrm.cpp in Sources */,
+				4086CAF9063AB30000D4CD53 /* htmlcell.cpp in Sources */,
+				4086CAFA063AB30000D4CD53 /* m_fonts.cpp in Sources */,
+				4086CAFB063AB30000D4CD53 /* m_dflist.cpp in Sources */,
+				4086CAFC063AB30000D4CD53 /* htmprint.cpp in Sources */,
+				4086CAFD063AB30000D4CD53 /* htmlwin.cpp in Sources */,
+				4086CAFE063AB30000D4CD53 /* htmltag.cpp in Sources */,
+				4086CAFF063AB30000D4CD53 /* htmlpars.cpp in Sources */,
+				4086CB00063AB30000D4CD53 /* htmlfilt.cpp in Sources */,
+				4086CB01063AB30000D4CD53 /* m_hline.cpp in Sources */,
+				4086CB02063AB30000D4CD53 /* winpars.cpp in Sources */,
+				4086CB03063AB30000D4CD53 /* m_tables.cpp in Sources */,
+				4086CB04063AB30000D4CD53 /* m_pre.cpp in Sources */,
+				4086CB05063AB30000D4CD53 /* m_list.cpp in Sources */,
+				4086CB06063AB30000D4CD53 /* m_links.cpp in Sources */,
+				4086CB07063AB30000D4CD53 /* m_layout.cpp in Sources */,
+				4086CB08063AB30000D4CD53 /* m_image.cpp in Sources */,
+				4086CB09063AB30000D4CD53 /* jdcolor.c in Sources */,
+				4086CB0A063AB30000D4CD53 /* jdatasrc.c in Sources */,
+				4086CB0B063AB30000D4CD53 /* jdcoefct.c in Sources */,
+				4086CB0C063AB30000D4CD53 /* jdatadst.c in Sources */,
+				4086CB0D063AB30000D4CD53 /* jdapistd.c in Sources */,
+				4086CB0E063AB30000D4CD53 /* jdapimin.c in Sources */,
+				4086CB0F063AB30000D4CD53 /* jctrans.c in Sources */,
+				4086CB10063AB30000D4CD53 /* jcsample.c in Sources */,
+				4086CB11063AB30000D4CD53 /* jcprepct.c in Sources */,
+				4086CB12063AB30000D4CD53 /* jcphuff.c in Sources */,
+				4086CB13063AB30000D4CD53 /* jcparam.c in Sources */,
+				4086CB14063AB30000D4CD53 /* jcomapi.c in Sources */,
+				4086CB15063AB30000D4CD53 /* jcmaster.c in Sources */,
+				4086CB16063AB30000D4CD53 /* jcmarker.c in Sources */,
+				4086CB17063AB30000D4CD53 /* jcmainct.c in Sources */,
+				4086CB18063AB30000D4CD53 /* jcinit.c in Sources */,
+				4086CB19063AB30000D4CD53 /* jchuff.c in Sources */,
+				4086CB1A063AB30000D4CD53 /* jcdctmgr.c in Sources */,
+				4086CB1B063AB30000D4CD53 /* jccolor.c in Sources */,
+				4086CB1C063AB30000D4CD53 /* jccoefct.c in Sources */,
+				4086CB1D063AB30000D4CD53 /* jcapistd.c in Sources */,
+				4086CB1E063AB30000D4CD53 /* jcapimin.c in Sources */,
+				4086CB1F063AB30000D4CD53 /* jddctmgr.c in Sources */,
+				4086CB20063AB30000D4CD53 /* jutils.c in Sources */,
+				4086CB21063AB30000D4CD53 /* jquant2.c in Sources */,
+				4086CB22063AB30000D4CD53 /* jquant1.c in Sources */,
+				4086CB23063AB30000D4CD53 /* jmemnobs.c in Sources */,
+				4086CB24063AB30000D4CD53 /* jmemmgr.c in Sources */,
+				4086CB25063AB30000D4CD53 /* jidctred.c in Sources */,
+				4086CB26063AB30000D4CD53 /* jidctint.c in Sources */,
+				4086CB27063AB30000D4CD53 /* jidctfst.c in Sources */,
+				4086CB28063AB30000D4CD53 /* jidctflt.c in Sources */,
+				4086CB29063AB30000D4CD53 /* jfdctint.c in Sources */,
+				4086CB2A063AB30000D4CD53 /* jfdctfst.c in Sources */,
+				4086CB2B063AB30000D4CD53 /* jdhuff.c in Sources */,
+				4086CB2C063AB30000D4CD53 /* jdinput.c in Sources */,
+				4086CB2D063AB30000D4CD53 /* jdmainct.c in Sources */,
+				4086CB2E063AB30000D4CD53 /* jdmarker.c in Sources */,
+				4086CB2F063AB30000D4CD53 /* jdmaster.c in Sources */,
+				4086CB30063AB30000D4CD53 /* jdmerge.c in Sources */,
+				4086CB31063AB30000D4CD53 /* jdphuff.c in Sources */,
+				4086CB32063AB30000D4CD53 /* jdpostct.c in Sources */,
+				4086CB33063AB30000D4CD53 /* jdsample.c in Sources */,
+				4086CB34063AB30000D4CD53 /* jdtrans.c in Sources */,
+				4086CB35063AB30000D4CD53 /* jerror.c in Sources */,
+				4086CB36063AB30000D4CD53 /* jfdctflt.c in Sources */,
+				4086CB37063AB30000D4CD53 /* accel.cpp in Sources */,
+				4086CB39063AB30000D4CD53 /* app.cpp in Sources */,
+				4086CB3A063AB30000D4CD53 /* bitmap.cpp in Sources */,
+				4086CB3B063AB30000D4CD53 /* bmpbuttn.cpp in Sources */,
+				4086CB3C063AB30000D4CD53 /* brush.cpp in Sources */,
+				4086CB3D063AB30000D4CD53 /* button.cpp in Sources */,
+				4086CB3E063AB30000D4CD53 /* checkbox.cpp in Sources */,
+				4086CB3F063AB30000D4CD53 /* checklst.cpp in Sources */,
+				4086CB40063AB30000D4CD53 /* clipbrd.cpp in Sources */,
+				4086CB41063AB30000D4CD53 /* colordlg.cpp in Sources */,
+				4086CB42063AB30000D4CD53 /* colour.cpp in Sources */,
+				4086CB44063AB30000D4CD53 /* control.cpp in Sources */,
+				4086CB45063AB30000D4CD53 /* choice.cpp in Sources */,
+				4086CB46063AB30000D4CD53 /* cursor.cpp in Sources */,
+				4086CB47063AB30000D4CD53 /* data.cpp in Sources */,
+				4086CB48063AB30000D4CD53 /* dataobj.cpp in Sources */,
+				4086CB49063AB30000D4CD53 /* dc.cpp in Sources */,
+				4086CB4A063AB30000D4CD53 /* minifram.cpp in Sources */,
+				4086CB4B063AB30000D4CD53 /* mimetmac.cpp in Sources */,
+				4086CB4C063AB30000D4CD53 /* metafile.cpp in Sources */,
+				4086CB4D063AB30000D4CD53 /* msgdlg.cpp in Sources */,
+				4086CB4E063AB30000D4CD53 /* notebmac.cpp in Sources */,
+				4086CB4F063AB30000D4CD53 /* palette.cpp in Sources */,
+				4086CB50063AB30000D4CD53 /* pen.cpp in Sources */,
+				4086CB52063AB30000D4CD53 /* printmac.cpp in Sources */,
+				4086CB53063AB30000D4CD53 /* radiobox.cpp in Sources */,
+				4086CB54063AB30000D4CD53 /* printdlg.cpp in Sources */,
+				4086CB55063AB30000D4CD53 /* radiobut.cpp in Sources */,
+				4086CB56063AB30000D4CD53 /* region.cpp in Sources */,
+				4086CB57063AB30000D4CD53 /* scrolbar.cpp in Sources */,
+				4086CB58063AB30000D4CD53 /* settings.cpp in Sources */,
+				4086CB59063AB30000D4CD53 /* slider.cpp in Sources */,
+				4086CB5A063AB30000D4CD53 /* spinbutt.cpp in Sources */,
+				4086CB5B063AB30000D4CD53 /* statbmp.cpp in Sources */,
+				4086CB5C063AB30000D4CD53 /* statbrma.cpp in Sources */,
+				4086CB5D063AB30000D4CD53 /* statlmac.cpp in Sources */,
+				4086CB5E063AB30000D4CD53 /* stattext.cpp in Sources */,
+				4086CB5F063AB30000D4CD53 /* tabctrl.cpp in Sources */,
+				4086CB60063AB30000D4CD53 /* statbox.cpp in Sources */,
+				4086CB61063AB30000D4CD53 /* toolbar.cpp in Sources */,
+				4086CB62063AB30000D4CD53 /* textctrl.cpp in Sources */,
+				4086CB63063AB30000D4CD53 /* timer.cpp in Sources */,
+				4086CB64063AB30000D4CD53 /* tooltip.cpp in Sources */,
+				4086CB65063AB30000D4CD53 /* window.cpp in Sources */,
+				4086CB66063AB30000D4CD53 /* utilsexc.cpp in Sources */,
+				4086CB67063AB30000D4CD53 /* utils.cpp in Sources */,
+				4086CB68063AB30000D4CD53 /* uma.cpp in Sources */,
+				4086CB69063AB30000D4CD53 /* toplevel.cpp in Sources */,
+				4086CB6A063AB30000D4CD53 /* pngwutil.c in Sources */,
+				4086CB6B063AB30000D4CD53 /* pngwtran.c in Sources */,
+				4086CB6C063AB30000D4CD53 /* pngwrite.c in Sources */,
+				4086CB6D063AB30000D4CD53 /* pngwio.c in Sources */,
+				4086CB6E063AB30000D4CD53 /* pngtrans.c in Sources */,
+				4086CB6F063AB30000D4CD53 /* pngtest.c in Sources */,
+				4086CB70063AB30000D4CD53 /* pngset.c in Sources */,
+				4086CB71063AB30000D4CD53 /* pngrutil.c in Sources */,
+				4086CB72063AB30000D4CD53 /* pngrtran.c in Sources */,
+				4086CB73063AB30000D4CD53 /* pngrio.c in Sources */,
+				4086CB74063AB30000D4CD53 /* pngread.c in Sources */,
+				4086CB75063AB30000D4CD53 /* pngpread.c in Sources */,
+				4086CB76063AB30000D4CD53 /* pngmem.c in Sources */,
+				4086CB77063AB30000D4CD53 /* pngget.c in Sources */,
+				4086CB78063AB30000D4CD53 /* pngerror.c in Sources */,
+				4086CB79063AB30000D4CD53 /* png.c in Sources */,
+				4086CB7A063AB30000D4CD53 /* menuitem.cpp in Sources */,
+				4086CB7B063AB30000D4CD53 /* menu.cpp in Sources */,
+				4086CB7C063AB30000D4CD53 /* mdi.cpp in Sources */,
+				4086CB7D063AB30000D4CD53 /* macnotfy.cpp in Sources */,
+				4086CB7E063AB30000D4CD53 /* listbox.cpp in Sources */,
+				4086CB80063AB30000D4CD53 /* icon.cpp in Sources */,
+				4086CB81063AB30000D4CD53 /* taskbar.cpp in Sources */,
+				4086CB82063AB30000D4CD53 /* gauge.cpp in Sources */,
+				4086CB83063AB30000D4CD53 /* frame.cpp in Sources */,
+				4086CB84063AB30000D4CD53 /* fontutil.cpp in Sources */,
+				4086CB85063AB30000D4CD53 /* fontenum.cpp in Sources */,
+				4086CB86063AB30000D4CD53 /* fontdlg.cpp in Sources */,
+				4086CB87063AB30000D4CD53 /* font.cpp in Sources */,
+				4086CB88063AB30000D4CD53 /* filedlg.cpp in Sources */,
+				4086CB89063AB30000D4CD53 /* dnd.cpp in Sources */,
+				4086CB8A063AB30000D4CD53 /* dirmac.cpp in Sources */,
+				4086CB8B063AB30000D4CD53 /* dirdlg.cpp in Sources */,
+				4086CB8C063AB30000D4CD53 /* dialog.cpp in Sources */,
+				4086CB8D063AB30000D4CD53 /* dcscreen.cpp in Sources */,
+				4086CB8E063AB30000D4CD53 /* dcprint.cpp in Sources */,
+				4086CB8F063AB30000D4CD53 /* dcmemory.cpp in Sources */,
+				4086CB90063AB30000D4CD53 /* dcclient.cpp in Sources */,
+				4086CB91063AB30000D4CD53 /* tif_print.c in Sources */,
+				4086CB92063AB30000D4CD53 /* tif_predict.c in Sources */,
+				4086CB93063AB30000D4CD53 /* tif_pixarlog.c in Sources */,
+				4086CB94063AB30000D4CD53 /* tif_packbits.c in Sources */,
+				4086CB95063AB30000D4CD53 /* tif_open.c in Sources */,
+				4086CB96063AB30000D4CD53 /* tif_next.c in Sources */,
+				4086CB97063AB30000D4CD53 /* tif_lzw.c in Sources */,
+				4086CB98063AB30000D4CD53 /* tif_luv.c in Sources */,
+				4086CB99063AB30000D4CD53 /* tif_jpeg.c in Sources */,
+				4086CB9A063AB30000D4CD53 /* tif_getimage.c in Sources */,
+				4086CB9B063AB30000D4CD53 /* tif_flush.c in Sources */,
+				4086CB9C063AB30000D4CD53 /* tif_fax3sm.c in Sources */,
+				4086CB9D063AB30000D4CD53 /* tif_fax3.c in Sources */,
+				4086CB9E063AB30000D4CD53 /* tif_error.c in Sources */,
+				4086CB9F063AB30000D4CD53 /* tif_dumpmode.c in Sources */,
+				4086CBA0063AB30000D4CD53 /* tif_dirwrite.c in Sources */,
+				4086CBA1063AB30000D4CD53 /* tif_dirread.c in Sources */,
+				4086CBA2063AB30000D4CD53 /* tif_dirinfo.c in Sources */,
+				4086CBA3063AB30000D4CD53 /* tif_dir.c in Sources */,
+				4086CBA4063AB30000D4CD53 /* tif_compress.c in Sources */,
+				4086CBA5063AB30000D4CD53 /* tif_codec.c in Sources */,
+				4086CBA6063AB30000D4CD53 /* tif_close.c in Sources */,
+				4086CBA7063AB30000D4CD53 /* tif_aux.c in Sources */,
+				4086CBA8063AB30000D4CD53 /* tif_zip.c in Sources */,
+				4086CBA9063AB30000D4CD53 /* tif_write.c in Sources */,
+				4086CBAA063AB30000D4CD53 /* tif_warning.c in Sources */,
+				4086CBAB063AB30000D4CD53 /* tif_version.c in Sources */,
+				4086CBAC063AB30000D4CD53 /* tif_unix.c in Sources */,
+				4086CBAD063AB30000D4CD53 /* tif_tile.c in Sources */,
+				4086CBAE063AB30000D4CD53 /* tif_thunder.c in Sources */,
+				4086CBAF063AB30000D4CD53 /* tif_swab.c in Sources */,
+				4086CBB0063AB30000D4CD53 /* tif_strip.c in Sources */,
+				4086CBB1063AB30000D4CD53 /* tif_read.c in Sources */,
+				4086CBB2063AB30000D4CD53 /* hashmap.cpp in Sources */,
+				4086CBB3063AB30000D4CD53 /* artprov.cpp in Sources */,
+				4086CBB4063AB30000D4CD53 /* artstd.cpp in Sources */,
+				4086CBB5063AB30000D4CD53 /* iconbndl.cpp in Sources */,
+				4086CBB6063AB30000D4CD53 /* imagfill.cpp in Sources */,
+				4086CBB7063AB30000D4CD53 /* utilsunx.cpp in Sources */,
+				4086CBB8063AB30000D4CD53 /* snglinst.cpp in Sources */,
+				4086CBB9063AB30000D4CD53 /* msgout.cpp in Sources */,
+				4086CBBA063AB30000D4CD53 /* radiocmn.cpp in Sources */,
+				4086CBBB063AB30000D4CD53 /* settcmn.cpp in Sources */,
+				4086CBBC063AB30000D4CD53 /* display.cpp in Sources */,
+				4086CBBD063AB30000D4CD53 /* MoreFilesX.c in Sources */,
+				4086CBBE063AB30000D4CD53 /* accesscmn.cpp in Sources */,
+				4086CBBF063AB30000D4CD53 /* datacmn.cpp in Sources */,
+				4086CBC0063AB30000D4CD53 /* dpycmn.cpp in Sources */,
+				4086CBC1063AB30000D4CD53 /* rgncmn.cpp in Sources */,
+				4086CBC2063AB30000D4CD53 /* appbase.cpp in Sources */,
+				4086CBC3063AB30000D4CD53 /* dbgrid.cpp in Sources */,
+				4086CBC4063AB30000D4CD53 /* fldlgcmn.cpp in Sources */,
+				4086CBC5063AB30000D4CD53 /* fmapbase.cpp in Sources */,
+				4086CBC6063AB30000D4CD53 /* stopwatch.cpp in Sources */,
+				4086CBC7063AB30000D4CD53 /* renderer.cpp in Sources */,
+				4086CBC8063AB30000D4CD53 /* init.cpp in Sources */,
+				4086CBC9063AB30000D4CD53 /* renderg.cpp in Sources */,
+				4086CBCA063AB30000D4CD53 /* selstore.cpp in Sources */,
+				4086CBCB063AB30000D4CD53 /* baseunix.cpp in Sources */,
+				4086CBCC063AB30000D4CD53 /* rendcmn.cpp in Sources */,
+				4086CBCD063AB30000D4CD53 /* m_style.cpp in Sources */,
+				4086CBCE063AB30000D4CD53 /* xti.cpp in Sources */,
+				4086CBCF063AB30000D4CD53 /* xtistrm.cpp in Sources */,
+				4086CBD0063AB30000D4CD53 /* xtixml.cpp in Sources */,
+				4086CBD1063AB30000D4CD53 /* bookctrl.cpp in Sources */,
+				4086CBD2063AB30000D4CD53 /* sound.cpp in Sources */,
+				4086CBD4063AB30000D4CD53 /* glcanvas.cpp in Sources */,
+				4086CBD7063AB30000D4CD53 /* regcomp.c in Sources */,
+				4086CBD8063AB30000D4CD53 /* regerror.c in Sources */,
+				4086CBD9063AB30000D4CD53 /* regexec.c in Sources */,
+				4086CBDA063AB30000D4CD53 /* regfree.c in Sources */,
+				407A90F7065742ED00F01665 /* spinctrl.cpp in Sources */,
+				40F10E5C06AD0230003C7AC3 /* tglbtn.cpp in Sources */,
+				40F10E5D06AD0230003C7AC3 /* thread.cpp in Sources */,
+				40DCE35206C744C90000D83E /* gsocket.cpp in Sources */,
+				0A98CB6D07146A06007B4289 /* statbar.cpp in Sources */,
+				0A98CC4A0715CFBC007B4289 /* gdiobj.cpp in Sources */,
+				0A98CC4E0715D04C007B4289 /* taskbarcmn.cpp in Sources */,
+				40670A8807377A6400F7C08C /* cfstring.cpp in Sources */,
+				40670A8907377A6400F7C08C /* stdpaths_cf.cpp in Sources */,
+				40670A9F07377B1000F7C08C /* gbsizer.cpp in Sources */,
+				40670AA007377B1000F7C08C /* sstream.cpp in Sources */,
+				40670AA107377B1000F7C08C /* stdpbase.cpp in Sources */,
+				40670AA207377B1000F7C08C /* uri.cpp in Sources */,
+				40607C1A07493C3F00DC0420 /* archive.cpp in Sources */,
+				40607C7A0749432A00DC0420 /* gsockosx.cpp in Sources */,
+				40607C7B0749432B00DC0420 /* utilsexc_cf.cpp in Sources */,
+				40ECB13C074BD1D0005AAC48 /* stdpaths.cpp in Sources */,
+				40AF909307C8A926006A6D3C /* mediactrlcmn.cpp in Sources */,
+				40AF90A707C8A976006A6D3C /* datectlg.cpp in Sources */,
+				40AF90A807C8A976006A6D3C /* filedlgg.cpp in Sources */,
+				40AF90A907C8A976006A6D3C /* htmllbox.cpp in Sources */,
+				40AF90AB07C8A976006A6D3C /* vlbox.cpp in Sources */,
+				40AF90AC07C8A976006A6D3C /* vscroll.cpp in Sources */,
+				40AF90B907C8A9CF006A6D3C /* hid.cpp in Sources */,
+				40AF90BA07C8A9CF006A6D3C /* hidjoystick.cpp in Sources */,
+				40AF90C007C8AA08006A6D3C /* dlunix.cpp in Sources */,
+				40AF90C507C8AA17006A6D3C /* chm.cpp in Sources */,
+				40AF90F707C8B18C006A6D3C /* colordlgosx.mm in Sources */,
+				40AF90F907C8B18C006A6D3C /* dccg.cpp in Sources */,
+				40AF90FA07C8B18C006A6D3C /* drawer.cpp in Sources */,
+				40AF90FB07C8B18C006A6D3C /* fontdlgosx.mm in Sources */,
+				40AF90FD07C8B18C006A6D3C /* mediactrl.cpp in Sources */,
+				40AF913807C8BD1F006A6D3C /* combobox.cpp in Sources */,
+				40AF915607C8C912006A6D3C /* tif_color.c in Sources */,
+				40AF915707C8C912006A6D3C /* tif_extension.c in Sources */,
+				401640E607F94B2800A8837A /* imaglist.cpp in Sources */,
+				40ADC34A08156AE40009DA36 /* debugrpt.cpp in Sources */,
+				40ADC36008156DC10009DA36 /* xml.cpp in Sources */,
+				40ADC39008156DEB0009DA36 /* xh_bmp.cpp in Sources */,
+				40ADC39108156DEB0009DA36 /* xh_bmpbt.cpp in Sources */,
+				40ADC39208156DEB0009DA36 /* xh_bttn.cpp in Sources */,
+				40ADC39308156DEB0009DA36 /* xh_cald.cpp in Sources */,
+				40ADC39408156DEB0009DA36 /* xh_chckb.cpp in Sources */,
+				40ADC39508156DEB0009DA36 /* xh_chckl.cpp in Sources */,
+				40ADC39608156DEB0009DA36 /* xh_choic.cpp in Sources */,
+				40ADC39708156DEB0009DA36 /* xh_choicbk.cpp in Sources */,
+				40ADC39808156DEB0009DA36 /* xh_combo.cpp in Sources */,
+				40ADC39908156DEB0009DA36 /* xh_datectrl.cpp in Sources */,
+				40ADC39A08156DEB0009DA36 /* xh_dlg.cpp in Sources */,
+				40ADC39B08156DEB0009DA36 /* xh_frame.cpp in Sources */,
+				40ADC39C08156DEB0009DA36 /* xh_gauge.cpp in Sources */,
+				40ADC39D08156DEB0009DA36 /* xh_gdctl.cpp in Sources */,
+				40ADC39E08156DEB0009DA36 /* xh_html.cpp in Sources */,
+				40ADC39F08156DEB0009DA36 /* xh_listb.cpp in Sources */,
+				40ADC3A008156DEB0009DA36 /* xh_listbk.cpp in Sources */,
+				40ADC3A108156DEB0009DA36 /* xh_listc.cpp in Sources */,
+				40ADC3A208156DEB0009DA36 /* xh_mdi.cpp in Sources */,
+				40ADC3A308156DEB0009DA36 /* xh_menu.cpp in Sources */,
+				40ADC3A408156DEB0009DA36 /* xh_notbk.cpp in Sources */,
+				40ADC3A508156DEB0009DA36 /* xh_panel.cpp in Sources */,
+				40ADC3A608156DEB0009DA36 /* xh_radbt.cpp in Sources */,
+				40ADC3A708156DEB0009DA36 /* xh_radbx.cpp in Sources */,
+				40ADC3A808156DEB0009DA36 /* xh_scrol.cpp in Sources */,
+				40ADC3A908156DEB0009DA36 /* xh_scwin.cpp in Sources */,
+				40ADC3AA08156DEB0009DA36 /* xh_sizer.cpp in Sources */,
+				40ADC3AB08156DEB0009DA36 /* xh_slidr.cpp in Sources */,
+				40ADC3AC08156DEB0009DA36 /* xh_spin.cpp in Sources */,
+				40ADC3AD08156DEB0009DA36 /* xh_split.cpp in Sources */,
+				40ADC3AE08156DEB0009DA36 /* xh_statbar.cpp in Sources */,
+				40ADC3AF08156DEB0009DA36 /* xh_stbmp.cpp in Sources */,
+				40ADC3B008156DEB0009DA36 /* xh_stbox.cpp in Sources */,
+				40ADC3B108156DEB0009DA36 /* xh_stlin.cpp in Sources */,
+				40ADC3B208156DEB0009DA36 /* xh_sttxt.cpp in Sources */,
+				40ADC3B308156DEB0009DA36 /* xh_text.cpp in Sources */,
+				40ADC3B408156DEB0009DA36 /* xh_tglbtn.cpp in Sources */,
+				40ADC3B508156DEB0009DA36 /* xh_toolb.cpp in Sources */,
+				40ADC3B608156DEB0009DA36 /* xh_tree.cpp in Sources */,
+				40ADC3B708156DEB0009DA36 /* xh_unkwn.cpp in Sources */,
+				40ADC3B808156DEB0009DA36 /* xh_wizrd.cpp in Sources */,
+				40ADC3B908156DEB0009DA36 /* xmlres.cpp in Sources */,
+				40ADC3BA08156DEB0009DA36 /* xmlrsall.cpp in Sources */,
+				40ADC44508156EDC0009DA36 /* xmlparse.c in Sources */,
+				40ADC44608156EDC0009DA36 /* xmlrole.c in Sources */,
+				40ADC44708156EDC0009DA36 /* xmltok.c in Sources */,
+				40ADC47408160C200009DA36 /* choicbkg.cpp in Sources */,
+				40ADC47508160C200009DA36 /* listbkg.cpp in Sources */,
+				40ADC48708160CAD0009DA36 /* dbgrptg.cpp in Sources */,
+				40FF2B0D0869B1530013E961 /* webkit.mm in Sources */,
+				40011CBC0893D5B400E4DE95 /* utilsexc_base.cpp in Sources */,
+				400EDEB3089D4FFD00E848D9 /* propdlg.cpp in Sources */,
+				409F02700976CA5600D1030F /* xh_grid.cpp in Sources */,
+				40CDE8D20982505E00E8156D /* evtloopcmn.cpp in Sources */,
+				40CDE8DA098250AB00E8156D /* evtloop.cpp in Sources */,
+				43DFF5BC09926F7B0033000B /* helpdlg.cpp in Sources */,
+				43DFF5BD09926F7B0033000B /* helpwnd.cpp in Sources */,
+				40F0173C0A30684000AC9076 /* colourcmn.cpp in Sources */,
+				40F0173D0A30684000AC9076 /* convauto.cpp in Sources */,
+				40F017430A306C7600AC9076 /* fontenumcmn.cpp in Sources */,
+				408A59850A8998A40014D20E /* buttonbar.cpp in Sources */,
+				408A59860A8998A40014D20E /* toolbkg.cpp in Sources */,
+				408A59870A8998A40014D20E /* treebkg.cpp in Sources */,
+				408A59910A8998DB0014D20E /* clrpickerg.cpp in Sources */,
+				408A59920A8998DB0014D20E /* filepickerg.cpp in Sources */,
+				408A59930A8998DB0014D20E /* fontpickerg.cpp in Sources */,
+				408A59940A8998DB0014D20E /* hyperlink.cpp in Sources */,
+				408A59950A8998DB0014D20E /* odcombo.cpp in Sources */,
+				408A59A50A89992F0014D20E /* clrpickercmn.cpp in Sources */,
+				408A59A60A89992F0014D20E /* combocmn.cpp in Sources */,
+				408A59A70A89992F0014D20E /* filepickercmn.cpp in Sources */,
+				408A59A80A89992F0014D20E /* fontpickercmn.cpp in Sources */,
+				408A59A90A89992F0014D20E /* pickerbase.cpp in Sources */,
+				408A59AA0A89992F0014D20E /* powercmn.cpp in Sources */,
+				408A59B30A8999500014D20E /* combog.cpp in Sources */,
+				408A59BD0A8999800014D20E /* xh_clrpicker.cpp in Sources */,
+				408A59BE0A8999800014D20E /* xh_dirpicker.cpp in Sources */,
+				408A59BF0A8999800014D20E /* xh_filepicker.cpp in Sources */,
+				408A59C00A8999800014D20E /* xh_fontpicker.cpp in Sources */,
+				408A59C10A8999800014D20E /* xh_hyperlink.cpp in Sources */,
+				408A59C20A8999800014D20E /* xh_odcombo.cpp in Sources */,
+				408A59C30A8999800014D20E /* xh_treebk.cpp in Sources */,
+				407C6ADD0A899E260056252A /* auibook.cpp in Sources */,
+				407C6ADE0A899E260056252A /* dockart.cpp in Sources */,
+				407C6ADF0A899E260056252A /* floatpane.cpp in Sources */,
+				407C6AE00A899E260056252A /* framemanager.cpp in Sources */,
+				407C6AE10A899E260056252A /* tabmdi.cpp in Sources */,
+				40AEF28C0AB5EC0800B2C19A /* platinfo.cpp in Sources */,
+				403F73950AC9985500FF2BCB /* listctrl_mac.cpp in Sources */,
+				403F73980AC9986E00FF2BCB /* listctrlcmn.cpp in Sources */,
+				4067EF250ACD43BC004A2D14 /* graphcmn.cpp in Sources */,
+				4067EFC10ACD5306004A2D14 /* xh_bmpcbox.cpp in Sources */,
+				4067EFC50ACD53B1004A2D14 /* bmpcboxg.cpp in Sources */,
+				4067EFC90ACD53ED004A2D14 /* graphics.cpp in Sources */,
+				404DAED40ADD137500687775 /* aboutdlg.cpp in Sources */,
+				404DAED70ADD138E00687775 /* animateg.cpp in Sources */,
+				404DAEDC0ADD13E600687775 /* anidecod.cpp in Sources */,
+				404DAEDD0ADD13E600687775 /* animatecmn.cpp in Sources */,
+				404DAEEB0ADD143200687775 /* aboutdlgg.cpp in Sources */,
+				404DB1630ADD3EC100687775 /* richtextbuffer.cpp in Sources */,
+				404DB1640ADD3EC100687775 /* richtextctrl.cpp in Sources */,
+				404DB1650ADD3EC200687775 /* richtexthtml.cpp in Sources */,
+				404DB1660ADD3EC200687775 /* richtextstyles.cpp in Sources */,
+				404DB1670ADD3EC300687775 /* richtextxml.cpp in Sources */,
+				404DB2500ADD40EA00687775 /* richtextformatdlg.cpp in Sources */,
+				404DB2640ADD41B300687775 /* richtextsymboldlg.cpp in Sources */,
+				404DB2720ADD429D00687775 /* dcbufcmn.cpp in Sources */,
+				402AB25E0AFF554A00C0D0C9 /* arcall.cpp in Sources */,
+				402AB25F0AFF554A00C0D0C9 /* arcfind.cpp in Sources */,
+				402AB2600AFF554A00C0D0C9 /* dcgraph.cpp in Sources */,
+				402AB2610AFF554A00C0D0C9 /* fileback.cpp in Sources */,
+				402AB2620AFF554A00C0D0C9 /* filtall.cpp in Sources */,
+				402AB2630AFF554A00C0D0C9 /* filtfind.cpp in Sources */,
+				402AB2640AFF554A00C0D0C9 /* fs_arc.cpp in Sources */,
+				402AB2650AFF554A00C0D0C9 /* fs_filter.cpp in Sources */,
+				402AB2660AFF554A00C0D0C9 /* overlaycmn.cpp in Sources */,
+				402AB2670AFF554A00C0D0C9 /* tarstrm.cpp in Sources */,
+				402AB2730AFF55AF00C0D0C9 /* overlay.cpp in Sources */,
+				402AB2760AFF55E300C0D0C9 /* collpaneg.cpp in Sources */,
+				402AB27D0AFF567500C0D0C9 /* xh_animatctrl.cpp in Sources */,
+				402AB27E0AFF567600C0D0C9 /* xh_collpane.cpp in Sources */,
+				402AB27F0AFF567600C0D0C9 /* xh_htmllbox.cpp in Sources */,
+				402AB42B0AFF574600C0D0C9 /* imagtga.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		4086D203063BC05E00D4CD53 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 4086C742063AB2FF00D4CD53 /* static */;
+			targetProxy = 4086D202063BC05E00D4CD53 /* PBXContainerItemProxy */;
+		};
+		4086D207063BC05E00D4CD53 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 4086CA55063AB30000D4CD53 /* dynamic */;
+			targetProxy = 4086D206063BC05E00D4CD53 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+		18B5B98B08564B5D002803C9 /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				DYLIB_COMPATIBILITY_VERSION = 2.6;
+				DYLIB_CURRENT_VERSION = 2.8.0;
+				GCC_INPUT_FILETYPE = automatic;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PFE_FILE_C_DIALECTS = "c++";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = ../include/wx/wxprec.h;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NO_GCC_PRAGMA,
+					__WXMAC__,
+					"wxUSE_BASE=1",
+					"_FILE_OFFSET_BITS=64",
+					_LARGE_FILES,
+					"__WXMAC_XCODE__=1",
+					"WX_PRECOMP=1",
+					MACOS_CLASSIC,
+					"__WXDEBUG__=1",
+				);
+				GCC_USE_GCC3_PFE_SUPPORT = YES;
+				GCC_VERSION_i386 = 4.0;
+				GCC_VERSION_ppc = 3.3;
+				GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+				GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
+				GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
+				GCC_WARN_UNINITIALIZED_AUTOS = NO;
+				MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+				MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
+				PRODUCT_NAME = "$(PRODUCT_NAME)_static";
+				USER_HEADER_SEARCH_PATHS = "${SYMROOT}/include ../include mac/carbon/morefilex common jpeg png regex expat/lib tiff";
+				USE_HEADERMAP = NO;
+				USE_SEPARATE_HEADERMAPS = YES;
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+				);
+			};
+			name = Development;
+		};
+		18B5B98C08564B5D002803C9 /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				DYLIB_COMPATIBILITY_VERSION = 2.6;
+				DYLIB_CURRENT_VERSION = 2.8.0;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_INPUT_FILETYPE = automatic;
+				GCC_PFE_FILE_C_DIALECTS = "c++";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = ../include/wx/wxprec.h;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NO_GCC_PRAGMA,
+					__WXMAC__,
+					"wxUSE_BASE=1",
+					"_FILE_OFFSET_BITS=64",
+					_LARGE_FILES,
+					"__WXMAC_XCODE__=1",
+					"WX_PRECOMP=1",
+					MACOS_CLASSIC,
+				);
+				GCC_USE_GCC3_PFE_SUPPORT = YES;
+				GCC_VERSION_i386 = 4.0;
+				GCC_VERSION_ppc = 3.3;
+				GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
+				GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+				MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
+				PRODUCT_NAME = "$(PRODUCT_NAME)_static";
+				UNSTRIPPED_PRODUCT = NO;
+				USER_HEADER_SEARCH_PATHS = "${SYMROOT}/include ../include mac/carbon/morefilex common jpeg png regex expat/lib tiff";
+				USE_HEADERMAP = NO;
+				USE_SEPARATE_HEADERMAPS = YES;
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+				);
+			};
+			name = Deployment;
+		};
+		18B5B99308564B5D002803C9 /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = (
+					i386,
+					ppc,
+				);
+				DEBUG_INFORMATION_FORMAT = stabs;
+				DYLIB_COMPATIBILITY_VERSION = 2.6;
+				DYLIB_CURRENT_VERSION = 2.6.0;
+				EXECUTABLE_PREFIX = lib;
+				GCC_C_LANGUAGE_STANDARD = "compiler-default";
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_INPUT_FILETYPE = automatic;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PFE_FILE_C_DIALECTS = "c++";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = ../include/wx/wxprec.h;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NO_GCC_PRAGMA,
+					__WXMAC__,
+					WXMAKINGDLL,
+					"wxUSE_BASE=1",
+					"_FILE_OFFSET_BITS=64",
+					_LARGE_FILES,
+					"__WXMAC_XCODE__=1",
+					"WX_PRECOMP=1",
+					MACOS_CLASSIC,
+					"__WXDEBUG__=1",
+				);
+				GCC_USE_GCC3_PFE_SUPPORT = YES;
+				GCC_VERSION_i386 = 4.0;
+				GCC_VERSION_ppc = 3.3;
+				GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+				INSTALL_PATH = "@executable_path/../Frameworks/";
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+				MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
+				OTHER_LDFLAGS = (
+					"$(value)",
+					"-flat_namespace",
+				);
+				OTHER_LIBTOOL_FLAGS = "$(value) ";
+				OTHER_REZFLAGS = "-d __UNIX__";
+				REZ_EXECUTABLE = NO;
+				USER_HEADER_SEARCH_PATHS = "${SYMROOT}/include ../include mac/carbon/morefilex common jpeg png regex expat/lib tiff";
+				USE_HEADERMAP = FALSE;
+				USE_SEPARATE_HEADERMAPS = YES;
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+				);
+			};
+			name = Development;
+		};
+		18B5B99408564B5D002803C9 /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				DYLIB_COMPATIBILITY_VERSION = 2.6;
+				DYLIB_CURRENT_VERSION = 2.6.0;
+				EXECUTABLE_PREFIX = lib;
+				GCC_C_LANGUAGE_STANDARD = "compiler-default";
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_INPUT_FILETYPE = automatic;
+				GCC_PFE_FILE_C_DIALECTS = "c++";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = ../include/wx/wxprec.h;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NO_GCC_PRAGMA,
+					WXMAKINGDLL,
+					__WXMAC__,
+					"wxUSE_BASE=1",
+					"_FILE_OFFSET_BITS=64",
+					_LARGE_FILES,
+					"__WXMAC_XCODE__=1",
+					MACOS_CLASSIC,
+					"WX_PRECOMP=1",
+				);
+				GCC_USE_GCC3_PFE_SUPPORT = YES;
+				GCC_VERSION_i386 = 4.0;
+				GCC_VERSION_ppc = 3.3;
+				INSTALL_PATH = "@executable_path/../Frameworks/";
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+				MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
+				OTHER_LDFLAGS = (
+					"$(value)",
+					"-flat_namespace",
+				);
+				OTHER_LIBTOOL_FLAGS = "$(value) ";
+				OTHER_REZFLAGS = "-d __UNIX__";
+				REZ_EXECUTABLE = NO;
+				SKIP_INSTALL = YES;
+				USER_HEADER_SEARCH_PATHS = "${SYMROOT}/include ../include mac/carbon/morefilex common jpeg png regex expat/lib tiff";
+				USE_HEADERMAP = FALSE;
+				USE_SEPARATE_HEADERMAPS = YES;
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+				);
+			};
+			name = Deployment;
+		};
+		18B5B99B08564B5D002803C9 /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				OTHER_CFLAGS = "";
+				OTHER_LDFLAGS = "";
+				OTHER_REZFLAGS = "";
+				PRODUCT_NAME = "Build All";
+				SECTORDER_FLAGS = "";
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+				);
+				ZERO_LINK = YES;
+			};
+			name = Development;
+		};
+		18B5B99C08564B5D002803C9 /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				OTHER_CFLAGS = "";
+				OTHER_LDFLAGS = "";
+				OTHER_REZFLAGS = "";
+				PRODUCT_NAME = "Build All";
+				SECTORDER_FLAGS = "";
+				WARNING_CFLAGS = (
+					"-Wmost",
+					"-Wno-four-char-constants",
+					"-Wno-unknown-pragmas",
+				);
+				ZERO_LINK = NO;
+			};
+			name = Deployment;
+		};
+		18B5B99F08564B5D002803C9 /* Development */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					ppc,
+					i386,
+				);
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_OPTIMIZATION_LEVEL = 1;
+				GCC_PREPROCESSOR_DEFINITIONS = "__WXDEBUG__\n";
+				GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+				PRODUCT_NAME = wx_mac;
+				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+				ZERO_LINK = YES;
+			};
+			name = Development;
+		};
+		18B5B9A008564B5D002803C9 /* Deployment */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					ppc,
+					i386,
+				);
+				GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+				PRODUCT_NAME = wx_mac;
+				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+				ZERO_LINK = NO;
+			};
+			name = Deployment;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		18B5B98A08564B5D002803C9 /* Build configuration list for PBXNativeTarget "static" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				18B5B98B08564B5D002803C9 /* Development */,
+				18B5B98C08564B5D002803C9 /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		18B5B99208564B5D002803C9 /* Build configuration list for PBXNativeTarget "dynamic" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				18B5B99308564B5D002803C9 /* Development */,
+				18B5B99408564B5D002803C9 /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		18B5B99A08564B5D002803C9 /* Build configuration list for PBXAggregateTarget "Build All" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				18B5B99B08564B5D002803C9 /* Development */,
+				18B5B99C08564B5D002803C9 /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+		18B5B99E08564B5D002803C9 /* Build configuration list for PBXProject "wxMac-BOINC" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				18B5B99F08564B5D002803C9 /* Development */,
+				18B5B9A008564B5D002803C9 /* Deployment */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Development;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}
diff --git a/mac_installer/AddRemoveUser.cpp b/mac_installer/AddRemoveUser.cpp
new file mode 100644
index 0000000..6f23ab1
--- /dev/null
+++ b/mac_installer/AddRemoveUser.cpp
@@ -0,0 +1,263 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2009 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/*  AddRemoveUser.cpp */
+
+#include <Carbon/Carbon.h>
+
+#include <unistd.h>	// getlogin
+#include <sys/types.h>	// getpwname, getpwuid, getuid
+#include <pwd.h>	// getpwname, getpwuid, getuid
+#include <grp.h>        // getgrnam
+
+#include "LoginItemAPI.h"  //please take a look at LoginItemAPI.h for an explanation of the routines available to you.
+
+void printUsage(void);
+void SetLoginItem(Boolean addLogInItem);
+static char * PersistentFGets(char *buf, size_t buflen, FILE *f);
+
+
+int main(int argc, char *argv[])
+{
+    Boolean             AddUsers = false;
+    Boolean             SetSavers = false;
+    Boolean             isBMGroupMember, isBPGroupMember;
+    Boolean             saverIsSet = false;
+    passwd              *pw;
+    uid_t               saved_uid;
+    long                OSVersion;
+    group               grpBOINC_master, *grpBOINC_masterPtr;
+    group               grpBOINC_project, *grpBOINC_projectPtr;
+    char                bmBuf[32768];
+    char                bpBuf[32768];
+    short               index, i;
+    char                *p;
+    char                s[256];
+    FILE                *f;
+    OSStatus            err;
+    
+#ifndef _DEBUG
+    if (getuid() != 0) {
+        printf("This program must be run as root\n");
+        printUsage();
+        return 0;
+    }
+#endif
+
+    if (argc < 3) {
+        printUsage();
+        return 0;
+    }
+    
+    if (strcmp(argv[1], "-a") == 0) {
+        AddUsers = true;
+    } else if (strcmp(argv[1], "-s") == 0) {
+        AddUsers = true;
+        SetSavers = true;
+    } else if (strcmp(argv[1], "-r") != 0) {
+        printUsage();
+        return 0;
+    }
+    
+    err = Gestalt(gestaltSystemVersion, &OSVersion);
+    if (err != noErr)
+        return err;
+
+    err = getgrnam_r("boinc_master", &grpBOINC_master, bmBuf, sizeof(bmBuf), &grpBOINC_masterPtr);
+    if (err) {          // Should never happen unless buffer too small
+        puts("getgrnam(\"boinc_master\") failed\n");
+        return -1;
+    }
+
+    err = getgrnam_r("boinc_project", &grpBOINC_project, bpBuf, sizeof(bpBuf), &grpBOINC_projectPtr);
+    if (err) {          // Should never happen unless buffer too small
+        puts("getgrnam(\"boinc_project\") failed\n");
+        return -1;
+    }
+
+    for (index=2; index<argc; index++) {
+        // getpwnam works with either the full / login name (pw->pw_gecos) 
+        // or the short / Posix name (pw->pw_name)
+        pw = getpwnam(argv[index]);
+        if (pw == NULL) {
+            printf("User %s not found.\n", argv[index]);
+            continue;
+        }
+
+        isBMGroupMember = false;
+        i = 0;
+        while ((p = grpBOINC_master.gr_mem[i]) != NULL) {  // Step through all users in group boinc_master
+            if (strcmp(p, pw->pw_name) == 0) {      // Only the short / Posix names are in the list
+                // User is a member of group boinc_master
+                isBMGroupMember = true;
+                break;
+            }
+            ++i;
+        }
+
+        isBPGroupMember = false;
+        i = 0;
+        while ((p = grpBOINC_project.gr_mem[i]) != NULL) {  // Step through all users in group boinc_project
+            if (strcmp(p, pw->pw_name) == 0) {      // Only the short / Posix names are in the list
+                // User is a member of group boinc_master
+                isBPGroupMember = true;
+                break;
+            }
+            ++i;
+        }
+
+        if ((!isBMGroupMember) && AddUsers) {
+            sprintf(s, "dscl . -merge /groups/boinc_master GroupMembership %s", pw->pw_name);
+            system(s);
+        }
+        
+        if ((!isBPGroupMember) && AddUsers) {
+            sprintf(s, "dscl . -merge /groups/boinc_project GroupMembership %s", pw->pw_name);
+            system(s);
+        }
+        
+        if (isBMGroupMember && (!AddUsers)) {
+            sprintf(s, "dscl . -delete /Groups/boinc_master GroupMembership %s", pw->pw_name);
+            system(s);
+        }
+
+        if (isBPGroupMember && (!AddUsers)) {
+            sprintf(s, "dscl . -delete /Groups/boinc_project GroupMembership %s", pw->pw_name);
+            system(s);
+        }
+
+        saved_uid = geteuid();
+        seteuid(pw->pw_uid);                        // Temporarily set effective uid to this user
+
+        SetLoginItem(AddUsers);                     // Set or remove login item for this user
+
+        if (OSVersion < 0x1060) {
+            sprintf(s, "sudo -u %s defaults -currentHost read com.apple.screensaver moduleName", 
+                    pw->pw_name); 
+        } else {
+            sprintf(s, "sudo -u %s defaults -currentHost read com.apple.screensaver moduleDict -dict", 
+                    pw->pw_name); 
+        }
+        f = popen(s, "r");
+        
+        if (f) {
+            saverIsSet = false;
+            while (PersistentFGets(s, sizeof(s), f)) {
+                if (strstr(s, "BOINCSaver")) {
+                    saverIsSet = true;
+                    break;
+                }
+            }
+            pclose(f);
+        }
+
+        if ((!saverIsSet) && SetSavers) {
+            if (OSVersion < 0x1060) {
+                sprintf(s, "sudo -u %s defaults -currentHost write com.apple.screensaver moduleName BOINCSaver", 
+                    pw->pw_name); 
+                system(s);
+                sprintf(s, "sudo -u %s defaults -currentHost write com.apple.screensaver modulePath \"/Library/Screen Savers/BOINCSaver.saver\"", 
+                    pw->pw_name); 
+                system(s);
+            } else {
+                sprintf(s, "sudo -u %s defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName BOINCSaver path \"/Library/Screen Savers/BOINCSaver.saver\"", 
+                        pw->pw_name);
+                system(s);
+            }
+        }
+        
+        if (saverIsSet && (!AddUsers)) {
+            if (OSVersion < 0x1060) {
+                sprintf(s, "sudo -u %s defaults -currentHost write com.apple.screensaver moduleName Flurry", 
+                    pw->pw_name); 
+                system(s);
+                sprintf(s, "sudo -u %s defaults -currentHost write com.apple.screensaver modulePath \"/System/Library/Screen Savers/Flurry.saver\"", 
+                    pw->pw_name); 
+                system(s);
+            } else {
+                sprintf(s, "sudo -u %s defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName Flurry path \"/System/Library/Screen Savers/Flurry.saver\"", 
+                        pw->pw_name);
+                system(s);
+            }
+        }
+
+        seteuid(saved_uid);                         // Set effective uid back to privileged user
+    }
+
+    printf("WARNING: Changes may require a system restart to take effect.\n");
+    
+    return 0;
+}
+
+void printUsage() {
+    printf("Usage: sudo AddRemoveUser [-a | -s | -r] [user1 [user2 [user3...]]]\n");
+    printf("   -a: add users to those with permission to run BOINC Manager.\n");
+    printf("   -s: same as -a plus set users' screensaver to BOINC.\n");
+    printf("   -r: remove users' permission to run BOINC Manager, and \n");
+    printf("      if their screensaver was set to BOINC change it to Flurry.\n");
+    printf("\n");
+}
+
+void SetLoginItem(Boolean addLogInItem){
+    Boolean                 Success;
+    int                     NumberOfLoginItems, Counter;
+    char                    *p, *q;
+
+    Success = false;
+    
+    NumberOfLoginItems = GetCountOfLoginItems(kCurrentUser);
+    
+    // Search existing login items in reverse order, deleting any duplicates of ours
+    for (Counter = NumberOfLoginItems ; Counter > 0 ; Counter--)
+    {
+        p = ReturnLoginItemPropertyAtIndex(kCurrentUser, kApplicationNameInfo, Counter-1);
+        if (p == NULL) continue;
+        q = p;
+        while (*q)
+        {
+            // It is OK to modify the returned string because we "own" it
+            *q = toupper(*q);	// Make it case-insensitive
+            q++;
+        }
+    
+        if (strcmp(p, "BOINCMANAGER.APP") == 0) {
+            Success = RemoveLoginItemAtIndex(kCurrentUser, Counter-1);
+        }
+    }
+
+    if (addLogInItem) {
+        Success = AddLoginItemWithPropertiesToUser(kCurrentUser, "/Applications/BOINCManager.app", kHideOnLaunch);
+    }
+}
+
+static char * PersistentFGets(char *buf, size_t buflen, FILE *f) {
+    char *p = buf;
+    size_t len = buflen;
+    size_t datalen = 0;
+
+    *buf = '\0';
+    while (datalen < (buflen - 1)) {
+        fgets(p, len, f);
+        if (feof(f)) break;
+        if (ferror(f) && (errno != EINTR)) break;
+        if (strchr(buf, '\n')) break;
+        datalen = strlen(buf);
+        p = buf + datalen;
+        len -= datalen;
+    }
+    return (buf[0] ? buf : NULL);
+}
diff --git a/mac_installer/BOINC.pmproj b/mac_installer/BOINC.pmproj
new file mode 100644
index 0000000..1dbe5b1
Binary files /dev/null and b/mac_installer/BOINC.pmproj differ
diff --git a/mac_installer/BOINC.pmsp b/mac_installer/BOINC.pmsp
new file mode 100644
index 0000000..0d59f2a
Binary files /dev/null and b/mac_installer/BOINC.pmsp differ
diff --git a/mac_installer/CE-Branding b/mac_installer/CE-Branding
new file mode 100644
index 0000000..257fa2f
--- /dev/null
+++ b/mac_installer/CE-Branding
@@ -0,0 +1 @@
+BrandId=3
diff --git a/mac_installer/CE-ReadMe.rtf b/mac_installer/CE-ReadMe.rtf
new file mode 100644
index 0000000..fc3b9dc
--- /dev/null
+++ b/mac_installer/CE-ReadMe.rtf
@@ -0,0 +1,165 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red2\green87\blue173;}
+\margl1440\margr1440\vieww9000\viewh9000\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\f0\b\fs28 \cf0 Macintosh Charity Engine Desktop Version <VER_NUM> Release Notes\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+\cf0 http://gridrepublic.org\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Installing 
+\fs28 Charity Engine
+\fs24  Desktop may take several minutes; please be patient.
+\b0 \
+\
+
+\b Dual GPU Macbook Pros:
+\b0  Some newer Macbook Pros have dual graphics processors, one that is more powerful and another that is more energy-efficient, and they switch between them automatically.  This can cause your screensaver to flash on and off frequently, and can prevent Charity Engine Desktop from detecting the more powerful GPU which is needed to process some applications.  You can force selection either {\field{\*\fldinst{HYPERLINK "http://support.apple.com/kb/HT4110"}}{\fldrslt \cf2 permanently}} or temporarily using a {\field{\*\fldinst{HYPERLINK "http://codykrieger.com/gfxCardStatus/"}}{\fldrslt \cf2 third-party utility}}. But be aware that forcing the use of the NVIDIA GPU may cause faster battery drain; this of course is not an issue when running on AC power.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Upgrade warning 1: 
+\b0 There have been changes to Charity Engine Desktop's internal file formats.   When you upgrade from version 6.12.x or earlier, Charity Engine Desktop will automatically upgrade its files.  However, if for any reason you wish to downgrade again to a version earlier than 6.13.x, you will lose any unreported work.  The project servers will send you the tasks again, but they will be restarted from the beginning.  If you think you might need to revert to an older version of Charity Engine Desktop, you should back up your BOINC Data folder before upgrading.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 If you are upgrading from a version earlier than 6.8.0, you may see a message "Failed to convert file Charity Engine Desktop Preferences to Unicode."  This is due to our addition of full Unicode support to the Charity Engine Desktop.  If you get this message, you may need to readjust your column widths and other Charity Engine Desktop view options, but no other problems will result.  When  you quit Charity Engine Desktop, these settings will be saved in the new Unicode format.\
+\
+Due to new restrictions imposed by OS 10.6 Snow Leopard, there has been a change in Charity Engine Desktop's security implementation.  Non-administrative users can no longer run Charity Engine Desktop unless they are added to group boinc_master.  As of Charity Engine Desktop 6.8.29, the Charity Engine Desktop installer asks whether or not you wish to allow this.\
+\
+For more options, please see the BOINC Macintosh administrator tools at:\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+{\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X"}}{\fldrslt \cf0 http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X}}\
+\
+Charity Engine Desktop on the Mac now supports processing with your graphics card, or GPU.  Please see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/gpu.php"}}{\fldrslt http://boinc.berkeley.edu/gpu.php}} for more information.   If you have a CUDA-capable NVIDIA GPU, you will need to download and install the CUDA driver and libraries for your system from {\field{\*\fldinst{HYPERLINK "http://www.nvidia.com/object/mac-driver-archive.html"}}{\fldrslt http://www.nvidia.com/object/mac-driver-archive.html}}.  Charity Engine Desktop 6.13.x also supports openCL applications on NVIDIA and ATI / AMD graphics processors.  OpenCL support is standard as part of Mac OS 10.6 and OS 10.7.\
+\
+Starting with version 5.5.4, this software features new, stricter security measures.  See the 
+\b Security
+\b0  section below for important information.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 As of version 6.13.x, Charity Engine Desktop no longer supports PowerPC Macs; it runs natively on Intel Macs and requires Macintosh OS X version 10.4 or greater.  If you wish to run on a PowerPC Mac, please install an earlier version of Charity Engine Desktop.  \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Upgrade warning 2: You may lose unreported results
+\b0  if you are running on an 
+\b Intel Mac
+\b0  and upgrading from a version of Charity Engine or BOINC earlier than 5.3.21 on an Intel Mac, or if you are transferring Charity Engine or BOINC Data from a PowerPC Mac to an Intel Mac, or from an Intel Mac to a PowerPC Mac.  To prevent this, open Charity Engine Desktop's window, select the 
+\i Projects
+\i0  tab, select each project and  press the 
+\i Update
+\i0  button.  Then select the 
+\i Tasks
+\i0  tab and make sure there are no tasks "Ready to report."\
+\
+
+\b Setting Charity Engine as your screen saver:
+\b0  This installer adds the Charity Engine screen saver to your system, and optionally changes your screen saver settings to use the Charity Engine screen saver.  You can also select Charity Engine as your screen saver later, using the Screen Saver or Screen Effects panel in the System Preferences (accessible from the Apple menu).    \
+\
+It may take a minute after the screen saver starts before the science application graphics appear.  \
+\
+Note: on some versions of the Mac OS, you may not be able to exit the Charity Engine screen saver by moving the mouse; you may need to press the mouse button or press any key on the keyboard to exit.  \
+\
+
+\b Security:\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\b0 \cf0 Since version 5.5.4, Charity Engine Desktop for the Macintosh features new, stricter security measures.  This additional security helps protect your computer data from potential theft or accidental or malicious damage by limiting Charity Engine projects' access to your  system and data.  \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 The installer sets special permission for the Charity Engine Desktop and Client, which allows them to write to the shared BOINC Data regardless of which user is logged in.  If you 
+\b copy
+\b0  Charity Engine Desktop or the Charity Engine core client without using the installer, it will not run properly.  \
+\
+However, you can safely 
+\b move
+\b0  the Charity Engine Desktop within the same disk drive or partition.  If you need multiple copies, run the installer again after moving Charity Engine Desktop; this will create a fresh copy in the 
+\b /Applications
+\b0  folder.\
+\
+Charity Engine verifies that ownership and permissions are set properly each time it is launched.  It will tell you to re-install Charity Engine if there is a problem.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 \
+The new safeguards use the basic security protections built into UNIX (the base underlying Mac OS X): permissions and ownership.\
+\
+The administrator (usually the owner) of each computer creates one or more users who can log in, can create private files, and can share other files.  Some of these users are given administrative privileges, some may not have these privileges.\
+\
+There are also groups, which have one or more users as members.  For example, users with administrative privileges are usually members of the "admin" group.\
+\
+In addition to these "visible" users and groups, the operating system contains a number of "hidden" users and groups which are used for various purposes.  A person cannot log in as one of these "hidden" users.  \
+\
+This structure of users and groups is used to provide security by restricting what data and operations each person or application can use.  For example, many files belong to user "system" (also called "root") and group "wheel" so that non-privileged users can't modify them, thus protecting the computer system from accidental or malicious harm.\
+\
+Starting with version 5.5.4 of the Charity Engine Desktop for the Macintosh, the Charity Engine installer creates 2 new "hidden" users 
+\b boinc_master
+\b0  and 
+\b boinc_project
+\b0 , and two new "hidden" groups, also named 
+\b boinc_master
+\b0  and 
+\b boinc_project
+\b0  (unless they were created by a previous installation of Charity Engine or BOINC.)\
+\
+The installer automatically gives administrators (users who are members of the "admin" group) membership in the two new groups, so that they can easily manipulate Charity Engine files.  The installer asks you if you would like non-admin users to be able to run Charity Engine Desktop and to have access to these files.  This is particularly useful where many people have access to the computer, as in a school computer lab.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 Charity Engine projects are given permission to access only project files, protecting your computer in the event someone downloads bad software from a bogus project, or in the unlikely case that a legitimate project's server is infiltrated by a cracker.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 \
+For technical details of the implementation, please see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/SandboxUser"}}{\fldrslt http://boinc.berkeley.edu/trac/wiki/SandboxUser}} and {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/sandbox.php"}}{\fldrslt http://boinc.berkeley.edu/sandbox.php}}\
+\
+The installer sets Charity Engine Desktop as a Login item for 
+\b all
+\b0  authorized users, not just the user who ran the installer.  You can add or remove Login Items by using the Accounts Pane in the System Preferences (accessible from the Apple menu).  \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Other useful information:
+\b0 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\b \cf0 Troubleshooting tip:
+\b0  If you are upgrading from a version of Charity Engine or BOINC prior to 5.5.4 and the installer refuses to let you install, trash the file 
+\b /Library/Receipts/Charity Engine.pkg
+\b0  or 
+\b /Library/Receipts/BOINC.pkg
+\b0  and try again.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+The installer places two items onto your hard drive: Charity Engine Desktop.app in your 
+\b /Applications
+\b0  folder and Charity Engine.saver in your 
+\b /Library/Screen Savers
+\b0  folder.  \
+\
+The installer creates the BOINC Data folder in your 
+\b /Library/Application Support 
+\b0 folder.  If you have previously been running Charity Engine or BOINC in a different folder, copy your data into this folder.  \
+\
+All users who log in on the same Macintosh will share one set of BOINC Data, ensuring that work units are processed in the most timely manner.  \
+\
+You can move (
+\b not
+\b0  copy) Charity Engine Desktop to any folder you wish on the same disk drive or partition.  If you do so, you will need to update the information in each user's Login Items.  In most cases, the Charity Engine screen saver should still work properly.  If it does not, move Charity Engine Desktop back to the 
+\b /Applications
+\b0  folder.\
+\
+\pard\pardeftab720
+\cf0 To completely remove (
+\b uninstall
+\b0 ) Charity Engine Desktop from your Macintosh, run the 
+\b Uninstall Charity Engine
+\b0  application which is included with the installer.\
+}
\ No newline at end of file
diff --git a/mac_installer/CharityEngine/acct_mgr_url.xml b/mac_installer/CharityEngine/acct_mgr_url.xml
new file mode 100644
index 0000000..81d0243
--- /dev/null
+++ b/mac_installer/CharityEngine/acct_mgr_url.xml
@@ -0,0 +1,18 @@
+<acct_mgr>
+    <name>Charity Engine</name>
+    <url>http://www.charityengine.com/</url>
+    <cookie_required/>
+    <cookie_failure_url>http://www.charityengine.com/forgot</cookie_failure_url>
+<signing_key>
+1024
+9c3af22a230f1eb122b8eab256e5e46b49f6d357e65d00e414cf6af105aef217
+1de0793353097bbbb918413f79cb5bfaa4532daf061ece07b63f209690a3e1b1
+8906a9ae4f521ec25e6fb79b8679dd4c18c0f022dcb95baefeca091d572c7738
+e1b1d542bbec94552e0e37c698427f4538b947b79072d112ebcf4d9c509b16d9
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010001
+.
+</signing_key>
+</acct_mgr>
diff --git a/mac_installer/CustomInstall.cpp b/mac_installer/CustomInstall.cpp
new file mode 100644
index 0000000..44b660c
--- /dev/null
+++ b/mac_installer/CustomInstall.cpp
@@ -0,0 +1,423 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/* CustomInstall.cpp */
+
+/* Customizable installer to allow use of features described at 
+      http://boinc.berkeley.edu/client_startup.php
+Directions for creating a customized installer for the Macintosh:
+ [1] Create a directory, with a name such as SETI at home_Mac_Installer
+ [2] Place this CustomInstall application inside that directory.  You 
+     may rename this application if you wish.
+ [3] Create a new  directory named "boinc_startup_files" inside the  
+     directory created in step 1.
+ [4] Place the custom .xml files in the "boinc_startup_files" directory.
+ [5] Zip the directory created in step 1 (with all its contents).
+*/
+
+#define CREATE_LOG 1    /* for debugging */
+
+#include <Carbon/Carbon.h>
+
+#include <curl/curl.h>
+#include <stdlib.h>
+#include "filesys.h"
+#include "error_numbers.h"
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+static void Initialize(void);	/* function prototypes */
+static OSStatus download_thread(void* param);
+static OSErr download_boinc(FILE * out_file);
+//static curl_progress_callback show_prog;
+static int show_prog(void *clientp, double dltotal, double dlnow,
+                                      double ultotal, double ulnow);
+static OSErr runProgressDlog();
+static pascal Boolean ProgDlgFilterProc(DialogPtr dp, EventRecord *event, short *item);
+static void show_message(StringPtr s1);
+static OSErr QuitAppleEventHandler(const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon);
+static void print_to_log_file(const char *format, ...);
+static void strip_cr(char *buf);
+
+#ifdef  __cplusplus
+}
+#endif
+
+/* globals */
+Boolean     gQuitFlag = false;
+short       gProgressValue = 0, gOldProgressValue = 0;
+char        gCurlError[CURL_ERROR_SIZE];
+char        * gDL_URL = "http://boinc.berkeley.edu/dl/boinc_5.2.1_macOSX.zip";
+char        * gDownLoadFileName = "boinc_installer.zip";
+char        * gCustomDirectoryName = "boinc_startup_files";
+MPQueueID   gTerminationQueue;      /* This queue will report the completion of our threads. */
+MPTaskID    gDownload_thread_id;    /* IDs of the threads we create. */
+CURLcode    gResult;
+
+DialogPtr   gProgressDlog;
+
+
+int main(int argc, char *argv[])
+{
+    FILE * boinc_installer_zip_file;
+    char path[1024], buf[256], *p;
+    DIRREF dirp;
+    OSStatus err;
+    int retval;
+
+    Initialize();
+
+#ifdef __APPLE__
+    if (strlen(argv[0]) >= sizeof(path)) {
+        show_message((StringPtr)"\pPath to application is too long.");
+        return 0;
+    }
+    strcpy(path, argv[0]);   // Path to this application.
+    p = strstr(path, "/Contents/MacOS/");
+    *p = '\0';
+    p = strrchr(path, '/');
+    *(p+1) = '\0';
+    chdir(path);  // Directory containing this application
+#if 0   // For testing under debugger
+    chdir("/Users/charliefenton/Desktop/FTPTEST/");
+    getcwd(path, 256);
+#endif
+
+#else   // Not __APPLE__
+    getcwd(path, 256);  // Directory containing this application
+#endif
+
+    // we use multiple threads to be able to run our progress dialogs during 
+    //	copy and search operations
+    if (!MPLibraryIsLoaded()) {
+        printf("MultiProcessing Library not available.\n");
+        ExitToShell();
+    }
+	
+    err = MPCreateQueue(&gTerminationQueue);	/* Create the queue which will report the completion of the task. */
+    if (err != noErr) {
+        printf("Cannot create the termination queue. err = %d\n", (short)err);
+        ExitToShell();
+    }
+
+    boinc_installer_zip_file = boinc_fopen(gDownLoadFileName, "w");
+    if (boinc_installer_zip_file == NULL)
+    {
+        show_message((StringPtr)"\pFailed to create zip file.");
+        return -1;
+    }
+    
+    err = MPCreateTask(download_thread,             /* This is the task function. */
+                        boinc_installer_zip_file,   /* This is the parameter to the task function. */
+                        (500*1024),                 /* Stack size for thread. */
+                        gTerminationQueue,          /* We'll use this to sense task completion. */
+                        0,	/* We won't use the first part of the termination message. */
+                        0,	/* We won't use the second part of the termination message. */
+                        0,	/* Use the normal task options. (Currently this *must* be zero!) */
+                        &gDownload_thread_id);	/* Here's where the ID of the new task will go. */
+
+    if (err != noErr) {
+        (void) MPDeleteQueue(gTerminationQueue);
+        printf("Cannot create the copy thread. err = %d\n", (short)err);
+        ExitToShell();
+    }
+
+    err = runProgressDlog();
+    
+    fclose(boinc_installer_zip_file);
+
+    if (gQuitFlag)
+    {
+        show_message((StringPtr)"\pCancelled by user.");
+        return 0;
+    }
+    
+    if (gResult)
+    {
+        buf[0] = sprintf(buf+1, "Download error %d:\n%s", gResult, curl_easy_strerror(gResult));
+        show_message((StringPtr)buf);
+        return 0;
+    }
+    
+    sprintf(buf, "unzip -o %s", gDownLoadFileName);
+    retval = system(buf);
+    
+    if (retval)
+    {
+        show_message((StringPtr)"\pError expanding downloaded zip file.");
+        return 0;
+    }
+
+    // Copy the custom XML files
+#ifdef __APPLE__
+    // On the Macintosh, BOINC puts its data at a fixed, predetermined path
+    // so we can just copy the custom files there.  On other platforms, this 
+    // application should copy the custom files to a temporary, intermediate 
+    // location which the standard installer can then find; the standard 
+    // installer should then copy the files to the correct directory and 
+    // possibly delete the temporary ones.
+    retval = system("mkdir -p /Library/Application\\ Support/BOINC\\ Data");
+    if (!retval)
+    {
+        sprintf(buf, "chmod 0644 .%s%s%s*.xml", PATH_SEPARATOR, gCustomDirectoryName, PATH_SEPARATOR);
+        retval = system (buf);
+    }
+    if (!retval)
+    {
+        sprintf(buf, "cp -f .%s%s%s*.xml /Library/Application\\ Support/BOINC\\ Data/", 
+            PATH_SEPARATOR, gCustomDirectoryName, PATH_SEPARATOR);
+        retval = system(buf);
+    }
+#endif
+    if (retval)
+    {
+        show_message((StringPtr)"\pCouldn't copy custom BOINC startup files.");
+        retval = 0;     // Should we continue anyway?
+    }
+    
+    // Search this directory for the expanded BOINC installer directory; it
+    // should be the only directory other than the custom files directory.
+    sprintf(buf, ".%s", PATH_SEPARATOR);
+    
+    dirp = dir_open(path);
+    if (dirp == NULL)
+    {
+        retval = ERR_OPENDIR;
+    } else {
+        do {
+            retval = dir_scan(buf+2, dirp, sizeof(buf)-2);
+            if (!is_dir(buf))
+                continue;
+            if (strcmp(buf+2, gCustomDirectoryName))
+                break;
+        } while (retval == BOINC_SUCCESS);
+    }
+    
+    if (retval)
+    {
+        show_message((StringPtr)"\pCouldn't find downloaded additional BOINC installer software.");
+        return 0;
+    }
+
+    // Run the installer
+    retval = chdir(buf);
+    if (!retval)
+        retval = system("open ./BOINC.pkg");
+
+    if (retval)
+        show_message((StringPtr)"\pError running additional BOINC installer software.");
+
+    return 0;
+}
+
+
+static void Initialize()	/* Initialize some managers */
+{
+    OSErr	err;
+        
+    InitCursor();
+
+    err = AEInstallEventHandler( kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP((AEEventHandlerProcPtr)QuitAppleEventHandler), 0, false );
+    if (err != noErr)
+        ExitToShell();
+}
+
+
+////////////////////////////////////////////////////////////////////////
+//                                                                    //
+//  CAUTION - download_thread is a second MPThread, so all Mac        //
+//  API calls must be thread-safe!                                    //
+//                                                                    //
+////////////////////////////////////////////////////////////////////////
+static OSStatus download_thread(void* param)
+{
+    return download_boinc((FILE *)param);
+}
+
+
+static OSErr download_boinc(FILE * out_file)
+{
+    CURL *myHandle;
+    CURLcode curlErr;
+    
+    curlErr = curl_global_init(0);
+
+    myHandle = curl_easy_init();
+    if (myHandle == NULL)
+    {
+        show_message((StringPtr)"\pDownload initialization error.");
+        return -1;
+    }
+    
+    curlErr = curl_easy_setopt(myHandle, CURLOPT_VERBOSE, 1);
+    curlErr = curl_easy_setopt(myHandle, CURLOPT_NOPROGRESS, 0);
+    curlErr = curl_easy_setopt(myHandle, CURLOPT_WRITEDATA, out_file);
+    curlErr = curl_easy_setopt(myHandle, CURLOPT_PROGRESSFUNCTION, show_prog);
+    curlErr = curl_easy_setopt(myHandle, CURLOPT_PROGRESSDATA, &gProgressValue);
+    curlErr = curl_easy_setopt(myHandle, CURLOPT_ERRORBUFFER, gCurlError);
+    curlErr = curl_easy_setopt(myHandle, CURLOPT_URL, gDL_URL);
+
+    sleep(2);   // Give progress dialog a chance to be drawn
+
+    curlErr = curl_easy_perform(myHandle);
+
+    curl_easy_cleanup(myHandle);
+    curl_global_cleanup();
+    
+    return curlErr;
+}
+
+
+
+static int show_prog(void *clientp, double dltotal, double dlnow,
+                                      double ultotal, double ulnow)
+{
+    gProgressValue = (short)(dlnow * 100.0 / dltotal);
+    printf("Progress = %d%%\n", gProgressValue);
+
+    return gQuitFlag;
+}
+
+
+static OSErr runProgressDlog()
+{
+    AlertStdAlertParamRec alertParams;
+    DialogItemIndex itemHit = 0;
+    ModalFilterUPP myFilterProcUPP = NewModalFilterUPP(ProgDlgFilterProc);
+    OSStatus err;
+
+    gOldProgressValue = -1;
+
+    alertParams.movable = false;
+    alertParams.helpButton = false;
+    alertParams.filterProc = myFilterProcUPP;
+    alertParams.defaultText = "\pCancel";
+    alertParams.cancelText = NULL;
+    alertParams.otherText = NULL;
+    alertParams.defaultButton = kAlertStdAlertOKButton;
+    alertParams.cancelButton = 0;
+    alertParams.position = kWindowDefaultPosition;
+    
+    ParamText("\pDownloading additional BOINC installer software:\n   0% complete", "\p", "\p", "\p");
+    
+    err = StandardAlert(kAlertNoteAlert, "\p^0", NULL, &alertParams, &itemHit);
+    if (itemHit == kAlertStdAlertOKButton)
+        gQuitFlag = true; 
+
+    return noErr;
+}
+
+
+static pascal Boolean ProgDlgFilterProc(DialogPtr dp, EventRecord *event, short *item)
+{
+    char buf[256];
+    OSStatus err;
+    
+    if (gTerminationQueue)
+    {
+        err = MPWaitOnQueue(gTerminationQueue, 0, 0, (void **)&gResult, kDurationImmediate);
+        if (err == noErr)
+        {
+            *item = kAlertStdAlertCancelButton;
+            return true;
+        }
+    }
+    
+    if (gProgressValue == gOldProgressValue)
+        return false;
+    
+    gOldProgressValue = gProgressValue;
+    
+    buf[0] = sprintf(buf+1, "Downloading additional BOINC installer software:\n %3d%% complete", gProgressValue);
+    ParamText("\pDownloading additional BOINC installer software:   0% complete", "\p", "\p", "\p");
+    ParamText((StringPtr)buf, "\p", "\p", "\p");
+    
+    DrawDialog(dp);
+
+    return false;
+}
+
+
+/********************************************************************
+
+	ShowMessage
+
+********************************************************************/
+static void show_message(StringPtr s1)
+{
+    DialogItemIndex itemHit;
+    OSErr err;
+    
+    err = StandardAlert (kAlertStopAlert, s1, NULL, NULL, &itemHit);
+}
+
+
+static OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon )
+{
+    gQuitFlag =  true;
+    
+    return noErr;
+}
+
+
+// For debugging
+static void print_to_log_file(const char *format, ...) {
+#if CREATE_LOG
+    FILE *f;
+    va_list args;
+    char buf[256];
+    time_t t;
+    strcpy(buf, getenv("HOME"));
+    strcat(buf, "/Documents/test_log.txt");
+    f = fopen(buf, "a");
+    if (!f) return;
+
+//  freopen(buf, "a", stdout);
+//  freopen(buf, "a", stderr);
+
+    time(&t);
+    strcpy(buf, asctime(localtime(&t)));
+    strip_cr(buf);
+
+    fputs(buf, f);
+    fputs("   ", f);
+
+    va_start(args, format);
+    vfprintf(f, format, args);
+    va_end(args);
+    
+    fputs("\n", f);
+    fflush(f);
+    fclose(f);
+#endif
+}
+
+#if CREATE_LOG
+static void strip_cr(char *buf)
+{
+    char *theCR;
+
+    theCR = strrchr(buf, '\n');
+    if (theCR)
+        *theCR = '\0';
+    theCR = strrchr(buf, '\r');
+    if (theCR)
+        *theCR = '\0';
+}
+#endif	// CREATE_LOG
diff --git a/mac_installer/Description.plist b/mac_installer/Description.plist
new file mode 100644
index 0000000..323edc5
--- /dev/null
+++ b/mac_installer/Description.plist
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IFPkgDescriptionDescription</key>
+	<string>Installs BOINC Manager, screensaver and data</string>
+	<key>IFPkgDescriptionTitle</key>
+	<string>BOINC Manager</string>
+</dict>
+</plist>
diff --git a/mac_installer/GR-Branding b/mac_installer/GR-Branding
new file mode 100644
index 0000000..77a18ee
--- /dev/null
+++ b/mac_installer/GR-Branding
@@ -0,0 +1 @@
+BrandId=1
diff --git a/mac_installer/GR-ReadMe.rtf b/mac_installer/GR-ReadMe.rtf
new file mode 100644
index 0000000..92961aa
--- /dev/null
+++ b/mac_installer/GR-ReadMe.rtf
@@ -0,0 +1,164 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red2\green87\blue173;}
+\margl1440\margr1440\vieww9000\viewh9000\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\f0\b\fs28 \cf0 Macintosh GridRepublic Desktop Version <VER_NUM> Release Notes\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+\cf0 http://gridrepublic.org\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Installing GridRepublic Desktop may take several minutes; please be patient.
+\b0 \
+\
+
+\b Dual GPU Macbook Pros:
+\b0  Some newer Macbook Pros have dual graphics processors, one that is more powerful and another that is more energy-efficient, and they switch between them automatically.  This can cause your screensaver to flash on and off frequently, and can prevent GridRepublic Desktop from detecting the more powerful GPU which is needed to process some applications.  You can force selection either {\field{\*\fldinst{HYPERLINK "http://support.apple.com/kb/HT4110"}}{\fldrslt \cf2 permanently}} or temporarily using a {\field{\*\fldinst{HYPERLINK "http://codykrieger.com/gfxCardStatus/"}}{\fldrslt \cf2 third-party utility}}. But be aware that forcing the use of the NVIDIA GPU may cause faster battery drain; this of course is not an issue when running on AC power.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Upgrade warning 1: 
+\b0 There have been changes to GridRepublic Desktop's internal file formats.   When you upgrade from version 6.12.x or earlier, GridRepublic Desktop will automatically upgrade its files.  However, if for any reason you wish to downgrade again to a version earlier than 6.13.x, you will lose any unreported work.  The project servers will send you the tasks again, but they will be restarted from the beginning.  If you think you might need to revert to an older version of GridRepublic Desktop, you should back up your BOINC Data folder before upgrading.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+If you are upgrading from a version earlier than 6.8.0, you may see a message "Failed to convert file GridRepublic Desktop Preferences to Unicode."  This is due to our addition of full Unicode support to the GridRepublic Desktop.  If you get this message, you may need to readjust your column widths and other GridRepublic Desktop view options, but no other problems will result.  When  you quit GridRepublic Desktop, these settings will be saved in the new Unicode format.\
+\
+Due to new restrictions imposed by OS 10.6 Snow Leopard, there has been a change in GridRepublic Desktop's security implementation.  Non-administrative users can no longer run GridRepublic Desktop unless they are added to group boinc_master.  As of GridRepublic Desktop 6.8.29, the GridRepublic Desktop installer asks whether or not you wish to allow this.\
+\
+For more options, please see the BOINC Macintosh administrator tools at:\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+{\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X"}}{\fldrslt \cf0 http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X}}\
+\
+GridRepublic Desktop on the Mac now supports processing with your graphics card, or GPU.  Please see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/gpu.php"}}{\fldrslt http://boinc.berkeley.edu/gpu.php}} for more information.   If you have a CUDA-capable NVIDIA GPU, you will need to download and install the CUDA driver and libraries for your system from {\field{\*\fldinst{HYPERLINK "http://www.nvidia.com/object/mac-driver-archive.html"}}{\fldrslt http://www.nvidia.com/object/mac-driver-archive.html}}.  GridRepublic Desktop 6.13.x also supports openCL applications on NVIDIA and ATI / AMD graphics processors.  OpenCL support is standard as part of Mac OS 10.6 and OS 10.7.\
+\
+Starting with version 5.5.4, this software features new, stricter security measures.  See the 
+\b Security
+\b0  section below for important information.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 As of version 6.13.x, GridRepublic Desktop no longer supports PowerPC Macs; it runs natively on Intel Macs and requires Macintosh OS X version 10.4 or greater.  If you wish to run on a PowerPC Mac, please install an earlier version of GridRepublic Desktop.  \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Upgrade warning 2: You may lose unreported results
+\b0  if you are running on an 
+\b Intel Mac
+\b0  and upgrading from a version of GridRepublic or BOINC earlier than 5.3.21 on an Intel Mac, or if you are transferring GridRepublic or BOINC Data from a PowerPC Mac to an Intel Mac, or from an Intel Mac to a PowerPC Mac.  To prevent this, open GridRepublic Desktop's window, select the 
+\i Projects
+\i0  tab, select each project and  press the 
+\i Update
+\i0  button.  Then select the 
+\i Tasks
+\i0  tab and make sure there are no tasks "Ready to report."\
+\
+
+\b Setting GridRepublic as your screen saver:
+\b0  This installer adds the GridRepublic screen saver to your system, and optionally changes your screen saver settings to use the GridRepublic screen saver.  You can also select GridRepublic as your screen saver later, using the Screen Saver or Screen Effects panel in the System Preferences (accessible from the Apple menu).    \
+\
+It may take a minute after the screen saver starts before the science application graphics appear.  \
+\
+Note: on some versions of the Mac OS, you may not be able to exit the GridRepublic screen saver by moving the mouse; you may need to press the mouse button or press any key on the keyboard to exit.  \
+\
+
+\b Security:\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\b0 \cf0 Since version 5.5.4, GridRepublic Desktop for the Macintosh features new, stricter security measures.  This additional security helps protect your computer data from potential theft or accidental or malicious damage by limiting GridRepublic projects' access to your  system and data.  \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 The installer sets special permission for the GridRepublic Desktop and Client, which allows them to write to the shared BOINC Data regardless of which user is logged in.  If you 
+\b copy
+\b0  GridRepublic Desktop or the GridRepublic core client without using the installer, it will not run properly.  \
+\
+However, you can safely 
+\b move
+\b0  the GridRepublic Desktop within the same disk drive or partition.  If you need multiple copies, run the installer again after moving GridRepublic Desktop; this will create a fresh copy in the 
+\b /Applications
+\b0  folder.\
+\
+GridRepublic verifies that ownership and permissions are set properly each time it is launched.  It will tell you to re-install GridRepublic if there is a problem.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 \
+The new safeguards use the basic security protections built into UNIX (the base underlying Mac OS X): permissions and ownership.\
+\
+The administrator (usually the owner) of each computer creates one or more users who can log in, can create private files, and can share other files.  Some of these users are given administrative privileges, some may not have these privileges.\
+\
+There are also groups, which have one or more users as members.  For example, users with administrative privileges are usually members of the "admin" group.\
+\
+In addition to these "visible" users and groups, the operating system contains a number of "hidden" users and groups which are used for various purposes.  A person cannot log in as one of these "hidden" users.  \
+\
+This structure of users and groups is used to provide security by restricting what data and operations each person or application can use.  For example, many files belong to user "system" (also called "root") and group "wheel" so that non-privileged users can't modify them, thus protecting the computer system from accidental or malicious harm.\
+\
+Starting with version 5.5.4 of the GridRepublic Desktop for the Macintosh, the GridRepublic installer creates 2 new "hidden" users 
+\b boinc_master
+\b0  and 
+\b boinc_project
+\b0 , and two new "hidden" groups, also named 
+\b boinc_master
+\b0  and 
+\b boinc_project
+\b0  (unless they were created by a previous installation of GridRepublic or BOINC.)\
+\
+The installer automatically gives administrators (users who are members of the "admin" group) membership in the two new groups, so that they can easily manipulate GridRepublic files.  The installer asks you if you would like non-admin users to be able to run GridRepublic Desktop and to have access to these files.  This is particularly useful where many people have access to the computer, as in a school computer lab.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 GridRepublic projects are given permission to access only project files, protecting your computer in the event someone downloads bad software from a bogus project, or in the unlikely case that a legitimate project's server is infiltrated by a cracker.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 \
+For technical details of the implementation, please see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/SandboxUser"}}{\fldrslt http://boinc.berkeley.edu/trac/wiki/SandboxUser}} and {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/sandbox.php"}}{\fldrslt http://boinc.berkeley.edu/sandbox.php}}\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 The installer sets  GridRepublic Desktop as a Login item for 
+\b all
+\b0  authorized users, not just the user who ran the installer.  You can add or remove Login Items by using the Accounts Pane in the System Preferences (accessible from the Apple menu).  \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Other useful information:
+\b0 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\b \cf0 Troubleshooting tip:
+\b0  If you are upgrading from a version of GridRepublic or BOINC prior to 5.5.4 and the installer refuses to let you install, trash the file 
+\b /Library/Receipts/GridRepublic.pkg
+\b0  or 
+\b /Library/Receipts/BOINC.pkg
+\b0  and try again.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+The installer places two items onto your hard drive: GridRepublic Desktop.app in your 
+\b /Applications
+\b0  folder and GridRepublic.saver in your 
+\b /Library/Screen Savers
+\b0  folder.  \
+\
+The installer creates the BOINC Data folder in your 
+\b /Library/Application Support 
+\b0 folder.  If you have previously been running GridRepublic or BOINC in a different folder, copy your data into this folder.  \
+\
+All users who log in on the same Macintosh will share one set of BOINC Data, ensuring that work units are processed in the most timely manner.  \
+\
+You can move (
+\b not
+\b0  copy) GridRepublic Desktop to any folder you wish on the same disk drive or partition.  If you do so, you will need to update the information in each user's Login Items.  In most cases, the GridRepublic screen saver should still work properly.  If it does not, move GridRepublic Desktop back to the 
+\b /Applications
+\b0  folder.\
+\
+\pard\pardeftab720
+\cf0 To completely remove (
+\b uninstall
+\b0 ) GridRepublic Desktop from your Macintosh, run the 
+\b Uninstall GridRepublic
+\b0  application which is included with the installer.\
+}
\ No newline at end of file
diff --git a/mac_installer/Installer.cpp b/mac_installer/Installer.cpp
new file mode 100755
index 0000000..ee6e305
--- /dev/null
+++ b/mac_installer/Installer.cpp
@@ -0,0 +1,394 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/* Installer.cpp */
+
+#define CREATE_LOG 1    /* for debugging */
+
+#include <Carbon/Carbon.h>
+#include <grp.h>
+
+#include <unistd.h>	// getlogin
+#include <sys/types.h>	// getpwname, getpwuid, getuid
+#include <pwd.h>	// getpwname, getpwuid, getuid
+#include <sys/wait.h>	// waitpid
+#include <dirent.h>
+#include <sys/param.h>  // for MAXPATHLEN
+#include <sys/stat.h>
+
+
+#define boinc_master_user_name "boinc_master"
+#define boinc_master_group_name "boinc_master"
+#define boinc_project_user_name "boinc_project"
+#define boinc_project_group_name "boinc_project"
+
+void Initialize(void);	/* function prototypes */
+Boolean IsUserMemberOfGroup(const char *userName, const char *groupName);
+OSStatus GetFinalAction(CFStringRef *restartValue);
+OSErr FindProcess (OSType typeToFind, OSType creatorToFind, ProcessSerialNumberPtr processSN);
+static OSErr QuitAppleEventHandler(const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon);
+void print_to_log_file(const char *format, ...);
+void strip_cr(char *buf);
+
+Boolean			gQuitFlag = false;	/* global */
+
+CFStringRef     valueRestartRequired = CFSTR("RequiredRestart");
+CFStringRef     valueLogoutRequired = CFSTR("RequiredLogout");
+CFStringRef     valueNoRestart = CFSTR("NoRestart");
+
+
+int main(int argc, char *argv[])
+{
+    char                    pkgPath[MAXPATHLEN], infoPlistPath[MAXPATHLEN], MetaPkgPath[MAXPATHLEN];
+    char                    brand[64], s[256];
+    char                    *p;
+    ProcessSerialNumber     ourPSN, installerPSN;
+    FSRef                   ourFSRef;
+    long                    response;
+    short                   itemHit;
+    pid_t                   installerPID = 0;
+    FSRef                   infoPlistFileRef;
+    Boolean                 isDirectory, result;
+    CFURLRef                xmlURL = NULL;
+    CFDataRef               xmlDataIn = NULL;
+    CFDataRef               xmlDataOut = NULL;
+    CFPropertyListRef       propertyListRef = NULL;
+    CFStringRef             restartKey = CFSTR("IFPkgFlagRestartAction");
+    CFStringRef             currentValue = NULL, desiredValue = NULL;
+    CFStringRef             errorString = NULL;
+    OSStatus                err = noErr;
+    struct stat             stat_buf;
+
+    Initialize();
+
+    // Get the full path to Installer package inside this application's bundle
+    err = GetCurrentProcess (&ourPSN);
+    if (err == noErr)
+        err = GetProcessBundleLocation(&ourPSN, &ourFSRef);
+
+    if (err == noErr)
+        err = FSRefMakePath (&ourFSRef, (UInt8*)pkgPath, sizeof(pkgPath));
+
+    strlcpy(infoPlistPath, pkgPath, sizeof(infoPlistPath));
+
+    strlcat(pkgPath, "/Contents/Resources/", sizeof(pkgPath));
+
+   // To allow for branding, assume name of installer package inside bundle corresponds to name of this application
+    p = strrchr(infoPlistPath, '/');         // Point to name of this application (e.g., "BOINC Installer.app")
+    if (p == NULL)
+        p = infoPlistPath - 1;
+    strlcpy(brand, p+1, sizeof(brand));
+    strlcat(pkgPath, p+1, sizeof(pkgPath));
+    p = strrchr(pkgPath, ' ');         // Strip off last space character and everything following
+    if (p)
+        *p = '\0'; 
+
+    p = strstr(brand, " Installer.app");  // Strip off trailing " Installer.app"
+    if (p)
+        *p = '\0'; 
+
+    strlcpy(MetaPkgPath, pkgPath, sizeof(MetaPkgPath));
+    strlcat(MetaPkgPath, "+VirtualBox.mpkg", sizeof(MetaPkgPath));
+    strlcat(pkgPath, ".pkg", sizeof(pkgPath));
+    err = Gestalt(gestaltSystemVersion, &response);
+    if (err != noErr)
+        return err;
+
+    if (response < 0x1040) {
+        ::SetFrontProcess(&ourPSN);
+        p = strrchr(brand, ' ');         // Strip off last space character and everything following
+        if (p)
+            *p = '\0'; 
+        s[0] = sprintf(s+1, "Sorry, this version of %s requires system 10.4 or higher.", brand);
+        StandardAlert (kAlertStopAlert, (StringPtr)s, NULL, NULL, &itemHit);
+
+        err = FindProcess ('APPL', 'xins', &installerPSN);
+        err = GetProcessPID(&installerPSN , &installerPID);
+
+        if (err == noErr)
+            err = kill(installerPID, SIGKILL);
+
+	ExitToShell();
+    }
+
+    // Remove previous installer package receipt so we can run installer again
+    // "rm -rf /Library/Receipts/GridRepublic.pkg"
+    sprintf(s, "rm -rf \"/Library/Receipts/%s.pkg\"", brand);
+    system (s);
+
+    err = Gestalt(gestaltSystemVersion, &response);
+    if (err != noErr)
+        return err;
+    
+    err = GetFinalAction(&desiredValue);
+    
+    strlcpy(infoPlistPath, pkgPath, sizeof(infoPlistPath));
+    strlcat(infoPlistPath, "/Contents/Info.plist", sizeof(infoPlistPath));
+
+    err = FSPathMakeRef((UInt8*)infoPlistPath, &infoPlistFileRef, &isDirectory);
+    if (err)
+        return err;
+        
+    xmlURL = CFURLCreateFromFSRef(NULL, &infoPlistFileRef);
+    if (xmlURL == NULL)
+        return -1;
+
+    // Read XML Data from file
+    result = CFURLCreateDataAndPropertiesFromResource(NULL, xmlURL, &xmlDataIn, NULL, NULL, &err);
+    if (err == noErr)
+        if (!result)
+            err = coreFoundationUnknownErr;
+	
+    if (err == noErr) { // Convert XML Data to internal CFPropertyListRef / CFDictionaryRef format
+        propertyListRef = CFPropertyListCreateFromXMLData(NULL, xmlDataIn, kCFPropertyListMutableContainersAndLeaves, &errorString);
+        if (propertyListRef == NULL)
+            err = coreFoundationUnknownErr;
+    }
+    
+    if (err == noErr) { // Get current value for our key
+        currentValue = (CFStringRef)CFDictionaryGetValue((CFDictionaryRef)propertyListRef, restartKey);
+        if (currentValue == NULL)
+            err = coreFoundationUnknownErr;
+    }    
+    
+    if (err == noErr) {
+        if (CFStringCompare(currentValue, desiredValue, 0) != kCFCompareEqualTo) {  // If current value != desired value
+            // Replace value for key with desired value
+            CFDictionaryReplaceValue((CFMutableDictionaryRef)propertyListRef, restartKey, desiredValue);
+
+            // Convert internal CFPropertyListRef / CFDictionaryRef format to XML data
+            xmlDataOut = CFPropertyListCreateXMLData(NULL, propertyListRef);
+            if (xmlDataOut == NULL)
+                err = coreFoundationUnknownErr;
+
+            if (err == noErr) { // Write revised XML Data back to the file
+                result = CFURLWriteDataAndPropertiesToResource (xmlURL, xmlDataOut, NULL, &err);
+                if (err == noErr)
+                    if (!result)
+                        err = coreFoundationUnknownErr;
+            }
+        }
+    } 
+   
+    if (xmlURL)
+        CFRelease(xmlURL);
+    if (xmlDataIn)
+        CFRelease(xmlDataIn);
+    if (xmlDataOut)
+        CFRelease(xmlDataOut);
+    if (propertyListRef)
+        CFRelease(propertyListRef);
+
+    if (err == noErr) {
+        if ((response < 0x1050) || stat(MetaPkgPath, &stat_buf)) {  // stat() returns zero on success
+            sprintf(infoPlistPath, "open \"%s\" &", pkgPath);
+        } else {
+            sprintf(infoPlistPath, "open \"%s\" &", MetaPkgPath);
+        }
+        system(infoPlistPath);
+    }
+
+    return err;
+}
+
+
+Boolean IsUserMemberOfGroup(const char *userName, const char *groupName) {
+    group               *grp;
+    short               i = 0;
+    char                *p;
+
+    grp = getgrnam(groupName);
+    if (!grp) {
+        printf("getgrnam(%s) failed\n", groupName);
+        fflush(stdout);
+        return false;  // Group not found
+    }
+
+    while ((p = grp->gr_mem[i]) != NULL) {  // Step through all users in group admin
+        if (strcmp(p, userName) == 0) {
+            return true;
+        }
+        ++i;
+    }
+    return false;
+}
+
+
+OSStatus GetFinalAction(CFStringRef *restartValue)
+{
+    passwd          *pw = NULL;
+    group           *grp = NULL;
+    gid_t           boinc_master_gid = 0, boinc_project_gid = 0;
+    uid_t           boinc_master_uid = 0, boinc_project_uid = 0;
+    OSStatus        err = noErr;
+    long            response;
+    char            loginName[256];
+    
+    *restartValue = valueRestartRequired;
+
+    grp = getgrnam(boinc_master_group_name);
+    if (grp == NULL)
+        return noErr;       // Group boinc_master does not exist
+
+    boinc_master_gid = grp->gr_gid;
+        
+    grp = getgrnam(boinc_project_group_name);
+    if (grp == NULL)
+        return noErr;       // Group boinc_project does not exist
+
+    boinc_project_gid = grp->gr_gid;
+
+    pw = getpwnam(boinc_master_user_name);
+    if (pw == NULL)
+        return noErr;       // User boinc_master does not exist
+
+    boinc_master_uid = pw->pw_uid;
+
+    if (pw->pw_gid != boinc_master_gid)
+        return noErr;       // User boinc_master does not have group boinc_master as its primary group
+    
+    pw = getpwnam(boinc_project_user_name);
+    if (pw == NULL)
+        return noErr;       // User boinc_project does not exist
+
+    boinc_project_uid = pw->pw_uid;
+        
+    if (pw->pw_gid != boinc_project_gid)
+        return noErr;       // User boinc_project does not have group boinc_project as its primary group
+
+    err = Gestalt(gestaltSystemVersion, &response);
+    if ((err == noErr) && (response >= 0x1050)) {
+        if (boinc_master_gid < 501)
+            return noErr;       // We will change boinc_master_gid to a value > 501
+        if (boinc_project_gid < 501)
+            return noErr;       // We will change boinc_project_gid to a value > 501
+        if (boinc_master_uid < 501)
+            return noErr;       // We will change boinc_master_uid to a value > 501
+        if (boinc_project_uid < 501)
+            return noErr;       // We will change boinc_project_uid to a value > 501
+}
+    
+    #ifdef SANDBOX
+    strncpy(loginName, getenv("USER"), sizeof(loginName)-1);
+    if (loginName[0]) {
+        if (IsUserMemberOfGroup(loginName, boinc_master_group_name)) {
+            *restartValue = valueNoRestart;
+            return noErr;   // Logged in user is already a member of group boinc_master
+        }
+    }
+#endif  // SANDBOX
+
+    return noErr;
+}
+
+
+void Initialize()	/* Initialize some managers */
+{
+    OSErr	err;
+        
+//    InitCursor();
+
+    err = AEInstallEventHandler( kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP((AEEventHandlerProcPtr)QuitAppleEventHandler), 0, false );
+    if (err != noErr)
+        ExitToShell();
+}
+
+
+// ---------------------------------------------------------------------------
+/* This runs through the process list looking for the indicated application */
+/*  Searches for process by file type and signature (creator code)          */
+// ---------------------------------------------------------------------------
+OSErr FindProcess (OSType typeToFind, OSType creatorToFind, ProcessSerialNumberPtr processSN)
+{
+    ProcessInfoRec tempInfo;
+    FSSpec procSpec;
+    Str31 processName;
+    OSErr myErr = noErr;
+    /* null out the PSN so we're starting at the beginning of the list */
+    processSN->lowLongOfPSN = kNoProcess;
+    processSN->highLongOfPSN = kNoProcess;
+    /* initialize the process information record */
+    tempInfo.processInfoLength = sizeof(ProcessInfoRec);
+    tempInfo.processName = processName;
+    tempInfo.processAppSpec = &procSpec;
+    /* loop through all the processes until we */
+    /* 1) find the process we want */
+    /* 2) error out because of some reason (usually, no more processes) */
+    do {
+        myErr = GetNextProcess(processSN);
+        if (myErr == noErr)
+            GetProcessInformation(processSN, &tempInfo);
+    }
+            while ((tempInfo.processSignature != creatorToFind || tempInfo.processType != typeToFind) &&
+                   myErr == noErr);
+    return(myErr);
+}
+
+
+static OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon )
+{
+    gQuitFlag =  true;
+    
+    return noErr;
+}
+
+
+// For debugging
+void print_to_log_file(const char *format, ...) {
+#if CREATE_LOG
+    FILE *f;
+    va_list args;
+    char buf[256];
+    time_t t;
+    strcpy(buf, getenv("HOME"));
+    strcat(buf, "/Documents/test_log.txt");
+    f = fopen(buf, "a");
+    if (!f) return;
+
+//  freopen(buf, "a", stdout);
+//  freopen(buf, "a", stderr);
+
+    time(&t);
+    strcpy(buf, asctime(localtime(&t)));
+    strip_cr(buf);
+
+    fputs(buf, f);
+    fputs("   ", f);
+
+    va_start(args, format);
+    vfprintf(f, format, args);
+    va_end(args);
+    
+    fputs("\n", f);
+    fflush(f);
+    fclose(f);
+#endif
+}
+
+#if CREATE_LOG
+void strip_cr(char *buf)
+{
+    char *theCR;
+
+    theCR = strrchr(buf, '\n');
+    if (theCR)
+        *theCR = '\0';
+    theCR = strrchr(buf, '\r');
+    if (theCR)
+        *theCR = '\0';
+}
+#endif	// CREATE_LOG
diff --git a/mac_installer/License.rtf b/mac_installer/License.rtf
new file mode 100644
index 0000000..c4f1fd5
--- /dev/null
+++ b/mac_installer/License.rtf
@@ -0,0 +1,30 @@
+{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\vieww10380\viewh12940\viewkind0
+\deftab720
+\pard\pardeftab720\ql\qnatural
+
+\f0\fs24 \cf0 License Agreement\
+\
+Please carefully read the following terms and conditions before using this software.\
+Your use of this software indicates your acceptance of this license agreement and warranty.\
+\
+Restrictions\
+\
+
+\b You may use this software on a computer system only if you own the system or have the permission of the owner.
+\b0 \
+\
+Disclaimer of Warranty\
+\
+THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT WARRANTIES  OF ANY KIND, AND THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE HEREBY DISCLAIMED.  ANY STATUTORY WARRANTY OF NON-INFRINGEMENT IS ALSO DISCLAIMED. \
+\
+Distribution\
+\
+This is free software.\
+It is distributed under the terms of the GNU Lesser General Public License as published by the Free Software Foundation (http://www.fsf.org/) ,  as modified above .\
+The source code may be obtained from the BOINC web site (http://boinc.berkeley.edu).\
+\
+Berkeley Open Infrastructure for Network Computing (BOINC)\
+}
\ No newline at end of file
diff --git a/mac_installer/LoginItemAPI.c b/mac_installer/LoginItemAPI.c
new file mode 100755
index 0000000..132edf2
--- /dev/null
+++ b/mac_installer/LoginItemAPI.c
@@ -0,0 +1,690 @@
+/*
+     File:       LoginItemAPI.c
+ 
+     Copyright:  © 2000-2003 by Apple Computer, Inc., all rights reserved.
+ 
+     Bugs?:      For bug reports, consult the following page on
+                 the World Wide Web:
+ 
+                     http://developer.apple.com/bugreporter/
+ 
+*/
+#import "LoginItemAPI.h"
+
+/***************************************************************************************************/
+// AddLoginItemWithPropertiesToUser
+//**************************************************************************************************/
+// This function will add a LoginItem to the list of LoginItems when called.  The properties
+// given to the new LoginItem are passed when calling the function.  Note that *no* check is made
+// when adding the LoginItem to ensure that the path points to a valid application.  Note that the LoginItem
+// Is always added to the *end* of the list of LoginItems.
+//**************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToChange) -> A constant which represents which users preferences
+//                we want to change.  In this case there are two alternatives: kCurrentUser which
+//                changes the preferences of the current user.  The second alternative is kAllUsers.
+//                The kAllUsers LoginItems are launched for all users on the system.  You must be root
+//                or admin to use the kAllUsers option.
+// Second Parameter (AbsolutePath) -> 	The absolute path of the application to be launched 
+//                expressed as a Standard C string.  (example: "/Applications/Clock")
+// Third Parameter (HidetheApplicationOnStartup) -> A value representing if you want
+//                your application to be hidden at login time. kHideOnLaunch if you want the 
+//                application to be hidden after it is launched.  If you want the application to show
+//                up normally use be hidden use kDoNotHideOnLaunch
+//
+// Output Parameters:
+// Return -> 	This function returns a boolean value representing if the function was successful.
+//              The function returns true if the LoginItem was successfully added.  False if
+//              otherwise.  No additional error codes are returned. 
+// Other Notes: This code doesn't work properly if more than one application is attempting to write to
+//              the LoginItems preference at once. 
+//              Also no check is made to ensure that what you are adding to the LoginItem list isn't a 
+//              duplicate.  If there is a duplicate however only one instance of the application is launched
+//**************************************************************************************************/
+
+Boolean AddLoginItemWithPropertiesToUser(CFStringRef WhosPreferencesToChange, const char* AbsolutePath, Boolean HidetheApplicationOnLaunch)
+{
+    CFStringRef PreferenceName, MainKeyName;
+    CFArrayRef	ArrayOfLoginItemsFixed;
+    Boolean Success;
+    CFMutableArrayRef ArrayOfLoginItemsModifiable;
+    CFDictionaryRef EmptyLoginItem;
+    CFMutableDictionaryRef NewLoginItem;
+
+    //Generating the Lookup keys.  Lookups are done via keys which are CFStrings.
+    CFStringRef HideKey = CFStringCreateWithCString(NULL,"Hide",kCFStringEncodingASCII);
+    CFBooleanRef HideValue;
+		
+    CFStringRef PathKey = CFStringCreateWithCString(NULL,"Path",kCFStringEncodingASCII);
+    CFStringRef PathValue;
+	
+    //Turning the "hide" boolean value passed as kHideOnLaunch, kDoNotHideOnLaunch into the proper type (CFBooleanRef).  
+    if (HidetheApplicationOnLaunch == true)
+    {
+	HideValue = kCFBooleanTrue;
+    }
+    else
+    {
+	HideValue = kCFBooleanFalse;
+    }
+
+    //doing sanity check on the name of the user passed in.  Note we can use direct compairson because the pointer values and memory values should be identical to the constants.
+    if ((WhosPreferencesToChange != kCurrentUser) && (WhosPreferencesToChange != kAllUsers))
+    {
+        return(false);
+    }
+    //Converting the Absolute path passed in to the format accepted by the CFPreferences API's (CFString format).  
+    //For developers localizing to different languages: You should replace the kCFStringEncodingASCII with kCFStringEncodingUnicode and then what you pass in as the absolute path should be a unicode string.  This will allow you to add LoginItems localized to different languages where the path can contain non-ascii characters.
+    PathValue = CFStringCreateWithCString(NULL,AbsolutePath,kCFStringEncodingASCII);
+	
+    //The name of the preference we are going to edit as a CFString.  In this case it is loginwindow.plist
+    PreferenceName = CFSTR(kAppStr); //Note: CFString constants do not need to be released.
+
+    //The name of the main or first key referenced in the preference file.  In this case it is: AutoLaunchedApplicationDictionary
+    MainKeyName = CFSTR(kKeyStr); //Note: CFString constants do not need to be released.
+
+    //Getting the array of LoginItems from the LoginItems preference file.  
+    //Parameters: 
+    //First Parameter: The key used to look up the array information.
+    //Second Parameter:Name of the preference Item (loginwindow.plist in this case),
+    //Third Parameter: Which user(s) will be effected.  We either want the current user (kCurrentUser) or all users (kAllUsers) 
+    //Fourth Parameter:  We set this to anyhost because LoginItems always make use of Anyhost.
+    //Note: The return value will be null if the preference currently does not exist.  
+    //Note that the structure returned must be released later.
+    
+    ArrayOfLoginItemsFixed = CFPreferencesCopyValue(MainKeyName, PreferenceName, WhosPreferencesToChange, kCFPreferencesAnyHost);
+	
+    //If the preference loginwindow.plist doesn't exist (ArrayOfLoginItemsFixed == null) then we will create the preference from scratch.  The first step is to create an empty array.  Afterwards we will insert our LoginItem into the previously empty array of LoginItems.
+    if( ArrayOfLoginItemsFixed == NULL)  //handling case where no LoginItems exist yet.
+	{
+		//There must not be a loginwindow preference.  We will create one by first creating an empty array of LoginItems.  This will serve as our empty list of LoginItems which we will add to later.  
+		//Note we must release the returned value.
+		ArrayOfLoginItemsFixed = CFArrayCreate(NULL, NULL, 0, NULL);
+		
+		//If creating the array failed then we give up.  When giving up we always release required data types.
+		if (ArrayOfLoginItemsFixed == NULL)
+		  {
+		     return(false);
+		  }
+	}
+
+    //We want to get a modifiable version of the LoginItems.  The modifiable version is where we will make all our changes before saving the LoginItems back to disk.
+    //First Parameter: using default CFAllocator. 
+    //Second Paramater: want a non-bounded array so set this parameter to 0.  This prevents the system from limiting the size of the array we want to use.
+    //Third Parameter: copy of the original list of LoginItems (the fixed list from before).
+    ArrayOfLoginItemsModifiable = CFArrayCreateMutableCopy(NULL,0,ArrayOfLoginItemsFixed);
+	
+    //If this operation failed then we release allocated structures and give up
+    if (ArrayOfLoginItemsModifiable == NULL)
+	{
+          CFRelease(ArrayOfLoginItemsFixed);
+          return(false);
+	}
+	
+    //Here we are creating an empty LoginItem.  Actually a LoginItem itself is just a CFDictionary
+    //Note that the return value must be released later.
+    EmptyLoginItem = CFDictionaryCreate(NULL,NULL,NULL, 0,NULL, NULL);
+	
+    //If this operation failed then we release allocated structures and give up
+    if (EmptyLoginItem == NULL)
+	{
+          CFRelease(ArrayOfLoginItemsFixed);
+          CFRelease(ArrayOfLoginItemsModifiable);
+          return(false);
+	}
+	
+    //OK here we create an empty modifiable LoginItem from the emptyLoginItem which is fixed.  
+    //First Parmater: NULL because we are using current allocator
+    //Second Paramater: want a non-bounded array so set this parameter to 0.  This prevents the system from limiting the size of the array we want to use.
+    //Third parameter: The empty LoginItem which we are making a copy of.
+    //Note that we have to release the new LoginItem at the end.
+    NewLoginItem = CFDictionaryCreateMutableCopy(NULL,0, EmptyLoginItem);
+
+    //If this operation failed then we release allocated structures and give up
+    if (NewLoginItem == NULL)
+	{
+          CFRelease(EmptyLoginItem);
+          CFRelease(ArrayOfLoginItemsModifiable);
+          CFRelease(ArrayOfLoginItemsFixed);
+          return(false);
+	}
+
+    //This is where we add the new LoginItem to the currently empty list
+    //FirstParameter: the LoginItem list we are adding to.
+    //Second Parameter: The key/value we are going to set.
+    //Third Parameter: The value that the LoginItem will have.
+    
+    CFDictionaryAddValue(NewLoginItem,HideKey, HideValue); 	
+    CFDictionaryAddValue(NewLoginItem,PathKey, PathValue); 	
+
+    //We are appending the new (finished) LoginItem to the list of LoginItems.
+    CFArrayAppendValue(ArrayOfLoginItemsModifiable, NewLoginItem);
+		
+    //Here we write the settings back to the preference stored in memory.
+    //Parameters: 
+    //First Parameter: The key used to look up the array information.
+    //Second Parameter: The LoginItems list to write out to disk.
+    //Third Parameter:Name of the preference Item (loginwindow preference in this case),
+    //Fourth Parameter: Which user(s) will be effected.  We either want the current user (kCurrentUser) or all users (kAllUsers) 
+    //Fifth Parameter:  We set this to anyhost since LoginItems always use anyhost.
+    CFPreferencesSetValue(MainKeyName,ArrayOfLoginItemsModifiable,PreferenceName, WhosPreferencesToChange, kCFPreferencesAnyHost);
+
+    //Here we write the preference file in memory back to the hard disk.  
+    Success = CFPreferencesSynchronize(PreferenceName, WhosPreferencesToChange, kCFPreferencesAnyHost);
+
+    //If this operation failed then we release allocated structures and give up
+    if (Success == false)
+	{
+	  CFRelease(NewLoginItem);
+          CFRelease(EmptyLoginItem);
+          CFRelease(ArrayOfLoginItemsModifiable);
+          CFRelease(ArrayOfLoginItemsFixed);
+          return(false);
+	}
+
+    //Releasing all the data structures which need releasing.  
+    CFRelease(NewLoginItem);
+    CFRelease(EmptyLoginItem);
+    CFRelease(ArrayOfLoginItemsModifiable);
+    CFRelease(ArrayOfLoginItemsFixed);
+
+    return(true);  //we return true because all operations succeeded which means the LoginItems were successfully updated.
+}
+
+/**************************************************************************************************/
+// ReturnLoginItemPropertyAtIndex
+//**************************************************************************************************/
+// This function will return the list of LoginItems as a CFArray.  
+//**************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want to examine.  The two alternatives are: kCurrentUser which lists the LoginItems
+//                which are specific to that user (these are preferences found in /Users/<username>/Library/Preferences)
+//            	  and kAnyUsers which lists LoginItems which are common to all users on the system (these
+//                preferences are found in /Library/Preferences/).
+// Second Parameter (RequestType) -> A constant representing which type of request for information you are making.  
+//                There are currently three request types.  kFullPathInfo which causes this routine to return the 
+//                absolute path to the LoginItem which is stored as a C String (example return value:
+//                "/Applications/Clock.app").  Second alternative is kApplicationNameInfo which causes the routine to 
+//                return the name of the application as a C string (example return value: "Clock.app").  Third 
+//                alternative is kHideInfo which causes the routine to return the hide current status as a C string.  
+//                The two return types possible are the C Strings "Hide" and "DoNotHide" (example return value: "Hide")
+// Third Parameter (LoginItemIndex) -> An integer representing the LoginItem index.  Note that the LoginItems are 
+//                stored as an array indexed from 0 to N-1 where N is the number of LoginItems.  Note that if an invalid
+//                index is passed then you will get a return value of NULL indicating error status.
+//
+// Output Parameters:
+// Return -> 	This function returns a value of NULL if an error has occurred (likely caused by attempting to index an
+//              invalid LoginItemIndex).  If no error has occurred then a C String is returned which represents the data
+//              requested on the LoginItem at the index given.  The three return types are: 
+//              1) For a kFullPathInfo request the absolute path of the LoginItem is returned (example: 
+//              "/Applications/TextEdit").  2) For a kApplicationNameInfo request only the LoginItem name is returned
+//              with no path (example: "TextEdit").  3) For a kHideInfo request either the C string "Hide" is returned 
+//              if LoginItem is hidden on launch or the C string value is "DoNotHide" if the LoginItem isn't hidden on 
+//              launch
+// Other Notes: The actual indexing of the LoginItem array starts at zero and goes up to N-1 where N is the number of
+//              LoginItems.  Also, the order that the LoginItems are listed in the array is consistent with the ordering
+//              of the LoginItems within the preference file.  Note that the ordering of the LoginItems in the array
+//              *does not* correspond to the order which the LoginItems are launched.  The order which LoginItems are 
+//              launched are determined by OSX at Login time and is based on what launch order would be most efficent.
+//**************************************************************************************************/
+
+char ReturnCharacterArray [kLoginItemInfoLength]; //allocating a character array where the return result will be stored.
+
+char* ReturnLoginItemPropertyAtIndex(CFStringRef WhosPreferencesToList, int RequestType, int LoginItemIndex)
+{
+    CFArrayRef	ArrayOfLoginItemsFixed;
+    CFDictionaryRef LoginItemWeAreExaming;
+    CFStringRef PreferenceName, MainKeyName;
+    CFStringRef LoginPathInfoAsCFString;
+    CFStringRef PathKey, HideKey;
+    CFBooleanRef HideValue;
+	
+    char* StringToReturn = NULL;
+    char* TempString;
+    
+    //Doing a sanity check on the request type passed in.  If request type doesn't match something we know we return NULL representing an error
+    if ((RequestType != kApplicationNameInfo) && (RequestType != kHideInfo) && (RequestType != kFullPathInfo))
+    {
+	return(NULL);
+    }
+    
+    //Doing a sanity check on the LoginItem index.  Return error if not valid index.
+    if (LoginItemIndex < 0)
+    {
+	return(NULL);
+    }
+
+    //doing sanity check on the name of the user passed in.  Note we can use direct compairson because the pointer values and memory values should be identical to the constants.
+    if ((WhosPreferencesToList != kCurrentUser) && (WhosPreferencesToList != kAllUsers))
+    {
+        return(NULL);
+    }
+
+    //Generating the Lookup keys.  Lookups are done via keys which are CFStrings.
+    HideKey = CFStringCreateWithCString(NULL,"Hide",kCFStringEncodingASCII);
+    //This is the key used when looking up using the kFullPathInfo or kApplicationNameInfo.  
+    PathKey = CFStringCreateWithCString(NULL,"Path",kCFStringEncodingASCII);
+
+    //We need the name of the Application to look up in order look up the LoginItem list.  In this the name is loginwindow.plist
+    PreferenceName = CFSTR(kAppStr); //Note: CFString constants do not need to be released.
+
+    //The name of the main or first key referenced in the preference file.  In this case it is: AutoLaunchedApplicationDictionary
+    MainKeyName = CFSTR(kKeyStr); //Note: CFString constants do not need to be released.
+
+    //Getting the array of LoginItems from the LoginItems preference file.  
+    //Parameters: 
+    //First Parameter: The key used to look up the array information.
+    //Second Parameter:Name of the preference Item (loginwindow.plist in this case),
+    //Third Parameter: Which user(s) will be effected.  We either want the current user (kCurrentUser) or all users (kAllUsers) 
+    //Fourth Parameter:  We set this to anyhost because LoginItems always make use of Anyhost.
+    //Note: The return value will be null if the preference currently does not exist.  
+    //Note that the structure returned must be released later.
+    
+    ArrayOfLoginItemsFixed =  CFPreferencesCopyValue(MainKeyName, PreferenceName, WhosPreferencesToList, kCFPreferencesAnyHost);
+
+    //If the preference loginwindow.plist doesn't exist (ArrayOfLoginItemsFixed == null) then we know the size of the array is zero.  This means that all queries on the database will result in returning NULL because there is no elements to look up.  Thus we return null at this point.  Note that the user of this function should normally call LoginItemsCount first to know how many items there are before asking about info on indiviual items.
+        if( ArrayOfLoginItemsFixed == NULL)  //handling case where no LoginItems exist and can't do any lookups.
+	{
+	    return(NULL);  //returning null since there are no items to return information on 
+	}
+
+     //since we got back a vaild array of LoginItems now we will query the specific index of the LoginItem array that we are interested in.
+     //We do the lookup using a CFArrayGetValueAtIndex call.
+     //First Parameter: The array to query.
+     //Second Parameter: The index we want in this case whatever the user of this function passed in.  We have to convert to a CFIndex which in reality is just a signed integer.
+    LoginItemWeAreExaming = (CFDictionaryRef) CFArrayGetValueAtIndex(ArrayOfLoginItemsFixed, (CFIndex) LoginItemIndex);
+ 
+    if (LoginItemWeAreExaming == NULL) //if dictionary returned is null (invalid) then we give up.
+    {
+	return(NULL);  //returning null since the value returned is not valid. 
+    }
+ 
+    //the request was for the path info in the full path case or the application name case the code is pretty much the same except we pull out the path at the end for the application name.
+    if ((RequestType == kFullPathInfo) || (RequestType == kApplicationNameInfo))    {
+	//Here we need to determine if the key we are looking for is present.  If it isn't then the LoginItem is either corrupted or in a format we don't understand.  In either case if the key we are looking for isn't present then we give up.
+	//We determine validity using CFDictionaryContainsKey to see if the key we are looking for is there
+	//First parameter: The CFdictionary to search in this case the LoginItem we are looking at (LoginItems are actually stored as CFDictionaries
+	//Second Paramter: the key we are looking for.
+	if (CFDictionaryContainsKey(LoginItemWeAreExaming,PathKey)  == false) 	
+	{
+	    CFRelease(ArrayOfLoginItemsFixed);
+	    return(NULL);  //returning null since LoginItems are corrupted or in a non-reconized format
+	}
+	
+	//Here we get a copy of the path as a CFString.  we use a combination of calls of CFStringCreateCopy and CFDictionaryGetValue.  The CFString call just makes a copy of the return value (like strcpy does) which later needs to be released.  The CFDictionaryGetValue call will return the CFString reprenting the path.
+	LoginPathInfoAsCFString = CFStringCreateCopy(NULL, CFDictionaryGetValue(LoginItemWeAreExaming,PathKey));
+	
+	//now that we have the path as a CFString we will convert to a standard C string for returning later.  We use CFStringGetCStringPtr to do this
+	//First Parameter: CFString to be converted to C String
+	//Second Parameter: A pointer to the buffer which is where the C string will be placed.
+	//Third Parameter: The length of the buffer that we are putting the C string into.  If the CFString is too long for the buffer then the call returns an error (NULL)
+	//Fourth Paramter: Encoding Type. We use encoding type of ASCII for simplicity to developers.
+	//**Note to engineers localizing this API to a non-english format: The encoding used below kCFStringEncodingASCII is simplistic and should be replaced with kCFStringEncodingUnicode.  The return result will be in unicode format of the path and will handle the case where you want to lookup paths that have non ascii characters in the path.  The reason I don't use unicode by default is for simplicity of use to the majority of developers.  
+	CFStringGetCString(LoginPathInfoAsCFString, (char*) (&ReturnCharacterArray), kLoginItemInfoLength, kCFStringEncodingASCII);		    
+	
+	//Now if the application name is request we will strip off the beginning of the path leaving only the application or alias name.  Note that this assumes the string it is parsing is a ASCII string.  How this works is with multiple calls to strtok.  strtok returns a pointer to the string *after* the next "/" character in the string.  This continues until strtok returns NULL which means that there are no more "/" in the string (we are at the end of the string).  This means that what is left is the filename and this is what we want to return (example: "Clock.app" from "/Applications/Clock.app").
+	if (RequestType == kApplicationNameInfo)
+	{
+	    TempString = (char*)strtok(ReturnCharacterArray, "/");
+
+	    while (TempString != NULL)
+	    {
+		StringToReturn = TempString;
+		TempString = (char*) strtok(NULL, "/"); //successive calls to strtok with the first argument as NULL continues the search for "/" from where we left off.
+	    }//endwhile	
+	}//endif
+	else
+	{  //if we only want to return the entire path then the string we want to return is the entire path which is just a pointer to the character array.
+	  StringToReturn = (char*) ReturnCharacterArray;
+	}//end else
+	
+	CFRelease(LoginPathInfoAsCFString); //need to release this here since it was allocated.  
+    }//end get path info section
+
+    else  //now at the begining of the code which is executed if the Hide info is requested.
+    {
+	if (CFDictionaryContainsKey(LoginItemWeAreExaming,HideKey)  == false) 	
+	{
+	    CFRelease(ArrayOfLoginItemsFixed);
+	    return(NULL);  //returning null since LoginItems are corrupted or in a non-reconized format
+	}
+	
+	//Here we get a copy of the HideKey as a CFBooleanRef (a CF boolean).  We get the info with a call to CFDictionaryGetValue.
+	//First Argument: Dictionary to pull the boolean value from (Note that LoginItems are stored as CFDictionaries)
+	//Second Argument: The key to look up in this case the "hide" key.
+	HideValue = CFDictionaryGetValue(LoginItemWeAreExaming,HideKey);
+
+	if (HideValue == kCFBooleanTrue)
+	{  
+	    //we set the returnCharacterArray equal to "true" this will be the return value
+	    strcpy(ReturnCharacterArray, "true");
+	    StringToReturn = (char*) ReturnCharacterArray;
+	}
+	else if (HideValue == kCFBooleanFalse)
+	{
+	    //we set the returnCharacterArray equal to "false" this will be the return value
+	    strcpy(ReturnCharacterArray, "false");
+	    StringToReturn = (char*) ReturnCharacterArray;
+	}
+	else //here we have an invalid HideValue.  Thus we give up and return error condition (NULL).
+	{
+	    CFRelease(ArrayOfLoginItemsFixed);
+	    return(NULL);  //returning null since LoginItems are corrupted or in a non-reconized format
+	}
+
+    } //end kHideInfo section of the routine.
+   
+    CFRelease(ArrayOfLoginItemsFixed);
+    return(StringToReturn);
+}
+
+/***************************************************************************************************/
+// GetCountOfLoginItems
+//**************************************************************************************************/
+// This function will return the number of LoginItems for the user requested.    
+//**************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want the number of LoginItems for.  The two alternatives are: kCurrentUser which lists the 
+//                LoginItems which are specific to that user (these are preferences found in 
+//                /Users/<username>/Library/Preferences) and kAnyUsers which lists LoginItems which are common to all 
+//                users on the system (these preferences are found in /Library/Preferences/).
+//
+// Output Parameters:
+// Return -> 	This function returns the number of LoginItems for the user requested as a signed integer. 
+//**************************************************************************************************/
+
+int GetCountOfLoginItems(CFStringRef WhosPreferencesToList)
+{
+    CFArrayRef	ArrayOfLoginItemsFixed;
+    CFStringRef PreferenceName, MainKeyName;
+    int ValueToReturn = -1;
+
+
+    //doing sanity check on the name of the user passed in.  Note we can use direct compairson because the pointer values and memory values should be identical to the constants.
+    if ((WhosPreferencesToList != kCurrentUser) && (WhosPreferencesToList != kAllUsers))
+    {
+        return(0);
+    }
+
+    //We need the name of the Application to look up in order look up the LoginItem list.  In this the name is loginwindow.plist
+    PreferenceName = CFSTR(kAppStr); //Note: CFString constants do not need to be released.
+
+    //The name of the main or first key referenced in the preference file.  In this case it is: AutoLaunchedApplicationDictionary
+    MainKeyName = CFSTR(kKeyStr); //Note: CFString constants do not need to be released.
+
+    //Getting the array of LoginItems from the LoginItems preference file.  
+    //Parameters: 
+    //First Parameter: The key used to look up the array information.
+    //Second Parameter:Name of the preference Item (loginwindow.plist in this case),
+    //Third Parameter: Which user(s) will be effected.  We either want the current user (kCurrentUser) or all users (kAllUsers) 
+    //Fourth Parameter:  We set this to anyhost because LoginItems always make use of Anyhost.
+    //Note: The return value will be null if the preference currently does not exist.  
+    //Note that the structure returned must be released later.
+    
+    ArrayOfLoginItemsFixed =  CFPreferencesCopyValue(MainKeyName, PreferenceName, WhosPreferencesToList, kCFPreferencesAnyHost);
+    
+    //If the preference loginwindow.plist doesn't exist (ArrayOfLoginItemsFixed == null) then we know the size of the array is zero.  
+    if( ArrayOfLoginItemsFixed == NULL)  //handling case where no LoginItems exist and can't do any lookups.
+	{
+	    return(0); //number of LoginItems is zero.   
+	}
+	
+    ValueToReturn = (int) CFArrayGetCount(ArrayOfLoginItemsFixed);
+
+    CFRelease(ArrayOfLoginItemsFixed);
+    return(ValueToReturn);    
+}
+
+/***************************************************************************************************/
+// RemoveLoginItemAtIndex
+//**************************************************************************************************/
+// This function will remove the LoginItem at the given index for the user specified.    
+//**************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want to remove the LoginItem from.  The two alternatives are: kCurrentUser which removes login
+//                items for the which are specific to that user (these are preferences found in 
+//                /Users/<username>/Library/Preferences) and kAnyUsers which lists LoginItems which are common to all 
+//                users on the system (these preferences are found in /Library/Preferences/).
+// Second Parameter (LoginItemIndex) -> An integer representing the LoginItem index of the LoginItem you want removed. 
+// 		 It is assumed that you will look up the LoginItems using a couple ReturnLoginItemPropertyAtIndex calls
+//		 which will allow you to know which LoginItem you want to remove by index.  Note that the LoginItems are
+//               stored as an array indexed from 0 to N-1 where N is the number of LoginItems.  Note that if an invalid
+//               index is passed then you will get a return value of false indicating error status.
+//
+// Output Parameters:
+// Return -> 	This function a boolean true if the LoginItem was successfully removed.  This function returns false if
+//		the LoginItem could not be removed (or if it was not found).  *Note that when you remove a LoginItem 
+//		from the list of LoginItems the index of all LoginItems following the removed item will be 
+//		deincremented by one.  This means there will never be gaps in the list of LoginItems (i.e. empty slots 
+//		in the array of LoginItems). 
+//**************************************************************************************************/
+
+Boolean RemoveLoginItemAtIndex(CFStringRef WhosPreferencesToChange, int LoginItemIndex)
+{
+    CFArrayRef	ArrayOfLoginItemsFixed;
+    CFStringRef PreferenceName, MainKeyName;
+    CFMutableArrayRef ArrayOfLoginItemsModifiable;
+    Boolean Success;
+
+    //Doing a sanity check on the LoginItem index.  The LoginItem index can't be smaller than zero and can't be larger than the length of the array (Number of LoginItems - 1).
+    if ((LoginItemIndex < 0) || (LoginItemIndex > (GetCountOfLoginItems(WhosPreferencesToChange) - 1) ))
+    {
+	return(false);
+    }
+
+    //doing sanity check on the name of the user passed in.  Note we can use direct compairson because the pointer values and memory values should be identical to the constants.
+    if ((WhosPreferencesToChange != kCurrentUser) && (WhosPreferencesToChange != kAllUsers))
+    {
+        return(false);
+    }
+
+    //We need the name of the Application to look up in order look up the LoginItem list.  In this the name is loginwindow.plist
+    PreferenceName = CFSTR(kAppStr); //Note: CFString constants do not need to be released.
+
+    //The name of the main or first key referenced in the preference file.  In this case it is: AutoLaunchedApplicationDictionary
+    MainKeyName = CFSTR(kKeyStr); //Note: CFString constants do not need to be released.
+
+    //Getting the array of LoginItems from the LoginItems preference file.  We will then remove the LoginItem in question from the CFArray and write the preferences back to disk.
+    //Parameters: 
+    //First Parameter: The key used to look up the array information.
+    //Second Parameter:Name of the preference Item (loginwindow.plist in this case),
+    //Third Parameter: Which user(s) will be effected.  We either want the current user (kCurrentUser) or all users (kAllUsers) 
+    //Fourth Parameter:  We set this to anyhost because LoginItems always make use of Anyhost.
+    //Note: The return value will be null if the preference currently does not exist.  
+    //Note that the structure returned must be released later.
+    
+    ArrayOfLoginItemsFixed =  CFPreferencesCopyValue(MainKeyName, PreferenceName, WhosPreferencesToChange, kCFPreferencesAnyHost);
+
+    //If the preference loginwindow.plist doesn't exist (ArrayOfLoginItemsFixed == null) then we know the size of the array is zero.  This means that no LoginItems can be removed.  In this case we fail and give up.
+    if( ArrayOfLoginItemsFixed == NULL)  //handling case where no LoginItems exist and can't do any lookups.
+	{
+	    return(false);  //returning null since there are no items to return information on 
+	}
+
+    //We want to get a modifiable version of the LoginItems.  The modifiable version is where we will make all our changes before saving the LoginItems back to disk.
+    //First Parameter: using default CFAllocator. 
+    //Second Paramater: want a non-bounded array so set this parameter to 0.  This prevents the system from limiting the size of the array we want to use.
+    //Third Parameter: copy of the original list of LoginItems (the fixed list from before).
+    ArrayOfLoginItemsModifiable = CFArrayCreateMutableCopy(NULL,0,ArrayOfLoginItemsFixed);
+	
+    //If this operation failed then we release allocated structures and give up
+    if (ArrayOfLoginItemsModifiable == NULL)
+	{
+          CFRelease(ArrayOfLoginItemsFixed);
+          return(false);
+	}
+	
+    //We are removing the selected LoginItem to the list of LoginItems.
+    //First parameter: CFArray (our LoginItem array) which we want to remove a value.
+    //Second paramter: the index of the LoginItem we want to remove.  Note that we convert the integer to a CFindex which is really just a signed integer.
+    CFArrayRemoveValueAtIndex(ArrayOfLoginItemsModifiable, (CFIndex) LoginItemIndex);    
+    		
+    //Here we write the settings back to the preference stored in memory.
+    //Parameters: 
+    //First Parameter: The key used to look up the array information.
+    //Second Parameter: The LoginItems list to write out to disk.
+    //Third Parameter:Name of the preference Item (loginwindow preference in this case),
+    //Fourth Parameter: Which user(s) will be effected.  We either want the current user (kCurrentUser) or all users (kAllUsers) 
+    //Fifth Parameter:  We set this to anyhost since LoginItems always use anyhost.
+    CFPreferencesSetValue(MainKeyName,ArrayOfLoginItemsModifiable,PreferenceName, WhosPreferencesToChange, kCFPreferencesAnyHost);
+
+    //Here we write the preference file in memory back to the hard disk.  
+    Success = CFPreferencesSynchronize(PreferenceName, WhosPreferencesToChange, kCFPreferencesAnyHost);
+
+    //If this operation failed then we release allocated structures and give up
+    if (Success == false)
+	{
+          CFRelease(ArrayOfLoginItemsModifiable);
+          CFRelease(ArrayOfLoginItemsFixed);
+          return(false);
+	}
+
+    //Releasing all the data structures which need releasing.  
+    CFRelease(ArrayOfLoginItemsModifiable);
+    CFRelease(ArrayOfLoginItemsFixed);
+
+    return(true);  //we return true because all operations succeeded which means the LoginItems were successfully updated.
+    
+}
+
+/***************************************************************************************************/
+// PrintOutLoginItemAtIndex
+//**************************************************************************************************/
+// This function will print out the LoginItem at the specified index 
+//**************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want to print the LoginItem from.  The two alternatives are: kCurrentUser which removes login
+//                items for the which are specific to that user (these are preferences found in 
+//                /Users/<username>/Library/Preferences) and kAnyUsers which lists LoginItems which are common to all 
+//                users on the system (these preferences are found in /Library/Preferences/).
+// Second Parameter (LoginItemIndex) -> An integer representing the LoginItem index of the LoginItem you want to 
+// 		print. Note that the LoginItems are stored as an array indexed from 0 to N-1 where N is the number of 
+// 		LoginItems.  Note that if an invalid index is passed then you will get a return value of false 
+//		indicating error status.
+//
+// Output Parameters:
+// Return -> 	This function a boolean true if the LoginItem was successfully printed.  
+//**************************************************************************************************/
+
+Boolean PrintOutLoginItemAtIndex(CFStringRef WhosPreferencesToList, int LoginItemIndex)
+{
+    
+    char* StringToPrint;
+    
+    //doing sanity check on the name of the user passed in.  Note we can use direct compairson because the pointer values and memory values should be identical to the constants.
+    if ((WhosPreferencesToList != kCurrentUser) && (WhosPreferencesToList != kAllUsers))
+    {
+        return(false);
+    }
+    
+    //doing sanity check on index passed in.  Return false if index isn't valid.
+    if ((LoginItemIndex < 0) || (LoginItemIndex > GetCountOfLoginItems(WhosPreferencesToList)))
+    {
+	return(false);
+    }
+    
+    StringToPrint = ReturnLoginItemPropertyAtIndex(WhosPreferencesToList, kFullPathInfo, LoginItemIndex);
+
+    if (StringToPrint == NULL)
+    {
+	return(false);
+    }
+    
+    printf("\tFull path to App: %s\n", StringToPrint);
+
+    StringToPrint = ReturnLoginItemPropertyAtIndex(WhosPreferencesToList, kHideInfo, LoginItemIndex);
+
+    if (StringToPrint == NULL)
+    {
+	return(false);
+    }
+    
+    printf("\tHide Info:        %s\n", StringToPrint);
+
+    StringToPrint = ReturnLoginItemPropertyAtIndex(WhosPreferencesToList, kApplicationNameInfo, LoginItemIndex);
+
+    if (StringToPrint == NULL)
+    {
+	return(false);
+    }
+    
+    printf("\tExecutable Name:  %s\n", StringToPrint);
+    
+    return(true);
+}
+
+/***************************************************************************************************/
+// PrintOutAllLoginItems
+//**************************************************************************************************/
+// This function will print out all the LoginItems for the specified user 
+//**************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want to print the LoginItems from.  The two alternatives are: kCurrentUser which removes login
+//                items for the which are specific to that user (these are preferences found in 
+//                /Users/<username>/Library/Preferences) and kAnyUsers which lists LoginItems which are common to all 
+//                users on the system (these preferences are found in /Library/Preferences/).
+//
+// Output Parameters:
+// Return -> 	This function a boolean true if the LoginItem was successfully printed.  
+//**************************************************************************************************/
+
+Boolean PrintOutAllLoginItems(CFStringRef WhosPreferencesToList)
+{
+    int NumberOfLoginItems, Counter;
+    Boolean Success;
+    
+    //doing sanity check on the name of the user passed in.  Note we can use direct compairson because the pointer values and memory values should be identical to the constants.
+    if ((WhosPreferencesToList != kCurrentUser) && (WhosPreferencesToList != kAllUsers))
+    {
+        return(false);
+    }
+
+    NumberOfLoginItems = GetCountOfLoginItems(WhosPreferencesToList);
+    
+    if (NumberOfLoginItems == 0)
+    {
+	printf("LoginItems are Empty (i.e. there are no LoginItems)\n");
+    }
+    
+    for (Counter = 0 ; Counter < NumberOfLoginItems ; Counter++)
+    {
+	printf("LoginItem Index %d:\n", Counter);
+	Success = PrintOutLoginItemAtIndex(WhosPreferencesToList, Counter);
+	
+	if (Success == false) //if couldn't print the specified index then we give up.
+	{return(false);}
+    }
+    
+    return(true);
+}
+
+/***************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want to print the number of LoginItems from.  The two alternatives are: kCurrentUser 
+// 		which removes login items for the which are specific to that user (these are preferences found in 
+//                /Users/<username>/Library/Preferences) and kAnyUsers which lists LoginItems which are common to all 
+//                users on the system (these preferences are found in /Library/Preferences/).
+//
+// Output Parameters:
+// Return -> 	True if number of login items successfully printed. false otherwise.
+//**************************************************************************************************/
+Boolean PrintNumberOfLoginItems(CFStringRef WhosPreferencesToList)
+{
+
+        //doing sanity check on the name of the user passed in.  Note we can use direct compairson because the pointer values and memory values should be identical to the constants.
+    if ((WhosPreferencesToList != kCurrentUser) && (WhosPreferencesToList != kAllUsers))
+    {
+        return(false);
+    }
+
+    printf("The number of LoginItems is: %d", GetCountOfLoginItems(WhosPreferencesToList));
+    return(true);
+}
+
+
diff --git a/mac_installer/LoginItemAPI.h b/mac_installer/LoginItemAPI.h
new file mode 100644
index 0000000..5f86586
--- /dev/null
+++ b/mac_installer/LoginItemAPI.h
@@ -0,0 +1,222 @@
+/*
+     File:       LoginItemAPI.h
+ 
+     Copyright:  © 2000-2003 by Apple Computer, Inc., all rights reserved.
+ 
+     Bugs?:      For bug reports, consult the following page on
+                 the World Wide Web:
+ 
+                     http://developer.apple.com/bugreporter/
+ 
+*/
+
+#if defined(__MWERKS__)  //for use with CodeWarrior
+#   include <Carbon.h> //making a carbon project so need carbon.h
+#	include <SIOUX.h> //this is used for window control in CodeWarrior
+#else //for use with project builder
+#	import <CoreFoundation/CoreFoundation.h>  //This is the only ProjectBuilder include we really needed
+#	import <CoreFoundation/CFPreferences.h>  //This is where all the CFPreference APIs come from.
+#	import <stdio.h> //used when printing out to standard output
+#endif
+
+//These are used as constants for the second argument to  AddLoginItemWithPropertiesToUser.  Either the application is hidden on launch or shows up this property decides this.  
+#define kHideOnLaunch      true
+#define kDoNotHideOnLaunch false
+
+//These are used as constants for the third argument to  AddLoginItemWithPropertiesToUser.  You can either set the properties of the current user or all the users on the system (with kAllUsers).
+#define kCurrentUser kCFPreferencesCurrentUser
+#define kAllUsers    kCFPreferencesAnyUser
+
+//#define kAppStr "loginwindow"  
+#define kAppStr "loginwindow"  
+//The preference name where LoginItem information is stored.  We are actually writing to the file loginwindow.plist in either /Users/Library/Preferences/ directory (for the kCurrentUser) or the /Library/Preferences folder (for All Users).   Note that if you want to install this for all users on the system then you must be root/admin to do so.  If you need to know how to become root check out the sample code: "AuthSample" on the developer.apple.com website
+
+#define kKeyStr "AutoLaunchedApplicationDictionary" //The required "special" key for accessing LoginItem information.
+
+//defining types which are used as the request types into the function GetListOfLoginItems.  kFullPathInfo causes the routine to return the full path as a character string, kApplicationNameInfo causes just the application or alias name to be returned, kHideInfo returns if the application is hidden on launch or not.
+
+#define kFullPathInfo 		1
+#define kApplicationNameInfo 	2
+#define kHideInfo 		3
+
+//This is the character array size used by GetListOfLoginItems
+#define kLoginItemInfoLength 1025
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***************************************************************************************************/
+// AddLoginItemWithPropertiesToUser
+/***************************************************************************************************/
+// This function will add a LoginItem to the list of LoginItems when called.  The properties
+// given to the new LoginItem are passed when calling the function.  Note that *no* check is made
+// when adding the LoginItem to ensure that the path points to a valid application.  Note that the LoginItem
+// Is always added to the *end* of the list of LoginItems.
+/***************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToChange) -> A constant which represents which users preferences
+//                we want to change.  In this case there are two alternatives: kCurrentUser which
+//                changes the preferences of the current user.  The second alternative is kAllUsers.
+//                The kAllUsers LoginItems are launched for all users on the system.  You must be root
+//                or admin to use the kAllUsers option.
+// Second Parameter (AbsolutePath) -> 	The absolute path of the application to be launched 
+//                expressed as a Standard C string.  (example: "/Applications/Clock")
+// Third Parameter (HidetheApplicationOnStartup) -> A value representing if you want
+//                your application to be hidden at login time. kHideOnLaunch if you want the 
+//                application to be hidden after it is launched.  If you want the application to show
+//                up normally use be hidden use kDoNotHideOnLaunch
+//
+// Output Parameters:
+// Return -> 	This function returns a boolean value representing if the function was successful.
+//              The function returns true if the LoginItem was successfully added.  False if
+//              otherwise.  No additional error codes are returned. 
+// Other Notes: This code doesn't work properly if more than one application is attempting to write to
+//              the LoginItems preference at once. 
+//              Also no check is made to ensure that what you are adding to the LoginItem list isn't a 
+//              duplicate.  If there is a duplicate however only one instance of the application is launched
+/***************************************************************************************************/
+
+Boolean AddLoginItemWithPropertiesToUser(CFStringRef WhosPreferencesToChange, const char* AbsolutePath, Boolean HidetheApplicationOnLaunch);
+
+/***************************************************************************************************/
+// ReturnLoginItemPropertyAtIndex
+/***************************************************************************************************/
+// This function will return the list of LoginItems as a CFArray.  
+/***************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want to examine.  The two alternatives are: kCurrentUser which lists the LoginItems
+//                which are specific to that user (these are preferences found in /Users/<username>/Library/Preferences)
+//            	  and kAnyUsers which lists LoginItems which are common to all users on the system (these
+//                preferences are found in /Library/Preferences/).
+// Second Parameter (RequestType) -> A constant representing which type of request for information you are making.  
+//                There are currently three request types.  kFullPathInfo which causes this routine to return the 
+//                absolute path to the LoginItem which is stored as a C String (example return value:
+//                "/Applications/Clock.app").  Second alternative is kApplicationNameInfo which causes the routine to 
+//                return the name of the application as a C string (example return value: "Clock.app").  Third 
+//                alternative is kHideInfo which causes the routine to return the hide current status as a C string.  
+//                The two return types possible are the C Strings "Hide" and "DoNotHide" (example return value: "Hide")
+// Third Parameter (LoginItemIndex) -> An integer representing the LoginItem index.  Note that the LoginItems are 
+//                stored as an array indexed from 0 to N-1 where N is the number of LoginItems.  Note that if an invalid
+//                index is passed then you will get a return value of NULL indicating error status.
+//
+// Output Parameters:
+// Return -> 	This function returns a value of NULL if an error has occurred (likely caused by attempting to index an
+//              invalid LoginItemIndex).  If no error has occurred then a C String is returned which represents the data
+//              requested on the LoginItem at the index given.  The three return types are: 
+//              1) For a kFullPathInfo request the absolute path of the LoginItem is returned (example: 
+//              "/Applications/TextEdit").  2) For a kApplicationNameInfo request only the LoginItem name is returned
+//              with no path (example: "TextEdit").  3) For a kHideInfo request either the C string "Hide" is returned 
+//              if LoginItem is hidden on launch or the C string value is "DoNotHide" if the LoginItem isn't hidden on 
+//              launch
+// Other Notes: The actual indexing of the LoginItem array starts at zero and goes up to N-1 where N is the number of
+//              LoginItems.  Also, the order that the LoginItems are listed in the array is consistent with the ordering
+//              of the LoginItems within the preference file.  Note that the ordering of the LoginItems in the array
+//              *does not* correspond to the order which the LoginItems are launched.  The order which LoginItems are 
+//              launched are determined by OSX at Login time and is based on what launch order would be most efficent.
+/***************************************************************************************************/
+
+char* ReturnLoginItemPropertyAtIndex(CFStringRef WhosPreferencesToList, int RequestType, int LoginItemIndex);
+
+/***************************************************************************************************/
+// GetCountOfLoginItems
+/***************************************************************************************************/
+// This function will return the number of LoginItems for the user requested.    
+/***************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want the number of LoginItems for.  The two alternatives are: kCurrentUser which lists the 
+//                LoginItems which are specific to that user (these are preferences found in 
+//                /Users/<username>/Library/Preferences) and kAnyUsers which lists LoginItems which are common to all 
+//                users on the system (these preferences are found in /Library/Preferences/).
+//
+// Output Parameters:
+// Return -> 	This function returns the number of LoginItems for the user requested as a signed integer. 
+/***************************************************************************************************/
+
+int GetCountOfLoginItems(CFStringRef WhosPreferencesToList);
+
+/***************************************************************************************************/
+// RemoveLoginItemAtIndex
+/***************************************************************************************************/
+// This function will remove the LoginItem at the given index for the user specified.    
+/***************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want to remove the LoginItem from.  The two alternatives are: kCurrentUser which removes login
+//                items for the which are specific to that user (these are preferences found in 
+//                /Users/<username>/Library/Preferences) and kAnyUsers which lists LoginItems which are common to all 
+//                users on the system (these preferences are found in /Library/Preferences/).
+// Second Parameter (LoginItemIndex) -> An integer representing the LoginItem index of the LoginItem you want removed. 
+// 		 It is assumed that you will look up the LoginItems using a couple ReturnLoginItemPropertyAtIndex calls
+//		 which will allow you to know which LoginItem you want to remove by index.  Note that the LoginItems are
+//               stored as an array indexed from 0 to N-1 where N is the number of LoginItems.  Note that if an invalid
+//               index is passed then you will get a return value of false indicating error status.
+//
+// Output Parameters:
+// Return -> 	This function a boolean true if the LoginItem was successfully removed.  This function returns false if
+//		the LoginItem could not be removed (or if it was not found).  *Note that when you remove a LoginItem 
+//		from the list of LoginItems the index of all LoginItems following the removed item will be 
+//		deincremented by one.  This means there will never be gaps in the list of LoginItems (i.e. empty slots 
+//		in the array of LoginItems). 
+/***************************************************************************************************/
+
+Boolean RemoveLoginItemAtIndex(CFStringRef WhosPreferencesToChange, int LoginItemIndex);
+
+/***************************************************************************************************/
+// PrintOutLoginItemAtIndex
+/***************************************************************************************************/
+// This function will print out the LoginItem at the specified index 
+/***************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want to print the LoginItem from.  The two alternatives are: kCurrentUser which removes login
+//                items for the which are specific to that user (these are preferences found in 
+//                /Users/<username>/Library/Preferences) and kAnyUsers which lists LoginItems which are common to all 
+//                users on the system (these preferences are found in /Library/Preferences/).
+// Second Parameter (LoginItemIndex) -> An integer representing the LoginItem index of the LoginItem you want to 
+// 		print. Note that the LoginItems are stored as an array indexed from 0 to N-1 where N is the number of 
+// 		LoginItems.  Note that if an invalid index is passed then you will get a return value of false 
+//		indicating error status.
+//
+// Output Parameters:
+// Return -> 	This function a boolean true if the LoginItem was successfully printed.  
+/***************************************************************************************************/
+
+Boolean PrintOutLoginItemAtIndex(CFStringRef WhosPreferencesToList, int LoginItemIndex);
+
+/***************************************************************************************************/
+// PrintOutAllLoginItems
+/***************************************************************************************************/
+// This function will print out all the LoginItems for the specified user 
+/***************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want to print the LoginItems from.  The two alternatives are: kCurrentUser which removes login
+//                items for the which are specific to that user (these are preferences found in 
+//                /Users/<username>/Library/Preferences) and kAnyUsers which lists LoginItems which are common to all 
+//                users on the system (these preferences are found in /Library/Preferences/).
+//
+// Output Parameters:
+// Return -> 	This function a boolean true if the LoginItem was successfully printed.  
+/***************************************************************************************************/
+
+Boolean PrintOutAllLoginItems(CFStringRef WhosPreferencesToList);
+
+/***************************************************************************************************/
+// Input Parameters:
+// First Parameter (WhosPreferencesToList) -> 	A constant representing which users preferences 
+//                you want to print the number of LoginItems from.  The two alternatives are: kCurrentUser 
+// 		which removes login items for the which are specific to that user (these are preferences found in 
+//                /Users/<username>/Library/Preferences) and kAnyUsers which lists LoginItems which are common to all 
+//                users on the system (these preferences are found in /Library/Preferences/).
+//
+// Output Parameters:
+// Return -> 	True if number of login items successfully printed. false otherwise.
+/***************************************************************************************************/
+Boolean PrintNumberOfLoginItems(CFStringRef WhosPreferencesToList);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/mac_installer/PTP-ReadMe.rtf b/mac_installer/PTP-ReadMe.rtf
new file mode 100644
index 0000000..3b5c38d
--- /dev/null
+++ b/mac_installer/PTP-ReadMe.rtf
@@ -0,0 +1,162 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red2\green87\blue173;}
+\margl1440\margr1440\vieww9000\viewh9000\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\f0\b\fs28 \cf0 Macintosh Progress Thru Processors Desktop Version <VER_NUM> Release Notes\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+\cf0 http://gridrepublic.org\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Installing ProgressThruProcessors Desktop may take several minutes; please be patient.
+\b0 \
+\
+
+\b Dual GPU Macbook Pros:
+\b0  Some newer Macbook Pros have dual graphics processors, one that is more powerful and another that is more energy-efficient, and they switch between them automatically.  This can cause your screensaver to flash on and off frequently, and can prevent ProgressThruProcessors Desktop from detecting the more powerful GPU which is needed to process some applications.  You can force selection either {\field{\*\fldinst{HYPERLINK "http://support.apple.com/kb/HT4110"}}{\fldrslt \cf2 permanently}} or temporarily using a {\field{\*\fldinst{HYPERLINK "http://codykrieger.com/gfxCardStatus/"}}{\fldrslt \cf2 third-party utility}}. But be aware that forcing the use of the NVIDIA GPU may cause faster battery drain; this of course is not an issue when running on AC power.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Upgrade warning 1: 
+\b0 There have been changes to ProgressThruProcessors Desktop's internal file formats.   When you upgrade from version 6.12.x or earlier, ProgressThruProcessors Desktop will automatically upgrade its files.  However, if for any reason you wish to downgrade again to a version earlier than 6.13.x, you will lose any unreported work.  The project servers will send you the tasks again, but they will be restarted from the beginning.  If you think you might need to revert to an older version of ProgressThruProcessors Desktop, you should back up your BOINC Data folder before upgrading.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+If you are upgrading from a version earlier than 6.8.0, you may see a message "Failed to convert file ProgressThruProcessors Desktop Preferences to Unicode."  This is due to our addition of full Unicode support to the ProgressThruProcessors Desktop.  If you get this message, you may need to readjust your column widths and other ProgressThruProcessors Desktop view options, but no other problems will result.  When  you quit ProgressThruProcessors Desktop, these settings will be saved in the new Unicode format.\
+\
+Due to new restrictions imposed by OS 10.6 Snow Leopard, there has been a change in ProgressThruProcessors Desktop's security implementation.  Non-administrative users can no longer run ProgressThruProcessors Desktop unless they are added to group boinc_master.  As of ProgressThruProcessors Desktop 6.8.29, the ProgressThruProcessors Desktop installer asks whether or not you wish to allow this.\
+\
+For more options, please see the BOINC Macintosh administrator tools at:\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+{\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X"}}{\fldrslt \cf0 http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X}}\
+\
+ProgressThruProcessors Desktop on the Mac now supports processing with your graphics card, or GPU.  Please see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/gpu.php"}}{\fldrslt http://boinc.berkeley.edu/gpu.php}} for more information.   If you have a CUDA-capable NVIDIA GPU, you will need to download and install the CUDA driver and libraries for your system from {\field{\*\fldinst{HYPERLINK "http://www.nvidia.com/object/mac-driver-archive.html"}}{\fldrslt http://www.nvidia.com/object/mac-driver-archive.html}}.  ProgressThruProcessors Desktop 6.13.x also supports openCL applications on NVIDIA and ATI / AMD graphics processors.  OpenCL support is standard as part of Mac OS 10.6 and OS 10.7.\
+\
+Starting with version 5.5.4, this software features new, stricter security measures.  See the 
+\b Security
+\b0  section below for important information.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 As of version 6.13.x, ProgressThruProcessors Desktop no longer supports PowerPC Macs; it runs natively on Intel Macs and requires Macintosh OS X version 10.4 or greater.  If you wish to run on a PowerPC Mac, please install an earlier version of ProgressThruProcessors Desktop.  \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Upgrade warning 2: You may lose unreported results
+\b0  if you are running on an 
+\b Intel Mac
+\b0  and upgrading from a version of ProgressThruProcessors Desktop or BOINC earlier than 5.3.21 on an Intel Mac, or if you are transferring Progress Thru Processors or BOINC Data from a PowerPC Mac to an Intel Mac, or from an Intel Mac to a PowerPC Mac.  To prevent this, open ProgressThruProcessors Desktop's window, select the 
+\i Projects
+\i0  tab, select each project and  press the 
+\i Update
+\i0  button.  Then select the 
+\i Tasks
+\i0  tab and make sure there are no tasks "Ready to report."\
+\
+
+\b Setting Progress Thru Processors as your screen saver:
+\b0  This installer adds the  Progress Thru Processors screen saver to your system, and optionally changes your screen saver settings to use the Progress Thru Processors screen saver.  You can also select Progress Thru Processors as your screen saver later, using the Screen Saver or Screen Effects panel in the System Preferences (accessible from the Apple menu).  \
+\
+It may take a minute after the screen saver starts before the science application graphics appear.  \
+\
+Note: on some versions of the Mac OS, you may not be able to exit the Progress Thru Processors screen saver by moving the mouse; you may need to press the mouse button or press any key on the keyboard to exit.  \
+\
+
+\b Security:\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\b0 \cf0 Since version 5.5.4, ProgressThruProcessors Desktop or BOINC for the Macintosh features new, stricter security measures.  This additional security helps protect your computer data from potential theft or accidental or malicious damage by limiting Progress Thru Processors projects' access to your  system and data.  \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 The installer sets special permission for the Progress Thru Processors Desktop and Client, which allows them to write to the shared BOINC Data regardless of which user is logged in.  If you 
+\b copy
+\b0  Progress Thru Processors Desktop or the Progress Thru Processors core client without using the installer, it will not run properly.  \
+\
+However, you can safely 
+\b move
+\b0  the Progress Thru Processors Desktop within the same disk drive or partition.  If you need multiple copies, run the installer again after moving Progress Thru Processors Desktop; this will create a fresh copy in the 
+\b /Applications
+\b0  folder.\
+\
+Progress Thru Processors verifies that ownership and permissions are set properly each time it is launched.  It will tell you to re-install Progress Thru Processors if there is a problem.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 \
+The new safeguards use the basic security protections built into UNIX (the base underlying Mac OS X): permissions and ownership.\
+\
+The administrator (usually the owner) of each computer creates one or more users who can log in, can create private files, and can share other files.  Some of these users are given administrative privileges, some may not have these privileges.\
+\
+There are also groups, which have one or more users as members.  For example, users with administrative privileges are usually members of the "admin" group.\
+\
+In addition to these "visible" users and groups, the operating system contains a number of "hidden" users and groups which are used for various purposes.  A person cannot log in as one of these "hidden" users.  \
+\
+This structure of users and groups is used to provide security by restricting what data and operations each person or application can use.  For example, many files belong to user "system" (also called "root") and group "wheel" so that non-privileged users can't modify them, thus protecting the computer system from accidental or malicious harm.\
+\
+The Progress Thru Processors installer creates 2 new "hidden" users 
+\b boinc_master
+\b0  and 
+\b boinc_project
+\b0 , and two new "hidden" groups, also named 
+\b boinc_master
+\b0  and 
+\b boinc_project
+\b0  (unless they were created by a previous installation of Progress Thru Processors or BOINC.)\
+\
+The installer automatically gives administrators (users who are members of the "admin" group) membership in the two new groups, so that they can easily manipulate Progress Thru Processors files.  The installer asks you if you would like non-admin users to be able to run Progress Thru Processors Desktop and to have access to these files.  This is particularly useful where many people have access to the computer, as in a school computer lab.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 Progress Thru Processors projects are given permission to access only project files, protecting your computer in the event someone downloads bad software from a bogus project, or in the unlikely case that a legitimate project's server is infiltrated by a cracker.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 \
+For technical details of the implementation, please see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/SandboxUser"}}{\fldrslt http://boinc.berkeley.edu/trac/wiki/SandboxUser}} and {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/sandbox.php"}}{\fldrslt http://boinc.berkeley.edu/sandbox.php}}\
+\
+The installer sets Progress Thru Processors Desktop as a Login item for 
+\b all
+\b0  authorized users, not just the user who ran the installer.  You can add or remove Login Items by using the Accounts Pane in the System Preferences (accessible from the Apple menu).  \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Other useful information:
+\b0 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\b \cf0 Troubleshooting tip:
+\b0  If you are upgrading from a version of ProgressThruProcessors Desktop or BOINC prior to 5.5.4 and the installer refuses to let you install, trash the file 
+\b /Library/Receipts/Progress Thru Processors.pkg
+\b0  or 
+\b /Library/Receipts/BOINC.pkg
+\b0  and try again.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+The installer places two items onto your hard drive: Progress Thru Processors Desktop.app in your 
+\b /Applications
+\b0  folder and Progress Thru Processors.saver in your 
+\b /Library/Screen Savers
+\b0  folder.  \
+\
+The installer creates the BOINC Data folder in your 
+\b /Library/Application Support 
+\b0 folder.  If you have previously been running Progress Thru Processors or BOINC in a different folder, copy your data into this folder.  \
+\
+All users who log in on the same Macintosh will share one set of BOINC Data, ensuring that work units are processed in the most timely manner.  \
+\
+You can move (
+\b not
+\b0  copy) Progress Thru Processors Desktop to any folder you wish on the same disk drive or partition.  If you do so, you will need to update the information in each user's Login Items.  In most cases, the Progress Thru Processors screen saver should still work properly.  If it does not, move Progress Thru Processors Desktop back to the 
+\b /Applications
+\b0  folder.\
+\
+\pard\pardeftab720
+\cf0 To completely remove (
+\b uninstall
+\b0 ) ProgressThruProcessors Desktop from your Macintosh, run the 
+\b Uninstall Progress Thru Processors
+\b0  application which is included with the installer.\
+}
\ No newline at end of file
diff --git a/mac_installer/PostInstall.cpp b/mac_installer/PostInstall.cpp
new file mode 100755
index 0000000..218418a
--- /dev/null
+++ b/mac_installer/PostInstall.cpp
@@ -0,0 +1,2015 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2009 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/* PostInstall.cpp */
+
+// Notes on command-line installation to a remote Mac:
+//
+// When the installer is run from the Finder, this Postinstall.app will 
+// display up to two dialogs, asking the user whether or not to:
+//  [1] allow non-administrative users to run the BOINC Manager
+//      (asked only if this Mac has any non-administrative users)
+//  [2] set BOINC as the screensaver for all users who can run BOINC 
+//      (asked only if BOINC screensaver is not already set for them)
+//
+// The installer can also be run from the command line.  This is useful 
+//  for installation on remote Macs.  However, there is no way to respond 
+//  to dialogs during a command-line install.
+//
+// The command-line installer sets the following environment variable: 
+//     COMMAND_LINE_INSTALL=1
+// The postinstall script, postupgrade script, and this Postinstall.app 
+//   detect this environment variable and do the following:
+//  * Redirect the Postinstall.app log output to a file 
+//      /tmp/BOINCInstallLog.txt
+//  * Suppress the 2 dialogs
+//  * test for the existence of a file /tmp/nonadminusersok.txt; if the 
+//     file exists, allow non-administrative users to run BOINC Manager
+//  * test for the existence of a file /tmp/setboincsaver.txt; if the 
+//     file exists, set BOINC as the screensaver for all BOINC users. 
+//
+// Example: To install on a remote Mac from the command line, allowing 
+//   non-admin users to run the BOINC Manager and setting BOINC as the 
+//   screensaver:
+//  * First SCP the "BOINC Installer.pkg" to the remote Mac's /tmp 
+//     directory, then SSh into the remote mac and enter the following
+//  $ touch /tmp/nonadminusersok.txt
+//  $ touch /tmp/setboincsaver.txt
+//  $ sudo installer -pkg "/tmp/BOINC Installer.pkg" -tgt /
+//  $ sudo reboot
+//
+
+#define CREATE_LOG 1    /* for debugging */
+
+#include <Carbon/Carbon.h>
+#include <grp.h>
+
+#include <unistd.h>	// getlogin
+#include <sys/types.h>	// getpwname, getpwuid, getuid
+#include <pwd.h>	// getpwname, getpwuid, getuid
+#include <grp.h>        // getgrnam
+#include <sys/wait.h>	// waitpid
+#include <dirent.h>
+#include <sys/param.h>  // for MAXPATHLEN
+#include <sys/stat.h>   // for chmod
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <cerrno>
+#include <time.h>       // for time()
+#include <vector>
+#include <string>
+
+using std::vector;
+using std::string;
+
+#include "LoginItemAPI.h"
+
+#include "SetupSecurity.h"
+
+
+#define admin_group_name "admin"
+#define boinc_master_user_name "boinc_master"
+#define boinc_master_group_name "boinc_master"
+#define boinc_project_user_name "boinc_project"
+#define boinc_project_group_name "boinc_project"
+
+void Initialize(void);	/* function prototypes */
+Boolean myFilterProc(DialogRef theDialog, EventRecord *theEvent, DialogItemIndex *itemHit);
+int DeleteReceipt(void);
+OSStatus CheckLogoutRequirement(int *finalAction);
+void CheckUserAndGroupConflicts();
+Boolean SetLoginItemOSAScript(long brandID, Boolean deleteLogInItem, char *userName);
+Boolean SetLoginItemAPI(long brandID, Boolean deleteLogInItem);
+OSErr GetCurrentScreenSaverSelection(char *moduleName, size_t maxLen);
+OSErr SetScreenSaverSelection(char *moduleName, char *modulePath, int type);
+void SetSkinInUserPrefs(char *userName, char *skinName);
+Boolean CheckDeleteFile(char *name);
+void SetEUIDBackToUser (void);
+static char * PersistentFGets(char *buf, size_t buflen, FILE *f);
+Boolean IsUserMemberOfGroup(const char *userName, const char *groupName);
+static void c2x(char *what);
+static void escape_url(char *in, char*out);
+int CountGroupMembershipEntries(const char *userName, const char *groupName);
+OSErr UpdateAllVisibleUsers(long brandID);
+long GetBrandID(void);
+int TestRPCBind(void);
+static OSStatus ResynchSystem(void);
+OSErr FindProcess (OSType typeToFind, OSType creatorToFind, ProcessSerialNumberPtr processSN);
+pid_t FindProcessPID(char* name, pid_t thePID);
+static void SleepTicks(UInt32 ticksToSleep);
+int FindSkinName(char *name, size_t len);
+static OSErr QuitOneProcess(OSType signature);
+static OSErr QuitAppleEventHandler(const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon);
+void print_to_log_file(const char *format, ...);
+void strip_cr(char *buf);
+
+extern int check_security(char *bundlePath, char *dataPath, 
+                            int use_sandbox, int isManager, 
+                            char* path_to_error = NULL
+                        );
+
+#define NUMBRANDS 4
+
+/* globals */
+static Boolean                  gCommandLineInstall = false;
+static Boolean                  gQuitFlag = false;
+static Boolean                  currentUserCanRunBOINC = false;
+static char                     loginName[256];
+static long                     OSVersion = 0;
+static time_t                   waitPermissionsStartTime;
+
+static char *saverName[NUMBRANDS];
+static char *saverNameEscaped[NUMBRANDS];
+static char *brandName[NUMBRANDS];
+static char *appName[NUMBRANDS];
+static char *appPath[NUMBRANDS];
+static char *appPathEscaped[NUMBRANDS];
+static char *receiptNameEscaped[NUMBRANDS];
+
+enum { launchWhenDone,
+        logoutRequired,
+        restartRequired,
+        nothingrequired
+    };
+
+/******************************************************************
+***                                                             ***
+***                         NOTE:                               ***
+***                                                             ***
+*** On entry, the postinstall or postupgrade script has set the ***
+*** current directory to the top level of our installer package ***
+***                                                             ***
+******************************************************************/
+
+int main(int argc, char *argv[])
+{
+    Boolean                 Success;
+    ProcessSerialNumber     ourProcess, installerPSN;
+    short                   itemHit;
+    long                    brandID = 0;
+    int                     i;
+    pid_t                   installerPID = 0, coreClientPID = 0;
+    FSRef                   fileRef;
+    OSStatus                err, err_fsref;
+    FILE                    *f;
+    char                    s[256];
+#ifndef SANDBOX
+    group                   *grp;
+#endif  // SANDBOX
+
+    appName[0] = "BOINCManager";
+    appPath[0] = "/Applications/BOINCManager.app";
+    appPathEscaped[0] = "/Applications/BOINCManager.app";
+    brandName[0] = "BOINC";
+    saverName[0] = "BOINCSaver";
+    saverNameEscaped[0] = "BOINCSaver";
+    receiptNameEscaped[0] = "/Library/Receipts/BOINC\\ Installer.pkg";
+
+    appName[1] = "GridRepublic Desktop";
+    appPath[1] = "/Applications/GridRepublic Desktop.app";
+    appPathEscaped[1] = "/Applications/GridRepublic\\ Desktop.app";
+    brandName[1] = "GridRepublic";
+    saverName[1] = "GridRepublic";
+    saverNameEscaped[1] = "GridRepublic";
+    receiptNameEscaped[1] = "/Library/Receipts/GridRepublic\\ Installer.pkg";
+
+    appName[2] = "Progress Thru Processors Desktop";
+    appPath[2] = "/Applications/Progress Thru Processors Desktop.app";
+    appPathEscaped[2] = "/Applications/Progress\\ Thru\\ Processors\\ Desktop.app";
+    brandName[2] = "Progress Thru Processors";
+    saverName[2] = "Progress Thru Processors";
+    saverNameEscaped[2] = "Progress\\ Thru\\ Processors";
+    receiptNameEscaped[2] = "/Library/Receipts/Progress\\ Thru\\ Processors\\ Installer.pkg";
+
+    appName[3] = "Charity Engine Desktop";
+    appPath[3] = "/Applications/Charity Engine Desktop.app";
+    appPathEscaped[3] = "/Applications/Charity\\ Engine\\ Desktop.app";
+    brandName[3] = "Charity Engine";
+    saverName[3] = "Charity Engine";
+    saverNameEscaped[3] = "Charity\\ Engine";
+    receiptNameEscaped[3] = "/Library/Receipts/Charity\\ Engine\\ Installer.pkg";
+
+    ::GetCurrentProcess (&ourProcess);
+
+    puts("Starting PostInstall app\n");
+    fflush(stdout);
+    // getlogin() gives unreliable results under OS 10.6.2, so use environment
+    strncpy(loginName, getenv("USER"), sizeof(loginName)-1);
+    printf("login name = %s\n", loginName);
+    fflush(stdout);
+
+    if (getenv("COMMAND_LINE_INSTALL") != NULL) {
+        gCommandLineInstall = true;
+        puts("command-line install\n");
+        fflush(stdout);
+    }
+
+    err = Gestalt(gestaltSystemVersion, &OSVersion);
+    if (err != noErr) {
+        printf("Gestalt(gestaltSystemVersion) returned error %ld\n", err);
+        fflush(stdout);
+        return err;
+    }
+    
+    for (i=0; i<argc; i++) {
+        if (strcmp(argv[i], "-part2") == 0)
+            return DeleteReceipt();
+    }
+
+    Initialize();
+
+    QuitOneProcess('BNC!'); // Quit any old instance of BOINC manager
+    sleep(2);
+
+    // Core Client may still be running if it was started without Manager
+    coreClientPID = FindProcessPID("boinc", 0);
+    if (coreClientPID)
+        kill(coreClientPID, SIGTERM);   // boinc catches SIGTERM & exits gracefully
+
+    err = FindProcess ('APPL', 'xins', &installerPSN);
+    if (err == noErr)
+        err = GetProcessPID(&installerPSN , &installerPID);
+
+    brandID = GetBrandID();
+    
+    if ((brandID < 0) || (brandID >= NUMBRANDS)) {       // Safety check
+        brandID = 0;
+    }
+    
+    if (OSVersion < 0x1040) {
+        ::SetFrontProcess(&ourProcess);
+        // Remove everything we've installed
+        // "\pSorry, this version of GridRepublic requires system 10.4.0 or higher."
+        s[0] = sprintf(s+1, "Sorry, this version of %s requires system 10.4.0 or higher.", brandName[brandID]);
+        StandardAlert (kAlertStopAlert, (StringPtr)s, NULL, NULL, &itemHit);
+
+        // "rm -rf /Applications/GridRepublic\\ Desktop.app"
+        sprintf(s, "rm -rf %s", appPathEscaped[brandID]);
+        system (s);
+        
+        // "rm -rf /Library/Screen\\ Savers/GridRepublic.saver"
+        sprintf(s, "rm -rf /Library/Screen\\ Savers/%s.saver", saverNameEscaped[brandID]);
+        system (s);
+        
+        // "rm -rf /Library/Receipts/GridRepublic.pkg"
+        sprintf(s, "rm -rf %s", receiptNameEscaped[brandID]);
+        system (s);
+
+        // We don't customize BOINC Data directory name for branding
+        system ("rm -rf /Library/Application\\ Support/BOINC\\ Data");
+
+        err = kill(installerPID, SIGKILL);
+
+	ExitToShell();
+    }
+    
+    sleep (2);
+
+    // Install all_projects_list.xml file, but only if one doesn't 
+    // already exist, since a pre-existing one is probably newer.
+    f = fopen("/Library/Application Support/BOINC Data/all_projects_list.xml", "r");
+    if (f) {
+        fclose(f);      // Already exists
+    } else {
+        system ("cp -fp Contents/Resources/all_projects_list.xml /Library/Application\\ Support/BOINC\\ Data/");
+        system ("chmod a-x /Library/Application\\ Support/BOINC\\ Data/all_projects_list.xml");
+    }
+    
+    Success = false;
+    
+#ifdef SANDBOX
+
+    CheckUserAndGroupConflicts();
+    for (i=0; i<5; ++i) {
+        err = CreateBOINCUsersAndGroups();
+        if (err != noErr) {
+            printf("CreateBOINCUsersAndGroups returned %ld (repetition=%d)", err, i);
+            fflush(stdout);
+            continue;
+        }
+        
+        // err = SetBOINCAppOwnersGroupsAndPermissions("/Applications/GridRepublic Desktop.app");
+        err = SetBOINCAppOwnersGroupsAndPermissions(appPath[brandID]);
+        
+        if (err != noErr) {
+            printf("SetBOINCAppOwnersGroupsAndPermissions returned %ld (repetition=%d)", err, i);
+            fflush(stdout);
+            continue;
+        }
+
+        err = SetBOINCDataOwnersGroupsAndPermissions();
+        if (err != noErr) {
+            printf("SetBOINCDataOwnersGroupsAndPermissions returned %ld (repetition=%d)", err, i);
+            fflush(stdout);
+            continue;
+        }
+        
+        err = check_security(appPath[brandID], "/Library/Application Support/BOINC Data", true, false);
+        if (err != noErr) {
+            printf("check_security returned %ld (repetition=%d)", err, i);
+            fflush(stdout);
+        } else {
+            break;
+        }
+    }
+    
+#else   // ! defined(SANDBOX)
+
+    // The BOINC Manager and Core Client have the set-user-ID-on-execution 
+    // flag set, so their ownership is important and must match the 
+    // ownership of the BOINC Data directory.
+    
+    // Find an appropriate admin user to set as owner of installed files
+    // First, try the user currently logged in
+    grp = getgrnam(admin_group_name);
+    i = 0;
+    while ((p = grp->gr_mem[i]) != NULL) {   // Step through all users in group admin
+        if (strcmp(p, loginName) == 0) {
+            Success = true;     // Logged in user is a member of group admin
+            break;
+        }
+        ++i;
+    }
+    
+    // If currently logged in user is not admin, use first non-root admin user
+    if (!Success) {
+        i = 0;
+        while ((p = grp->gr_mem[i]) != NULL) {   // Step through all users in group admin
+            if (strcmp(p, "root") != 0)
+                break;
+            ++i;
+        }
+    }
+
+    // Set owner of branded BOINCManager and contents, including core client
+    // "chown -Rf username /Applications/GridRepublic\\ Desktop.app"
+    sprintf(s, "chown -Rf %s %s", p, appPathEscaped[brandID]);
+    system (s);
+
+    // Set owner of BOINC Screen Saver
+    // "chown -Rf username /Library/Screen\\ Savers/GridRepublic.saver"
+    sprintf(s, "chown -Rf %s /Library/Screen\\ Savers/%s.saver", p, saverNameEscaped[brandID]);
+    system (s);
+
+    //  We don't customize BOINC Data directory name for branding
+    // "chown -Rf username /Library/Application\\ Support/BOINC\\ Data"
+    sprintf(s, "chown -Rf %s /Library/Application\\ Support/BOINC\\ Data", p);
+    system (s);
+
+    // "chmod -R a+s /Applications/GridRepublic\\ Desktop.app"
+    sprintf(s, "chmod -R a+s %s", appPathEscaped[brandID]);
+    system (s);
+
+#endif   // ! defined(SANDBOX)
+
+    // Remove any branded versions of BOINC other than ours (i.e., old versions) 
+    for (i=0; i< NUMBRANDS; i++) {
+        if (i == brandID) continue;
+        
+        // "rm -rf /Applications/GridRepublic\\ Desktop.app"
+        sprintf(s, "rm -rf %s", appPathEscaped[i]);
+        system (s);
+        
+        // "rm -rf /Library/Screen\\ Savers/GridRepublic.saver"
+        sprintf(s, "rm -rf /Library/Screen\\ Savers/%s.saver", saverNameEscaped[i]);
+        system (s);
+    }
+    
+   if (brandID == 0) {  // Installing generic BOINC
+        system ("rm -f /Library/Application\\ Support/BOINC\\ Data/Branding");
+    }
+    
+    // err_fsref = FSPathMakeRef((StringPtr)"/Applications/GridRepublic Desktop.app", &fileRef, NULL);
+    err_fsref = FSPathMakeRef((StringPtr)appPath[brandID], &fileRef, NULL);
+    
+    if (err_fsref == noErr)
+        err = LSRegisterFSRef(&fileRef, true);
+    
+    err = UpdateAllVisibleUsers(brandID);
+    if (err != noErr)
+        return err;
+
+#if 0   // WaitPermissions is not needed when using wrapper
+#ifdef SANDBOX
+    pid_t                   waitPermissionsPID = 0;
+    uid_t                   saved_euid, saved_uid, b_m_uid;
+    passwd                  *pw;
+    int                     finalInstallAction;
+    DialogRef               theWin;
+
+    err = CheckLogoutRequirement(&finalInstallAction);
+    printf("CheckLogoutRequirement returned %d\n", finalInstallAction);
+    fflush(stdout);
+    
+    if (finalInstallAction == launchWhenDone) {
+
+        // Wait for BOINC's RPC socket address to become available to user boinc_master, in
+        // case we are upgrading from a version which did not run as user boinc_master.
+        saved_uid = getuid();
+        saved_euid = geteuid();
+        
+        pw = getpwnam(boinc_master_user_name);
+        b_m_uid = pw->pw_uid;
+        seteuid(b_m_uid);
+        
+        for (i=0; i<120; i++) {
+            err = TestRPCBind();
+            if (err == noErr)
+                break;
+            
+            sleep(1);
+        }
+        
+        seteuid(saved_euid);
+            
+        FSRef               theFSRef;
+
+        err = FSPathMakeRef((StringPtr)"/Library/Application Support/BOINC Data/WaitPermissions.app", 
+                &theFSRef, NULL);
+        if (err) {
+            printf("FSPathMakeRef(WaitPermissions) returned error %ld\n", err);
+            fflush(stdout);
+        }
+        
+        // When we first create the boinc_master group and add the current user to the 
+        // new group, there is a delay before the new group membership is recognized.  
+        // If we launch the BOINC Manager too soon, it will fail with a -1037 permissions 
+        // error, so we wait until the current user can access the switcher application.
+        // Apparently, in order to get the changed permissions / group membership, we must 
+        // launch a new process belonging to the user.  It may also need to be in a new 
+        // process group or new session. Neither system() nor popen() works, even after 
+        // setting the uid and euid back to the logged in user, but LSOpenFSRef() does.
+        // The WaitPermissions application loops until it can access the switcher 
+        // application.
+        err = LSOpenFSRef(&theFSRef, NULL);
+        if (err) {
+            printf("LSOpenFSRef(WaitPermissions) returned error %ld\n", err);
+            fflush(stdout);
+        }
+        waitPermissionsStartTime = time(NULL);
+        for (i=0; i<15; i++) {     // Show "Please wait..." alert after 15 seconds
+            waitPermissionsPID = FindProcessPID("WaitPermissions", 0);
+            if (waitPermissionsPID == 0) {
+                return 0;
+            }
+            sleep(1);
+        }
+        
+        if (gCommandLineInstall) {
+            printf("Finishing install.  Please wait ...\n");
+            printf("This may take a few more minutes.\n");
+            fflush(stdout);
+        } else {
+            CreateStandardAlert(kAlertNoteAlert, CFSTR("Finishing install.  Please wait ..."), CFSTR("This may take a few more minutes."), NULL, &theWin);
+            HideDialogItem(theWin, kStdOkItemIndex);
+            RemoveDialogItems(theWin, kStdOkItemIndex, 1, false);
+            RunStandardAlert(theWin, &myFilterProc, &itemHit);
+        }
+    }
+#endif   // SANDBOX
+#endif  // WaitPermissions is not needed when using wrapper
+
+    
+    return 0;
+}
+
+
+Boolean myFilterProc(DialogRef theDialog, EventRecord *theEvent, DialogItemIndex *itemHit) {
+    static time_t       lastCheckTime = 0;
+    time_t              now = time(NULL);
+    pid_t               waitPermissionsPID = 0;
+
+    if (now != lastCheckTime) {
+            waitPermissionsPID = FindProcessPID("WaitPermissions", 0);
+            if (waitPermissionsPID == 0) {
+                *itemHit = kStdOkItemIndex;
+                return true;
+            }
+        lastCheckTime = now;
+        // Limit delay to 3 minutes
+        if ((now - waitPermissionsStartTime) > 180) {
+            *itemHit = kStdOkItemIndex;
+            return true;
+        }
+    }
+
+return false;
+}
+
+
+// After installation has completed, delete the installer receipt.  
+// If we don't need to logout the user, also launch BOINC Manager.
+int DeleteReceipt()
+{
+    ProcessSerialNumber     installerPSN;
+    long                    brandID = 0;
+    int                     i;
+    pid_t                   installerPID = 0;
+    OSStatus                err;
+    int                     finalInstallAction;
+    FSRef                   fileRef;
+    char                    s[256];
+    struct stat             sbuf;
+    OSStatus                err_fsref;
+
+    Initialize();
+
+    err = CheckLogoutRequirement(&finalInstallAction);
+//    print_to_log_file("CheckLogoutRequirement returned %d\n", finalInstallAction);
+    
+    brandID = GetBrandID();
+
+    // Remove installer package receipt so we can run installer again if needed to fix permissions
+    // "rm -rf /Library/Receipts/GridRepublic.pkg"
+    sprintf(s, "rm -rf %s", receiptNameEscaped[brandID]);
+    system (s);
+
+    // err_fsref = FSPathMakeRef((StringPtr)"/Applications/GridRepublic Desktop.app", &fileRef, NULL);
+    err_fsref = FSPathMakeRef((StringPtr)appPath[brandID], &fileRef, NULL);
+    if (finalInstallAction == launchWhenDone) {
+
+        err = FindProcess ('APPL', 'xins', &installerPSN);
+        if (err == noErr) {
+            err = GetProcessPID(&installerPSN , &installerPID);
+
+           // Launch BOINC Manager when user closes installer or after 15 seconds
+            for (i=0; i<15; i++) { // Wait 15 seconds max for installer to quit
+                sleep (1);
+                if (err == noErr)
+                    if (FindProcessPID(NULL, installerPID) == 0)
+                        break;
+            }
+        }
+
+        // If system is set up to run BOINC Client as a daemon using launchd, launch it 
+        //  as a daemon and allow time for client to start before launching BOINC Manager.
+        err = stat("/Library/LaunchDaemons/edu.berkeley.boinc.plist", &sbuf);
+        if (err == noErr) {
+            system("launchctl unload /Library/LaunchDaemons/edu.berkeley.boinc.plist");
+            i = system("launchctl load /Library/LaunchDaemons/edu.berkeley.boinc.plist");
+            if (i == 0) sleep (2);
+        }
+        err = LSOpenFSRef(&fileRef, NULL);
+    }
+
+    return 0;
+}
+
+
+OSStatus CheckLogoutRequirement(int *finalAction)
+{    
+    *finalAction = restartRequired;
+
+    if (OSVersion < 0x1040) {
+        return noErr;   // Always require restart on OS 10.3.9
+    }
+    
+#ifdef SANDBOX
+    if (loginName[0]) {
+        if (!IsUserMemberOfGroup(loginName, boinc_master_group_name)) {
+            *finalAction = nothingrequired;
+            return noErr;   // Logged in user is not a member of group boinc_master
+        }
+    }
+#endif  // SANDBOX
+
+    char                    path[MAXPATHLEN];
+    FSRef                   infoPlistFileRef;
+    Boolean                 isDirectory, result;
+    CFURLRef                xmlURL = NULL;
+    CFDataRef               xmlDataIn = NULL;
+    CFPropertyListRef       propertyListRef = NULL;
+    CFStringRef             restartKey = CFSTR("IFPkgFlagRestartAction");
+    CFStringRef             currentValue = NULL;
+//    CFStringRef             valueRestartRequired = CFSTR("RequiredRestart");
+    CFStringRef             valueLogoutRequired = CFSTR("RequiredLogout");
+    CFStringRef             valueNoRestart = CFSTR("NoRestart");
+    CFStringRef             errorString = NULL;
+    OSStatus                err = noErr;
+
+    getcwd(path, sizeof(path));
+    strlcat(path, "/Contents/Info.plist", sizeof(path));
+
+    err = FSPathMakeRef((UInt8*)path, &infoPlistFileRef, &isDirectory);
+    if (err)
+        return err;
+        
+    xmlURL = CFURLCreateFromFSRef(NULL, &infoPlistFileRef);
+    if (xmlURL == NULL)
+        return -1;
+
+    // Read XML Data from file
+    result = CFURLCreateDataAndPropertiesFromResource(NULL, xmlURL, &xmlDataIn, NULL, NULL, &err);
+    if (err == noErr)
+        if (!result)
+            err = coreFoundationUnknownErr;
+	
+    if (err == noErr) { // Convert XML Data to internal CFPropertyListRef / CFDictionaryRef format
+        propertyListRef = CFPropertyListCreateFromXMLData(NULL, xmlDataIn, kCFPropertyListMutableContainersAndLeaves, &errorString);
+        if (propertyListRef == NULL)
+            err = coreFoundationUnknownErr;
+    }
+    
+    if (err == noErr) { // Get current value for our key
+        currentValue = (CFStringRef)CFDictionaryGetValue((CFDictionaryRef)propertyListRef, restartKey);
+        if (currentValue == NULL)
+            err = coreFoundationUnknownErr;
+    }    
+    
+    if (err == noErr) {
+        if (CFStringCompare(currentValue, valueLogoutRequired, 0) == kCFCompareEqualTo)
+            *finalAction = logoutRequired;
+        else if (CFStringCompare(currentValue, valueNoRestart, 0) == kCFCompareEqualTo)
+            *finalAction = launchWhenDone;
+    }
+   
+    if (xmlURL)
+        CFRelease(xmlURL);
+    if (xmlDataIn)
+        CFRelease(xmlDataIn);
+    if (propertyListRef)
+        CFRelease(propertyListRef);
+    return err;
+}
+
+
+// Some newer versions of the OS define users and groups which may conflict with 
+// our previously created boinc_master or boinc_project user or group.  This could 
+// also happen when the user installs new software.  So we must check for such 
+// duplicate UserIDs and groupIDs; if found, we delete our user or group so that 
+// the PostInstall application will create a new one that does not conflict.
+//
+// Older versions of the installer created our users and groups at the first
+// unused IDs at or above 25.  Apple now recommends using IDs at or above 501, 
+// to reduce the likelihood of conflicts with future UserIDs and groupIDs.
+// If we have previously created UserIDs and / or groupIDs below 501, this code 
+// now removes them so we can create new ones above 500.
+void CheckUserAndGroupConflicts()
+{
+#ifdef SANDBOX
+    passwd          *pw = NULL;
+    group           *grp = NULL;
+    gid_t           boinc_master_gid = 0, boinc_project_gid = 0;
+    uid_t           boinc_master_uid = 0, boinc_project_uid = 0;
+    
+    FILE            *f;
+    char            cmd[256], buf[256];
+    int             entryCount;
+    OSErr           err = noErr;
+
+    if (OSVersion < 0x1050) {
+        // This fails under OS 10.4, but should not be needed under OS 10.4
+        return;     
+    }
+
+    printf("Checking user and group conflicts\n");
+    fflush(stdout);
+    
+    entryCount = 0;
+    grp = getgrnam(boinc_master_group_name);
+    if (grp) {
+        boinc_master_gid = grp->gr_gid;
+        printf("boinc_master group ID = %d\n", (int)boinc_master_gid);
+        fflush(stdout);
+        if (boinc_master_gid > 500) {
+            sprintf(cmd, "dscl . -search /Groups PrimaryGroupID %d", boinc_master_gid);
+            f = popen(cmd, "r");
+            if (f) {
+                while (PersistentFGets(buf, sizeof(buf), f)) {
+                    if (strstr(buf, "PrimaryGroupID")) {
+                        ++entryCount;
+                    }
+                }
+                pclose(f);
+            }    
+        }
+    }
+    if ((boinc_master_gid < 501) || (entryCount > 1)) {
+        err = system ("dscl . -delete /groups/boinc_master");
+        // User boinc_master must have group boinc_master as its primary group.
+        // Since this group no longer exists, delete the user as well.
+        if (err) {
+            fprintf(stdout, "dscl . -delete /groups/boinc_master returned %d\n", err);
+            fflush(stdout);
+        }
+        err = system ("dscl . -delete /users/boinc_master");
+        if (err) {
+            fprintf(stdout, "dscl . -delete /users/boinc_master returned %d\n", err);
+            fflush(stdout);
+        }
+        ResynchSystem();
+    }
+
+    entryCount = 0;
+    grp = getgrnam(boinc_project_group_name);
+    if (grp) {
+        boinc_project_gid = grp->gr_gid;
+        printf("boinc_project group ID = %d\n", (int)boinc_project_gid);
+        fflush(stdout);
+        if (boinc_project_gid > 500) {
+            sprintf(cmd, "dscl . -search /Groups PrimaryGroupID %d", boinc_project_gid);
+            f = popen(cmd, "r");
+            if (f) {
+                while (PersistentFGets(buf, sizeof(buf), f)) {
+                    if (strstr(buf, "PrimaryGroupID")) {
+                        ++entryCount;
+                    }
+                }
+                pclose(f);
+            }    
+        }
+    }
+    
+    if ((boinc_project_gid < 501) || (entryCount > 1)) {
+       err = system ("dscl . -delete /groups/boinc_project");
+        if (err) {
+            fprintf(stdout, "dscl . -delete /groups/boinc_project returned %d\n", err);
+            fflush(stdout);
+        }
+        // User boinc_project must have group boinc_project as its primary group.
+        // Since this group no longer exists, delete the user as well.
+        err = system ("dscl . -delete /users/boinc_project");
+        if (err) {
+            fprintf(stdout, "dscl . -delete /users/boinc_project returned %d\n", err);
+            fflush(stdout);
+        }
+        ResynchSystem();
+    }
+
+    if ((boinc_master_gid < 500) && (boinc_project_gid < 500)) {
+        return;
+    }
+
+    entryCount = 0;
+    pw = getpwnam(boinc_master_user_name);
+    if (pw) {
+        boinc_master_uid = pw->pw_uid;
+        printf("boinc_master user ID = %d\n", (int)boinc_master_uid);
+        fflush(stdout);
+        sprintf(cmd, "dscl . -search /Users UniqueID %d", boinc_master_uid);
+        f = popen(cmd, "r");
+        if (f) {
+            while (PersistentFGets(buf, sizeof(buf), f)) {
+                if (strstr(buf, "UniqueID")) {
+                    ++entryCount;
+                }
+            }
+            pclose(f);
+        }    
+    }
+
+    if (entryCount > 1) {
+        err = system ("dscl . -delete /users/boinc_master");
+        if (err) {
+            fprintf(stdout, "dscl . -delete /users/boinc_master returned %d\n", err);
+            fflush(stdout);
+        }
+        ResynchSystem();
+    }
+        
+    entryCount = 0;
+    pw = getpwnam(boinc_project_user_name);
+    if (pw) {
+        boinc_project_uid = pw->pw_uid;
+        printf("boinc_project user ID = %d\n", (int)boinc_project_uid);
+        fflush(stdout);
+        sprintf(cmd, "dscl . -search /Users UniqueID %d", boinc_project_uid);
+        f = popen(cmd, "r");
+        if (f) {
+            while (PersistentFGets(buf, sizeof(buf), f)) {
+                if (strstr(buf, "UniqueID")) {
+                    ++entryCount;
+                }
+            }
+            pclose(f);
+        }    
+    }
+
+    if (entryCount > 1) {
+        system ("dscl . -delete /users/boinc_project");
+        if (err) {
+            fprintf(stdout, "dscl . -delete /users/boinc_project returned %d\n", err);
+            fflush(stdout);
+        }
+        ResynchSystem();
+    }
+#endif  // SANDBOX
+}
+
+enum {
+	kSystemEventsCreator = 'sevs'
+};
+
+
+Boolean SetLoginItemOSAScript(long brandID, Boolean deleteLogInItem, char *userName)
+{
+    int                     i;
+    char                    cmd[2048];
+    char                    systemEventsPath[1024];
+    ProcessSerialNumber     SystemEventsPSN;
+	FSRef                   appRef;
+    OSErr                   err, err2;
+
+    fprintf(stdout, "Adjusting login items for user %s\n", userName);
+    fflush(stdout);
+
+    // We must launch the System Events application for the target user
+
+    err = FindProcess ('APPL', kSystemEventsCreator, &SystemEventsPSN);
+    if (err == noErr) {
+        // Find SystemEvents process.  If found, quit it in case 
+        // it is running under a different user.
+        fprintf(stdout, "Telling System Events to quit (at start of SetLoginItemOSAScript)\n");
+        fflush(stdout);
+        err = QuitOneProcess(kSystemEventsCreator);
+        if (err != noErr) {
+            fprintf(stdout, "QuitOneProcess(kSystemEventsCreator) returned error %d \n", (int) err);
+            fflush(stdout);
+        }
+        // Wait for the process to be gone
+        for (i=0; i<50; ++i) {      // 5 seconds max delay
+            SleepTicks(6);  // 6 Ticks == 1/10 second
+            err = FindProcess ('APPL', kSystemEventsCreator, &SystemEventsPSN);
+            if (err != noErr) break;
+        }
+        if (i >= 50) {
+            fprintf(stdout, "Failed to make System Events quit\n");
+            fflush(stdout);
+        }
+        sleep(2);
+    }
+    
+    err = LSFindApplicationForInfo(kSystemEventsCreator, NULL, NULL, &appRef, NULL);
+    if (err != noErr) {
+        fprintf(stdout, "LSFindApplicationForInfo(kSystemEventsCreator) returned error %d \n", (int) err);
+        fflush(stdout);
+    } else {
+        FSRefMakePath(&appRef, (UInt8*)systemEventsPath, sizeof(systemEventsPath));
+        fprintf(stdout, "SystemEvents is at %s\n", systemEventsPath);
+        fprintf(stdout, "Launching SystemEvents for user %s\n", userName);
+        fflush(stdout);
+
+        sprintf(cmd, "sudo -iu \"%s\" \\\"%s/Contents/MacOS/System Events\\\" &", userName, systemEventsPath);
+        err = system(cmd);
+        if (err) {
+            fprintf(stdout, "[2] Command: %s returned error %d\n", cmd, (int) err);
+        }
+    }
+    // Wait for the process to start
+    for (i=0; i<50; ++i) {      // 5 seconds max delay
+        SleepTicks(6);  // 6 Ticks == 1/10 second
+        err = FindProcess ('APPL', kSystemEventsCreator, &SystemEventsPSN);
+        if (err == noErr) break;
+    }
+    if (i >= 50) {
+        fprintf(stdout, "Failed to launch System Events for user %s\n", userName);
+        fflush(stdout);
+    }
+    sleep(2);
+    
+    for (i=0; i<NUMBRANDS; i++) {
+        fprintf(stdout, "Deleting any login items containing %s for user %s\n", appName[i], userName);
+        fflush(stdout);
+        sprintf(cmd, "sudo -u \"%s\" osascript -e 'tell application \"System Events\"' -e 'delete (every login item whose path contains \"%s\")' -e 'end tell'", userName, appName[i]);
+        err = system(cmd);
+        if (err) {
+            fprintf(stdout, "[2] Command: %s\n", cmd);
+            fprintf(stdout, "[2] Delete login item containing %s returned error %d\n", appName[i], err);
+            fflush(stdout);
+        }
+    }
+
+    if (deleteLogInItem) {
+        err = noErr;
+        goto cleanupSystemEvents;
+    }
+    
+    fprintf(stdout, "Making new login item %s for user %s\n", appName[brandID], userName);
+    fflush(stdout);
+    sprintf(cmd, "sudo -u \"%s\" osascript -e 'tell application \"System Events\"' -e 'make new login item at end with properties {path:\"%s\", hidden:true, name:\"%s\"}' -e 'end tell'", userName, appPath[brandID], appName[brandID]);
+    err = system(cmd);
+    if (err) {
+        fprintf(stdout, "[2] Command: %s\n", cmd);
+        printf("[2] Make login item for %s returned error %d\n", appPath[brandID], err);
+    }
+    fflush(stdout);
+
+cleanupSystemEvents:
+    // Clean up in case this was our last user
+    fprintf(stdout, "Telling System Events to quit (at end of SetLoginItemOSAScript)\n");
+    fflush(stdout);
+    err2 = QuitOneProcess(kSystemEventsCreator);
+    if (err2 != noErr) {
+        fprintf(stdout, "QuitOneProcess(kSystemEventsCreator) returned error %d \n", (int) err2);
+        fflush(stdout);
+    }
+    sleep(2);
+        
+    return (err == noErr);
+}
+
+
+Boolean SetLoginItemAPI(long brandID, Boolean deleteLogInItem)
+{
+    Boolean                 Success;
+    int                     NumberOfLoginItems, Counter;
+    char                    *p, *q;
+    char                    s[256];
+    int                     i;
+
+    Success = false;
+    
+    NumberOfLoginItems = GetCountOfLoginItems(kCurrentUser);
+    
+    // Search existing login items in reverse order, deleting any duplicates of ours
+    for (Counter = NumberOfLoginItems ; Counter > 0 ; Counter--)
+    {
+        p = ReturnLoginItemPropertyAtIndex(kCurrentUser, kApplicationNameInfo, Counter-1);
+        q = p;
+        while (*q)
+        {
+            // It is OK to modify the returned string because we "own" it
+            *q = toupper(*q);	// Make it case-insensitive
+            q++;
+        }
+    
+        for (i=0; i<NUMBRANDS; i++) {
+            q = strrchr(appPath[i], '/');
+            if (!q) continue;       // Should never happen
+            strncpy(s, q+1, sizeof(s)-1);
+            q = s;
+            while (*q) {
+                *q = toupper(*q);
+                q++;
+            }
+
+            // if (strcmp(p, "BOINCMANAGER.APP") == 0)
+            // if (strcmp(p, "GRIDREPUBLIC DESKTOP.APP") == 0)
+            // if (strcmp(p, "PROGRESS THRU PROCESSORS DESKTOP.APP") == 0)
+            // if (strcmp(p, "CHARITY ENGINE DESKTOP.APP") == 0)
+            if (strcmp(p, s) == 0) {
+                Success = RemoveLoginItemAtIndex(kCurrentUser, Counter-1);
+            }
+        }
+    }
+
+    if (deleteLogInItem)
+        return false;
+        
+    Success = AddLoginItemWithPropertiesToUser(kCurrentUser, appPath[brandID], kHideOnLaunch);
+
+    return Success;
+}
+
+
+// Sets the skin selection in the specified user's preferences to the specified skin
+void SetSkinInUserPrefs(char *userName, char *skinName)
+{
+    passwd              *pw;
+    FILE                *oldPrefs, *newPrefs;
+    char                oldFileName[MAXPATHLEN], tempFilename[MAXPATHLEN];
+    char                buf[1024];
+    int                 wroteSkinName;
+    struct stat         sbuf;
+    group               *grp;
+    OSStatus            statErr;
+
+    if (skinName[0]) {
+        sprintf(oldFileName, "/Users/%s/Library/Preferences/BOINC Manager Preferences", userName);
+        sprintf(tempFilename, "/Users/%s/Library/Preferences/BOINC Manager NewPrefs", userName);
+        newPrefs = fopen(tempFilename, "w");
+        if (newPrefs) {
+            wroteSkinName = 0;
+            statErr = stat(oldFileName, &sbuf);
+
+            oldPrefs = fopen(oldFileName, "r");
+            if (oldPrefs) {
+                while (fgets(buf, sizeof(buf), oldPrefs)) {
+                    if (strstr(buf, "Skin=")) {
+                        fprintf(newPrefs, "Skin=%s\n", skinName);
+                        wroteSkinName = 1;
+                    } else {
+                        fputs(buf, newPrefs);
+                    }
+                }
+                fclose(oldPrefs);
+            }
+            
+            if (! wroteSkinName)
+                fprintf(newPrefs, "Skin=%s\n", skinName);
+                
+            fclose(newPrefs);
+            rename(tempFilename, oldFileName);  // Deletes old file
+            if (! statErr) {
+                chown(oldFileName, sbuf.st_uid, sbuf.st_gid);
+                chmod(oldFileName, sbuf.st_mode);
+            } else {
+                chmod(oldFileName, 0664);
+                pw = getpwnam(userName);
+                grp = getgrnam(userName);
+                if (pw && grp)
+                    chown(oldFileName, pw->pw_uid, grp->gr_gid);
+            }
+        }
+    }
+}
+
+// Returns true if the user name is in the nologinitems.txt, else false
+Boolean CheckDeleteFile(char *name)
+{
+    FILE        *f;
+    char        buf[64];
+    size_t      len;
+    
+    f = fopen("/Library/Application Support/BOINC Data/nologinitems.txt", "r");
+    if (!f)
+        return false;
+    
+    while (true) {
+        *buf = '\0';
+        len = sizeof(buf);
+        fgets(buf, len, f);
+        if (feof(f)) break;
+        strip_cr(buf);
+        if (strcmp(buf, name) == 0) {
+            fclose(f);
+            return true;
+        }
+    }
+    
+    fclose(f);
+    return false;
+}
+
+void SetEUIDBackToUser (void)
+{
+    uid_t login_uid;
+    passwd *pw;
+
+    pw = getpwnam(loginName);
+    login_uid = pw->pw_uid;
+
+    setuid(login_uid);
+    seteuid(login_uid);
+}
+
+
+static char * PersistentFGets(char *buf, size_t buflen, FILE *f) {
+    char *p = buf;
+    size_t len = buflen;
+    size_t datalen = 0;
+
+    *buf = '\0';
+    while (datalen < (buflen - 1)) {
+        fgets(p, len, f);
+        if (feof(f)) break;
+        if (ferror(f) && (errno != EINTR)) break;
+        if (strchr(buf, '\n')) break;
+        datalen = strlen(buf);
+        p = buf + datalen;
+        len -= datalen;
+    }
+    return (buf[0] ? buf : NULL);
+}
+
+
+static Boolean ShowMessage(Boolean allowCancel, const char *format, ...) {
+    va_list                 args;
+    char                    s[1024];
+    short                   itemHit;
+    AlertStdAlertParamRec   alertParams;
+    
+    ProcessSerialNumber	ourProcess;
+
+    va_start(args, format);
+    s[0] = vsprintf(s+1, format, args);
+    va_end(args);
+
+    alertParams.movable = true;
+    alertParams.helpButton = false;
+    alertParams.filterProc = NULL;
+    alertParams.defaultText = (StringPtr)"\pYes";
+    alertParams.cancelText = allowCancel ? (StringPtr)"\pNo" : NULL;
+    alertParams.otherText = NULL;
+    alertParams.defaultButton = kAlertStdAlertOKButton;
+    alertParams.cancelButton = allowCancel ? kAlertStdAlertCancelButton : 0;
+    alertParams.position = kWindowDefaultPosition;
+
+    ::GetCurrentProcess (&ourProcess);
+    ::SetFrontProcess(&ourProcess);
+
+    StandardAlert (kAlertNoteAlert, (StringPtr)s, NULL, &alertParams, &itemHit);
+    
+    return (itemHit == kAlertStdAlertOKButton);
+}
+
+
+Boolean IsUserMemberOfGroup(const char *userName, const char *groupName) {
+    group               *grp;
+    short               i = 0;
+    char                *p;
+
+    grp = getgrnam(groupName);
+    if (!grp) {
+        printf("getgrnam(%s) failed\n", groupName);
+        fflush(stdout);
+        return false;  // Group not found
+    }
+
+    while ((p = grp->gr_mem[i]) != NULL) {  // Step through all users in group admin
+        if (strcmp(p, userName) == 0) {
+            return true;
+        }
+        ++i;
+    }
+    return false;
+}
+
+
+static void c2x(char *what) {
+    char buf[3];
+    char num = atoi(what);
+    char d1 = num / 16;
+    char d2 = num % 16;
+    int abase1, abase2;
+    if (d1 < 10) abase1 = 48;
+    else abase1 = 55;
+    if (d2 < 10) abase2 = 48;
+    else abase2 = 55;
+    buf[0] = d1+abase1;
+    buf[1] = d2+abase2;
+    buf[2] = 0;
+
+    strcpy(what, buf);
+}
+
+
+static void escape_url(char *in, char*out) {
+    int x, y;
+    for (x=0, y=0; in[x]; ++x) {
+        if (isalnum(in[x])) {
+            out[y] = in[x];
+            ++y;
+        } else {
+            out[y] = '%';
+            ++y;
+            out[y] = 0;
+            char buf[256];
+            sprintf(buf, "%d", (char)in[x]);
+            c2x(buf);
+            strcat(out, buf);
+            y += 2;
+        }
+    }
+    out[y] = 0;
+}
+
+
+// OS 10.7 dscl merge command has a bug such that the command:
+//     dscl . -merge /Groups/GROUPNAME users USERNAME
+// adds the user to the group even if it was already a member, resulting in 
+// duplicate (multiple) entries.  Earlier BOINC versions used this command 
+// but did not check for this, so we remove duplicate entries if present.
+// Note: We now avoid this problem by instead using the command:
+//     dscl . -merge /Groups/GROUPNAME GroupMembership USERNAME
+// which correctly avoids duplication.
+
+int CountGroupMembershipEntries(const char *userName, const char *groupName) {
+    int                 count = 0;
+    char                cmd[512], buf[2048], escapedUserName[1024];
+    FILE                *f;
+    char                *p, *q;
+    
+    // getgrnam(groupName)->gr_mem[] only returns one entry, so we must use dscl
+    escape_url((char *)userName, escapedUserName); // Avoid confusion if name has embedded spaces
+    sprintf(cmd, "dscl -url . -read /Groups/%s GroupMembership", groupName);
+    f = popen(cmd, "r");
+    if (f == NULL)
+        return 0;
+    
+    while (PersistentFGets(buf, sizeof(buf), f))
+    {
+        p = buf;
+        while (p) {
+            p = strstr(p, escapedUserName);
+            if (p) {
+                q = p-1;
+                p += strlen(escapedUserName);
+                // Count only whole words (preceded and followed by white space) so 
+                // that if we have both 'jon' and 'jones' we don't count 'jon' twice
+                if (isspace(*q) && isspace(*p)) {
+                    ++ count;
+               }
+            }
+        }
+    }
+    
+    return count;
+}
+
+
+// Find all visible users.
+// If user is a member of group admin, add user to groups boinc_master and boinc_project.
+// Optionally add non-admin users to group boinc_master but not to group boinc_project.
+// Set login item for all members of group boinc_master to launch BOINC Manager.
+// If our install package included a skin, set those user's preferences to use that skin.
+// Optionally set BOINC as screensaver for all users running BOINC.
+OSErr UpdateAllVisibleUsers(long brandID)
+{
+    passwd              *pw;
+    vector<string>      human_user_names;
+    vector<uid_t>       human_user_IDs;
+    uid_t               saved_uid;
+    Boolean             deleteLoginItem;
+    char                human_user_name[256];
+    char                skinName[256];
+    char                s[256];
+    Boolean             saverAlreadySetForAll = true;
+    Boolean             setSaverForAllUsers = false;
+    Boolean             allNonAdminUsersAreSet = true;
+    Boolean             allowNonAdminUsersToRunBOINC = false;
+    Boolean             found = false;
+    FILE                *f;
+    int                 err;
+    Boolean             isAdminGroupMember, isBMGroupMember, isBPGroupMember;
+    struct stat         sbuf;
+#ifdef SANDBOX
+    char                cmd[256];
+    int                 BMGroupMembershipCount, BPGroupMembershipCount; 
+    int                 i;
+#endif
+    int                 userIndex;
+    char                buf[256];
+    char                *p;
+    int                 flag;
+    
+    FindSkinName(skinName, sizeof(skinName));
+
+    // Step through all users
+    puts("Beginning first pass through all users\n");
+    fflush(stdout);
+
+    f = popen("dscl . list /Users UniqueID", "r");
+    if (f) {
+        while (PersistentFGets(buf, sizeof(buf), f)) {
+            p = strrchr(buf, ' ');
+            if (p) {
+                int id = atoi(p+1);
+                if (id < 501) continue;
+                human_user_IDs.push_back((uid_t)id);
+
+                while (p > buf) {
+                    if (*p != ' ') break;
+                    --p;
+                }
+
+               *(p+1) = '\0';
+                human_user_names.push_back(string(buf));
+                *(p+1) = ' ';
+            }
+        }
+        pclose(f);
+    }
+    
+    for (userIndex=human_user_names.size(); userIndex>0; --userIndex) {
+        flag = 0;
+        strlcpy(human_user_name, human_user_names[userIndex-1].c_str(), sizeof(human_user_name));
+        sprintf(cmd, "dscl . -read \"/Users/%s\" NFSHomeDirectory", human_user_name);    
+        f = popen(cmd, "r");
+        if (f) {
+            while (PersistentFGets(buf, sizeof(buf), f)) {
+                p = strrchr(buf, ' ');
+                if (p) {
+                    if (strstr(p, "/var/empty") != NULL) flag = 1;
+                }
+            }
+            pclose(f);
+        }
+
+        sprintf(cmd, "dscl . -read \"/Users/%s\" UserShell", human_user_name);    
+        f = popen(cmd, "r");
+        if (f) {
+            while (PersistentFGets(buf, sizeof(buf), f)) {
+                p = strrchr(buf, ' ');
+                if (p) {
+                    if (strstr(p, "/usr/bin/false") != NULL) flag |= 2;
+               }
+            }
+            pclose(f);
+        }
+        
+        if (flag == 3) { // if (Home Directory == "/var/empty") && (UserShell == "/usr/bin/false")
+            human_user_names.erase(human_user_names.begin()+userIndex-1);
+            human_user_IDs.erase(human_user_IDs.begin()+userIndex-1);
+        }
+    }
+
+    
+    for (userIndex=0; userIndex< (int)human_user_names.size(); ++userIndex) {
+        strlcpy(human_user_name, human_user_names[userIndex].c_str(), sizeof(human_user_name));
+        printf("[1] Checking user %s\n", human_user_name);
+        fflush(stdout);
+            
+        // getpwnam works with either the full / login name (pw->pw_gecos) 
+        // or the short / Posix name (pw->pw_name)
+        pw = getpwnam(human_user_name);
+        if (pw == NULL) {
+            printf("[1] %s not in getpwnam data base\n", human_user_name);
+            fflush(stdout);
+            continue;
+        }
+
+        printf("[1] User %s: Posix name=%s, Full name=%s\n", human_user_name, pw->pw_name, pw->pw_gecos);
+        fflush(stdout);
+        
+#ifdef SANDBOX
+        isAdminGroupMember = false;
+        isBMGroupMember = false;
+        
+        isAdminGroupMember = IsUserMemberOfGroup(pw->pw_name, admin_group_name);
+            if (isAdminGroupMember) {
+            // User is a member of group admin, so add user to groups boinc_master and boinc_project
+            printf("[1] User %s is a member of group admin\n", pw->pw_name);
+            fflush(stdout);
+        } else {
+            isBMGroupMember = IsUserMemberOfGroup(pw->pw_name, boinc_master_group_name);
+            if (isBMGroupMember) {
+                // User is a member of group boinc_master
+                printf("[1] Non-admin user %s is a member of group boinc_master\n", pw->pw_name);
+                fflush(stdout);
+            } else {
+                allNonAdminUsersAreSet = false;
+            }
+        }
+#else   // SANDBOX
+        isGroupMember = true;
+#endif  // SANDBOX
+        if (isAdminGroupMember || isBMGroupMember) {
+            if ((strcmp(loginName, human_user_name) == 0) 
+                || (strcmp(loginName, pw->pw_name) == 0) 
+                    || (strcmp(loginName, pw->pw_gecos) == 0)) {
+                currentUserCanRunBOINC = true;
+            }
+            
+            saved_uid = geteuid();
+            seteuid(pw->pw_uid);                        // Temporarily set effective uid to this user
+            
+            if (OSVersion < 0x1060) {
+                f = popen("defaults -currentHost read com.apple.screensaver moduleName", "r");
+            
+                if (f) {
+                    found = false;
+                    while (PersistentFGets(s, sizeof(s), f)) {
+                        if (strstr(s, saverName[brandID])) {
+                            found = true;
+                            break;
+                        }
+                    }
+                    pclose(f);
+                    if (!found) {
+                        saverAlreadySetForAll = false;
+                    }
+                }
+            } else {
+                err = GetCurrentScreenSaverSelection(s, sizeof(s) -1);
+                if (err == noErr) {
+                    if (!strstr(s, saverName[brandID])) {
+                        saverAlreadySetForAll = false;
+                    }
+                }
+            }
+            
+            seteuid(saved_uid);                         // Set effective uid back to privileged user
+        }       // End if (isGroupMember)
+    }           // End for (userIndex=0; userIndex< human_user_names.size(); ++userIndex)
+    
+    ResynchSystem();
+
+    if (allNonAdminUsersAreSet) {
+        puts("[2] All non-admin users are already members of group boinc_master\n");
+        fflush(stdout);
+    } else {
+        if (gCommandLineInstall) {
+            err = stat("/tmp/nonadminusersok.txt", &sbuf);
+            if (err == noErr) {
+                puts("nonadminusersok.txt file detected\n");
+                fflush(stdout);
+                unlink("/tmp/nonadminusersok.txt");
+                allowNonAdminUsersToRunBOINC = true;
+                currentUserCanRunBOINC = true;
+                saverAlreadySetForAll = false;
+            }
+        } else {
+            if (ShowMessage(true, 
+                "Users who are permitted to administer this computer will automatically be allowed to "
+                "run and control %s.\n\n"
+                "Do you also want non-administrative users to be able to run and control %s on this Mac?",
+                brandName[brandID], brandName[brandID])
+            ) {
+                allowNonAdminUsersToRunBOINC = true;
+                currentUserCanRunBOINC = true;
+                saverAlreadySetForAll = false;
+                printf("[2] User answered Yes to allowing non-admin users to run %s\n", brandName[brandID]);
+                fflush(stdout);
+            } else {
+                printf("[2] User answered No to allowing non-admin users to run %s\n", brandName[brandID]);
+                fflush(stdout);
+            }
+        }
+    }
+    
+    if (! saverAlreadySetForAll) {
+        if (gCommandLineInstall) {
+            err = stat("/tmp/setboincsaver.txt", &sbuf);
+            if (err == noErr) {
+                puts("setboincsaver.txt file detected\n");
+                fflush(stdout);
+                unlink("/tmp/setboincsaver.txt");
+                setSaverForAllUsers = true;
+            }
+        } else {
+            setSaverForAllUsers = ShowMessage(true, 
+                    "Do you want to set %s as the screensaver for all %s users on this Mac?", 
+                    brandName[brandID], brandName[brandID]);
+        }
+    }
+
+    // Step through all users a second time, setting non-admin users and / or our screensaver
+    puts("Beginning second pass through all users\n");
+    fflush(stdout);
+
+    for (userIndex=0; userIndex<(int)human_user_names.size(); ++userIndex) {
+        strlcpy(human_user_name, human_user_names[userIndex].c_str(), sizeof(human_user_name));
+
+        printf("[2] Checking user %s\n", human_user_name);
+        fflush(stdout);
+            
+        pw = getpwnam(human_user_name);
+        if (pw == NULL) {           // "Deleted Users", "Shared", etc.
+            printf("[2] %s not in getpwnam data base\n", human_user_name);
+            fflush(stdout);
+            continue;
+        }
+
+        printf("[2] User %s: Posix name=%s, Full name=%s\n", human_user_name, pw->pw_name, pw->pw_gecos);
+        fflush(stdout);
+        
+#ifdef SANDBOX
+        isAdminGroupMember = false;
+        isBMGroupMember = false;
+        isBPGroupMember = false;
+
+        isAdminGroupMember = IsUserMemberOfGroup(pw->pw_name, admin_group_name);
+        if (isAdminGroupMember) {
+            // User is a member of group admin, so add user to groups boinc_master and boinc_project
+            printf("[2] User %s is a member of group admin\n", pw->pw_name);
+            fflush(stdout);
+        }
+
+        // If allNonAdminUsersAreSet, some older BOINC versions added non-admin users only to group 
+        // boinc_master; ensure all permitted BOINC users are also members of group boinc_project
+        if (isAdminGroupMember || allowNonAdminUsersToRunBOINC || allNonAdminUsersAreSet) {
+            // OS 10.7 dscl merge command has a bug that it adds the user to the group even if 
+            // it was already a member, resulting in duplicate (multiple) entries.  Earlier BOINC 
+            // versions did not check for this, so we remove duplicate entries if present.            
+            BMGroupMembershipCount = CountGroupMembershipEntries(pw->pw_name, boinc_master_group_name);
+            printf("[2] User %s found in group %s member list %d times\n", 
+                        pw->pw_name, boinc_master_group_name, BMGroupMembershipCount);
+            fflush(stdout);
+            if (BMGroupMembershipCount == 0) {
+                sprintf(cmd, "dscl . -merge /groups/%s GroupMembership \"%s\"", boinc_master_group_name, pw->pw_name);
+                err = system(cmd);
+                printf("[2] %s returned %d\n", cmd, err);
+                fflush(stdout);
+                isBMGroupMember = true;
+            } else {
+                isBMGroupMember = true;
+                for (i=1; i<BMGroupMembershipCount; ++i) {
+                    sprintf(cmd, "dscl . -delete /groups/%s GroupMembership \"%s\"", boinc_master_group_name, pw->pw_name);
+                    err = system(cmd);
+                    printf("[2] %s returned %d\n", cmd, err);
+                    fflush(stdout);
+                }
+            }
+            
+            BPGroupMembershipCount = CountGroupMembershipEntries(pw->pw_name, boinc_project_group_name);
+            printf("[2] User %s found in group %s member list %d times\n", 
+                   pw->pw_name, boinc_project_group_name, BPGroupMembershipCount);
+            fflush(stdout);
+            if (BPGroupMembershipCount == 0) {
+                sprintf(cmd, "dscl . -merge /groups/%s GroupMembership \"%s\"", boinc_project_group_name, pw->pw_name);
+                err = system(cmd);
+                printf("[2] %s returned %d\n", cmd, err);
+                fflush(stdout);
+                isBPGroupMember = true;
+            } else {
+                isBPGroupMember = true;
+                for (i=1; i<BPGroupMembershipCount; ++i) {
+                    sprintf(cmd, "dscl . -delete /groups/%s GroupMembership \"%s\"", boinc_project_group_name, pw->pw_name);
+                    err = system(cmd);
+                    printf("[2] %s returned %d\n", cmd, err);
+                    fflush(stdout);
+                }
+            }
+        }
+#else   // SANDBOX
+        isBMGroupMember = true;
+#endif  // SANDBOX
+        saved_uid = geteuid();
+        deleteLoginItem = CheckDeleteFile(human_user_name);
+        if (CheckDeleteFile(pw->pw_name)) {
+            deleteLoginItem = true;
+        }
+        if (CheckDeleteFile(pw->pw_gecos)) {
+            deleteLoginItem = true;
+        }
+        if (!isBMGroupMember) {
+            deleteLoginItem = true;
+        }
+
+        // Set login item for this user
+        if (OSVersion >= 0x1070) {
+            // LoginItemAPI.c does not set hidden property for login items
+            // under OS 10.7.0, so use AppleScript instead to prevent Lion 
+            // from opening BOINC windows at system startup.  This was 
+            // apparently fixed in OS 10.7.1.
+            // LoginItemAPI.c does not work at all under OS 10.8 Preview 3 
+            // but this version of SetLoginItemOSAScript works for OS 10.7.0 
+            // and later, so we use it for OS 10.7.0 and later.
+            printf("[2] calling SetLoginItemOSAScript for user %s, euid = %d, deleteLoginItem = %d\n", 
+                pw->pw_name, geteuid(), deleteLoginItem);
+            fflush(stdout);
+
+            SetLoginItemOSAScript(brandID, deleteLoginItem, pw->pw_name);
+        } else {
+            seteuid(pw->pw_uid);    // Temporarily set effective uid to this user
+            printf("[2] calling SetLoginItemAPI for user %s, euid = %d, deleteLoginItem = %d\n", 
+                    pw->pw_name, geteuid(), deleteLoginItem);
+            fflush(stdout);
+            SetLoginItemAPI(brandID, deleteLoginItem);
+            seteuid(saved_uid);     // Set effective uid back to privileged user
+        }
+        
+        if (isBMGroupMember) {
+            // For some reason we need to call getpwnam again on OS 10.5
+            pw = getpwnam(human_user_name);
+            if (pw == NULL) {           // "Deleted Users", "Shared", etc.
+                printf("[2] ERROR: %s was in getpwnam data base but now is not!\n", human_user_name);
+                fflush(stdout);
+                continue;
+            }
+            SetSkinInUserPrefs(pw->pw_name, skinName);
+        
+            if (setSaverForAllUsers) {
+                seteuid(pw->pw_uid);    // Temporarily set effective uid to this user
+                if (OSVersion < 0x1060) {
+                     sprintf(s, "defaults -currentHost write com.apple.screensaver moduleName %s", saverNameEscaped[brandID]);
+                    system (s);
+                    sprintf(s, "defaults -currentHost write com.apple.screensaver modulePath /Library/Screen\\ Savers/%s.saver", 
+                                saverNameEscaped[brandID]);
+                    system (s);
+                } else {
+                    sprintf(s, "/Library/Screen Savers/%s.saver", saverName[brandID]);
+                    err = SetScreenSaverSelection(saverName[brandID], s, 0);
+                }
+                seteuid(saved_uid);     // Set effective uid back to privileged user
+            }
+        }
+    }   // End for (userIndex=0; userIndex< human_user_names.size(); ++userIndex)
+
+    ResynchSystem();
+
+    return noErr;
+}
+
+
+OSErr GetCurrentScreenSaverSelection(char *moduleName, size_t maxLen) {
+    OSErr err = noErr;
+    CFStringRef nameKey = CFStringCreateWithCString(NULL,"moduleName",kCFStringEncodingASCII);
+    CFStringRef moduleNameAsCFString;
+    CFDictionaryRef theData;
+    
+    theData = (CFDictionaryRef)CFPreferencesCopyValue(CFSTR("moduleDict"), 
+                CFSTR("com.apple.screensaver"), 
+                kCFPreferencesCurrentUser,
+                kCFPreferencesCurrentHost
+                );
+    if (theData == NULL) {
+        CFRelease(nameKey);
+        return (-1);
+    }
+    
+    if (CFDictionaryContainsKey(theData, nameKey)  == false) 	
+	{
+        moduleName[0] = 0;
+        CFRelease(nameKey);
+        CFRelease(theData);
+	    return(-1);
+	}
+    
+    moduleNameAsCFString = CFStringCreateCopy(NULL, (CFStringRef)CFDictionaryGetValue(theData, nameKey));
+    CFStringGetCString(moduleNameAsCFString, moduleName, maxLen, kCFStringEncodingASCII);		    
+
+    CFRelease(nameKey);
+    CFRelease(theData);
+    CFRelease(moduleNameAsCFString);
+    return err;
+}
+
+
+OSErr SetScreenSaverSelection(char *moduleName, char *modulePath, int type) {
+    OSErr err = noErr;
+    CFStringRef preferenceName = CFSTR("com.apple.screensaver");
+    CFStringRef mainKeyName = CFSTR("moduleDict");
+    CFDictionaryRef emptyData;
+    CFMutableDictionaryRef newData;
+    Boolean success;
+
+    CFStringRef nameKey = CFStringCreateWithCString(NULL, "moduleName", kCFStringEncodingASCII);
+    CFStringRef nameValue = CFStringCreateWithCString(NULL, moduleName, kCFStringEncodingASCII);
+		
+    CFStringRef pathKey = CFStringCreateWithCString(NULL, "path", kCFStringEncodingASCII);
+    CFStringRef pathValue = CFStringCreateWithCString(NULL, modulePath, kCFStringEncodingASCII);
+    
+    CFStringRef typeKey = CFStringCreateWithCString(NULL, "type", kCFStringEncodingASCII);
+    CFNumberRef typeValue = CFNumberCreate(NULL, kCFNumberIntType, &type);
+    
+    emptyData = CFDictionaryCreate(NULL, NULL, NULL, 0, NULL, NULL);
+    if (emptyData == NULL) {
+        CFRelease(nameKey);
+        CFRelease(nameValue);
+        CFRelease(pathKey);
+        CFRelease(pathValue);
+        CFRelease(typeKey);
+        CFRelease(typeValue);
+        return(-1);
+    }
+
+    newData = CFDictionaryCreateMutableCopy(NULL,0, emptyData);
+
+    if (newData == NULL)
+	{
+        CFRelease(nameKey);
+        CFRelease(nameValue);
+        CFRelease(pathKey);
+        CFRelease(pathValue);
+        CFRelease(typeKey);
+        CFRelease(typeValue);
+        CFRelease(emptyData);
+        return(-1);
+    }
+
+    CFDictionaryAddValue(newData, nameKey, nameValue); 	
+    CFDictionaryAddValue(newData, pathKey, pathValue); 	
+    CFDictionaryAddValue(newData, typeKey, typeValue); 	
+
+    CFPreferencesSetValue(mainKeyName, newData, preferenceName, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);
+    success = CFPreferencesSynchronize(preferenceName, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);
+
+    if (!success) {
+        err = -1;
+    }
+    
+    CFRelease(nameKey);
+    CFRelease(nameValue);
+    CFRelease(pathKey);
+    CFRelease(pathValue);
+    CFRelease(typeKey);
+    CFRelease(typeValue);
+    CFRelease(emptyData);
+    CFRelease(newData);
+
+    return err;
+}
+
+
+void Initialize()	/* Initialize some managers */
+{
+    OSErr	err;
+        
+//    InitCursor();
+
+    err = AEInstallEventHandler( kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP((AEEventHandlerProcPtr)QuitAppleEventHandler), 0, false );
+    if (err != noErr)
+        ExitToShell();
+}
+
+
+long GetBrandID()
+{
+    long iBrandId;
+
+    iBrandId = 0;   // Default value
+    
+    FILE *f = fopen("Contents/Resources/Branding", "r");
+    if (f) {
+        fscanf(f, "BrandId=%ld\n", &iBrandId);
+        fclose(f);
+    }
+    
+    return iBrandId;
+}
+
+
+int TestRPCBind()
+{
+    sockaddr_in addr;
+    int lsock;
+    int retval;
+    
+    lsock = (int)socket(AF_INET, SOCK_STREAM, 0);
+    if (lsock < 0)
+        return -153;
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sin_family = AF_INET;
+    addr.sin_port = htons(31416);
+    addr.sin_addr.s_addr = htonl(INADDR_ANY);
+
+    int one = 1;
+    retval = setsockopt(lsock, SOL_SOCKET, SO_REUSEADDR, (char*)&one, 4);
+
+    if (! retval)
+        retval = bind(lsock, (const sockaddr*)(&addr), (socklen_t)sizeof(addr));
+
+    if (! retval)
+        retval = listen(lsock, 999);
+    
+    close(lsock);
+    
+    return retval;
+}
+
+
+static OSStatus ResynchSystem() {
+    OSStatus        err = noErr;
+    
+    if (OSVersion >= 0x1050) {
+        // OS 10.5
+        err = system("dscacheutil -flushcache");
+        err = system("dsmemberutil flushcache");
+        return noErr;
+    }
+    
+    err = system("lookupd -flushcache");
+    
+    if (OSVersion >= 0x1040)
+        err = system("memberd -r");           // Available only in OS 10.4
+    
+    return noErr;
+}
+
+
+// ---------------------------------------------------------------------------
+/* This runs through the process list looking for the indicated application */
+/*  Searches for process by file type and signature (creator code)          */
+// ---------------------------------------------------------------------------
+OSErr FindProcess (OSType typeToFind, OSType creatorToFind, ProcessSerialNumberPtr processSN)
+{
+    ProcessInfoRec tempInfo;
+    FSSpec procSpec;
+    Str31 processName;
+    OSErr myErr = noErr;
+    /* null out the PSN so we're starting at the beginning of the list */
+    processSN->lowLongOfPSN = kNoProcess;
+    processSN->highLongOfPSN = kNoProcess;
+    /* initialize the process information record */
+    tempInfo.processInfoLength = sizeof(ProcessInfoRec);
+    tempInfo.processName = processName;
+    tempInfo.processAppSpec = &procSpec;
+    /* loop through all the processes until we */
+    /* 1) find the process we want */
+    /* 2) error out because of some reason (usually, no more processes) */
+    do {
+        myErr = GetNextProcess(processSN);
+        if (myErr == noErr)
+            GetProcessInformation(processSN, &tempInfo);
+    }
+            while ((tempInfo.processSignature != creatorToFind || tempInfo.processType != typeToFind) &&
+                   myErr == noErr);
+    return(myErr);
+}
+
+
+// Uses usleep to sleep for full duration even if a signal is received
+static void SleepTicks(UInt32 ticksToSleep) {
+    UInt32 endSleep, timeNow, ticksRemaining;
+
+    timeNow = TickCount();
+    ticksRemaining = ticksToSleep;
+    endSleep = timeNow + ticksToSleep;
+    while ( (timeNow < endSleep) && (ticksRemaining <= ticksToSleep) ) {
+        usleep(16667 * ticksRemaining);
+        timeNow = TickCount();
+        ticksRemaining = endSleep - timeNow;
+    } 
+}
+
+
+int FindSkinName(char *name, size_t len)
+{
+    FILE *f;
+    char buf[MAXPATHLEN];
+    char *pattern = "/BOINC Data/skins/";
+    char *p, *q;
+
+    name[0] = '\0';
+    
+    f = popen("lsbom -d -s ./Contents/Archive.bom", "r");
+    if (f == NULL)
+        return 0;
+    
+    while (PersistentFGets(buf, sizeof(buf), f)) {
+        p = strstr(buf, pattern);
+        if (p) {
+            p += strlen(pattern);
+            q = strchr(p, '/');
+            if (q) *q = 0;
+            q = strchr(p, '\n');
+            if (q) *q = 0;
+
+            if (strlen(p) > (len-1))
+                return 0;
+            strlcpy(name, p, len);
+            pclose(f);
+            return 1;
+        }
+    }
+    pclose(f);
+    return 0;
+}
+
+
+
+pid_t FindProcessPID(char* name, pid_t thePID)
+{
+    FILE *f;
+    char buf[1024];
+    size_t n = 0;
+    pid_t aPID;
+    
+    if (name != NULL)     // Search ny name
+        n = strlen(name);
+    
+    f = popen("ps -a -x -c -o command,pid", "r");
+    if (f == NULL)
+        return 0;
+    
+    while (PersistentFGets(buf, sizeof(buf), f))
+    {
+        if (name != NULL) {     // Search by name
+            if (strncmp(buf, name, n) == 0)
+            {
+                aPID = atol(buf+16);
+                pclose(f);
+                return aPID;
+            }
+        } else {      // Search by PID
+            aPID = atol(buf+16);
+            if (aPID == thePID) {
+                pclose(f);
+                return aPID;
+            }
+        }
+    }
+    pclose(f);
+    return 0;
+}
+
+
+static OSErr QuitOneProcess(OSType signature) {
+    bool                done = false;
+    ProcessSerialNumber thisPSN;
+    ProcessInfoRec		thisPIR;
+    OSErr               err = noErr;
+    Str63               thisProcessName;
+    AEAddressDesc		thisPSNDesc;
+    AppleEvent			thisQuitEvent, thisReplyEvent;
+    
+
+    thisPIR.processInfoLength = sizeof (ProcessInfoRec);
+    thisPIR.processName = thisProcessName;
+    thisPIR.processAppSpec = nil;
+    
+    thisPSN.highLongOfPSN = 0;
+    thisPSN.lowLongOfPSN = kNoProcess;
+    
+    while (done == false) {		
+        err = GetNextProcess(&thisPSN);
+        if (err == procNotFound) {	
+            done = true;		// Finished stepping through all running applications.
+            err = noErr;        // Success
+        } else {		
+            err = GetProcessInformation(&thisPSN,&thisPIR);
+            if (err != noErr)
+                goto bail;
+                    
+            if (thisPIR.processSignature == signature) {	// is it our target process?
+                err = AECreateDesc(typeProcessSerialNumber, (Ptr)&thisPSN,
+                                            sizeof(thisPSN), &thisPSNDesc);
+                if (err != noErr)
+                    goto bail;
+
+                // Create the 'quit' Apple event for this process.
+                err = AECreateAppleEvent(kCoreEventClass, kAEQuitApplication, &thisPSNDesc,
+                                                kAutoGenerateReturnID, kAnyTransactionID, &thisQuitEvent);
+                if (err != noErr) {
+                    AEDisposeDesc (&thisPSNDesc);
+                    goto bail;		// don't know how this could happen, but limp gamely onward
+                }
+
+                // send the event 
+                err = AESend(&thisQuitEvent, &thisReplyEvent, kAEWaitReply,
+                                           kAENormalPriority, kAEDefaultTimeout, 0L, 0L);
+                AEDisposeDesc (&thisQuitEvent);
+                AEDisposeDesc (&thisPSNDesc);
+
+                if (err != noErr)
+                    goto bail;
+#if 0
+                if (err == errAETimeout) {
+                    pid_t thisPID;
+                        
+                    err = GetProcessPID(&thisPSN , &thisPID);
+                    if (err == noErr)
+                        err = kill(thisPID, SIGKILL);
+                }
+#endif
+                continue;		// There can be multiple instances of the Manager
+            }
+        }
+    }
+
+bail:
+    return err;
+}
+
+
+static OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon )
+{
+    gQuitFlag =  true;
+    
+    return noErr;
+}
+
+void strip_cr(char *buf)
+{
+    char *theCR;
+
+    theCR = strrchr(buf, '\n');
+    if (theCR)
+        *theCR = '\0';
+    theCR = strrchr(buf, '\r');
+    if (theCR)
+        *theCR = '\0';
+}
+
+// For debugging
+void print_to_log_file(const char *format, ...) {
+#if CREATE_LOG
+    FILE *f;
+    va_list args;
+    char path[256], buf[256];
+    time_t t;
+    strcpy(path, "/Users/Shared/test_log.txt");
+//    strcpy(path, "/Users/");
+//    strcat(path, getlogin());
+//    strcat(path, "/Documents/test_log.txt");
+    f = fopen(path, "a");
+    if (!f) return;
+
+//  freopen(buf, "a", stdout);
+//  freopen(buf, "a", stderr);
+
+    time(&t);
+    strcpy(buf, asctime(localtime(&t)));
+    strip_cr(buf);
+
+    fputs(buf, f);
+    fputs("   ", f);
+
+    va_start(args, format);
+    vfprintf(f, format, args);
+    va_end(args);
+    
+    fputs("\n", f);
+    fflush(f);
+    fclose(f);
+    chmod(path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+
+#endif
+}
diff --git a/mac_installer/Progress/acct_mgr_url.xml b/mac_installer/Progress/acct_mgr_url.xml
new file mode 100644
index 0000000..6b2763a
--- /dev/null
+++ b/mac_installer/Progress/acct_mgr_url.xml
@@ -0,0 +1,18 @@
+<acct_mgr>
+    <name>GridRepublic</name>
+    <url>http://www.gridrepublic.org/</url>
+    <cookie_required/>
+    <cookie_failure_url>http://www.gridrepublic.org/cookie_failure.php</cookie_failure_url>
+<signing_key>
+1024
+9c3af22a230f1eb122b8eab256e5e46b49f6d357e65d00e414cf6af105aef217
+1de0793353097bbbb918413f79cb5bfaa4532daf061ece07b63f209690a3e1b1
+8906a9ae4f521ec25e6fb79b8679dd4c18c0f022dcb95baefeca091d572c7738
+e1b1d542bbec94552e0e37c698427f4538b947b79072d112ebcf4d9c509b16d9
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010001
+.
+</signing_key>
+</acct_mgr>
diff --git a/mac_installer/ReadMe.rtf b/mac_installer/ReadMe.rtf
new file mode 100644
index 0000000..ca080be
--- /dev/null
+++ b/mac_installer/ReadMe.rtf
@@ -0,0 +1,152 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red2\green87\blue173;}
+\margl1440\margr1440\vieww9000\viewh9000\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\f0\b\fs28 \cf0 Macintosh BOINCManager Version <VER_NUM> Release Notes\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+\cf0 http://boinc.berkeley.edu/\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Installing BOINC may take several minutes; please be patient.
+\b0 \
+\
+
+\b Dual GPU Macbook Pros:
+\b0  Some newer Macbook Pros have dual graphics processors, one that is more powerful and another that is more energy-efficient, and they switch between them automatically.  This can cause your screensaver to flash on and off frequently, and can prevent BOINC from detecting the more powerful GPU which is needed to process some applications.  You can force selection either {\field{\*\fldinst{HYPERLINK "http://support.apple.com/kb/HT4110"}}{\fldrslt \cf2 permanently}} or temporarily using a {\field{\*\fldinst{HYPERLINK "http://codykrieger.com/gfxCardStatus/"}}{\fldrslt \cf2 third-party utility}}. But be aware that forcing the use of the NVIDIA GPU may cause faster battery drain; this of course is not an issue when running on AC power.\
+\
+
+\b Upgrade warning 1: 
+\b0 There have been changes to BOINC's internal file formats.   When you upgrade from version 6.12.x or earlier, BOINC will automatically upgrade its files.  However, if for any reason you wish to downgrade again to a version earlier than 6.13.x, you will lose any unreported work.  The project servers will send you the tasks again, but they will be restarted from the beginning.  If you think you might need to revert to an older version of BOINC, you should back up your BOINC Data folder before upgrading.\
+\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
+\cf0 If you are upgrading from a version earlier than 6.8.0, you may see a message "Failed to convert file BOINC Manager Preferences to Unicode."  This is due to our addition of full Unicode support to the BOINC Manager.  If you get this message, you may need to readjust your column widths and other BOINC Manager view options, but no other problems will result.  When  you quit BOINC Manager, these settings will be saved in the new Unicode format.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 \
+Due to new restrictions imposed by OS 10.6 Snow Leopard, there has been a change in BOINC's security implementation.  Non-administrative users can no longer run BOINC Manager unless they are added to group boinc_master.  As of BOINC 6.8.29 / BOINC 6.10.5, the BOINC installer asks whether or not you wish to allow this.\
+\
+For more options, please see the BOINC Macintosh administrator tools at:\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+{\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X"}}{\fldrslt \cf0 http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X}}\
+\
+BOINC on the Mac now supports processing with your graphics card, or GPU.  Please see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/gpu.php"}}{\fldrslt http://boinc.berkeley.edu/gpu.php}} for more information.   If you have a CUDA-capable NVIDIA GPU and you wish to run CUDA applications, you will need to download and install the CUDA driver and libraries for your system from {\field{\*\fldinst{HYPERLINK "http://www.nvidia.com/object/mac-driver-archive.html"}}{\fldrslt http://www.nvidia.com/object/mac-driver-archive.html}}.  BOINC 6.13.x also supports openCL applications on NVIDIA and ATI / AMD graphics processors.  OpenCL support is standard as part of Mac OS 10.6 and OS 10.7.\
+\
+Starting with version 5.5.4, BOINC has featured new, stricter security measures.  See the 
+\b Security
+\b0  section below for important information.\
+\
+As of version 6.13.x, BOINC no longer supports PowerPC Macs; it runs natively on Intel Macs and requires Macintosh OS X version 10.4 or greater.  If you wish to run on a PowerPC Mac, please install an earlier version of BOINC.  \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Upgrade warning 2: You may lose unreported results
+\b0  if you are running on an 
+\b Intel Mac
+\b0  and upgrading from a version of BOINC earlier than 5.3.21 on an Intel Mac, or if you are transferring BOINC Data from a PowerPC Mac to an Intel Mac, or from an Intel Mac to a PowerPC Mac.  To prevent this, open BOINC Manager's window, select the 
+\i Projects
+\i0  tab, select each project and  press the 
+\i Update
+\i0  button.  Then select the 
+\i Tasks
+\i0  tab and make sure there are no tasks "Ready to report."\
+\
+
+\b Setting BOINC as your screen saver:
+\b0  This installer adds the BOINC screen saver to your system, and optionally changes your screen saver settings to use the BOINC screen saver.  You can also select BOINC as your screen saver later, using the Screen Saver or Screen Effects panel in the System Preferences (accessible from the Apple menu).  \
+\
+It may take a minute after the screen saver starts before the science application graphics appear.  \
+\
+Note: on some versions of the Mac OS, you may not be able to exit the BOINC screen saver by moving the mouse; you may need to press the mouse button or press any key on the keyboard to exit.  \
+\
+
+\b Security:\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+
+\b0 \cf0 Since version 5.5.4, BOINC Manager for the Macintosh has featured new, stricter security measures.  This additional security helps protect your computer data from potential theft or accidental or malicious damage by limiting BOINC projects' access to your  system and data.  \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+\cf0 The installer sets special permission for the BOINCManager and Client, which allows them to write to the shared BOINC Data regardless of which user is logged in.  If you 
+\b copy
+\b0  BOINCManager or the BOINC core client without using the installer, it will not run properly.  \
+\
+However, you can safely 
+\b move
+\b0  the BOINC Manager within the same disk drive or partition.  If you need multiple copies, run the installer again after moving BOINC Manager; this will create a fresh copy in the 
+\b /Applications
+\b0  folder.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 BOINC verifies that ownership and permissions are set properly each time it is launched.  It will tell you to re-install BOINC if there is a problem.\
+\
+The new safeguards use the basic security protections built into UNIX (the base underlying Mac OS X): permissions and ownership.\
+\
+The administrator (usually the owner) of each computer creates one or more users who can log in, can create private files, and can share other files.  Some of these users are given administrative privileges, some may not have these privileges.\
+\
+There are also groups, which have one or more users as members.  For example, users with administrative privileges are usually members of the "admin" group.\
+\
+In addition to these "visible" users and groups, the operating system contains a number of "hidden" users and groups which are used for various purposes.  A person cannot log in as one of these "hidden" users.  \
+\
+This structure of users and groups is used to provide security by restricting what data and operations each person or application can use.  For example, many files belong to user "system" (also called "root") and group "wheel" so that non-privileged users can't modify them, thus protecting the computer system from accidental or malicious harm.\
+\
+Starting with version 5.5.4 of the BOINC Manager for the Macintosh, the BOINC installer creates 2 new "hidden" users 
+\b boinc_master
+\b0  and 
+\b boinc_project
+\b0 , and two new "hidden" groups, also named 
+\b boinc_master
+\b0  and 
+\b boinc_project
+\b0  (unless they were created by a previous installation of BOINC.)\
+\
+The installer automatically gives administrators (users who are members of the "admin" group) membership in the two new groups, so that they can easily manipulate BOINC files.  The installer asks you if you would like non-admin users to be able to run the BOINC Manager and to have access to these files.  This is particularly useful where many people have access to the computer, as in a school computer lab.\
+\
+BOINC projects are given permission to access only project files, protecting your computer in the event someone downloads bad software from a bogus project, or in the unlikely case that a legitimate project's server is infiltrated by a cracker.\
+\
+For technical details of the implementation, please see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/SandboxUser"}}{\fldrslt http://boinc.berkeley.edu/trac/wiki/SandboxUser}} and {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/sandbox.php"}}{\fldrslt http://boinc.berkeley.edu/sandbox.php}}\
+\
+The installer sets BOINCManager as a Login item for 
+\b all
+\b0  authorized users, not just the user who ran the installer.  You can add or remove Login Items by using the Accounts Pane in the System Preferences (accessible from the Apple menu).  \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
+
+\b \cf0 Other useful information:
+\b0 \
+\
+
+\b Troubleshooting tip:
+\b0  If you are upgrading from a version of BOINC prior to 5.5.4 and the installer refuses to let you install, trash the file 
+\b /Library/Receipts/BOINC.pkg
+\b0  and try again.\
+\
+The installer places two items onto your hard drive: BOINCManager.app in your 
+\b /Applications
+\b0  folder and BOINCSaver.saver in your 
+\b /Library/Screen Savers
+\b0  folder.  \
+\
+The installer creates the BOINC Data folder in your 
+\b /Library/Application Support
+\b0  folder.  If you have previously been running BOINC in a different folder, copy your data into this folder before running the installer.  \
+\
+All users who log in on the same Macintosh will share one set of BOINC Data, ensuring that work units are processed in the most timely manner.  \
+\
+You can move (
+\b not
+\b0  copy) BOINCManager to any folder you wish on the same disk drive or partition.  If you do so, you will need to update the information in each user's Login Items.  In most cases, the BOINC screen saver should still work properly.  If it does not, move BOINCManager back to the 
+\b /Applications
+\b0  folder.\
+\
+\pard\pardeftab720
+\cf0 To completely remove (
+\b uninstall
+\b0 ) BOINC from your Macintosh, run the 
+\b Uninstall BOINC
+\b0  application which is included with the installer.\
+}
\ No newline at end of file
diff --git a/mac_installer/Uninstaller.r b/mac_installer/Uninstaller.r
new file mode 100644
index 0000000..209e7e3
--- /dev/null
+++ b/mac_installer/Uninstaller.r
@@ -0,0 +1,1587 @@
+data 'ALRT' (128) {
+	$"0064 0064 00F8 0262 0080 5555 300A"                 /* .d.d.ø.b.€UU0Â */
+};
+
+data 'DITL' (128) {
+	$"0003 0000 0000 0078 01AE 008C 01F2 0402"            /* .......x.®.Œ.ò.. */
+	$"4F4B 0000 0000 0078 015E 008C 019E 0406"            /* OK.....x.^.Œ.ž.. */
+	$"4361 6E63 656C 0000 0000 0014 00B5 0063"            /* Cancel.......µ.c */
+	$"01F5 889E 4172 6520 796F 7520 7375 7265"            /* .õˆžAre you sure */
+	$"2079 6F75 2077 616E 7420 746F 2063 6F6D"            /*  you want to com */
+	$"706C 6574 656C 7920 7265 6D6F 7665 2042"            /* pletely remove B */
+	$"4F49 4E43 2061 6E64 2061 6C6C 2069 7473"            /* OINC and all its */
+	$"2064 6174 6120 6672 6F6D 2079 6F75 7220"            /*  data from your  */
+	$"636F 6D70 7574 6572 3F0D 0D54 6869 7320"            /* computer?..This  */
+	$"7769 6C6C 2072 656D 6F76 6520 7468 6520"            /* will remove the  */
+	$"6578 6563 7574 6162 6C65 7320 6275 7420"            /* executables but  */
+	$"7769 6C6C 206E 6F74 2074 6F75 6368 2042"            /* will not touch B */
+	$"4F49 4E43 2773 2064 6174 6120 6669 6C65"            /* OINC's data file */
+	$"732E 0000 0000 0009 001B 0089 009B C002"            /* s......Æ...‰.›À. */
+	$"0080"                                               /* .€ */
+};
+
+data 'DLGX' (128) {
+	$"0843 6861 7263 6F61 6C00 0000 0000 0000"            /* .Charcoal....... */
+	$"0000 0000 0000 0000 0000 0000 0000 0000"            /* ................ */
+	$"0000 0000 0000 0000 0000 0000 0000 0000"            /* ................ */
+	$"0000 0000 0000 0000 0000 0000 0000 0000"            /* ................ */
+	$"000C 0000 0000 0000 0004 0004 0000 0000"            /* ................ */
+	$"0004 0000 0000 0000 0000 0000 0000 0001"            /* ................ */
+	$"0000 0000 0000 0000 0000 0006 0000 0000"            /* ................ */
+	$"0000 0000 0000 0009 0000 0000 0000 0000"            /* .......Æ........ */
+	$"0000"                                               /* .. */
+};
+
+data 'PICT' (128, "NewTrashMasked_Gray.tif") {
+	$"6036 0000 0000 0080 0080 0011 02FF 0C00"            /* `6.....€.€...ÿ.. */
+	$"FFFE 0000 0048 0000 0048 0000 0000 0000"            /* ÿþ...H...H...... */
+	$"0080 0080 0000 0000 001E 0001 000A 8001"            /* .€.€.........€. */
+	$"8001 7FFF 7FFF 009A FF00 0000 8200 0000"            /* €..ÿ.ÿ.šÿ...‚... */
+	$"0000 0080 0080 0000 0004 0000 0000 0048"            /* ...€.€.........H */
+	$"0000 0048 0000 0010 0020 0003 0008 0000"            /* ...H..... ...... */
+	$"0020 017F E0B0 0000 0000 0000 0000 0080"            /* . ..à°.........€ */
+	$"0080 0000 0000 0080 0080 0000 0006 81F0"            /* .€.....€.€....ð */
+	$"81F0 81F0 0026 D6F0 0201 196C DBF0 0211"            /* ðð.&Öð...lÛð.. */
+	$"1236 ADF0 021F 4B8E DBF0 0240 3265 ADF0"            /* .6­ð..KŽÛð. at 2e­ð */
+	$"0249 7DB0 DBF0 026E 5FA4 D8F0 0032 D7F0"            /* .I}°Ûð.n_¤Øð.2×ð */
+	$"040E 2810 261B DDF0 0411 0E1B 191B AFF0"            /* ..(.&.Ýð......¯ð */
+	$"042F 4A44 5445 DDF0 0440 3B45 3445 AFF0"            /* ./JDTEÝð.@;E4E¯ð */
+	$"045D 7B73 8171 DDF0 046E 6B71 6171 D9F0"            /* .]{sqÝð.nkqaqÙð */
+	$"003B D8F0 063E 281A 1A12 2252 DFF0 0501"            /* .;Øð.>(..."Rßð.. */
+	$"111A 1717 23B0 F006 5E4A 4B4A 414E 78DF"            /* ....#°ð.^JKJANxß */
+	$"F005 2D38 413F 3C3E B0F0 0689 7B7A 7871"            /* ð.-8A?<>°ð.‰{zxq */
+	$"7CA1 DFF0 055D 656C 6B64 67D9 F000 44D9"            /* |¡ßð.]elkdgÙð.DÙ */
+	$"F008 5B3E 1A1A 1B1B 1421 44E1 F006 030F"            /* ð.[>.....!Dáð... */
+	$"1A19 1510 34B1 F008 915E 474A 4A48 414A"            /* ....4±ð.‘^GJJHAJ */
+	$"6CE1 F006 2A35 3E3D 3640 6EB1 F008 C989"            /* láð.*5>=6 at n±ð.ɉ */
+	$"7377 7876 6F78 96E1 F006 5B62 6967 5976"            /* swxvox–áð.[bigYv */
+	$"B4D9 F000 44D8 F008 5B09 191B 1C1C 171B"            /* ´Ùð.DØð.[Æ...... */
+	$"37E3 F006 040F 1B19 1510 22AF F002 914D"            /* 7ãð......."¯ð.‘M */
+	$"46FE 4702 4144 5EE3 F006 2831 3B3A 333C"            /* FþG.AD^ãð.(1;:3< */
+	$"68AF F008 C995 7073 7573 6D71 8AE3 F006"            /* h¯ð.É•psusmqŠãð. */
+	$"585F 6563 576E BAD8 F000 74D7 F008 5F09"            /* X_ecWnºØð.t×ð._Æ */
+	$"1B1B 1D1D 191B 2EF9 F00C C37B 5C3E 2C27"            /* .......ùð.Ã{\>,' */
+	$"2C38 3A35 458B C2FA F006 0B0F 1B1A 1810"            /* ,8:5E‹Âúð....... */
+	$"1FAD F008 954D 4346 4645 3F41 54F9 F00C"            /* .­ð.•MCFFE?ATùð. */
+	$"CC8C 7055 4543 4650 524D 5C9A CCFA F006"            /* ÌŒpUECFPRM\šÌúð. */
+	$"292D 3937 3139 65AD F008 CA93 6F72 7271"            /* )-9719e­ð.Ê“orrq */
+	$"6B6D 83F9 F00C D8A7 8D78 6B69 6C75 7771"            /* kmƒùð.اxkiluwq */
+	$"7EB1 DBFA F006 595B 6260 546B BBD7 F000"            /* ~±Ûúð.Y[b`Tk»×ð. */
+	$"7DD6 F008 6C08 1B1D 1D1E 1B1B 25FD F00F"            /* }Öð.l.......%ýð. */
+	$"E29D 621E 0607 0E13 1414 1213 151B 0479"            /* âb............y */
+	$"FBF0 0600 111C 1A18 1119 ABF0 089D 4D42"            /* ûð........«ð.MB */
+	$"4444 423E 3D4A FDF0 0FE8 AD7C 412C 262A"            /* DDB>=Jýð.è­|A,&* */
+	$"2E30 302F 3032 3720 8BFB F006 202D 3635"            /* .00/027 ‹ûð. -65 */
+	$"3037 61AB F008 CE95 6B6E 6F6D 6A6B 78FD"            /* 07a«ð.Εknomjkxý */
+	$"F00F ECC1 9C71 5F53 5559 5B5B 5A5B 5F61"            /* ð.ìÁœq_SUY[[Z[_a */
+	$"4EA9 FBF0 0650 585F 5D52 68B7 D6F0 0082"            /* N©ûð.PX_]Rh·Öð.‚ */
+	$"D5F0 1266 0A1B 1D1E 1F1E 1C24 9AE6 7726"            /* Õð.fÂ......$šæw& */
+	$"1F18 191C 1C17 FE16 1117 181A 0154 FDE8"            /* ......þ......Týè */
+	$"E6E7 F0F0 0712 1D1A 1A0F 0BA9 F012 994D"            /* æçðð.......©ð.™M */
+	$"4042 4140 3D3A 44B1 ED87 4741 3D3B 3835"            /* @BA@=:D±í‡GA=;85 */
+	$"37FE 3611 3738 381C 70FE F3F1 F2F0 F026"            /* 7þ6.788.pþóñòðð& */
+	$"3037 332E 3051 A9F0 12CB 9568 6B6D 6C69"            /* 073.0Q©ð.Ë•hkmli */
+	$"6772 CBF5 A074 6F6F 6A62 5E64 FE63 0464"            /* grËõ toojb^dþc.d */
+	$"6565 449A FDFF 08F0 F054 5B5F 5B52 60A6"            /* eeDšýÿ.ððT[_[R`¦ */
+	$"D5F0 007B D4F0 0269 091E FE1F 1F1E 193F"            /* Õð.{Ôð.iÆ.þ....? */
+	$"2C08 1417 1612 0E0F 1011 1011 0E10 0956"            /* ,.............ÆV */
+	$"FFEF E3E2 FFD0 0F11 1F1B 1A10 01A7 F00A"            /* ÿïãâÿÐ.......§ð */
+	$"9D4B 3E40 3F3D 3934 5944 25FE 3417 322F"            /* K>@?=94YD%þ4.2/ */
+	$"2F30 302F 312F 3129 74FF F7EE EEFF D52D"            /* /00/1/1)tÿ÷îîÿÕ- */
+	$"2E39 3531 2D44 A7F0 18CD 9268 696B 6965"            /* .951-D§ð.Í’hikie */
+	$"607E 6A52 625E 6161 5C5D 5D5B 5A5E 5D5F"            /* `~jRb^aa\]][Z^]_ */
+	$"549A FCFF 07DB 5B5B 625D 5359 91D4 F000"            /* Tšüÿ.Û[[b]SY‘Ôð. */
+	$"75D3 F002 7104 1EFE 1F1D 1D14 1318 1710"            /* uÓð.q..þ........ */
+	$"0F16 1E2D 383F 4044 3223 5BFF F5E9 E6FF"            /* ...-8?@D2#[ÿõéæÿ */
+	$"D007 121F 1E1C 1300 A5F0 239E 433D 3D3C"            /* Ð.......¥ð#žC==< */
+	$"3937 2E2E 3433 2F2E 343C 4954 5C5D 624F"            /* 97..43/.4<IT\]bO */
+	$"4179 FFF9 F1F0 FFDE 262F 3B38 332E 34A5"            /* AyÿùñðÿÞ&/;83.4¥ */
+	$"F016 CF89 6668 6763 6157 585F 5E5A 5A5F"            /* ð.ωfhgcaWX_^ZZ_ */
+	$"6770 7B83 848A 7265 9FFC FF07 ED57 5D64"            /* gp{ƒ„ŠreŸüÿ.íW]d */
+	$"6158 5784 D3F0 0070 D2F0 2168 011F 1F1E"            /* aXW„Óð.pÒð!h.... */
+	$"1D1C 1813 0F19 3657 75A9 D8E7 ECEB CFC7"            /* ......6Wu©ØçìëÏÇ */
+	$"FCF5 E9F4 FDCC 0C11 201F 1F15 00A3 F021"            /* üõéôýÌ.. ....£ð! */
+	$"943E 3A39 3937 3535 322D 3754 7594 C3E1"            /* ”>:997552-7Tu”Ãá */
+	$"EAEF F2E0 DBFD F9F1 F8FD DD2D 313C 3B38"            /* êïòàÛýùñøýÝ-1<;8 */
+	$"3231 A3F0 14C5 8163 6362 605E 5F5E 5861"            /* 21£ð.Łccb`^_^Xa */
+	$"7E9E BEE3 E7F2 F6FC F4F4 FDFF 08FA F05B"            /* ~ž¾ãçòöüôôýÿ.úð[ */
+	$"5F66 6560 5D84 D2F0 0068 D1F0 206A 001D"            /* _fe`]„Òð.hÑð j.. */
+	$"1E1C 180F 1236 6BA8 F4FA FDFC F9F7 F7FB"            /* .....6k¨ôúýüù÷÷û */
+	$"FCF0 ECF4 B280 0910 1E1E 211C 059C A2F0"            /* üðìô²€Æ...!..œ¢ð */
+	$"2094 3437 3736 3530 3051 89C7 F5FB FDFE"            /*  ”4776500Q‰Çõûýþ */
+	$"FBFC FDFF FEF6 F4F9 C99C 2B31 3D3D 3B39"            /* ûüýÿþöôùÉœ+1==;9 */
+	$"48BD A2F0 0DC1 755F 5E5E 605D 5C73 AEF0"            /* H½¢ð.Áu_^^`]\s®ð */
+	$"F9FC FEF8 FF09 DFBD 5C5F 6969 6564 8FE0"            /* ùüþøÿÆß½\_iiedà */
+	$"D2F0 0064 D0F0 0B64 0616 170E 1247 90FA"            /* Òð.dÐð.d.....Gú */
+	$"FFF9 F7FC F90D F7F6 F4F1 F7B7 4A22 161F"            /* ÿù÷üù.÷öôñ÷·J".. */
+	$"2020 1439 A0F0 1E90 2D36 382F 3365 ADFB"            /*   .9 ð.-68/3e­û */
+	$"FFFD FBFB FAFA F9F9 FAF9 F9F7 FCC7 6640"            /* ÿýûûúúùùúùù÷üÇf@ */
+	$"3740 3E3E 3558 A0F0 08BE 6762 655F 608B"            /* 7@>>5X ð.¾gbe_`‹ */
+	$"D4FE FEFF 04FE FDFC FDFE FCFF 08D0 8565"            /* Ôþþÿ.þýüýþüÿ.Ð…e */
+	$"676C 696A 6383 D1F0 0071 D3F0 22EE E8EC"            /* glijcƒÑð.qÓð"îèì */
+	$"FF76 1012 144E AFFF FAF8 F9FB FBFC FCFB"            /* ÿv...N¯ÿúøùûûüüû */
+	$"FBFA F9F8 F7F3 FDE3 742B 1A1E 2021 018E"            /* ûúùø÷óýãt+.. !.Ž */
+	$"A4F0 22F5 F2F4 FF99 3333 356C CEFF FCFA"            /* ¤ð"õòôÿ™335lÎÿüú */
+	$"FAF9 F6F3 F0EA E8ED F4FA F9F8 FEED 894A"            /* úùöóðêèíôúùøþí‰J */
+	$"3A3C 3E3F 209F A4F0 FDFF 05C8 6561 6392"            /* :<>? Ÿ¤ðýÿ.Èeac’ */
+	$"F6FE FF08 FCF1 E3D2 C4B4 A7BF E8FD FF08"            /* öþÿ.üñãÒÄ´§¿èýÿ. */
+	$"F996 7369 6669 6A4C B8D2 F000 72D3 F011"            /* ù–sifijL¸Òð.rÓð. */
+	$"F2F3 E4E9 FF79 0B3E B0FF F7F8 FAFC FDFE"            /* òóäéÿy.>°ÿ÷øúüýþ */
+	$"FDFE FEFD 0DFC FAF8 F7F4 FCE5 6522 1A1E"            /* ýþþý.üúø÷ôüåe".. */
+	$"221B 1AA5 F023 F6F9 FBEF F1FF 9B2C 5ECC"            /* "..¥ð#öùûïñÿ›,^Ì */
+	$"FFFA FAF9 F2F2 F4E9 EAE6 DCD8 D5E5 F7F9"            /* ÿúúùòòôéêæÜØÕå÷ù */
+	$"F9FE ED7A 4235 3841 3A37 A5F0 FBFF 03CA"            /* ùþízB58A:7¥ðûÿ.Ê */
+	$"5C89 EDFE FF0B F6D2 C7D0 B6B2 9F7D 635D"            /* \‰íþÿ.öÒÇж²Ÿ}c] */
+	$"A2F5 FEFF 07F3 886B 5E61 6B66 62D2 F000"            /* ¢õþÿ.óˆk^akfbÒð. */
+	$"73D3 F00E D2BF FEE7 EDFF 6C75 FFF7 F8FA"            /* sÓð.Ò¿þçíÿluÿ÷øú */
+	$"FCFC FEFB FF0E FEFD FAF9 F8F4 FEC5 4B1F"            /* üüþûÿ.þýúùøôþÅK. */
+	$"1D21 2409 8DA5 F023 DECD FEF1 F4FF 8D95"            /* .!$ƍ¥ð#ÞÍþñôÿ• */
+	$"FFFA FAF7 EDE6 F1FB FBF9 F4ED E2D7 CDDB"            /* ÿúú÷íæñûûùôíâ×ÍÛ */
+	$"F5F9 F8FE D362 3C38 3F42 289F A5F0 01ED"            /* õùøþÓb<8?B(Ÿ¥ð.í */
+	$"E2FD FF12 BBC1 FFFF FEEE C0AA CFF0 F3E6"            /* âýÿ.»ÁÿÿþîÀªÏðóæ */
+	$"D3B4 8A5B 3475 E7FE FF07 DB78 6860 696E"            /* Ó´Š[4uçþÿ.Ûxh`in */
+	$"56B8 D3F0 006F D3F0 0691 069C FEEA EFFE"            /* V¸Óð.oÓð.‘.œþêïþ */
+	$"FEF8 02F9 FCFB FAFF FEFE 0CFB FBF9 F7F4"            /* þø.ùüûúÿþþ.ûûù÷ô */
+	$"FF8B 3621 2226 1A2D A5F0 23A2 26B6 FEF2"            /* ÿ‹6!"&.-¥ð#¢&¶þò */
+	$"F5FE FAFB FAF6 EDDB EDFA FDFE FBF7 F1E9"            /* õþúûúöíÛíúýþû÷ñé */
+	$"E2D8 C6D4 F6F9 F8FF A252 3D3F 463B 4BA5"            /* âØÆÔöùøÿ¢R=?F;K¥ */
+	$"F003 B855 D9FE FBFF 0FE7 C091 C1ED FDFC"            /* ð.¸UÙþûÿ.çÀ‘Áíýü */
+	$"EFDF C29C 8463 2E64 EEFE FF06 B675 6869"            /* ïßÂœ„c.dîþÿ.¶uhi */
+	$"7568 75D3 F000 80D3 F00C 7519 0688 FEEA"            /* uhuÓð.€Óð.u..ˆþê */
+	$"EFF5 F8F9 FBFC FCFA FF13 FEFE FDFD F8F9"            /* ïõøùûüüúÿ.þþýýøù */
+	$"F8F6 FBDF 512D 2728 270C D675 5477 AAF0"            /* øöûßQ-'('.ÖuTwªð */
+	$"28F8 8432 23A6 FEF2 F5F9 FAF8 EBDA DBF4"            /* (ø„2#¦þòõùúøëÚÛô */
+	$"FBFB FAF7 F3EF EAE6 DED2 BAD6 FBF9 FEE8"            /* ûûú÷óïêæÞÒºÖûùþè */
+	$"6A4B 464A 4C31 E07A 597B AAF0 05FF 9E5C"            /* jKFJL1àzY{ªð.ÿž\ */
+	$"51D1 FEFD FF10 F4B8 8A90 D3EF F0E9 DBC8"            /* QÑþýÿ.ô¸ŠÓïðéÛÈ */
+	$"B29F 9275 541F 7AFE FF0A F182 7772 7B7C"            /* ²Ÿ’uT.zþÿÂñ‚wr{| */
+	$"60EE 7D5C 7ED7 F000 8AD5 F00E 62E4 5618"            /* `î}\~×ð.ŠÕð.bäV. */
+	$"1B09 8DFD F1F5 F8FA FBFA FEFD FFFB FE12"            /* .ƍýñõøúûúþýÿûþ. */
+	$"FDFB F7F7 F8F5 FD80 3D34 3130 0485 87A8"            /* ýû÷÷øõý€=410.…‡¨ */
+	$"985C 6EAD F02B 67EE 6930 3628 ABFD F6F9"            /* ˜\n­ð+gîi06(«ýöù */
+	$"FAF0 DACA E9F5 F6F5 F2EF EDEA E7E5 E0D9"            /* úðÚÊéõöõòïíêçåàÙ */
+	$"CEB1 DCFC F9FE 985C 5654 542A 988C AD9E"            /* αÜüùþ˜\VTT*˜Œ­ž */
+	$"6374 ADF0 0769 F888 595F 54D4 FEFE FF11"            /* ct­ð.iøˆY_TÔþþÿ. */
+	$"D385 67AF D2D5 CFC4 B7A9 9D92 8777 6340"            /* Ó…g¯ÒÕÏÄ·©’‡wc@ */
+	$"0BA4 FEFF 0BAF 8784 8586 60B4 8FB0 A063"            /* .¤þÿ.¯‡„…†`´° c */
+	$"72D9 F000 97D7 F00F 6687 87D2 4417 2324"            /* rÙð.—×ð.f‡‡ÒD.#$ */
+	$"32E0 F9F9 F8FB FAFD FEFF FBFE 12FD FDFC"            /* 2àùùøûúýþÿûþ.ýýü */
+	$"FBF6 F5F8 F5FF BA4D 5044 3E19 5D5A 645F"            /* ûöõøõÿºMPD>.]Zd_ */
+	$"FE87 0057 B1F0 2B6E 8989 DB59 323E 414D"            /* þ‡.W±ð+n‰‰ÛY2>AM */
+	$"EAFB FBFA E2CC DCF1 F2EE EBEA EAE9 E9E8"            /* êûûúâÌÜñòîëêêééè */
+	$"E7E4 E0D8 A8BA FBF9 FFCB 6C71 655F 3C71"            /* çäàبºûùÿËlqe_<q */
+	$"5F68 68FE 8900 5DB1 F013 6D88 88E7 7D5A"            /* _hhþ‰.]±ð.mˆˆç}Z */
+	$"6769 73F6 FFFF FD9E 5F8B C3C1 B1A2 FE9C"            /* gisöÿÿýž_‹ÃÁ±¢þœ */
+	$"149E 9D93 867D 6500 3EF4 FFFF D894 9F90"            /* .ž“†}e.>ôÿÿØ”Ÿ */
+	$"8D6F 9062 6C6A FE88 005B DBF0 00A2 D9F0"            /* obljþˆ.[Ûð.¢Ùð */
+	$"1156 8787 643F B83A 1D25 2939 D2FD FBF8"            /* .V‡‡d?¸:.%)9Òýûø */
+	$"FBFA FDF9 FE19 FDFB F9F9 F6F2 F2F8 F7FC"            /* ûúýùþ.ýûùùöòòø÷ü */
+	$"D33D 3F48 5437 3B8E 8968 5154 7287 875A"            /* Ó=?HT7;Ž‰hQTr‡‡Z */
+	$"B5F0 335E 8989 704B C154 3941 4454 DEFD"            /* µð3^‰‰pKÁT9ADTÞý */
+	$"FCF8 D6C6 E0EE EBE7 E6E8 ECEF E5DD D3CB"            /* üøÖÆàîëçæèìïåÝÓË */
+	$"C2B8 A5A8 EFF9 FEE0 5B5F 6470 5650 908B"            /* ¸¥¨ïùþà[_dpVP‹ */
+	$"6E5A 5F7B 8989 63B5 F033 5D88 886E 49CF"            /* nZ_{‰‰cµð3]ˆˆnIÏ */
+	$"7A62 696D 79EE FFFF F170 458C B4A2 8C89"            /* zbimyîÿÿñpEŒ´¢Œ‰ */
+	$"99AD AB96 785F 4332 1A00 0ED7 FCFF ED81"            /* ™­«–x_C2...×üÿí */
+	$"8C8D 9980 728F 8A6C 575B 7888 8860 DDF0"            /* Œ™€rŠlW[xˆˆ`Ýð */
+	$"00B0 DBF0 1257 8787 584F 5D77 9532 2629"            /* .°Ûð.W‡‡XO]w•2&) */
+	$"2E4A DDFD FAF9 FBFB FDFE FDFC 1CF9 F7F7"            /* .JÝýúùûûýþýü.ù÷÷ */
+	$"F4F2 F2F0 ECF5 F7FA EB25 0107 1914 2393"            /* ôòòðìõ÷úë%....#“ */
+	$"908E 886F 5751 789D 7960 B9F0 375F 8989"            /* ŽˆoWQxy`¹ð7_‰‰ */
+	$"6151 5E79 A24F 4644 4866 E7FE FCF3 CECB"            /* aQ^y¢OFDHfçþüóÎË */
+	$"E1E7 E1DE D7D5 CFC8 BCB7 B0AD ACAB A49B"            /* áçáÞ×ÕÏȼ·°­¬«¤› */
+	$"E0F6 FDF2 401B 2735 3038 9592 928F 785D"            /* àöýò@.'508•’’x] */
+	$"577E A47E 64B9 F037 5F88 8860 515F 79B7"            /* W~¤~d¹ð7_ˆˆ`Q_y· */
+	$"7970 6D71 8BF7 FFFF E047 4481 8D80 7668"            /* ypmq‹÷ÿÿàGD€vh */
+	$"6453 3317 0B08 0706 0806 00AC F3FD FB5C"            /* dS3........¬óýû\ */
+	$"4254 5E5A 5C94 9191 8D75 5B55 7CA2 7D63"            /* BT^Z\”‘‘u[U|¢}c */
+	$"DFF0 00BF DDF0 3B56 748B 564A 5E91 9D88"            /* ßð.¿Ýð;Vt‹VJ^‘ˆ */
+	$"8230 3133 3D59 E6FD FAF9 FAFB FCFA F7F6"            /* ‚013=Yæýúùúûüú÷ö */
+	$"F6F8 F6F8 F7F6 F4F1 F0F0 EDEB F4F7 F5FB"            /* öøöø÷öôñððíëô÷õû */
+	$"3C03 0B0C 021C 8989 9090 8580 8B52 4C7B"            /* <.....‰‰…€‹RL{ */
+	$"965D 6BBD F03B 5C7D 9560 5162 909C 8792"            /* –]k½ð;\}•`Qbœ‡’ */
+	$"4E52 4E5A 75F1 FDFC F1C5 CCD5 CCBF B7B3"            /* NRNZuñýüñÅÌÕÌ¿·³ */
+	$"B4B4 B5B6 B1AC AAAA A8A2 96D7 F5FA FE57"            /* ´´µ¶±¬ªª¨¢–×õúþW */
+	$"232B 2818 358B 8B92 948B 848F 5650 7F9E"            /* #+(.5‹‹’”‹„VP.ž */
+	$"6770 BDF0 3B5C 7C94 5F51 638E 9A85 A87B"            /* gp½ð;\|”_QcŽš…¨{ */
+	$"7C78 859B FDFF FFD5 2E44 6148 321D 110F"            /* |x…›ýÿÿÕ.DaH2... */
+	$"0E13 1511 0D09 0707 0500 98EE FDFF 7450"            /* .....Æ....˜îýÿtP */
+	$"5852 3D60 8A8A 9193 8983 8E55 4F7E 9B63"            /* XR=`ŠŠ‘“‰ƒŽUO~›c */
+	$"6FE1 F000 C5DE F016 6087 6C4C 5085 8C85"            /* oáð.ÅÞð.`‡lLP…Œ… */
+	$"A08C 773E 4F52 5E4F E4FE F9F9 FAF6 F6FE"            /*  Œw>OR^Oäþùùúööþ */
+	$"F200 F4FE F501 F6F3 FEF1 1AF0 ECF0 F6F8"            /* ò.ôþõ.öóþñ.ðìðöø */
+	$"F4FD 3E02 0B0D 0420 938E 8D9B 828C 9389"            /* ôý>.... “Ž›‚Œ“‰ */
+	$"7359 5287 7B54 BFF0 3D62 886E 4F59 8B8E"            /* sYR‡{T¿ð=bˆnOY‹Ž */
+	$"87A2 8D88 5A6E 707E 6CEF FEFC F1C0 B0B2"            /* ‡¢ˆZnp~lïþüñÀ°² */
+	$"ACA9 ABAC AFAF B2B1 ADAB A8A9 A8A1 95DD"            /* ¬©«¬¯¯²±­«¨©¨¡•Ý */
+	$"F9FA FE59 222B 2920 3E95 908E 9E86 8E95"            /* ùúþY"+) >•Žž†Ž• */
+	$"8B76 5E5D 9482 5ABF F03D 648A 7050 598C"            /* ‹v^]”‚Z¿ð=dŠpPYŒ */
+	$"9186 A08B A183 999D AB93 FDFF FFD4 2310"            /* ‘† ‹¡ƒ™«“ýÿÿÔ#. */
+	$"0B07 080B 0F0F 1011 100B 0806 0607 0600"            /* ................ */
+	$"A3F7 FEFF 774F 5753 496F 948F 8E9D 858D"            /* £÷þÿwOWSIo”Ž… */
+	$"948A 755C 598F 8058 E2F0 00CE E0F0 1861"            /* ”Šu\Y€Xâð.Îàð.a */
+	$"6F81 5446 8383 988C 8A9B 8F75 222E 2E24"            /* oTFƒƒ˜ŒŠ›u"..$ */
+	$"19DD FFFB F8F6 F0F1 FEF0 0BF2 F3F4 F5F3"            /* .Ýÿûøöðñþð.òóôõó */
+	$"F2F3 F2F4 F2ED F3FE F715 ED2C 040B 0D03"            /* òóòôòíóþ÷.í,.... */
+	$"2D8E 878C 8E82 89A8 888A 8B5E 526D 865A"            /* -Ž‡ŒŽ‚‰¨ˆŠ‹^Rm†Z */
+	$"C2F0 4066 7487 5849 8487 9C90 8E9D 8F88"            /* Âð@ft‡XI„‡œŽˆ */
+	$"3949 4E45 38EA FFFC F5BF A5A7 A7A6 A7AB"            /* 9INE8êÿüõ¿¥§§¦§« */
+	$"AEAF B1B0 ACAD ADB0 ADA7 98E5 FCFD F447"            /* ®¯±°¬­­°­§˜åüýôG */
+	$"242B 281C 5090 898E 9084 8BAA 8A8E 9067"            /* $+(.P‰Ž„‹ªŠŽg */
+	$"5B73 9065 C2F0 4066 7789 594A 868A 9F93"            /* [seÂð@fw‰YJ†ŠŸ“ */
+	$"8F9D 8DA1 6271 7A73 60FC FFFF E226 0407"            /* ¡bqzs`üÿÿâ&.. */
+	$"0809 090C 0D0C 0E0A 0706 0609 0C0A 00BC"            /* .ÆÆ....Â...Æ.Â.¼ */
+	$"FDFF FD65 5157 5144 848F 888D 8F83 8AA9"            /* ýÿýeQWQD„ˆƒŠ© */
+	$"898C 8E64 5871 8D61 E3F0 00D6 E1F0 1D4F"            /* ‰ŒŽdXqaãð.Öáð.O */
+	$"7C65 435C 83A3 8298 8B84 9697 7B11 0D0B"            /* |eC\ƒ£‚˜‹„–—{... */
+	$"0405 B8FF FBF9 F2E9 EDF0 F0F1 F5FE F4FE"            /* ..¸ÿûùòéíððñõþôþ */
+	$"F303 F4F4 F1F0 FEF7 18F6 E823 030B 0C01"            /* ó.ôôñðþ÷.öè#.... */
+	$"4384 8A8D 8E89 8C7E 8091 8585 884C 5586"            /* C„ŠŽ‰Œ~€‘……ˆLU† */
+	$"5F6E C5F0 1D58 856D 4A60 86A4 869C 8F88"            /* _nÅð.X…mJ`†¤†œˆ */
+	$"9897 9028 252B 2524 D2FF FCFB BE9D A2A6"            /* ˜—(%+%$Òÿüû¾¢¦ */
+	$"A5AA AEFE B022 AFB1 B0B3 B6B3 A69F F0FB"            /* ¥ª®þ°"¯±°³¶³¦Ÿðû */
+	$"FDF1 4223 2B27 1B67 868C 8F90 8B8E 8082"            /* ýñB#+'.g†Œ‹Ž€‚ */
+	$"9186 888C 515B 8F6A 74C5 F043 5583 6F4C"            /* ‘†ˆŒQ[jtÅðCUƒoL */
+	$"6187 A689 9F92 8997 95AA 4F4C 5753 4EF5"            /* a‡¦‰Ÿ’‰—•ªOLWSNõ */
+	$"FFFF F43B 0005 0606 080C 0A0A 0806 0605"            /* ÿÿô;......ÂÂ.... */
+	$"0B11 1609 08DC FFFF FA69 5157 5041 9D85"            /* ...Æ.ÜÿÿúiQWPA… */
+	$"8B8E 8F8A 8D7F 8191 8587 8B4F 598C 6672"            /* ‹ŽŠ.‘…‡‹OYŒfr */
+	$"E5F0 00DD E2F0 455B 7E50 3979 9585 9989"            /* åð.ÝâðE[~P9y•…™‰ */
+	$"8E9D 8E92 9C9E 1B17 100C 047D FFFB F9F1"            /* ŽŽ’œž.....}ÿûùñ */
+	$"E3E8 EFF3 F3F2 F2F3 F3F2 F2F3 F5F5 F1F4"            /* ãèïóóòòóóòòóõõñô */
+	$"F7F8 F6F1 F932 010A 0C01 6186 8791 7F81"            /* ÷øöñù2.Â..a†‡‘. */
+	$"9197 8796 958A 9187 624C 766F 61C7 F045"            /* ‘—‡–•Š‘‡bLvoaÇðE */
+	$"6189 5B43 8299 889A 8D92 A192 949C AF33"            /* a‰[C‚™ˆš’¡’”œ¯3 */
+	$"2D2F 2D24 97FF FCFD CA91 A0A6 ADAE B0B0"            /* -/-$—ÿüýÊ‘ ¦­®°° */
+	$"B1B1 B2B2 B5BA BBB9 A0BA FBF9 F8FD 5222"            /* ±±²²µº»¹ ºûùøýR" */
+	$"2827 1B84 8889 9381 8393 9989 9393 8A93"            /* ('.„ˆ‰“ƒ“™‰““Š“ */
+	$"8A68 5282 7765 C7F0 2A5F 8558 4482 9A8A"            /* ŠhR‚weÇð*_…XD‚šŠ */
+	$"9C90 95A4 9393 9AC5 5A52 5B5A 4FBB FFFF"            /* œ•¤““šÅZR[ZO»ÿÿ */
+	$"FB6C 0005 0508 0605 0506 0607 0A10 1A22"            /* ûl..........Â.." */
+	$"2B00 46FC FEFF 177B 4F55 4E45 B487 8892"            /* +.Füþÿ.{OUNE´‡ˆ’ */
+	$"8082 9298 8894 948A 9289 6650 7E75 64E6"            /* €‚’˜ˆ””Š’‰fP~udæ */
+	$"F000 E2E3 F020 5977 4940 8687 AB76 9D93"            /* ð.âãð YwI@†‡«v“ */
+	$"8C96 8781 94A8 321C 110D 0551 FFFD F8F6"            /* Œ–‡”¨2....Qÿýøö */
+	$"E3E5 ECF1 F2F2 F3FE F423 F5F7 F8F7 F6F7"            /* ãåìñòòóþô#õ÷ø÷ö÷ */
+	$"F7F8 F3EC FFA1 0E09 0A00 8282 9599 7D8A"            /* ÷øóìÿ¡.ÆÂ.‚‚•™}Š */
+	$"8D7E 8490 7D8D 9384 9064 5077 6E5C C9F0"            /* ~„}“„dPwn\Éð */
+	$"4760 8254 4A8F 8CAD 789F 948D 9789 8396"            /* G`‚TJŒ­xŸ”—‰ƒ– */
+	$"AA49 302D 2E26 6CFF FDFD EA9B 9BA7 B0B0"            /* ªI0-.&lÿýýê››§°° */
+	$"B1B3 B5B7 B8BA BEC1 C4BC 9EE0 FEF8 F4FF"            /* ±³µ·¸º¾Áļžàþøôÿ */
+	$"C134 2A22 24A0 8497 9B7F 8C8F 8086 927E"            /* Á4*"$ „—›.Œ€†’~ */
+	$"8D92 8490 6452 7C78 62C9 F02A 5E82 564B"            /* ’„dR|xbÉð*^‚VK */
+	$"8E8B AC77 9E96 8F99 8882 95A7 6C53 575B"            /* Ž‹¬wž–™ˆ‚•§lSW[ */
+	$"538E FFFF FEC4 0000 0909 0706 090F 1419"            /* SŽÿÿþÄ..ÆÆ..Æ... */
+	$"1E26 303C 3300 ADFD FF18 EB63 5847 62C8"            /* .&0<3.­ýÿ.ëcXGbÈ */
+	$"8396 9A7E 8B8E 7F85 907C 8B90 828E 624F"            /* ƒ–š~‹Ž.…|‹‚ŽbO */
+	$"7A77 62E7 F000 E4E4 F034 6177 4C47 9190"            /* zwbçð.ääð4awLG‘ */
+	$"939D 8C93 8C8C 998F 8D93 783F 1C15 0F0A"            /* “Œ“ŒŒ™“x?... */
+	$"22D4 FFF9 F8EE E0E8 EFF3 F5F7 F8F8 F9F9"            /* "Ôÿùøîàèïóõ÷øøùù */
+	$"FAF9 F8F9 F7F8 F6F0 EDEA FF9F 1506 04FD"            /* úùøù÷øöðíêÿŸ...ý */
+	$"8710 808D 9089 8B90 8794 938D 8F85 714C"            /* ‡.€‰‹‡”“…qL */
+	$"6F74 5FCB F034 697E 524D 9693 959F 8E95"            /* ot_Ëð4i~RM–“•ŸŽ• */
+	$"8E8E 9B91 8F95 785A 302B 2E2B 3EE3 FFFB"            /* ŽŽ›‘•xZ0+.+>ãÿû */
+	$"FDCA 8EA5 AEB4 B8BA BDC0 C2C5 C7CA CDAA"            /* ýÊŽ¥®´¸º½ÀÂÅÇÊͪ */
+	$"C5F9 FBF6 F4F2 FFC0 3D27 35FD 8910 828F"            /* ÅùûöôòÿÀ='5ý‰.‚ */
+	$"928B 8D92 8894 928D 8F85 7351 7979 63CB"            /* ’‹’ˆ”’…sQyycË */
+	$"F02B 677F 5651 9994 969E 8D94 8D8D 9A90"            /* ð+g.VQ™”–ž”š */
+	$"8E94 7681 5550 5A59 63F6 FFFE FA71 000B"            /* Ž”vUPZYcöÿþúq.. */
+	$"0F11 161D 252B 3137 3E4D 590E 59F9 FCFF"            /* ....%+17>MY.Yùüÿ */
+	$"03EC 7455 7CFD 8810 818E 918A 8C90 8592"            /* .ìtU|ýˆ.Ž‘ŠŒ…’ */
+	$"908B 8D83 704F 787D 65E8 F000 EBE5 F022"            /* ‹ƒpOx}eèð.ëåð" */
+	$"5B6D 4358 8E94 A283 AD81 9390 7CAC 8B8F"            /* [mCXŽ”¢ƒ­“|¬‹ */
+	$"9299 7C15 140F 0C0C 81FF FCF8 F8EB E1EC"            /* ’™|.....ÿüøøëáì */
+	$"F4F8 FAFE FB25 FAFA F9F9 F8F7 F7F3 EFFE"            /* ôøúþû%úúùùø÷÷óïþ */
+	$"F2EA FFAF 0011 7983 8F85 7498 9874 908A"            /* òêÿ¯..yƒ…t˜˜tŠ */
+	$"7699 7F8D A17F 8C70 4872 705B CDF0 4B6A"            /* v™.¡.ŒpHrp[ÍðKj */
+	$"784B 5991 95A2 83AF 8395 927E AE8D 9194"            /* xKY‘•¢ƒ¯ƒ•’~®‘” */
+	$"9B93 2E29 2E2D 2B95 FFFD FBF8 BC91 ACB9"            /* ›“.).-+•ÿýûø¼‘¬¹ */
+	$"BFC4 C7CA CCCE D4D3 B3B8 F0FC F8F6 FEF7"            /* ¿ÄÇÊÌÎÔÓ³¸ðüøöþ÷ */
+	$"F2FF CD36 477B 8591 8776 9A9A 7692 8C77"            /* òÿÍ6G{…‘‡vššv’Œw */
+	$"987E 8DA1 7F8E 7452 7673 5CCD F02B 6878"            /* ˜~¡.ŽtRvs\Íð+hx */
+	$"4E60 9699 A484 AE82 948F 7BAB 8C90 939A"            /* N`–™¤„®‚”{«Œ“š */
+	$"B459 4D5A 5A56 B1FF FFFE F047 0014 252E"            /* ´YMZZV±ÿÿþðG..%. */
+	$"363F 454B 5367 6920 33DA FAFF 18F2 8B90"            /* 6?EKSgi 3Úúÿ.ò‹ */
+	$"7A84 9086 7599 9975 9189 7596 7C8B 9F7D"            /* z„†u™™u‘‰u–|‹Ÿ} */
+	$"8B73 517F 7960 E9F0 00F4 E6F0 2261 6A48"            /* ‹sQ.y`éð.ôæð"ajH */
+	$"528C 9993 988B 9A8C 8E98 908D 918C 9096"            /* RŒ™“˜‹šŒŽ˜‘Œ– */
+	$"871A 1815 0E0D 1CB5 FFF6 F8F7 ECE6 F1F9"            /* ‡......µÿöø÷ìæñù */
+	$"FDFB 26FA F9F8 F7F7 F8F4 F4E1 6DF0 7BE4"            /* ýû&úùø÷÷øôôámð{ä */
+	$"FFB5 967C 8581 777D 8B81 7C89 8783 9086"            /* ÿµ–|…w}‹|‰‡ƒ† */
+	$"8888 8586 7F6E 4C74 686E CFF0 4D6C 7A4C"            /* ˆˆ…†.nLthnÏðMlzL */
+	$"538B 9792 998C 9C8E 909A 928F 938E 9298"            /* S‹—’™ŒœŽš’“Ž’˜ */
+	$"893D 2B2B 2F2E 39C8 FFFA FBF7 C19C AEC2"            /* ‰=++/.9Èÿúû÷Áœ®Â */
+	$"D0D5 D6D8 D5C7 AFBE ECFB F8F9 EA8C F67D"            /* ÐÕÖØÕǯ¾ìûøùêŒö} */
+	$"EFFF CAB1 7E87 8379 7F8D 837E 8B89 8490"            /* ïÿʱ~‡ƒy.ƒ~‹‰„ */
+	$"8588 8885 8883 734C 776D 73CF F01A 6874"            /* …ˆˆ…ˆƒsLwmsÏð.ht */
+	$"4F57 909A 949B 8D9B 8D8F 9991 8E92 8D91"            /* OWš”››™‘Ž’‘ */
+	$"9788 714D 505C 5C5E E1FE FF0D EA53 0012"            /* —ˆqMP\\^áþÿ.êS.. */
+	$"3A57 646B 746F 4F17 46D3 FEFF 16F1 B3FF"            /* :WdktoO.FÓþÿ.ñ³ÿ */
+	$"7AFF FFE6 D47D 8682 787E 8C82 7D8A 8681"            /* zÿÿæÔ}†‚x~Œ‚}Š† */
+	$"8E83 8686 FE83 047A 5680 7678 EAF0 00F8"            /* Žƒ††þƒ.zV€vxêð.ø */
+	$"E7F0 295A 7947 5471 8290 9896 8AA2 898F"            /* çð)ZyGTq‚˜–Š¢‰ */
+	$"9585 9E97 7F9A 917B 4D0F 1512 0D0C 26CD"            /* •…ž—.š‘{M.....&Í */
+	$"FFF6 F8F8 F1ED F4F9 FAFA F9F8 F8FE F721"            /* ÿöøøñíôùúúùøøþ÷! */
+	$"F4EF F2CB 0F38 747B E3F7 FFA8 817A 727B"            /* ôïòË.8t{ã÷ÿ¨zr{ */
+	$"817F 7C82 8482 8782 7B8A 8186 8383 6B52"            /* .|‚„‚‡‚{Š†ƒƒkR */
+	$"8251 D0F0 4E60 8351 5872 828E 9797 8CA4"            /* ‚QÐðN`ƒQXr‚Ž——Œ¤ */
+	$"8B91 9787 A099 819C 937D 702A 2A2E 2E2D"            /* ‹‘—‡ ™œ“}p**..- */
+	$"41E0 FFF9 FAF9 D5B3 AAB7 C4C4 BEB2 B6D2"            /* AàÿùúùÕ³ª·Äľ²¶Ò */
+	$"F3FB F9F6 F7DF 305A 767D EFFE FFAA 837C"            /* óûùö÷ß0Zv}ïþÿªƒ| */
+	$"747D 8381 7E84 8683 8681 7B8A 8187 8487"            /* t}ƒ~„†ƒ†{Š‡„‡ */
+	$"6B55 8757 D0F0 1C5F 814F 5974 848F 9897"            /* kU‡WÐð._OYt„˜— */
+	$"8BA3 8A90 9686 9F98 809B 927C 9F55 4D58"            /* ‹£Š–†Ÿ˜€›’|ŸUMX */
+	$"5C5B 68FB FEFF 0BF6 8A24 0822 3D43 341A"            /* \[hûþÿ.öŠ$."=C4. */
+	$"2A7A E4FE FF05 FEF5 5B8A 737B FEFF 16A7"            /* *zäþÿ.þõ[Šs{þÿ.§ */
+	$"827B 737C 8280 7D83 8481 847F 7988 7F84"            /* ‚{s|‚€}ƒ„„.yˆ.„ */
+	$"848A 735C 8D5A EAF0 00FC E8F0 2951 7153"            /* „Šs\Zêð.üèð)QqS */
+	$"487E 8F69 9E7E AC83 9397 8B9A 8D86 9484"            /* H~iž~¬ƒ“—‹š†”„ */
+	$"909B 9387 0E14 1610 0E09 37DB FFF5 F7F8"            /* ›“‡.....Æ7Ûÿõ÷ø */
+	$"F6F5 F6F7 F7F6 F6FE F723 F4F0 F0DE 5F03"            /* öõö÷÷ööþ÷#ôððÞ_. */
+	$"064E 7E81 E8F0 747E 7A72 7582 6D7E 7A7C"            /* .N~èðt~zru‚m~z| */
+	$"7886 7D7C 8086 887D 8581 5F53 7C52 D2F0"            /* x†}|€†ˆ}…_S|RÒð */
+	$"5057 7957 4882 9169 9D7E AE85 9599 8D9C"            /* PWyWH‚‘i~®…•™œ */
+	$"8F88 9686 929E 9589 302A 2D30 2F2A 52E9"            /* ˆ–†’ž•‰0*-0/*Ré */
+	$"FFF9 FAFB F2DD CBC5 C5CB DAEE FAFA F9F6"            /* ÿùúûòÝËÅÅËÚîúúùö */
+	$"F6EA 7E24 2771 8083 F3F6 7680 7C74 7784"            /* öê~$'q€ƒóöv€|tw„ */
+	$"6F80 7C7E 7A85 7C7C 8086 867D 8783 6258"            /* o€|~z…||€††}‡ƒbX */
+	$"8458 D2F0 1E59 7B5A 4D81 9069 9B7C AB82"            /* „XÒð.Y{ZMi›|«‚ */
+	$"9498 8C9B 8E87 9585 919D 9488 654E 545C"            /* ”˜Œ›Ž‡•…‘”ˆeNT\ */
+	$"5D57 72FA FDFF 08E2 A06A 5654 6697 D6FD"            /* ]Wrúýÿ.â jVTf—Öý */
+	$"FDFF 20F7 A752 56A1 7E80 FFFF 7580 7B73"            /* ýÿ ÷§RV¡~€ÿÿu€{s */
+	$"7683 6E7F 7B7B 7783 7A7A 7E84 877B 8487"            /* vƒn.{{wƒzz~„‡{„‡ */
+	$"675C 8558 EBF0 00FC E9F0 266F 6961 4283"            /* g\…Xëð.üéð&oiaBƒ */
+	$"977C 7B90 8D9C 899D 8A8D 9387 9396 828D"            /* —|{œ‰Š“‡“–‚ */
+	$"9289 8670 0F17 1313 100D 32A7 FBF3 F5F7"            /* ’‰†p......2§ûóõ÷ */
+	$"F7F8 FCF7 26F5 F1EF EFDD 5900 1519 0538"            /* ÷øü÷&õñïïÝY....8 */
+	$"7E7D A878 7B79 7276 7A75 7276 7876 7B78"            /* ~}¨x{yrvzurvxv{x */
+	$"7882 7B89 7B84 7A81 4F67 695D D4F0 5274"            /* x‚{‰{„zOgi]ÔðRt */
+	$"6E67 4783 9A7E 7C91 8E9E 8B9F 8C8F 9589"            /* ngGƒš~|‘Žž‹ŸŒ•‰ */
+	$"9598 848F 948B 8888 2B2E 3030 312D 4DBA"            /* •˜„”‹ˆˆ+.001-Mº */
+	$"FEF8 F9FB FBFC FAF9 FBFC FAF9 F7F6 F5E9"            /* þøùûûüúùûüúù÷öõé */
+	$"7921 363A 2C6C 807F AA7A 7D7B 7478 7C77"            /* y!6:,l€.ªz}{tx|w */
+	$"7478 7A78 7C79 7984 7C8A 7D87 7F86 556E"            /* txzx|yy„|Š}‡.†Un */
+	$"7366 D4F0 2078 726B 4A87 997D 7B90 8C9D"            /* sfÔð xrkJ‡™}{Œ */
+	$"8A9E 8B8E 9287 9395 828D 9189 86AA 5654"            /* Šž‹Ž’‡“•‚‘‰†ªVT */
+	$"5B5C 5F5B 6FCE FBFF 01FA FCFB FF23 FDF7"            /* [\_[oÎûÿ.úüûÿ#ý÷ */
+	$"A350 6467 60A7 7E7C A778 7A79 7276 7A75"            /* £Pdg`§~|§xzyrvzu */
+	$"7276 7674 7875 7581 7B87 777F 7F87 576D"            /* rvvtxuu{‡w..‡Wm */
+	$"6E60 ECF0 00F9 E9F0 5260 7C48 6FA3 848D"            /* n`ìð.ùéðR`|Ho£„ */
+	$"6C9C 81A7 8193 967F A88D 7C9F 7B88 8F80"            /* lœ§“–.¨|Ÿ{ˆ€ */
+	$"8187 2616 1813 130F 0240 F8EF F0F5 F9F7"            /* ‡&......@øïðõù÷ */
+	$"F7F6 F5F5 F4F0 EFEC C343 0112 1518 1E00"            /* ÷öõõôðïìÃC...... */
+	$"327A 7681 7D7B 7A78 8076 7177 6A6B 806A"            /* 2zv}{zx€vqwjk€j */
+	$"787B 7584 778C 6C86 784E 7C56 D4F0 2567"            /* x{u„wŒl†xN|VÔð%g */
+	$"844D 73A4 868F 6E9E 83A9 8395 9881 AA8F"            /* „Ms¤†nžƒ©ƒ•˜ª */
+	$"7EA1 7D8A 9182 8389 3D2C 3030 312F 235B"            /* ~¡}Š‘‚ƒ‰=,001/#[ */
+	$"FBF6 F6F9 FBFE FAFE F926 F6F5 F3DB 631D"            /* ûööùûþúþù&öõóÛc. */
+	$"3336 3635 2E69 7C78 837F 7D7C 7A82 7873"            /* 3665.i|xƒ.}|z‚xs */
+	$"796C 6D82 6C7A 7D77 8679 8F70 8A7C 5286"            /* ylm‚lz}w†ypŠ|R† */
+	$"60D4 F020 6A87 5075 A585 8E6D 9D82 A882"            /* `Ôð j‡Pu¥…Žm‚¨‚ */
+	$"9497 80A7 8C7B 9E7A 878E 8080 8864 5558"            /* ”—€§Œ{žz‡Ž€€ˆdUX */
+	$"5C5D 5D50 77F4 FF24 FDFB 8F47 6164 625B"            /* \]]Pwôÿ$ýûGadb[ */
+	$"6AA6 7975 817C 7A79 777F 7570 7667 687D"            /* j¦yu|zyw.upvgh} */
+	$"6775 7A76 8373 886F 8A7F 5587 61EC F001"            /* guzvƒsˆoŠ.U‡aìð. */
+	$"07EA F054 5A71 4360 8D9D 8392 7596 829D"            /* .êðTZqC`ƒ’u–‚ */
+	$"8C8B 9380 9A94 8994 8485 8B89 784B 0E19"            /* Œ‹“€š”‰”„…‹‰xK.. */
+	$"1817 1900 2EF2 F6EA FEF0 E9F8 FAF7 F5F2"            /* .....òöêþðéøú÷õò */
+	$"EFE1 CC6D 0B01 1011 151A 1C20 0026 7984"            /* ïáÌm....... .&y„ */
+	$"7975 7B78 7E76 7779 7575 786F 7A77 7678"            /* yu{x~vwyuuxozwvx */
+	$"7A7C 7484 7D6A 536F 4CD6 F054 5F7A 4C65"            /* z|t„}jSoLÖðT_zLe */
+	$"919F 8594 7798 849F 8E8D 9582 9C96 8B96"            /* ‘Ÿ…”w˜„ŸŽ•‚œ–‹– */
+	$"8687 8D8B 7861 2930 302F 2D27 5BF8 FAF2"            /* †‡‹xa)00/-'[øúò */
+	$"FEF6 F1FA FBFA F9F7 F5ED E08D 2C20 3132"            /* þöñúûúù÷õíà, 12 */
+	$"3234 3637 2E62 7B86 7B77 7D7A 8078 797B"            /* 2467.b{†{w}z€xy{ */
+	$"7777 7A71 7C79 787A 7C7F 7685 7E6A 587A"            /* wwzq|yxz|.v…~jXz */
+	$"53D6 F020 637D 4E66 909D 8493 7697 839E"            /* SÖð c}Nf„“v—ƒž */
+	$"8D8C 9481 9993 8893 8384 8A88 7685 5358"            /* Œ”™“ˆ“ƒ„Šˆv…SX */
+	$"5656 515C 8CFD FF01 FEFD FCFF 1EFE FCFB"            /* VVQ\Œýÿ.þýüÿ.þüû */
+	$"B95A 4C5F 5F5D 5C5E 5A6C A378 8378 747A"            /* ¹ZL__]\^Zl£xƒxtz */
+	$"777D 7576 7872 7275 6C77 7677 FE79 0675"            /* w}uvxrrulwvwþy.u */
+	$"8682 6F5D 7D57 EDF0 0109 EAF0 5464 6B39"            /* †‚o]}Wíð.ÆêðTdk9 */
+	$"9E81 A08A 9F78 7F8D 9B84 9483 84AA 8E85"            /* ž ŠŸx.›„”ƒ„ªŽ… */
+	$"947F 8387 8762 0119 1918 1800 1EF2 FAE9"            /* ”.ƒ‡‡b.......òúé */
+	$"FF97 2F5C 7D91 A0AA AA86 4312 0109 100F"            /* ÿ—/\}‘ ªª†C..Æ.. */
+	$"1113 181A 1C1F 002D 8288 7575 7184 7677"            /* .......-‚ˆuuq„vw */
+	$"8875 7279 7276 7170 7673 8667 8178 8841"            /* ˆuryrvqpvs†gxˆA */
+	$"6B5C D6F0 546C 7544 A386 A28C A17A 818F"            /* k\ÖðTluD£†¢Œ¡z */
+	$"9D86 9685 86AC 9087 9681 8589 8978 2135"            /* †–…†¬‡–…‰‰x!5 */
+	$"312E 2D23 54FB FEF2 FFB6 4E79 99AD BEC8"            /* 1.-#Tûþòÿ¶Ny™­¾È */
+	$"C8A6 6433 1D2A 3130 2D2F 3133 3537 2F66"            /* Ȧd3.*10-/1357/f */
+	$"848A 7777 7386 7879 8A77 747B 7478 7372"            /* „Šwws†xyŠwt{txsr */
+	$"7875 8869 8379 8545 7867 D6F0 1F6F 7746"            /* xuˆiƒy…ExgÖð.owF */
+	$"A282 9E8B A079 808E 9C85 9584 85A9 8D84"            /* ¢‚ž‹ y€Žœ…•„…©„ */
+	$"937E 8286 8695 4F5D 5855 4D5A 98FD FF30"            /* “~‚††•O]XUMZ˜ýÿ0 */
+	$"E076 9BB9 CCE5 EFEF D191 6147 585F 5D57"            /* àv›¹ÌåïïÑ‘aGX_]W */
+	$"5958 5A5C 5C6D A481 8774 7470 8375 7687"            /* YXZ\\m¤‡ttpƒuv‡ */
+	$"726F 766F 7370 7178 7483 6884 7D8A 4676"            /* rovospqxtƒh„}ŠFv */
+	$"66ED F001 0FEB F02F 556E 4D59 9E81 A288"            /* fíð..ëð/UnMYž¢ˆ */
+	$"A072 887A 9987 8E90 809A 8A7F 8F83 847D"            /*  rˆz™‡Ž€šŠ.ƒ„} */
+	$"7000 1919 1817 0019 E6F7 E4FF A501 080F"            /* p.......æ÷äÿ¥... */
+	$"1418 1917 0F01 000B FE10 2312 1012 1718"            /* ........þ.#..... */
+	$"191B 1E00 2C7D 7D79 7882 757A 7E77 7384"            /* ....,}}yx‚uz~ws„ */
+	$"7276 7673 7772 786E 846D 8162 5373 50D8"            /* rvvswrxn„mbSsPØ */
+	$"F056 5E76 535D 9E83 A78A A274 8A7C 9B89"            /* ðV^vS]žƒ§Š¢tŠ|›‰ */
+	$"9092 829C 8C81 9185 867F 861E 3735 312C"            /* ’‚œŒ‘…†.†.751, */
+	$"204E F2FE F0FF BE20 2930 3539 3A38 3022"            /*  Nòþðÿ¾ )059:80" */
+	$"212C 3131 2F2D 2E2D 2D2F 3133 352B 5F7F"            /* !,11/-.--/135+_. */
+	$"7F7B 7A84 777C 8079 7586 7478 7875 7974"            /* .{z„w|€yu†txxuyt */
+	$"7A70 866F 8468 5C7D 54D8 F01F 6078 545E"            /* zp†o„h\}TØð.`xT^ */
+	$"9C80 A389 A173 897B 9A88 8F91 8199 897E"            /* œ€£‰¡s‰{šˆ‘™‰~ */
+	$"8E82 837C A250 615E 5950 5491 FDFF 32E0"            /* Ž‚ƒ|¢Pa^YPT‘ýÿ2à */
+	$"4C57 5E63 6768 665E 504F 5A5F 5E5B 555B"            /* LW^cghf^POZ_^[U[ */
+	$"5452 5557 5A5A 669A 7C7C 7877 8174 797D"            /* TRUWZZfš||xwty} */
+	$"7470 816F 7375 7476 7177 6F85 6E82 665B"            /* tposutvqwo…n‚f[ */
+	$"7E53 EEF0 010F EBF0 5664 6149 869C 958B"            /* ~Sîð..ëðVdaI†œ•‹ */
+	$"8795 718A 7AA6 848B 8B81 9382 888C 767B"            /* ‡•qŠz¦„‹‹“‚ˆŒv{ */
+	$"7400 1919 1818 0020 EEFA E3FF B900 0C14"            /* t...... îúãÿ¹... */
+	$"1313 0F0E 0E0F 1110 0F0F 1614 0026 1504"            /* .............&.. */
+	$"1515 1619 1D00 1F83 7B79 887E 7978 836F"            /* .......ƒ{yˆ~yxƒo */
+	$"7C7B 7585 6E74 6C76 7770 7C81 704A 7356"            /* |{u…ntlvwp|pJsV */
+	$"D8F0 256D 694F 8A9C 9790 8997 738C 7CA8"            /* Øð%miOŠœ—‰—sŒ|¨ */
+	$"868D 8D83 9584 8A8E 787D 8C1F 3B38 3431"            /* †ƒ•„ŠŽx}Œ.;841 */
+	$"224F F8FF EFFF C91E 2AFE 312D 302F 2F30"            /* "OøÿïÿÉ.*þ1-0//0 */
+	$"3131 302E 292C 2D55 361D 2A2B 2C2F 342B"            /* 110.),-U6.*+,/4+ */
+	$"5285 7D7B 8A80 7B7A 8571 7E7D 7787 7076"            /* R…}{Š€{z…q~}w‡pv */
+	$"6E78 7972 7E83 7450 7B5C D8F0 1E6F 6B50"            /* nxyr~ƒtP{\Øð.okP */
+	$"8B9A 948C 8896 728B 7BA7 858C 8C82 9281"            /* ‹š”Œˆ–r‹{§…ŒŒ‚’ */
+	$"878B 757A A751 6461 5C55 558E FDFF 33DE"            /* ‡‹uz§Qda\UUŽýÿ3Þ */
+	$"5156 5D5E 5F5E 5D5D 5E5E 5F5D 594B 546C"            /* QV]^_^]]^^_]YKTl */
+	$"8E65 444E 5052 565A 648C 827A 7887 7D78"            /* ŽeDNPRVZdŒ‚zx‡}x */
+	$"7780 6C79 7872 846F 756D 7778 717D 8171"            /* w€lyxr„oumwxq}q */
+	$"4E7B 5CEE F001 16EC F02A 5573 5082 7EA1"            /* N{\îð..ìð*UsP‚~¡ */
+	$"839D 829B 6C89 74A3 8691 8F7D 9086 788D"            /* ƒ‚›l‰t£†‘}†x */
+	$"7776 0018 1918 1703 217B 7EE7 F5B2 000A"            /* wv......!{~çõ². */
+	$"130D 0F10 11FE 152A 1415 160F 0002 5680"            /* .....þ.*......V€ */
+	$"A802 0013 1315 181D 0225 7677 8978 7B80"            /* ¨........%vw‰x{€ */
+	$"7B71 7F73 7776 737E 6D79 6677 687F 7463"            /* {q.swvs~myfwh.tc */
+	$"576A 55DA F058 5B7C 5888 82A1 85A2 849D"            /* WjUÚðX[|Xˆ‚¡…¢„ */
+	$"6E8B 76A5 8893 917F 9288 7A8F 7990 243E"            /* n‹v¥ˆ“‘.’ˆzy$> */
+	$"3B37 3325 4C7D 80F1 FEC4 1B1F 2527 2B2C"            /* ;73%L}€ñþÄ..%'+, */
+	$"2D2C 2C2B 2926 282A 2D40 8182 AA1C 1526"            /* -,,+)&(*-@‚ª..& */
+	$"272A 3137 2C53 7879 8B7A 7D82 7D73 8175"            /* '*17,Sxy‹z}‚}su */
+	$"7978 757F 6E7A 6879 6A81 7667 5D71 58DA"            /* yxu.nzhyjvg]qXÚ */
+	$"F058 5F7E 5A89 829F 829E 839C 6D8A 75A4"            /* ðX_~Z‰‚Ÿ‚žƒœmŠu¤ */
+	$"8792 907E 8F85 778C 76AC 5668 645F 5854"            /* ‡’~…wŒv¬Vhd_XT */
+	$"847C 7FFF FFDD 5645 414F 5355 5753 524E"            /* „|.ÿÿÝVEAOSUWSRN */
+	$"4A45 4854 6D8E B681 A749 3C4A 4B50 5860"            /* JEHTmŽ¶§I<JKPX` */
+	$"6187 7576 8877 7A7F 786E 7C70 7475 7481"            /* a‡uvˆwz.xn|ptut */
+	$"707C 6778 697E 7164 5B73 59EF F001 16EC"            /* p|gxi~qd[sYïð..ì */
+	$"F002 616D 39FE 9052 8D91 8A91 7F85 7894"            /* ð.am9þR‘Š‘.…x” */
+	$"8E8E 8889 8282 7F81 6C00 1819 1717 062B"            /* ŽŽˆ‰‚‚.l......+ */
+	$"7D78 7DEE FD9A 2A0B 0307 0C0D 0E0F 0E0D"            /* }x}îýš*......... */
+	$"0A06 0323 6692 8382 82A8 0D00 1112 1519"            /* Â..#f’ƒ‚‚¨...... */
+	$"1D01 2380 837F 7B85 7E73 7D77 7876 7877"            /* ..#€ƒ.{…~s}wxvxw */
+	$"7573 736F 7073 6F71 4A6F 48DA F058 6A72"            /* ussopsoqJoHÚðXjr */
+	$"3E93 9292 8F93 8C93 8186 7995 8F8F 898A"            /* >“’’“Œ“†y•‰Š */
+	$"8384 8183 8929 403D 3936 2950 7F7A 7FF5"            /* ƒ„ƒ‰)@=96)P.z.õ */
+	$"FFB1 563E 2E28 2623 2123 2329 2E32 4161"            /* ÿ±V>.(&#!##).2Aa */
+	$"9394 8382 82AA 2813 2528 2E35 3B2D 4F80"            /* “”ƒ‚‚ª(.%(.5;-O€ */
+	$"837F 7B85 8075 7F79 7A78 7A79 7674 7571"            /* ƒ.{…€u.yzxzyvtuq */
+	$"7274 6F74 4E79 4EDA F04C 6B75 4193 9191"            /* rtotNyNÚðLkuA“‘‘ */
+	$"8E92 8B92 8088 7B97 9191 8B8C 8583 7E82"            /* Ž’‹’€ˆ{—‘‘‹Œ…ƒ~‚ */
+	$"A75D 6C67 635C 577F 7F77 7CFF FFCE 9587"            /* §]lgc\W..w|ÿÿΕ‡ */
+	$"6B5B 5348 4545 4857 6574 93AD C691 8180"            /* k[SHEEHWet“­Æ‘€ */
+	$"80A7 533E 464D 555E 6460 817E 817D 7983"            /* €§S>FMU^d`~}yƒ */
+	$"7B70 7A75 7775 77FE 7808 7470 7173 6D74"            /* {pzuwuwþx.tpqsmt */
+	$"4F7B 50EF F001 19ED F059 726F 5B4D A97A"            /* O{Pïð..íðYro[M©z */
+	$"9791 9286 9D7D 8A67 9C7C A182 7697 7B78"            /* —‘’†}Šgœ|¡‚v—{x */
+	$"6F00 1718 1716 0730 8B79 807F 7D7D 8985"            /* o......0‹y€.}}‰… */
+	$"927B 603D 241A 1623 3557 7092 888B 8376"            /* ’{`=$..#5Wp’ˆ‹ƒv */
+	$"7C7F 7DA8 1300 1214 1719 1C02 1B90 817A"            /* |.}¨.........z */
+	$"8A7A 6C8F 7874 7877 7B70 8169 6F6A 746C"            /* Šzlxtxw{piojtl */
+	$"7146 6F5D DBF0 597D 795F 51A9 7A99 9394"            /* qFo]ÛðY}y_Q©z™“” */
+	$"889F 7F8B 689D 7DA2 8377 987D 788E 2C42"            /* ˆŸ.‹h}¢ƒw˜}xŽ,B */
+	$"403C 352F 568D 7B82 817F 7F8B 8794 A08C"            /* @<5/V{‚..‹‡” Œ */
+	$"705D 5554 6173 8EA0 948A 8D83 767D 7F7D"            /* p]UTasŽ ”Šƒv}.} */
+	$"AA35 1A25 2D33 393E 2F48 9081 7A8A 7C6E"            /* ª5.%-39>/HzŠ|n */
+	$"917A 767A 797D 7282 6B71 6C75 6C74 4A79"            /* ‘zvzy}r‚kqlultJy */
+	$"63DB F059 7D7A 6353 AA7A 9892 9387 9E7E"            /* cÛðY}zcSªz˜’“‡ž~ */
+	$"8D6A 9F7F A485 799A 7C76 AC60 6F6B 665C"            /* jŸ.¤…yš|v¬`okf\ */
+	$"6184 8C7A 7F7F 7D7C 8884 91D3 C7B6 AAA5"            /* a„Œz..}|ˆ„‘ÓǶª¥ */
+	$"A6B4 C4D5 DC91 898B 8174 7B7E 7BA7 6647"            /* ¦´ÄÕÜ‘‰‹t{~{§fG */
+	$"4752 5B62 6762 798E 7F78 8878 698C 7573"            /* GR[bgbyŽ.xˆxiŒus */
+	$"7776 7A71 846A 706B 736A 744B 7B66 EFF0"            /* wvzq„jpksjtK{fïð */
+	$"0110 EDF0 284C 6E4C 769B 8995 8A89 8894"            /* ..íð(LnLv›‰•Š‰ˆ” */
+	$"8385 727F 8789 7F7D 8687 6B00 1718 1614"            /* ƒ…r.‡‰.}†‡k..... */
+	$"0935 7E83 7E7B 7D81 8685 887F 7F81 FAFF"            /* Æ5~ƒ~{}†…ˆ..úÿ */
+	$"2A83 8188 8682 7C84 7E82 7E81 2B00 1315"            /* *ƒˆ†‚|„~‚~+... */
+	$"1718 1A04 2A81 8180 7D7F 847B 777F 747A"            /* ....*€}.„{w.tz */
+	$"7178 7074 6F73 706D 5A57 6759 DCF0 285A"            /* qxptospmZWgYÜð(Z */
+	$"7B4F 779A 8797 8C8B 8A96 8586 7380 888A"            /* {Owš‡—Œ‹Š–…†s€ˆŠ */
+	$"807E 8789 8D30 4442 3E35 3862 7F85 7F7D"            /* €~‡‰0DB>58b.….} */
+	$"7F83 8887 8A81 8183 FA00 2A85 838A 8882"            /* .ƒˆ‡Šƒú.*…ƒŠˆ‚ */
+	$"7D84 7E82 7E81 5123 2932 373C 3F32 5381"            /* }„~‚~Q#)27<?2S */
+	$"8180 7F81 867D 7981 767C 737A 7276 7174"            /* €.†}yv|szrvqt */
+	$"706F 5E61 6D5D DCF0 285A 7C53 7B9B 8896"            /* po^am]Üð(Z|S{›ˆ– */
+	$"8B8A 8995 8488 7582 8A8C 8280 8988 AC65"            /* ‹Š‰•„ˆu‚ŠŒ‚€‰ˆ¬e */
+	$"716F 695D 7199 7F84 7F7A 7C80 8584 877E"            /* qoi]q™.„.z|€…„‡~ */
+	$"7E80 FA00 1284 8289 8681 7B82 7C80 7C7F"            /* ~€ú..„‚‰†{‚|€|. */
+	$"8B59 4C59 6065 6964 FE7F 147E 7A7C 8178"            /* ‹YLY`eidþ..~z|x */
+	$"767E 7377 7079 7175 7072 6E6F 5F63 705E"            /* v~swpyquprno_cp^ */
+	$"F0F0 0110 EDF0 285E 6A43 918F 9E81 9785"            /* ðð..íð(^jC‘ž—… */
+	$"868E 868D 7485 798D 6F78 881A 0716 1716"            /* †Ž†t…yoxˆ..... */
+	$"120C 3C86 807F 7979 7F81 8485 8F87 8485"            /* ..<†€.yy.„…‡„… */
+	$"FAFF 2A8A 8586 8484 7D86 897F 717F 8B36"            /* úÿ*Š…†„„}†‰.q.‹6 */
+	$"0413 1517 181B 0588 757D 8C7C 7983 767D"            /* .......ˆu}Œ|yƒv} */
+	$"747E 7076 766C 776F 6C6B 654F 6C52 DCF0"            /* t~pvvlwolkeOlRÜð */
+	$"286B 7648 948F 9E83 9987 8890 888F 7586"            /* (kvH”žƒ™‡ˆˆu† */
+	$"7A8E 7079 894D 3F47 4440 3740 6F88 8281"            /* zŽpy‰M?GD at 7@oˆ‚ */
+	$"7B7B 8083 8687 9189 8687 FA00 2A8C 8788"            /* {{€ƒ†‡‘‰†‡ú.*Œ‡ˆ */
+	$"8686 7D85 897F 717F 8B65 302D 3539 3D43"            /* ††}…‰.q.‹e0-59=C */
+	$"2988 757D 8C7C 7A84 787F 7680 7278 786E"            /* )ˆu}Œ|z„x.v€rxxn */
+	$"7971 6E6D 6858 7256 DCF0 286B 774B 9790"            /* yqnmhXrVÜð(kwK— */
+	$"9E82 9886 878F 878F 7689 7D90 727B 8B82"            /* ž‚˜†‡‡v‰}r{‹‚ */
+	$"7375 716C 5E7C B287 8180 7A78 7E80 8384"            /* suql^|²‡€zx~€ƒ„ */
+	$"8E86 8384 FA00 2A8A 8687 8583 7B83 877D"            /* Ž†ƒ„ú.*Š†‡…ƒ{ƒ‡} */
+	$"6F7D 89A4 6C50 5D62 686E 5686 737B 8A79"            /* o}‰¤lP]bhnV†s{Šy */
+	$"7781 757C 737D 6F75 776D 786F 6D6C 675C"            /* wu|s}ouwmxomlg\ */
+	$"7559 F0F0 0110 EDF0 2863 634B 7A9D 8C8D"            /* uYðð..íð(ccKzŒ */
+	$"8789 7E98 8091 6588 758D 737C 877E 0016"            /* ‡‰~˜€‘eˆus|‡~.. */
+	$"1612 0D3F 7A77 7C84 7B84 827B 7F7E 8781"            /* ...?zw|„{„‚{.~‡ */
+	$"8883 FAFF 2A8A 8889 8586 8284 837C 8286"            /* ˆƒúÿ*Šˆ‰…†‚„ƒ|‚† */
+	$"868C 4107 1214 1601 2F89 757E 8B7A 7E7F"            /* †ŒA...../‰u~‹z~. */
+	$"7A7F 757E 737A 7074 7675 6C74 654A 6E51"            /* z.u~szptvulteJnQ */
+	$"DCF0 2871 7050 7E9D 8C8F 898B 809A 8293"            /* Üð(qpP~Œ‰‹€š‚“ */
+	$"6689 768E 747D 8896 1E46 4439 4278 7C79"            /* f‰vŽt}ˆ–.FD9Bx|y */
+	$"7E86 7D86 847D 8080 8983 8A85 FA00 2A8C"            /* ~†}†„}€€‰ƒŠ…ú.*Œ */
+	$"8A8B 8788 8283 837C 8286 868C 7639 2F37"            /* Š‹‡ˆ‚ƒƒ|‚††Œv9/7 */
+	$"3D22 4889 757E 8B7A 7E7F 7C81 7780 757C"            /* ="H‰u~‹z~.|w€u| */
+	$"7276 7877 6E76 6753 7455 DCF0 2871 7153"            /* rvxwnvgStUÜð(qqS */
+	$"809E 8C8E 888A 7F99 8192 678D 7990 767F"            /* €žŒŽˆŠ.™’gyv. */
+	$"8AB2 5775 7160 7EBC 7B78 7D85 7C83 817A"            /* Š²Wuq`~¼{x}…|ƒz */
+	$"7E7E 8681 8782 FA00 2A8B 898A 8685 8081"            /* ~~†‡‚ú.*‹‰Š†…€ */
+	$"817A 8084 848A B878 5260 684E 6C87 737C"            /* z€„„Š¸xR`hNl‡s| */
+	$"8978 7C7D 797E 747D 7279 7175 7776 6D75"            /* ‰x|}y~t}ryquwvmu */
+	$"6657 7757 F0F0 0110 EDF0 286C 536C 978B"            /* fWwWðð..íð(lSl—‹ */
+	$"9981 937C 888A 8B82 7570 787C 7283 7678"            /* ™“|ˆŠ‹‚upx|rƒvx */
+	$"6900 1410 3979 8286 7C7B 7D7D 8480 7F7E"            /* i...9y‚†|{}}„€.~ */
+	$"7D81 8981 FAFF 2A89 8685 8A81 7D84 8585"            /* }‰úÿ*‰†…Š}„…… */
+	$"817C 8589 894F 0B14 0106 7880 8479 8183"            /* |…‰‰O....x€„yƒ */
+	$"7A82 7E7A 7878 7B72 7D6B 756C 766F 6C4A"            /* z‚~zxx{r}kulvolJ */
+	$"6B5B DCF0 287A 6071 9A8B 9983 957E 8A8C"            /* k[Üð(z`qš‹™ƒ•~ŠŒ */
+	$"8D84 7771 797D 7384 7778 7B13 414A 767B"            /* „wqy}s„wx{.AJv{ */
+	$"8488 7E7D 7F7F 8682 8180 7F83 8B83 FA00"            /* „ˆ~}..†‚€.ƒ‹ƒú. */
+	$"2A8B 8887 8C83 7D83 8585 817C 8589 8985"            /* *‹ˆ‡Œƒ}ƒ……|…‰‰… */
+	$"4336 1F22 7880 8479 8183 7A82 807C 7A7A"            /* C6."x€„yƒz‚€|zz */
+	$"7D74 7F6D 776E 7871 6E52 715F DCF0 2879"            /* }t.mwnxqnRq_Üð(y */
+	$"6174 9D8C 9982 947D 898B 8C83 7775 7C7F"            /* atŒ™‚”}‰‹Œƒwu|. */
+	$"7586 7976 9744 6D8A BF7A 8387 7D7C 7E7C"            /* u†yv—DmŠ¿zƒ‡}|~| */
+	$"837F 7E7D 7C80 8880 FA00 2A89 8786 8A80"            /* ƒ.~}|€ˆ€ú.*‰‡†Š€ */
+	$"7B81 8383 7F7A 8387 87C7 895E 494A 767E"            /* {ƒƒ.zƒ‡‡Ç‰^IJv~ */
+	$"8277 7F81 7880 7D79 7777 7A71 7E6C 766D"            /* ‚w.x€}ywwzq~lvm */
+	$"7770 6D57 7461 F0F0 0116 EEF0 296B 724B"            /* wpmWtaðð..îð)krK */
+	$"7997 84A3 779D 7989 8D79 956C 7A71 836B"            /* y—„£wy‰y•lzqƒk */
+	$"847A 7878 5C00 4C88 777B 8B7F 817D 6E82"            /* „zxx\.Lˆw{‹.}n‚ */
+	$"8085 8185 7E84 82FA FF2B 8983 868C 7F79"            /* €……~„‚úÿ+‰ƒ†Œ.y */
+	$"8086 8880 8385 978A 8669 0B15 7878 8184"            /* €†ˆ€ƒ…—Š†i..xx„ */
+	$"7886 8175 8879 7F73 7E76 7281 6878 6A72"            /* x†uˆy.s~vrhxjr */
+	$"686A 5068 5F71 DEF0 2970 7F57 7E9B 84A3"            /* hjPh_qÞð)p.W~›„£ */
+	$"799F 7B8A 8F7B 976D 7B72 846D 857B 7878"            /* yŸ{Š{—m{r„m…{xx */
+	$"6D20 828A 797D 8D81 837F 7084 8287 8387"            /* m ‚Šy}ƒ.p„‚‡ƒ‡ */
+	$"8086 84FA 002B 8B85 888E 8179 7F86 8880"            /* €†„ú.+‹…ˆŽy.†ˆ€ */
+	$"8385 978A 869A 312A 7878 8184 7886 8175"            /* ƒ…—Š†š1*xx„x†u */
+	$"887B 8175 8078 7483 6A7A 6C74 6A6C 596E"            /* ˆ{u€xtƒjzltjlYn */
+	$"6370 DEF0 2971 7F58 819E 85A3 789E 7B8A"            /* cpÞð)q.Xž…£xž{Š */
+	$"8E7A 966E 7F74 856E 877D 7676 864F C289"            /* Žz–n.t…n‡}vv†O‰ */
+	$"787C 8C80 827E 6D81 7F83 8084 7D84 81FA"            /* x|Œ€‚~m.ƒ€„}„ú */
+	$"002B 8984 878C 7E77 7D84 867E 8183 9588"            /* .+‰„‡Œ~w}„†~ƒ•ˆ */
+	$"84D9 694D 7676 7F82 7684 7F73 8678 7E72"            /* „ÙiMvv.‚v„.s†x~r */
+	$"7D75 7182 6979 6B73 696B 5D71 656F F1F0"            /* }uq‚iyksik]qeoñð */
+	$"0113 EEF0 295A 7645 7685 8688 828D 8187"            /* ..îð)ZvEv…†ˆ‚‡ */
+	$"8887 8477 736E 7879 7C7B 7B78 7E7C 7F80"            /* ˆ‡„wsnxy|{{x~|.€ */
+	$"7D81 847F 7E7E 7D81 8281 8087 8683 83FA"            /* }„.~~}‚€‡†ƒƒú */
+	$"FF04 8785 8086 84FD 8222 8885 848B 7F7F"            /* ÿ.‡…€†„ý‚"ˆ…„‹.. */
+	$"7B80 8583 8283 8382 7D7F 7C84 7B76 7F78"            /* {€…ƒ‚ƒƒ‚}.|„{v.x */
+	$"7675 7671 736D 716F 694B 6863 6BDE F029"            /* vuvqsmqoiKhckÞð) */
+	$"5F83 527B 8987 8884 8F82 8889 8886 7975"            /* _ƒR{‰‡ˆ„‚ˆ‰ˆ†yu */
+	$"707A 7B7E 7D7D 7880 7E81 827F 8386 8180"            /* pz{~}}x€~‚.ƒ†€ */
+	$"807F 8384 8382 8987 8485 FA00 0489 8782"            /* €.ƒ„ƒ‚‰‡„…ú..‰‡‚ */
+	$"8886 FD84 228A 8584 8B7F 7F7B 8085 8382"            /* ˆ†ý„"Š…„‹..{€…ƒ‚ */
+	$"8383 827D 7F7C 847D 7881 7A78 7778 7375"            /* ƒƒ‚}.|„}xzxwxsu */
+	$"6F73 716A 546E 6769 DEF0 295F 8352 7E8C"            /* osqjTngiÞð)_ƒR~Œ */
+	$"8788 818E 848A 8B8A 8578 746F 797A 7D7C"            /* ‡ˆŽ„Š‹Š…xtoyz}| */
+	$"7C76 7F7D 8081 7E82 8580 7F7F 7C80 817E"            /* |v.}€~‚…€..|€~ */
+	$"7F88 8886 83FA 0004 8684 7F85 83FD 8122"            /* .ˆˆ†ƒú..†„.…ƒý" */
+	$"8783 8289 7D7D 797E 8381 8081 8180 7B7D"            /* ‡ƒ‚‰}}y~ƒ€€{} */
+	$"7A82 7A75 7E77 7574 7772 746D 7071 6C56"            /* z‚zu~wutwrtmpqlV */
+	$"706A 6AF1 F001 16EE F029 5868 416B 9672"            /* pjjñð..îð)XhAk–r */
+	$"8D79 A069 8F84 8466 8169 7274 7485 6F86"            /* y i„„firtt…o† */
+	$"7174 8F78 7383 8A7E 7D74 837F 8A8C 7983"            /* qtxsƒŠ~}tƒ.ŠŒyƒ */
+	$"8387 8583 FAFF 2B8F 8C81 8A81 8583 967E"            /* ƒ‡…ƒúÿ+ŒŠ…ƒ–~ */
+	$"757F 8282 8C88 787B 8D8E 7E7A 8683 6F88"            /* u.‚‚Œˆx{Ž~z†ƒoˆ */
+	$"7A82 8071 7E74 8169 8369 7E60 7C67 654C"            /* z‚€q~tiƒi~`|geL */
+	$"6566 68DE F029 5D76 4E70 9973 8D7B A26A"            /* efhÞð)]vNp™s{¢j */
+	$"9085 8568 836B 7476 7687 7188 7376 917A"            /* ……hƒktvv‡qˆsv‘z */
+	$"7585 8C80 7F76 8581 8C8E 7B85 8488 8685"            /* u…Œ€.v…ŒŽ{…„ˆ†… */
+	$"FA00 2B91 8E83 8C83 8785 9880 777F 8282"            /* ú.+‘ŽƒŒƒ‡…˜€w.‚‚ */
+	$"8C88 787B 8D8E 7E7A 8683 6F88 7A83 8273"            /* Œˆx{Ž~z†ƒoˆzƒ‚s */
+	$"8076 836B 856B 8062 7E68 6656 6B6A 66DE"            /* €vƒk…k€b~hfVkjfÞ */
+	$"F029 5D76 4F73 9C73 8D78 A16C 9287 8767"            /* ð)]vOsœsx¡l’‡‡g */
+	$"826A 7375 7586 7087 7275 9079 7484 8B7F"            /* ‚jsuu†p‡ruyt„‹. */
+	$"7E75 847E 898B 7884 868A 8883 FA00 2B8E"            /* ~u„~‰‹x„†Šˆƒú.+Ž */
+	$"8B80 8980 8482 957D 747D 8080 8A86 7679"            /* ‹€‰€„‚•}t}€€Š†vy */
+	$"8B8C 7C78 8481 6D86 7880 7F70 7D73 8068"            /* ‹Œ|x„m†x€.p}s€h */
+	$"846A 7F60 7B68 6857 6E6D 67F1 F001 12EE"            /* „j.`{hhWnmgñð..î */
+	$"F029 5874 456B 877D 887E 897D 827F 8377"            /* ð)XtEk‡}ˆ~‰}‚.ƒw */
+	$"836A 6F77 727E 7481 7A79 7F7F 7E7E 8080"            /* ƒjowr~tzy..~~€€ */
+	$"7D7D 8285 847F 7981 8582 8784 FAFF 1685"            /* }}‚…„.y…‚‡„úÿ.… */
+	$"838C 8A86 8586 8984 8080 858A 8388 8688"            /* ƒŒŠ†…†‰„€€…Šƒˆ†ˆ */
+	$"7D8A 8081 837F FD80 107E 797C 797A 7277"            /* }Š€ƒ.ý€.~y|yzrw */
+	$"6F75 6C6D 6763 4D66 6867 DEF0 295D 8252"            /* oulmgcMfhgÞð)]‚R */
+	$"708B 7D88 808B 7E83 8084 7985 6C71 7974"            /* p‹}ˆ€‹~ƒ€„y…lqyt */
+	$"8076 837C 7B81 8180 8082 827F 7F84 8786"            /* €vƒ|{€€‚‚..„‡† */
+	$"817B 8286 8388 86FA 0016 8785 8E8C 8887"            /* {‚†ƒˆ†ú..‡…ŽŒˆ‡ */
+	$"888B 8682 8085 8A83 8886 887D 8A80 8183"            /* ˆ‹†‚€…Šƒˆ†ˆ}Š€ƒ */
+	$"7FFC 800F 7B7E 7B7C 7479 7177 6E6F 6864"            /* .ü€.{~{|tyqwnohd */
+	$"576C 6C65 DEF0 295E 8252 738D 7E88 7D8A"            /* WlleÞð)^‚Rs~ˆ}Š */
+	$"8085 8286 7884 6B70 7873 7F75 827B 7A80"            /* €…‚†x„kpxs.u‚{z€ */
+	$"807F 7F81 817E 7E83 8483 7E7A 848A 868A"            /* €..~~ƒ„ƒ~z„Š†Š */
+	$"85FA 0016 8482 8B89 8584 8588 837F 7E83"            /* …ú..„‚‹‰…„…ˆƒ.~ƒ */
+	$"8881 8684 867B 887E 7F81 7DFD 7E10 7D78"            /* ˆ†„†{ˆ~.}ý~.}x */
+	$"7B78 7971 7870 766C 6C68 6658 6E6F 66F1"            /* {xyqxpvllhfXnofñ */
+	$"F001 13EE F029 5578 4B65 7782 7D84 7B7E"            /* ð..îð)UxKew‚}„{~ */
+	$"8A71 7E6A 875E 6D6C 8377 7381 767C 877D"            /* Šq~j‡^mlƒwsv|‡} */
+	$"7F81 8380 8583 8386 8488 8484 8884 8685"            /* .ƒ€…ƒƒ†„ˆ„„ˆ„†… */
+	$"FAFF 098C 8882 8F86 8785 8488 8CFD 831D"            /* úÿÆŒˆ‚†‡…„ˆŒýƒ. */
+	$"7E8B 8671 898A 7F80 8B7F 7F80 7686 747E"            /* ~‹†q‰Š.€‹..€v†t~ */
+	$"7479 7976 746F 6C6B 6C60 4B6A 666B DEF0"            /* tyyvtolkl`KjfkÞð */
+	$"295B 8557 697B 827D 857C 7F8B 727F 6B89"            /* )[…Wi{‚}…|.‹r.k‰ */
+	$"606F 6E85 7975 8378 7E89 7F81 8385 8287"            /* `on…yuƒx~‰.ƒ…‚‡ */
+	$"8585 8886 8A86 8689 8587 87FA 0009 8E8A"            /* ……ˆ†Š††‰…‡‡ú.ÆŽŠ */
+	$"8491 8889 8786 8A8E FD83 1D7E 8B86 7189"            /* „‘ˆ‰‡†ŠŽýƒ.~‹†q‰ */
+	$"8A7F 808B 7F7F 8076 8876 8076 7B7B 7876"            /* Š.€‹..€vˆv€v{{xv */
+	$"716E 6D6D 6155 716A 69DE F029 5688 5D6D"            /* qnmmaUqjiÞð)Vˆ]m */
+	$"7E84 7D87 7E81 8D74 816D 895D 6D6D 8478"            /* ~„}‡~tm‰]mm„x */
+	$"7482 777D 887E 8082 8481 8684 8485 8387"            /* t‚w}ˆ~€‚„†„„…ƒ‡ */
+	$"8384 8B87 8986 FA00 098B 8781 8E85 8684"            /* ƒ„‹‡‰†ú.Æ‹‡Ž…†„ */
+	$"8387 8BFD 811D 7C89 846F 8788 7D7E 897D"            /* ƒ‡‹ý.|‰„o‡ˆ}~‰} */
+	$"7D7E 7485 737D 7378 7877 7570 6D6C 7065"            /* }~t…s}sxxwupmlpe */
+	$"5470 6B6D F1F0 0116 EEF0 295B 7650 5D74"            /* Tpkmñð..îð)[vP]t */
+	$"7E81 7F79 7E7F 7677 717E 6E70 6783 7870"            /* ~.y~.vwq~npgƒxp */
+	$"7F7A 7A81 8180 7E81 8782 8985 8685 8484"            /* .zz€~‡‚‰…†…„„ */
+	$"817F 8385 86FA FF2B 8887 8889 8A8C 8883"            /* .ƒ…†úÿ+ˆ‡ˆ‰ŠŒˆƒ */
+	$"878A 837F 8982 8386 7F80 8189 7C84 8680"            /* ‡Šƒ.‰‚ƒ†.€‰|„†€ */
+	$"8082 7B82 7D7B 7B77 757E 706E 6F68 6864"            /* €‚{‚}{{wu~pnohhd */
+	$"4D6E 6572 DEF0 2960 845C 6177 7E81 807A"            /* MnerÞð)`„\aw~€z */
+	$"7F80 7778 7280 7072 6985 7A72 817C 7C83"            /* .€wxr€pri…zr||ƒ */
+	$"8382 8083 8984 8B87 8887 8686 8380 8486"            /* ƒ‚€ƒ‰„‹‡ˆ‡††ƒ€„† */
+	$"88FA 002B 8A89 8A8B 8C8E 8A85 898C 837F"            /* ˆú.+Š‰Š‹ŒŽŠ…‰Œƒ. */
+	$"8982 8386 7F80 8189 7C84 8680 8082 7B84"            /* ‰‚ƒ†.€‰|„†€€‚{„ */
+	$"7F7D 7D79 7780 7270 716A 6965 5775 6970"            /* .}}yw€rpqjieWuip */
+	$"DEF0 295C 8662 677C 8283 827C 8182 797A"            /* Þð)\†bg|‚ƒ‚|‚yz */
+	$"7480 6D70 6884 7971 807B 7B82 8281 7F82"            /* t€mph„yq€{{‚‚.‚ */
+	$"8883 8A86 8584 8383 8182 8688 86FA 002B"            /* ˆƒŠ†…„ƒƒ‚†ˆ†ú.+ */
+	$"8786 8788 898B 8782 8689 817D 8780 8184"            /* ‡†‡ˆ‰‹‡‚†‰}‡€„ */
+	$"7D7E 7F87 7A82 847E 7E80 7981 7C7A 7A76"            /* }~.‡z‚„~~€y|zzv */
+	$"747F 716F 7069 6B69 5674 6A74 F1F0 0113"            /* t.qopikiVtjtñð.. */
+	$"EEF0 2961 7953 566B 7E73 8674 8477 8177"            /* îð)aySVk~s†t„ww */
+	$"7375 7168 6E77 7381 7A81 7E78 7F85 817F"            /* suqhnwsz~x.…. */
+	$"8384 897F 8181 8486 8584 8588 87FA FF2A"            /* ƒ„‰.„†…„…ˆ‡úÿ* */
+	$"878D 8991 8781 847B 8D90 8687 8C8B 857F"            /* ‡‰‘‡„{†‡Œ‹…. */
+	$"8788 8581 8882 7E8B 7F83 8375 7F74 7A76"            /* ‡ˆ…ˆ‚~‹.ƒƒu.tzv */
+	$"7C71 716F 6E68 625A 4E72 5BDD F029 6687"            /* |qqonhbZNr[Ýð)f‡ */
+	$"5F5A 6E7E 7287 7585 7882 7874 7673 6A70"            /* _Zn~r‡u…x‚xtvsjp */
+	$"7975 837C 8380 7A81 8783 8185 868B 8183"            /* yuƒ|ƒ€z‡ƒ…†‹ƒ */
+	$"8386 8887 8586 8989 FA00 2A89 8F8B 9389"            /* ƒ†ˆ‡…†‰‰ú.*‰‹“‰ */
+	$"8386 7D8F 9286 878C 8B85 7F87 8885 8188"            /* ƒ†}’†‡Œ‹….‡ˆ…ˆ */
+	$"827E 8B7F 8383 7781 767C 787E 7373 7170"            /* ‚~‹.ƒƒwv|x~ssqp */
+	$"6A63 5B58 785F DDF0 1F62 8A65 6175 8377"            /* jc[Xx_Ýð.bŠeauƒw */
+	$"8977 877A 847A 7676 7068 6F78 7482 7B82"            /* ‰w‡z„zvvphoxt‚{‚ */
+	$"7F79 8086 8280 8485 8AFE 8006 8385 8587"            /* .y€†‚€„…Šþ€.ƒ……‡ */
+	$"888B 87FA 002A 868C 8890 8680 837A 8C8F"            /* ˆ‹‡ú.*†Œˆ†€ƒzŒ */
+	$"8485 8A89 837D 8586 837F 8680 7C89 7D81"            /* „…Š‰ƒ}…†ƒ.†€|‰} */
+	$"8174 7E73 7975 7B72 7270 6F69 665F 5778"            /* t~syu{rrpoif_Wx */
+	$"60F0 F001 13EE F029 717F 614E 607C 5886"            /* `ðð..îð)q.aN`|X† */
+	$"6980 7382 7368 7968 6464 7766 8476 7581"            /* i€s‚shyhddwf„vu */
+	$"7D81 897E 857E 8487 8386 8283 8286 8B85"            /* }‰~…~„‡ƒ†‚ƒ‚†‹… */
+	$"8A84 FAFF 2A91 8A81 8A89 8086 7B81 8B8D"            /* Š„úÿ*‘ŠŠ‰€†{‹ */
+	$"848A 8483 808E 8984 818D 737B 937C 7D88"            /* „Š„ƒ€Ž‰„s{“|}ˆ */
+	$"727E 7480 7286 6975 656C 635D 5852 7155"            /* r~t€r†iuelc]XRqU */
+	$"DDF0 2977 886C 505E 7B58 8A6D 8474 8374"            /* Ýð)wˆlP^{XŠm„tƒt */
+	$"6C7D 6C68 687B 6A85 7877 837F 838B 8087"            /* l}lhh{j…xwƒ.ƒ‹€‡ */
+	$"8086 8985 8884 8584 888D 878C 86FA 002A"            /* €†‰…ˆ„…„ˆ‡Œ†ú.* */
+	$"918A 818A 8B82 887D 838D 8D84 8A84 8380"            /* ‘ŠŠ‹‚ˆ}ƒ„Š„ƒ€ */
+	$"8E89 8481 8D73 7B93 7C7D 8874 8076 8072"            /* Ž‰„s{“|}ˆt€v€r */
+	$"8669 7669 6D61 5D59 5D7A 59DD F029 778A"            /* †ivima]Y]zYÝð)wŠ */
+	$"715B 6983 5D8D 7087 7685 766D 7E6D 6969"            /* q[iƒ]p‡v…vm~mii */
+	$"7C6B 8777 7480 7C80 887D 847D 8386 8285"            /* |k‡wt€|€ˆ}„}ƒ†‚… */
+	$"8182 8387 8C85 8983 FA00 2A8F 887F 8888"            /* ‚ƒ‡Œ…‰ƒú.*ˆ.ˆˆ */
+	$"7F85 7A80 8A8B 8288 8281 7E8C 8782 7F8B"            /* .…z€Š‹‚ˆ‚~Œ‡‚.‹ */
+	$"7179 917A 7B86 717D 737E 7084 6775 6A70"            /* qy‘z{†q}s~p„gujp */
+	$"6661 5D5E 7C5A F0F0 0113 EEF0 0A92 8176"            /* fa]^|Zðð..îðÂ’v */
+	$"4856 656F 7A72 7871 FE76 1B6F 7968 6875"            /* HVeozrxqþv.oyhhu */
+	$"7180 7A79 8182 7F82 807F 8782 7F83 7E82"            /* q€zy‚.‚€.‡‚.ƒ~‚ */
+	$"8385 878D 8788 89FA FF2A 8688 8685 8384"            /* ƒ…‡‡ˆ‰úÿ*†ˆ†…ƒ„ */
+	$"8584 8381 898A 8986 8285 8487 8487 847C"            /* …„ƒ‰Š‰†‚…„‡„‡„| */
+	$"847E 837F 7D7F 7A7B 7D77 7371 7566 625B"            /* „~ƒ.}.z{}wsqufb[ */
+	$"554C 5970 4DDD F029 8E81 7A4F 5E6D 787E"            /* ULYpMÝð)ŽzO^mx~ */
+	$"767C 7277 777A 737D 6C6C 7975 817C 7B83"            /* v|rwwzs}llyu|{ƒ */
+	$"8481 8482 8189 8481 8580 8485 8789 8F89"            /* „„‚‰„…€„…‡‰‰ */
+	$"8A8B FA00 2A86 8886 8585 8687 8685 8389"            /* Š‹ú.*†ˆ†……†‡†…ƒ‰ */
+	$"8A89 8682 8584 8784 8784 7C84 7E83 7F7E"            /* Š‰†‚…„‡„‡„|„~ƒ.~ */
+	$"817C 7D7D 7773 7176 6A67 625F 5864 7851"            /* |}}wsqvjgb_XdxQ */
+	$"DDF0 298F 857F 5865 737A 8179 7F74 7979"            /* Ýð)….Xeszy.tyy */
+	$"7B74 7E6D 6D7A 7683 7B78 8081 7E81 7F7E"            /* {t~mmzvƒ{x€~.~ */
+	$"8681 7E82 7D81 8285 878D 8787 88FA 002A"            /* †~‚}‚…‡‡‡ˆú.* */
+	$"8486 8483 8283 8483 8280 8788 8784 8083"            /* „†„ƒ‚ƒ„ƒ‚€‡ˆ‡„€ƒ */
+	$"8285 8285 827A 827C 817D 7B7E 797A 7B75"            /* ‚…‚…‚z‚|}{~yz{u */
+	$"716F 756B 6964 6058 667A 52F0 F000 ECEE"            /* qoukid`XfzRðð.ìî */
+	$"F022 B074 844B 4C66 697E 6A80 6F69 6883"            /* ð"°t„KLfi~j€oihƒ */
+	$"648F 5A6D 5D86 7F71 9273 8083 876D 7C93"            /* dZm]†.q’s€ƒ‡m|“ */
+	$"827C 7B78 7CED FF24 8181 7F79 8880 908F"            /* ‚|{x|íÿ$.yˆ€ */
+	$"9A80 838D 8A7D 8390 8377 8E7A 8A81 767A"            /* š€ƒŠ}ƒƒwŽzŠvz */
+	$"7381 6E7B 6C69 5F56 4846 606B 47DD F022"            /* sn{li_VHF`kGÝð" */
+	$"AC73 8753 556F 7382 6E84 736D 6C87 6893"            /* ¬s‡SUos‚n„sml‡h“ */
+	$"5E71 618A 8073 9475 8285 896F 7E95 847E"            /* ^qaŠ€s”u‚…‰o~•„~ */
+	$"7D7A 7EED 0024 8383 817B 8880 908F 9A80"            /* }z~í.$ƒƒ{ˆ€š€ */
+	$"838D 8A7D 8390 8377 8E7A 8A83 787C 7381"            /* ƒŠ}ƒƒwŽzŠƒx|s */
+	$"6E7B 6D6D 655E 5352 6B73 4BDD F022 AB75"            /* n{mme^SRksKÝð"«u */
+	$"8B5A 5C74 7585 7187 746E 6D88 6994 5F72"            /* ‹Z\tu…q‡tnmˆi”_r */
+	$"628B 8272 9172 7F82 866C 7B92 817B 7A77"            /* b‹‚r‘r.‚†l{’{zw */
+	$"7BED 0024 8080 7E78 867E 8E8D 987E 818B"            /* {í.$€€~x†~Ž˜~‹ */
+	$"887B 818E 8175 8C78 8880 7579 717F 6C79"            /* ˆ{ŽuŒxˆ€uyq.ly */
+	$"6C6E 6660 5452 6D75 4CF0 F000 E9ED F021"            /* lnf`TRmuLðð.éíð! */
+	$"6983 5948 5364 776C 7467 7071 7A6F 7570"            /* iƒYHSdwltgpqzoup */
+	$"6668 7777 7C84 817E 7F86 807F 8982 7F86"            /* fhww|„~.†€.‰‚.† */
+	$"8086 EDFF 2489 8682 8687 8C8D 8490 8384"            /* €†íÿ$‰†‚†‡Œ„ƒ„ */
+	$"8587 8282 8787 847E 7E7D 8478 7D77 7F6D"            /* …‡‚‚‡‡„~~}„x}w.m */
+	$"796D 695E 564E 4C69 5D66 DCF0 216C 8A5F"            /* ymi^VNLi]fÜð!lŠ_ */
+	$"4D59 697B 7078 6C75 767E 7379 746A 6C7B"            /* MYi{pxluv~sytjl{ */
+	$"797E 8583 8081 8882 818B 8481 8882 88ED"            /* y~…ƒ€ˆ‚‹„ˆ‚ˆí */
+	$"0024 8A88 8488 878C 8D84 9083 8485 8782"            /* .$Šˆ„ˆ‡Œ„ƒ„…‡‚ */
+	$"8287 8784 7E7E 7D86 7A7F 777F 6D79 6F6D"            /* ‚‡‡„~~}†z.w.myom */
+	$"615B 5455 7465 6ADC F021 6C8D 6755 5F6E"            /* a[TUtejÜð!lgU_n */
+	$"7E73 7B6D 7576 7F74 7A75 6B6D 7C7A 7D82"            /* ~s{muv.tzukm|z}‚ */
+	$"807D 7E85 7F7E 8881 7E85 7F85 ED00 2488"            /* €}~….~ˆ~….…í.$ˆ */
+	$"8581 8585 8A8B 828E 8182 8385 8080 8585"            /* ………Š‹‚Ž‚ƒ…€€…… */
+	$"827C 7C7B 8377 7C74 7C6A 776D 6E63 5E57"            /* ‚||{ƒw|t|jwmnc^W */
+	$"5676 676B F0F0 00EC EDF0 2266 876F 404E"            /* Vvgkðð.ìíð"f‡o at N */
+	$"5973 7568 7867 7A6D 736D 7468 6577 747F"            /* Ysuhxgzmsmthewt. */
+	$"787C 897D 7E88 827E 817E 8381 7F8B EFFF"            /* x|‰}~ˆ‚~~ƒ.‹ïÿ */
+	$"248C 918A 888D 8B89 8688 8B86 8982 8583"            /* $Œ‘Šˆ‹‰†ˆ‹†‰‚…ƒ */
+	$"8084 877F 7E85 7A7F 7B7E 7975 7375 6A61"            /* €„‡.~…z.{~yusuja */
+	$"5C4F 5058 6D51 DBF0 2266 8A75 4755 6077"            /* \OPXmQÛð"fŠuGU`w */
+	$"796C 7C6B 7E71 7771 786C 697B 7881 787E"            /* yl|k~qwqxli{xx~ */
+	$"8B7F 808A 8480 8380 8583 818D EF00 248C"            /* ‹.€Š„€ƒ€…ƒï.$Œ */
+	$"918C 8A8F 8B89 8688 8B86 8982 8583 8084"            /* ‘ŒŠ‹‰†ˆ‹†‰‚…ƒ€„ */
+	$"877F 7E85 7A81 7D80 7A76 7475 6C65 6054"            /* ‡.~…z}€zvtule`T */
+	$"5862 7757 DBF0 2268 907B 4D5B 667A 7C6F"            /* XbwWÛð"h{M[fz|o */
+	$"7D6C 7F72 7872 796D 6A7C 7980 767B 887C"            /* }l.rxrymj|y€v{ˆ| */
+	$"7D87 817D 807D 8280 7E8A EF00 248A 8F89"            /* }‡}€}‚€~Šï.$Š‰ */
+	$"878C 8987 8486 8984 8780 8381 7E82 857D"            /* ‡Œ‰‡„†‰„‡€ƒ~‚…} */
+	$"7C83 787E 7A7D 7571 6F73 6A66 6257 5A63"            /* |ƒx~z}uqosjfbWZc */
+	$"795A EFF0 00EC EDF0 2291 7D7C 5340 526E"            /* yZïð.ìíð"‘}|S at Rn */
+	$"7668 6B67 706F 7170 7363 6974 7B7D 7180"            /* vhkgpoqpscit{}q€ */
+	$"867D 758B 897A 8180 8884 828E EFFF 248C"            /* †}u‹‰z€ˆ„‚Žïÿ$Œ */
+	$"8F93 8B95 858C 7A83 8A8B 8E7E 828A 8376"            /* “‹•…ŒzƒŠ‹Ž~‚Šƒv */
+	$"8A80 8488 737C 7985 7079 6E76 6867 5A4F"            /* Š€„ˆs|y…pynvhgZO */
+	$"5165 6E4A DBF0 2291 8183 5A47 5972 7A6C"            /* QenJÛð"‘ƒZGYrzl */
+	$"6F6B 7473 7574 7767 6D78 7F7F 7182 887F"            /* oktsutwgmx..q‚ˆ. */
+	$"778D 8B7C 8382 8A86 8490 EF00 248C 8F95"            /* w‹|ƒ‚Š†„ï.$Œ• */
+	$"8D97 858C 7A83 8A8B 8E7E 828A 8376 8A80"            /* —…ŒzƒŠ‹Ž~‚ŠƒvŠ€ */
+	$"8488 747E 7B87 717A 6F76 696B 5E54 596F"            /* „ˆt~{‡qzovik^TYo */
+	$"764E DBF0 2293 8689 604D 5F75 7D6F 706C"            /* vNÛð"“†‰`M_u}opl */
+	$"7574 7675 7868 6E79 807E 6F7F 857C 748A"            /* utvuxhny€~o.…|tŠ */
+	$"8879 807F 8783 818D EF00 248A 8D92 8A94"            /* ˆy€.‡ƒï.$Š’Š” */
+	$"838A 7881 8889 8C7C 8088 8174 887E 8286"            /* ƒŠxˆ‰Œ|€ˆtˆ~‚† */
+	$"717B 7884 6C75 6A74 676C 6057 5B70 7851"            /* q{x„lujtgl`W[pxQ */
+	$"EFF0 00EF ECF0 2264 8959 464C 676C 6A69"            /* ïð.ïìð"d‰YFLglji */
+	$"6B72 6F6E 7571 686E 7076 797E 7F7B 8186"            /* kronuqhnpvy~.{† */
+	$"7B7D 8886 8385 8485 8886 F1FF 2589 8B89"            /* {}ˆ†ƒ…„…ˆ†ñÿ%‰‹‰ */
+	$"8687 878A 8A8B 8889 8583 8A87 8088 8881"            /* †‡‡ŠŠ‹ˆ‰…ƒŠ‡€ˆˆ */
+	$"8287 8184 7C7F 7678 7470 7069 6153 515A"            /* ‚‡„|.vxtppiaSQZ */
+	$"735D 63DA F022 6890 604D 536B 706E 6D6F"            /* s]cÚð"h`MSkpnmo */
+	$"7673 7279 756C 7274 7A7B 7E81 7D83 887D"            /* vsryulrtz{~}ƒˆ} */
+	$"7F8A 8885 8786 878A 88F1 0025 898B 8988"            /* .Šˆ…‡†‡Šˆñ.%‰‹‰ˆ */
+	$"8989 8A8A 8B88 8985 838A 8780 8888 8182"            /* ‰‰ŠŠ‹ˆ‰…ƒŠ‡€ˆˆ‚ */
+	$"8781 847E 8178 7975 7170 6A65 5756 627D"            /* ‡„~xyuqpjeWVb} */
+	$"6365 DAF0 226D 9666 5358 6E73 716E 7077"            /* ceÚð"m–fSXnsqnpw */
+	$"7473 7A76 6D73 757B 7A7C 7E7A 8085 7A7C"            /* tszvmsu{z|~z€…z| */
+	$"8785 8284 8384 8785 F100 2587 8987 8586"            /* ‡…‚„ƒ„‡…ñ.%‡‰‡…† */
+	$"8688 8889 8687 8381 8885 7E86 867F 8085"            /* †ˆˆ‰†‡ƒˆ…~††.€… */
+	$"7F82 7B7E 7574 706C 6E69 6659 5964 7E66"            /* .‚{~utplnifYYd~f */
+	$"68EF F000 EFEC F023 6C80 7E47 475A 6D6A"            /* hïð.ïìð#l€~GGZmj */
+	$"7163 7372 7268 7A6E 6F5C 7B79 7C7F 7688"            /* qcsrrhzno\{y|.vˆ */
+	$"7E7C 7D87 8684 818A 8986 8786 F2FF 248B"            /* ~|}‡†„Š‰†‡†òÿ$‹ */
+	$"8786 8789 8A87 888A 8B8F 8283 918B 7F81"            /* ‡†‡‰Š‡ˆŠ‹‚ƒ‘‹. */
+	$"8E7E 8581 7D88 797B 727D 7176 6666 534F"            /* Ž~…}ˆy{r}qvffSO */
+	$"576B 7A4B D9F0 236E 8787 504F 5E72 6E77"            /* WkzKÙð#n‡‡PO^rnw */
+	$"6774 7374 6C7F 7273 607F 7B7C 8178 8A80"            /* gtstl.rs`.{|xŠ€ */
+	$"7E7F 8988 8683 8C8B 8889 88F2 0024 8D89"            /* ~.‰ˆ†ƒŒ‹ˆ‰ˆò.$‰ */
+	$"8889 8B8C 8788 8A8B 8F82 8391 8B7F 818E"            /* ˆ‰‹Œ‡ˆŠ‹‚ƒ‘‹.Ž */
+	$"7E85 817D 897B 7D74 7F73 7868 6A58 555B"            /* ~…}‰{}t.sxhjXU[ */
+	$"6F7E 51D9 F023 738E 8E57 5662 756F 7768"            /* o~QÙð#sŽŽWVbuowh */
+	$"7675 766D 7F73 7461 807A 7A7E 7587 7D7B"            /* vuvm.sta€zz~u‡}{ */
+	$"7C86 8583 8089 8885 8685 F200 248A 8685"            /* |†…ƒ€‰ˆ…†…ò.$Š†… */
+	$"8688 8985 8688 898D 8081 8F89 7D7F 8C7C"            /* †ˆ‰…†ˆ‰€‰}.Œ| */
+	$"837F 7B87 787A 717C 7075 676A 5B58 5E6F"            /* ƒ.{‡xzq|pugj[X^o */
+	$"7D4F EEF0 00F2 ECF0 23AF 6786 5F45 5263"            /* }Oîð.òìð#¯g†_ERc */
+	$"6B65 6E68 756D 746F 7766 6976 7A7D 7B7F"            /* kenhumtowfivz}{. */
+	$"7F82 8381 7E85 8388 878B 8985 86F3 FF25"            /* .‚ƒ~…ƒˆ‡‹‰…†óÿ% */
+	$"818C 8B89 8388 8B84 8688 8988 8B8C 8886"            /* Œ‹‰ƒˆ‹„†ˆ‰ˆ‹Œˆ† */
+	$"8887 8084 8583 8080 7B7D 7D74 756F 695F"            /* ˆ‡€„…ƒ€€{}}tuoi_ */
+	$"544A 5876 6356 D9F0 23AF 6F90 684E 5869"            /* TJXvcVÙð#¯ohNXi */
+	$"736B 7269 7670 7874 7B6A 6D7A 7C7D 7D81"            /* skrivpxt{jmz|}} */
+	$"8184 8583 8087 858A 898D 8B87 88F3 0025"            /* „…ƒ€‡…Š‰‹‡ˆó.% */
+	$"838E 8D8B 858A 8D84 8688 8988 8B8C 8886"            /* ƒŽ‹…Š„†ˆ‰ˆ‹Œˆ† */
+	$"8887 8084 8583 8080 7D7F 7F76 7771 6E66"            /* ˆ‡€„…ƒ€€}..vwqnf */
+	$"5C55 6583 715E D9F0 11B3 7293 6C52 5B6C"            /* \Ueƒq^Ùð.³r“lR[l */
+	$"726B 736B 7871 7974 7C6B 6EFE 7B0E 7A7E"            /* rkskxqyt|knþ{.z~ */
+	$"7E81 8280 7D84 8287 868A 8884 85F3 0025"            /* ~‚€}„‚‡†Šˆ„…ó.% */
+	$"808B 8A88 8287 8A82 8486 8786 898A 8684"            /* €‹Šˆ‚‡Š‚„†‡†‰Š†„ */
+	$"8685 7E82 8381 7E7E 7A7C 7C73 746E 6C65"            /* †…~‚ƒ~~z||stnle */
+	$"5E56 6580 6C52 EEF0 00EF EBF0 1F68 887D"            /* ^Ve€lRîð.ïëð.hˆ} */
+	$"4A4A 5F6E 5E73 5F7B 667B 6284 5F70 6D81"            /* JJ_n^s_{f{b„_pm */
+	$"737A 837A 7985 847D 8982 848F 86FE 8800"            /* szƒzy…„}‰‚„†þˆ. */
+	$"8DF4 FF24 868B 8B87 8588 8E85 8586 8787"            /* ôÿ$†‹‹‡…ˆŽ……†‡‡ */
+	$"938E 8082 8D8C 7B92 7C83 8679 7E78 876E"            /* “Ž€‚Œ{’|ƒ†y~x‡n */
+	$"756D 655E 4E4F 6D72 45D7 F01F 6F92 8754"            /* ume^NOmrE×ð.o’‡T */
+	$"5369 7864 7760 7C69 7F67 8863 7471 8373"            /* Sixdw`|i.gˆctqƒs */
+	$"7C85 7C7B 8786 7F8B 8486 9188 FE8A 008F"            /* |…|{‡†.‹„†‘ˆþŠ. */
+	$"F400 2488 8D8D 8987 8A90 8585 8687 8793"            /* ô.$ˆ‰‡Š……†‡‡“ */
+	$"8E80 828D 8C7B 927C 8386 7980 7A89 7077"            /* Ž€‚Œ{’|ƒ†y€z‰pw */
+	$"6F6B 6758 5A77 7D50 D7F0 1F71 9388 5555"            /* okgXZw}P×ð.q“ˆUU */
+	$"6A77 6478 627E 6A80 6889 6475 7282 7179"            /* jwdxb~j€h‰dur‚qy */
+	$"8279 7884 837C 8881 838E 85FE 8700 8CF4"            /* ‚yx„ƒ|ˆƒŽ…þ‡.Œô */
+	$"0024 858A 8A86 8487 8D83 8384 8585 918C"            /* .$…ŠŠ†„‡ƒƒ„……‘Œ */
+	$"7E80 8B8A 7990 7A81 8477 7D77 866D 746C"            /* ~€‹Šyz„w}w†mtl */
+	$"6966 595B 787B 4CED F000 EFEA F022 688C"            /* ifY[x{Líð.ïêð"hŒ */
+	$"6946 5F65 646A 666E 6671 697C 626C 707A"            /* iF_edjfnfqi|blpz */
+	$"787D 7E7E 8082 8681 847F 878A 8687 8684"            /* x}~~€‚†„.‡Š†‡†„ */
+	$"88F5 FF06 878B 8A85 8A8C 8CFE 8A1B 8589"            /* ˆõÿ.‡‹Š…ŠŒŒþŠ.…‰ */
+	$"878D 8D8B 8686 8A83 8A82 7F84 7E7D 7E7C"            /* ‡‹††ŠƒŠ‚.„~}~| */
+	$"736F 6A63 6044 617C 6169 D6F0 226D 9676"            /* sojc`Da|aiÖð"m–v */
+	$"4E67 6D6A 6F68 746C 776E 8066 7074 7C78"            /* Ngmjohtlwn€fpt|x */
+	$"7F80 8082 8488 8386 8189 8C88 8988 868A"            /* .€€‚„ˆƒ†‰Œˆ‰ˆ†Š */
+	$"F500 2589 8D8C 878C 8E8E 8C8A 8A85 8987"            /* õ.%‰Œ‡ŒŽŽŒŠŠ…‰‡ */
+	$"8D8D 8B86 868A 838A 827F 847E 7F80 7E75"            /* ‹††ŠƒŠ‚.„~.€~u */
+	$"7370 6765 4C6C 8664 69D6 F022 6E98 7750"            /* spgeLl†diÖð"n˜wP */
+	$"696F 6A70 6A74 6C77 6F81 6771 757B 767C"            /* iojpjtlwogqu{v| */
+	$"7D7D 7F81 8580 837E 8689 8586 8583 87F5"            /* }}.…€ƒ~†‰…†…ƒ‡õ */
+	$"0025 868A 8984 898B 8B89 8888 8387 858B"            /* .%†Š‰„‰‹‹‰ˆˆƒ‡…‹ */
+	$"8B89 8484 8881 8880 7D82 7C7C 7D7B 7272"            /* ‹‰„„ˆˆ€}‚||}{rr */
+	$"7068 674E 6E87 6265 EDF0 00EF EAF0 2378"            /* phgNn‡beíð.ïêð#x */
+	$"8587 615C 5E64 6271 6271 6371 6D71 6478"            /* …‡a\^dbqbqcqmqdx */
+	$"7082 797F 8187 797B 8E87 8B81 7F84 8789"            /* p‚y.‡y{Ž‡‹.„‡‰ */
+	$"8688 86F6 FF24 8E8F 8C8C 8887 8985 8E89"            /* †ˆ†öÿ$ŽŒŒˆ‡‰…Ž‰ */
+	$"938E 9689 888B 8B82 8188 8582 897D 867C"            /* “Ž–‰ˆ‹‹‚ˆ…‚‰}†| */
+	$"7F6E 786B 6E67 5754 776D 4ED5 F023 7B8D"            /* .nxkngWTwmNÕð#{ */
+	$"916B 6668 6D68 7568 7769 7671 7568 7C72"            /* ‘kfhmhuhwivquh|r */
+	$"827B 8183 897B 7D90 898D 8381 8689 8B88"            /* ‚{ƒ‰{}‰ƒ†‰‹ˆ */
+	$"8A88 F600 2490 918E 8E8A 898B 878E 8993"            /* Šˆö.$‘ŽŽŠ‰‹‡Ž‰“ */
+	$"8E96 8988 8B8B 8281 8885 8289 7D87 7E81"            /* Ž–‰ˆ‹‹‚ˆ…‚‰}‡~ */
+	$"707A 6F74 6B5D 5D82 7550 D5F0 237B 8E92"            /* pzotk]]‚uPÕð#{Ž’ */
+	$"6C67 696C 6876 6877 6976 7276 697D 7180"            /* lgilhvhwivrvi}q€ */
+	$"787E 8086 787A 8D86 8A80 7E83 8688 8587"            /* x~€†xz†Š€~ƒ†ˆ…‡ */
+	$"85F6 0024 8D8E 8B8B 8786 8884 8C87 918C"            /* …ö.$Ž‹‹‡†ˆ„Œ‡‘Œ */
+	$"9487 8689 8980 7F86 8380 877B 857B 7E6D"            /* ”‡†‰‰€.†ƒ€‡{…{~m */
+	$"776E 746C 5F5F 8477 4EEC F000 ECE9 F022"            /* wntl__„wNìð.ìéð" */
+	$"6695 815B 565B 5A6F 606F 5C72 6B7C 5879"            /* f•[V[Zo`o\rk|Xy */
+	$"7282 7776 8183 7B7B 8E87 8885 8184 8482"            /* r‚wvƒ{{Ž‡ˆ…„„‚ */
+	$"8684 87F7 FF24 878B 8988 8E8F 8685 8088"            /* †„‡÷ÿ$‡‹‰ˆŽ†…€ˆ */
+	$"8D8F 9290 8183 8E8A 8588 8C84 8589 7489"            /* ’ƒŽŠ…ˆŒ„…‰t‰ */
+	$"7F80 717B 666D 6459 747D 51D3 F022 699B"            /* .€q{fmdYt}QÓð"i› */
+	$"8D67 6266 6475 6675 6277 6F80 5C7D 7482"            /* gbfdufubwo€\}t‚ */
+	$"7978 8385 7D7D 9089 8A87 8386 8684 8886"            /* yxƒ…}}‰Š‡ƒ††„ˆ† */
+	$"89F7 0024 898D 8B8A 9091 8887 8288 8D8F"            /* ‰÷.$‰‹Š‘ˆ‡‚ˆ */
+	$"9290 8183 8E8A 8588 8C84 8589 7489 8182"            /* ’ƒŽŠ…ˆŒ„…‰t‰‚ */
+	$"737D 6A73 685E 7C86 56D3 F022 699B 8D67"            /* s}jsh^|†VÓð"i›g */
+	$"6265 6375 6675 6278 7081 5D7E 7380 7675"            /* becufubxp]~s€vu */
+	$"8082 7A7A 8D86 8784 8083 8381 8583 86F7"            /* €‚zz†‡„€ƒƒ…ƒ†÷ */
+	$"0024 868A 8887 8D8E 8584 7F86 8B8D 908E"            /* .$†Šˆ‡Ž…„.†‹Ž */
+	$"7F81 8C88 8386 8A82 8387 7287 7E7F 707A"            /* .Œˆƒ†Š‚ƒ‡r‡~.pz */
+	$"6973 6960 7E89 59EB F000 EFE9 F023 9D6B"            /* isi`~‰Yëð.ïéð#k */
+	$"9575 5C55 605E 6C67 676C 706D 6564 7575"            /* •u\U`^lgglpmeduu */
+	$"7D80 7E7F 8486 8183 8685 8985 8383 8684"            /* }€~.„†ƒ†…‰…ƒƒ†„ */
+	$"8887 F8FF 0E89 8687 898A 8A89 8788 8889"            /* ˆ‡øÿ.‰†‡‰ŠŠ‰‡ˆˆ‰ */
+	$"9186 8984 FE88 128D 8681 8689 8284 7D7C"            /* ‘†‰„þˆ.††‰‚„}| */
+	$"797B 746C 685F 6F83 5D63 D3F0 239D 6DA0"            /* y{tlh_oƒ]cÓð#m  */
+	$"8067 5F6A 6774 6F6D 7175 726A 6978 777F"            /* €g_jgtomqurjixw. */
+	$"8280 8186 8883 8588 878B 8785 8588 868A"            /* ‚€†ˆƒ…ˆ‡‹‡……ˆ†Š */
+	$"89F8 0024 8B88 898B 8C8C 8B89 8A88 8991"            /* ‰ø.$‹ˆ‰‹ŒŒ‹‰Šˆ‰‘ */
+	$"8689 8488 8889 8D87 8287 8983 847D 7C7B"            /* †‰„ˆˆ‰‡‚‡‰ƒ„}|{ */
+	$"7F76 706D 6475 8A64 65D3 F023 9D6E A07F"            /* .vpmduŠdeÓð#n . */
+	$"665E 6966 736E 6D71 7673 6B69 7774 7D80"            /* f^ifsnmqvskiwt}€ */
+	$"7E7E 8385 8082 8584 8884 8282 8583 8685"            /* ~~ƒ…€‚…„ˆ„‚‚…ƒ†… */
+	$"F800 2488 8586 8889 8988 8687 8687 8F84"            /* ø.$ˆ…†ˆ‰‰ˆ†‡†‡„ */
+	$"8782 8686 8589 837F 8386 7F83 7C7B 797D"            /* ‡‚††…‰ƒ.ƒ†.ƒ|{y} */
+	$"7470 6F64 758B 6668 EBF0 00EC E8F0 2272"            /* tpodu‹fhëð.ìèð"r */
+	$"7B9C 7750 675A 7960 7161 7469 7159 7E6F"            /* {œwPgZy`qatiqY~o */
+	$"787E 7785 7F7F 8484 8788 8D85 8787 8A8A"            /* x~w…..„„‡ˆ…‡‡ŠŠ */
+	$"8986 F9FF 068C 8D7F 7F83 8986 FE87 1A8A"            /* ‰†ùÿ.Œ..ƒ‰†þ‡.Š */
+	$"8985 8582 8A8C 8E84 8E8C 8387 8A79 8872"            /* ‰……‚ŠŒŽ„ŽŒƒ‡Šyˆr */
+	$"8B6F 736C 7558 6C86 6C4E D1F0 2273 84A5"            /* ‹osluXl†lNÑð"s„¥ */
+	$"8159 7063 8369 7766 7A6F 775F 8271 7A80"            /* Ypcƒiwfzow_‚qz€ */
+	$"7987 8181 8686 898A 8F87 8989 8C8C 8B88"            /* y‡††‰Š‡‰‰ŒŒ‹ˆ */
+	$"F900 068E 8F81 8185 8B88 FE89 1A8A 8985"            /* ù..Ž…‹ˆþ‰.Š‰… */
+	$"8582 8A8C 8E85 8F8E 8589 8B7A 8872 8B71"            /* …‚ŠŒŽ…Ž…‰‹zˆr‹q */
+	$"7770 7B60 728C 7253 D1F0 2273 83A4 8058"            /* wp{`rŒrSÑð"sƒ¤€X */
+	$"6F62 8268 7767 7A6F 775F 816E 797F 7884"            /* ob‚hwgzow_ny.x„ */
+	$"7E7E 8383 8687 8C84 8686 8989 8783 F900"            /* ~~ƒƒ†‡Œ„††‰‰‡ƒù. */
+	$"068B 8C7E 7E82 8885 FE86 1A88 8783 8380"            /* .‹Œ~~‚ˆ…þ†.ˆ‡ƒƒ€ */
+	$"888A 8C80 8989 8084 8676 8772 8B70 766F"            /* ˆŠŒ€‰‰€„†v‡r‹pvo */
+	$"7B62 728C 7253 EAF0 00E9 E7F0 226E 8697"            /* {brŒrSêð.éçð"n†— */
+	$"765C 5C67 6469 6670 706D 6171 777B 7D7C"            /* v\\gdifppmaqw{}| */
+	$"7F7E 7D7D 8385 8484 8385 8787 8483 8785"            /* .~}}ƒ…„„ƒ…‡‡„ƒ‡… */
+	$"FAFF 2385 8582 8283 8586 8987 8884 8884"            /* úÿ#……‚‚ƒ…†‰‡ˆ„ˆ„ */
+	$"8582 8786 8985 8786 8382 867F 857E 7C77"            /* …‚‡†‰…‡†ƒ‚†.…~|w */
+	$"7270 6C6D 8774 49CF F022 6F8F A37F 6565"            /* rplm‡tIÏð"o£.ee */
+	$"716D 6F6B 7676 7367 7579 7D7F 7E81 807F"            /* qmokvvsguy}.~€. */
+	$"7F85 8786 8685 8789 8986 8589 87FA 0023"            /* .…‡††…‡‰‰†…‰‡ú.# */
+	$"8787 8484 8587 888B 898A 8488 8485 8287"            /* ‡‡„„…‡ˆ‹‰Š„ˆ„…‚‡ */
+	$"8689 8688 8885 8487 8085 7E7C 7976 7675"            /* †‰†ˆˆ…„‡€…~|yvvu */
+	$"768D 7A4F CFF0 2271 8EA1 7E64 6470 6C6F"            /* vzOÏð"qŽ¡~ddplo */
+	$"6C76 7673 6774 767C 7E7D 7F7D 7C7C 8284"            /* lvvsgtv|~}.}||‚„ */
+	$"8383 8284 8686 8382 8482 FA00 2383 8481"            /* ƒƒ‚„††ƒ‚„‚ú.#ƒ„ */
+	$"8182 8485 8886 8782 8682 8380 8584 8781"            /* ‚„…ˆ†‡‚†‚ƒ€…„‡ */
+	$"8283 807F 827C 857E 7C78 7574 7477 8A77"            /* ‚ƒ€.‚|…~|xuttwŠw */
+	$"4CE9 F000 E6E6 F021 598C 9C6D 6A59 6962"            /* Léð.ææð!YŒœmjYib */
+	$"6E69 765F 695F 7A76 8280 7C7F 8689 807F"            /* niv_i_zv‚€|.†‰€. */
+	$"7F81 8588 8687 8684 8781 FBFF 237E 807D"            /* .…ˆ†‡†„‡ûÿ#~€} */
+	$"8487 8184 847D 817C 8383 7F86 8589 887F"            /* „‡„„}|ƒƒ.†…‰ˆ. */
+	$"828A 7F7C 8A7B 8A7E 817F 796A 6B6B 8B77"            /* ‚Š.|Š{Š~.yjkk‹w */
+	$"4DCD F021 5F9B A576 7363 7268 736F 7C65"            /* MÍð!_›¥vscrhso|e */
+	$"6E63 7C78 8482 7E81 888B 8281 8183 878A"            /* nc|x„‚~ˆ‹‚ƒ‡Š */
+	$"8889 8886 8983 FB00 2380 827F 8689 8386"            /* ˆ‰ˆ†‰ƒû.#€‚.†‰ƒ† */
+	$"867F 837E 8383 7F86 8589 887F 838B 817E"            /* †.ƒ~ƒƒ.†…‰ˆ.ƒ‹~ */
+	$"8C7C 8B7E 817F 7B6E 7474 977D 53CD F021"            /* Œ|‹~.{ntt—}SÍð! */
+	$"5F98 A475 7262 7168 746F 7C65 6F62 7977"            /* _˜¤urbqhto|eobyw */
+	$"8381 7B7E 8588 7F7E 7E80 8487 8586 8582"            /* ƒ{~…ˆ.~~€„‡…†…‚ */
+	$"847E FB00 237B 7E7C 8386 8083 837C 807B"            /* „~û.#{~|ƒ†€ƒƒ|€{ */
+	$"8181 7D84 8387 867D 7E85 7C79 8777 867D"            /* }„ƒ‡†}~…|y‡w†} */
+	$"817F 7A6D 7173 9779 4FE8 F000 E0E5 F014"            /* .zmqs—yOèð.àåð. */
+	$"5890 A281 5764 616A 6871 6D61 6273 7A78"            /* X¢Wdajhqmabszx */
+	$"7B7D 807E 7FFD 8205 8384 8182 8181 FE82"            /* {}€~.ý‚.ƒ„‚þ‚ */
+	$"FCFF 2380 807F 7F80 7E7D 807C 7F7F 8481"            /* üÿ#€€..€~}€|..„ */
+	$"8282 8181 8481 8283 8283 8080 7E80 7976"            /* ‚‚„‚ƒ‚ƒ€€~€yv */
+	$"7665 748B 7D47 46CC F014 5C98 AB8C 616D"            /* vet‹}GFÌð.\˜«Œam */
+	$"676E 6E77 7367 6675 7C7A 7D7F 8280 81FD"            /* gnnwsgfu|z}.‚€ý */
+	$"8405 8586 8384 8383 FE84 FC00 2382 8281"            /* „.…†ƒ„ƒƒþ„ü.#‚‚ */
+	$"8182 807F 827E 8181 8481 8282 8181 8483"            /* ‚€.‚~„‚‚„ƒ */
+	$"8485 8485 8282 8082 7A78 7A6B 7F93 8150"            /* „…„…‚‚€‚zxzk.“P */
+	$"4CCC F014 5D97 AA8B 606C 676F 6E77 7367"            /* LÌð.]—ª‹`lgonwsg */
+	$"6572 7B79 7C7D 7F7D 7EFD 8105 8283 8081"            /* er{y|}.}~ý.‚ƒ€ */
+	$"8080 FE81 FC00 237F 7F7E 7E7F 7D7C 7F7B"            /* €€þü.#..~~.}|.{ */
+	$"7E7E 827F 8080 7F7F 8280 8182 7F80 7D80"            /* ~~‚.€€..‚€‚.€}€ */
+	$"7F81 7A77 7969 7B92 844F 4BE8 F000 E9E5"            /* .zwyi{’„OKèð.éå */
+	$"F01B 5957 90A4 8862 6364 6E68 7064 6571"            /* ð.YW¤ˆbcdnhpdeq */
+	$"7B75 7D7D 7F7C 7E81 8180 8180 8282 FE80"            /* {u}}.|~€€‚‚þ€ */
+	$"027E 817E FDFF 0281 7E7B FE7A 1E80 7D7D"            /* .~~ýÿ.~{þz.€}} */
+	$"797B 7A7F 7E7E 7F7D 7E80 8180 817C 877D"            /* y{z.~~.}~€€|‡} */
+	$"7A80 777C 7166 7A93 7849 474E CCF0 1B5A"            /* z€w|qfz“xIGNÌð.Z */
+	$"5C97 AD92 6B69 6974 6E76 6A69 737D 777F"            /* \—­’kiitnvjis}w. */
+	$"7F81 7E80 8383 8283 8284 84FE 8202 8083"            /* .~€ƒƒ‚ƒ‚„„þ‚.€ƒ */
+	$"80FD 0002 8380 7DFE 7C1E 827F 7F7B 7D7C"            /* €ý..ƒ€}þ|.‚..{}| */
+	$"7F7E 7E7F 7D7E 8083 8283 7E89 7F7C 8279"            /* .~~.}~€ƒ‚ƒ~‰.|‚y */
+	$"7E75 6C82 9E80 4D4D 52CC F01B 5C5D 96AC"            /* ~ul‚ž€MMRÌð.\]–¬ */
+	$"916A 6969 746E 766A 6870 7C76 7E7D 7E7B"            /* ‘jiitnvjhp|v~}~{ */
+	$"7D80 807F 807F 8181 FE7F 027D 807D FD00"            /* }€€.€.þ..}€}ý. */
+	$"0280 7D7A FE79 1E7F 7C7C 787A 797D 7C7C"            /* .€}zþy..||xzy}|| */
+	$"7D7B 7C7E 807F 807B 867C 7B81 787D 746A"            /* }{|~€.€{†|{x}tj */
+	$"7F9A 7F50 4D52 E8F0 00EC E5F0 2770 5457"            /* .š.PMRèð.ìåð'pTW */
+	$"87B2 9A6A 656E 6A6B 6661 6C78 727E 7A7E"            /* ‡²šjenjkfalxr~z~ */
+	$"7A7A 7F7E 7D7F 807F 7E7E 7D7B 7C7B 7D7C"            /* zz.~}.€.~~}{|{}| */
+	$"FFFF 7B7E 7AFE 791F 787C 7F7A 797A 787B"            /* ÿÿ{~zþy.x|.zyzx{ */
+	$"7D7D 7E7A 7B7D 7E7B 8179 8674 777C 7B7C"            /* }}~z{}~{y†tw|{| */
+	$"6C8D 946E 4741 2E79 CCF0 2770 555B 8DBC"            /* l”nGA.yÌð'pU[¼ */
+	$"A370 6A74 7071 6C65 6E7A 7480 7C80 7C7C"            /* £pjtpqlenzt€|€|| */
+	$"8180 7F81 8281 8080 7F7D 7E7D 7F7E 0000"            /* €.‚€€.}~}.~.. */
+	$"7D80 7CFE 7B1F 7A7E 817C 7B7C 7A7B 7D7D"            /* }€|þ{.z~|{|z{}} */
+	$"7E7A 7B7D 807D 837B 8876 797E 7D7E 7296"            /* ~z{}€}ƒ{ˆvy~}~r– */
+	$"9F79 4F45 327A CCF0 2772 575C 8DBB A270"            /* ŸyOE2zÌð'rW\»¢p */
+	$"6B74 7071 6C64 6B79 737F 7A7D 7979 7E7D"            /* ktpqldkys.z}yy~} */
+	$"7C7E 7F7E 7D7D 7C7A 7B7A 7C7D 0000 7A7D"            /* |~.~}}|z{z|}..z} */
+	$"79FE 781F 777B 7E79 7879 7779 7B7B 7C78"            /* yþx.w{~yxywy{{|x */
+	$"797B 7D7A 807A 8775 787D 7C7D 7093 9B75"            /* y{}z€z‡ux}|}p“›u */
+	$"4F48 337A E8F0 00E5 E4F0 2345 415A 7AAF"            /* OH3zèð.åäð#EAZz¯ */
+	$"AB83 626A 6D6B 645F 7C76 7B7B 797B 7E7B"            /* «ƒbjmkd_|v{{y{~{ */
+	$"7D7A 7B7E 7C7D 7C7B 7978 7879 79FF FFFE"            /* }z{~|}|{yxxyyÿÿþ */
+	$"7821 7A78 7A78 7E7A 7A79 797A 7C7C 7D7B"            /* x!zxzx~zzyyz||}{ */
+	$"7A7B 7C7C 7F7F 7E7E 7571 786C 7F93 935F"            /* z{||..~~uqxl.““_ */
+	$"463A 3136 CAF0 2346 455F 7DB4 B48B 6870"            /* F:16Êð#FE_}´´‹hp */
+	$"7370 665F 7D77 7C7C 7B7D 807F 817E 7D80"            /* spf_}w||{}€.~}€ */
+	$"7E7C 7C7D 7D7B 7C7D 7B00 00FD 7A20 787A"            /* ~||}}{|}{..ýz xz */
+	$"787E 7A7A 7979 7A7C 7C7D 7C7C 7D7E 7C7F"            /* x~zzyyz||}||}~|. */
+	$"7F7E 807A 777E 7285 9D9D 694F 4036 37CA"            /* .~€zw~r…iO at 67Ê */
+	$"F019 4848 6382 B7B3 8A68 7073 7168 617F"            /* ð.HHc‚·³Šhpsqha. */
+	$"797E 7C7A 7C7F 7E80 7D7C 7F7D FE7C 067B"            /* y~|z|.~€}|.}þ|.{ */
+	$"7878 7978 0000 FE77 0B78 7678 767C 7878"            /* xxyx..þw.xvxv|xx */
+	$"7777 787A 7AFE 7B12 7C7D 7C7F 7F7E 7F78"            /* wwxzzþ{.|}|..~.x */
+	$"777E 7285 9C9C 684E 3E32 37E7 F000 E6E4"            /* w~r…œœhN>27çð.æä */
+	$"F048 5A4A 495B 63A7 B79B 706D 6C5F 6678"            /* ðHZJI[c§·›pml_fx */
+	$"6C77 7B7B 7674 7778 777B 797A 7C78 7474"            /* lw{{vtwxw{yz|xtt */
+	$"7877 7473 7777 7A7A 7D7B 7877 777A 787B"            /* xwtswwzz}{xwwzx{ */
+	$"797A 7B7B 7A7A 7879 7A7A 7B79 7982 7877"            /* yz{{zzxyzz{yy‚xw */
+	$"6D70 909B 8559 4832 2E36 44CA F048 5A4B"            /* mp›…YH2.6DÊðHZK */
+	$"4D5E 68B0 C1A4 7976 7263 677C 707B 7E7D"            /* M^h°Á¤yvrcg|p{~} */
+	$"7876 7B7C 7B7D 7B7C 7C7A 7879 7C7B 7875"            /* xv{|{}{||zxy|{xu */
+	$"7979 7C7C 7F7D 7A79 797C 7A7D 7B7C 7D7D"            /* yy||.}zyy|z}{|}} */
+	$"7C7C 7A7B 7C7C 7D7B 7B84 7C7D 7679 99A4"            /* ||z{||}{{„|}vy™¤ */
+	$"8E62 5138 3238 46CA F048 5C4F 5163 6BAF"            /* ŽbQ828FÊðH\OQck¯ */
+	$"C0A3 7875 7264 697D 717C 7D7C 7775 7A7B"            /* ˣxurdi}q|}|wuz{ */
+	$"7A7C 7A7B 7C79 7777 7B7A 7774 7878 7B7B"            /* z|z{|yww{zwtxx{{ */
+	$"7E7C 7978 787B 797C 7A7B 7C7C 7B7B 797A"            /* ~|yxx{y|z{||{{yz */
+	$"7B7B 7C7A 7A83 7B7B 7478 98A3 8D61 5038"            /* {{|zzƒ{{tx˜£aP8 */
+	$"3135 45E7 F000 E6E4 F01B 7A51 4146 5655"            /* 15Eçð.æäð.zQAFVU */
+	$"7FB5 B78D 715A 5E69 6B6F 7375 7472 7474"            /* .µ·qZ^ikosutrtt */
+	$"7779 7976 7473 FE72 1070 6E6F 6B68 666A"            /* wyyvtsþr.pnokhfj */
+	$"6D73 7371 7574 7678 7676 FE77 1576 7777"            /* mssqutvxvvþw.vww */
+	$"787A 7579 7878 7369 84A0 9D6E 4E47 3330"            /* xzuyxxsi„ nNG30 */
+	$"3139 55CA F015 7850 4249 5B5E 89BF C197"            /* 19UÊð.xPBI[^‰¿Á— */
+	$"7B61 6272 7578 797A 7877 7878 FE7B 1678"            /* {abruxyzxwxxþ{.x */
+	$"7777 787A 7977 7574 6F6D 6A6F 7277 7775"            /* wwxzywutomjorwwu */
+	$"7978 7A7C 7A7A FE7B 157A 7A79 7A7C 797D"            /* yxz|zzþ{.zzyz|y} */
+	$"7C7D 7973 8EAA A778 534C 3934 3239 57CA"            /* |}ysŽª§xSL9429WÊ */
+	$"F015 7B55 474E 5E5D 88BE C096 7A61 6371"            /* ð.{UGN^]ˆ¾À–zacq */
+	$"7477 7878 7776 7777 FE7A 0077 FE76 1278"            /* twxxwvwwþz.wþv.x */
+	$"7977 7574 706E 6B6F 7378 7876 7A79 7B7D"            /* ywutpnkosxxvzy{} */
+	$"7B7B FE7C 157B 7A78 797B 787C 7B7B 7770"            /* {{þ|.{zxy{x|{{wp */
+	$"8CA9 A677 534D 3935 3137 53E7 F000 E0E3"            /* Œ©¦wSM9517Sçð.àã */
+	$"F030 5443 583A 524F 629D CABB 9162 636B"            /* ð0TCX:RObÊ»‘bck */
+	$"6E6D 7472 6C73 6F74 7475 746F 6F66 5A4E"            /* nmtrlsottutoofZN */
+	$"4C4E 4D50 504F 514E 5259 5B5A 5156 606D"            /* LNMPPOQNRY[ZQV`m */
+	$"7475 73FE 7412 7778 7672 776F 6C85 9CAD"            /* tusþt.wxvrwol…œ­ */
+	$"8351 503A 322E 3132 40C8 F046 5444 5E41"            /* ƒQP:2.12@ÈðFTD^A */
+	$"5C59 6BA6 D4C4 9A6D 6F76 7A77 7D7A 7479"            /* \Yk¦ÔÄšmovzw}zty */
+	$"747A 797A 7877 7872 665C 5658 575A 5A58"            /* tzyzxwxrf\VXWZZX */
+	$"5A58 5B62 6463 5A5E 6976 7D7D 7C7C 7A77"            /* ZX[bdcZ^iv}}||zw */
+	$"797A 7879 7F78 7791 A7B8 8D5B 5A42 3732"            /* yzxy.xw‘§¸[ZB72 */
+	$"3234 42C8 F046 5649 5F41 5B58 6AA5 D3C3"            /* 24BÈðFVI_A[Xj¥ÓÃ */
+	$"996B 6D74 7875 7B76 7077 7278 787A 7B76"            /* ™kmtxu{vpwrxxz{v */
+	$"766F 655C 5859 595B 5B5A 5C59 5C63 6664"            /* voe\XYY[[Z\Y\cfd */
+	$"5C60 6A78 7F7F 7D7C 7977 7879 7777 7E79"            /* \`jx..}|ywxyww~y */
+	$"758E A5B7 8C5A 5942 3733 3433 3FE6 F000"            /* uŽ¥·ŒZYB7343?æð. */
+	$"E0E3 F046 674A 5447 493D 5C5D 73B1 CDC0"            /* àãðFgJTGI=\]s±ÍÀ */
+	$"9B75 696A 6D6D 6E6C 7371 706E 6858 4F49"            /* ›uijmmnlsqpnhXOI */
+	$"4947 484C 4B4D 504F 5050 5553 5252 4C4C"            /* IGHLKMPOPPUSRRLL */
+	$"494A 4D58 6D77 7775 7473 756E 7191 ADB0"            /* IJMXmwwutsunq‘­° */
+	$"955D 4D48 3D33 3336 3832 32C8 F046 674B"            /* •]MH=336822ÈðFgK */
+	$"584D 5245 6263 79B7 D6CA A57F 7373 7676"            /* XMREbcy·ÖÊ¥.ssvv */
+	$"7775 7C7A 7977 7061 5A56 5855 5356 5759"            /* wu|zywpaZVXUSVWY */
+	$"5C59 5A5A 5F5D 5C5C 5656 5354 5762 777F"            /* \YZZ_]\\VVSTWbw. */
+	$"7D79 7877 7975 7B9B B7BA 9F66 5651 4639"            /* }yxwyu{›·ºŸfVQF9 */
+	$"3737 3934 34C8 F010 684E 594D 5144 6263"            /* 77944Èð.hNYMQDbc */
+	$"79B7 D5C9 A47E 7272 75FE 7232 7977 7676"            /* y·Õɤ~rruþr2ywvv */
+	$"7260 5954 5655 5457 5759 5C5A 5B5B 605E"            /* r`YTVUTWWY\Z[[`^ */
+	$"5D5D 5757 5455 5863 787F 7B78 7776 7873"            /* ]]WWTUXcx.{xwvxs */
+	$"7A9C B6B9 9E66 5550 4539 3839 3B33 31E6"            /* zœ¶¹žfUPE989;31æ */
+	$"F000 E0E3 F046 8257 514A 5047 4C46 5F64"            /* ð.àãðF‚WQJPGLF_d */
+	$"6DAC D0CE B488 6E64 686D 6C6E 6354 4C4B"            /* m¬ÐδˆndhmlncTLK */
+	$"4948 4C4D 4A4F 5B64 6D7A 8182 7D78 6A54"            /* IHLMJO[dmz‚}xjT */
+	$"574B 4946 4849 4555 6A77 7375 84A6 BEB8"            /* WKIFHIEUjwsu„¦¾¸ */
+	$"915D 4E4E 413C 3833 3834 3638 4EC8 F046"            /* ‘]NNA<838468NÈðF */
+	$"8259 524D 564D 504A 6368 73B5 D9D7 BD91"            /* ‚YRMVMPJchsµÙ×½‘ */
+	$"776D 7178 7779 6E5E 5657 5657 5B5C 5559"            /* wmqxwyn^VWVW[\UY */
+	$"6770 7984 8B8C 8782 745E 6155 5350 5253"            /* gpy„‹Œ‡‚t^aUSPRS */
+	$"4F5E 707C 797B 8AAD C8C2 9965 5655 4742"            /* O^p|y{Š­È™eVUGB */
+	$"3E37 3934 373A 50C8 F046 8158 544F 564D"            /* >7947:PÈðFXTOVM */
+	$"514B 6469 73B4 D8D6 BC90 7569 6C74 7375"            /* QKdis´ØÖ¼uiltsu */
+	$"6A5D 5757 5657 5A5A 5459 656E 7884 8B8B"            /* j]WWVWZZTYenx„‹‹ */
+	$"8781 735E 6054 5350 5153 505E 6E7A 7779"            /* ‡s^`TSPQSP^nzwy */
+	$"88AB C7C3 9B67 5855 4742 3E38 3B36 3939"            /* ˆ«ÇÛgXUGB>8;699 */
+	$"4DE6 F000 DDE2 F045 6653 5453 4D51 454C"            /* Mæð.ÝâðEfSTSMQEL */
+	$"4D64 6167 9ACF E5D1 B58B 726B 524C 4B4E"            /* MdagšÏåѵ‹rkRLKN */
+	$"504C 4B56 6D79 8682 7378 7F7F 838B 8280"            /* PLKVmy†‚sx..ƒ‹‚€ */
+	$"7E94 A481 5847 4547 5465 80A3 C4D7 BD83"            /* ~”¤XGEGTe€£Ä×½ƒ */
+	$"5A55 5446 3F45 3B3A 3734 3D38 376C C7F0"            /* ZUTF?E;:74=87lÇð */
+	$"4568 5456 5751 5346 4E4F 6967 6CA0 D5ED"            /* EhTVWQSFNOigl Õí */
+	$"DABE 957D 765E 5857 5A5C 5B5C 677C 858F"            /* Ú¾•}v^XWZ\[\g|… */
+	$"8E7F 8489 898D 948B 8A88 9EAD 8B62 504E"            /* Ž.„‰‰”‹Šˆž­‹bPN */
+	$"515C 6B87 ACCE E0C4 8C64 5A59 4B43 483F"            /* Q\k‡¬ÎàÄŒdZYKCH? */
+	$"3E39 353C 3939 6EC7 F045 6655 5758 5254"            /* >95<99nÇðEfUWXRT */
+	$"484F 5069 676D A0D5 EDD9 BA90 7A73 5A54"            /* HOPigm ÕíÙºzsZT */
+	$"555A 5E5C 5C66 7983 8E8C 7D82 8888 8C93"            /* UZ^\\fyƒŽŒ}‚ˆˆŒ“ */
+	$"8A89 869C AC8A 614F 4D51 5C69 85A9 CBDD"            /* Š‰†œ¬ŠaOMQ\i…©ËÝ */
+	$"C28C 655E 5D4F 454A 403F 3B37 3E3A 386A"            /* ÂŒe^]OEJ@?;7>:8j */
+	$"E6F0 00DA E2F0 446E 5A53 5A4E 554C 4F4F"            /* æð.ÚâðDnZSZNULOO */
+	$"4950 5C66 6280 AFD5 E8DA C7A8 8A72 605B"            /* IP\fb€¯ÕèÚǨŠr`[ */
+	$"687F 7F7A 7A82 7B7A 7C7F 7F83 8885 8788"            /* h..zz‚{z|..ƒˆ…‡ˆ */
+	$"807F 7980 8082 9BB5 CED5 C59E 725B 5753"            /* €.y€€‚›µÎÕÅžr[WS */
+	$"4C48 4847 423F 3B3B 3834 3936 C6F0 4470"            /* LHHGB?;;8496ÆðDp */
+	$"5F57 5E52 5950 5353 4D54 5D67 6385 B6DC"            /* _W^RYPSSMT]gc…¶Ü */
+	$"EFE2 CFAF 917B 6B67 748B 8D87 8388 8483"            /* ïâϯ‘{kgt‹‡ƒˆ„ƒ */
+	$"8588 888C 908C 8F90 8A85 7D86 8688 A1BB"            /* …ˆˆŒŒŠ…}††ˆ¡» */
+	$"D4DD CEA8 7C60 5C58 514B 4948 4340 3C3C"            /* ÔÝΨ|`\XQKIHC@<< */
+	$"3936 3936 C6F0 446D 5B55 5F53 5A51 5454"            /* 9696ÆðDm[U_SZQTT */
+	$"4E55 5F69 6587 B8DB EDDF CCAD 8F7A 6B68"            /* NU_ie‡¸ÛíßÌ­zkh */
+	$"758C 8C85 8288 8180 8285 8589 8D8A 8C8D"            /* uŒŒ…‚ˆ€‚……‰ŠŒ */
+	$"8783 7C84 8486 9DB8 D4DD CDA7 7B64 605C"            /* ‡ƒ|„„†¸ÔÝͧ{d`\ */
+	$"5550 4E4C 4744 4040 3B35 3934 E5F0 00DA"            /* UPNLGD@@;594åð.Ú */
+	$"E2F0 1F86 5754 5451 594F 5350 4E50 3E54"            /* âð.†WTTQYOSPNP>T */
+	$"4968 6565 71A4 CDE6 EEE6 D9C8 B8A4 937F"            /* Iheeq¤ÍæîæÙȸ¤“. */
+	$"7672 6FFE 6B21 6C6F 6D72 7E84 96A8 BFD2"            /* vroþk!lomr~„–¨¿Ò */
+	$"E6E4 DFC3 9469 5655 5753 4D4C 4847 4846"            /* æäßÔiVUWSMLHGHF */
+	$"4440 3E38 3B2F 3845 C6F0 1F88 5C59 5855"            /* D@>8;/8EÆð.ˆ\YXU */
+	$"5D53 5754 5254 4158 4D6C 6969 75A8 D1EA"            /* ]SWTRTAXMliiu¨Ñê */
+	$"F2ED E1CC BCA9 9988 7F7C 78FE 7421 7578"            /* òíá̼©™ˆ.|xþt!ux */
+	$"777C 888E 9FAE C3D8 ECEA E5C9 996F 5B5A"            /* w|ˆŽŸ®ÃØìêåÉ™o[Z */
+	$"5C58 5251 4D4A 4947 4541 3F39 3C31 3845"            /* \XRQMJIGEA?9<18E */
+	$"C6F0 1F85 5857 5956 5E54 5855 5355 4359"            /* Æð.…XWYV^TXUSUCY */
+	$"4E6E 6C68 74A7 D0E9 F1ED E3CF BFAC 9A87"            /* Nnlht§ÐéñíãÏ¿¬š‡ */
+	$"7E7B 77FE 7321 7477 767B 878D 9EAE C4D8"            /* ~{wþs!twv{‡ž®ÄØ */
+	$"ECEA E3C8 9C71 5E5D 5F5C 5655 514F 4E4C"            /* ìêãÈœq^]_\VUQONL */
+	$"4945 433D 3E30 3843 E5F0 00D7 E1F0 435A"            /* IEC=>08Cåð.×áðCZ */
+	$"5A5B 525C 5256 5052 5044 4B4B 524B 475B"            /* Z[R\RVPRPDKKRKG[ */
+	$"6362 6B7A 9ABB D0DD E6EB E9E3 E4DE D8DA"            /* cbkzš»ÐÝæëéãäÞØÚ */
+	$"D7D9 DBDA DBE2 E3E5 DCD0 B791 725D 4E5B"            /* ×ÙÛÚÛâãåÜз‘r]N[ */
+	$"5947 3E3B 3B43 4E4D 4C4B 4746 403F 3B37"            /* YG>;;CNMLKGF@?;7 */
+	$"3338 7DC5 F043 5F5E 5F56 6056 5A54 5654"            /* 38}ÅðC_^_V`VZTVT */
+	$"4A51 5156 4E4B 5E67 656E 7C9F C0D7 E4EE"            /* JQQVNK^gen|ŸÀ×äî */
+	$"EFED EDF0 E6E0 E2DF E1E3 E4E6 EDED EEE1"            /* ïííðæàâßáãäæííîá */
+	$"D4BC 9677 6354 605D 4A41 3E40 4853 524F"            /* Ô¼–wcT`]JA>@HSRO */
+	$"4C48 4741 403C 3835 387F C5F0 435B 5C60"            /* LHGA@<858.ÅðC[\` */
+	$"5761 575B 5557 554A 5151 5851 4A5D 6664"            /* WaW[UWUJQQXQJ]fd */
+	$"6D7B 9FC3 D7E4 EDF0 EEEC EEE8 E2E4 E1E3"            /* m{ŸÃ×äíðîìîèâäáã */
+	$"E5E5 E7ED EEEF E4D7 BF99 7A63 5664 614F"            /* ååçíîïä׿™zcVdaO */
+	$"4643 444C 5756 5451 4D4B 4544 403A 3438"            /* FCDLWVTQMKED@:48 */
+	$"7CE5 F000 D7E1 F043 755D 5E59 5C59 6054"            /* |åð.×áðCu]^Y\Y`T */
+	$"5A51 5250 4F50 4A42 4B43 6161 6A5C 605F"            /* ZQRPOPJBKCaaj\`_ */
+	$"5C6A 7B82 9398 A4AC AEAA A8A4 9690 7E71"            /* \j{‚“˜¤¬®ª¨¤–~q */
+	$"6057 494F 545A 6154 5559 5F4A 383C 3B4A"            /* `WIOTZaTUY_J8<;J */
+	$"4F4D 4F4A 4542 3E3A 3835 3C7D C5F0 437A"            /* OMOJEB>:85<}ÅðCz */
+	$"6162 5D60 5D64 585E 5556 5453 544E 464F"            /* ab]`]dX^UVTSTNFO */
+	$"4765 656E 6068 6562 7083 8B9C A1AD B5B7"            /* Geen`hebpƒ‹œ¡­µ· */
+	$"B3B1 AD9F 9987 7966 5D4F 555A 6067 5A5A"            /* ³±­Ÿ™‡yf]OUZ`gZZ */
+	$"5E64 4F3D 4140 4F54 5050 4B46 433F 3B39"            /* ^dO=A at OTPPKFC?;9 */
+	$"373E 7FC5 F043 765F 635E 615E 6559 5F56"            /* 7>.ÅðCv_c^a^eY_V */
+	$"5755 5455 4F47 5046 6464 6F61 6865 6270"            /* WUTUOGPFddoahebp */
+	$"828A 9BA0 ACB4 B6B2 B0AC 9E98 8679 665D"            /* ‚Š› ¬´¶²°¬ž˜†yf] */
+	$"4F55 5A60 675C 5D62 6853 4145 4453 5855"            /* OUZ`g\]bhSAEDSXU */
+	$"5550 4B48 443F 3B36 3B7C E5F0 00D7 E1F0"            /* UPKHD?;6;|åð.×áð */
+	$"2C92 604B 595F 525B 5856 5A53 5650 504A"            /* ,’`KY_R[XVZSVPPJ */
+	$"4E44 6B53 605E 5857 4A59 635A 5C6A 594A"            /* NDkS`^XWJYcZ\jYJ */
+	$"4D58 5152 534E 5051 5C61 6459 5D5A FE58"            /* MXQRSNPQ\adY]ZþX */
+	$"135A 5E58 605D 433F 3D49 5353 4B45 423E"            /* .Z^X`]C?=ISSKEB> */
+	$"3735 383D 7DC5 F043 9764 4F5D 6356 5F5C"            /* 758=}ÅðC—dO]cV_\ */
+	$"5A5E 575A 5454 4E52 486F 5764 615C 5F50"            /* Z^WZTTNRHoWda\_P */
+	$"5F69 5F61 6F5F 4F53 5D57 5859 5456 5762"            /* _i_ao_OS]WXYTVWb */
+	$"676A 5F63 605E 5E5D 5F63 5D65 6248 4442"            /* gj_c`^^]_c]ebHDB */
+	$"4E56 544C 4643 3F38 363A 3F7F C5F0 4393"            /* NVTLFC?86:?.ÅðC“ */
+	$"6250 5E64 5760 5D5B 5F58 5B55 554F 5348"            /* bP^dW`][_X[UUOSH */
+	$"6E56 6362 5D5F 505F 695F 616F 5F4F 535E"            /* nVcb]_P_i_ao_OS^ */
+	$"5758 5954 5657 6267 6A5F 6360 5E5E 5F62"            /* WXYTVWbgj_c`^^_b */
+	$"6761 6966 4C48 4652 5B59 514B 4844 3C38"            /* gaifLHFR[YQKHD<8 */
+	$"393C 7CE5 F000 D7E1 F003 AA6A 515B FE58"            /* 9<|åð.×áð.ªjQ[þX */
+	$"3C5A 585A 5755 564F 5551 6565 645D 6356"            /* <ZXZWUVOUQeed]cV */
+	$"5D5C 5F5A 5B62 5B5F 5A5F 605B 6462 605F"            /* ]\_Z[b[_Z_`[db`_ */
+	$"625C 5862 5C5A 5E61 5C61 5B5E 585F 545B"            /* b\Xb\Z^a\a[^X_T[ */
+	$"4A46 4652 544E 4640 3B34 383A 7D7D C5F0"            /* JFFRTNF@;48:}}Åð */
+	$"03AF 6E55 5FFE 5C3C 5E5C 5E5B 595A 5359"            /* .¯nU_þ\<^\^[YZSY */
+	$"5569 6968 6166 5B65 6265 6060 665F 635E"            /* Uiihaf[ebe``f_c^ */
+	$"6364 5F68 6664 6366 605E 6862 6064 6762"            /* cd_hfdcf`^hb`dgb */
+	$"6660 635D 6459 604F 4B4B 5555 4F47 413C"            /* f`c]dY`OKKUUOGA< */
+	$"3539 3C7F 7FC5 F003 AB6C 5660 FE5D 3C5F"            /* 59<..Åð.«lV`þ]<_ */
+	$"5D5F 5C5A 5B54 5A56 6A68 6760 675C 6562"            /* ]_\Z[TZVjhg`g\eb */
+	$"6560 6167 6064 5F64 6560 6967 6564 6761"            /* e`ag`d_de`igedga */
+	$"5E68 6260 6467 6268 6367 6168 5D64 534F"            /* ^hb`dgbhcgah]dSO */
+	$"4F5A 5A54 4C46 4139 3B3B 7C7C E5F0 00D1"            /* OZZTLFA9;;||åð.Ñ */
+	$"E0F0 418C 4D5B 5959 5E5B 5360 5653 534E"            /* àðAŒM[YY^[S`VSSN */
+	$"6067 6064 6862 6564 6760 655F 6361 6468"            /* `g`dhbedg`e_cadh */
+	$"5D62 5D5C 6968 5E62 615A 5E62 635F 6561"            /* ]b]\ih^baZ^bc_ea */
+	$"6565 6362 6364 6567 694D 444C 544F 4742"            /* eecbcdegiMDLTOGB */
+	$"3C3A 3B40 7DC3 F041 8F53 5F5A 5A5F 5F57"            /* <:;@}ÃðAS_ZZ__W */
+	$"645A 5757 5366 6D66 6A6E 686B 6A6D 666B"            /* dZWWSfmfjnhkjmfk */
+	$"6569 676A 6E63 6863 626F 6E64 6867 6064"            /* eigjnchcbondhg`d */
+	$"6869 656B 6769 6B6B 6A68 696A 6C6E 5249"            /* hiekgikkjhijlnRI */
+	$"5159 5149 443E 3B3C 427F C3F0 418D 535F"            /* QYQID>;<B.ÃðAS_ */
+	$"5C5E 6462 5A67 5B58 5853 666D 666A 6E68"            /* \^dbZg[XXSfmfjnh */
+	$"6B6A 6D66 6B65 6967 6A6E 6166 6160 6D6C"            /* kjmfkeigjnafa`ml */
+	$"6266 655E 6266 6763 6965 686A 6D6C 6B6C"            /* bfe^bfgciehjmlkl */
+	$"6D6F 7155 4C54 5C55 4D48 413F 3E41 7CE4"            /* moqULT\UMHA?>A|ä */
+	$"F000 D1E0 F02E A460 5959 5860 5B55 5658"            /* ð.Ñàð.¤`YYX`[UVX */
+	$"5353 4D64 6B68 6C67 6667 6965 6A69 6767"            /* SSMdkhlgfgiejigg */
+	$"646B 6761 6767 666A 6865 6466 6567 6A69"            /* dkgaggfjhedfegji */
+	$"676C 6B6A 6AFE 670F 6462 6263 624F 4A50"            /* glkjjþg.dbbcbOJP */
+	$"4E48 4139 353D 3D7D C3F0 2DA5 645C 5A59"            /* NHA95==}Ãð-¥d\ZY */
+	$"615F 595A 5C57 5752 6A71 6E72 6D6C 6D6F"            /* a_YZ\WWRjqnrmlmo */
+	$"6B70 6F6D 6D6A 716D 676D 6D6C 706E 6B6A"            /* kpommjqmgmmlpnkj */
+	$"6C6B 6D70 6F6D 7271 6EFE 7010 6F6C 6A67"            /* lkmpomrqnþp.oljg */
+	$"6867 544F 5552 4C45 3D36 3E3F 7FC3 F02E"            /* hgTOURLE=6>?.Ãð. */
+	$"A465 5E5C 5D66 625C 5D5D 5858 536A 716E"            /* ¤e^\]fb\]]XXSjqn */
+	$"726D 6C6D 6F6B 706F 6D6D 6A71 6D65 6B6B"            /* rmlmokpommjqmekk */
+	$"6A6E 6C69 686A 696B 6E6D 6B70 6F6D 6FFE"            /* jnlihjiknmkpomoþ */
+	$"710F 6E6C 6A6B 6A57 5258 554F 4840 3A40"            /* q.nljkjWRXUOH@:@ */
+	$"3E7C E4F0 00C9 DFF0 2E6A 5E5D 4F6B 5659"            /* >|äð.Éßð.j^]OkVY */
+	$"5258 5058 606C 6B68 6B69 686A 6C69 6972"            /* RXPX`lkhkihjliir */
+	$"6C70 6D5F 646C 6D71 6D61 676E 6E6C 6E69"            /* lpm_dlmqmagnnlni */
+	$"7571 6C70 6D6B 6B69 FD67 0D65 6265 534A"            /* uqlpmkkiýg.ebeSJ */
+	$"484A 4B3F 2B40 3441 7DC2 F02C 6B60 5E50"            /* HJK?+ at 4A}Âð,k`^P */
+	$"6C5A 5D56 5C54 5C66 7271 6E71 6F6E 7072"            /* lZ]V\T\frqnqonpr */
+	$"6F6F 7872 7673 656A 7273 7773 676D 7474"            /* ooxrvsejrswsgmtt */
+	$"7274 6F7B 7772 7673 6FFB 710D 6A67 6A58"            /* rto{wrvsoûq.jgjX */
+	$"4F4D 4F50 442F 4135 467F C2F0 2E6D 6260"            /* OMOPD/A5F.Âð.mb` */
+	$"5471 5D60 595D 555D 6672 716E 716F 6E70"            /* Tq]`Y]U]frqnqonp */
+	$"726F 6F78 7276 7365 6A70 7175 7165 6B72"            /* rooxrvsejpquqekr */
+	$"7270 726D 7975 7074 716E 7073 FD72 0D6D"            /* rprmyuptqnpsýr.m */
+	$"6A6D 5B52 5052 5347 3245 374C 7CE4 F000"            /* jm[RPRSG2E7L|äð. */
+	$"CEDF F01C 8369 5A5E 5257 5957 4D55 596F"            /* Îßð.ƒiZ^RWYWMUYo */
+	$"6869 686A 6C6A 6C6D 6A6D 6F6F 6D6E 6564"            /* hihjljlmjmoomned */
+	$"73FE 7020 696D 7171 7271 7174 706F 7271"            /* sþp imqqrqqtporq */
+	$"6E6F 6B6A 6766 6665 6660 6051 4946 4239"            /* nokjgffef``QIFB9 */
+	$"333E 3941 7DC2 F01C 836A 5B5F 535A 5D5B"            /* 3>9A}Âð.ƒj[_SZ][ */
+	$"5159 5D75 6E6F 6E70 7270 7273 7073 7575"            /* QY]unonprprspsuu */
+	$"7374 6B6A 79FE 7620 6F73 7777 7877 777A"            /* stkjyþv oswwxwwz */
+	$"7675 7877 7275 7374 7271 716B 6C64 6556"            /* vuxwrustrqqkldeV */
+	$"4E4D 4940 3940 3A46 7FC2 F01C 846C 5D63"            /* NMI at 9@:F.Âð.„l]c */
+	$"585E 605D 525A 5E75 6E6F 6E70 7270 7273"            /* X^`]RZ^unonprprs */
+	$"7073 7575 7374 6B6A 77FE 740C 6D71 7575"            /* psuustkjwþt.mquu */
+	$"7675 7578 7473 7675 72FE 7410 7271 716D"            /* vuuxtsvurþt.rqqm */
+	$"6E67 6759 504F 4B43 3C43 3C4C 7CE4 F000"            /* nggYPOKC<C<L|äð. */
+	$"CBDF F03F A867 615D 5958 5950 535B 6966"            /* Ëßð?¨ga]YXYPS[if */
+	$"686B 696A 6A69 6B6D 6B6E 6C6F 6C6C 6E6E"            /* hkijjikmknlollnn */
+	$"7271 7272 7673 7270 7575 716D 6F70 6F6E"            /* rqrrvsrpuuqmopon */
+	$"6F6C 6F6D 6866 6A65 6466 5E5D 4A43 3D3B"            /* olomhfjedf^]JC=; */
+	$"3D37 3C41 C1F0 3FAA 6862 5E5A 595D 5657"            /* =7<AÁð?ªhb^ZY]VW */
+	$"5F6D 6B6E 716F 7070 6F71 7371 7472 7572"            /* _mknqoppoqsqtrur */
+	$"7274 7478 7778 787C 7978 767B 7B77 7375"            /* rttxwxx|yxv{{wsu */
+	$"7675 7473 7278 7671 6F73 6F6B 6A64 6350"            /* vutsrxvqosokjdcP */
+	$"4943 4042 3B3D 46C1 F03F A767 6462 5F5E"            /* IC at B;=FÁð?§gdb_^ */
+	$"6056 5860 6E6B 6E71 6F70 706F 7173 7174"            /* `VX`nknqoppoqsqt */
+	$"7275 7270 7272 7675 7676 7A77 7674 7979"            /* rurprrvuvvzwvtyy */
+	$"7571 7374 7372 7472 7775 706E 726E 6B6B"            /* uqstsrtrwupnrnkk */
+	$"6463 5049 4343 463E 3F4C E3F0 00C8 DEF0"            /* dcPICCF>?Lãð.ÈÞð */
+	$"3E77 665B 605B 584C 5766 6768 6965 6869"            /* >wf[`[XLWfghiehi */
+	$"696B 6C6E 6C6E 6C6C 6E6D 6B71 6C71 7773"            /* iklnlnllnmkqlqws */
+	$"7873 7673 7575 726D 7374 7269 7669 716A"            /* xsvsuurmstriviqj */
+	$"6A66 6865 6560 625C 5243 3A3A 3B3C 4341"            /* jfhee`b\RC::;<CA */
+	$"C0F0 3E78 675C 615C 5C52 5B6A 6B6E 6F6B"            /* Àð>xg\a\\R[jknok */
+	$"6E6F 6F71 7274 7274 7272 7473 7177 7277"            /* nooqrtrtrrtsqwrw */
+	$"7D79 7E79 7C79 7B7B 7873 797A 786F 7A6F"            /* }y~y|y{{xsyzxozo */
+	$"7A73 736F 716F 6C64 6862 5849 403F 4040"            /* zssoqoldhbXI@?@@ */
+	$"4446 C0F0 3E78 6960 6660 5F52 5C6B 6C6E"            /* DFÀð>xi`f`_R\kln */
+	$"6F6B 6E6F 6F71 7274 7274 7272 7371 6F75"            /* oknooqrtrtrrsqou */
+	$"7075 7B77 7C77 7A77 7979 7671 7778 766D"            /* pu{w|wzwyyvqwxvm */
+	$"7B6F 7972 726E 706E 6C65 6862 5849 4142"            /* {oyrrnpnlehbXIAB */
+	$"4443 464C E3F0 00C8 DEF0 1B95 645D 5B5B"            /* DCFLãð.ÈÞð.•d][[ */
+	$"5650 5B66 6667 6466 6B6B 6A6B 6B6D 6B6E"            /* VP[ffgdfkkjkkmkn */
+	$"6C6E 6D71 7272 6FFE 740A 7374 7376 7572"            /* lnmqrroþtÂstsvur */
+	$"7176 7574 74FE 7111 6E6C 6B69 6766 6265"            /* qvuttþq.nlkigfbe */
+	$"5F56 5540 3C38 393E 447D C0F0 1B96 655E"            /* _VU@<89>D}Àð.–e^ */
+	$"5C5C 5A56 5F6A 6A6C 6A6C 7171 7071 7173"            /* \\ZV_jjljlqqpqqs */
+	$"7174 7274 7377 7878 75FE 7A1F 797A 797C"            /* qtrtswxxuþz.yzy| */
+	$"7B78 777C 7B7A 7A77 7577 7775 7472 7070"            /* {xw|{zzwuwwutrpp */
+	$"6969 655C 5B46 413D 3E42 4A7F C0F0 1B96"            /* iie\[FA=>BJ.Àð.– */
+	$"6762 6161 5D56 606B 6B6C 6A6C 7171 7071"            /* gbaa]V`kkljlqqpq */
+	$"7173 7174 7274 7275 7676 73FE 781F 7778"            /* qsqtrtruvvsþx.wx */
+	$"777A 7976 757A 7978 7875 7677 7674 7371"            /* wzyvuzyxxuvwvtsq */
+	$"6F6F 696A 655C 5B46 4240 4245 4A7C E3F0"            /* ooije\[FB at BEJ|ãð */
+	$"00C7 DEF0 17AD 6B65 6058 5653 6862 6965"            /* .ÇÞð.­ke`XVShbie */
+	$"6866 6A6B 6A6A 6D6E 6C6E 6F6D 6BFD 7008"            /* hfjkjjmnlnomkýp. */
+	$"7372 746C 7072 7578 77FE 7309 7572 7171"            /* srtlpruxwþsÆurqq */
+	$"7468 7069 6B65 FE64 095D 5555 483B 3635"            /* thpikeþdÆ]UUH;65 */
+	$"3D44 7DC0 F017 AD6B 6764 5E5C 596E 686F"            /* =D}Àð.­kgd^\Ynho */
+	$"6B6E 6C70 7170 7073 7472 7475 7371 FE76"            /* knlpqppstrtusqþv */
+	$"0975 7978 7A72 7678 7B7E 7DFE 7916 7B78"            /* Æuyxzrvx{~}þy.{x */
+	$"7775 7A71 7A72 746E 6D6A 6862 5A5A 4D40"            /* wuzqzrtnmjhbZZM@ */
+	$"3B3A 414A 7FC0 F017 AE6D 6965 5E5C 596E"            /* ;:AJ.Àð.®mie^\Yn */
+	$"686F 6B6E 6C70 7170 7073 7472 7475 7371"            /* hoknlpqppstrtusq */
+	$"FE76 0978 7976 7A72 7678 7B7E 7DFE 7916"            /* þvÆxyvzrvx{~}þy. */
+	$"7B78 7776 7A70 7971 736D 6F6D 6B65 5D5D"            /* {xwvzpyqsmomke]] */
+	$"5043 3E3D 424A 7CE3 F000 C5DD F01B 7C64"            /* PC>=BJ|ãð.ÅÝð.|d */
+	$"5F56 5458 5D62 6166 6768 6768 6B69 6E6C"            /* _VTX]bafghghkinl */
+	$"6B6D 6C6D 7070 6F73 7272 FE73 0474 7476"            /* kmlmpposrrþs.ttv */
+	$"7776 FE74 1671 7375 726E 6B6B 6A69 6762"            /* wvþt.qsurnkkjigb */
+	$"6363 5C56 514A 3A39 3643 447D BFF0 1B7C"            /* cc\VQJ:96CD}¿ð.| */
+	$"6763 5C5A 5E63 6867 6C6D 6E6D 6E71 6F74"            /* gc\Z^chglmnmnqot */
+	$"7271 7372 7375 7574 7877 78FE 7904 7A7A"            /* rqsrsuutxwxþy.zz */
+	$"7C7D 7CFE 7A03 7779 7B76 FE74 0F73 7270"            /* |}|þz.wy{vþt.srp */
+	$"6B68 6761 5B56 4F3F 3E3B 474A 7FBF F023"            /* khga[VO?>;GJ.¿ð# */
+	$"7C66 625C 5A5E 6368 676C 6D6E 6D6E 716F"            /* |fb\Z^chglmnmnqo */
+	$"7472 7173 7273 7778 777B 7A78 7779 797A"            /* trqsrswxw{zxwyyz */
+	$"7A7C 7D7C FE7A 1677 797B 7774 7373 7271"            /* z|}|þz.wy{wtssrq */
+	$"6F6D 6B6A 645E 5952 4241 3D48 4A7C E3F0"            /* omkjd^YRBA=HJ|ãð */
+	$"00BF DDF0 0F91 6D5A 5854 5A58 6861 6267"            /* .¿Ýð.‘mZXTZXhabg */
+	$"6565 6768 6AFD 6B05 656B 746F 6A6F FE74"            /* eeghjýk.ektojoþt */
+	$"0675 7872 7073 7776 FE74 1573 7372 6E71"            /* .uxrpswvþt.ssrnq */
+	$"686B 6C65 6661 6260 5B56 4D49 3C3C 3E44"            /* hklefab`[VMI<<>D */
+	$"44BE F00F 9170 5F5E 5A60 5E6E 6768 6D6B"            /* D¾ð.‘p_^Z`^nghmk */
+	$"6B6D 6E70 FD71 0F6B 7179 746F 7479 7A7A"            /* kmnpýq.kqytotyzz */
+	$"7B7E 7876 797D 7CFE 7A15 7979 7872 7771"            /* {~xvy}|þz.yyxrwq */
+	$"7475 6E6F 6A67 6460 5B52 4E41 4143 4A4A"            /* tunojgd`[RNAACJJ */
+	$"BEF0 0F8F 6D5B 5E5A 605E 6E67 686D 6B6B"            /* ¾ð.m[^Z`^nghmkk */
+	$"6D6E 70FD 710F 6B71 7B77 7378 7C7A 787B"            /* mnpýq.kq{wsx|zx{ */
+	$"7E78 7679 7D7C FE7A 1579 7978 7377 7073"            /* ~xvy}|þz.yyxswps */
+	$"746D 6E6C 6A67 635E 5551 4444 464A 4AE2"            /* tmnljgc^UQDDFJJâ */
+	$"F000 C2DD F009 AB77 605B 5961 6062 6365"            /* ð.ÂÝðÆ«w`[Ya`bce */
+	$"FE63 0766 6669 696C 6B6C 6CFE 6D0A 6C6D"            /* þc.ffiilkllþmÂlm */
+	$"716F 7473 7371 7473 75FE 7216 7372 7271"            /* qotssqtsuþr.srrq */
+	$"6F72 676C 6666 6460 615E 5A54 4C4A 3C3F"            /* orglffd`a^ZTLJ<? */
+	$"4444 7DBE F009 AB7A 6461 5F67 6668 696B"            /* DD}¾ðÆ«zda_gfhik */
+	$"FE69 076C 6C6F 6F72 7172 72FE 730A 7172"            /* þi.lloorqrrþsÂqr */
+	$"7675 7A79 7977 7A79 7BFE 7816 7978 7877"            /* vuzyywzy{þx.yxxw */
+	$"7378 7075 6F6F 6D69 6761 5F59 514F 4145"            /* sxpuoomiga_YQOAE */
+	$"4A4A 7FBE F009 AB79 6361 5F67 6668 696B"            /* JJ.¾ðÆ«yca_gfhik */
+	$"FE69 076C 6C6F 6F72 7172 72FE 730A 7476"            /* þi.lloorqrrþsÂtv */
+	$"7975 7879 7977 7A79 7BFE 7816 7978 7877"            /* yuxyywzy{þx.yxxw */
+	$"7478 6F74 6E6E 6C68 6A66 635D 5553 4446"            /* txotnnlhjfc]USDF */
+	$"4A4A 7CE2 F000 BFDC F024 8073 5857 6262"            /* JJ|âð.¿Üð$€sXWbb */
+	$"5D64 6265 655F 6464 6768 676B 6C6B 6A6A"            /* ]dbee_ddghgklkjj */
+	$"6C71 716D 6D6E 6C6F 7175 7273 7474 73FE"            /* lqqmmnloqursttsþ */
+	$"7113 7270 6F6A 6663 6560 5D5E 5C59 544D"            /* q.rpojfce`]^\YTM */
+	$"4B42 4543 447D BDF0 2483 775E 5D68 6863"            /* KBECD}½ð$ƒw^]hhc */
+	$"6A68 6B6B 656A 6A6D 6E6D 7172 7170 7072"            /* jhkkejjmnmqrqppr */
+	$"7676 7273 7472 7577 7B78 797A 7A79 FE77"            /* vvrstruw{xyzzyþw */
+	$"1378 7475 736F 6C6E 6967 645F 5E59 5250"            /* .xtusolnigd_^YRP */
+	$"474A 494A 7FBD F024 8276 5E5D 6868 636A"            /* GJIJ.½ð$‚v^]hhcj */
+	$"686B 6B65 6A6A 6D6E 6D71 7271 7070 7279"            /* hkkejjmnmqrqppry */
+	$"7A75 7372 7275 777B 7879 7A7A 79FE 7713"            /* zusrruw{xyzzyþw. */
+	$"7875 7572 6E6B 6D68 6666 6462 5D56 544A"            /* xuurnkmhffdb]VTJ */
+	$"4B49 4A7C E2F0 00BC DCF0 0B8D 825D 5D62"            /* KIJ|âð.¼Üð.‚]]b */
+	$"665C 6962 6564 61FE 642B 6668 686F 6D67"            /* f\ibedaþd+fhhomg */
+	$"696E 706F 6B6C 6968 687A 7273 7273 7372"            /* inpoklihhzrsrssr */
+	$"7170 6F6E 6F6C 6865 6764 5F5D 5B5B 5652"            /* qponolhegd_][[VR */
+	$"4C4B 3F48 4E36 BCF0 0B90 8663 6368 6C62"            /* LK?HN6¼ð.†cchlb */
+	$"6F68 6B6A 67FE 6A2B 6C6E 6E75 736D 6F74"            /* ohkjgþj+lnnusmot */
+	$"7574 7072 6F6E 6E80 7879 7879 7978 7776"            /* utpronn€xyxyyxwv */
+	$"7574 7372 716F 706D 6866 615E 5B57 5150"            /* utsrqopmhfa^[WQP */
+	$"444E 543A BCF0 0B8F 8563 6368 6C62 6F68"            /* DNT:¼ð.…cchlboh */
+	$"6B6A 67FE 6A2B 6C6E 6E75 736D 6F74 7878"            /* kjgþj+lnnusmotxx */
+	$"7372 6D6E 6E80 7879 7879 7978 7776 7574"            /* srmnn€xyxyyxwvut */
+	$"7472 706E 6F6C 6765 6463 5F5B 5554 474F"            /* trpnolgedc_[UTGO */
+	$"543B E1F0 00AF DCF0 09AC 7A65 6461 6461"            /* T;áð.¯ÜðƬzedada */
+	$"6667 63FB 6410 6667 686A 6B6B 6D6E 6C6E"            /* fgcûd.fghjkkmnln */
+	$"6E70 6D70 7272 73FC 7114 706D 6C6C 6B67"            /* npmprrsüq.pmllkg */
+	$"6362 605E 5B5A 5955 514C 4542 4750 44BC"            /* cb`^[ZYUQLEBGPD¼ */
+	$"F009 AD7C 6A6A 696A 676C 6D69 FB6A 106C"            /* ðÆ­|jjijglmiûj.l */
+	$"6D6E 7071 7173 7472 7474 7673 7678 7879"            /* mnpqqstrttvsvxxy */
+	$"FC77 1476 7372 7171 6D6B 6B6A 6862 605D"            /* üw.vsrqqmkkjhb`] */
+	$"5A56 514A 464B 534A BCF0 09AD 7C6B 6A68"            /* ZVQJFKSJ¼ðÆ­|kjh */
+	$"6A67 6C6D 69FB 6A12 6C6D 6E70 7171 7575"            /* jglmiûj.lmnpqquu */
+	$"7273 7273 7175 7877 7876 76FE 7714 7673"            /* rsrsquxwxvvþw.vs */
+	$"7273 736F 6C6B 6A68 6463 635F 5B56 4F4A"            /* rssolkjhdcc_[VOJ */
+	$"4E54 4AE1 F000 B9DB F00A 8971 5C66 5C6B"            /* NTJáð.¹Ûð‰q\f\k */
+	$"5F66 6465 61FE 6300 66FE 650F 686A 6B6C"            /* _fdeaþc.fþe.hjkl */
+	$"696C 6B6E 6E70 7170 7273 716F FE70 146E"            /* ilknnpqprsqoþp.n */
+	$"6D6B 6A69 6662 605E 5C5D 5A58 5556 4941"            /* mkjifb`^\]ZXUVIA */
+	$"3F56 3D7D BBF0 0A89 7261 6C62 7165 6C6A"            /* ?V=}»ð‰ralbqelj */
+	$"6B67 FE69 006C FE6B 0F6E 7070 726F 7271"            /* kgþi.lþk.npprorq */
+	$"7474 7677 7678 7977 75FE 7614 7473 716F"            /* ttvwvxywuþv.tsqo */
+	$"6E6B 6968 6664 625F 5D5A 5B4E 4642 583E"            /* nkihfdb_]Z[NFBX> */
+	$"7FBB F00A 8B74 616C 6271 656C 6A6B 67FE"            /* .»ð‹talbqeljkgþ */
+	$"6900 6CFE 6B0F 6E70 7172 6D6F 6D70 7072"            /* i.lþk.npqrmomppr */
+	$"7576 7677 7573 FE76 1474 7371 7271 6E6B"            /* uvvwusþv.tsqrqnk */
+	$"6A68 6665 6363 6061 544C 475C 407C E1F0"            /* jhfecc`aTLG\@|áð */
+	$"00B1 DBF0 04A6 6F6A 6762 FE64 1863 6664"            /* .±Ûð.¦ojgbþd.cfd */
+	$"6362 6266 6464 6566 6868 6968 6B6A 6F6E"            /* cbbfddefhhihkjon */
+	$"706F 6F6E 6F6F FC6D 126B 6967 6663 6263"            /* poonooüm.kigfcbc */
+	$"615E 5D59 5551 5049 4548 5D32 BAF0 04A6"            /* a^]YUQPIEH]2ºð.¦ */
+	$"6F6C 6C68 FE6A 1869 6C6A 6968 686C 6A6A"            /* ollhþj.iljihhljj */
+	$"6B6C 6E6E 6F6E 7270 7574 7675 7574 7575"            /* klnnonrputvuutuu */
+	$"FC73 1271 6F6C 6B68 6768 6663 625E 5A56"            /* üs.qolkhghfcb^ZV */
+	$"554E 4A4B 5F33 BAF0 04A8 716E 6C68 FE6A"            /* UNJK_3ºð.¨qnlhþj */
+	$"1969 6C6A 6968 686C 6A6A 6B6C 6E6E 6D6B"            /* .iljihhljjklnnmk */
+	$"6C6C 7170 7273 7572 7373 71FD 7312 716F"            /* llqprsurssqýs.qo */
+	$"6F6E 6B6A 6B69 6665 6260 5C5B 5450 5063"            /* onkjkifeb`\[TPPc */
+	$"35E0 F000 B3DA F020 7C6D 6866 6467 6565"            /* 5àð.³Úð |mhfdgee */
+	$"6865 6564 6263 6565 6465 6566 6766 6A6C"            /* heedbceedeefgfjl */
+	$"696C 6F6B 6D6D 6B6B 6EFE 6A13 6B6A 6866"            /* ilokmmkknþj.kjhf */
+	$"6563 6160 5F5C 5B55 504F 5248 4450 5F56"            /* eca`_\[UPORHDP_V */
+	$"B9F0 207C 6E6C 6C6A 6D6B 6B6E 6B6B 6A68"            /* ¹ð |nlljmkknkkjh */
+	$"696B 6B6A 6B6B 6C6D 6C71 726F 7275 7173"            /* ikkjkklmlqroruqs */
+	$"7371 7174 FE70 1371 706E 6B6A 6865 6463"            /* sqqtþp.qpnkjhedc */
+	$"6060 5A55 5457 4D49 5361 5CB9 F010 7E70"            /* ``ZUTWMISa\¹ð.~p */
+	$"6D6C 6A6D 6B6B 6E6B 6B6A 6869 6B6B 6AFE"            /* mljmkknkkjhikkjþ */
+	$"6B0C 6968 6A6E 6B6E 716F 7372 6F6F 72FE"            /* k.ihjnknqosroorþ */
+	$"7013 7170 6E6E 6D6B 6867 6663 635D 5B5A"            /* p.qpnnmkhgfcc][Z */
+	$"5D53 4F58 645C E0F0 00B0 DAF0 0F93 6E65"            /* ]SOXd\àð.°Úð.“ne */
+	$"6968 6666 6566 6864 6262 6463 63FD 6523"            /* ihffefhdbbdccýe# */
+	$"6666 6868 6768 6A6B 6C6B 6A6B 6C68 6769"            /* ffhhghjklkjklhgi */
+	$"6967 6664 6161 5E5E 5B58 5854 4F51 5347"            /* igfdaa^^[XXTOQSG */
+	$"4A53 5056 B9F0 0F92 6F69 6D6C 6A6C 6B6C"            /* JSPV¹ð.’oimljlkl */
+	$"6E6A 6868 6A69 69FD 6B23 6C6C 6E6E 6D6E"            /* njhhjiiýk#llnnmn */
+	$"7071 7271 7071 726E 6D6F 6F6D 6C6A 6666"            /* pqrqpqrnmoomljff */
+	$"6363 605D 5D59 5456 584C 4F57 525C B9F0"            /* cc`]]YTVXLOWR\¹ð */
+	$"0F97 736C 6E6D 6B6C 6B6C 6E6A 6868 6A69"            /* .—slnmklklnjhhji */
+	$"69FD 6B23 6C6C 6E6C 6B6C 6E6F 706F 6E6F"            /* iýk#llnlklnopono */
+	$"706E 6D6F 6F6D 6C6A 6869 6767 6461 615D"            /* pnmoomljhiggdaa] */
+	$"585A 5B50 525A 565C E0F0 00B3 DAF0 10AD"            /* XZ[PRZV\àð.³Úð.­ */
+	$"7B62 6669 6B68 6866 6265 625F 6163 6264"            /* {bfikhhfbeb_acbd */
+	$"FE65 0466 6668 6869 FE68 0069 FE6A 1768"            /* þe.ffhhiþh.iþj.h */
+	$"6865 6666 6462 615C 5D5B 5A58 5756 5352"            /* heffdba\][ZXWVSR */
+	$"544F 4D55 5F38 56B9 F010 AC7C 666A 6D6F"            /* TOMU_8V¹ð.¬|fjmo */
+	$"6D6E 6C68 6B68 6567 6968 6AFE 6B04 6C6C"            /* mnlhkhegihjþk.ll */
+	$"6E6E 6FFE 6E00 6FFE 7017 6E6E 6B6C 6C6A"            /* nnoþn.oþp.nnkllj */
+	$"6867 6262 605F 5D5C 5B58 5759 5452 5A63"            /* hgbb`_]\[XWYTRZc */
+	$"3A5C B9F0 10B1 8069 6B6E 706E 6E6C 686B"            /* :\¹ð.±€iknpnnlhk */
+	$"6865 6769 686A FE6B 086C 6C6E 6E6F 6E6C"            /* hegihjþk.llnnonl */
+	$"6C6D FE6E 176D 6E6B 6C6C 6A68 6764 6564"            /* lmþn.mnklljhgded */
+	$"6361 605E 5B5A 5C57 555D 663D 5CE0 F000"            /* ca`^[Z\WU]f=\àð. */
+	$"ACD9 F00B 7F6F 6F5B 7163 6668 6666 6563"            /* ¬Ùð..oo[qcfhffec */
+	$"FE62 0663 6665 6466 6668 FE66 1C64 6667"            /* þb.cfedffhþf.dfg */
+	$"6869 6765 6763 6262 605F 605A 5B5A 5857"            /* higegcbb`_`Z[ZXW */
+	$"5755 5557 564F 564E 5A2B B7F0 0B80 7373"            /* WUUWVOVNZ+·ð.€ss */
+	$"5F75 686C 6E6C 6C6B 69FE 6806 696C 6B6A"            /* _uhlnllkiþh.ilkj */
+	$"6C6C 6EFE 6B1C 6A6C 6D6E 6F6D 6B6D 6968"            /* llnþk.jlmnomkmih */
+	$"6866 6566 6060 5F5D 5C5C 5B5B 5D5C 555C"            /* hfef``_]\\[[]\U\ */
+	$"535E 2DB7 F00B 8476 7460 7668 6C6E 6C6C"            /* S^-·ð.„vt`vhlnll */
+	$"6B69 FE68 0569 6C6B 6A6C 6CFD 6E1C 686A"            /* kiþh.ilkjllýn.hj */
+	$"6B6C 6D6B 696D 6968 6866 6566 6263 6361"            /* klmkimihhfefbcca */
+	$"6060 5B5B 5D5C 555C 5561 30DF F000 A8D9"            /* ``[[]\U\Ua0ßð.¨Ù */
+	$"F00B 9B76 6D62 6665 6867 6867 6463 FE61"            /* ð.›vmbfehghgdcþa */
+	$"0064 FE65 FC66 0B68 6866 6667 6766 6564"            /* .dþeüf.hhffggfed */
+	$"6262 5FFE 5E0E 5C5A 595A 585B 5855 5453"            /* bb_þ^.\ZYZX[XUTS */
+	$"545F 5E4C 34B7 F00B 9C7A 7066 6B6B 6D6D"            /* T_^L4·ð.œzpfkkmm */
+	$"6E6D 6A69 FE67 006A FE6B FE6C 0D6B 6B6D"            /* nmjiþg.jþkþl.kkm */
+	$"6E6C 6C6D 6D6C 6B6A 6868 65FE 640E 6260"            /* nllmmlkjhheþd.b` */
+	$"5F5F 5D60 5E5B 5A59 5860 5F4D 35B7 F00B"            /* __]`^[ZYX`_M5·ð. */
+	$"9E7B 7169 6E6F 706E 6E6D 6A69 FE67 006A"            /* ž{qinopnnmjiþg.j */
+	$"FE6B FE6C 0D6E 6E70 6E6C 6C6D 6D6C 6B6A"            /* þkþl.nnpnllmmlkj */
+	$"6868 65FE 640E 6260 6062 6063 5E5B 5A59"            /* hheþd.b``b`c^[ZY */
+	$"5962 6350 36DF F000 A2D8 F010 726D 6C6C"            /* YbcP6ßð.¢Øð.rmll */
+	$"6766 6A67 6664 6362 615F 6264 65FB 661C"            /* gfjgfdcba_bdeûf. */
+	$"6767 6867 6565 6464 6161 6260 5C5C 5B5A"            /* gghgeeddaab`\\[Z */
+	$"5B5C 5B5E 5957 575C 555D 6266 39B5 F010"            /* [\[^YWW\U]bf9µð. */
+	$"766F 7071 6D6B 6F6D 6C6A 6968 6765 686A"            /* vopqmkomljihgehj */
+	$"6BFD 6C1E 6B6B 6C6D 6E6D 6B6B 6A6A 6767"            /* kýl.kklmnmkkjjgg */
+	$"6866 6262 6160 6162 6063 5E5D 5D62 5B61"            /* hfbba`ab`c^]]b[a */
+	$"6367 3AB5 F010 7671 7374 706E 706D 6C6A"            /* cg:µð.vqstpnpmlj */
+	$"6968 6765 686A 6BFD 6C1E 6E6E 6F6D 6E6D"            /* ihgehjkýl.nnomnm */
+	$"6B6B 6A6A 6767 6866 6262 6160 6163 6366"            /* kkjjgghfbba`accf */
+	$"615D 5D62 5B62 656A 3BDE F000 A5D8 F002"            /* a]]b[bej;Þð.¥Øð. */
+	$"7F6E 6DFE 680B 6967 6766 6665 6564 6564"            /* .nmþh.iggffeeded */
+	$"6567 FC66 0765 6566 6765 6463 63FE 6111"            /* egüf.eefgedccþa. */
+	$"605D 5D5C 5B5C 5D5C 5B5A 5A58 5B5A 565D"            /* `]]\[\]\[ZZX[ZV] */
+	$"59A7 B5F0 1184 7071 6E6E 6D6E 6D6D 6C6C"            /* Y§µð.„pqnnmnmmll */
+	$"6B6B 6A6B 6A6B 6DFE 6C09 6B6B 6A6B 6C6D"            /* kkjkjkmþlÆkkjklm */
+	$"6B6A 6969 FE67 1166 6363 6261 6263 6160"            /* kjiiþg.fccbabca` */
+	$"5F60 5E61 605A 5E5B ACB5 F011 8072 7471"            /* _`^a`Z^[¬µð.€rtq */
+	$"7170 706D 6D6C 6C6B 6B6A 6B6A 6B6D FE6C"            /* qppmmllkkjkjkmþl */
+	$"096E 6E6D 6B6C 6D6B 6A69 69FE 6711 6663"            /* Ænnmklmkjiiþg.fc */
+	$"6362 6162 6464 6362 605E 6160 5B60 5CAA"            /* cbabddcb`^a`[`\ª */
+	$"DEF0 009C D7F0 057B 6B69 6768 6BFE 6907"            /* Þð.œ×ð.{kighkþi. */
+	$"6766 6563 6664 6567 FB66 0067 FE65 0863"            /* gfecfdegûf.gþe.c */
+	$"6261 6160 605F 615F FE5E 0B60 5F5C 5C5D"            /* baa``_a_þ^.`_\\] */
+	$"5B5E 5A55 5C64 A7B4 F002 7D6F 6EFE 700A"            /* [^ZU\d§´ð.}onþp */
+	$"6D6F 6F6D 6C6B 696C 6A6B 6DFC 6C01 6B6D"            /* moomlkiljkmül.km */
+	$"FE6B 0869 6867 6766 6665 6765 FE64 0B66"            /* þk.ihggffegeþd.f */
+	$"6561 6263 6164 6059 5D66 ACB4 F010 7F72"            /* eabcad`Y]f¬´ð..r */
+	$"7173 7271 6E6F 6F6D 6C6B 696C 6A6B 6DFB"            /* qsrqnoomlkiljkmû */
+	$"6C00 6DFE 6B08 6968 6767 6666 6567 65FE"            /* l.mþk.ihggffegeþ */
+	$"640B 6665 6262 6361 6460 5A5F 67AA DEF0"            /* d.febbcad`Z_gªÞð */
+	$"008F D7F0 038C 7167 64FE 6C01 6A69 FD67"            /* .×ð.Œqgdþl.jiýg */
+	$"0265 6465 FA66 0467 6566 6564 FE62 0461"            /* .edeúf.gefedþb.a */
+	$"605F 615F FD61 0960 6061 625E 595B 5A69"            /* `_a_ýaÆ``ab^Y[Zi */
+	$"70B3 F008 8F75 6D6D 7471 7070 6FFD 6D02"            /* p³ð.ummtqppoým. */
+	$"6B6A 6BFA 6C04 6D6B 6C6B 6AFE 6804 6766"            /* kjkúl.mklkjþh.gf */
+	$"6567 65FD 6709 6666 6768 645F 615E 6A71"            /* egeýgÆffghd_a^jq */
+	$"B3F0 0890 7770 7076 7271 706F FD6D 026B"            /* ³ð.wppvrqpoým.k */
+	$"6A6B FA6C 046D 6B6C 6B6A FE68 0467 6665"            /* jkúl.mklkjþh.gfe */
+	$"6765 FD67 0966 6667 6864 5F61 5F6C 73DD"            /* geýgÆffghd_a_lsÝ */
+	$"F000 8CD6 F00F 7369 656A 6B6E 6B69 6968"            /* ð.ŒÖð.siejknkiih */
+	$"6767 6666 6565 FB66 0267 6766 FE65 0164"            /* ggffeeûf.ggfþe.d */
+	$"63FC 62FE 610A 6263 6464 6363 5D5B 598A"            /* cübþaÂbcddcc][YŠ */
+	$"AAB2 F00F 776F 6E72 7172 716F 6F6E 6D6D"            /* ª²ð.wonrqrqoonmm */
+	$"6C6C 6B6B FB6C 026D 6D6C FE6B 016A 69FC"            /* llkkûl.mmlþk.jiü */
+	$"68FE 670A 6869 6A6A 6969 6361 5D8B ABB2"            /* hþgÂhijjiica]‹«² */
+	$"F00F 7A72 7074 7273 716F 6F6E 6D6D 6C6C"            /* ð.zrptrsqoonmmll */
+	$"6B6B FB6C 026D 6D6C FE6B 016A 69FC 68FE"            /* kkûl.mmlþk.jiühþ */
+	$"670A 6869 6A6A 6969 6361 5E8D ADDD F000"            /* gÂhijjiica^­Ýð. */
+	$"8FD6 F00F A666 6B66 6A6C 6B69 696C 6B69"            /* Öð.¦fkfjlkiilki */
+	$"6868 6666 FB68 0267 6867 FE66 0567 6463"            /* hhffûh.ghgþf.gdc */
+	$"6364 63FD 6409 6363 605C 5E5C 5D5A 89A1"            /* cdcýdÆcc`\^\]Z‰¡ */
+	$"B1F0 0FAA 6C75 6E70 7071 6F6F 7271 6F6E"            /* ±ð.ªlunppqoorqon */
+	$"6E6C 6CFB 6E02 6D6E 6DFE 6C05 6D6A 6969"            /* nllûn.mnmþl.mjii */
+	$"6A69 FD6A 0969 6966 6264 6263 608D A2B1"            /* jiýjÆiifbdbc`¢± */
+	$"F003 AD6F 7770 FE71 086F 6F72 716F 6E6E"            /* ð.­owpþq.oorqonn */
+	$"6C6C FB6E 026D 6E6D FE6C 056D 6A69 696A"            /* llûn.mnmþl.mjiij */
+	$"69FD 6A09 6969 6662 6462 6360 8EA4 DCF0"            /* iýjÆiifbdbc`Ž¤Üð */
+	$"0091 D5F0 0992 686B 6D70 6B69 6768 67FE"            /* .‘ÕðÆ’hkmpkighgþ */
+	$"6900 68FE 6500 67FE 6805 6767 6867 6564"            /* i.hþe.gþh.gghged */
+	$"FD65 0E66 6564 6465 6564 6560 605C 615D"            /* ýe.feddeede``\a] */
+	$"7B92 AFF0 0D96 6C6F 7174 6F6F 7072 706E"            /* {’¯ð.–loqtooprpn */
+	$"6F6F 6EFE 6B00 6DFE 6E05 6D6D 6E6D 6B6A"            /* oonþk.mþn.mmnmkj */
+	$"FD6B 0E6C 6B6A 6A6B 6B69 6A69 6A65 6861"            /* ýk.lkjjkkijijeha */
+	$"7F96 AFF0 0897 6D70 7275 706F 6F71 FD6F"            /* .–¯ð.—mprupooqýo */
+	$"006E FE6B 006D FE6C 056D 6D6E 6D6B 6AFD"            /* .nþk.mþl.mmnmkjý */
+	$"6B0E 6C6B 6A6A 6B6B 696A 6869 6468 627E"            /* k.lkjjkkijhidhb~ */
+	$"95DB F000 92D5 F01B AF85 6472 646D 6C67"            /* •Ûð.’Õð.¯…drdmlg */
+	$"6768 6B69 6869 6967 6669 6867 6768 6766"            /* ghkihiigfihgghgf */
+	$"6665 6566 FE68 0D67 6766 6566 6564 6660"            /* feefþh.ggfefedf` */
+	$"645E 6170 93AE F01B B186 6573 6571 7270"            /* d^ap“®ð.±†eseqrp */
+	$"7171 6F6F 6E6F 6F6D 6C6F 6E6D 6D6E 6D6C"            /* qqoonoomlonmmnml */
+	$"6C6B 6B6C FE6E 0D6D 6D6C 6B6C 6B69 6C69"            /* lkklþn.mmlklkili */
+	$"6E67 6774 97AE F007 B087 6775 6772 726F"            /* nggt—®ð.°‡gugrro */
+	$"FE70 106F 6E6F 6F6D 6C6F 6C6B 6B6E 6D6C"            /* þp.onoomlolkknml */
+	$"6C6B 6B6C FE6E 0D6D 6D6C 6B6C 6B69 6C68"            /* lkklþn.mmlklkilh */
+	$"6D66 6775 96DA F000 89D4 F007 AC89 6276"            /* mfgu–Úð.‰Ôð.¬‰bv */
+	$"6B6A 6767 FE6B 0E69 686A 6B6A 696A 6A6B"            /* kjggþk.ihjkjijjk */
+	$"6C67 6768 6869 FD6A 0C69 6867 6666 6564"            /* lgghhiýj.ihgffed */
+	$"6562 5E59 7095 ACF0 19AC 8962 766F 7070"            /* eb^Yp•¬ð.¬‰bvopp */
+	$"7173 7071 6F6E 7071 706F 7070 7172 6D6D"            /* qspqonpqpoppqrmm */
+	$"6E6E 6FFD 700C 6F6E 6D6C 6C6B 696B 6B68"            /* nnoýp.onmllkikkh */
+	$"6377 99AC F019 AD8B 6478 7070 6F70 7271"            /* cw™¬ð.­‹dxppoprq */
+	$"716F 6E70 7170 6F6E 6E6F 726D 6D6E 6E6F"            /* qonpqponnormmnno */
+	$"FD70 0C6F 6E6D 6C6C 6B6A 6B6A 6762 779A"            /* ýp.onmllkjkjgbwš */
+	$"D9F0 0086 D3F0 0A96 9559 6A6A 6567 686C"            /* Ùð.†Óð–•Yjjeghl */
+	$"6D6C FE6D 1A6B 6D6B 6C6D 6D6A 6B6C 6B6B"            /* mlþm.kmklmmjklkk */
+	$"6D6C 6A6A 6968 6769 6666 6263 6257 788F"            /* mljjihgiffbcbWx */
+	$"AAF0 0A96 9458 6E70 6E71 7071 7372 FE73"            /* ªð–”Xnpnqpqsrþs */
+	$"1A71 7371 7273 7370 7172 7171 7372 7070"            /* .qsqrsspqrqqsrpp */
+	$"6F6E 6D6A 6A6C 6969 685D 7E93 AAF0 2896"            /* onmjjliih]~“ªð(– */
+	$"985D 6F70 6D70 7071 7372 7372 716F 716F"            /* ˜]opmppqsrsrqoqo */
+	$"7071 7370 7172 7171 7372 7070 6F6E 6D6C"            /* pqspqrqqsrpponml */
+	$"6B6C 6969 685D 7E92 D8F0 0080 D2F0 0EA3"            /* kliih]~’Øð.€Òð.£ */
+	$"926D 646A 6769 686D 6C6E 6E6D 6B6D FE6C"            /* ’mdjgihmlnnmkmþl */
+	$"0A6B 6C6C 6B6B 6C6D 6C6A 6A68 FE67 0666"            /* Âkllkklmljjhþg.f */
+	$"5E66 6266 818C A8F0 0EA2 9171 6973 7172"            /* ^fbfŒ¨ð.¢‘qisqr */
+	$"6C73 7274 7473 7173 FE72 1471 7272 7171"            /* lsrttsqsþr.qrrqq */
+	$"7273 7270 706E 6D6D 6C6C 676E 686C 8790"            /* rsrppnmmllgnhl‡ */
+	$"A8F0 0EA6 9672 6972 7071 6D73 7274 7471"            /* ¨ð.¦–rirpqmsrttq */
+	$"6F71 FE70 0A71 7272 7171 7273 7270 706E"            /* oqþpÂqrrqqrsrppn */
+	$"FE6D 066C 666D 686C 8791 D7F0 007A D1F0"            /* þm.lfmhl‡‘×ð.zÑð */
+	$"2498 9784 6265 696A 696A 6C6D 6D6B 6D6D"            /* $˜—„beijijlmmkmm */
+	$"6C6B 6B6C 6C6A 6A6C 6E6C 6A6A 6968 6767"            /* lkklljjlnljjihgg */
+	$"6360 6077 908F A6F0 2497 9B8A 6B6F 716F"            /* c``w¦ð$—›Škoqo */
+	$"6F70 7273 7371 7373 7271 7172 7270 7072"            /* oprssqssrqqrrppr */
+	$"7472 7070 6F6E 6D6E 6C6A 697D 9695 A6F0"            /* trpponmnlji}–•¦ð */
+	$"249C 9C8A 6A6E 7170 6F70 7272 716F 7171"            /* $œœŠjnqpoprrqoqq */
+	$"706F 7172 7270 7072 7472 7070 6F6E 6D6E"            /* poqrrpprtrpponmn */
+	$"6B69 687D 9695 D6F0 0074 D0F0 229F 9397"            /* kih}–•Öð.tÐð"Ÿ“— */
+	$"7E6B 636B 666A 6B6B 676A 6E6B 6D6D 6B6A"            /* ~kckfjkkgjnkmmkj */
+	$"6B69 696D 696A 686B 646A 615F 7181 9692"            /* kiimijhkdja_q–’ */
+	$"A4F0 22A3 979B 8474 6D71 6C70 7274 7073"            /* ¤ð"£—›„tmqlprtps */
+	$"7471 7373 7170 716F 6F73 6F70 6E71 6A70"            /* tqssqpqoosopnqjp */
+	$"6C68 7787 9C98 A4F0 22A2 969A 8473 6C71"            /* lhw‡œ˜¤ð"¢–š„slq */
+	$"6C70 7173 6F72 7471 7373 7170 716F 6F73"            /* lpqsortqssqpqoos */
+	$"6F70 6E6F 686E 6865 7586 9C98 D5F0 006B"            /* opnohnheu†œ˜Õð.k */
+	$"CEF0 1F99 958F 886C 5F66 6A6C 6A6C 6A66"            /* Îð.™•ˆl_fjljljf */
+	$"696B 6E6C 6A6B 6D6D 6666 6865 5F62 6986"            /* iknljkmmffhe_bi† */
+	$"888F A8A1 F01F 9C99 9691 7265 6C71 7573"            /* ˆ¨¡ð.œ™–‘relqus */
+	$"7573 6F72 7174 7270 7173 736C 6C6E 6B65"            /* usorqtrpqssllnke */
+	$"6873 8F8D 93AC A1F0 1F9B 9A95 9072 656C"            /* hs“¬¡ð.›š•rel */
+	$"7174 7274 726E 7171 7472 7071 7373 6C6C"            /* qtrtrnqqtrpqssll */
+	$"6E69 6366 6F8C 8C93 ACD4 F000 62CD F01C"            /* nicfoŒŒ“¬Ôð.bÍð. */
+	$"9D93 948A 918C 7856 6275 6864 666A 6C6C"            /* “”Š‘ŒxVbuhdfjll */
+	$"6969 6B6B 6260 6074 8787 8398 919E F01C"            /* iikkb``t‡‡ƒ˜‘žð. */
+	$"9E97 9A90 9792 805F 6B7E 726E 7070 7272"            /* ž—š—’€_k~rnpprr */
+	$"6F6F 7171 6866 667A 8D8D 8A9D 939E F01C"            /* ooqqhffzŠ“žð. */
+	$"A098 9A90 9792 7F5E 6A7D 716D 6F70 7272"            /*  ˜š—’.^j}qmoprr */
+	$"6F6F 7171 6866 6678 8B8B 879B 92D2 F000"            /* ooqqhffx‹‹‡›’Òð. */
+	$"56CB F018 9D9A 958B 928E 968F 8479 7774"            /* VËð.š•‹’Ž–„ywt */
+	$"7373 7275 7C81 878A 8786 908F 9D9A F018"            /* ssru|‡Š‡†šð. */
+	$"A1A0 9B91 9896 9F99 8F84 827B 7979 787B"            /* ¡ ›‘˜–Ÿ™„‚{yyx{ */
+	$"8287 8D90 8D8C 9695 A29A F018 A3A0 9B91"            /* ‚‡Œ–•¢šð.£ ›‘ */
+	$"9896 9E98 8D82 817B 7979 787B 8287 8D90"            /* ˜–ž˜‚{yyx{‚‡ */
+	$"8B8A 9493 A1D0 F000 47C8 F013 999D 958F"            /* ‹Š”“¡Ðð.GÈð.™• */
+	$"908C 8B8C 8D8E 8D8D 8C8D 908B 9691 8DA7"            /* Œ‹ŒŽŒ‹–‘§ */
+	$"95F0 139D A19B 989A 9392 9395 9490 9190"            /* •ð.¡›˜š“’“•”‘ */
+	$"9194 909A 9792 AC95 F013 9EA2 9B97 9993"            /* ‘”š—’¬•ð.ž¢›—™“ */
+	$"9192 9594 9292 9192 9591 9993 91AA CEF0"            /* ‘’•”’’‘’•‘™“‘ªÎð */
+	$"0032 C5F0 0C98 8C95 9C98 9494 9694 9C9D"            /* .2Åð.˜Œ•œ˜””–”œ */
+	$"949E 8EF0 0C9E 9499 A09C 9998 9795 9D9E"            /* ”žŽð.ž”™ œ™˜—•ž */
+	$"959F 8EF0 049E 939A A19D FE99 0497 9FA0"            /* •ŸŽð.ž“š¡þ™.—Ÿ  */
+	$"97A1 CAF0 0006 81F0 81F0 81F0 0006 81F0"            /* —¡Êð..ððð..ð */
+	$"81F0 81F0 00FF"                                     /* ðð.ÿ */
+};
+
+data 'actb' (128) {
+	$"0000 0000 0000 0004 0000 FFFF FFFF FFFF"            /* ..........ÿÿÿÿÿÿ */
+	$"0001 0000 0000 0000 0002 0000 0000 0000"            /* ................ */
+	$"0003 0000 0000 0000 0004 FFFF FFFF FFFF"            /* ..........ÿÿÿÿÿÿ */
+};
+
+data 'ictb' (128) {
+	$"0000 0000 0000 0000 0000 0000 0000 0000"            /* ................ */
+};
+
diff --git a/mac_installer/Uninstaller.rsrc b/mac_installer/Uninstaller.rsrc
new file mode 100644
index 0000000..ac87aed
Binary files /dev/null and b/mac_installer/Uninstaller.rsrc differ
diff --git a/mac_installer/WaitPermissions.cpp b/mac_installer/WaitPermissions.cpp
new file mode 100644
index 0000000..d84d722
--- /dev/null
+++ b/mac_installer/WaitPermissions.cpp
@@ -0,0 +1,126 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2009 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/* WaitPermissions.cpp */
+
+#define CREATE_LOG 1    /* for debugging */
+
+#include <Carbon/Carbon.h>
+
+#include <sys/stat.h>   // for stat
+#include <unistd.h>	// getuid
+#include <dirent.h>
+
+void print_to_log_file(const char *format, ...);
+void strip_cr(char *buf);
+
+// When we first create the boinc_master and boinc_project groups and add the 
+// current user to the  new groups, there is a delay before the new group 
+// membership is recognized.  If we launch the BOINC Manager too soon, it will 
+// fail with either a -1037 or -1200 permissions error, so we wait until the 
+// current user can access the projects directory and the switcher application.
+//
+// Apparently, in order to get the changed permissions / group membership, we must 
+// launch a new process belonging to the user.  It may also need to be in a new 
+// process group or new session. Neither system() nor popen() works, even after 
+// setting the uid and euid back to the logged in user, but LSOpenFSRef() does.
+// This tiny application loops until it can access the switcher application.
+
+int main(int argc, char *argv[])
+{
+    struct stat             sbuf;
+    int                     i;
+    int                     retval = 0;
+    DIR                     *dirp;
+    
+    printf("WaitPermissions launched\n");
+    
+    for (i=0; i<180; i++) {     // Limit delay to 3 minutes
+    
+        retval = stat("/Library/Application Support/BOINC Data/projects", &sbuf);
+        if (retval) {
+            if (errno == EACCES) {      // if stat() had permissions error
+                sleep(1);
+                continue;
+            }
+        } else {      // projects directory exists
+            dirp = opendir("/Library/Application Support/BOINC Data/projects");
+            if (dirp) {
+                closedir(dirp);
+            } else {
+                sleep(1);    // Our boinc_project group membership may not yet be active
+                continue;
+            }
+        }
+        
+        retval = stat("/Library/Application Support/BOINC Data/switcher/switcher", &sbuf);
+//        print_to_log_file("WaitPermissions: stat(switcher path) returned %d, uid = %d, euid = %d\n", retval, (int)getuid(), (int)geteuid());
+        if (retval == 0) {
+            return 0;
+        }
+        sleep(1);    // Our boinc_master group membership may not yet be active
+    }
+    return retval;
+}
+
+void strip_cr(char *buf)
+{
+    char *theCR;
+    
+    theCR = strrchr(buf, '\n');
+    if (theCR)
+        *theCR = '\0';
+    theCR = strrchr(buf, '\r');
+    if (theCR)
+        *theCR = '\0';
+}
+
+// For debugging
+void print_to_log_file(const char *format, ...) {
+#if CREATE_LOG
+    FILE *f;
+    va_list args;
+    char path[256], buf[256];
+    time_t t;
+    strcpy(path, "/Users/Shared/test_log.txt");
+    //    strcpy(path, "/Users/");
+    //    strcat(path, getlogin());
+    //    strcat(path, "/Documents/test_log.txt");
+    f = fopen(path, "a");
+    if (!f) return;
+    
+    //  freopen(buf, "a", stdout);
+    //  freopen(buf, "a", stderr);
+    
+    time(&t);
+    strcpy(buf, asctime(localtime(&t)));
+    strip_cr(buf);
+    
+    fputs(buf, f);
+    fputs("   ", f);
+    
+    va_start(args, format);
+    vfprintf(f, format, args);
+    va_end(args);
+    
+    fputs("\n", f);
+    fflush(f);
+    fclose(f);
+    chmod(path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+    
+#endif
+}
diff --git a/mac_installer/make_CharityEngine.sh b/mac_installer/make_CharityEngine.sh
new file mode 100644
index 0000000..4086f79
--- /dev/null
+++ b/mac_installer/make_CharityEngine.sh
@@ -0,0 +1,392 @@
+#!/bin/csh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+##
+# Script to convert Macintosh BOINC installer to Charity Engine Desktop installer
+# updated 12/14/11 by Charlie Fenton for BOINC 6.8.34 / 6.12.44 / 7.0.3 and later
+# updated 8/2/12 by Charlie Fenton to code sign the installer and uninstaller
+##
+
+## Usage:
+## First put the following files into a working directory:
+##     the BOINC installer to be converted
+##     the Uninstall BOINC application to be converted
+##     CE_ReadMe.rtf
+##     CharityEngine.icns
+##     CE_Install.icns
+##     CE_uninstall.icns
+##     COPYING
+##     COPYING.LESSER
+##     COPYRIGHT
+##     skins directory containing Charity Engine skin (optional)
+##     acct_mgr_url.xml (to have BOINC automatically connect to Account Manager)
+##     CE_ss_logo.png (for screensaver coordinator)
+##     CE_ss_logo.tiff (for screensaver coordinator)
+##     CE_saver directory containing Charity Engine default screensaver (if non-standard) 
+##        and associated files, including:
+##          CE_ss_logo.png
+##
+## NOTE: This script requires Mac OS 10.6 or later, and uses XCode developer
+##   tools.  So you must have installed XCode Developer Tools on the Mac 
+##   before running this script.
+##
+## If you wish to code sign the installer and uninstaller, create a file 
+## ~/BOINCCodeSignIdentity.txt whose first line is the code signing identity
+##
+## cd to the working directory:
+##
+## Invoke this script with the three parts of version number as arguments.  
+## For example, if the version is 3.2.1:
+##     sh [path_to_this_script] 3 2 1
+##
+## This will create a directory "BOINC_Installer" in the parent directory of 
+## the current directory
+##
+## For different branding, modify the following 9 variables:
+PR_PATH="CE_Pkg_Root"
+IR_PATH="CE_Installer_Resources"
+SCRIPTS_PATH="CE_Installer_Scripts"
+NEW_DIR_PATH="New_Release_CE_$1_$2_$3"
+README_FILE="CE-ReadMe.rtf"
+## BRANDING_FILE="CE-Branding"
+BRANDING_INFO="BrandId=3"
+ICNS_FILE="CharityEngine.icns"
+INSTALLER_ICNS_FILE="CE_Install.icns"
+UNINSTALLER_ICNS_FILE="CE_uninstall.icns"
+SAVER_DIR="CE_saver"
+SAVER_SYSPREF_ICON="CE_ss_logo.tiff"
+SAVER_LOGO="CE_ss_logo.png"
+BRAND_NAME="Charity Engine"
+MANAGER_NAME="Charity Engine Desktop"
+LC_BRAND_NAME="Charity Engine"
+SOURCE_PKG_PATH="BOINC Installer.app/Contents/Resources/BOINC.pkg/Contents"
+ZIP_BRAND_NAME="ce"
+
+if [ $# -lt 3 ]; then
+echo "Usage:"
+echo "   cd working_directory"
+echo "   sh [path_to_this_script] major_version minor_version revision_number"
+echo ""
+echo "See comments at start of script for more info."
+echo ""
+exit 1
+fi
+
+#pushd ./
+WorkingDirPath=$PWD
+
+## Make sure sed uses UTF-8 text encoding
+unset LC_CTYPE
+unset LC_MESSAGES
+unset __CF_USER_TEXT_ENCODING
+export LANG=en_US.UTF-8
+
+sudo rm -dfR "${IR_PATH}"
+sudo rm -dfR "${PR_PATH}"
+sudo rm -dfR "${SCRIPTS_PATH}"
+
+mkdir -p "${IR_PATH}"
+mkdir -p "${PR_PATH}"
+mkdir -p "${SCRIPTS_PATH}"
+
+sudo rm -dfR "${NEW_DIR_PATH}/"
+
+mkdir -p "${NEW_DIR_PATH}/"
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686"
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras"
+
+cp -fp "${SOURCE_PKG_PATH}/Archive.pax.gz" "${PR_PATH}/"
+cd "${PR_PATH}"
+sudo gunzip ./Archive.pax.gz
+sudo pax -r -pe -f Archive.pax
+rm -df "Archive.pax"
+cd ..
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/License.rtf" "${IR_PATH}/"
+cp -fp "${README_FILE}" "${IR_PATH}/ReadMe.rtf"
+# Update version number
+sed -i "" s/"<VER_NUM>"/"$1.$2.$3"/g "${IR_PATH}/ReadMe.rtf"
+
+# Create the installer's preinstall and preupgrade scripts from the standard preinstall script
+cp -fp "${SOURCE_PKG_PATH}/Resources/preinstall" "${SCRIPTS_PATH}/"
+
+sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+
+cp -fp "${SCRIPTS_PATH}/preinstall" "${SCRIPTS_PATH}/preupgrade"
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/postinstall" "${SCRIPTS_PATH}/"
+cp -fp "${SOURCE_PKG_PATH}/Resources/postupgrade" "${SCRIPTS_PATH}/"
+
+cp -fpR "${SOURCE_PKG_PATH}/Resources/PostInstall.app" "${IR_PATH}/"
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/all_projects_list.xml" "${IR_PATH}/"
+
+##### We've decided not to customize BOINC Data directory name for branding
+#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data"
+#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data/locale"
+
+mkdir -p "${PR_PATH}/Library/Application Support/BOINC Data"
+
+## If skins folder is present. copy it into BOINC Data folder
+if [ -d "skins" ]; then
+    sudo cp -fR "skins" "${PR_PATH}/Library/Application Support/BOINC Data/"
+fi
+
+## Normally, we would put the account manager URL file into the Package Root folder 
+## for delivery to the BOINC Data folder.  But if the user later installs standard 
+## BOINC (without this file), the Apple installer would then delete the file.
+## So we "hide" it in the installer's resources, and have the PostInstall script copy 
+## it into the BOINC Data folder
+##
+## If account manager URL file is present, copy it into installer resources for 
+## eventual delivery into the BOINC Data folder
+if [ -f "acct_mgr_url.xml" ]; then
+##    sudo cp -fR "acct_mgr_url.xml" "${PR_PATH}/Library/Application Support/BOINC Data/acct_mgr_url.xml"
+    sudo cp -fR "acct_mgr_url.xml" "${IR_PATH}/"
+fi
+
+## Modify for Charity Engine
+# Rename the Manager's bundle and its executable inside the bundle
+sudo mv -f "${PR_PATH}/Applications/BOINCManager.app/" "${PR_PATH}/Applications/${MANAGER_NAME}.app/"
+sudo mv -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/BOINCManager" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/${MANAGER_NAME}"
+
+# Update the Manager's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
+sudo sed -i "" s/BOINCMgr.icns/"${ICNS_FILE}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
+
+sudo chmod a+w "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${MANAGER_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the Manager's BOINCMgr.icns file
+sudo cp -fp "${ICNS_FILE}" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/${ICNS_FILE}"
+sudo rm -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/BOINCMgr.icns"
+
+# Put Branding file in both Installer Package and Application Bundle
+sudo echo ${BRANDING_INFO} > "${IR_PATH}/Branding"
+sudo cp -fp "${IR_PATH}/Branding" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/Branding"
+
+## Put Branding file into BOINC Data folder to make it available to screensaver coordinator
+sudo cp -fp "${IR_PATH}/Branding" "${PR_PATH}/Library/Application Support/BOINC Data/Branding"
+
+# Rename the screensaver coordinator bundle and its executable inside the bundle
+sudo mv -f "${PR_PATH}/Library/Screen Savers/BOINCSaver.saver" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver"
+sudo mv -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/BOINCSaver" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/${BRAND_NAME}"
+
+# Update screensaver coordinator's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Info.plist"
+
+sudo chmod a+w "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace screensaver coordinator's boinc.tiff or boinc.jpg file
+sudo rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.jpg"
+sudo cp -fp "${SAVER_SYSPREF_ICON}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.tiff"
+
+# Replace screensaver coordinator's boinc_ss_logo.png file
+sudo rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc_ss_logo.png"
+sudo cp -fp "${SAVER_LOGO}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc_ss_logo.png"
+
+# Delete the BOINC default screensaver and its associated files
+sudo rm -f "${PR_PATH}/Library/Application Support/BOINC Data/boinc_logo_black.jpg"
+
+# Copy the Charity Engine default screensaver files into BOINC Data folder
+sudo cp -fR "${SAVER_DIR}/" "${PR_PATH}/Library/Application Support/BOINC Data/"
+
+# Copy and rename the Uninstall application's bundle and rename its executable inside the bundle
+sudo cp -fpR "Uninstall BOINC.app" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+sudo mv -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/MacOS/Uninstall BOINC" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/MacOS/Uninstall ${BRAND_NAME}"
+
+# Update Uninstall application's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Info.plist"
+sudo sed -i "" s/MacUninstaller.icns/"${UNINSTALLER_ICNS_FILE}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Info.plist"
+
+sudo chmod a+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the Uninstall application's MacUninstaller.icns file
+sudo cp -fp "${UNINSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/${UNINSTALLER_ICNS_FILE}"
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/MacUninstaller.icns"
+# Remove the Uninstall application's resource file so it will show generic "Are you sure?" dialog
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/Uninstall BOINC.rsrc"
+
+sudo chown -R root:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+sudo chmod -R 755 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+
+## Fix up ownership and permissions
+sudo chown -R root:admin "${PR_PATH}"/*
+sudo chmod -R u+rw,g+rw,o+r-w "${PR_PATH}"/*
+sudo chmod 1775 "${PR_PATH}/Library"
+
+sudo chown -R 501:admin "${PR_PATH}/Library/Application Support"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${PR_PATH}/Library/Application Support"/*
+
+sudo chown -R root:admin "${IR_PATH}"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${IR_PATH}"/*
+sudo chown -R root:admin "${SCRIPTS_PATH}"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${SCRIPTS_PATH}"/*
+
+sudo cp -fp "${IR_PATH}/ReadMe.rtf" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/ReadMe.rtf"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/ReadMe.rtf"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/ReadMe.rtf"
+sudo cp -fp "COPYING" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.txt"
+sudo cp -fp "COPYRIGHT" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYRIGHT.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYRIGHT.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYRIGHT.txt"
+
+# COPYING.LESSER is part of GNU License v3
+sudo cp -fp "COPYING.LESSER" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.LESSER.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.LESSER.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.LESSER.txt"
+
+# Make temporary copies of Pkg-Info.plist and Description.plist for PackageMaker and update for this branding
+sudo cp -fp "${SOURCE_PKG_PATH}/Info.plist" "${NEW_DIR_PATH}/Pkg-Info.plist"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/Pkg-Info.plist"
+sudo chmod -R 666 "${NEW_DIR_PATH}/Pkg-Info.plist"
+if [ -f "${SOURCE_PKG_PATH}/Resources/English.lproj/Description.plist" ]; then
+    sudo cp -fp "${SOURCE_PKG_PATH}/Resources/English.lproj/Description.plist" "${NEW_DIR_PATH}"
+else
+    sudo cp -fp "${SOURCE_PKG_PATH}/Resources/en.lproj/Description.plist" "${NEW_DIR_PATH}"
+fi
+sudo chown -R 501:admin "${NEW_DIR_PATH}/Description.plist"
+sudo chmod -R 666 "${NEW_DIR_PATH}/Description.plist"
+
+# Update Pkg-Info.plist name and ensure it is in XML format
+defaults write "`pwd`/${NEW_DIR_PATH}/Pkg-Info" "CFBundleGetInfoString" "$BRAND_NAME $1.$2.$3"
+plutil -convert xml1 "`pwd`/${NEW_DIR_PATH}/Pkg-Info.plist"
+
+# Update Description.plist name and ensure it is in XML format
+defaults write "`pwd`/${NEW_DIR_PATH}/Description" "IFPkgDescriptionTitle" "$MANAGER_NAME"
+plutil -convert xml1 "`pwd`/${NEW_DIR_PATH}/Description.plist"
+
+# Copy the installer wrapper application "${BRAND_NAME} Installer.app"
+sudo cp -fpR "BOINC Installer.app" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app"
+sudo rm -dfR "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/BOINC.pkg"
+
+# Update the installer wrapper application's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Info.plist"
+sudo sed -i "" s/MacInstaller.icns/"${INSTALLER_ICNS_FILE}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Info.plist"
+
+sudo chmod a+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${MANAGER_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the installer wrapper application's MacInstaller.icns file
+sudo cp -fp "${INSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${INSTALLER_ICNS_FILE}"
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/MacInstaller.icns"
+
+# Rename the installer wrapper application's executable inside the bundle
+sudo mv -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/MacOS/BOINC Installer" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/MacOS/${BRAND_NAME} Installer"
+
+# Build the installer package inside the wrapper application's bundle
+# Because PackageMaker is now distributed separately from Xcode, we 
+# emulate the following PackageMaker command:
+###/Developer/usr/bin/packagemaker -r "${PR_PATH}" -e "${IR_PATH}" -s "${SCRIPTS_PATH}" -f "${NEW_DIR_PATH}/Pkg-Info.plist" -t "${MANAGER_NAME}" -n "$1.$2.$3" -b -o "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg"
+# Our PackageMaker emulation starts here
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources"
+
+cd "${PR_PATH}"
+
+mkbom ./ "${WorkingDirPath}/${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Archive.bom"
+
+pax -wz -x cpio -f "${WorkingDirPath}/${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Archive.pax.gz" ./
+
+cd "${WorkingDirPath}"
+
+echo "pmkrpkg1" >> "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/PkgInfo"
+
+cat >> "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/package_version" << ENDOFFILE
+major: $1
+minor: $2
+ENDOFFILE
+
+cp -fp "${NEW_DIR_PATH}/Pkg-Info.plist" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Info.plist"
+
+cp -fpR "${IR_PATH}/" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources"
+
+sudo chmod a+x "${SCRIPTS_PATH}"/*
+cp -fpR "${SCRIPTS_PATH}/" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources"
+
+# End of our PackageMaker emulation
+
+## for debugging
+## if [  $? -ne 0 ]; then
+## echo ""
+## echo "********** /Pkg-Info.plist File contents: *************"
+## echo ""
+## cp "${NEW_DIR_PATH}/Pkg-Info.plist" /dev/stdout
+## echo ""
+## echo "********** End /Pkg-Info.plist File contents *************"
+## echo ""
+## fi
+
+# Allow the installer wrapper application to modify the package's Info.plist file
+sudo chmod u+w,g+w,o+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Info.plist"
+
+# add a more complete Description.plist file to display in Installer's Customize pane
+if [ ! -d "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/en.lproj/" ]; then
+    mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/en.lproj"
+fi
+cp -fp "${NEW_DIR_PATH}/Description.plist" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/en.lproj/"
+
+# Update the installer wrapper application's creation date
+sudo touch "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app"
+
+# Remove temporary copies of Pkg-Info.plist and Description.plist
+sudo rm ${NEW_DIR_PATH}/Pkg-Info.plist
+sudo rm ${NEW_DIR_PATH}/Description.plist
+
+# Remove temporary directories
+sudo rm -dfR "${IR_PATH}"
+sudo rm -dfR "${PR_PATH}"
+sudo rm -dfR "${SCRIPTS_PATH}"
+
+## If you wish to code sign the installer and uninstaller, create a file 
+## ~/BOINCCodeSignIdentity.txt whose first line is the code signing identity
+##
+## Code signing using a registered Apple Developer ID is necessary for GateKeeper 
+## with default settings to allow running downloaded applications under OS 10.8
+if [ -e "${HOME}/BOINCCodeSignIdentity.txt" ]; then
+    exec 8<"${HOME}/BOINCCodeSignIdentity.txt"
+    read -u 8 SIGNINGIDENTITY
+
+    # Code Sign the BOINC installer if we have a signing identity
+    sudo codesign -f -s "${SIGNINGIDENTITY}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app"
+
+    # Code Sign the BOINC uninstaller if we have a signing identity
+    sudo codesign -f -s "${SIGNINGIDENTITY}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+fi
+
+# Compress the products
+cd ${NEW_DIR_PATH}
+## Use ditto instead of zip utility to preserve resource forks and Finder attributes (custom icon, hide extension) 
+ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686" "${ZIP_BRAND_NAME}_$1.$2.$3_macOSX_i686.zip"
+##### We've decided not to create branded command-line executables; they are identical to standard ones
+#### ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_i686-apple-darwin" "${ZIP_BRAND_NAME}_$1.$2.$3_i686-apple-darwin.zip"
+##### We've decided not to create branded symbol table file; it is identical to standard one
+#### ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables" "${ZIP_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables.zip"
+
+# Force Finder to recognize changed icons by deleting the uncompressed products and expanding the zip file 
+sudo rm -dfR "${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686"
+open "${ZIP_BRAND_NAME}_$1.$2.$3_macOSX_i686.zip"
+
+#popd
+cd "${WorkingDirPath}"
+exit 0
diff --git a/mac_installer/make_GridRepublic.sh b/mac_installer/make_GridRepublic.sh
new file mode 100644
index 0000000..f3f9e5b
--- /dev/null
+++ b/mac_installer/make_GridRepublic.sh
@@ -0,0 +1,390 @@
+#!/bin/csh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+##
+# Script to convert Macintosh BOINC installer to GridRepublic Desktop installer
+# updated 12/7/11 by Charlie Fenton for BOINC 6.8.33 / 6.12.44 / 7.0.3 and later
+# updated 8/2/12 by Charlie Fenton to code sign the installer and uninstaller
+##
+
+## Usage:
+## First put the following files into a working directory:
+##     the BOINC installer to be converted
+##     the Uninstall BOINC application to be converted
+##     GR_ReadMe.rtf
+##     gridrepublic.icns
+##     GR_install.icns
+##     GR_uninstall.icns
+##     COPYING
+##     COPYING.LESSER
+##     COPYRIGHT
+##     skins directory containing GridRepublic skin (optional)
+##     acct_mgr_url.xml (to have BOINC automatically connect to Account Manager)
+##     gridrepublic.tiff (for screensaver coordinator)
+##     gridrepublic_ss_logo.png (for screensaver coordinator)
+##     GR_saver directory containing GridRepublic default screensaver and associated files, including:
+##          gridrepublic_ss_logo.jpg
+##
+## NOTE: This script requires Mac OS 10.6 or later, and uses XCode developer
+##   tools.  So you must have installed XCode Developer Tools on the Mac 
+##   before running this script.
+##
+## If you wish to code sign the installer and uninstaller, create a file 
+## ~/BOINCCodeSignIdentity.txt whose first line is the code signing identity
+##
+## cd to the working directory:
+##
+## Invoke this script with the three parts of version number as arguments.  
+## For example, if the version is 3.2.1:
+##     sh [path_to_this_script] 3 2 1
+##
+## This will create a directory "BOINC_Installer" in the parent directory of 
+## the current directory
+##
+## For different branding, modify the following 9 variables:
+PR_PATH="GR_Pkg_Root"
+IR_PATH="GR_Installer_Resources"
+SCRIPTS_PATH="GR_Installer_Scripts"
+NEW_DIR_PATH="New_Release_GR_$1_$2_$3"
+README_FILE="GR-ReadMe.rtf"
+## BRANDING_FILE="GR-Branding"
+BRANDING_INFO="BrandId=1"
+ICNS_FILE="gridrepublic.icns"
+INSTALLER_ICNS_FILE="GR_install.icns"
+UNINSTALLER_ICNS_FILE="GR_uninstall.icns"
+SAVER_DIR="GR_saver"
+SAVER_SYSPREF_ICON="gridrepublic.tiff"
+SAVER_LOGO="gridrepublic_ss_logo.png"
+BRAND_NAME="GridRepublic"
+MANAGER_NAME="GridRepublic Desktop"
+LC_BRAND_NAME="gridrepublic"
+SOURCE_PKG_PATH="BOINC Installer.app/Contents/Resources/BOINC.pkg/Contents"
+
+if [ $# -lt 3 ]; then
+echo "Usage:"
+echo "   cd working_directory"
+echo "   sh [path_to_this_script] major_version minor_version revision_number"
+echo ""
+echo "See comments at start of script for more info."
+echo ""
+exit 1
+fi
+
+#pushd ./
+WorkingDirPath=$PWD
+
+## Make sure sed uses UTF-8 text encoding
+unset LC_CTYPE
+unset LC_MESSAGES
+unset __CF_USER_TEXT_ENCODING
+export LANG=en_US.UTF-8
+
+sudo rm -dfR "${IR_PATH}"
+sudo rm -dfR "${PR_PATH}"
+sudo rm -dfR "${SCRIPTS_PATH}"
+
+mkdir -p "${IR_PATH}"
+mkdir -p "${PR_PATH}"
+mkdir -p "${SCRIPTS_PATH}"
+
+sudo rm -dfR "${NEW_DIR_PATH}/"
+
+mkdir -p "${NEW_DIR_PATH}/"
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686"
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras"
+
+cp -fp "${SOURCE_PKG_PATH}/Archive.pax.gz" "${PR_PATH}/"
+cd "${PR_PATH}"
+sudo gunzip ./Archive.pax.gz
+sudo pax -r -pe -f Archive.pax
+rm -df "Archive.pax"
+cd ..
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/License.rtf" "${IR_PATH}/"
+cp -fp "${README_FILE}" "${IR_PATH}/ReadMe.rtf"
+# Update version number
+sed -i "" s/"<VER_NUM>"/"$1.$2.$3"/g "${IR_PATH}/ReadMe.rtf"
+
+# Create the installer's preinstall and preupgrade scripts from the standard preinstall script
+cp -fp "${SOURCE_PKG_PATH}/Resources/preinstall" "${SCRIPTS_PATH}/"
+
+sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+
+cp -fp "${SCRIPTS_PATH}/preinstall" "${SCRIPTS_PATH}/preupgrade"
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/postinstall" "${SCRIPTS_PATH}/"
+cp -fp "${SOURCE_PKG_PATH}/Resources/postupgrade" "${SCRIPTS_PATH}/"
+
+cp -fpR "${SOURCE_PKG_PATH}/Resources/PostInstall.app" "${IR_PATH}/"
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/all_projects_list.xml" "${IR_PATH}/"
+
+##### We've decided not to customize BOINC Data directory name for branding
+#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data"
+#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data/locale"
+
+mkdir -p "${PR_PATH}/Library/Application Support/BOINC Data"
+
+## If skins folder is present. copy it into BOINC Data folder
+if [ -d "skins" ]; then
+    sudo cp -fR "skins" "${PR_PATH}/Library/Application Support/BOINC Data/"
+fi
+
+## Normally, we would put the account manager URL file into the Package Root folder 
+## for delivery to the BOINC Data folder.  But if the user later installs standard 
+## BOINC (without this file), the Apple installer would then delete the file.
+## So we "hide" it in the installer's resources, and have the PostInstall script copy 
+## it into the BOINC Data folder
+##
+## If account manager URL file is present, copy it into installer resources for 
+## eventual delivery into the BOINC Data folder
+if [ -f "acct_mgr_url.xml" ]; then
+##    sudo cp -fR "acct_mgr_url.xml" "${PR_PATH}/Library/Application Support/BOINC Data/acct_mgr_url.xml"
+    sudo cp -fR "acct_mgr_url.xml" "${IR_PATH}/"
+fi
+
+## Modify for Grid Republic
+# Rename the Manager's bundle and its executable inside the bundle
+sudo mv -f "${PR_PATH}/Applications/BOINCManager.app/" "${PR_PATH}/Applications/${MANAGER_NAME}.app/"
+sudo mv -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/BOINCManager" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/${MANAGER_NAME}"
+
+# Update the Manager's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
+sudo sed -i "" s/BOINCMgr.icns/"${ICNS_FILE}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
+
+sudo chmod a+w "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${MANAGER_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the Manager's BOINCMgr.icns file
+sudo cp -fp "${ICNS_FILE}" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/${ICNS_FILE}"
+sudo rm -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/BOINCMgr.icns"
+
+# Put Branding file in both Installer Package and Application Bundle
+sudo echo ${BRANDING_INFO} > "${IR_PATH}/Branding"
+sudo cp -fp "${IR_PATH}/Branding" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/Branding"
+
+## Put Branding file into BOINC Data folder to make it available to screensaver coordinator
+sudo cp -fp "${IR_PATH}/Branding" "${PR_PATH}/Library/Application Support/BOINC Data/Branding"
+
+# Rename the screensaver coordinator bundle and its executable inside the bundle
+sudo mv -f "${PR_PATH}/Library/Screen Savers/BOINCSaver.saver" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver"
+sudo mv -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/BOINCSaver" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/${BRAND_NAME}"
+
+# Update screensaver coordinator's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Info.plist"
+
+sudo chmod a+w "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace screensaver coordinator's boinc.tiff or boinc.jpg file
+sudo rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.jpg"
+sudo cp -fp "${SAVER_SYSPREF_ICON}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.tiff"
+
+# Replace screensaver coordinator's boinc_ss_logo.png file
+sudo rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc_ss_logo.png"
+sudo cp -fp "${SAVER_LOGO}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc_ss_logo.png"
+
+# Delete the BOINC default screensaver and its associated files
+sudo rm -f "${PR_PATH}/Library/Application Support/BOINC Data/boinc_logo_black.jpg"
+
+# Copy the GridRepublic default screensaver files into BOINC Data folder
+sudo cp -fR "${SAVER_DIR}/" "${PR_PATH}/Library/Application Support/BOINC Data/"
+
+# Copy and rename the Uninstall application's bundle and rename its executable inside the bundle
+sudo cp -fpR "Uninstall BOINC.app" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+sudo mv -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/MacOS/Uninstall BOINC" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/MacOS/Uninstall ${BRAND_NAME}"
+
+# Update Uninstall application's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Info.plist"
+sudo sed -i "" s/MacUninstaller.icns/"${UNINSTALLER_ICNS_FILE}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Info.plist"
+
+sudo chmod a+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the Uninstall application's MacUninstaller.icns file
+sudo cp -fp "${UNINSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/${UNINSTALLER_ICNS_FILE}"
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/MacUninstaller.icns"
+# Remove the Uninstall application's resource file so it will show generic "Are you sure?" dialog
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/Uninstall BOINC.rsrc"
+
+sudo chown -R root:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+sudo chmod -R 755 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+
+## Fix up ownership and permissions
+sudo chown -R root:admin "${PR_PATH}"/*
+sudo chmod -R u+rw,g+rw,o+r-w "${PR_PATH}"/*
+sudo chmod 1775 "${PR_PATH}/Library"
+
+sudo chown -R 501:admin "${PR_PATH}/Library/Application Support"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${PR_PATH}/Library/Application Support"/*
+
+sudo chown -R root:admin "${IR_PATH}"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${IR_PATH}"/*
+sudo chown -R root:admin "${SCRIPTS_PATH}"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${SCRIPTS_PATH}"/*
+
+sudo cp -fp "${IR_PATH}/ReadMe.rtf" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/ReadMe.rtf"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/ReadMe.rtf"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/ReadMe.rtf"
+sudo cp -fp "COPYING" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.txt"
+sudo cp -fp "COPYRIGHT" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYRIGHT.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYRIGHT.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYRIGHT.txt"
+
+# COPYING.LESSER is part of GNU License v3
+sudo cp -fp "COPYING.LESSER" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.LESSER.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.LESSER.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.LESSER.txt"
+
+# Make temporary copies of Pkg-Info.plist and Description.plist for PackageMaker and update for this branding
+sudo cp -fp "${SOURCE_PKG_PATH}/Info.plist" "${NEW_DIR_PATH}/Pkg-Info.plist"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/Pkg-Info.plist"
+sudo chmod -R 666 "${NEW_DIR_PATH}/Pkg-Info.plist"
+if [ -f "${SOURCE_PKG_PATH}/Resources/English.lproj/Description.plist" ]; then
+    sudo cp -fp "${SOURCE_PKG_PATH}/Resources/English.lproj/Description.plist" "${NEW_DIR_PATH}"
+else
+    sudo cp -fp "${SOURCE_PKG_PATH}/Resources/en.lproj/Description.plist" "${NEW_DIR_PATH}"
+fi
+sudo chown -R 501:admin "${NEW_DIR_PATH}/Description.plist"
+sudo chmod -R 666 "${NEW_DIR_PATH}/Description.plist"
+
+# Update Pkg-Info.plist name and ensure it is in XML format
+defaults write "`pwd`/${NEW_DIR_PATH}/Pkg-Info" "CFBundleGetInfoString" "$BRAND_NAME $1.$2.$3"
+plutil -convert xml1 "`pwd`/${NEW_DIR_PATH}/Pkg-Info.plist"
+
+# Update Description.plist name and ensure it is in XML format
+defaults write "`pwd`/${NEW_DIR_PATH}/Description" "IFPkgDescriptionTitle" "$MANAGER_NAME"
+plutil -convert xml1 "`pwd`/${NEW_DIR_PATH}/Description.plist"
+
+# Copy the installer wrapper application "${BRAND_NAME} Installer.app"
+sudo cp -fpR "BOINC Installer.app" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app"
+sudo rm -dfR "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/BOINC.pkg"
+
+# Update the installer wrapper application's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Info.plist"
+sudo sed -i "" s/MacInstaller.icns/"${INSTALLER_ICNS_FILE}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Info.plist"
+
+sudo chmod a+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${MANAGER_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the installer wrapper application's MacInstaller.icns file
+sudo cp -fp "${INSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${INSTALLER_ICNS_FILE}"
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/MacInstaller.icns"
+
+# Rename the installer wrapper application's executable inside the bundle
+sudo mv -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/MacOS/BOINC Installer" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/MacOS/${BRAND_NAME} Installer"
+
+# Build the installer package inside the wrapper application's bundle
+# Because PackageMaker is now distributed separately from Xcode, we 
+# emulate the following PackageMaker command:
+###/Developer/usr/bin/packagemaker -r "${PR_PATH}" -e "${IR_PATH}" -s "${SCRIPTS_PATH}" -f "${NEW_DIR_PATH}/Pkg-Info.plist" -t "${MANAGER_NAME}" -n "$1.$2.$3" -b -o "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg"
+# Our PackageMaker emulation starts here
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources"
+
+cd "${PR_PATH}"
+
+mkbom ./ "${WorkingDirPath}/${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Archive.bom"
+
+pax -wz -x cpio -f "${WorkingDirPath}/${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Archive.pax.gz" ./
+
+cd "${WorkingDirPath}"
+
+echo "pmkrpkg1" >> "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/PkgInfo"
+
+cat >> "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/package_version" << ENDOFFILE
+major: $1
+minor: $2
+ENDOFFILE
+
+cp -fp "${NEW_DIR_PATH}/Pkg-Info.plist" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Info.plist"
+
+cp -fpR "${IR_PATH}/" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources"
+
+sudo chmod a+x "${SCRIPTS_PATH}"/*
+cp -fpR "${SCRIPTS_PATH}/" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources"
+
+# End of our PackageMaker emulation
+
+## for debugging
+## if [  $? -ne 0 ]; then
+## echo ""
+## echo "********** /Pkg-Info.plist File contents: *************"
+## echo ""
+## cp "${NEW_DIR_PATH}/Pkg-Info.plist" /dev/stdout
+## echo ""
+## echo "********** End /Pkg-Info.plist File contents *************"
+## echo ""
+## fi
+
+# Allow the installer wrapper application to modify the package's Info.plist file
+sudo chmod u+w,g+w,o+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Info.plist"
+
+# add a more complete Description.plist file to display in Installer's Customize pane
+if [ ! -d "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/en.lproj/" ]; then
+    mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/en.lproj"
+fi
+cp -fp "${NEW_DIR_PATH}/Description.plist" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/en.lproj/"
+
+# Update the installer wrapper application's creation date
+sudo touch "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app"
+
+# Remove temporary copies of Pkg-Info.plist and Description.plist
+sudo rm ${NEW_DIR_PATH}/Pkg-Info.plist
+sudo rm ${NEW_DIR_PATH}/Description.plist
+
+# Remove temporary directories
+sudo rm -dfR "${IR_PATH}"
+sudo rm -dfR "${PR_PATH}"
+sudo rm -dfR "${SCRIPTS_PATH}"
+
+## If you wish to code sign the installer and uninstaller, create a file 
+## ~/BOINCCodeSignIdentity.txt whose first line is the code signing identity
+##
+## Code signing using a registered Apple Developer ID is necessary for GateKeeper 
+## with default settings to allow running downloaded applications under OS 10.8
+if [ -e "${HOME}/BOINCCodeSignIdentity.txt" ]; then
+    exec 8<"${HOME}/BOINCCodeSignIdentity.txt"
+    read -u 8 SIGNINGIDENTITY
+
+    # Code Sign the BOINC installer if we have a signing identity
+    sudo codesign -f -s "${SIGNINGIDENTITY}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app"
+
+    # Code Sign the BOINC uninstaller if we have a signing identity
+    sudo codesign -f -s "${SIGNINGIDENTITY}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+fi
+
+# Compress the products
+cd ${NEW_DIR_PATH}
+## Use ditto instead of zip utility to preserve resource forks and Finder attributes (custom icon, hide extension) 
+ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686" "${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686.zip"
+##### We've decided not to create branded command-line executables; they are identical to standard ones
+#### ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_i686-apple-darwin" "${LC_BRAND_NAME}_$1.$2.$3_i686-apple-darwin.zip"
+##### We've decided not to create branded symbol table file; it is identical to standard one
+#### ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables" "${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables.zip"
+
+# Force Finder to recognize changed icons by deleting the uncompressed products and expanding the zip file 
+sudo rm -dfR "${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686"
+open "${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686.zip"
+
+#popd
+cd "${WorkingDirPath}"
+exit 0
diff --git a/mac_installer/make_ProgThruProc.sh b/mac_installer/make_ProgThruProc.sh
new file mode 100644
index 0000000..2c02822
--- /dev/null
+++ b/mac_installer/make_ProgThruProc.sh
@@ -0,0 +1,396 @@
+#!/bin/csh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+##
+# Script to convert Macintosh BOINC installer to Progress Thru Processors Desktop installer
+# updated 12/14/11 by Charlie Fenton for BOINC 6.8.34 / 6.12.44 / 7.0.3 and later
+## updated 7/31/12 by Charlie Fenton to delete screensaver Liberation font 
+# updated 8/2/12 by Charlie Fenton to code sign the installer and uninstaller
+##
+
+## Usage:
+## First put the following files into a working directory:
+##     the BOINC installer to be converted
+##     the Uninstall BOINC application to be converted
+##     PTP_ReadMe.rtf
+##     ProgThruProc.icns
+##     PTP_install.icns
+##     PTP_uninstall.icns
+##     COPYING
+##     COPYING.LESSER
+##     COPYRIGHT
+##     skins directory containing Progress Thru Processors skin (optional)
+##     acct_mgr_url.xml (to have BOINC automatically connect to Account Manager)
+##     ProgThruProc.tiff (for screensaver coordinator)
+##     ProgThruProc_ss_logo (for screensaver coordinator)
+##     PTP_saver directory containing Progress Thru Processors default screensaver and associated files, including:
+##          boincscr (default screensaver)
+##
+## NOTE: This script requires Mac OS 10.6 or later, and uses XCode developer
+##   tools.  So you must have installed XCode Developer Tools on the Mac 
+##   before running this script.
+##
+## If you wish to code sign the installer and uninstaller, create a file 
+## ~/BOINCCodeSignIdentity.txt whose first line is the code signing identity
+##
+## cd to the working directory:
+##
+## Invoke this script with the three parts of version number as arguments.  
+## For example, if the version is 3.2.1:
+##     sh [path_to_this_script] 3 2 1
+##
+## This will create a directory "BOINC_Installer" in the parent directory of 
+## the current directory
+##
+## For different branding, modify the following 9 variables:
+PR_PATH="PTP_Pkg_Root"
+IR_PATH="PTP_Installer_Resources"
+SCRIPTS_PATH="PTP_Installer_Scripts"
+NEW_DIR_PATH="New_Release_PTP_$1_$2_$3"
+README_FILE="PTP-ReadMe.rtf"
+## BRANDING_FILE="PTP-Branding"
+BRANDING_INFO="BrandId=2"
+ICNS_FILE="ProgThruProc.icns"
+INSTALLER_ICNS_FILE="PTP_install.icns"
+UNINSTALLER_ICNS_FILE="PTP_uninstall.icns"
+SAVER_DIR="PTP_saver"
+SAVER_SYSPREF_ICON="ProgThruProc.tiff"
+SAVER_LOGO="ProgThruProc_ss_logo.png"
+BRAND_NAME="Progress Thru Processors"
+MANAGER_NAME="Progress Thru Processors Desktop"
+LC_BRAND_NAME="Progress Thru Processors"
+SOURCE_PKG_PATH="BOINC Installer.app/Contents/Resources/BOINC.pkg/Contents"
+ZIP_BRAND_NAME="ptp"
+
+if [ $# -lt 3 ]; then
+echo "Usage:"
+echo "   cd working_directory"
+echo "   sh [path_to_this_script] major_version minor_version revision_number"
+echo ""
+echo "See comments at start of script for more info."
+echo ""
+exit 1
+fi
+
+#pushd ./
+WorkingDirPath=$PWD
+
+## Make sure sed uses UTF-8 text encoding
+unset LC_CTYPE
+unset LC_MESSAGES
+unset __CF_USER_TEXT_ENCODING
+export LANG=en_US.UTF-8
+
+sudo rm -dfR "${IR_PATH}"
+sudo rm -dfR "${PR_PATH}"
+sudo rm -dfR "${SCRIPTS_PATH}"
+
+mkdir -p "${IR_PATH}"
+mkdir -p "${PR_PATH}"
+mkdir -p "${SCRIPTS_PATH}"
+
+sudo rm -dfR "${NEW_DIR_PATH}/"
+
+mkdir -p "${NEW_DIR_PATH}/"
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686"
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras"
+
+cp -fp "${SOURCE_PKG_PATH}/Archive.pax.gz" "${PR_PATH}/"
+cd "${PR_PATH}"
+sudo gunzip ./Archive.pax.gz
+sudo pax -r -pe -f Archive.pax
+rm -df "Archive.pax"
+cd ..
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/License.rtf" "${IR_PATH}/"
+cp -fp "${README_FILE}" "${IR_PATH}/ReadMe.rtf"
+# Update version number
+sed -i "" s/"<VER_NUM>"/"$1.$2.$3"/g "${IR_PATH}/ReadMe.rtf"
+
+# Create the installer's preinstall and preupgrade scripts from the standard preinstall script
+cp -fp "${SOURCE_PKG_PATH}/Resources/preinstall" "${SCRIPTS_PATH}/"
+
+sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+
+cp -fp "${SCRIPTS_PATH}/preinstall" "${SCRIPTS_PATH}/preupgrade"
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/postinstall" "${SCRIPTS_PATH}/"
+cp -fp "${SOURCE_PKG_PATH}/Resources/postupgrade" "${SCRIPTS_PATH}/"
+
+cp -fpR "${SOURCE_PKG_PATH}/Resources/PostInstall.app" "${IR_PATH}/"
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/all_projects_list.xml" "${IR_PATH}/"
+
+##### We've decided not to customize BOINC Data directory name for branding
+#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data"
+#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data/locale"
+
+mkdir -p "${PR_PATH}/Library/Application Support/BOINC Data"
+
+## If skins folder is present. copy it into BOINC Data folder
+if [ -d "skins" ]; then
+    sudo cp -fR "skins" "${PR_PATH}/Library/Application Support/BOINC Data/"
+fi
+
+## Normally, we would put the account manager URL file into the Package Root folder 
+## for delivery to the BOINC Data folder.  But if the user later installs standard 
+## BOINC (without this file), the Apple installer would then delete the file.
+## So we "hide" it in the installer's resources, and have the PostInstall script copy 
+## it into the BOINC Data folder
+##
+## If account manager URL file is present, copy it into installer resources for 
+## eventual delivery into the BOINC Data folder
+if [ -f "acct_mgr_url.xml" ]; then
+##    sudo cp -fR "acct_mgr_url.xml" "${PR_PATH}/Library/Application Support/BOINC Data/acct_mgr_url.xml"
+    sudo cp -fR "acct_mgr_url.xml" "${IR_PATH}/"
+fi
+
+## Modify for Progress Thru Processors
+# Rename the Manager's bundle and its executable inside the bundle
+sudo mv -f "${PR_PATH}/Applications/BOINCManager.app/" "${PR_PATH}/Applications/${MANAGER_NAME}.app/"
+sudo mv -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/BOINCManager" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/${MANAGER_NAME}"
+
+# Update the Manager's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
+sudo sed -i "" s/BOINCMgr.icns/"${ICNS_FILE}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
+
+sudo chmod a+w "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${MANAGER_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the Manager's BOINCMgr.icns file
+sudo cp -fp "${ICNS_FILE}" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/${ICNS_FILE}"
+sudo rm -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/BOINCMgr.icns"
+
+# Put Branding file in both Installer Package and Application Bundle
+sudo echo ${BRANDING_INFO} > "${IR_PATH}/Branding"
+sudo cp -fp "${IR_PATH}/Branding" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/Branding"
+
+## Put Branding file into BOINC Data folder to make it available to screensaver coordinator
+sudo cp -fp "${IR_PATH}/Branding" "${PR_PATH}/Library/Application Support/BOINC Data/Branding"
+
+# Rename the screensaver coordinator bundle and its executable inside the bundle
+sudo mv -f "${PR_PATH}/Library/Screen Savers/BOINCSaver.saver" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver"
+sudo mv -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/BOINCSaver" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/${BRAND_NAME}"
+
+# Update screensaver coordinator's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Info.plist"
+
+sudo chmod a+w "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace screensaver coordinator's boinc.tiff or boinc.jpg file
+sudo rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.jpg"
+sudo cp -fp "${SAVER_SYSPREF_ICON}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.tiff"
+
+# Replace screensaver coordinator's boinc_ss_logo.png file
+sudo rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc_ss_logo.png"
+sudo cp -fp "${SAVER_LOGO}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc_ss_logo.png"
+
+# Delete the BOINC default screensaver and its associated files
+sudo rm -f "${PR_PATH}/Library/Application Support/BOINC Data/boinc_logo_black.jpg"
+sudo rm -f "${PR_PATH}/Library/Application Support/BOINC Data/Helvetica.txf"
+sudo rm -f "${PR_PATH}/Library/Application Support/BOINC Data/LiberationSans-Regular.ttf"
+sudo rm -f "${PR_PATH}/Library/Application Support/BOINC Data/ss_config.xml"
+sudo rm -f "${PR_PATH}/Library/Application Support/BOINC Data/boincscr"
+
+# Copy the Progress Thru Processors default screensaver files into BOINC Data folder
+sudo cp -fR "${SAVER_DIR}/" "${PR_PATH}/Library/Application Support/BOINC Data/"
+
+# Copy and rename the Uninstall application's bundle and rename its executable inside the bundle
+sudo cp -fpR "Uninstall BOINC.app" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+sudo mv -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/MacOS/Uninstall BOINC" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/MacOS/Uninstall ${BRAND_NAME}"
+
+# Update Uninstall application's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Info.plist"
+sudo sed -i "" s/MacUninstaller.icns/"${UNINSTALLER_ICNS_FILE}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Info.plist"
+
+sudo chmod a+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the Uninstall application's MacUninstaller.icns file
+sudo cp -fp "${UNINSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/${UNINSTALLER_ICNS_FILE}"
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/MacUninstaller.icns"
+# Remove the Uninstall application's resource file so it will show generic "Are you sure?" dialog
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/Uninstall BOINC.rsrc"
+
+sudo chown -R root:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+sudo chmod -R 755 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+
+## Fix up ownership and permissions
+sudo chown -R root:admin "${PR_PATH}"/*
+sudo chmod -R u+rw,g+rw,o+r-w "${PR_PATH}"/*
+sudo chmod 1775 "${PR_PATH}/Library"
+
+sudo chown -R 501:admin "${PR_PATH}/Library/Application Support"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${PR_PATH}/Library/Application Support"/*
+
+sudo chown -R root:admin "${IR_PATH}"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${IR_PATH}"/*
+sudo chown -R root:admin "${SCRIPTS_PATH}"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${SCRIPTS_PATH}"/*
+
+sudo cp -fp "${IR_PATH}/ReadMe.rtf" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/ReadMe.rtf"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/ReadMe.rtf"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/ReadMe.rtf"
+sudo cp -fp "COPYING" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.txt"
+sudo cp -fp "COPYRIGHT" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYRIGHT.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYRIGHT.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYRIGHT.txt"
+
+# COPYING.LESSER is part of GNU License v3
+sudo cp -fp "COPYING.LESSER" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.LESSER.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.LESSER.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/COPYING.LESSER.txt"
+
+# Make temporary copies of Pkg-Info.plist and Description.plist for PackageMaker and update for this branding
+sudo cp -fp "${SOURCE_PKG_PATH}/Info.plist" "${NEW_DIR_PATH}/Pkg-Info.plist"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/Pkg-Info.plist"
+sudo chmod -R 666 "${NEW_DIR_PATH}/Pkg-Info.plist"
+if [ -f "${SOURCE_PKG_PATH}/Resources/English.lproj/Description.plist" ]; then
+    sudo cp -fp "${SOURCE_PKG_PATH}/Resources/English.lproj/Description.plist" "${NEW_DIR_PATH}"
+else
+    sudo cp -fp "${SOURCE_PKG_PATH}/Resources/en.lproj/Description.plist" "${NEW_DIR_PATH}"
+fi
+sudo chown -R 501:admin "${NEW_DIR_PATH}/Description.plist"
+sudo chmod -R 666 "${NEW_DIR_PATH}/Description.plist"
+
+# Update Pkg-Info.plist name and ensure it is in XML format
+defaults write "`pwd`/${NEW_DIR_PATH}/Pkg-Info" "CFBundleGetInfoString" "$BRAND_NAME $1.$2.$3"
+plutil -convert xml1 "`pwd`/${NEW_DIR_PATH}/Pkg-Info.plist"
+
+# Update Description.plist name and ensure it is in XML format
+defaults write "`pwd`/${NEW_DIR_PATH}/Description" "IFPkgDescriptionTitle" "$MANAGER_NAME"
+plutil -convert xml1 "`pwd`/${NEW_DIR_PATH}/Description.plist"
+
+# Copy the installer wrapper application "${BRAND_NAME} Installer.app"
+sudo cp -fpR "BOINC Installer.app" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app"
+sudo rm -dfR "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/BOINC.pkg"
+
+# Update the installer wrapper application's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Info.plist"
+sudo sed -i "" s/MacInstaller.icns/"${INSTALLER_ICNS_FILE}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Info.plist"
+
+sudo chmod a+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo sed -i "" s/BOINC/"${MANAGER_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the installer wrapper application's MacInstaller.icns file
+sudo cp -fp "${INSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${INSTALLER_ICNS_FILE}"
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/MacInstaller.icns"
+
+# Rename the installer wrapper application's executable inside the bundle
+sudo mv -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/MacOS/BOINC Installer" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/MacOS/${BRAND_NAME} Installer"
+
+# Build the installer package inside the wrapper application's bundle
+# Because PackageMaker is now distributed separately from Xcode, we 
+# emulate the following PackageMaker command:
+###/Developer/usr/bin/packagemaker -r "${PR_PATH}" -e "${IR_PATH}" -s "${SCRIPTS_PATH}" -f "${NEW_DIR_PATH}/Pkg-Info.plist" -t "${MANAGER_NAME}" -n "$1.$2.$3" -b -o "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg"
+# Our PackageMaker emulation starts here
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources"
+
+cd "${PR_PATH}"
+
+mkbom ./ "${WorkingDirPath}/${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Archive.bom"
+
+pax -wz -x cpio -f "${WorkingDirPath}/${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Archive.pax.gz" ./
+
+cd "${WorkingDirPath}"
+
+echo "pmkrpkg1" >> "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/PkgInfo"
+
+cat >> "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/package_version" << ENDOFFILE
+major: $1
+minor: $2
+ENDOFFILE
+
+cp -fp "${NEW_DIR_PATH}/Pkg-Info.plist" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Info.plist"
+
+cp -fpR "${IR_PATH}/" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources"
+
+sudo chmod a+x "${SCRIPTS_PATH}"/*
+cp -fpR "${SCRIPTS_PATH}/" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources"
+
+# End of our PackageMaker emulation
+
+## for debugging
+## if [  $? -ne 0 ]; then
+## echo ""
+## echo "********** /Pkg-Info.plist File contents: *************"
+## echo ""
+## cp "${NEW_DIR_PATH}/Pkg-Info.plist" /dev/stdout
+## echo ""
+## echo "********** End /Pkg-Info.plist File contents *************"
+## echo ""
+## fi
+
+# Allow the installer wrapper application to modify the package's Info.plist file
+sudo chmod u+w,g+w,o+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Info.plist"
+
+# add a more complete Description.plist file to display in Installer's Customize pane
+if [ ! -d "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/en.lproj/" ]; then
+    mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/en.lproj"
+fi
+cp -fp "${NEW_DIR_PATH}/Description.plist" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/en.lproj/"
+
+# Update the installer wrapper application's creation date
+sudo touch "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app"
+
+# Remove temporary copies of Pkg-Info.plist and Description.plist
+sudo rm ${NEW_DIR_PATH}/Pkg-Info.plist
+sudo rm ${NEW_DIR_PATH}/Description.plist
+
+# Remove temporary directories
+sudo rm -dfR "${IR_PATH}"
+sudo rm -dfR "${PR_PATH}"
+sudo rm -dfR "${SCRIPTS_PATH}"
+
+## If you wish to code sign the installer and uninstaller, create a file 
+## ~/BOINCCodeSignIdentity.txt whose first line is the code signing identity
+##
+## Code signing using a registered Apple Developer ID is necessary for GateKeeper 
+## with default settings to allow running downloaded applications under OS 10.8
+if [ -e "${HOME}/BOINCCodeSignIdentity.txt" ]; then
+    exec 8<"${HOME}/BOINCCodeSignIdentity.txt"
+    read -u 8 SIGNINGIDENTITY
+
+    # Code Sign the BOINC installer if we have a signing identity
+    sudo codesign -f -s "${SIGNINGIDENTITY}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/${BRAND_NAME} Installer.app"
+
+    # Code Sign the BOINC uninstaller if we have a signing identity
+    sudo codesign -f -s "${SIGNINGIDENTITY}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686/extras/Uninstall ${BRAND_NAME}.app"
+fi
+
+# Compress the products
+cd ${NEW_DIR_PATH}
+## Use ditto instead of zip utility to preserve resource forks and Finder attributes (custom icon, hide extension) 
+ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686" "${ZIP_BRAND_NAME}_$1.$2.$3_macOSX_i686.zip"
+##### We've decided not to create branded command-line executables; they are identical to standard ones
+#### ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_i686-apple-darwin" "${ZIP_BRAND_NAME}_$1.$2.$3_i686-apple-darwin.zip"
+##### We've decided not to create branded symbol table file; it is identical to standard one
+#### ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables" "${ZIP_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables.zip"
+
+# Force Finder to recognize changed icons by deleting the uncompressed products and expanding the zip file 
+sudo rm -dfR "${LC_BRAND_NAME}_$1.$2.$3_macOSX_i686"
+open "${ZIP_BRAND_NAME}_$1.$2.$3_macOSX_i686.zip"
+
+#popd
+cd "${WorkingDirPath}"
+exit 0
diff --git a/mac_installer/postinstall b/mac_installer/postinstall
new file mode 100644
index 0000000..1c4cd26
--- /dev/null
+++ b/mac_installer/postinstall
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+##
+# post-Install Script for Macintosh BOINC Manager for OS X revised 12/6/10
+##
+
+echo "initial directory = $PWD"
+echo "argument 1 = $1"
+
+cd "$1"
+
+echo "new directory = $PWD"
+
+# Copy acct_mgr_url.xml into BOINC Data directory here so it won't be 
+# deleted if user later runs standard BOINC installer
+if [ -f "Contents/Resources/acct_mgr_url.xml" ]; then
+    cp -fp Contents/Resources/acct_mgr_url.xml "/Library/Application Support/BOINC Data/acct_mgr_url.xml"
+fi
+
+# Run the Postinstall Application
+if [ "${COMMAND_LINE_INSTALL}" = "1" ]; then
+rm -f /tmp/BOINCInstallLog.txt
+Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall -part1 >> /tmp/BOINCInstallLog.txt
+sleep 2
+Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall -part2 & >> /tmp/BOINCInstallLog.txt
+else
+Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall -part1
+sleep 2
+Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall -part2 &
+fi
+
+exit 0
diff --git a/mac_installer/postupgrade b/mac_installer/postupgrade
new file mode 100755
index 0000000..02dd0d6
--- /dev/null
+++ b/mac_installer/postupgrade
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+##
+# post-Upgrade Script for Macintosh BOINC Manager for OS X revised 12/6/10
+##
+
+echo "initial directory = $PWD"
+echo "argument 1 = $1"
+
+cd "$1"
+
+echo "new directory = $PWD"
+
+# Copy acct_mgr_url.xml into BOINC Data directory here so it won't be 
+# deleted if user later runs standard BOINC installer
+if [ -f "Contents/Resources/acct_mgr_url.xml" ]; then
+    cp -fp Contents/Resources/acct_mgr_url.xml "/Library/Application Support/BOINC Data/acct_mgr_url.xml"
+fi
+
+# Run the Postinstall Application
+if [ "${COMMAND_LINE_INSTALL}" = "1" ]; then
+rm -f /tmp/BOINCInstallLog.txt
+Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall -part1 >> /tmp/BOINCInstallLog.txt
+sleep 2
+Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall -part2 & >> /tmp/BOINCInstallLog.txt
+else
+Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall -part1
+sleep 2
+Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall -part2 &
+fi
+
+exit 0
diff --git a/mac_installer/preinstall b/mac_installer/preinstall
new file mode 100644
index 0000000..c9763dc
--- /dev/null
+++ b/mac_installer/preinstall
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+##
+# Pre-Install / Pre-Upgrade Script for Macintosh BOINC Manager for OS X revised 5/28/08
+##
+
+# If we are replacing an earlier GridRepublic installation, fix the data directory name before installing
+## We don't customize BOINC Data directory name for branding
+## mv -n "/Library/Application Support/GridRepublic Data" "/Library/Application Support/BOINC Data"
+
+# Delete old World Community Grid Skins
+##sudo rm -fR /Library/Application\ Support/BOINC\ Data/skins/World\ Community\ Grid/
+
+# Remove any old BOINC Manager and BOINC Screen Saver bundles to guarantee a clean install
+rm -fR "/Applications/BOINCManager.app"
+rm -fR "/Library/Screen Savers/BOINCSaver.saver"
+
+# Remove any old "BOINC Manager.mo" files before installing "BOINC-Manager.mo" files (or vice-versa)
+rm -fR "/Library/Application Support/BOINC Data/locale/"
+
+exit 0
diff --git a/mac_installer/release_GridRepublic.sh b/mac_installer/release_GridRepublic.sh
new file mode 100644
index 0000000..4c51cfd
--- /dev/null
+++ b/mac_installer/release_GridRepublic.sh
@@ -0,0 +1,325 @@
+#!/bin/csh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+##
+# Release Script for Macintosh GridRepublic Desktop by Charlie Fenton
+## updated 5/20/09 by Charlie Fenton
+##
+
+## NOTE: This script is deprecated.
+## It does not put the branded skin into the installer package.
+##
+## Use the make_GridRepublic.sh script instead!
+
+## Usage:
+## cd to the root directory of the boinc tree, for example:
+##     cd [path]/boinc
+##
+## Invoke this script with the three parts of version number as arguments.  
+## For example, if the version is 3.2.1:
+##     source [path_to_this_script] 3 2 1
+##
+## This will create a director "BOINC_Installer" in the parent directory of 
+## the current directory
+##
+## For testing only, you can use the development build by adding a fourth argument -dev
+## For example, if the version is 3.2.1:
+##     source [path_to_this_script] 3 2 1 -dev
+
+## For different branding, modify the following 9 variables:
+PR_PATH="../BOINC_Installer/GR_Pkg_Root"
+IR_PATH="../BOINC_Installer/GR_Installer_Resources"
+SCRIPTS_PATH="../BOINC_Installer/GR_Installer\ Scripts"
+NEW_DIR_PATH="../BOINC_Installer/New_Release_GR_$1_$2_$3"
+README_FILE="mac_installer/GR-ReadMe.rtf"
+BRANDING_FILE="mac_installer/GR-Branding"
+ICNS_FILE="gridrepublic.icns"
+INSTALLER_ICNS_FILE="GR_install.icns"
+UNINSTALLER_ICNS_FILE="GR_uninstall.icns"
+SAVER_SYSPREF_ICON_PATH="clientgui/mac/gridrepublic.tiff"
+SAVER_LOGO_PATH="clientscr/res/gridrepublic_ss_logo.png"
+BRAND_NAME="GridRepublic"
+MANAGER_NAME="GridRepublic Desktop"
+LC_BRAND_NAME="gridrepublic"
+
+if [ $# -lt 3 ]; then
+echo "Usage:"
+echo "   cd [path]/boinc"
+echo "   source [path_to_this_script] major_version minor_version revision_number"
+return 1
+fi
+
+pushd ./
+
+## XCode 2.x has separate directories for Development and Deployment build products
+if [ "$4" = "-dev" ]; then
+    if [ -d mac_build/build/Development/ ]; then
+        BUILDPATH="mac_build/build/Development"
+    else
+        BUILDPATH="mac_build/build"
+    fi
+else
+    if [ -d mac_build/build/Deployment/ ]; then
+        BUILDPATH="mac_build/build/Deployment"
+    else
+        BUILDPATH="mac_build/build"
+    fi
+fi
+
+sudo rm -dfR "${IR_PATH}"
+sudo rm -dfR "${PR_PATH}"
+sudo rm -dfR "${SCRIPTS_PATH}"
+
+mkdir -p "${IR_PATH}"
+mkdir -p "${SCRIPTS_PATH}"
+
+cp -fp mac_Installer/License.rtf "${IR_PATH}/"
+cp -fp "${README_FILE}" "${IR_PATH}/ReadMe.rtf"
+cp -fp win_build/installerv2/redist/all_projects_list.xml "${IR_PATH}/"
+
+# Update version number
+sed -i "" s/"<VER_NUM>"/"$1.$2.$3"/g "${IR_PATH}/ReadMe.rtf"
+
+# Create the installer's preinstall and preupgrade scripts from the standard preinstall script
+cp -fp mac_installer/preinstall "${SCRIPTS_PATH}/"
+
+sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+
+##### We've decided not to customize BOINC Data directory name for branding
+#### sed -i "" s/BOINC/temp/g "${SCRIPTS_PATH}/preinstall"
+#### sed -i "" s/"${BRAND_NAME}"/BOINC/g "${SCRIPTS_PATH}/preinstall"
+#### sed -i "" s/temp/"${BRAND_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+
+cp -fp "${SCRIPTS_PATH}/preinstall" "${SCRIPTS_PATH}/preupgrade"
+
+cp -fp mac_installer/postinstall "${SCRIPTS_PATH}/"
+cp -fp mac_installer/postupgrade "${SCRIPTS_PATH}/"
+
+cp -fpR "$BUILDPATH/PostInstall.app" "${IR_PATH}/"
+
+mkdir -p "${PR_PATH}"
+mkdir -p "${PR_PATH}/Applications"
+mkdir -p "${PR_PATH}/Library"
+mkdir -p "${PR_PATH}/Library/Screen Savers"
+mkdir -p "${PR_PATH}/Library/Application Support"
+
+##### We've decided not to customize BOINC Data directory name for branding
+#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data"
+#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data/locale"
+mkdir -p "${PR_PATH}/Library/Application Support/BOINC Data"
+mkdir -p "${PR_PATH}/Library/Application Support/BOINC Data/locale"
+mkdir -p "${PR_PATH}/Library/Application Support/BOINC Data/switcher"
+mkdir -p "${PR_PATH}/Library/Application Support/BOINC Data/skins"
+
+cp -fpR "$BUILDPATH/switcher" "${PR_PATH}/Library/Application Support/BOINC Data/switcher/"
+cp -fpR "$BUILDPATH/setprojectgrp" "${PR_PATH}/Library/Application Support/BOINC Data/switcher/"
+## cp -fpR "$BUILDPATH/AppStats" "${PR_PATH}/Library/Application Support/BOINC Data/switcher/"
+
+## Put Branding file into BOINC Data folder to make it available to screensaver 
+cp -fp "${BRANDING_FILE}" "${PR_PATH}/Library/Application Support/BOINC Data/Branding"
+cp -fp curl/ca-bundle.crt  "${PR_PATH}/Library/Application Support/BOINC Data/"
+
+cp -fp doc/logo/boinc_logo_black.jpg "${PR_PATH}/Library/Application Support/BOINC Data/"
+cp -fp api/txf/Helvetica.txf "${PR_PATH}/Library/Application Support/BOINC Data/"
+cp -fp clientscr/ss_config.xml "${PR_PATH}/Library/Application Support/BOINC Data/"
+cp -fpR "$BUILDPATH/boincscr" "${PR_PATH}/Library/Application Support/BOINC Data/"
+
+cp -fpR "$BUILDPATH/BOINCManager.app" "${PR_PATH}/Applications/"
+
+cp -fpR "$BUILDPATH/BOINCSaver.saver" "${PR_PATH}/Library/Screen Savers/"
+
+## Copy the localization files into the installer tree
+
+## Old way copies CVS and *.po files which are not needed
+## cp -fpR locale/ "${PR_PATH}/Library/Application Support/BOINC Data/locale"
+## sudo rm -dfR "${PR_PATH}/Library/Application Support/BOINC Data/locale/CVS"
+
+## New way copies only *.mo files (adapted from boinc/sea/make-tar.sh)
+##### We've decided not to customize BOINC Data directory name for branding
+#### find locale/client -name '*.mo' | cut -d '/' -f 3 | awk -v PRPATH=${PR_PATH} -v BRANDNAME=${BRAND_NAME} '{print "\"" PRPATH "/Library/Application Support/" BRANDNAME " Data/locale/"$0"\""}' | xargs mkdir -p 
+#### find locale/client -name '*.mo' | cut -d '/' -f 3,4 | awk -v PRPATH=${PR_PATH} -v BRANDNAME=${BRAND_NAME} '{print "cp \"locale/"$0"\" \"" PRPATH "/Library/Application Support/" BRANDNAME " Data/locale/"$0"\""}' | bash
+find locale/client -name '*.mo' | cut -d '/' -f 2 | awk -v PRPATH=${PR_PATH} '{print "\"" PRPATH "/Library/Application Support/BOINC Data/locale/"$0"\""}' | xargs mkdir -p 
+find locale/client -name '*.mo' | cut -d '/' -f 2,3 | awk -v PRPATH=${PR_PATH} '{print "cp \"locale/"$0"\" \"" PRPATH "/Library/Application Support/BOINC Data/locale/"$0"\""}' | bash
+
+## Modify for Grid Republic
+# Rename the Manager's bundle and its executable inside the bundle
+mv -f "${PR_PATH}/Applications/BOINCManager.app/" "${PR_PATH}/Applications/${MANAGER_NAME}.app/"
+mv -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/BOINCManager" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/${MANAGER_NAME}"
+
+# Update the Manager's info.plist, InfoPlist.strings files
+sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
+sed -i "" s/BOINCMgr.icns/"${ICNS_FILE}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
+sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the Manager's BOINCMgr.icns file
+cp -fp "clientgui/res/${ICNS_FILE}" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/${ICNS_FILE}"
+rm -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/BOINCMgr.icns"
+
+# Copy Branding file into both Application Bundle and Installer Package\
+cp -fp "${BRANDING_FILE}" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/Branding"
+cp -fp "${BRANDING_FILE}" "${IR_PATH}/Branding"
+
+# Rename the screensaver bundle and its executable inside the bundle
+mv -f "${PR_PATH}/Library/Screen Savers/BOINCSaver.saver" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver"
+mv -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/BOINCSaver" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/${BRAND_NAME}"
+
+# Update screensaver's info.plist, InfoPlist.strings files
+sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Info.plist"
+sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace screensaver's boinc.tiff or boinc.jpg file
+rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.jpg"
+cp -fp "${SAVER_SYSPREF_ICON_PATH}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.tiff"
+
+# Replace screensaver's boinc_ss_logo.png file
+rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc_ss_logo.png"
+cp -fp "${SAVER_LOGO_PATH}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc_ss_logo.png"
+
+## Fix up ownership and permissions
+sudo chown -R root:admin "${PR_PATH}"/*
+sudo chmod -R u+rw,g+rw,o+r-w "${PR_PATH}"/*
+sudo chmod 1775 "${PR_PATH}/Library"
+
+sudo chown -R 501:admin "${PR_PATH}/Library/Application Support"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${PR_PATH}/Library/Application Support"/*
+
+sudo chown -R root:admin "${IR_PATH}"/*
+sudo chown -R root:admin "${SCRIPTS_PATH}"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${IR_PATH}"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${SCRIPTS_PATH}"/*
+
+sudo rm -dfR "${NEW_DIR_PATH}/"
+
+mkdir -p "${NEW_DIR_PATH}/"
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal"
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras"
+
+cp -fp "${IR_PATH}/ReadMe.rtf" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf"
+
+cp -fp "COPYING" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYING"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYING"
+
+cp -fp "COPYING.LESSER" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYING.LESSER"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYING.LESSER"
+
+cp -fp "COPYRIGHT" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYRIGHT"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYRIGHT"
+
+# Copy & rename the Uninstall application's bundle and rename its executable inside the bundle
+sudo cp -fpR "$BUILDPATH/Uninstall BOINC.app" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app"
+sudo mv -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/MacOS/Uninstall BOINC" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/MacOS/Uninstall ${BRAND_NAME}"
+
+# Update Uninstall application's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Info.plist"
+sudo sed -i "" s/MacUninstaller.icns/"${UNINSTALLER_ICNS_FILE}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Info.plist"
+#### sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the Uninstall application's MacUninstaller.icns file
+sudo cp -fp "clientgui/res/${UNINSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/${UNINSTALLER_ICNS_FILE}"
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/MacUninstaller.icns"
+# Remove the Uninstall application's resource file so it will show generic "Are you sure?" dialog
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/Uninstall BOINC.rsrc"
+
+sudo chown -R root:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app"
+sudo chmod -R 555 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app"
+
+##### We've decided not to create branded command-line executables; they are identical to standard ones
+#### mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin"
+#### cp -fpR $BUILDPATH/boinc "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin/"
+#### cp -fpR $BUILDPATH/boinccmd "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin/"
+#### cp -fpR curl/ca-bundle.crt "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin/"
+#### sudo chown -R root:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin"/*
+#### sudo chmod -R u+rw-s,g+r-ws,o+r-w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin"/*
+
+##### We've decided not to create branded symbol table file; it is identical to standard one
+#### mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables"
+#### cp -fpR $BUILDPATH/SymbolTables/ ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables/
+
+# Make temporary copies of Pkg-Info.plist and Description.plist for PackageMaker and update for this branding
+cp -fp mac_build/Pkg-Info.plist "${NEW_DIR_PATH}"
+cp -fp mac_Installer/Description.plist "${NEW_DIR_PATH}"
+sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/Pkg-Info.plist"
+sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/Description.plist"
+
+# Copy the installer wrapper application "${BRAND_NAME} Installer.app"
+cp -fpR "$BUILDPATH/BOINC Installer.app" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app"
+
+# Update the installer wrapper application's info.plist, InfoPlist.strings files
+sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/Info.plist"
+sed -i "" s/MacInstaller.icns/"${INSTALLER_ICNS_FILE}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/Info.plist"
+## sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/Resources/English.lproj/InfoPlist.strings"
+
+# Replace the installer wrapper application's MacInstaller.icns file
+cp -fp "clientgui/res/${INSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/Resources/${INSTALLER_ICNS_FILE}"
+rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/Resources/MacInstaller.icns"
+
+# Rename the installer wrapper application's executable inside the bundle
+mv -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/MacOS/BOINC Installer" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/MacOS/${BRAND_NAME} Installer"
+
+DarwinVersion=`uname -r`;
+DarwinMajorVersion=`echo $DarwinVersion | sed 's/\([0-9]*\)[.].*/\1/' `;
+# DarwinMinorVersion=`echo $version | sed 's/[0-9]*[.]\([0-9]*\).*/\1/' `;
+#
+# echo "major = $DarwinMajorVersion"
+# echo "minor = $DarwinMinorVersion"
+#
+# Darwin version 9.x.y corresponds to OS 10.5.x
+# Darwin version 8.x.y corresponds to OS 10.4.x
+# Darwin version 7.x.y corresponds to OS 10.3.x
+# Darwin version 6.x corresponds to OS 10.2.x
+
+# Build the installer package inside the wrapper application's bundle
+if [ "$DarwinMajorVersion" = "9" ]; then
+    # OS 10.5 packagemaker
+    /Developer/usr/bin/packagemaker -r "${PR_PATH}" -e "${IR_PATH}" -s "${SCRIPTS_PATH}" -f "${NEW_DIR_PATH}/Pkg-Info.plist" -t "${MANAGER_NAME}" -n "$1.$2.$3" -b -o "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg"
+    # Remove TokenDefinitions.plist which, along with IFPkgPathMappings in Info.plist, would cause installer to find a previous copy of BOINCManager and install there
+    sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Resources/TokenDefinitions.plist"
+    defaults delete "$PWD/${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Info" IFPkgPathMappings
+else
+    # OS 10.4 packagemaker
+    /Developer/Tools/packagemaker -build -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg" -f "${PR_PATH}" -r "${IR_PATH}" -i "${NEW_DIR_PATH}/Pkg-Info.plist" -d "${NEW_DIR_PATH}/Description.plist" -ds 
+fi
+
+# Allow the installer wrapper application to modify the package's Info.plist file
+sudo chmod u+w,g+w,o+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.app/Contents/Resources/${BRAND_NAME}.pkg/Contents/Info.plist"
+
+# Remove temporary copies of Pkg-Info.plist and Description.plist
+rm ${NEW_DIR_PATH}/Pkg-Info.plist
+rm ${NEW_DIR_PATH}/Description.plist
+
+# Compress the products
+cd ${NEW_DIR_PATH}
+zip -rqy ${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal.zip ${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal
+##### We've decided not to create branded command-line executables; they are identical to standard ones
+#### zip -rqy ${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin.zip ${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin
+##### We've decided not to create branded symbol table file; it is identical to standard one
+#### zip -rqy ${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables.zip ${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables
+
+# Force Finder to recognize changed icons by deleting the uncompressed products and expanding the zip file 
+sudo rm -dfR ${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal
+open ${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal.zip
+
+popd
+return 0
diff --git a/mac_installer/release_boinc.sh b/mac_installer/release_boinc.sh
new file mode 100644
index 0000000..d14e402
--- /dev/null
+++ b/mac_installer/release_boinc.sh
@@ -0,0 +1,345 @@
+#!/bin/csh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+##
+# Release Script for Macintosh BOINC Manager 10/31/07 by Charlie Fenton
+## updated 11/18/09 by Charlie Fenton for OS 10.6 Snow Leopard
+## updated 9/28/10 by Charlie Fenton for new BOINC skins
+## updated 12/2/10 by Charlie Fenton to remove obsolete items
+## updated 1/18/11 by Charlie Fenton to remove BOINC skins
+## updated 11/9/11 by Charlie Fenton for XCode 4.1 and OS 10.7
+## updated 11/26/11 by Charlie Fenton for new Default skin
+## updated 11/27/11 by Charlie Fenton for new virtualbox directory
+## updated 12/2/11 by Charlie Fenton to restore wrapper and reboot if needed
+## updated 1/6/12 by Charlie Fenton to also install VirtualBox
+## updated 6/22/12 by Charlie Fenton to code sign the installer and uninstaller
+## updated 7/5/12 by Charlie Fenton to avoid using PackageMaker
+## updated 7/31/12 by Charlie Fenton for Liberation font in boincscr 
+##
+## NOTE: This script requires Mac OS 10.6 or later, and uses XCode developer
+##   tools.  So you must have installed XCode Developer Tools on the Mac 
+##   before running this script.
+##
+
+## NOTE: To build the executables under Lion and XCode 4, select from XCode's
+## menu: "Product/Buildfor/Build for Archiving", NOT "Product/Archive"
+
+## Usage:
+##
+## If you wish to code sign the installer and uninstaller, create a file 
+## ~/BOINCCodeSignIdentity.txt whose first line is the code signing identity
+##
+## cd to the root directory of the boinc tree, for example:
+##     cd [path]/boinc
+##
+## Invoke this script with the three parts of version number as arguments.  
+## For example, if the version is 3.2.1:
+##     source [path_to_this_script] 3 2 1
+##
+## This will create a director "BOINC_Installer" in the parent directory of 
+## the current directory
+##
+## For testing only, you can use the development build by adding a fourth argument -dev
+## For example, if the version is 3.2.1:
+##     source [path_to_this_script] 3 2 1 -dev
+
+if [ $# -lt 3 ]; then
+echo "Usage:"
+echo "   cd [path]/boinc"
+echo "   source [path_to_this_script] major_version minor_version revision_number"
+return 1
+fi
+
+#pushd ./
+BOINCPath=$PWD
+
+DarwinVersion=`uname -r`;
+DarwinMajorVersion=`echo $DarwinVersion | sed 's/\([0-9]*\)[.].*/\1/' `;
+# DarwinMinorVersion=`echo $version | sed 's/[0-9]*[.]\([0-9]*\).*/\1/' `;
+#
+# echo "major = $DarwinMajorVersion"
+# echo "minor = $DarwinMinorVersion"
+#
+# Darwin version 11.x.y corresponds to OS 10.7.x
+# Darwin version 10.x.y corresponds to OS 10.6.x
+# Darwin version 8.x.y corresponds to OS 10.4.x
+# Darwin version 7.x.y corresponds to OS 10.3.x
+# Darwin version 6.x corresponds to OS 10.2.x
+
+if [ "$DarwinMajorVersion" -gt 10 ]; then
+    # XCode 4.1 on OS 10.7 builds only Intel binaries
+    arch="i686"
+
+    # XCode 3.x and 4.x use different paths for their build products.
+    # Our scripts in XCode's script build phase write those paths to 
+    # files to help this release script find the build products.
+    if [ "$4" = "-dev" ]; then
+        exec 7<"mac_build/Build_Development_Dir"
+        read -u 7 BUILDPATH
+    else
+        exec 7<"mac_build/Build_Deployment_Dir"
+        read -u 7 BUILDPATH
+    fi
+
+else
+    # XCode 3.2 on OS 10.6 does sbuild Intel and PowerPC Universal binaries
+    arch="universal"
+
+    # XCode 3.x and 4.x use different paths for their build products.
+    if [ "$4" = "-dev" ]; then
+        if [ -d mac_build/build/Development/ ]; then
+            BUILDPATH="mac_build/build/Development"
+        else
+            BUILDPATH="mac_build/build"
+        fi
+    else
+        if [ -d mac_build/build/Deployment/ ]; then
+            BUILDPATH="mac_build/build/Deployment"
+        else
+            BUILDPATH="mac_build/build"
+        fi
+    fi
+fi
+
+sudo rm -dfR ../BOINC_Installer/Installer\ Resources/
+sudo rm -dfR ../BOINC_Installer/Installer\ Scripts/
+sudo rm -dfR ../BOINC_Installer/Pkg_Root
+
+mkdir -p ../BOINC_Installer/Installer\ Resources/
+mkdir -p ../BOINC_Installer/Installer\ Scripts/
+
+cp -fp mac_installer/License.rtf ../BOINC_Installer/Installer\ Resources/
+cp -fp mac_installer/ReadMe.rtf ../BOINC_Installer/Installer\ Resources/
+cp -fp win_build/installerv2/redist/all_projects_list.xml ../BOINC_Installer/Installer\ Resources/
+
+# Update version number
+sed -i "" s/"<VER_NUM>"/"$1.$2.$3"/g ../BOINC_Installer/Installer\ Resources/ReadMe.rtf
+
+#### We don't customize BOINC Data directory name for branding
+cp -fp mac_installer/preinstall ../BOINC_Installer/Installer\ Scripts/
+cp -fp mac_installer/preinstall ../BOINC_Installer/Installer\ Scripts/preupgrade
+cp -fp mac_installer/postinstall ../BOINC_Installer/Installer\ Scripts/
+cp -fp mac_installer/postupgrade ../BOINC_Installer/Installer\ Scripts/
+
+cp -fpR $BUILDPATH/PostInstall.app ../BOINC_Installer/Installer\ Resources/
+
+mkdir -p ../BOINC_Installer/Pkg_Root
+mkdir -p ../BOINC_Installer/Pkg_Root/Applications
+mkdir -p ../BOINC_Installer/Pkg_Root/Library
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins
+# We must create virtualbox directory so installer will set up its 
+# ownership and permissions correctly, because vboxwrapper won't 
+# have permission to set owner to boinc_master.
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/projects/virtualbox
+
+##cp -fpR $BUILDPATH/WaitPermissions.app ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
+
+cp -fpR $BUILDPATH/switcher ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
+cp -fpR $BUILDPATH/setprojectgrp ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
+## cp -fpR $BUILDPATH/AppStats ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
+
+cd "${BOINCPath}/clientgui/skins"
+cp -fpR Default ../../../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/
+cd "${BOINCPath}"
+
+## FOR NOW - Don't install WCG Skins.  If you reinstate this, also reinstate preinstall & preupgrade above
+## Copy the World Community Grid skins into the installer tree, minus the CVS files
+## cd "${BOINCPath}/clientgui/skins"
+## cp -fpR World\ Community\ Grid ../../../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/
+## cd "${BOINCPath}"
+## sudo rm -dfR ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/World\ Community\ Grid/CVS
+## sudo rm -dfR ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/World\ Community\ Grid/graphic/CVS
+
+cp -fp curl/ca-bundle.crt ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
+
+cp -fp doc/logo/boinc_logo_black.jpg ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
+cp -fp api/ttf/liberation-fonts-ttf-2.00.0/LiberationSans-Regular.ttf ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/LiberationSans-Regular.ttf
+cp -fp clientscr/ss_config.xml ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
+cp -fpR $BUILDPATH/boincscr ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
+
+cp -fpR $BUILDPATH/BOINCManager.app ../BOINC_Installer/Pkg_Root/Applications/
+
+cp -fpR $BUILDPATH/BOINCSaver.saver ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers/
+
+## Copy the localization files into the installer tree
+## Old way copies CVS and *.po files which are not needed
+## cp -fpR locale/ ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale
+## sudo rm -dfR ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale/CVS
+## New way copies only *.mo files (adapted from boinc/sea/make-tar.sh)
+find locale -name '*.mo' | cut -d '/' -f 2 | awk '{print "\"../BOINC_Installer/Pkg_Root/Library/Application Support/BOINC Data/locale/"$0"\""}' | xargs mkdir -p
+find locale -name '*.mo' | cut -d '/' -f 2,3 | awk '{print "cp \"locale/"$0"\" \"../BOINC_Installer/Pkg_Root/Library/Application Support/BOINC Data/locale/"$0"\""}' | bash
+
+## Fix up ownership and permissions
+sudo chown -R root:admin ../BOINC_Installer/Pkg_Root/*
+sudo chmod -R u+rw,g+rw,o+r-w ../BOINC_Installer/Pkg_Root/*
+sudo chmod 1775 ../BOINC_Installer/Pkg_Root/Library
+
+sudo chown -R 501:admin ../BOINC_Installer/Pkg_Root/Library/Application\ Support/*
+sudo chmod -R u+rw,g+r-w,o+r-w ../BOINC_Installer/Pkg_Root/Library/Application\ Support/*
+
+sudo chown -R root:admin ../BOINC_Installer/Installer\ Resources/*
+sudo chown -R root:admin ../BOINC_Installer/Installer\ Scripts/*
+sudo chmod -R u+rw,g+r-w,o+r-w ../BOINC_Installer/Installer\ Resources/*
+sudo chmod -R u+rw,g+r-w,o+r-w ../BOINC_Installer/Installer\ Scripts/*
+
+sudo rm -dfR ../BOINC_Installer/New_Release_$1_$2_$3/
+
+mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/
+mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch
+mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras
+mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin
+mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_SymbolTables
+
+cp -fp ../BOINC_Installer/Installer\ Resources/ReadMe.rtf ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch
+sudo chown -R 501:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/ReadMe.rtf
+sudo chmod -R 644 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/ReadMe.rtf
+
+cp -fp COPYING ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.txt
+sudo chown -R 501:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.txt
+sudo chmod -R 644 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.txt
+
+cp -fp COPYING.LESSER ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.LESSER.txt
+sudo chown -R 501:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.LESSER.txt
+sudo chmod -R 644 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.LESSER.txt
+
+cp -fp COPYRIGHT ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYRIGHT.txt
+sudo chown -R 501:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYRIGHT.txt
+sudo chmod -R 644 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYRIGHT.txt
+
+cp -fpR $BUILDPATH/Uninstall\ BOINC.app ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras
+sudo chown -R root:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/Uninstall\ BOINC.app
+sudo chmod -R 755 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/Uninstall\ BOINC.app
+
+# Copy the installer wrapper application "BOINC Installer.app"
+cp -fpR $BUILDPATH/BOINC\ Installer.app ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/
+
+# Build the installer package inside the wrapper application's bundle
+# Because PackageMaker is now distributed separately from Xcode, we 
+# emulate the following PackageMaker command:
+###/Developer/usr/bin/packagemaker -r ../BOINC_Installer/Pkg_Root -e ../BOINC_Installer/Installer\ Resources/ -s ../BOINC_Installer/Installer\ Scripts/ -f mac_build/Pkg-Info.plist -t "BOINC Manager" -n "$1.$2.$3" -b -o ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg
+
+# Our PackageMaker emulation starts here
+mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources
+
+cd ../BOINC_Installer/Pkg_Root
+
+mkbom ./ ../New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Archive.bom
+
+pax -wz -x cpio -f ../New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Archive.pax.gz ./
+
+cd "${BOINCPath}"
+
+echo "pmkrpkg1" >> ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/PkgInfo
+
+cat >> ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources/package_version << ENDOFFILE
+major: $1
+minor: $2
+ENDOFFILE
+
+cp -fp mac_build/Pkg-Info.plist ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Info.plist
+
+cp -fpR ../BOINC_Installer/Installer\ Resources/ ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources
+
+sudo chmod a+x ../BOINC_Installer/Installer\ Scripts/*
+cp -fpR ../BOINC_Installer/Installer\ Scripts/ ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources
+
+# End of our PackageMaker emulation
+
+# Allow the installer wrapper application to modify the package's Info.plist file
+sudo chmod a+rw ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Info.plist
+
+# add a more complete Description.plist file to display in Installer's Customize pane
+if [ ! -d ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources/en.lproj/ ]; then
+    mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources/en.lproj
+fi
+cp -fp mac_installer/Description.plist ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources/en.lproj/
+
+# Build the BOINC+VirtualBox.mpkg metapackage if VirtualBox.pkg exists
+
+VirtualBoxPackageName="VirtualBox.pkg"
+if [ -d mac_installer/${VirtualBoxPackageName}/ ]; then
+    mkdir -p "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/Resources"
+    cp -fp mac_build/Mpkg-Info.plist ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/Info.plist
+    cp -fp mac_installer/License.rtf ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/Resources/
+    cp -fp ../BOINC_Installer/Installer\ Resources/ReadMe.rtf ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/Resources/
+    cat >> ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/Resources/package_version << ENDOFFILE
+major: $1
+minor: $2
+ENDOFFILE
+    echo "pmkrpkg1" > ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/PkgInfo
+    
+    cp -fpR mac_installer/${VirtualBoxPackageName} ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/
+fi
+
+# Build the stand-alone client distribution
+cp -fpR mac_build/Mac_SA_Insecure.sh ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/
+cp -fpR mac_build/Mac_SA_Secure.sh ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/
+cp -fpR COPYING ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/COPYING.txt
+cp -fpR COPYING.LESSER ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/COPYING.LESSER.txt
+cp -fpR COPYRIGHT ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/COPYRIGHT.txt
+cp -fp mac_installer/License.rtf ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/
+sudo chown -R 501:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/*
+sudo chmod -R 644 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/*
+
+mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir
+cp -fpR $BUILDPATH/boinc ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/
+cp -fpR $BUILDPATH/boinccmd ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/
+cp -fpR curl/ca-bundle.crt ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/
+
+mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/switcher
+cp -fpR $BUILDPATH/switcher ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/switcher/
+cp -fpR $BUILDPATH/setprojectgrp ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/switcher/
+## cp -fpR $BUILDPATH/AppStats ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/switcher/
+
+sudo chown -R root:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/*
+sudo chmod -R u+rw-s,g+r-ws,o+r-w ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/*
+
+cp -fpR $BUILDPATH/SymbolTables/ ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_SymbolTables/
+
+## If you wish to code sign the installer and uninstaller, create a file 
+## ~/BOINCCodeSignIdentity.txt whose first line is the code signing identity
+##
+## Code signing using a registered Apple Developer ID is necessary for GateKeeper 
+## with default settings to allow running downloaded applications under OS 10.8
+if [ -e "${HOME}/BOINCCodeSignIdentity.txt" ]; then
+    exec 8<"${HOME}/BOINCCodeSignIdentity.txt"
+    read -u 8 SIGNINGIDENTITY
+
+    # Code Sign the BOINC installer if we have a signing identity
+    sudo codesign -f -s "${SIGNINGIDENTITY}" "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app"
+
+    # Code Sign the BOINC uninstaller if we have a signing identity
+    sudo codesign -f -s "${SIGNINGIDENTITY}" "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/Uninstall BOINC.app"
+fi
+
+cd ../BOINC_Installer/New_Release_$1_$2_$3
+## Use ditto instead of zip utility to preserve resource forks and Finder attributes (custom icon, hide extension) 
+ditto -ck --sequesterRsrc --keepParent boinc_$1.$2.$3_macOSX_$arch boinc_$1.$2.$3_macOSX_$arch.zip
+ditto -ck --sequesterRsrc --keepParent boinc_$1.$2.$3_$arch-apple-darwin boinc_$1.$2.$3_$arch-apple-darwin.zip
+ditto -ck --sequesterRsrc --keepParent boinc_$1.$2.$3_macOSX_SymbolTables boinc_$1.$2.$3_macOSX_SymbolTables.zip
+
+#popd
+cd "${BOINCPath}"
+
+return 0
diff --git a/mac_installer/release_campus_party.sh b/mac_installer/release_campus_party.sh
new file mode 100644
index 0000000..d7ba667
--- /dev/null
+++ b/mac_installer/release_campus_party.sh
@@ -0,0 +1,239 @@
+#!/bin/csh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+##
+# Release Script for Campus Party Macintosh BOINC Manager
+#
+# Release Script for Macintosh BOINC Manager 10/31/07 by Charlie Fenton
+## updated 11/18/09 by Charlie Fenton for OS 10.6 Snow Leopard
+## updated 4/16/10 by Charlie Fenton
+## customized 6/8/10 for Campus Party (installs custom project_init.xml file)
+##
+## NOTE: This script uses PackageMaker, which is installed as part of the 
+##   XCode developer tools.  So you must have installed XCode Developer 
+##   Tools on the Mac before running this script.
+##
+## NOTE: PackageMaker may write 3 lines to the terminal with "Setting to : 0 (null)" 
+##   and "relocate: (null) 0".  This is normal and does not indicate a problem.
+##
+
+## Usage:
+## cd to the root directory of the boinc tree, for example:
+##     cd [path]/boinc
+##
+## Invoke this script with the three parts of version number as arguments.  
+## For example, if the version is 3.2.1:
+##     source [path_to_this_script] 3 2 1
+##
+## This will create a director "BOINC_Installer" in the parent directory of 
+## the current directory
+##
+## For testing only, you can use the development build by adding a fourth argument -dev
+## For example, if the version is 3.2.1:
+##     source [path_to_this_script] 3 2 1 -dev
+
+if [ $# -lt 3 ]; then
+echo "Usage:"
+echo "   cd [path]/boinc"
+echo "   source [path_to_this_script] major_version minor_version revision_number"
+return 1
+fi
+
+#pushd ./
+BOINCPath=$PWD
+
+## XCode 2.x has separate directories for Development and Deployment build products
+if [ "$4" = "-dev" ]; then
+    if [ -d mac_build/build/Development/ ]; then
+        BUILDPATH="mac_build/build/Development"
+    else
+        BUILDPATH="mac_build/build"
+    fi
+else
+    if [ -d mac_build/build/Deployment/ ]; then
+        BUILDPATH="mac_build/build/Deployment"
+    else
+        BUILDPATH="mac_build/build"
+    fi
+fi
+
+sudo rm -dfR ../BOINC_Installer/Installer\ Resources/
+sudo rm -dfR ../BOINC_Installer/Installer\ Scripts/
+sudo rm -dfR ../BOINC_Installer/Pkg_Root
+
+mkdir -p ../BOINC_Installer/Installer\ Resources/
+mkdir -p ../BOINC_Installer/Installer\ Scripts/
+
+cp -fp mac_Installer/License.rtf ../BOINC_Installer/Installer\ Resources/
+cp -fp mac_installer/ReadMe.rtf ../BOINC_Installer/Installer\ Resources/
+cp -fp win_build/installerv2/redist/all_projects_list.xml ../BOINC_Installer/Installer\ Resources/
+
+# Update version number
+sed -i "" s/"<VER_NUM>"/"$1.$2.$3"/g ../BOINC_Installer/Installer\ Resources/ReadMe.rtf
+
+#### We don't customize BOINC Data directory name for branding
+cp -fp mac_installer/preinstall ../BOINC_Installer/Installer\ Scripts/
+cp -fp mac_installer/preinstall ../BOINC_Installer/Installer\ Scripts/preupgrade
+cp -fp mac_installer/postinstall ../BOINC_Installer/Installer\ Scripts/
+cp -fp mac_installer/postupgrade ../BOINC_Installer/Installer\ Scripts/
+
+cp -fpR $BUILDPATH/PostInstall.app ../BOINC_Installer/Installer\ Resources/
+cp -fpR $BUILDPATH/WaitPermissions.app ../BOINC_Installer/Installer\ Resources/
+
+mkdir -p ../BOINC_Installer/Pkg_Root
+mkdir -p ../BOINC_Installer/Pkg_Root/Applications
+mkdir -p ../BOINC_Installer/Pkg_Root/Library
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher
+mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins
+
+cp -fpR $BUILDPATH/switcher ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
+cp -fpR $BUILDPATH/setprojectgrp ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
+## cp -fpR $BUILDPATH/AppStats ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
+
+## FOR NOW - Don't install WCG Skins.  If you reinstate this, also reinstate preinstall & preupgrade above
+## Copy the World Community Grid skins into the installer tree, minus the CVS files
+## mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins
+## cd "${BOINCPath}/clientgui/skins"
+## cp -fpR World\ Community\ Grid ../../../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/
+## cd "${BOINCPath}"
+## sudo rm -dfR ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/World\ Community\ Grid/CVS
+## sudo rm -dfR ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/World\ Community\ Grid/graphic/CVS
+
+cp -fp curl/ca-bundle.crt ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
+
+cp -fp doc/logo/boinc_logo_black.jpg ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
+cp -fp api/txf/Helvetica.txf ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
+cp -fp clientscr/ss_config.xml ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
+cp -fpR $BUILDPATH/boincscr ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
+
+## CUSTOM project_init.xml file for Campus Party
+cat >> ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/project_init.xml << ENDOFFILE
+<project_init>
+    <name>http://boinc.bakerlab.org/rosetta/</name>
+    <url>http://boinc.bakerlab.org/rosetta/</url>
+    <account_key></account_key>
+    <team_name>CampusParty</team_name>
+</project_init>
+ENDOFFILE
+## End of CUSTOM project_init.xml file for Campus Party
+
+cp -fpR $BUILDPATH/BOINCManager.app ../BOINC_Installer/Pkg_Root/Applications/
+
+cp -fpR $BUILDPATH/BOINCSaver.saver ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers/
+
+## If x86_64 version of screen saver for OS 10.6 exists, merge it into our screen saver
+if [ -x ../_boinc_SnowLeopard/mac_build/build/Deployment/BOINCSaver.saver/Contents/MacOS/BOINCSaver ]; then
+    if [ "$4" != "-dev" ]; then
+        rm -f ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers/BOINCSaver.saver/Contents/MacOS/BOINCSaver
+        rm -fR ../BOINC_Installer/temp/
+        mkdir -p ../BOINC_Installer/temp/
+        lipo ../_boinc_SnowLeopard/mac_build/build/Deployment/BOINCSaver.saver/Contents/MacOS/BOINCSaver -thin x86_64 -output ../BOINC_Installer/temp/saver64
+        lipo ../BOINC_Installer/temp/saver64 $BUILDPATH/BOINCSaver.saver/Contents/MacOS/BOINCSaver -create -output ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers/BOINCSaver.saver/Contents/MacOS/BOINCSaver
+        rm -fR ../BOINC_Installer/temp/
+    fi
+fi
+
+## Copy the localization files into the installer tree
+## Old way copies CVS and *.po files which are not needed
+## cp -fpR locale/ ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale
+## sudo rm -dfR ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale/CVS
+## New way copies only *.mo files (adapted from boinc/sea/make-tar.sh)
+find locale -name '*.mo' | cut -d '/' -f 2 | awk '{print "\"../BOINC_Installer/Pkg_Root/Library/Application Support/BOINC Data/locale/"$0"\""}' | xargs mkdir -p
+find locale -name '*.mo' | cut -d '/' -f 2,3 | awk '{print "cp \"locale/"$0"\" \"../BOINC_Installer/Pkg_Root/Library/Application Support/BOINC Data/locale/"$0"\""}' | bash
+
+## Fix up ownership and permissions
+sudo chown -R root:admin ../BOINC_Installer/Pkg_Root/*
+sudo chmod -R u+rw,g+rw,o+r-w ../BOINC_Installer/Pkg_Root/*
+sudo chmod 1775 ../BOINC_Installer/Pkg_Root/Library
+
+sudo chown -R 501:admin ../BOINC_Installer/Pkg_Root/Library/Application\ Support/*
+sudo chmod -R u+rw,g+r-w,o+r-w ../BOINC_Installer/Pkg_Root/Library/Application\ Support/*
+
+sudo chown -R root:admin ../BOINC_Installer/Installer\ Resources/*
+sudo chown -R root:admin ../BOINC_Installer/Installer\ Scripts/*
+sudo chmod -R u+rw,g+r-w,o+r-w ../BOINC_Installer/Installer\ Resources/*
+sudo chmod -R u+rw,g+r-w,o+r-w ../BOINC_Installer/Installer\ Scripts/*
+
+sudo rm -dfR ../BOINC_Installer/Campus_Party_$1_$2_$3/
+
+mkdir -p ../BOINC_Installer/Campus_Party_$1_$2_$3/
+mkdir -p ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party
+mkdir -p ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras
+
+cp -fp ../BOINC_Installer/Installer\ Resources/ReadMe.rtf ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party
+sudo chown -R 501:admin ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/ReadMe.rtf
+sudo chmod -R 644 ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/ReadMe.rtf
+
+cp -fp COPYING ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/COPYING.txt
+sudo chown -R 501:admin ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/COPYING.txt
+sudo chmod -R 644 ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/COPYING.txt
+
+cp -fp COPYING.LESSER ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/COPYING.LESSER.txt
+sudo chown -R 501:admin ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/COPYING.LESSER.txt
+sudo chmod -R 644 ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/COPYING.LESSER.txt
+
+cp -fp COPYRIGHT ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/COPYRIGHT.txt
+sudo chown -R 501:admin ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/COPYRIGHT.txt
+sudo chmod -R 644 ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/COPYRIGHT.txt
+
+cp -fpR $BUILDPATH/Uninstall\ BOINC.app ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras
+sudo chown -R root:admin ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/Uninstall\ BOINC.app
+sudo chmod -R 755 ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/extras/Uninstall\ BOINC.app
+
+# Copy the installer wrapper application "BOINC Installer.app"
+cp -fpR $BUILDPATH/BOINC\ Installer.app ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/
+
+DarwinVersion=`uname -r`;
+DarwinMajorVersion=`echo $DarwinVersion | sed 's/\([0-9]*\)[.].*/\1/' `;
+# DarwinMinorVersion=`echo $version | sed 's/[0-9]*[.]\([0-9]*\).*/\1/' `;
+#
+# echo "major = $DarwinMajorVersion"
+# echo "minor = $DarwinMinorVersion"
+#
+# Darwin version 9.x.y corresponds to OS 10.5.x
+# Darwin version 8.x.y corresponds to OS 10.4.x
+# Darwin version 7.x.y corresponds to OS 10.3.x
+# Darwin version 6.x corresponds to OS 10.2.x
+
+# Build the installer package inside the wrapper application's bundle
+if [ "$DarwinMajorVersion" = "8" ]; then
+    # OS 10.4 packagemaker
+    /Developer/Tools/packagemaker -build -p ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/BOINC\ Installer.app/Contents/Resources/BOINC.pkg -f ../BOINC_Installer/Pkg_Root -r ../BOINC_Installer/Installer\ Resources/ -i mac_build/Pkg-Info.plist -d mac_Installer/Description.plist -ds 
+else
+    # OS 10.5 / OS 10.6 packagemaker
+    /Developer/usr/bin/packagemaker -r ../BOINC_Installer/Pkg_Root -e ../BOINC_Installer/Installer\ Resources/ -s ../BOINC_Installer/Installer\ Scripts/ -f mac_build/Pkg-Info.plist -t "BOINC Manager" -n "$1.$2.$3" -b -o ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/BOINC\ Installer.app/Contents/Resources/BOINC.pkg
+    # Remove TokenDefinitions.plist and IFPkgPathMappings in Info.plist, which would cause installer to find a previous copy of BOINCManager and install there
+    sudo rm -f ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources/TokenDefinitions.plist
+    defaults delete "$BOINCPath/../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/BOINC Installer.app/Contents/Resources/BOINC.pkg/Contents/Info" IFPkgPathMappings
+fi
+
+# Allow the installer wrapper application to modify the package's Info.plist file
+sudo chmod a+rw ../BOINC_Installer/Campus_Party_$1_$2_$3/boinc_$1.$2.$3_macOSX_Campus_Party/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Info.plist
+
+cd ../BOINC_Installer/Campus_Party_$1_$2_$3
+zip -rqy boinc_$1.$2.$3_macOSX_Campus_Party.zip boinc_$1.$2.$3_macOSX_Campus_Party
+
+#popd
+cd "${BOINCPath}"
+
+return 0
diff --git a/mac_installer/uninstall.cpp b/mac_installer/uninstall.cpp
new file mode 100644
index 0000000..912229b
--- /dev/null
+++ b/mac_installer/uninstall.cpp
@@ -0,0 +1,1306 @@
+// This file is part of BOINC.
+// http://boinc.berkeley.edu
+// Copyright (C) 2008 University of California
+//
+// BOINC is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation,
+// either version 3 of the License, or (at your option) any later version.
+//
+// BOINC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+
+/*  uninstall.cpp */
+
+#define TESTING 0    /* for debugging */
+    
+#include <Carbon/Carbon.h>
+#include <Security/Authorization.h>
+#include <Security/AuthorizationTags.h>
+
+#include <grp.h>
+
+#include <unistd.h>	// geteuid, seteuid
+#include <pwd.h>	// passwd, getpwnam
+#include <dirent.h>
+#include <sys/param.h>  // for MAXPATHLEN
+#include <string.h>
+#include <vector>
+#include <string>
+
+using std::vector;
+using std::string;
+
+#define SEARCHFORALLBOINCMANAGERS 0
+
+#include "LoginItemAPI.h"
+
+static OSStatus DoUninstall(void);
+static OSStatus CleanupAllVisibleUsers(void);
+static OSStatus DeleteOurBundlesFromDirectory(CFStringRef bundleID, char *extension, char *dirPath);
+static OSStatus GetAuthorization(AuthorizationRef * authRef, const char *pathToTool, char *brandName);
+static OSStatus DoPrivilegedExec(char *brandName, const char *pathToTool, char *arg1, char *arg2, char *arg3, char *arg4, char *arg5);
+static void DeleteLoginItemOSAScript(char* user, char* appName);
+static void DeleteLoginItemAPI(void);
+static void DeleteLoginItemFromPListFile(void);
+static char * PersistentFGets(char *buf, size_t buflen, FILE *f);
+OSErr GetCurrentScreenSaverSelection(char *moduleName, size_t maxLen);
+OSErr SetScreenSaverSelection(char *moduleName, char *modulePath, int type);
+int GetCountOfLoginItemsFromPlistFile(void);
+OSErr GetLoginItemNameAtIndexFromPlistFile(int index, char *name, size_t maxLen);
+OSErr DeleteLoginItemNameAtIndexFromPlistFile(int index);
+static OSErr FindProcess (OSType typeToFind, OSType creatorToFind, ProcessSerialNumberPtr processSN);
+static pid_t FindProcessPID(char* name, pid_t thePID);
+static OSStatus QuitOneProcess(OSType signature);
+static void SleepTicks(UInt32 ticksToSleep);
+static Boolean ShowMessage(Boolean allowCancel, Boolean continueButton, const char *format, ...);
+#if SEARCHFORALLBOINCMANAGERS
+static OSStatus GetpathToBOINCManagerApp(char* path, int maxLen, FSRef *theFSRef);
+#endif
+
+
+int main(int argc, char *argv[])
+{
+    char                        pathToSelf[MAXPATHLEN], appName[256], *p;
+    ProcessSerialNumber         ourPSN;
+    FSRef                       ourFSRef;
+    Boolean                     cancelled = false;
+    OSStatus                    err = noErr;
+
+    // Determine whether this is the intial launch or the relaunch with privileges
+    if ( (argc == 2) && (strcmp(argv[1], "--privileged") == 0) ) {
+        if (geteuid() != 0) {        // Confirm that we are running as root
+            ShowMessage(false, false, "Permission error after relaunch");
+            return permErr;
+        }
+        
+        ShowMessage(false, true, "Removal may take several minutes.\nPlease be patient.");
+        
+        return DoUninstall();
+    }
+
+    // This is the initial launch.  Authenticate and relaunch ourselves with privileges.
+    
+    // Get the full path to our executable inside this application's bundle
+    err = GetCurrentProcess (&ourPSN);
+    if (err == noErr) {
+        err = GetProcessBundleLocation(&ourPSN, &ourFSRef);
+    }
+    if (err == noErr) {
+        err = FSRefMakePath (&ourFSRef, (UInt8*)pathToSelf, sizeof(pathToSelf));
+    }
+    if (err != noErr) {
+        ShowMessage(false, false, "Couldn't get path to self.  Error %d", err);
+        return err;
+    }
+
+    // To allow for branding, assume name of executable inside bundle is same as name of bundle
+    p = strrchr(pathToSelf, '/');         // Assume name of executable inside bundle is same as name of bundle
+    if (p == NULL)
+        p = pathToSelf - 1;
+    strlcpy(appName, p+1, sizeof(appName));
+    p = strrchr(appName, '.');         // Strip off bundle extension (".app")
+    if (p)
+        *p = '\0'; 
+
+    strlcat(pathToSelf, "/Contents/MacOS/", sizeof(pathToSelf));
+    strlcat(pathToSelf, appName, sizeof(pathToSelf));
+
+    p = strchr(appName, ' ');
+    p += 1;         // Point to brand name following "Uninstall "
+
+    if (GetResource('ALRT', 128)) {
+        // BOINC uses custom dialog with custom PICT
+        cancelled = (Alert(128, NULL)  == cancel);
+    } else {
+        // Grid Republic uses generic dialog with Uninstall application's icon
+        cancelled = ! ShowMessage(true, false, "Are you sure you want to completely remove %s from your computer?\n\n"
+                                        "This will remove the executables but will not touch %s data files.", p, p);
+    }
+
+    if (! cancelled) {
+        err = DoPrivilegedExec(p, pathToSelf, "--privileged", NULL, NULL, NULL, NULL);
+    }
+    
+    if (cancelled || (err == errAuthorizationCanceled)) {
+        ShowMessage(false, false, "Canceled: %s has not been touched.", p);
+        return err;
+    }
+
+#if TESTING
+    ShowMessage(false, false, "DoPrivilegedExec returned %d", err);
+#endif
+
+    if (err)
+        ShowMessage(false, false, "An error occurred: error code %d", err);
+    else
+        ShowMessage(false, false, "Removal completed.\n\n You may want to remove the following remaining items using the Finder: \n"
+         "\"/Library/Application Support/BOINC Data\" directory\n\nfor each user, the file\n"
+         "\"/Users/[username]/Library/Preferences/BOINC Manager Preferences\".");
+        
+    return err;
+}
+
+
+static OSStatus DoUninstall(void) {
+    pid_t                   coreClientPID = 0;
+    char                    cmd[1024];
+    char                    *p;
+    passwd                  *pw;
+    OSStatus                err = noErr;
+#if SEARCHFORALLBOINCMANAGERS
+    char                    myRmCommand[MAXPATHLEN+10], plistRmCommand[MAXPATHLEN+10];
+    char                    notBoot[] = "/Volumes/";
+    FSRef                   theFSRef;
+    int                     pathOffset, i;
+#endif
+
+#if TESTING
+    ShowMessage(false, false, "Permission OK after relaunch");
+#endif
+
+    QuitOneProcess('BNC!'); // Quit any old instance of BOINC manager
+    sleep(2);
+
+    // Core Client may still be running if it was started without Manager
+    coreClientPID = FindProcessPID("boinc", 0);
+    if (coreClientPID)
+        kill(coreClientPID, SIGTERM);   // boinc catches SIGTERM & exits gracefully
+
+#if SEARCHFORALLBOINCMANAGERS
+    // Phase 1: try to find all our applications using LaunchServices
+    for (i=0; i<100; i++) {
+        strlcpy(myRmCommand, "rm -rf \"", 10);
+        pathOffset = strlen(myRmCommand);
+    
+        err = GetpathToBOINCManagerApp(myRmCommand+pathOffset, MAXPATHLEN, &theFSRef);
+        if (err)
+            break;
+        
+        strlcat(myRmCommand, "\"", sizeof(myRmCommand));
+    
+#if TESTING
+        ShowMessage(false, false, "manager: %s", myRmCommand);
+#endif
+
+        p = strstr(myRmCommand, notBoot);
+        
+        if (p == myRmCommand+pathOffset) {
+#if TESTING
+            ShowMessage(false, false, "Not on boot volume: %s", myRmCommand);
+#endif
+            break;
+        } else {
+
+            // First delete just the application's info.plist file and update the 
+            // LaunchServices Database; otherwise LSFindApplicationForInfo might 
+            // return this application again after it's been deleted.
+            strlcpy(plistRmCommand, myRmCommand, sizeof(plistRmCommand));
+            strlcat(plistRmCommand, "/Contents/info.plist", sizeof(plistRmCommand));
+#if TESTING
+        ShowMessage(false, false, "Deleting info.plist: %s", plistRmCommand);
+#endif
+            system(plistRmCommand); 
+            err = LSRegisterFSRef(&theFSRef, true);
+#if TESTING
+            if (err)
+                ShowMessage(false, false, "LSRegisterFSRef returned error %d", err);
+#endif
+            system(myRmCommand);
+        }
+    }
+#endif
+
+    // Phase 2: step through default Applications directory searching for our applications
+    err = DeleteOurBundlesFromDirectory(CFSTR("edu.berkeley.boinc"), "app", "/Applications");
+
+    // Phase 3: step through default Screen Savers directory searching for our screen savers
+    err = DeleteOurBundlesFromDirectory(CFSTR("edu.berkeley.boincsaver"), "saver", "/Library/Screen Savers");
+
+    // Phase 4: Delete our files and directories at our installer's default locations
+    // Remove everything we've installed, whether BOINC, GridRepublic, Progress Thru Processors or
+    // Charity Engine
+    // These first 4 should already have been deleted by the above code, but do them anyway for safety
+    system ("rm -rf /Applications/BOINCManager.app");
+    system ("rm -rf \"/Library/Screen Savers/BOINCSaver.saver\"");
+    
+    system ("rm -rf \"/Applications/GridRepublic Desktop.app\"");
+    system ("rm -rf \"/Library/Screen Savers/GridRepublic.saver\"");
+    
+    system ("rm -rf \"/Applications/Progress\\ Thru\\ Processors\\ Desktop.app\"");
+    system ("rm -rf \"/Library/Screen Savers/Progress\\ Thru\\ Processors.saver\"");
+    
+    system ("rm -rf \"/Applications/Charity\\ Engine\\ Desktop.app\"");
+    system ("rm -rf \"/Library/Screen Savers/Charity\\ Engine.saver\"");
+    
+    // Delete any receipt from an older installer (which had 
+    // a wrapper application around the installer package.)
+    system ("rm -rf /Library/Receipts/GridRepublic.pkg");
+    system ("rm -rf /Library/Receipts/Progress\\ Thru\\ Processors.pkg");
+    system ("rm -rf /Library/Receipts/Charity\\ Engine.pkg");
+    system ("rm -rf /Library/Receipts/BOINC.pkg");
+
+    // Delete any receipt from a newer installer (a bare package.) 
+    system ("rm -rf /Library/Receipts/GridRepublic\\ Installer.pkg");
+    system ("rm -rf /Library/Receipts/Progress\\ Thru\\ Processors\\ Installer.pkg");
+    system ("rm -rf /Library/Receipts/Charity\\ Engine\\ Installer.pkg");
+    system ("rm -rf /Library/Receipts/BOINC\\ Installer.pkg");
+
+    // Phase 5: Set BOINC Data owner and group to logged in user
+    // We don't customize BOINC Data directory name for branding
+//    system ("rm -rf \"/Library/Application Support/BOINC Data\"");
+    p = getlogin();
+    pw = getpwnam(p);
+    sprintf(cmd, "chown -R %d:%d \"/Library/Application Support/BOINC Data\"", pw->pw_uid, pw->pw_gid);
+    system (cmd);
+    system("chmod -R u+rw-s,g+r-w-s,o+r-w \"/Library/Application Support/BOINC Data\"");
+    system("chmod 600 \"/Library/Application Support/BOINC Data/gui_rpc_auth.cfg\"");
+    
+    // Phase 6: step through all users and do user-specific cleanup
+    CleanupAllVisibleUsers();
+    
+    system ("dscl . -delete /users/boinc_master");
+    system ("dscl . -delete /groups/boinc_master");
+    system ("dscl . -delete /users/boinc_project");
+    system ("dscl . -delete /groups/boinc_project");
+
+
+    return 0;
+}
+
+
+static OSStatus DeleteOurBundlesFromDirectory(CFStringRef bundleID, char *extension, char *dirPath) {
+    DIR                     *dirp;
+    dirent                  *dp;
+    CFStringRef             urlStringRef = NULL;
+    int                     index;
+    CFStringRef             thisID = NULL;
+    CFBundleRef             thisBundle = NULL;
+    CFURLRef                bundleURLRef = NULL;
+    char                    myRmCommand[MAXPATHLEN+10], *p;
+    int                     pathOffset;
+
+    dirp = opendir(dirPath);
+    if (dirp == NULL) {      // Should never happen
+        ShowMessage(false, false, "opendir(\"%s\") failed", dirPath);
+        return -1;
+    }
+    
+    index = -1;
+    while (true) {
+        index++;
+        
+        dp = readdir(dirp);
+        if (dp == NULL)
+            break;                  // End of list
+
+        p = strrchr(dp->d_name, '.');
+        if (p == NULL)
+            continue;
+
+        if (strcmp(p+1, extension))
+            continue;
+        
+        strlcpy(myRmCommand, "rm -rf \"", 10);
+        pathOffset = strlen(myRmCommand);
+        strlcat(myRmCommand, dirPath, sizeof(myRmCommand));
+        strlcat(myRmCommand, "/", sizeof(myRmCommand));
+        strlcat(myRmCommand, dp->d_name, sizeof(myRmCommand));
+        urlStringRef = CFStringCreateWithCString(kCFAllocatorDefault, myRmCommand+pathOffset, CFStringGetSystemEncoding());
+        if (urlStringRef) {
+            bundleURLRef = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, urlStringRef, kCFURLPOSIXPathStyle, false);
+            if (bundleURLRef) {
+                thisBundle = CFBundleCreate( kCFAllocatorDefault, bundleURLRef );
+                if (thisBundle) {
+                    thisID = CFBundleGetIdentifier(thisBundle);
+                        if (thisID) {
+                            strlcat(myRmCommand, "\"", sizeof(myRmCommand));
+                            if (CFStringCompare(thisID, bundleID, 0) == kCFCompareEqualTo) {
+#if TESTING
+                                ShowMessage(false, false, "Bundles: %s", myRmCommand);                                
+#endif
+
+                               system(myRmCommand);
+                            } else {
+#if TESTING
+//                                ShowMessage(false, false, "Bundles: Not deleting %s", myRmCommand+pathOffset);
+#endif
+                            }
+
+                
+                        } // if (thisID)
+#if TESTING
+                        else
+                            ShowMessage(false, false, "CFBundleGetIdentifier failed for index %d", index);                                
+#endif
+                        CFRelease(thisBundle);                
+               } //if (thisBundle)
+#if TESTING
+                        else
+                            ShowMessage(false, false, "CFBundleCreate failed for index %d", index);                                
+#endif
+                CFRelease(bundleURLRef);                
+            } // if (bundleURLRef)
+#if TESTING
+        else
+            ShowMessage(false, false, "CFURLCreateWithFileSystemPath failed");                                
+#endif
+        
+            CFRelease(urlStringRef);
+        } // if (urlStringRef)
+#if TESTING
+        else
+            ShowMessage(false, false, "CFStringCreateWithCString failed");                                
+#endif
+    }   // while true
+    
+    closedir(dirp);
+
+    return noErr;
+}
+
+
+enum {
+	kSystemEventsCreator = 'sevs'
+};
+
+
+// Find all visible users and delete their login item to launch BOINC Manager.
+// Remove each user from groups boinc_master and boinc_project.
+// For now, don't delete user's BOINC Preferences file.
+static OSStatus CleanupAllVisibleUsers(void)
+{
+    long                OSVersion = 0;
+    passwd              *pw;
+    vector<string>      human_user_names;
+    vector<uid_t>       human_user_IDs;
+    uid_t               saved_uid, saved_euid;
+    char                human_user_name[256];
+    int                 i;
+    int                 userIndex;
+    int                 flag;
+    char                buf[256];
+    char                s[1024];
+    char                cmd[2048];
+    char                systemEventsPath[1024];
+    ProcessSerialNumber SystemEventsPSN;
+	FSRef               appRef;
+    FILE                *f;
+    char                *p;
+    int                 id;
+    OSStatus            err;
+    Boolean             changeSaver;
+
+    err = Gestalt(gestaltSystemVersion, &OSVersion);
+    if (err != noErr) {
+        OSVersion = 0;
+    }
+
+    saved_uid = getuid();
+    saved_euid = geteuid();
+
+    // First, find all users on system
+    f = popen("dscl . list /Users UniqueID", "r");
+    if (f) {
+        while (PersistentFGets(buf, sizeof(buf), f)) {
+            p = strrchr(buf, ' ');
+            if (p) {
+                id = atoi(p+1);
+                if (id < 501) {
+#if TESTING
+//                    printf("skipping user ID %d\n", id);
+//                    fflush(stdout);
+#endif
+                    continue;
+                }
+                
+                while (p > buf) {
+                    if (*p != ' ') break;
+                    --p;
+                }
+
+                *(p+1) = '\0';
+                human_user_names.push_back(string(buf));
+                human_user_IDs.push_back((uid_t)id);
+#if TESTING
+                ShowMessage(false, false, "user ID %d: %s\n", id, buf);
+#endif
+                *(p+1) = ' ';
+            }
+        }
+        pclose(f);
+    }
+    
+    for (userIndex=human_user_names.size(); userIndex>0; --userIndex) {
+        flag = 0;
+        strlcpy(human_user_name, human_user_names[userIndex-1].c_str(), sizeof(human_user_name));
+
+        // Check whether this user is a login (human) user 
+        sprintf(s, "dscl . -read \"/Users/%s\" NFSHomeDirectory", human_user_name);    
+        f = popen(s, "r");
+        if (f) {
+            while (PersistentFGets(buf, sizeof(buf), f)) {
+                p = strrchr(buf, ' ');
+                if (p) {
+                    if (strstr(p, "/var/empty") != NULL) flag = 1;
+                }
+            }
+            pclose(f);
+        }
+
+        sprintf(s, "dscl . -read \"/Users/%s\" UserShell", human_user_name);    
+        f = popen(s, "r");
+        if (f) {
+            while (PersistentFGets(buf, sizeof(buf), f)) {
+                p = strrchr(buf, ' ');
+                if (p) {
+                    if (strstr(p, "/usr/bin/false") != NULL) flag |= 2;
+                }
+            }
+            pclose(f);
+        }
+        
+        // Skip all non-human (non-login) users
+        if (flag == 3) { // if (Home Directory == "/var/empty") && (UserShell == "/usr/bin/false")
+#if TESTING
+            ShowMessage(false, false, "Flag=3: skipping user ID %d: %s", human_user_IDs[userIndex-1], buf);
+#endif
+            continue;
+        }
+
+        pw = getpwnam(human_user_name);
+        if (pw == NULL)
+            continue;
+
+#if TESTING
+        ShowMessage(false, false, "Deleting login item for user %s: Posix name=%s, Full name=%s, UID=%d", 
+                human_user_name, pw->pw_name, pw->pw_gecos, pw->pw_uid);
+#endif
+
+        // Remove user from groups boinc_master and boinc_project
+        sprintf(s, "dscl . -delete /groups/boinc_master users \"%s\"", human_user_name);
+        system (s);
+
+        sprintf(s, "dscl . -delete /groups/boinc_project users \"%s\"", human_user_name);
+        system (s);
+
+#if TESTING
+//    ShowMessage(false, false, "Before seteuid(%d) for user %s, euid = %d", pw->pw_uid, human_user_name, geteuid());
+#endif
+        
+        if (OSVersion >= 0x1060) {
+            setuid(0);
+        }
+        // Delete our login item(s) for this user
+        if (OSVersion < 0x1070) {
+            seteuid(pw->pw_uid);    // Temporarily set effective uid to this user
+            DeleteLoginItemAPI();
+            seteuid(saved_euid);    // Set effective uid back to privileged user
+        } else if (OSVersion >= 0x1080) {
+            seteuid(pw->pw_uid);    // Temporarily set effective uid to this user
+            DeleteLoginItemFromPListFile();
+            seteuid(saved_euid);    // Set effective uid back to privileged user
+        } else {            // OS 10.7.x
+            // We must leave effective user ID as privileged user (root) 
+            // because the target user may not be in the sudoers file.
+
+            // We must launch the System Events application for the target user
+
+#if TESTING
+            ShowMessage(false, false, "Telling System Events to quit (before DeleteLoginItemOSAScript)");
+#endif
+            // Find SystemEvents process.  If found, quit it in case 
+            // it is running under a different user.
+            err = QuitOneProcess(kSystemEventsCreator);
+#if TESTING
+            if (err != noErr) {
+                ShowMessage(false, false, "QuitOneProcess(kSystemEventsCreator) returned error %d ", (int) err);
+            }
+#endif
+            // Wait for the process to be gone
+            for (i=0; i<50; ++i) {      // 5 seconds max delay
+                SleepTicks(6);  // 6 Ticks == 1/10 second
+                err = FindProcess ('APPL', kSystemEventsCreator, &SystemEventsPSN);
+                if (err != noErr) break;
+            }
+#if TESTING
+            if (i >= 50) {
+                ShowMessage(false, false, "Failed to make System Events quit");
+            }
+#endif
+            sleep(2);
+            
+            err = LSFindApplicationForInfo(kSystemEventsCreator, NULL, NULL, &appRef, NULL);
+            if (err != noErr) {
+#if TESTING
+                ShowMessage(false, false, "LSFindApplicationForInfo(kSystemEventsCreator) returned error %d ", (int) err);
+#endif
+            } else {
+                FSRefMakePath(&appRef, (UInt8*)systemEventsPath, sizeof(systemEventsPath));
+#if TESTING
+                ShowMessage(false, false, "SystemEvents is at %s", systemEventsPath);
+                ShowMessage(false, false, "Launching SystemEvents for user %s", pw->pw_name);
+#endif
+
+                sprintf(cmd, "sudo -iu \"%s\" \\\"%s/Contents/MacOS/System Events\\\" &", pw->pw_name, systemEventsPath);
+                err = system(cmd);
+                if (err == noErr) {
+                    // Wait for the process to start
+                    for (i=0; i<50; ++i) {      // 5 seconds max delay
+                        SleepTicks(6);  // 6 Ticks == 1/10 second
+                        err = FindProcess ('APPL', kSystemEventsCreator, &SystemEventsPSN);
+                        if (err == noErr) break;
+                    }
+#if TESTING
+                    if (i >= 50) {
+                        ShowMessage(false, false, "Failed to launch System Events for user %s", pw->pw_name);
+                    }
+#endif
+                    sleep(2);
+
+                    DeleteLoginItemOSAScript(pw->pw_name, "BOINCManager");
+                    DeleteLoginItemOSAScript(pw->pw_name, "GridRepublic Desktop");
+                    DeleteLoginItemOSAScript(pw->pw_name, "Progress Thru Processors Desktop");
+                    DeleteLoginItemOSAScript(pw->pw_name, "Charity Engine Desktop");
+#if TESTING
+                } else {
+                    ShowMessage(false, false, "[2] Command: %s returned error %d", cmd, (int) err);
+#endif
+                }
+            }
+        }
+        
+        // We don't delete the user's BOINC Manager preferences
+//        sprintf(s, "rm -f \"/Users/%s/Library/Preferences/BOINC Manager Preferences\"", human_user_name);
+//        system (s);
+        
+        //  Set screensaver to "Computer Name" default screensaver only 
+        //  if it was BOINC, GridRepublic, Progress Thru Processors or Charity Engine.
+        changeSaver = false;
+        seteuid(pw->pw_uid);    // Temporarily set effective uid to this user
+        if (OSVersion < 0x1060) {
+            f = popen("defaults -currentHost read com.apple.screensaver moduleName", "r");
+            if (f) {
+                while (PersistentFGets(s, sizeof(s), f)) {
+                    if (strstr(s, "BOINCSaver")) {
+                        changeSaver = true;
+                        break;
+                    }
+                    if (strstr(s, "GridRepublic")) {
+                        changeSaver = true;
+                        break;
+                    }
+                    if (strstr(s, "Progress Thru Processors")) {
+                        changeSaver = true;
+                        break;
+                    }
+                    if (strstr(s, "Charity Engine")) {
+                        changeSaver = true;
+                        break;
+                    }
+                }
+                pclose(f);
+            }
+        } else {
+            err = GetCurrentScreenSaverSelection(s, sizeof(s) -1);
+            if (err == noErr) {
+                if (strstr(s, "BOINCSaver")) {
+                    changeSaver = true;
+                }
+                if (strstr(s, "GridRepublic")) {
+                    changeSaver = true;
+                }
+                if (strstr(s, "Progress Thru Processors")) {
+                    changeSaver = true;
+                }
+                if (strstr(s, "Charity Engine")) {
+                    changeSaver = true;
+                }
+            }
+        }
+        
+        if (changeSaver) {
+            if (OSVersion < 0x1060) {
+                system ("defaults -currentHost write com.apple.screensaver moduleName \"Computer Name\"");
+                system ("defaults -currentHost write com.apple.screensaver modulePath \"/System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/Computer Name.saver\"");
+            } else {
+                err = SetScreenSaverSelection("Computer Name", 
+                    "/System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/Computer Name.saver", 0);
+            }
+        }
+
+        seteuid(saved_euid);    // Set effective uid back to privileged user
+        
+#if TESTING
+//    ShowMessage(false, false, "After seteuid(%d) for user %s, euid = %d, saved_uid = %d", pw->pw_uid, human_user_name, geteuid(), saved_uid);
+#endif
+    }       // End userIndex loop
+    
+    sleep(1);
+    
+    if (OSVersion >= 0x1070) {
+#if TESTING
+        ShowMessage(false, false, "Telling System Events to quit (at end)");
+#endif
+        err = QuitOneProcess(kSystemEventsCreator);
+#if TESTING
+        if (err != noErr) {
+            ShowMessage(false, false, "QuitOneProcess(kSystemEventsCreator) returned error %d ", (int) err);
+        }
+#endif
+    }
+
+    return noErr;
+}
+
+
+static OSStatus GetAuthorization(AuthorizationRef * authRef, const char *pathToTool, char *brandName) {
+    static Boolean              sIsAuthorized = false;
+    AuthorizationRights         ourAuthRights;
+    AuthorizationFlags          ourAuthFlags;
+    AuthorizationItem           ourAuthRightsItem[1];
+    AuthorizationEnvironment    ourAuthEnvironment;
+    AuthorizationItem           ourAuthEnvItem[1];
+    char                        prompt[256];
+    OSStatus                    err = noErr;
+
+    if (sIsAuthorized)
+        return noErr;
+    
+    sprintf(prompt, "Enter administrator password to completely remove %s from you computer.\n\n", brandName);
+
+    ourAuthRights.count = 0;
+    ourAuthRights.items = NULL;
+
+    err = AuthorizationCreate (&ourAuthRights, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, authRef);
+    if (err != noErr) {
+        ShowMessage(false, false, "AuthorizationCreate returned error %d", err);
+        return err;
+    }
+     
+    ourAuthRightsItem[0].name = kAuthorizationRightExecute;
+    ourAuthRightsItem[0].value = (void *)pathToTool;
+    ourAuthRightsItem[0].valueLength = strlen (pathToTool);
+    ourAuthRightsItem[0].flags = 0;
+    ourAuthRights.count = 1;
+    ourAuthRights.items = ourAuthRightsItem;
+
+    ourAuthEnvItem[0].name = kAuthorizationEnvironmentPrompt;
+    ourAuthEnvItem[0].value = prompt;
+    ourAuthEnvItem[0].valueLength = strlen (prompt);
+    ourAuthEnvItem[0].flags = 0;
+
+    ourAuthEnvironment.count = 1;
+    ourAuthEnvironment.items = ourAuthEnvItem;
+
+    
+    ourAuthFlags = kAuthorizationFlagInteractionAllowed | kAuthorizationFlagExtendRights;
+    
+    // When this is called from the installer, the installer has already authenticated.  
+    // In that case we are already running with full root privileges so AuthorizationCopyRights() 
+    // does not request a password from the user again.
+    err = AuthorizationCopyRights (*authRef, &ourAuthRights, &ourAuthEnvironment, ourAuthFlags, NULL);
+    
+    if (err == noErr)
+        sIsAuthorized = true;
+    
+    return err;
+}
+
+
+
+static OSStatus DoPrivilegedExec(char *brandName, const char *pathToTool, char *arg1, char *arg2, char *arg3, char *arg4, char *arg5) {
+    AuthorizationRef    authRef = NULL;
+    short               i;
+    char                *args[8];
+    OSStatus            err;
+    FILE                *ioPipe;
+    char                *p, junk[256];
+
+    err = GetAuthorization(&authRef, pathToTool, brandName);
+    if (err != noErr) {
+        if (err != errAuthorizationCanceled)
+            ShowMessage(false, false, "GetAuthorization returned error %d", err);
+        return err;
+    }
+
+    for (i=0; i<5; i++) {       // Retry 5 times if error
+        args[0] = arg1;
+        args[1] = arg2;
+        args[2] = arg3;
+        args[3] = arg4;
+        args[4] = arg5;
+        args[5] = NULL;
+
+        err = AuthorizationExecuteWithPrivileges (authRef, pathToTool, 0, args, &ioPipe);
+        // We use the pipe to signal us when the command has completed
+        if (ioPipe) {
+            do {
+                p = fgets(junk, sizeof(junk), ioPipe);
+            } while (p);
+            
+            fclose (ioPipe);
+        }
+        
+        if (err == noErr)
+            break;
+    }
+
+if (err != noErr)
+    ShowMessage(false, false, "\"%s %s %s %s %s %s\" returned error %d", pathToTool, 
+                        arg1 ? arg1 : "", arg2 ? arg2 : "", arg3 ? arg3 : "", 
+                        arg4 ? arg4 : "", arg5 ? arg5 : "", err);
+
+   return err;
+}
+
+
+// Used for OS 10.7.x
+static void DeleteLoginItemOSAScript(char* user, char* appName)
+{
+    char                    cmd[2048];
+    OSErr                   err;
+
+    sprintf(cmd, "sudo -u \"%s\" osascript -e 'tell application \"System Events\"' -e 'delete (every login item whose name contains \"%s\")' -e 'end tell'", user, appName);
+    err = system(cmd);
+#if TESTING
+    if (err) {
+        ShowMessage(false, false, "Command: %s returned error %d", cmd, err);
+    }
+#endif
+}
+    
+
+// Used for OS < OS 10.7
+static void DeleteLoginItemAPI(void)
+{
+    Boolean                 success;
+    int                     numberOfLoginItems, counter;
+    char                    *p, *q;
+
+    success = false;
+
+    numberOfLoginItems = GetCountOfLoginItems(kCurrentUser);
+    
+    // Search existing login items in reverse order, deleting ours
+    for (counter = numberOfLoginItems ; counter > 0 ; counter--)
+    {
+        p = ReturnLoginItemPropertyAtIndex(kCurrentUser, kApplicationNameInfo, counter-1);
+        q = p;
+        while (*q)
+        {
+            // It is OK to modify the returned string because we "own" it
+            *q = toupper(*q);	// Make it case-insensitive
+            q++;
+        }
+            
+        if (strcmp(p, "BOINCMANAGER.APP") == 0)
+            success = RemoveLoginItemAtIndex(kCurrentUser, counter-1);
+        if (strcmp(p, "GRIDREPUBLIC DESKTOP.APP") == 0)
+            success = RemoveLoginItemAtIndex(kCurrentUser, counter-1);
+        if (strcmp(p, "PROGRESS THRU PROCESSORS DESKTOP.APP") == 0)
+            success = RemoveLoginItemAtIndex(kCurrentUser, counter-1);
+        if (strcmp(p, "CHARITY ENGINE DESKTOP.APP") == 0)
+            success = RemoveLoginItemAtIndex(kCurrentUser, counter-1);
+    }
+}
+
+
+// Used for OS 10.8
+static void DeleteLoginItemFromPListFile(void)
+{
+    Boolean                 success;
+    int                     numberOfLoginItems, counter;
+    char                    theName[256], *q;
+
+    success = false;
+
+    numberOfLoginItems = GetCountOfLoginItemsFromPlistFile();
+    
+    // Search existing login items in reverse order, deleting ours
+    for (counter = numberOfLoginItems ; counter > 0 ; counter--)
+    {
+        GetLoginItemNameAtIndexFromPlistFile(counter-1, theName, sizeof(theName));
+        q = theName;
+        while (*q)
+        {
+            // It is OK to modify the returned string because we "own" it
+            *q = toupper(*q);	// Make it case-insensitive
+            q++;
+        }
+            
+        if (strstr(theName, "BOINCMANAGER"))
+            success = DeleteLoginItemNameAtIndexFromPlistFile(counter-1);
+        if (strstr(theName, "GRIDREPUBLIC DESKTOP"))
+            success = DeleteLoginItemNameAtIndexFromPlistFile(counter-1);
+        if (strstr(theName, "PROGRESS THRU PROCESSORS DESKTOP"))
+            success = DeleteLoginItemNameAtIndexFromPlistFile(counter-1);
+        if (strstr(theName, "CHARITY ENGINE DESKTOP"))
+            success = DeleteLoginItemNameAtIndexFromPlistFile(counter-1);
+    }
+}
+
+
+static char * PersistentFGets(char *buf, size_t buflen, FILE *f) {
+    char *p = buf;
+    size_t len = buflen;
+    size_t datalen = 0;
+
+    *buf = '\0';
+    while (datalen < (buflen - 1)) {
+        fgets(p, len, f);
+        if (feof(f)) break;
+        if (ferror(f) && (errno != EINTR)) break;
+        if (strchr(buf, '\n')) break;
+        datalen = strlen(buf);
+        p = buf + datalen;
+        len -= datalen;
+    }
+    return (buf[0] ? buf : NULL);
+}
+
+
+OSErr GetCurrentScreenSaverSelection(char *moduleName, size_t maxLen) {
+    OSErr err = noErr;
+    CFStringRef nameKey = CFStringCreateWithCString(NULL,"moduleName",kCFStringEncodingASCII);
+    CFStringRef moduleNameAsCFString;
+    CFDictionaryRef theData;
+    
+    theData = (CFDictionaryRef)CFPreferencesCopyValue(CFSTR("moduleDict"), 
+                CFSTR("com.apple.screensaver"), 
+                kCFPreferencesCurrentUser,
+                kCFPreferencesCurrentHost
+                );
+    if (theData == NULL) {
+        CFRelease(nameKey);
+        return (-1);
+    }
+    
+    if (CFDictionaryContainsKey(theData, nameKey)  == false) 	
+	{
+        moduleName[0] = 0;
+        CFRelease(nameKey);
+        CFRelease(theData);
+	    return(-1);
+	}
+    
+    moduleNameAsCFString = CFStringCreateCopy(NULL, (CFStringRef)CFDictionaryGetValue(theData, nameKey));
+    CFStringGetCString(moduleNameAsCFString, moduleName, maxLen, kCFStringEncodingASCII);		    
+
+    CFRelease(nameKey);
+    CFRelease(theData);
+    CFRelease(moduleNameAsCFString);
+    return err;
+}
+
+
+OSErr SetScreenSaverSelection(char *moduleName, char *modulePath, int type) {
+    OSErr err = noErr;
+    CFStringRef preferenceName = CFSTR("com.apple.screensaver");
+    CFStringRef mainKeyName = CFSTR("moduleDict");
+    CFDictionaryRef emptyData;
+    CFMutableDictionaryRef newData;
+    Boolean success;
+
+    CFStringRef nameKey = CFStringCreateWithCString(NULL, "moduleName", kCFStringEncodingASCII);
+    CFStringRef nameValue = CFStringCreateWithCString(NULL, moduleName, kCFStringEncodingASCII);
+		
+    CFStringRef pathKey = CFStringCreateWithCString(NULL, "path", kCFStringEncodingASCII);
+    CFStringRef pathValue = CFStringCreateWithCString(NULL, modulePath, kCFStringEncodingASCII);
+    
+    CFStringRef typeKey = CFStringCreateWithCString(NULL, "type", kCFStringEncodingASCII);
+    CFNumberRef typeValue = CFNumberCreate(NULL, kCFNumberIntType, &type);
+    
+    emptyData = CFDictionaryCreate(NULL, NULL, NULL, 0, NULL, NULL);
+    if (emptyData == NULL) {
+        CFRelease(nameKey);
+        CFRelease(nameValue);
+        CFRelease(pathKey);
+        CFRelease(pathValue);
+        CFRelease(typeKey);
+        CFRelease(typeValue);
+        return(-1);
+    }
+
+    newData = CFDictionaryCreateMutableCopy(NULL,0, emptyData);
+
+    if (newData == NULL)
+	{
+        CFRelease(nameKey);
+        CFRelease(nameValue);
+        CFRelease(pathKey);
+        CFRelease(pathValue);
+        CFRelease(typeKey);
+        CFRelease(typeValue);
+        CFRelease(emptyData);
+        return(-1);
+    }
+
+    CFDictionaryAddValue(newData, nameKey, nameValue); 	
+    CFDictionaryAddValue(newData, pathKey, pathValue); 	
+    CFDictionaryAddValue(newData, typeKey, typeValue); 	
+
+    CFPreferencesSetValue(mainKeyName, newData, preferenceName, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);
+    success = CFPreferencesSynchronize(preferenceName, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);
+
+    if (!success) {
+        err = -1;
+    }
+    
+    CFRelease(nameKey);
+    CFRelease(nameValue);
+    CFRelease(pathKey);
+    CFRelease(pathValue);
+    CFRelease(typeKey);
+    CFRelease(typeValue);
+    CFRelease(emptyData);
+    CFRelease(newData);
+
+    return err;
+}
+
+
+int GetCountOfLoginItemsFromPlistFile() {
+    CFArrayRef	arrayOfLoginItemsFixed;
+    int valueToReturn = -1;
+    CFStringRef loginItemArrayKeyName = CFSTR("CustomListItems");
+    CFDictionaryRef topLevelDict;
+
+    topLevelDict = (CFDictionaryRef)CFPreferencesCopyValue(CFSTR("SessionItems"), CFSTR("com.apple.loginitems"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+    if (topLevelDict == NULL) {
+        return (0);
+    }
+
+    if (CFDictionaryContainsKey(topLevelDict, loginItemArrayKeyName)  == false) 	
+	{
+        CFRelease(topLevelDict);
+	    return(0);
+	}
+    
+    arrayOfLoginItemsFixed = (CFArrayRef)CFDictionaryGetValue(topLevelDict, loginItemArrayKeyName);
+    if( arrayOfLoginItemsFixed == NULL)
+	{
+        CFRelease(topLevelDict);
+	    return(0); 
+	}
+	
+    valueToReturn = (int) CFArrayGetCount(arrayOfLoginItemsFixed);
+
+    CFRelease(topLevelDict);
+    return(valueToReturn);    
+}
+
+
+// Returns empty string on failure
+OSErr GetLoginItemNameAtIndexFromPlistFile(int index, char *name, size_t maxLen) {
+    CFArrayRef	arrayOfLoginItemsFixed = NULL;
+    CFStringRef loginItemArrayKeyName = CFSTR("CustomListItems");
+    CFDictionaryRef topLevelDict = NULL;
+    CFDictionaryRef loginItemDict = NULL;
+    CFStringRef nameKey = CFSTR("Name");
+    CFStringRef nameAsCFString = NULL;
+    
+    *name = 0;  // Prepare for failure
+
+    topLevelDict = (CFDictionaryRef)CFPreferencesCopyValue(CFSTR("SessionItems"), CFSTR("com.apple.loginitems"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+    if (topLevelDict == NULL) {
+        return (-1);
+    }
+
+    if (CFDictionaryContainsKey(topLevelDict, loginItemArrayKeyName)  == false) 	
+	{
+        CFRelease(topLevelDict);
+	    return(-1);
+	}
+    
+    arrayOfLoginItemsFixed = (CFArrayRef) CFDictionaryGetValue(topLevelDict, loginItemArrayKeyName);
+    if( arrayOfLoginItemsFixed == NULL)
+	{
+        CFRelease(topLevelDict);
+	    return(-1); 
+	}
+    
+    loginItemDict = (CFDictionaryRef) CFArrayGetValueAtIndex(arrayOfLoginItemsFixed, (CFIndex)index);
+    if (loginItemDict == NULL)
+    {
+        CFRelease(topLevelDict);
+        return(-1); 
+    }
+
+	if (CFDictionaryContainsKey(loginItemDict, nameKey) == false) 	
+	{
+        CFRelease(topLevelDict);
+        return(-1); 
+	}
+
+    nameAsCFString = CFStringCreateCopy(NULL, (CFStringRef)CFDictionaryGetValue(loginItemDict, nameKey));
+    CFStringGetCString(nameAsCFString, name, maxLen, kCFStringEncodingASCII);		    
+
+    CFRelease(topLevelDict);
+    CFRelease(nameAsCFString);
+    return(noErr);
+}
+
+
+OSErr DeleteLoginItemNameAtIndexFromPlistFile(int index){
+    CFArrayRef	arrayOfLoginItemsFixed = NULL;
+    CFMutableArrayRef arrayOfLoginItemsModifiable;
+    CFStringRef topLevelKeyName = CFSTR("SessionItems");
+    CFStringRef preferenceName = CFSTR("com.apple.loginitems");
+    CFStringRef loginItemArrayKeyName = CFSTR("CustomListItems");
+    CFDictionaryRef oldTopLevelDict = NULL;
+    CFMutableDictionaryRef newTopLevelDict = NULL;
+    Boolean success;
+    OSErr err = noErr;
+
+    oldTopLevelDict = (CFDictionaryRef)CFPreferencesCopyValue(topLevelKeyName, preferenceName, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+    if (oldTopLevelDict == NULL) {
+        return (-1);
+    }
+
+    if (CFDictionaryContainsKey(oldTopLevelDict, loginItemArrayKeyName)  == false) 	
+	{
+        CFRelease(oldTopLevelDict);
+	    return(-1);
+	}
+    
+    arrayOfLoginItemsFixed = (CFArrayRef) CFDictionaryGetValue(oldTopLevelDict, loginItemArrayKeyName);
+    if( arrayOfLoginItemsFixed == NULL)
+	{
+        CFRelease(oldTopLevelDict);
+	    return(-1); 
+	}
+
+    arrayOfLoginItemsModifiable = CFArrayCreateMutableCopy(NULL, 0, arrayOfLoginItemsFixed);
+    if( arrayOfLoginItemsModifiable == NULL)
+	{
+        CFRelease(oldTopLevelDict);
+	    return(-1); 
+	}
+
+    CFArrayRemoveValueAtIndex(arrayOfLoginItemsModifiable, (CFIndex) index);    
+
+    newTopLevelDict = CFDictionaryCreateMutableCopy(NULL, 0, oldTopLevelDict);
+    CFDictionaryReplaceValue(newTopLevelDict, loginItemArrayKeyName, arrayOfLoginItemsModifiable);
+
+    CFPreferencesSetValue(topLevelKeyName, newTopLevelDict, preferenceName, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+    success = CFPreferencesSynchronize(preferenceName, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+
+    if (!success) {
+        err = -1;
+    }
+ 
+    CFRelease(oldTopLevelDict);
+    CFRelease(newTopLevelDict);
+   
+    return(err);
+
+}
+
+
+// ---------------------------------------------------------------------------
+/* This runs through the process list looking for the indicated application */
+/*  Searches for process by file type and signature (creator code)          */
+// ---------------------------------------------------------------------------
+static OSErr FindProcess (OSType typeToFind, OSType creatorToFind, ProcessSerialNumberPtr processSN)
+{
+    ProcessInfoRec tempInfo;
+    FSSpec procSpec;
+    Str31 processName;
+    OSErr myErr = noErr;
+    /* null out the PSN so we're starting at the beginning of the list */
+    processSN->lowLongOfPSN = kNoProcess;
+    processSN->highLongOfPSN = kNoProcess;
+    /* initialize the process information record */
+    tempInfo.processInfoLength = sizeof(ProcessInfoRec);
+    tempInfo.processName = processName;
+    tempInfo.processAppSpec = &procSpec;
+    /* loop through all the processes until we */
+    /* 1) find the process we want */
+    /* 2) error out because of some reason (usually, no more processes) */
+    do {
+        myErr = GetNextProcess(processSN);
+        if (myErr == noErr)
+            GetProcessInformation(processSN, &tempInfo);
+    }
+            while ((tempInfo.processSignature != creatorToFind || tempInfo.processType != typeToFind) &&
+                   myErr == noErr);
+    return(myErr);
+}
+
+
+static pid_t FindProcessPID(char* name, pid_t thePID)
+{
+    FILE *f;
+    char buf[1024];
+    size_t n = 0;
+    pid_t aPID;
+    
+    if (name != NULL)     // Search ny name
+        n = strlen(name);
+    
+    f = popen("ps -a -x -c -o command,pid", "r");
+    if (f == NULL)
+        return 0;
+    
+    while (PersistentFGets(buf, sizeof(buf), f))
+    {
+        if (name != NULL) {     // Search by name
+            if (strncmp(buf, name, n) == 0)
+            {
+                aPID = atol(buf+16);
+                pclose(f);
+                return aPID;
+            }
+        } else {      // Search by PID
+            aPID = atol(buf+16);
+            if (aPID == thePID) {
+                pclose(f);
+                return aPID;
+            }
+        }
+    }
+    pclose(f);
+    return 0;
+}
+
+
+static OSStatus QuitOneProcess(OSType signature) {
+    bool			done = false;
+    ProcessSerialNumber         thisPSN;
+    ProcessInfoRec		thisPIR;
+    OSStatus                    err = noErr;
+    Str63			thisProcessName;
+    AEAddressDesc		thisPSNDesc;
+    AppleEvent			thisQuitEvent, thisReplyEvent;
+    
+
+    thisPIR.processInfoLength = sizeof (ProcessInfoRec);
+    thisPIR.processName = thisProcessName;
+    thisPIR.processAppSpec = nil;
+    
+    thisPSN.highLongOfPSN = 0;
+    thisPSN.lowLongOfPSN = kNoProcess;
+    
+    while (done == false) {		
+        err = GetNextProcess(&thisPSN);
+        if (err == procNotFound)	
+            done = true;		// apparently the demo app isn't running.  Odd but not impossible
+        else {		
+            err = GetProcessInformation(&thisPSN,&thisPIR);
+            if (err != noErr)
+                goto bail;
+                    
+            if (thisPIR.processSignature == signature) {	// is it or target process?
+                err = AECreateDesc(typeProcessSerialNumber, (Ptr)&thisPSN,
+                                            sizeof(thisPSN), &thisPSNDesc);
+                if (err != noErr)
+                        goto bail;
+
+                // Create the 'quit' Apple event for this process.
+                err = AECreateAppleEvent(kCoreEventClass, kAEQuitApplication, &thisPSNDesc,
+                                                kAutoGenerateReturnID, kAnyTransactionID, &thisQuitEvent);
+                if (err != noErr) {
+                    AEDisposeDesc (&thisPSNDesc);
+                    goto bail;		// don't know how this could happen, but limp gamely onward
+                }
+
+                // send the event 
+                err = AESend(&thisQuitEvent, &thisReplyEvent, kAEWaitReply,
+                                           kAENormalPriority, kAEDefaultTimeout, 0L, 0L);
+                AEDisposeDesc (&thisQuitEvent);
+                AEDisposeDesc (&thisPSNDesc);
+#if 0
+                if (err == errAETimeout) {
+                    pid_t thisPID;
+                        
+                    err = GetProcessPID(&thisPSN , &thisPID);
+                    if (err == noErr)
+                        err = kill(thisPID, SIGKILL);
+                }
+#endif
+                done = true;		// we've killed the process, presumably
+            }
+        }
+    }
+
+bail:
+    return err;
+}
+
+
+// Uses usleep to sleep for full duration even if a signal is received
+static void SleepTicks(UInt32 ticksToSleep) {
+    UInt32 endSleep, timeNow, ticksRemaining;
+
+    timeNow = TickCount();
+    ticksRemaining = ticksToSleep;
+    endSleep = timeNow + ticksToSleep;
+    while ( (timeNow < endSleep) && (ticksRemaining <= ticksToSleep) ) {
+        usleep(16667 * ticksRemaining);
+        timeNow = TickCount();
+        ticksRemaining = endSleep - timeNow;
+    } 
+}
+
+
+static Boolean ShowMessage(Boolean allowCancel, Boolean continueButton, const char *format, ...) {
+    va_list                 args;
+    char                    s[1024];
+    short                   itemHit;
+    AlertStdAlertParamRec   alertParams;
+    
+    ProcessSerialNumber	ourProcess;
+
+    va_start(args, format);
+    s[0] = vsprintf(s+1, format, args);
+    va_end(args);
+
+    alertParams.movable = true;
+    alertParams.helpButton = false;
+    alertParams.filterProc = NULL;
+    alertParams.defaultText = continueButton? "\pContinue..." : (StringPtr)-1;
+    alertParams.cancelText = allowCancel ? (StringPtr)-1 : NULL;
+    alertParams.otherText = NULL;
+    alertParams.defaultButton = kAlertStdAlertOKButton;
+    alertParams.cancelButton = allowCancel ? kAlertStdAlertCancelButton : 0;
+    alertParams.position = kWindowDefaultPosition;
+
+    ::GetCurrentProcess (&ourProcess);
+    ::SetFrontProcess(&ourProcess);
+
+    StandardAlert (kAlertNoteAlert, (StringPtr)s, NULL, &alertParams, &itemHit);
+    
+    return (itemHit == kAlertStdAlertOKButton);
+}
+
+
+#if SEARCHFORALLBOINCMANAGERS
+static OSStatus GetpathToBOINCManagerApp(char* path, int maxLen, FSRef *theFSRef)
+{
+    CFStringRef             bundleID = CFSTR("edu.berkeley.boinc");
+    OSType                  creator = 'BNC!';
+    OSStatus                status = noErr;
+
+        status = LSFindApplicationForInfo(creator, bundleID, NULL, theFSRef, NULL);
+        if (status) {
+#if TESTING
+            ShowMessage(false, false, "LSFindApplicationForInfo returned error %d", status);
+#endif 
+            return status;
+        }
+    
+        status = FSRefMakePath(theFSRef, (unsigned char *)path, maxLen);
+#if TESTING
+        if (status)
+            ShowMessage(false, false, "GetpathToBOINCManagerApp FSRefMakePath returned error %d, %s", status, path);
+#endif
+    
+    return status;
+}
+#endif  // SEARCHFORALLBOINCMANAGERS
diff --git a/py/Boinc/add_util.py b/py/Boinc/add_util.py
index 53b586e..5e2d9e6 100644
--- a/py/Boinc/add_util.py
+++ b/py/Boinc/add_util.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# $Id: add_util.py 12027 2007-02-02 20:14:18Z boincadm $
+# $Id$
 
 # add_util.py - code shared between add and xadd
 
diff --git a/py/Boinc/boinc_db.py b/py/Boinc/boinc_db.py
deleted file mode 100644
index 5bc36ea..0000000
--- a/py/Boinc/boinc_db.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Generated by db_def_to_py
-LARGE_BLOB_SIZE = 65536
-TEAM_TYPE_CLUB = 1
-TEAM_TYPE_COMPANY = 2
-TEAM_TYPE_PRIMARY = 3
-TEAM_TYPE_SECONDARY = 4
-TEAM_TYPE_JUNIOR_COLLEGE = 5
-TEAM_TYPE_UNIVERSITY = 6
-TEAM_TYPE_GOVERNMENT = 7
-FILE_DELETE_INIT = 0
-FILE_DELETE_READY = 1
-FILE_DELETE_DONE = 2
-ASSIMILATE_INIT = 0
-ASSIMILATE_READY = 1
-ASSIMILATE_DONE = 2
-WU_ERROR_COULDNT_SEND_RESULT = 1
-WU_ERROR_TOO_MANY_ERROR_RESULTS = 2
-WU_ERROR_TOO_MANY_SUCCESS_RESULTS = 4
-WU_ERROR_TOO_MANY_TOTAL_RESULTS = 8
-WU_ERROR_CANCELLED = 16
-RESULT_SERVER_STATE_INACTIVE = 1
-RESULT_SERVER_STATE_UNSENT = 2
-RESULT_SERVER_STATE_UNSENT_SEQ = 3
-RESULT_SERVER_STATE_IN_PROGRESS = 4
-RESULT_SERVER_STATE_OVER = 5
-RESULT_OUTCOME_INIT = 0
-RESULT_OUTCOME_SUCCESS = 1
-RESULT_OUTCOME_COULDNT_SEND = 2
-RESULT_OUTCOME_CLIENT_ERROR = 3
-RESULT_OUTCOME_NO_REPLY = 4
-RESULT_OUTCOME_DIDNT_NEED = 5
-RESULT_OUTCOME_VALIDATE_ERROR = 6
-VALIDATE_STATE_INIT = 0
-VALIDATE_STATE_VALID = 1
-VALIDATE_STATE_INVALID = 2
-VALIDATE_STATE_NO_CHECK = 3
-RESULT_NEW = 0
-RESULT_FILES_DOWNLOADING = 1
-RESULT_FILES_DOWNLOADED = 2
-RESULT_COMPUTE_ERROR = 3
-RESULT_FILES_UPLOADING = 4
-RESULT_FILES_UPLOADED = 5
diff --git a/py/Boinc/boinc_project_path.py b/py/Boinc/boinc_project_path.py
index 357e138..7aef8ee 100644
--- a/py/Boinc/boinc_project_path.py
+++ b/py/Boinc/boinc_project_path.py
@@ -1,4 +1,4 @@
-# $Id: boinc_project_path.py 18424 2009-06-15 23:24:15Z davea $
+# $Id$
 
 # boinc_project_path.py - defines the directories where config.xml and
 # run_state.xml are kept.
diff --git a/py/Boinc/boincxml.py b/py/Boinc/boincxml.py
index 1d5c74a..b5282eb 100644
--- a/py/Boinc/boincxml.py
+++ b/py/Boinc/boincxml.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# $Id: boincxml.py 18840 2009-08-13 18:22:40Z davea $
+# $Id$
 
 # boincxml.py - xml utilities for boinc
 
diff --git a/py/Boinc/configxml.py b/py/Boinc/configxml.py
deleted file mode 100644
index 71b0720..0000000
--- a/py/Boinc/configxml.py
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/usr/bin/env python
-
-# $Id: configxml.py 2867 2004-01-13 06:51:19Z quarl $
-
-# configxml.py - module to read and parse config.xml, run_state.xml
-
-'''
-SYNOPSIS:  parses and writes config.xml and run_state.xml
-
-USAGE:     from Boinc import configxml
-           config = configxml.ConfigFile().read()
-           run_state = configxml.RunStateFile().read()
-           print config.config.db_name
-           print config.tasks[4].cmd
-           run_state.enabled = True
-           new_task = newConfigDict()
-           new_task.cmd = "echo hi | mail quarl"
-           config.tasks.append(new_task)
-           config.write()
-           run_state.write()
-
-'''
-
-import sys
-import boinc_project_path
-from boincxml import *
-
-default_config_file = None
-
-class ConfigFile(XMLConfig):
-    '''
-    embodies config.xml
-    Public attributes:
-        config   - ConfigDict
-        tasks    - list of ConfigDict elements
-        daemons  -
-    '''
-    default_filename = boinc_project_path.config_xml_filename
-    def __init__(self, *args, **kwargs):
-        XMLConfig.__init__(self, *args, **kwargs)
-        global default_config_file
-        default_config_file = self
-    def _get_elements(self):
-        self.xml_boinc   = get_element(self.xml,  'boinc', optional=False)
-        self.xml_config  = get_element(self.xml_boinc, 'config', optional=False)
-        self.xml_tasks   = get_element(self.xml_boinc, 'tasks')
-        self.xml_daemons = get_element(self.xml_boinc, 'daemons')
-        self.config      = ConfigDict(self.xml_config)
-        self.daemons     = ConfigDictList(self.xml_daemons)
-        self.tasks       = ConfigDictList(self.xml_tasks)
-    def _set_elements(self):
-        self.config.save()
-        self.daemons.save()
-        self.tasks.save()
-    def debug_print_all(self):
-        '''print everything to stdout.'''
-
-        print 'Debug dump of', self.filename
-        print '-- parsed xml -------------------------------------------------------'
-        self.xml.writexml(sys.stdout)
-        print
-        print '-- Config -----------------------------------------------------------'
-        self.config.debug_print()
-        print
-        print '-- Daemons ------------------------------------------------------------'
-        for daemon in self.daemons:
-            daemon.debug_print()
-            print
-        print
-        print '-- Tasks ------------------------------------------------------------'
-        for task in self.tasks:
-            task.debug_print()
-            print
-    default_xml = '<boinc><config></config></boinc>'
-
-# keeps BoincCron's timestamp status file
-class RunStateFile(XMLConfig):
-    '''
-    embodies run_state.xml
-    Public attributes:
-       tasks - list of ConfigDict elements
-       enabled - boolean
-    '''
-    default_filename = boinc_project_path.run_state_xml_filename
-    def _get_elements(self):
-        self.xml_boinc    = get_element(self.xml,  'boinc', optional=False)
-        self.xml_tasks    = get_element(self.xml_boinc, 'tasks')
-        self.xml_enabled  = get_element(self.xml_boinc, 'enabled')
-        self.tasks        = ConfigDictList(self.xml_tasks)
-        self.enabled      = get_element_int(self.xml_enabled)
-    def _set_elements(self):
-        set_element( self.xml_enabled, self.enabled )
-        self.tasks.save()
-    default_xml = '<boinc></boinc>'
-
-def default_config():
-    '''If any config file has been read, return it.  Else open the default one
-    and return it.'''
-    if not default_config_file: ConfigFile().read()
-    assert(default_config_file)
-    return default_config_file
-
-if __name__ == '__main__':
-    config = ConfigFile().read()
-    # print "setting config.enabled = True"
-    # config.enabled = True
-    config.debug_print_all()
-    print " -- saving xml and rewriting -----------------------------------------------"
-    config.write(sys.stdout)
diff --git a/py/Boinc/database.py b/py/Boinc/database.py
index 92293c8..52efb17 100644
--- a/py/Boinc/database.py
+++ b/py/Boinc/database.py
@@ -1,4 +1,4 @@
-## $Id: database.py 22667 2010-11-10 00:10:32Z davea $
+## $Id$
 
 '''
 Defines database backend library and database table and object relationships.
@@ -32,7 +32,7 @@ import configxml
 from util import *
 from db_base import *
 
-ID = '$Id: database.py 22667 2010-11-10 00:10:32Z davea $'
+ID = '$Id$'
 
 class Platform(DatabaseObject):
     _table = DatabaseTable(
diff --git a/py/Boinc/db_base.py b/py/Boinc/db_base.py
index df53a4b..01c8bbd 100644
--- a/py/Boinc/db_base.py
+++ b/py/Boinc/db_base.py
@@ -1,4 +1,4 @@
-## $Id: db_base.py 22616 2010-11-03 18:25:24Z davea $
+## $Id$
 
 # quarl 2003-10-16 initial version based on conglomeration of
 #                  coursesurvey/database.py and boinc/database.py
@@ -15,7 +15,7 @@ from __future__ import generators
 import MySQLdb, MySQLdb.cursors
 import sys, os, weakref
 
-ID = '$Id: db_base.py 22616 2010-11-03 18:25:24Z davea $'
+ID = '$Id$'
 
 dbconnection = None
 
diff --git a/py/Boinc/db_mid.py b/py/Boinc/db_mid.py
index e4bbe8a..5b288e5 100644
--- a/py/Boinc/db_mid.py
+++ b/py/Boinc/db_mid.py
@@ -1,4 +1,4 @@
-## $Id: db_mid.py 12027 2007-02-02 20:14:18Z boincadm $
+## $Id$
 
 ## database middle-end.  This file is not required for normal database use.
 ## it is useful for debugging scripts; e.g.
diff --git a/py/Boinc/projectxml.py b/py/Boinc/projectxml.py
index 52684a8..9d148e0 100644
--- a/py/Boinc/projectxml.py
+++ b/py/Boinc/projectxml.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# $Id: projectxml.py 15679 2008-07-25 22:13:41Z davea $
+# $Id$
 # projectxml.py - module to read and parse project.xml
 
 '''
diff --git a/py/Boinc/sched_messages.py b/py/Boinc/sched_messages.py
deleted file mode 100644
index 0931660..0000000
--- a/py/Boinc/sched_messages.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import sys, time 
-
-CRITICAL=0
-NORMAL=1
-DEBUG=2
-
-class SchedMessages:
-    def __init__(self):
-        self.debug_level = 0
-
-    def set_debug_level(self, level):
-        self.debug_level = int(level)
-
-    def printf(self, kind, format, *args):
-        if kind <= self.debug_level:
-            if kind==CRITICAL:
-                kind = "CRITICAL"
-            elif kind==NORMAL:
-                kind = "normal  "
-            elif kind==DEBUG:
-                kind = "debug   "
-            else:
-                kind = "*** internal error: invalid MessageKind ***";
-            sys.stderr.write("%s [%s] " % (time.strftime("%Y/%m/%d %H:%M:%S", time.localtime()), kind))
-            sys.stderr.write(format % args)
diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py
index a38e77a..a5c9b2a 100644
--- a/py/Boinc/setup_project.py
+++ b/py/Boinc/setup_project.py
@@ -1,4 +1,4 @@
-## $Id: setup_project.py 25322 2012-02-24 03:26:30Z davea $
+## $Id$
 
 # module for setting up a new project (either a real project or a test project
 # see tools/makeproject, test/testbase.py).
diff --git a/py/Boinc/tools.py b/py/Boinc/tools.py
index 3bc5485..fa06c1d 100644
--- a/py/Boinc/tools.py
+++ b/py/Boinc/tools.py
@@ -1,4 +1,4 @@
-## $Id: tools.py 23525 2011-05-12 04:11:40Z davea $
+## $Id$
 
 import configxml
 try:
diff --git a/py/Boinc/util.py b/py/Boinc/util.py
deleted file mode 100644
index 765f8c2..0000000
--- a/py/Boinc/util.py
+++ /dev/null
@@ -1,11 +0,0 @@
-## $Id: util.py 2245 2003-09-04 03:19:59Z quarl $
-
-def list2dict(list):
-    dict = {}
-    for k in list: dict[k] = None
-    return dict
-
-def sorted_keys(dict):
-    k = dict.keys()
-    k.sort()
-    return k
diff --git a/py/Makefile.am b/py/Makefile.am
index 5cc88d9..5d69b4e 100644
--- a/py/Makefile.am
+++ b/py/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 18375 2009-06-11 16:01:36Z davea $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/py/boinc_path_config.py.in b/py/boinc_path_config.py.in
index d89dbb7..fc5fa96 100644
--- a/py/boinc_path_config.py.in
+++ b/py/boinc_path_config.py.in
@@ -1,4 +1,4 @@
-# $Id: boinc_path_config.py.in 18375 2009-06-11 16:01:36Z davea $
+# $Id$
 
 # This module prepends boinc/py/ to the python system path
 
diff --git a/py/db_def_to_py b/py/db_def_to_py
index 138a194..ab7f6bf 100755
--- a/py/db_def_to_py
+++ b/py/db_def_to_py
@@ -1,6 +1,6 @@
 #!/usr/bin/env perl
 
-## $Id: db_def_to_py 18375 2009-06-11 16:01:36Z davea $
+## $Id$
 
 ## parse the db #defines to php.
 
diff --git a/rboinc/client/boinc_lib.pl b/rboinc/client/boinc_lib.pl
index 4f4686c..9af6bb8 100644
--- a/rboinc/client/boinc_lib.pl
+++ b/rboinc/client/boinc_lib.pl
@@ -22,7 +22,7 @@ License along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
 =cut
 
 
-# $Id: boinc_lib.pl 23083 2011-02-22 21:28:13Z tonig $
+# $Id$
 
 use XML::Simple;
 use LWP::UserAgent;
diff --git a/rboinc/client/boinc_retrieve.pl b/rboinc/client/boinc_retrieve.pl
index c97b744..a0f53b8 100755
--- a/rboinc/client/boinc_retrieve.pl
+++ b/rboinc/client/boinc_retrieve.pl
@@ -22,7 +22,7 @@ License along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
 =cut
 
 
-# $Id: boinc_retrieve.pl 23083 2011-02-22 21:28:13Z tonig $
+# $Id$
 
 use strict;
 
diff --git a/rboinc/client/boinc_submit.pl b/rboinc/client/boinc_submit.pl
index 0b3906e..9fc903c 100755
--- a/rboinc/client/boinc_submit.pl
+++ b/rboinc/client/boinc_submit.pl
@@ -22,7 +22,7 @@ License along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
 =cut
 
 
-# $Id: boinc_submit.pl 23083 2011-02-22 21:28:13Z tonig $
+# $Id$
 
 use strict;
 
diff --git a/rboinc/monitoring/duplicate_late.sh b/rboinc/monitoring/duplicate_late.sh
index 0a15f31..c3e9f0c 100644
--- a/rboinc/monitoring/duplicate_late.sh
+++ b/rboinc/monitoring/duplicate_late.sh
@@ -1,6 +1,6 @@
 #/bin/bash
 
-# $Id: duplicate_late.sh 24510 2011-11-03 02:35:04Z romw $
+# $Id$
 
 # Duplicates workunits which are late (sent time < 3 days ago),
 # state=INPROGRESS.  Does not duplicate WUs which have been already
diff --git a/rboinc/monitoring/generate_error_table.sh b/rboinc/monitoring/generate_error_table.sh
index f0d5fbf..6542151 100644
--- a/rboinc/monitoring/generate_error_table.sh
+++ b/rboinc/monitoring/generate_error_table.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# $Id: generate_error_table.sh 24510 2011-11-03 02:35:04Z romw $
+# $Id$
 # Regenerate the error table hash. To be run upon BOINC update
 
 table=monitoring_errors_table.pm
diff --git a/rboinc/monitoring/monitoring_compute.sql b/rboinc/monitoring/monitoring_compute.sql
index 1836c9d..1e87326 100644
--- a/rboinc/monitoring/monitoring_compute.sql
+++ b/rboinc/monitoring/monitoring_compute.sql
@@ -1,4 +1,4 @@
--- $Id: monitoring_compute.sql 23083 2011-02-22 21:28:13Z tonig $
+-- $Id$
 
 -- Should be run from crontab. It will add a row in the "monitoring"
 -- table with the results, for later retrieval from the "dailyreport"
diff --git a/rboinc/monitoring/monitoring_cron.sh b/rboinc/monitoring/monitoring_cron.sh
index b379a31..11bae5f 100644
--- a/rboinc/monitoring/monitoring_cron.sh
+++ b/rboinc/monitoring/monitoring_cron.sh
@@ -7,7 +7,7 @@
 
 # 0 0 * * * bash /home/ps3grid/remote/monitoring/monitoring_cron.sh
 
-# $Id: monitoring_cron.sh 24510 2011-11-03 02:35:04Z romw $
+# $Id$
 
 mon_dir=  PATH TO MONITOR DIR
 mysql="/usr/bin/mysql  -pPASSWORD DB_NAME"
diff --git a/rboinc/monitoring/monitoring_errors.pl b/rboinc/monitoring/monitoring_errors.pl
index d52c96f..fe43d8e 100644
--- a/rboinc/monitoring/monitoring_errors.pl
+++ b/rboinc/monitoring/monitoring_errors.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl 
 
-# $Id: monitoring_errors.pl 24510 2011-11-03 02:35:04Z romw $
+# $Id$
 
 # Script to generate the per-error per-user pivot  report
 
diff --git a/rboinc/monitoring/monitoring_functions.sql b/rboinc/monitoring/monitoring_functions.sql
index 336e816..7b4f1a8 100644
--- a/rboinc/monitoring/monitoring_functions.sql
+++ b/rboinc/monitoring/monitoring_functions.sql
@@ -1,4 +1,4 @@
--- $Id: monitoring_functions.sql 23083 2011-02-22 21:28:13Z tonig $
+-- $Id$
 -- Boinc Monitoring stored procedures
 -- Only re-run this file upon changes
 
diff --git a/rboinc/monitoring/monitoring_schema.sql b/rboinc/monitoring/monitoring_schema.sql
index 26d6e6d..21146f0 100644
--- a/rboinc/monitoring/monitoring_schema.sql
+++ b/rboinc/monitoring/monitoring_schema.sql
@@ -1,4 +1,4 @@
--- $Id: monitoring_schema.sql 23083 2011-02-22 21:28:13Z tonig $
+-- $Id$
 
 -- Boinc Monitoring schema and stored procedures
 -- Re-running this file clears monitoring statistics
diff --git a/rboinc/monitoring/monitoring_status.sql b/rboinc/monitoring/monitoring_status.sql
index 1392b27..1bf5bce 100644
--- a/rboinc/monitoring/monitoring_status.sql
+++ b/rboinc/monitoring/monitoring_status.sql
@@ -1,4 +1,4 @@
--- $Id: monitoring_status.sql 23083 2011-02-22 21:28:13Z tonig $
+-- $Id$
 
 -- mon_status stored procedure. 
 
diff --git a/rboinc/server/boinc_authentication.pl b/rboinc/server/boinc_authentication.pl
index 84f4fc8..2f07a43 100644
--- a/rboinc/server/boinc_authentication.pl
+++ b/rboinc/server/boinc_authentication.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-# $Id: boinc_authentication.pl 23083 2011-02-22 21:28:13Z tonig $
+# $Id$
 
 
 =head1 NAME
diff --git a/rboinc/server/boinc_configuration.pl b/rboinc/server/boinc_configuration.pl
index 3f83231..98648f1 100644
--- a/rboinc/server/boinc_configuration.pl
+++ b/rboinc/server/boinc_configuration.pl
@@ -1,7 +1,7 @@
 # Site-specific configuration constants (used by the server side
 # component). 
 #
-# $Id: boinc_configuration.pl 23083 2011-02-22 21:28:13Z tonig $
+# $Id$
 
 
 
diff --git a/rboinc/server/boinc_configuration_template.pl b/rboinc/server/boinc_configuration_template.pl
index 38c0b72..bdee813 100644
--- a/rboinc/server/boinc_configuration_template.pl
+++ b/rboinc/server/boinc_configuration_template.pl
@@ -1,7 +1,7 @@
 # Site-specific configuration constants (used by the server side
 # component). 
 #
-# $Id: boinc_configuration_template.pl 23083 2011-02-22 21:28:13Z tonig $
+# $Id$
 
 
 # This file is part of RemoteBOINC.
diff --git a/rboinc/server/boinc_retrieve_server.pl b/rboinc/server/boinc_retrieve_server.pl
index 1afd85e..e3232ab 100755
--- a/rboinc/server/boinc_retrieve_server.pl
+++ b/rboinc/server/boinc_retrieve_server.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-# $Id: boinc_retrieve_server.pl 23083 2011-02-22 21:28:13Z tonig $
+# $Id$
 
 # The remote-boinc server-side perl script. Should run as a CGI in an
 # Apache2 instance.
diff --git a/rboinc/server/boinc_submit_server.pl b/rboinc/server/boinc_submit_server.pl
index f9a1f38..5a504fe 100755
--- a/rboinc/server/boinc_submit_server.pl
+++ b/rboinc/server/boinc_submit_server.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-# $Id: boinc_submit_server.pl 23083 2011-02-22 21:28:13Z tonig $
+# $Id$
 
 # The remote-boinc server-side perl script. Should run as a CGI in an
 # Apache2 instance.
diff --git a/rboinc/server/test/test_authentication.pl b/rboinc/server/test/test_authentication.pl
index 85a6b5d..a0fed82 100644
--- a/rboinc/server/test/test_authentication.pl
+++ b/rboinc/server/test/test_authentication.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-# $Id: test_authentication.pl 24510 2011-11-03 02:35:04Z romw $
+# $Id$
 
 # An authentication test script
 
diff --git a/samples/atiopencl/atiopencl.cpp b/samples/atiopencl/atiopencl.cpp
index ff32108..426f6c5 100644
--- a/samples/atiopencl/atiopencl.cpp
+++ b/samples/atiopencl/atiopencl.cpp
@@ -452,6 +452,7 @@ char * convert_to_string(const char *fileName) {
         s[i++]=c;
     }
     s[i]='\0';
+    fclose(infile);
     return s;
 }
 
diff --git a/samples/example_app/bin/22489/i686-apple-darwin/Helvetica.txf b/samples/example_app/bin/22489/i686-apple-darwin/Helvetica.txf
new file mode 100644
index 0000000..4ac9638
Binary files /dev/null and b/samples/example_app/bin/22489/i686-apple-darwin/Helvetica.txf differ
diff --git a/samples/example_app/bin/22489/i686-apple-darwin/example_app_22489_i686-apple-darwin b/samples/example_app/bin/22489/i686-apple-darwin/example_app_22489_i686-apple-darwin
new file mode 100755
index 0000000..c0a28e2
Binary files /dev/null and b/samples/example_app/bin/22489/i686-apple-darwin/example_app_22489_i686-apple-darwin differ
diff --git a/samples/example_app/bin/22489/i686-apple-darwin/example_app_graphics_22489_i686-apple-darwin b/samples/example_app/bin/22489/i686-apple-darwin/example_app_graphics_22489_i686-apple-darwin
new file mode 100755
index 0000000..ccb093e
Binary files /dev/null and b/samples/example_app/bin/22489/i686-apple-darwin/example_app_graphics_22489_i686-apple-darwin differ
diff --git a/samples/example_app/bin/22489/i686-apple-darwin/logo.jpg b/samples/example_app/bin/22489/i686-apple-darwin/logo.jpg
new file mode 100644
index 0000000..f681f39
Binary files /dev/null and b/samples/example_app/bin/22489/i686-apple-darwin/logo.jpg differ
diff --git a/samples/example_app/bin/22489/i686-apple-darwin/version.xml b/samples/example_app/bin/22489/i686-apple-darwin/version.xml
new file mode 100644
index 0000000..aa6bebb
--- /dev/null
+++ b/samples/example_app/bin/22489/i686-apple-darwin/version.xml
@@ -0,0 +1,16 @@
+<version>
+   <file>
+      <physical_name>example_app_22489_i686-apple-darwin</physical_name>
+      <main_program/>
+    </file>
+    <file>
+       <physical_name>example_app_graphics_22489_i686-apple-darwin</physical_name>
+      <logical_name>graphics_app</logical_name>
+    </file>
+    <file>
+        <physical_name>Helvetica.txf</physical_name>
+    </file>
+    <file>
+        <physical_name>logo.jpg</physical_name>
+    </file>
+</version>
diff --git a/samples/example_app/bin/22489/i686-pc-linux-gnu/Helvetica.txf b/samples/example_app/bin/22489/i686-pc-linux-gnu/Helvetica.txf
new file mode 100644
index 0000000..4ac9638
Binary files /dev/null and b/samples/example_app/bin/22489/i686-pc-linux-gnu/Helvetica.txf differ
diff --git a/samples/example_app/bin/22489/i686-pc-linux-gnu/example_app_22489_i686-pc-linux-gnu b/samples/example_app/bin/22489/i686-pc-linux-gnu/example_app_22489_i686-pc-linux-gnu
new file mode 100755
index 0000000..bef0809
Binary files /dev/null and b/samples/example_app/bin/22489/i686-pc-linux-gnu/example_app_22489_i686-pc-linux-gnu differ
diff --git a/samples/example_app/bin/22489/i686-pc-linux-gnu/example_app_graphics_22489_i686-pc-linux-gnu b/samples/example_app/bin/22489/i686-pc-linux-gnu/example_app_graphics_22489_i686-pc-linux-gnu
new file mode 100755
index 0000000..aa97182
Binary files /dev/null and b/samples/example_app/bin/22489/i686-pc-linux-gnu/example_app_graphics_22489_i686-pc-linux-gnu differ
diff --git a/samples/example_app/bin/22489/i686-pc-linux-gnu/logo.jpg b/samples/example_app/bin/22489/i686-pc-linux-gnu/logo.jpg
new file mode 100644
index 0000000..f681f39
Binary files /dev/null and b/samples/example_app/bin/22489/i686-pc-linux-gnu/logo.jpg differ
diff --git a/samples/example_app/bin/22489/i686-pc-linux-gnu/version.xml b/samples/example_app/bin/22489/i686-pc-linux-gnu/version.xml
new file mode 100644
index 0000000..4ac9ada
--- /dev/null
+++ b/samples/example_app/bin/22489/i686-pc-linux-gnu/version.xml
@@ -0,0 +1,16 @@
+<version>
+   <file>
+      <physical_name>example_app_22489_i686-pc-linux-gnu</physical_name>
+      <main_program/>
+    </file>
+    <file>
+       <physical_name>example_app_graphics_22489_i686-pc-linux-gnu</physical_name>
+      <logical_name>graphics_app</logical_name>
+    </file>
+    <file>
+        <physical_name>Helvetica.txf</physical_name>
+    </file>
+    <file>
+        <physical_name>logo.jpg</physical_name>
+    </file>
+</version>
diff --git a/samples/example_app/bin/22489/windows_intelx86/Helvetica.txf b/samples/example_app/bin/22489/windows_intelx86/Helvetica.txf
new file mode 100644
index 0000000..4ac9638
Binary files /dev/null and b/samples/example_app/bin/22489/windows_intelx86/Helvetica.txf differ
diff --git a/samples/example_app/bin/22489/windows_intelx86/example_app_22489_windows_intelx86.exe b/samples/example_app/bin/22489/windows_intelx86/example_app_22489_windows_intelx86.exe
new file mode 100755
index 0000000..ec2622e
Binary files /dev/null and b/samples/example_app/bin/22489/windows_intelx86/example_app_22489_windows_intelx86.exe differ
diff --git a/samples/example_app/bin/22489/windows_intelx86/example_app_graphics_22489_windows_intelx86.exe b/samples/example_app/bin/22489/windows_intelx86/example_app_graphics_22489_windows_intelx86.exe
new file mode 100755
index 0000000..eb52d5d
Binary files /dev/null and b/samples/example_app/bin/22489/windows_intelx86/example_app_graphics_22489_windows_intelx86.exe differ
diff --git a/samples/example_app/bin/22489/windows_intelx86/logo.jpg b/samples/example_app/bin/22489/windows_intelx86/logo.jpg
new file mode 100644
index 0000000..f681f39
Binary files /dev/null and b/samples/example_app/bin/22489/windows_intelx86/logo.jpg differ
diff --git a/samples/example_app/bin/22489/windows_intelx86/version.xml b/samples/example_app/bin/22489/windows_intelx86/version.xml
new file mode 100644
index 0000000..991f7c2
--- /dev/null
+++ b/samples/example_app/bin/22489/windows_intelx86/version.xml
@@ -0,0 +1,16 @@
+<version>
+   <file>
+      <physical_name>example_app_22489_windows_intelx86.exe</physical_name>
+      <main_program/>
+    </file>
+    <file>
+       <physical_name>example_app_graphics_22489_windows_intelx86.exe</physical_name>
+      <logical_name>graphics_app</logical_name>
+    </file>
+    <file>
+        <physical_name>Helvetica.txf</physical_name>
+    </file>
+    <file>
+        <physical_name>logo.jpg</physical_name>
+    </file>
+</version>
diff --git a/samples/example_app/bin/22489/windows_x86_64/Helvetica.txf b/samples/example_app/bin/22489/windows_x86_64/Helvetica.txf
new file mode 100644
index 0000000..4ac9638
Binary files /dev/null and b/samples/example_app/bin/22489/windows_x86_64/Helvetica.txf differ
diff --git a/samples/example_app/bin/22489/windows_x86_64/example_app_22489_windows_x86_64.exe b/samples/example_app/bin/22489/windows_x86_64/example_app_22489_windows_x86_64.exe
new file mode 100755
index 0000000..f178740
Binary files /dev/null and b/samples/example_app/bin/22489/windows_x86_64/example_app_22489_windows_x86_64.exe differ
diff --git a/samples/example_app/bin/22489/windows_x86_64/example_app_graphics_22489_windows_x86_64.exe b/samples/example_app/bin/22489/windows_x86_64/example_app_graphics_22489_windows_x86_64.exe
new file mode 100755
index 0000000..995ec70
Binary files /dev/null and b/samples/example_app/bin/22489/windows_x86_64/example_app_graphics_22489_windows_x86_64.exe differ
diff --git a/samples/example_app/bin/22489/windows_x86_64/logo.jpg b/samples/example_app/bin/22489/windows_x86_64/logo.jpg
new file mode 100644
index 0000000..f681f39
Binary files /dev/null and b/samples/example_app/bin/22489/windows_x86_64/logo.jpg differ
diff --git a/samples/example_app/bin/22489/windows_x86_64/version.xml b/samples/example_app/bin/22489/windows_x86_64/version.xml
new file mode 100644
index 0000000..11a7cf0
--- /dev/null
+++ b/samples/example_app/bin/22489/windows_x86_64/version.xml
@@ -0,0 +1,16 @@
+<version>
+   <file>
+      <physical_name>example_app_22489_windows_x86_64.exe</physical_name>
+      <main_program/>
+    </file>
+    <file>
+       <physical_name>example_app_graphics_22489_windows_x86_64.exe</physical_name>
+      <logical_name>graphics_app</logical_name>
+    </file>
+    <file>
+        <physical_name>Helvetica.txf</physical_name>
+    </file>
+    <file>
+        <physical_name>logo.jpg</physical_name>
+    </file>
+</version>
diff --git a/samples/example_app/bin/22489/x86_64-apple-darwin/Helvetica.txf b/samples/example_app/bin/22489/x86_64-apple-darwin/Helvetica.txf
new file mode 100644
index 0000000..4ac9638
Binary files /dev/null and b/samples/example_app/bin/22489/x86_64-apple-darwin/Helvetica.txf differ
diff --git a/samples/example_app/bin/22489/x86_64-apple-darwin/example_app_22489_x86_64-apple-darwin b/samples/example_app/bin/22489/x86_64-apple-darwin/example_app_22489_x86_64-apple-darwin
new file mode 100755
index 0000000..605e3da
Binary files /dev/null and b/samples/example_app/bin/22489/x86_64-apple-darwin/example_app_22489_x86_64-apple-darwin differ
diff --git a/samples/example_app/bin/22489/x86_64-apple-darwin/example_app_graphics_22489_x86_64-apple-darwin b/samples/example_app/bin/22489/x86_64-apple-darwin/example_app_graphics_22489_x86_64-apple-darwin
new file mode 100755
index 0000000..691b105
Binary files /dev/null and b/samples/example_app/bin/22489/x86_64-apple-darwin/example_app_graphics_22489_x86_64-apple-darwin differ
diff --git a/samples/example_app/bin/22489/x86_64-apple-darwin/logo.jpg b/samples/example_app/bin/22489/x86_64-apple-darwin/logo.jpg
new file mode 100644
index 0000000..f681f39
Binary files /dev/null and b/samples/example_app/bin/22489/x86_64-apple-darwin/logo.jpg differ
diff --git a/samples/example_app/bin/22489/x86_64-apple-darwin/version.xml b/samples/example_app/bin/22489/x86_64-apple-darwin/version.xml
new file mode 100644
index 0000000..11849af
--- /dev/null
+++ b/samples/example_app/bin/22489/x86_64-apple-darwin/version.xml
@@ -0,0 +1,16 @@
+<version>
+   <file>
+      <physical_name>example_app_22489_x86_64-apple-darwin</physical_name>
+      <main_program/>
+    </file>
+    <file>
+       <physical_name>example_app_graphics_22489_x86_64-apple-darwin</physical_name>
+      <logical_name>graphics_app</logical_name>
+    </file>
+    <file>
+        <physical_name>Helvetica.txf</physical_name>
+    </file>
+    <file>
+        <physical_name>logo.jpg</physical_name>
+    </file>
+</version>
diff --git a/samples/example_app/bin/22489/x86_64-pc-linux-gnu/Helvetica.txf b/samples/example_app/bin/22489/x86_64-pc-linux-gnu/Helvetica.txf
new file mode 100644
index 0000000..4ac9638
Binary files /dev/null and b/samples/example_app/bin/22489/x86_64-pc-linux-gnu/Helvetica.txf differ
diff --git a/samples/example_app/bin/22489/x86_64-pc-linux-gnu/example_app_22489_x86_64-pc-linux-gnu b/samples/example_app/bin/22489/x86_64-pc-linux-gnu/example_app_22489_x86_64-pc-linux-gnu
new file mode 100755
index 0000000..55aede4
Binary files /dev/null and b/samples/example_app/bin/22489/x86_64-pc-linux-gnu/example_app_22489_x86_64-pc-linux-gnu differ
diff --git a/samples/example_app/bin/22489/x86_64-pc-linux-gnu/example_app_graphics_22489_x86_64-pc-linux-gnu b/samples/example_app/bin/22489/x86_64-pc-linux-gnu/example_app_graphics_22489_x86_64-pc-linux-gnu
new file mode 100755
index 0000000..c0988a8
Binary files /dev/null and b/samples/example_app/bin/22489/x86_64-pc-linux-gnu/example_app_graphics_22489_x86_64-pc-linux-gnu differ
diff --git a/samples/example_app/bin/22489/x86_64-pc-linux-gnu/logo.jpg b/samples/example_app/bin/22489/x86_64-pc-linux-gnu/logo.jpg
new file mode 100644
index 0000000..f681f39
Binary files /dev/null and b/samples/example_app/bin/22489/x86_64-pc-linux-gnu/logo.jpg differ
diff --git a/samples/example_app/bin/22489/x86_64-pc-linux-gnu/version.xml b/samples/example_app/bin/22489/x86_64-pc-linux-gnu/version.xml
new file mode 100644
index 0000000..357ee0b
--- /dev/null
+++ b/samples/example_app/bin/22489/x86_64-pc-linux-gnu/version.xml
@@ -0,0 +1,16 @@
+<version>
+   <file>
+      <physical_name>example_app_22489_x86_64-pc-linux-gnu</physical_name>
+      <main_program/>
+    </file>
+    <file>
+       <physical_name>example_app_graphics_22489_x86_64-pc-linux-gnu</physical_name>
+      <logical_name>graphics_app</logical_name>
+    </file>
+    <file>
+        <physical_name>Helvetica.txf</physical_name>
+    </file>
+    <file>
+        <physical_name>logo.jpg</physical_name>
+    </file>
+</version>
diff --git a/samples/example_app/bin/24253/windows_intelx86/example_app_24253_windows_intelx86.exe b/samples/example_app/bin/24253/windows_intelx86/example_app_24253_windows_intelx86.exe
new file mode 100644
index 0000000..ea4e6b0
Binary files /dev/null and b/samples/example_app/bin/24253/windows_intelx86/example_app_24253_windows_intelx86.exe differ
diff --git a/samples/glut/Roman.stroke b/samples/glut/Roman.stroke
new file mode 100644
index 0000000..b67b55f
--- /dev/null
+++ b/samples/glut/Roman.stroke
@@ -0,0 +1,604 @@
+##
+# $XConsortium: Roman.src,v 5.2 91/07/21 16:42:23 rws Exp $
+## 
+## Copyright (c) 1989,1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
+## 
+##                         All Rights Reserved
+## 
+## Permission to use, copy, modify, and distribute this software and its 
+## documentation for any purpose and without fee is hereby granted, 
+## provided that the above copyright notice appear in all copies and that
+## both that copyright notice and this permission notice appear in 
+## supporting documentation, and that the names of Sun Microsystems,
+## the X Consortium, and MIT not be used in advertising or publicity 
+## pertaining to distribution of the software without specific, written 
+## prior permission.  
+## 
+## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
+## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+## PERFORMANCE OF THIS SOFTWARE.
+
+# Roman Simplex font.
+
+	FONTNAME Roman
+	TOP 119.0476
+	BOTTOM -33.3333
+	NUM_CH 128
+	PROPERTIES 3
+
+	(CHARSET_REGISTRY ISO8859)
+	(CHARSET_ENCODING "1")
+	(SPACING P)
+
+INDEX 32 STROKE  0 CENTER 52.3810 RIGHT 104.7619
+INDEX 33 STROKE  2 CENTER 4.7619 RIGHT 9.5238
+    OPEN     2 (4.7619 100.0000) (4.7619 33.3333)
+    OPEN     5 (4.7619 9.5238) (0.0000 4.7619) (4.7619 0.0000)
+               (9.5238 4.7619) (4.7619 9.5238)
+INDEX 34 STROKE  2 CENTER 19.0476 RIGHT 38.0952
+    OPEN     2 (0.0000 100.0000) (0.0000 66.6667)
+    OPEN     2 (38.0952 100.0000) (38.0952 66.6667)
+INDEX 35 STROKE  4 CENTER 33.3333 RIGHT 71.4286
+    OPEN     2 (38.0952 119.0476) (4.7619 -33.3333)
+    OPEN     2 (66.6667 119.0476) (33.3333 -33.3333)
+    OPEN     2 (4.7619 57.1429) (71.4286 57.1429)
+    OPEN     2 (0.0000 28.5714) (66.6667 28.5714)
+INDEX 36 STROKE  3 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (23.8095 119.0476) (23.8095 -19.0476)
+    OPEN     2 (42.8571 119.0476) (42.8571 -19.0476)
+    OPEN    20 (66.6667 85.7143) (57.1429 95.2381) (42.8571 100.0000)
+               (23.8095 100.0000) (9.5238 95.2381) (0.0000 85.7143) (0.0000 76.1905)
+               (4.7619 66.6667) (9.5238 61.9048) (19.0476 57.1429) (47.6190 47.6190)
+               (57.1429 42.8571) (61.9048 38.0952) (66.6667 28.5714) (66.6667 14.2857)
+               (57.1429 4.7619) (42.8571 0.0000) (23.8095 0.0000) (9.5238 4.7619)
+               (0.0000 14.2857)
+INDEX 37 STROKE  3 CENTER 42.8571 RIGHT 85.7143
+    OPEN     2 (85.7143 100.0000) (0.0000 0.0000)
+    OPEN    16 (23.8095 100.0000) (33.3333 90.4762) (33.3333 80.9524)
+               (28.5714 71.4286) (19.0476 66.6667) (9.5238 66.6667) (0.0000 76.1905)
+               (0.0000 85.7143) (4.7619 95.2381) (14.2857 100.0000) (23.8095 100.0000)
+               (33.3333 95.2381) (47.6190 90.4762) (61.9048 90.4762) (76.1905 95.2381)
+               (85.7143 100.0000)
+    OPEN    11 (66.6667 33.3333) (57.1429 28.5714) (52.3810 19.0476)
+               (52.3810 9.5238) (61.9048 0.0000) (71.4286 0.0000) (80.9524 4.7619)
+               (85.7143 14.2857) (85.7143 23.8095) (76.1905 33.3333) (66.6667 33.3333)
+INDEX 38 STROKE  1 CENTER 47.6190 RIGHT 95.2381
+    OPEN    34 (95.2381 57.1429) (95.2381 61.9048) (90.4762 66.6667)
+               (85.7143 66.6667) (80.9524 61.9048) (76.1905 52.3810) (66.6667 28.5714)
+               (57.1429 14.2857) (47.6190 4.7619) (38.0952 0.0000) (19.0476 0.0000)
+               (9.5238 4.7619) (4.7619 9.5238) (0.0000 19.0476) (0.0000 28.5714)
+               (4.7619 38.0952) (9.5238 42.8571) (42.8571 61.9048) (47.6190 66.6667)
+               (52.3810 76.1905) (52.3810 85.7143) (47.6190 95.2381) (38.0952 100.0000)
+               (28.5714 95.2381) (23.8095 85.7143) (23.8095 76.1905) (28.5714 61.9048)
+               (38.0952 47.6190) (61.9048 14.2857) (71.4286 4.7619) (80.9524 0.0000)
+               (90.4762 0.0000) (95.2381 4.7619) (95.2381 9.5238)
+INDEX 39 STROKE  1 CENTER 0.0000 RIGHT 0.0000
+    OPEN     2 (0.0000 100.0000) (0.0000 66.6667)
+INDEX 40 STROKE  1 CENTER 14.2857 RIGHT 33.3333
+    OPEN    10 (33.3333 119.0476) (23.8095 109.5238) (14.2857 95.2381)
+               (4.7619 76.1905) (0.0000 52.3810) (0.0000 33.3333) (4.7619 9.5238)
+               (14.2857 -9.5238) (23.8095 -23.8095) (33.3333 -33.3333)
+INDEX 41 STROKE  1 CENTER 19.0476 RIGHT 33.3333
+    OPEN    10 (0.0000 119.0476) (9.5238 109.5238) (19.0476 95.2381)
+               (28.5714 76.1905) (33.3333 52.3810) (33.3333 33.3333) (28.5714 9.5238)
+               (19.0476 -9.5238) (9.5238 -23.8095) (0.0000 -33.3333)
+INDEX 42 STROKE  3 CENTER 23.8095 RIGHT 47.6190
+    OPEN     2 (23.8095 71.4286) (23.8095 14.2857)
+    OPEN     2 (0.0000 57.1429) (47.6190 28.5714)
+    OPEN     2 (47.6190 57.1429) (0.0000 28.5714)
+INDEX 43 STROKE  2 CENTER 42.8571 RIGHT 85.7143
+    OPEN     2 (42.8571 85.7143) (42.8571 0.0000)
+    OPEN     2 (0.0000 42.8571) (85.7143 42.8571)
+INDEX 44 STROKE  1 CENTER 4.7619 RIGHT 9.5238
+    OPEN     8 (9.5238 4.7619) (4.7619 0.0000) (0.0000 4.7619)
+               (4.7619 9.5238) (9.5238 4.7619) (9.5238 -4.7619) (4.7619 -14.2857)
+               (0.0000 -19.0476)
+INDEX 45 STROKE  1 CENTER 42.8571 RIGHT 85.7143
+    OPEN     2 (0.0000 42.8571) (85.7143 42.8571)
+INDEX 46 STROKE  1 CENTER 4.7619 RIGHT 9.5238
+    OPEN     5 (4.7619 9.5238) (0.0000 4.7619) (4.7619 0.0000)
+               (9.5238 4.7619) (4.7619 9.5238)
+INDEX 47 STROKE  1 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (0.0000 -14.2857) (66.6667 100.0000)
+INDEX 48 STROKE  1 CENTER 33.3333 RIGHT 66.6667
+    OPEN    17 (28.5714 100.0000) (14.2857 95.2381) (4.7619 80.9524)
+               (0.0000 57.1429) (0.0000 42.8571) (4.7619 19.0476) (14.2857 4.7619)
+               (28.5714 0.0000) (38.0952 0.0000) (52.3810 4.7619) (61.9048 19.0476)
+               (66.6667 42.8571) (66.6667 57.1429) (61.9048 80.9524) (52.3810 95.2381)
+               (38.0952 100.0000) (28.5714 100.0000)
+INDEX 49 STROKE  1 CENTER 19.0476 RIGHT 23.8095
+    OPEN     4 (0.0000 80.9524) (9.5238 85.7143) (23.8095 100.0000)
+               (23.8095 0.0000)
+INDEX 50 STROKE  1 CENTER 33.3333 RIGHT 66.6667
+    OPEN    14 (4.7619 76.1905) (4.7619 80.9524) (9.5238 90.4762)
+               (14.2857 95.2381) (23.8095 100.0000) (42.8571 100.0000) (52.3810 95.2381)
+               (57.1429 90.4762) (61.9048 80.9524) (61.9048 71.4286) (57.1429 61.9048)
+               (47.6190 47.6190) (0.0000 0.0000) (66.6667 0.0000)
+INDEX 51 STROKE  1 CENTER 33.3333 RIGHT 66.6667
+    OPEN    15 (9.5238 100.0000) (61.9048 100.0000) (33.3333 61.9048)
+               (47.6190 61.9048) (57.1429 57.1429) (61.9048 52.3810) (66.6667 38.0952)
+               (66.6667 28.5714) (61.9048 14.2857) (52.3810 4.7619) (38.0952 0.0000)
+               (23.8095 0.0000) (9.5238 4.7619) (4.7619 9.5238) (0.0000 19.0476)
+INDEX 52 STROKE  2 CENTER 33.3333 RIGHT 71.4286
+    OPEN     3 (47.6190 100.0000) (0.0000 33.3333) (71.4286 33.3333)
+    OPEN     2 (47.6190 100.0000) (47.6190 0.0000)
+INDEX 53 STROKE  1 CENTER 33.3333 RIGHT 66.6667
+    OPEN    17 (57.1429 100.0000) (9.5238 100.0000) (4.7619 57.1429)
+               (9.5238 61.9048) (23.8095 66.6667) (38.0952 66.6667) (52.3810 61.9048)
+               (61.9048 52.3810) (66.6667 38.0952) (66.6667 28.5714) (61.9048 14.2857)
+               (52.3810 4.7619) (38.0952 0.0000) (23.8095 0.0000) (9.5238 4.7619)
+               (4.7619 9.5238) (0.0000 19.0476)
+INDEX 54 STROKE  1 CENTER 28.5714 RIGHT 61.9048
+    OPEN    23 (57.1429 85.7143) (52.3810 95.2381) (38.0952 100.0000)
+               (28.5714 100.0000) (14.2857 95.2381) (4.7619 80.9524) (0.0000 57.1429)
+               (0.0000 33.3333) (4.7619 14.2857) (14.2857 4.7619) (28.5714 0.0000)
+               (33.3333 0.0000) (47.6190 4.7619) (57.1429 14.2857) (61.9048 28.5714)
+               (61.9048 33.3333) (57.1429 47.6190) (47.6190 57.1429) (33.3333 61.9048)
+               (28.5714 61.9048) (14.2857 57.1429) (4.7619 47.6190) (0.0000 33.3333)
+INDEX 55 STROKE  2 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (66.6667 100.0000) (19.0476 0.0000)
+    OPEN     2 (0.0000 100.0000) (66.6667 100.0000)
+INDEX 56 STROKE  1 CENTER 33.3333 RIGHT 66.6667
+    OPEN    29 (23.8095 100.0000) (9.5238 95.2381) (4.7619 85.7143)
+               (4.7619 76.1905) (9.5238 66.6667) (19.0476 61.9048) (38.0952 57.1429)
+               (52.3810 52.3810) (61.9048 42.8571) (66.6667 33.3333) (66.6667 19.0476)
+               (61.9048 9.5238) (57.1429 4.7619) (42.8571 0.0000) (23.8095 0.0000)
+               (9.5238 4.7619) (4.7619 9.5238) (0.0000 19.0476) (0.0000 33.3333)
+               (4.7619 42.8571) (14.2857 52.3810) (28.5714 57.1429) (47.6190 61.9048)
+               (57.1429 66.6667) (61.9048 76.1905) (61.9048 85.7143) (57.1429 95.2381)
+               (42.8571 100.0000) (23.8095 100.0000)
+INDEX 57 STROKE  1 CENTER 33.3333 RIGHT 61.9048
+    OPEN    23 (61.9048 66.6667) (57.1429 52.3810) (47.6190 42.8571)
+               (33.3333 38.0952) (28.5714 38.0952) (14.2857 42.8571) (4.7619 52.3810)
+               (0.0000 66.6667) (0.0000 71.4286) (4.7619 85.7143) (14.2857 95.2381)
+               (28.5714 100.0000) (33.3333 100.0000) (47.6190 95.2381) (57.1429 85.7143)
+               (61.9048 66.6667) (61.9048 42.8571) (57.1429 19.0476) (47.6190 4.7619)
+               (33.3333 0.0000) (23.8095 0.0000) (9.5238 4.7619) (4.7619 14.2857)
+INDEX 58 STROKE  2 CENTER 4.7619 RIGHT 9.5238
+    OPEN     5 (4.7619 66.6667) (0.0000 61.9048) (4.7619 57.1429)
+               (9.5238 61.9048) (4.7619 66.6667)
+    OPEN     5 (4.7619 9.5238) (0.0000 4.7619) (4.7619 0.0000)
+               (9.5238 4.7619) (4.7619 9.5238)
+INDEX 59 STROKE  2 CENTER 4.7619 RIGHT 9.5238
+    OPEN     5 (4.7619 66.6667) (0.0000 61.9048) (4.7619 57.1429)
+               (9.5238 61.9048) (4.7619 66.6667)
+    OPEN     8 (9.5238 4.7619) (4.7619 0.0000) (0.0000 4.7619)
+               (4.7619 9.5238) (9.5238 4.7619) (9.5238 -4.7619) (4.7619 -14.2857)
+               (0.0000 -19.0476)
+INDEX 60 STROKE  1 CENTER 38.0952 RIGHT 76.1905
+    OPEN     3 (76.1905 85.7143) (0.0000 42.8571) (76.1905 0.0000)
+INDEX 61 STROKE  2 CENTER 42.8571 RIGHT 85.7143
+    OPEN     2 (0.0000 57.1429) (85.7143 57.1429)
+    OPEN     2 (0.0000 28.5714) (85.7143 28.5714)
+INDEX 62 STROKE  1 CENTER 38.0952 RIGHT 76.1905
+    OPEN     3 (0.0000 85.7143) (76.1905 42.8571) (0.0000 0.0000)
+INDEX 63 STROKE  2 CENTER 28.5714 RIGHT 57.1429
+    OPEN    14 (0.0000 76.1905) (0.0000 80.9524) (4.7619 90.4762)
+               (9.5238 95.2381) (19.0476 100.0000) (38.0952 100.0000) (47.6190 95.2381)
+               (52.3810 90.4762) (57.1429 80.9524) (57.1429 71.4286) (52.3810 61.9048)
+               (47.6190 57.1429) (28.5714 47.6190) (28.5714 33.3333)
+    OPEN     5 (28.5714 9.5238) (23.8095 4.7619) (28.5714 0.0000)
+               (33.3333 4.7619) (28.5714 9.5238)
+INDEX 64 STROKE  2 CENTER 28.5714 RIGHT 61.9048
+    OPEN     8 (42.8571 52.3810) (33.3333 57.1429) (23.8095 57.1429)
+               (19.0476 47.6190) (19.0476 42.8571) (23.8095 33.3333) (33.3333 33.3333)
+               (42.8571 38.0952)
+    OPEN    19 (42.8571 57.1429) (42.8571 38.0952) (47.6190 33.3333)
+               (57.1429 33.3333) (61.9048 42.8571) (61.9048 47.6190) (57.1429 61.9048)
+               (47.6190 71.4286) (33.3333 76.1905) (28.5714 76.1905) (14.2857 71.4286)
+               (4.7619 61.9048) (0.0000 47.6190) (0.0000 42.8571) (4.7619 28.5714)
+               (14.2857 19.0476) (28.5714 14.2857) (33.3333 14.2857) (47.6190 19.0476)
+INDEX 65 STROKE  3 CENTER 38.0952 RIGHT 76.1905
+    OPEN     2 (38.0952 100.0000) (0.0000 0.0000)
+    OPEN     2 (38.0952 100.0000) (76.1905 0.0000)
+    OPEN     2 (14.2857 33.3333) (61.9048 33.3333)
+INDEX 66 STROKE  3 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN     9 (0.0000 100.0000) (42.8571 100.0000) (57.1429 95.2381)
+               (61.9048 90.4762) (66.6667 80.9524) (66.6667 71.4286) (61.9048 61.9048)
+               (57.1429 57.1429) (42.8571 52.3810)
+    OPEN    10 (0.0000 52.3810) (42.8571 52.3810) (57.1429 47.6190)
+               (61.9048 42.8571) (66.6667 33.3333) (66.6667 19.0476) (61.9048 9.5238)
+               (57.1429 4.7619) (42.8571 0.0000) (0.0000 0.0000)
+INDEX 67 STROKE  1 CENTER 33.3333 RIGHT 71.4286
+    OPEN    18 (71.4286 76.1905) (66.6667 85.7143) (57.1429 95.2381)
+               (47.6190 100.0000) (28.5714 100.0000) (19.0476 95.2381) (9.5238 85.7143)
+               (4.7619 76.1905) (0.0000 61.9048) (0.0000 38.0952) (4.7619 23.8095)
+               (9.5238 14.2857) (19.0476 4.7619) (28.5714 0.0000) (47.6190 0.0000)
+               (57.1429 4.7619) (66.6667 14.2857) (71.4286 23.8095)
+INDEX 68 STROKE  2 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN    12 (0.0000 100.0000) (33.3333 100.0000) (47.6190 95.2381)
+               (57.1429 85.7143) (61.9048 76.1905) (66.6667 61.9048) (66.6667 38.0952)
+               (61.9048 23.8095) (57.1429 14.2857) (47.6190 4.7619) (33.3333 0.0000)
+               (0.0000 0.0000)
+INDEX 69 STROKE  4 CENTER 28.5714 RIGHT 61.9048
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN     2 (0.0000 100.0000) (61.9048 100.0000)
+    OPEN     2 (0.0000 52.3810) (38.0952 52.3810)
+    OPEN     2 (0.0000 0.0000) (61.9048 0.0000)
+INDEX 70 STROKE  3 CENTER 28.5714 RIGHT 61.9048
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN     2 (0.0000 100.0000) (61.9048 100.0000)
+    OPEN     2 (0.0000 52.3810) (38.0952 52.3810)
+INDEX 71 STROKE  2 CENTER 33.3333 RIGHT 71.4286
+    OPEN    19 (71.4286 76.1905) (66.6667 85.7143) (57.1429 95.2381)
+               (47.6190 100.0000) (28.5714 100.0000) (19.0476 95.2381) (9.5238 85.7143)
+               (4.7619 76.1905) (0.0000 61.9048) (0.0000 38.0952) (4.7619 23.8095)
+               (9.5238 14.2857) (19.0476 4.7619) (28.5714 0.0000) (47.6190 0.0000)
+               (57.1429 4.7619) (66.6667 14.2857) (71.4286 23.8095) (71.4286 38.0952)
+    OPEN     2 (47.6190 38.0952) (71.4286 38.0952)
+INDEX 72 STROKE  3 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN     2 (66.6667 100.0000) (66.6667 0.0000)
+    OPEN     2 (0.0000 52.3810) (66.6667 52.3810)
+INDEX 73 STROKE  1 CENTER 0.0000 RIGHT 0.0000
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+INDEX 74 STROKE  1 CENTER 28.5714 RIGHT 47.6190
+    OPEN    10 (47.6190 100.0000) (47.6190 23.8095) (42.8571 9.5238)
+               (38.0952 4.7619) (28.5714 0.0000) (19.0476 0.0000) (9.5238 4.7619)
+               (4.7619 9.5238) (0.0000 23.8095) (0.0000 33.3333)
+INDEX 75 STROKE  3 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN     2 (66.6667 100.0000) (0.0000 33.3333)
+    OPEN     2 (23.8095 57.1429) (66.6667 0.0000)
+INDEX 76 STROKE  2 CENTER 28.5714 RIGHT 57.1429
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN     2 (0.0000 0.0000) (57.1429 0.0000)
+INDEX 77 STROKE  4 CENTER 38.0952 RIGHT 76.1905
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN     2 (0.0000 100.0000) (38.0952 0.0000)
+    OPEN     2 (76.1905 100.0000) (38.0952 0.0000)
+    OPEN     2 (76.1905 100.0000) (76.1905 0.0000)
+INDEX 78 STROKE  3 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN     2 (0.0000 100.0000) (66.6667 0.0000)
+    OPEN     2 (66.6667 100.0000) (66.6667 0.0000)
+INDEX 79 STROKE  1 CENTER 38.0952 RIGHT 76.1905
+    OPEN    21 (28.5714 100.0000) (19.0476 95.2381) (9.5238 85.7143)
+               (4.7619 76.1905) (0.0000 61.9048) (0.0000 38.0952) (4.7619 23.8095)
+               (9.5238 14.2857) (19.0476 4.7619) (28.5714 0.0000) (47.6190 0.0000)
+               (57.1429 4.7619) (66.6667 14.2857) (71.4286 23.8095) (76.1905 38.0952)
+               (76.1905 61.9048) (71.4286 76.1905) (66.6667 85.7143) (57.1429 95.2381)
+               (47.6190 100.0000) (28.5714 100.0000)
+INDEX 80 STROKE  2 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN    10 (0.0000 100.0000) (42.8571 100.0000) (57.1429 95.2381)
+               (61.9048 90.4762) (66.6667 80.9524) (66.6667 66.6667) (61.9048 57.1429)
+               (57.1429 52.3810) (42.8571 47.6190) (0.0000 47.6190)
+INDEX 81 STROKE  2 CENTER 38.0952 RIGHT 76.1905
+    OPEN    21 (28.5714 100.0000) (19.0476 95.2381) (9.5238 85.7143)
+               (4.7619 76.1905) (0.0000 61.9048) (0.0000 38.0952) (4.7619 23.8095)
+               (9.5238 14.2857) (19.0476 4.7619) (28.5714 0.0000) (47.6190 0.0000)
+               (57.1429 4.7619) (66.6667 14.2857) (71.4286 23.8095) (76.1905 38.0952)
+               (76.1905 61.9048) (71.4286 76.1905) (66.6667 85.7143) (57.1429 95.2381)
+               (47.6190 100.0000) (28.5714 100.0000)
+    OPEN     2 (42.8571 19.0476) (71.4286 -9.5238)
+INDEX 82 STROKE  3 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN    10 (0.0000 100.0000) (42.8571 100.0000) (57.1429 95.2381)
+               (61.9048 90.4762) (66.6667 80.9524) (66.6667 71.4286) (61.9048 61.9048)
+               (57.1429 57.1429) (42.8571 52.3810) (0.0000 52.3810)
+    OPEN     2 (33.3333 52.3810) (66.6667 0.0000)
+INDEX 83 STROKE  1 CENTER 33.3333 RIGHT 66.6667
+    OPEN    20 (66.6667 85.7143) (57.1429 95.2381) (42.8571 100.0000)
+               (23.8095 100.0000) (9.5238 95.2381) (0.0000 85.7143) (0.0000 76.1905)
+               (4.7619 66.6667) (9.5238 61.9048) (19.0476 57.1429) (47.6190 47.6190)
+               (57.1429 42.8571) (61.9048 38.0952) (66.6667 28.5714) (66.6667 14.2857)
+               (57.1429 4.7619) (42.8571 0.0000) (23.8095 0.0000) (9.5238 4.7619)
+               (0.0000 14.2857)
+INDEX 84 STROKE  2 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (33.3333 100.0000) (33.3333 0.0000)
+    OPEN     2 (0.0000 100.0000) (66.6667 100.0000)
+INDEX 85 STROKE  1 CENTER 33.3333 RIGHT 66.6667
+    OPEN    10 (0.0000 100.0000) (0.0000 28.5714) (4.7619 14.2857)
+               (14.2857 4.7619) (28.5714 0.0000) (38.0952 0.0000) (52.3810 4.7619)
+               (61.9048 14.2857) (66.6667 28.5714) (66.6667 100.0000)
+INDEX 86 STROKE  2 CENTER 38.0952 RIGHT 76.1905
+    OPEN     2 (0.0000 100.0000) (38.0952 0.0000)
+    OPEN     2 (76.1905 100.0000) (38.0952 0.0000)
+INDEX 87 STROKE  4 CENTER 47.6190 RIGHT 95.2381
+    OPEN     2 (0.0000 100.0000) (23.8095 0.0000)
+    OPEN     2 (47.6190 100.0000) (23.8095 0.0000)
+    OPEN     2 (47.6190 100.0000) (71.4286 0.0000)
+    OPEN     2 (95.2381 100.0000) (71.4286 0.0000)
+INDEX 88 STROKE  2 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (0.0000 100.0000) (66.6667 0.0000)
+    OPEN     2 (66.6667 100.0000) (0.0000 0.0000)
+INDEX 89 STROKE  2 CENTER 38.0952 RIGHT 76.1905
+    OPEN     3 (0.0000 100.0000) (38.0952 52.3810) (38.0952 0.0000)
+    OPEN     2 (76.1905 100.0000) (38.0952 52.3810)
+INDEX 90 STROKE  3 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (66.6667 100.0000) (0.0000 0.0000)
+    OPEN     2 (0.0000 100.0000) (66.6667 100.0000)
+    OPEN     2 (0.0000 0.0000) (66.6667 0.0000)
+INDEX 91 STROKE  4 CENTER 14.2857 RIGHT 33.3333
+    OPEN     2 (0.0000 119.0476) (0.0000 -33.3333)
+    OPEN     2 (4.7619 119.0476) (4.7619 -33.3333)
+    OPEN     2 (0.0000 119.0476) (33.3333 119.0476)
+    OPEN     2 (0.0000 -33.3333) (33.3333 -33.3333)
+INDEX 92 STROKE  1 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (0.0000 100.0000) (66.6667 -14.2857)
+INDEX 93 STROKE  4 CENTER 19.0476 RIGHT 33.3333
+    OPEN     2 (28.5714 119.0476) (28.5714 -33.3333)
+    OPEN     2 (33.3333 119.0476) (33.3333 -33.3333)
+    OPEN     2 (0.0000 119.0476) (33.3333 119.0476)
+    OPEN     2 (0.0000 -33.3333) (33.3333 -33.3333)
+INDEX 94 STROKE  2 CENTER 38.0952 RIGHT 76.1905
+    OPEN     2 (38.0952 109.5238) (0.0000 42.8571)
+    OPEN     2 (38.0952 109.5238) (76.1905 42.8571)
+INDEX 95 STROKE  1 CENTER 52.3810 RIGHT 104.7619
+    OPEN     5 (0.0000 -33.3333) (104.7619 -33.3333) (104.7619 -28.5714)
+               (0.0000 -28.5714) (0.0000 -33.3333)
+INDEX 96 STROKE  2 CENTER 14.2857 RIGHT 28.5714
+    OPEN     2 (4.7619 100.0000) (28.5714 71.4286)
+    OPEN     3 (4.7619 100.0000) (0.0000 95.2381) (28.5714 71.4286)
+INDEX 97 STROKE  2 CENTER 28.5714 RIGHT 57.1429
+    OPEN     2 (57.1429 66.6667) (57.1429 0.0000)
+    OPEN    14 (57.1429 52.3810) (47.6190 61.9048) (38.0952 66.6667)
+               (23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952)
+               (0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000)
+               (38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
+INDEX 98 STROKE  2 CENTER 28.5714 RIGHT 57.1429
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN    14 (0.0000 52.3810) (9.5238 61.9048) (19.0476 66.6667)
+               (33.3333 66.6667) (42.8571 61.9048) (52.3810 52.3810) (57.1429 38.0952)
+               (57.1429 28.5714) (52.3810 14.2857) (42.8571 4.7619) (33.3333 0.0000)
+               (19.0476 0.0000) (9.5238 4.7619) (0.0000 14.2857)
+INDEX 99 STROKE  1 CENTER 28.5714 RIGHT 57.1429
+    OPEN    14 (57.1429 52.3810) (47.6190 61.9048) (38.0952 66.6667)
+               (23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952)
+               (0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000)
+               (38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
+INDEX 100 STROKE  2 CENTER 28.5714 RIGHT 57.1429
+    OPEN     2 (57.1429 100.0000) (57.1429 0.0000)
+    OPEN    14 (57.1429 52.3810) (47.6190 61.9048) (38.0952 66.6667)
+               (23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952)
+               (0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000)
+               (38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
+INDEX 101 STROKE  1 CENTER 28.5714 RIGHT 57.1429
+    OPEN    17 (0.0000 38.0952) (57.1429 38.0952) (57.1429 47.6190)
+               (52.3810 57.1429) (47.6190 61.9048) (38.0952 66.6667) (23.8095 66.6667)
+               (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952) (0.0000 28.5714)
+               (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000) (38.0952 0.0000)
+               (47.6190 4.7619) (57.1429 14.2857)
+INDEX 102 STROKE  2 CENTER 14.2857 RIGHT 38.0952
+    OPEN     5 (38.0952 100.0000) (28.5714 100.0000) (19.0476 95.2381)
+               (14.2857 80.9524) (14.2857 0.0000)
+    OPEN     2 (0.0000 66.6667) (33.3333 66.6667)
+INDEX 103 STROKE  2 CENTER 28.5714 RIGHT 57.1429
+    OPEN     7 (57.1429 66.6667) (57.1429 -9.5238) (52.3810 -23.8095)
+               (47.6190 -28.5714) (38.0952 -33.3333) (23.8095 -33.3333) (14.2857 -28.5714)
+    OPEN    14 (57.1429 52.3810) (47.6190 61.9048) (38.0952 66.6667)
+               (23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952)
+               (0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000)
+               (38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
+INDEX 104 STROKE  2 CENTER 23.8095 RIGHT 52.3810
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN     7 (0.0000 47.6190) (14.2857 61.9048) (23.8095 66.6667)
+               (38.0952 66.6667) (47.6190 61.9048) (52.3810 47.6190) (52.3810 0.0000)
+INDEX 105 STROKE  2 CENTER 4.7619 RIGHT 9.5238
+    OPEN     5 (0.0000 100.0000) (4.7619 95.2381) (9.5238 100.0000)
+               (4.7619 104.7619) (0.0000 100.0000)
+    OPEN     2 (4.7619 66.6667) (4.7619 0.0000)
+INDEX 106 STROKE  2 CENTER 19.0476 RIGHT 28.5714
+    OPEN     5 (19.0476 100.0000) (23.8095 95.2381) (28.5714 100.0000)
+               (23.8095 104.7619) (19.0476 100.0000)
+    OPEN     5 (23.8095 66.6667) (23.8095 -14.2857) (19.0476 -28.5714)
+               (9.5238 -33.3333) (0.0000 -33.3333)
+INDEX 107 STROKE  3 CENTER 23.8095 RIGHT 52.3810
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+    OPEN     2 (47.6190 66.6667) (0.0000 19.0476)
+    OPEN     2 (19.0476 38.0952) (52.3810 0.0000)
+INDEX 108 STROKE  1 CENTER 0.0000 RIGHT 0.0000
+    OPEN     2 (0.0000 100.0000) (0.0000 0.0000)
+INDEX 109 STROKE  3 CENTER 52.3810 RIGHT 104.7619
+    OPEN     2 (0.0000 66.6667) (0.0000 0.0000)
+    OPEN     7 (0.0000 47.6190) (14.2857 61.9048) (23.8095 66.6667)
+               (38.0952 66.6667) (47.6190 61.9048) (52.3810 47.6190) (52.3810 0.0000)
+    OPEN     7 (52.3810 47.6190) (66.6667 61.9048) (76.1905 66.6667)
+               (90.4762 66.6667) (100.0000 61.9048) (104.7619 47.6190) (104.7619 0.0000)
+INDEX 110 STROKE  2 CENTER 23.8095 RIGHT 52.3810
+    OPEN     2 (0.0000 66.6667) (0.0000 0.0000)
+    OPEN     7 (0.0000 47.6190) (14.2857 61.9048) (23.8095 66.6667)
+               (38.0952 66.6667) (47.6190 61.9048) (52.3810 47.6190) (52.3810 0.0000)
+INDEX 111 STROKE  1 CENTER 28.5714 RIGHT 61.9048
+    OPEN    17 (23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810)
+               (0.0000 38.0952) (0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619)
+               (23.8095 0.0000) (38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
+               (61.9048 28.5714) (61.9048 38.0952) (57.1429 52.3810) (47.6190 61.9048)
+               (38.0952 66.6667) (23.8095 66.6667)
+INDEX 112 STROKE  2 CENTER 28.5714 RIGHT 57.1429
+    OPEN     2 (0.0000 66.6667) (0.0000 -33.3333)
+    OPEN    14 (0.0000 52.3810) (9.5238 61.9048) (19.0476 66.6667)
+               (33.3333 66.6667) (42.8571 61.9048) (52.3810 52.3810) (57.1429 38.0952)
+               (57.1429 28.5714) (52.3810 14.2857) (42.8571 4.7619) (33.3333 0.0000)
+               (19.0476 0.0000) (9.5238 4.7619) (0.0000 14.2857)
+INDEX 113 STROKE  2 CENTER 28.5714 RIGHT 57.1429
+    OPEN     2 (57.1429 66.6667) (57.1429 -33.3333)
+    OPEN    14 (57.1429 52.3810) (47.6190 61.9048) (38.0952 66.6667)
+               (23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952)
+               (0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000)
+               (38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
+INDEX 114 STROKE  2 CENTER 14.2857 RIGHT 38.0952
+    OPEN     2 (0.0000 66.6667) (0.0000 0.0000)
+    OPEN     5 (0.0000 38.0952) (4.7619 52.3810) (14.2857 61.9048)
+               (23.8095 66.6667) (38.0952 66.6667)
+INDEX 115 STROKE  1 CENTER 23.8095 RIGHT 52.3810
+    OPEN    17 (52.3810 52.3810) (47.6190 61.9048) (33.3333 66.6667)
+               (19.0476 66.6667) (4.7619 61.9048) (0.0000 52.3810) (4.7619 42.8571)
+               (14.2857 38.0952) (38.0952 33.3333) (47.6190 28.5714) (52.3810 19.0476)
+               (52.3810 14.2857) (47.6190 4.7619) (33.3333 0.0000) (19.0476 0.0000)
+               (4.7619 4.7619) (0.0000 14.2857)
+INDEX 116 STROKE  2 CENTER 14.2857 RIGHT 38.0952
+    OPEN     5 (14.2857 100.0000) (14.2857 19.0476) (19.0476 4.7619)
+               (28.5714 0.0000) (38.0952 0.0000)
+    OPEN     2 (0.0000 66.6667) (33.3333 66.6667)
+INDEX 117 STROKE  2 CENTER 23.8095 RIGHT 52.3810
+    OPEN     7 (0.0000 66.6667) (0.0000 19.0476) (4.7619 4.7619)
+               (14.2857 0.0000) (28.5714 0.0000) (38.0952 4.7619) (52.3810 19.0476)
+    OPEN     2 (52.3810 66.6667) (52.3810 0.0000)
+INDEX 118 STROKE  2 CENTER 28.5714 RIGHT 57.1429
+    OPEN     2 (0.0000 66.6667) (28.5714 0.0000)
+    OPEN     2 (57.1429 66.6667) (28.5714 0.0000)
+INDEX 119 STROKE  4 CENTER 38.0952 RIGHT 76.1905
+    OPEN     2 (0.0000 66.6667) (19.0476 0.0000)
+    OPEN     2 (38.0952 66.6667) (19.0476 0.0000)
+    OPEN     2 (38.0952 66.6667) (57.1429 0.0000)
+    OPEN     2 (76.1905 66.6667) (57.1429 0.0000)
+INDEX 120 STROKE  2 CENTER 23.8095 RIGHT 52.3810
+    OPEN     2 (0.0000 66.6667) (52.3810 0.0000)
+    OPEN     2 (52.3810 66.6667) (0.0000 0.0000)
+INDEX 121 STROKE  2 CENTER 33.3333 RIGHT 61.9048
+    OPEN     2 (4.7619 66.6667) (33.3333 0.0000)
+    OPEN     6 (61.9048 66.6667) (33.3333 0.0000) (23.8095 -19.0476)
+               (14.2857 -28.5714) (4.7619 -33.3333) (0.0000 -33.3333)
+INDEX 122 STROKE  3 CENTER 23.8095 RIGHT 52.3810
+    OPEN     2 (52.3810 66.6667) (0.0000 0.0000)
+    OPEN     2 (0.0000 66.6667) (52.3810 66.6667)
+    OPEN     2 (0.0000 0.0000) (52.3810 0.0000)
+INDEX 123 STROKE  3 CENTER 14.2857 RIGHT 23.8095
+    OPEN    10 (23.8095 119.0476) (14.2857 114.2857) (9.5238 109.5238)
+               (4.7619 100.0000) (4.7619 90.4762) (9.5238 80.9524) (14.2857 76.1905)
+               (19.0476 66.6667) (19.0476 57.1429) (9.5238 47.6190)
+    OPEN    17 (14.2857 114.2857) (9.5238 104.7619) (9.5238 95.2381)
+               (14.2857 85.7143) (19.0476 80.9524) (23.8095 71.4286) (23.8095 61.9048)
+               (19.0476 52.3810) (0.0000 42.8571) (19.0476 33.3333) (23.8095 23.8095)
+               (23.8095 14.2857) (19.0476 4.7619) (14.2857 0.0000) (9.5238 -9.5238)
+               (9.5238 -19.0476) (14.2857 -28.5714)
+    OPEN    10 (9.5238 38.0952) (19.0476 28.5714) (19.0476 19.0476)
+               (14.2857 9.5238) (9.5238 4.7619) (4.7619 -4.7619) (4.7619 -14.2857)
+               (9.5238 -23.8095) (14.2857 -28.5714) (23.8095 -33.3333)
+INDEX 124 STROKE  1 CENTER 0.0000 RIGHT 0.0000
+    OPEN     2 (0.0000 119.0476) (0.0000 -33.3333)
+INDEX 125 STROKE  3 CENTER 9.5238 RIGHT 23.8095
+    OPEN    10 (0.0000 119.0476) (9.5238 114.2857) (14.2857 109.5238)
+               (19.0476 100.0000) (19.0476 90.4762) (14.2857 80.9524) (9.5238 76.1905)
+               (4.7619 66.6667) (4.7619 57.1429) (14.2857 47.6190)
+    OPEN    17 (9.5238 114.2857) (14.2857 104.7619) (14.2857 95.2381)
+               (9.5238 85.7143) (4.7619 80.9524) (0.0000 71.4286) (0.0000 61.9048)
+               (4.7619 52.3810) (23.8095 42.8571) (4.7619 33.3333) (0.0000 23.8095)
+               (0.0000 14.2857) (4.7619 4.7619) (9.5238 0.0000) (14.2857 -9.5238)
+               (14.2857 -19.0476) (9.5238 -28.5714)
+    OPEN    10 (14.2857 38.0952) (4.7619 28.5714) (4.7619 19.0476)
+               (9.5238 9.5238) (14.2857 4.7619) (19.0476 -4.7619) (19.0476 -14.2857)
+               (14.2857 -23.8095) (9.5238 -28.5714) (0.0000 -33.3333)
+INDEX 126 STROKE  2 CENTER 42.8571 RIGHT 85.7143
+    OPEN    11 (0.0000 28.5714) (0.0000 38.0952) (4.7619 52.3810)
+               (14.2857 57.1429) (23.8095 57.1429) (33.3333 52.3810) (52.3810 38.0952)
+               (61.9048 33.3333) (71.4286 33.3333) (80.9524 38.0952) (85.7143 47.6190)
+    OPEN    11 (0.0000 38.0952) (4.7619 47.6190) (14.2857 52.3810)
+               (23.8095 52.3810) (33.3333 47.6190) (52.3810 33.3333) (61.9048 28.5714)
+               (71.4286 28.5714) (80.9524 33.3333) (85.7143 47.6190) (85.7143 57.1429)
+INDEX 127 STROKE  2 CENTER 33.3333 RIGHT 66.6667
+    OPEN     2 (52.3810 100.0000) (14.2857 -33.3333)
+    OPEN    17 (28.5714 66.6667) (14.2857 61.9048) (4.7619 52.3810)
+               (0.0000 38.0952) (0.0000 23.8095) (4.7619 14.2857) (14.2857 4.7619)
+               (28.5714 0.0000) (38.0952 0.0000) (52.3810 4.7619) (61.9048 14.2857)
+               (66.6667 28.5714) (66.6667 42.8571) (61.9048 52.3810) (52.3810 61.9048)
+               (38.0952 66.6667) (28.5714 66.6667)
+
+
+
+#/* NCGA GRAFNET:SANS-SERIF NORMAL*/
+
+BEARING 32	 L_SPACE 0.0	 WIDTH 20.0	 R_SPACE 0.0	
+BEARING 33	 L_SPACE 8.62	 WIDTH 13.64	 R_SPACE 8.48	
+BEARING 34	 L_SPACE 4.02	 WIDTH 32.86	 R_SPACE 9.32	
+BEARING 35	 L_SPACE 3.2	 WIDTH 68.94	 R_SPACE 4.86	
+BEARING 36	 L_SPACE 4.82	 WIDTH 67.44	 R_SPACE 4.72	
+BEARING 37	 L_SPACE 6.36	 WIDTH 112.38	 R_SPACE 4.5	
+BEARING 38	 L_SPACE 5.98	 WIDTH 82.02	 R_SPACE 0.54	
+BEARING 39	 L_SPACE 4.44	 WIDTH 13.36	 R_SPACE 9.18	
+BEARING 40	 L_SPACE 7.58	 WIDTH 24.72	 R_SPACE 6.26	
+BEARING 41	 L_SPACE 5.28	 WIDTH 24.34	 R_SPACE 8.92	
+BEARING 42	 L_SPACE 6.96	 WIDTH 42.06	 R_SPACE 4.86	
+BEARING 43	 L_SPACE 5.98	 WIDTH 96.36	 R_SPACE 5.56	
+BEARING 44	 L_SPACE 8.76	 WIDTH 14.2	 R_SPACE 7.78	
+BEARING 45	 L_SPACE 7.38	 WIDTH 38.84	 R_SPACE 7.66	
+BEARING 46	 L_SPACE 8.34	 WIDTH 13.78	 R_SPACE 8.62	
+BEARING 47	 L_SPACE 7.24	 WIDTH 38.44	 R_SPACE 8.2	
+BEARING 48	 L_SPACE 4.98	 WIDTH 66.58	 R_SPACE 5.42	
+BEARING 49	 L_SPACE 11.82	 WIDTH 34.26	 R_SPACE 30.9	
+BEARING 50	 L_SPACE 5.42	 WIDTH 66.0	 R_SPACE 5.56	
+BEARING 51	 L_SPACE 5.0	 WIDTH 66.62	 R_SPACE 5.38	
+BEARING 52	 L_SPACE 3.88	 WIDTH 68.24	 R_SPACE 4.86	
+BEARING 53	 L_SPACE 4.86	 WIDTH 65.96	 R_SPACE 6.16	
+BEARING 54	 L_SPACE 5.58	 WIDTH 65.08	 R_SPACE 6.32	
+BEARING 55	 L_SPACE 5.56	 WIDTH 66.42	 R_SPACE 5.0
+BEARING 56	 L_SPACE 5.6	 WIDTH 65.98	 R_SPACE 5.4	
+BEARING 57	 L_SPACE 6.6	 WIDTH 64.82	 R_SPACE 5.56	
+BEARING 58	 L_SPACE 9.32	 WIDTH 14.06	 R_SPACE 7.38	
+BEARING 59	 L_SPACE 8.2	 WIDTH 13.96	 R_SPACE 8.58	
+BEARING 60	 L_SPACE 3.06	 WIDTH 102.5	 R_SPACE 2.36	
+BEARING 61	 L_SPACE 5.7	 WIDTH 96.36	 R_SPACE 5.84	
+BEARING 62	 L_SPACE 2.78	 WIDTH 102.5	 R_SPACE 2.64	
+BEARING 63	 L_SPACE 8.42	 WIDTH 60.22	 R_SPACE 8.34	
+BEARING 64	 L_SPACE 6.36	 WIDTH 126.24	 R_SPACE 6.1	
+BEARING 65	 L_SPACE 2.5	 WIDTH 88.16	 R_SPACE 1.8	
+BEARING 66	 L_SPACE 11.42	 WIDTH 75.5	 R_SPACE 5.54	
+BEARING 67	 L_SPACE 6.66	 WIDTH 87.06	 R_SPACE 6.4	
+BEARING 68	 L_SPACE 11.96	 WIDTH 81.48	 R_SPACE 6.66	
+BEARING 69	 L_SPACE 11.42	 WIDTH 72.28	 R_SPACE 4.86	
+BEARING 70	 L_SPACE 11.42	 WIDTH 67.96	 R_SPACE 5.42	
+BEARING 71	 L_SPACE 7.06	 WIDTH 89.56	 R_SPACE 11.28	
+BEARING 72	 L_SPACE 11.42	 WIDTH 77.7	 R_SPACE 11.0	
+BEARING 73	 L_SPACE 10.86	 WIDTH 13.36	 R_SPACE 10.44	
+BEARING 74	 L_SPACE 2.5	 WIDTH 56.96	 R_SPACE 9.88	
+BEARING 75	 L_SPACE 11.28	 WIDTH 79.8	 R_SPACE 1.38	
+BEARING 76	 L_SPACE 11.68	 WIDTH 62.8	 R_SPACE 2.5	
+BEARING 77	 L_SPACE 10.86	 WIDTH 94.56	 R_SPACE 10.16	
+BEARING 78	 L_SPACE 11.14	 WIDTH 77.98	 R_SPACE 11.0	
+BEARING 79	 L_SPACE 6.24	 WIDTH 95.28	 R_SPACE 6.4	
+BEARING 80	 L_SPACE 12.1	 WIDTH 73.44	 R_SPACE 6.9	
+BEARING 81	 L_SPACE 5.3	 WIDTH 96.0	 R_SPACE 6.6	
+BEARING 82	 L_SPACE 11.68	 WIDTH 80.64	 R_SPACE 4.02	
+BEARING 83	 L_SPACE 8.0	 WIDTH 78.28	 R_SPACE 6.16	
+BEARING 84	 L_SPACE 2.36	 WIDTH 79.52	 R_SPACE 2.92	
+BEARING 85	 L_SPACE 11.54	 WIDTH 77.28	 R_SPACE 11.28	
+BEARING 86	 L_SPACE 2.36	 WIDTH 87.04	 R_SPACE 3.06	
+BEARING 87	 L_SPACE 2.22	 WIDTH 125.76	 R_SPACE 3.06	
+BEARING 88	 L_SPACE 2.5	 WIDTH 86.76	 R_SPACE 3.2	
+BEARING 89	 L_SPACE 1.52	 WIDTH 88.98	 R_SPACE 1.94	
+BEARING 90	 L_SPACE 2.5	 WIDTH 77.7	 R_SPACE 4.58	
+BEARING 91	 L_SPACE 7.78	 WIDTH 25.76	 R_SPACE 5.0	
+BEARING 92	 L_SPACE 5.84	 WIDTH 73.24	 R_SPACE 5.7	
+BEARING 93	 L_SPACE 4.44	 WIDTH 25.48	 R_SPACE 8.62	
+BEARING 94	 L_SPACE 5.98	 WIDTH 55.28	 R_SPACE 8.06	
+BEARING 95	 L_SPACE -1.1	 WIDTH 70.04	 R_SPACE 0.4	
+BEARING 96	 L_SPACE 28.26	 WIDTH 25.9	 R_SPACE 26.74	
+BEARING 97	 L_SPACE 6.68	 WIDTH 67.54	 R_SPACE 2.78	
+BEARING 98	 L_SPACE 8.76	 WIDTH 63.66	 R_SPACE 4.56	
+BEARING 99	 L_SPACE 5.52	 WIDTH 61.46	 R_SPACE 6.26	
+BEARING 100	 L_SPACE 4.64	 WIDTH 63.88	 R_SPACE 8.48	
+BEARING 101	 L_SPACE 5.72	 WIDTH 65.62	 R_SPACE 5.66	
+BEARING 102	 L_SPACE 0.68	 WIDTH 34.12	 R_SPACE -0.12	
+BEARING 103	 L_SPACE 5.36	 WIDTH 63.16	 R_SPACE 8.48	
+BEARING 104	 L_SPACE 9.6	 WIDTH 58.34	 R_SPACE 9.04	
+BEARING 105	 L_SPACE 10.02	 WIDTH 11.42	 R_SPACE 9.32	
+BEARING 106	 L_SPACE -1.66	 WIDTH 23.1	 R_SPACE 9.32	
+BEARING 107	 L_SPACE 9.6	 WIDTH 59.18	 R_SPACE 0.54	
+BEARING 108	 L_SPACE 10.02	 WIDTH 11.42	 R_SPACE 9.32	
+BEARING 109	 L_SPACE 9.6	 WIDTH 96.36	 R_SPACE 9.6	
+BEARING 110	 L_SPACE 9.18	 WIDTH 58.48	 R_SPACE 9.32	
+BEARING 111	 L_SPACE 4.98	 WIDTH 67.14	 R_SPACE 4.86	
+BEARING 112	 L_SPACE 9.46	 WIDTH 63.34	 R_SPACE 4.2	
+BEARING 113	 L_SPACE 4.84	 WIDTH 63.38	 R_SPACE 8.76	
+BEARING 114	 L_SPACE 9.46	 WIDTH 34.8	 R_SPACE 1.94	
+BEARING 115	 L_SPACE 4.7	 WIDTH 59.4	 R_SPACE 5.24	
+BEARING 116	 L_SPACE 0.54	 WIDTH 33.42	 R_SPACE 0.68	
+BEARING 117	 L_SPACE 9.46	 WIDTH 58.2	 R_SPACE 9.32	
+BEARING 118	 L_SPACE 1.8	 WIDTH 65.86	 R_SPACE 1.66	
+BEARING 119	 L_SPACE 2.5	 WIDTH 95.82	 R_SPACE 1.8	
+BEARING 120	 L_SPACE 1.66	 WIDTH 65.32	 R_SPACE 2.36	
+BEARING 121	 L_SPACE 1.8	 WIDTH 65.18	 R_SPACE 2.36	
+BEARING 122	 L_SPACE 4.44	 WIDTH 59.88	 R_SPACE 5.0	
+BEARING 123	 L_SPACE 7.38	 WIDTH 36.06	 R_SPACE 10.44	
+BEARING 124	 L_SPACE 11.54	 WIDTH 6.96	 R_SPACE 12.24	
+BEARING 125	 L_SPACE 9.18	 WIDTH 36.2	 R_SPACE 8.48	
+BEARING 126	 L_SPACE 2.92	 WIDTH 102.36	 R_SPACE 2.64	
+
diff --git a/samples/glut/glut.h b/samples/glut/glut.h
new file mode 100644
index 0000000..f0a7ba3
--- /dev/null
+++ b/samples/glut/glut.h
@@ -0,0 +1,595 @@
+#ifndef __glut_h__
+#define __glut_h__
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
+
+/* This program is freely distributable without licensing fees  and is
+   provided without guarantee or warrantee expressed or  implied. This
+   program is -not- in the public domain. */
+
+#if defined(_WIN32)
+
+/* GLUT 3.7 now tries to avoid including <windows.h>
+   to avoid name space pollution, but Win32's <GL/gl.h> 
+   needs APIENTRY and WINGDIAPI defined properly. */
+# if 0
+#  define  WIN32_LEAN_AND_MEAN
+#  include <windows.h>
+# else
+   /* XXX This is from Win32's <windef.h> */
+#  ifndef APIENTRY
+#   define GLUT_APIENTRY_DEFINED
+#   if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
+#    define APIENTRY    __stdcall
+#   else
+#    define APIENTRY
+#   endif
+#  endif
+   /* XXX This is from Win32's <winnt.h> */
+#  ifndef CALLBACK
+#   if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
+#    define CALLBACK __stdcall
+#   else
+#    define CALLBACK
+#   endif
+#  endif
+   /* XXX This is from Win32's <wingdi.h> and <winnt.h> */
+#  ifndef WINGDIAPI
+#   define GLUT_WINGDIAPI_DEFINED
+#   define WINGDIAPI __declspec(dllimport)
+#  endif
+   /* XXX This is from Win32's <ctype.h> */
+#  ifndef _WCHAR_T_DEFINED
+typedef unsigned short wchar_t;
+#   define _WCHAR_T_DEFINED
+#  endif
+# endif
+
+#pragma comment (lib, "winmm.lib")     /* link with Windows MultiMedia lib */
+#pragma comment (lib, "opengl32.lib")  /* link with Microsoft OpenGL lib */
+#pragma comment (lib, "glu32.lib")     /* link with OpenGL Utility lib */
+
+#pragma warning (disable:4244)	/* Disable bogus conversion warnings. */
+#pragma warning (disable:4305)  /* VC++ 5.0 version of above warning. */
+
+#endif
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+/* define APIENTRY and CALLBACK to null string if we aren't on Win32 */
+#if !defined(_WIN32)
+#define APIENTRY
+#define GLUT_APIENTRY_DEFINED
+#define CALLBACK
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ GLUT API revision history:
+ 
+ GLUT_API_VERSION is updated to reflect incompatible GLUT
+ API changes (interface changes, semantic changes, deletions,
+ or additions).
+ 
+ GLUT_API_VERSION=1  First public release of GLUT.  11/29/94
+
+ GLUT_API_VERSION=2  Added support for OpenGL/GLX multisampling,
+ extension.  Supports new input devices like tablet, dial and button
+ box, and Spaceball.  Easy to query OpenGL extensions.
+
+ GLUT_API_VERSION=3  glutMenuStatus added.
+
+ GLUT_API_VERSION=4  glutInitDisplayString, glutWarpPointer,
+ glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic
+ video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
+ glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
+ glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
+**/
+#ifndef GLUT_API_VERSION  /* allow this to be overriden */
+#define GLUT_API_VERSION		3
+#endif
+
+/**
+ GLUT implementation revision history:
+ 
+ GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT
+ API revisions and implementation revisions (ie, bug fixes).
+
+ GLUT_XLIB_IMPLEMENTATION=1  mjk's first public release of
+ GLUT Xlib-based implementation.  11/29/94
+
+ GLUT_XLIB_IMPLEMENTATION=2  mjk's second public release of
+ GLUT Xlib-based implementation providing GLUT version 2 
+ interfaces.
+
+ GLUT_XLIB_IMPLEMENTATION=3  mjk's GLUT 2.2 images. 4/17/95
+
+ GLUT_XLIB_IMPLEMENTATION=4  mjk's GLUT 2.3 images. 6/?/95
+
+ GLUT_XLIB_IMPLEMENTATION=5  mjk's GLUT 3.0 images. 10/?/95
+
+ GLUT_XLIB_IMPLEMENTATION=7  mjk's GLUT 3.1+ with glutWarpPoitner.  7/24/96
+
+ GLUT_XLIB_IMPLEMENTATION=8  mjk's GLUT 3.1+ with glutWarpPoitner
+ and video resize.  1/3/97
+
+ GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines.
+
+ GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release.
+
+ GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling.
+
+ GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 release with GameGLUT support.
+**/
+#ifndef GLUT_XLIB_IMPLEMENTATION  /* Allow this to be overriden. */
+#define GLUT_XLIB_IMPLEMENTATION	13
+#endif
+
+/* Display mode bit masks. */
+#define GLUT_RGB			0
+#define GLUT_RGBA			GLUT_RGB
+#define GLUT_INDEX			1
+#define GLUT_SINGLE			0
+#define GLUT_DOUBLE			2
+#define GLUT_ACCUM			4
+#define GLUT_ALPHA			8
+#define GLUT_DEPTH			16
+#define GLUT_STENCIL			32
+#if (GLUT_API_VERSION >= 2)
+#define GLUT_MULTISAMPLE		128
+#define GLUT_STEREO			256
+#endif
+#if (GLUT_API_VERSION >= 3)
+#define GLUT_LUMINANCE			512
+#endif
+
+/* Mouse buttons. */
+#define GLUT_LEFT_BUTTON		0
+#define GLUT_MIDDLE_BUTTON		1
+#define GLUT_RIGHT_BUTTON		2
+
+/* Mouse button  state. */
+#define GLUT_DOWN			0
+#define GLUT_UP				1
+
+#if (GLUT_API_VERSION >= 2)
+/* function keys */
+#define GLUT_KEY_F1			1
+#define GLUT_KEY_F2			2
+#define GLUT_KEY_F3			3
+#define GLUT_KEY_F4			4
+#define GLUT_KEY_F5			5
+#define GLUT_KEY_F6			6
+#define GLUT_KEY_F7			7
+#define GLUT_KEY_F8			8
+#define GLUT_KEY_F9			9
+#define GLUT_KEY_F10			10
+#define GLUT_KEY_F11			11
+#define GLUT_KEY_F12			12
+/* directional keys */
+#define GLUT_KEY_LEFT			100
+#define GLUT_KEY_UP			101
+#define GLUT_KEY_RIGHT			102
+#define GLUT_KEY_DOWN			103
+#define GLUT_KEY_PAGE_UP		104
+#define GLUT_KEY_PAGE_DOWN		105
+#define GLUT_KEY_HOME			106
+#define GLUT_KEY_END			107
+#define GLUT_KEY_INSERT			108
+#endif
+
+/* Entry/exit  state. */
+#define GLUT_LEFT			0
+#define GLUT_ENTERED			1
+
+/* Menu usage  state. */
+#define GLUT_MENU_NOT_IN_USE		0
+#define GLUT_MENU_IN_USE		1
+
+/* Visibility  state. */
+#define GLUT_NOT_VISIBLE		0
+#define GLUT_VISIBLE			1
+
+/* Window status  state. */
+#define GLUT_HIDDEN			0
+#define GLUT_FULLY_RETAINED		1
+#define GLUT_PARTIALLY_RETAINED		2
+#define GLUT_FULLY_COVERED		3
+
+/* Color index component selection values. */
+#define GLUT_RED			0
+#define GLUT_GREEN			1
+#define GLUT_BLUE			2
+
+/* Layers for use. */
+#define GLUT_NORMAL			0
+#define GLUT_OVERLAY			1
+
+#if defined(_WIN32)
+/* Stroke font constants (use these in GLUT program). */
+#define GLUT_STROKE_ROMAN		((void*)0)
+#define GLUT_STROKE_MONO_ROMAN		((void*)1)
+
+/* Bitmap font constants (use these in GLUT program). */
+#define GLUT_BITMAP_9_BY_15		((void*)2)
+#define GLUT_BITMAP_8_BY_13		((void*)3)
+#define GLUT_BITMAP_TIMES_ROMAN_10	((void*)4)
+#define GLUT_BITMAP_TIMES_ROMAN_24	((void*)5)
+#if (GLUT_API_VERSION >= 3)
+#define GLUT_BITMAP_HELVETICA_10	((void*)6)
+#define GLUT_BITMAP_HELVETICA_12	((void*)7)
+#define GLUT_BITMAP_HELVETICA_18	((void*)8)
+#endif
+#else
+/* Stroke font opaque addresses (use constants instead in source code). */
+extern void *glutStrokeRoman;
+extern void *glutStrokeMonoRoman;
+
+/* Stroke font constants (use these in GLUT program). */
+#define GLUT_STROKE_ROMAN		(&glutStrokeRoman)
+#define GLUT_STROKE_MONO_ROMAN		(&glutStrokeMonoRoman)
+
+/* Bitmap font opaque addresses (use constants instead in source code). */
+extern void *glutBitmap9By15;
+extern void *glutBitmap8By13;
+extern void *glutBitmapTimesRoman10;
+extern void *glutBitmapTimesRoman24;
+extern void *glutBitmapHelvetica10;
+extern void *glutBitmapHelvetica12;
+extern void *glutBitmapHelvetica18;
+
+/* Bitmap font constants (use these in GLUT program). */
+#define GLUT_BITMAP_9_BY_15		(&glutBitmap9By15)
+#define GLUT_BITMAP_8_BY_13		(&glutBitmap8By13)
+#define GLUT_BITMAP_TIMES_ROMAN_10	(&glutBitmapTimesRoman10)
+#define GLUT_BITMAP_TIMES_ROMAN_24	(&glutBitmapTimesRoman24)
+#if (GLUT_API_VERSION >= 3)
+#define GLUT_BITMAP_HELVETICA_10	(&glutBitmapHelvetica10)
+#define GLUT_BITMAP_HELVETICA_12	(&glutBitmapHelvetica12)
+#define GLUT_BITMAP_HELVETICA_18	(&glutBitmapHelvetica18)
+#endif
+#endif
+
+/* glutGet parameters. */
+#define GLUT_WINDOW_X			100
+#define GLUT_WINDOW_Y			101
+#define GLUT_WINDOW_WIDTH		102
+#define GLUT_WINDOW_HEIGHT		103
+#define GLUT_WINDOW_BUFFER_SIZE		104
+#define GLUT_WINDOW_STENCIL_SIZE	105
+#define GLUT_WINDOW_DEPTH_SIZE		106
+#define GLUT_WINDOW_RED_SIZE		107
+#define GLUT_WINDOW_GREEN_SIZE		108
+#define GLUT_WINDOW_BLUE_SIZE		109
+#define GLUT_WINDOW_ALPHA_SIZE		110
+#define GLUT_WINDOW_ACCUM_RED_SIZE	111
+#define GLUT_WINDOW_ACCUM_GREEN_SIZE	112
+#define GLUT_WINDOW_ACCUM_BLUE_SIZE	113
+#define GLUT_WINDOW_ACCUM_ALPHA_SIZE	114
+#define GLUT_WINDOW_DOUBLEBUFFER	115
+#define GLUT_WINDOW_RGBA		116
+#define GLUT_WINDOW_PARENT		117
+#define GLUT_WINDOW_NUM_CHILDREN	118
+#define GLUT_WINDOW_COLORMAP_SIZE	119
+#if (GLUT_API_VERSION >= 2)
+#define GLUT_WINDOW_NUM_SAMPLES		120
+#define GLUT_WINDOW_STEREO		121
+#endif
+#if (GLUT_API_VERSION >= 3)
+#define GLUT_WINDOW_CURSOR		122
+#endif
+#define GLUT_SCREEN_WIDTH		200
+#define GLUT_SCREEN_HEIGHT		201
+#define GLUT_SCREEN_WIDTH_MM		202
+#define GLUT_SCREEN_HEIGHT_MM		203
+#define GLUT_MENU_NUM_ITEMS		300
+#define GLUT_DISPLAY_MODE_POSSIBLE	400
+#define GLUT_INIT_WINDOW_X		500
+#define GLUT_INIT_WINDOW_Y		501
+#define GLUT_INIT_WINDOW_WIDTH		502
+#define GLUT_INIT_WINDOW_HEIGHT		503
+#define GLUT_INIT_DISPLAY_MODE		504
+#if (GLUT_API_VERSION >= 2)
+#define GLUT_ELAPSED_TIME		700
+#endif
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
+#define GLUT_WINDOW_FORMAT_ID		123
+#endif
+
+#if (GLUT_API_VERSION >= 2)
+/* glutDeviceGet parameters. */
+#define GLUT_HAS_KEYBOARD		600
+#define GLUT_HAS_MOUSE			601
+#define GLUT_HAS_SPACEBALL		602
+#define GLUT_HAS_DIAL_AND_BUTTON_BOX	603
+#define GLUT_HAS_TABLET			604
+#define GLUT_NUM_MOUSE_BUTTONS		605
+#define GLUT_NUM_SPACEBALL_BUTTONS	606
+#define GLUT_NUM_BUTTON_BOX_BUTTONS	607
+#define GLUT_NUM_DIALS			608
+#define GLUT_NUM_TABLET_BUTTONS		609
+#endif
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
+#define GLUT_DEVICE_IGNORE_KEY_REPEAT   610
+#define GLUT_DEVICE_KEY_REPEAT          611
+#define GLUT_HAS_JOYSTICK		612
+#define GLUT_OWNS_JOYSTICK		613
+#define GLUT_JOYSTICK_BUTTONS		614
+#define GLUT_JOYSTICK_AXES		615
+#define GLUT_JOYSTICK_POLL_RATE		616
+#endif
+
+#if (GLUT_API_VERSION >= 3)
+/* glutLayerGet parameters. */
+#define GLUT_OVERLAY_POSSIBLE           800
+#define GLUT_LAYER_IN_USE		801
+#define GLUT_HAS_OVERLAY		802
+#define GLUT_TRANSPARENT_INDEX		803
+#define GLUT_NORMAL_DAMAGED		804
+#define GLUT_OVERLAY_DAMAGED		805
+
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
+/* glutVideoResizeGet parameters. */
+#define GLUT_VIDEO_RESIZE_POSSIBLE	900
+#define GLUT_VIDEO_RESIZE_IN_USE	901
+#define GLUT_VIDEO_RESIZE_X_DELTA	902
+#define GLUT_VIDEO_RESIZE_Y_DELTA	903
+#define GLUT_VIDEO_RESIZE_WIDTH_DELTA	904
+#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA	905
+#define GLUT_VIDEO_RESIZE_X		906
+#define GLUT_VIDEO_RESIZE_Y		907
+#define GLUT_VIDEO_RESIZE_WIDTH		908
+#define GLUT_VIDEO_RESIZE_HEIGHT	909
+#endif
+
+/* glutUseLayer parameters. */
+#define GLUT_NORMAL			0
+#define GLUT_OVERLAY			1
+
+/* glutGetModifiers return mask. */
+#define GLUT_ACTIVE_SHIFT               1
+#define GLUT_ACTIVE_CTRL                2
+#define GLUT_ACTIVE_ALT                 4
+
+/* glutSetCursor parameters. */
+/* Basic arrows. */
+#define GLUT_CURSOR_RIGHT_ARROW		0
+#define GLUT_CURSOR_LEFT_ARROW		1
+/* Symbolic cursor shapes. */
+#define GLUT_CURSOR_INFO		2
+#define GLUT_CURSOR_DESTROY		3
+#define GLUT_CURSOR_HELP		4
+#define GLUT_CURSOR_CYCLE		5
+#define GLUT_CURSOR_SPRAY		6
+#define GLUT_CURSOR_WAIT		7
+#define GLUT_CURSOR_TEXT		8
+#define GLUT_CURSOR_CROSSHAIR		9
+/* Directional cursors. */
+#define GLUT_CURSOR_UP_DOWN		10
+#define GLUT_CURSOR_LEFT_RIGHT		11
+/* Sizing cursors. */
+#define GLUT_CURSOR_TOP_SIDE		12
+#define GLUT_CURSOR_BOTTOM_SIDE		13
+#define GLUT_CURSOR_LEFT_SIDE		14
+#define GLUT_CURSOR_RIGHT_SIDE		15
+#define GLUT_CURSOR_TOP_LEFT_CORNER	16
+#define GLUT_CURSOR_TOP_RIGHT_CORNER	17
+#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER	18
+#define GLUT_CURSOR_BOTTOM_LEFT_CORNER	19
+/* Inherit from parent window. */
+#define GLUT_CURSOR_INHERIT		100
+/* Blank cursor. */
+#define GLUT_CURSOR_NONE		101
+/* Fullscreen crosshair (if available). */
+#define GLUT_CURSOR_FULL_CROSSHAIR	102
+#endif
+
+/* GLUT initialization sub-API. */
+extern void APIENTRY glutInit(int *argcp, char **argv);
+extern void APIENTRY glutInitDisplayMode(unsigned int mode);
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
+extern void APIENTRY glutInitDisplayString(const char *string);
+#endif
+extern void APIENTRY glutInitWindowPosition(int x, int y);
+extern void APIENTRY glutInitWindowSize(int width, int height);
+extern void APIENTRY glutMainLoop(void);
+
+/* GLUT window sub-API. */
+extern int APIENTRY glutCreateWindow(const char *title);
+extern int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
+extern void APIENTRY glutDestroyWindow(int win);
+extern void APIENTRY glutPostRedisplay(void);
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
+extern void APIENTRY glutPostWindowRedisplay(int win);
+#endif
+extern void APIENTRY glutSwapBuffers(void);
+extern int APIENTRY glutGetWindow(void);
+extern void APIENTRY glutSetWindow(int win);
+extern void APIENTRY glutSetWindowTitle(const char *title);
+extern void APIENTRY glutSetIconTitle(const char *title);
+extern void APIENTRY glutPositionWindow(int x, int y);
+extern void APIENTRY glutReshapeWindow(int width, int height);
+extern void APIENTRY glutPopWindow(void);
+extern void APIENTRY glutPushWindow(void);
+extern void APIENTRY glutIconifyWindow(void);
+extern void APIENTRY glutShowWindow(void);
+extern void APIENTRY glutHideWindow(void);
+#if (GLUT_API_VERSION >= 3)
+extern void APIENTRY glutFullScreen(void);
+extern void APIENTRY glutSetCursor(int cursor);
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
+extern void APIENTRY glutWarpPointer(int x, int y);
+#endif
+
+/* GLUT overlay sub-API. */
+extern void APIENTRY glutEstablishOverlay(void);
+extern void APIENTRY glutRemoveOverlay(void);
+extern void APIENTRY glutUseLayer(GLenum layer);
+extern void APIENTRY glutPostOverlayRedisplay(void);
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
+extern void APIENTRY glutPostWindowOverlayRedisplay(int win);
+#endif
+extern void APIENTRY glutShowOverlay(void);
+extern void APIENTRY glutHideOverlay(void);
+#endif
+
+/* GLUT menu sub-API. */
+extern int APIENTRY glutCreateMenu(void (*)(int));
+extern void APIENTRY glutDestroyMenu(int menu);
+extern int APIENTRY glutGetMenu(void);
+extern void APIENTRY glutSetMenu(int menu);
+extern void APIENTRY glutAddMenuEntry(const char *label, int value);
+extern void APIENTRY glutAddSubMenu(const char *label, int submenu);
+extern void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
+extern void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
+extern void APIENTRY glutRemoveMenuItem(int item);
+extern void APIENTRY glutAttachMenu(int button);
+extern void APIENTRY glutDetachMenu(int button);
+
+/* GLUT window callback sub-API. */
+extern void APIENTRY glutDisplayFunc(void (*func)(void));
+extern void APIENTRY glutReshapeFunc(void (*func)(int width, int height));
+extern void APIENTRY glutKeyboardFunc(void (*func)(unsigned char key, int x, int y));
+extern void APIENTRY glutMouseFunc(void (*func)(int button, int state, int x, int y));
+extern void APIENTRY glutMotionFunc(void (*func)(int x, int y));
+extern void APIENTRY glutPassiveMotionFunc(void (*func)(int x, int y));
+extern void APIENTRY glutEntryFunc(void (*func)(int state));
+extern void APIENTRY glutVisibilityFunc(void (*func)(int state));
+extern void APIENTRY glutIdleFunc(void (*func)(void));
+extern void APIENTRY glutTimerFunc(unsigned int millis, void (*func)(int value), int value);
+extern void APIENTRY glutMenuStateFunc(void (*func)(int state));
+#if (GLUT_API_VERSION >= 2)
+extern void APIENTRY glutSpecialFunc(void (*func)(int key, int x, int y));
+extern void APIENTRY glutSpaceballMotionFunc(void (*func)(int x, int y, int z));
+extern void APIENTRY glutSpaceballRotateFunc(void (*func)(int x, int y, int z));
+extern void APIENTRY glutSpaceballButtonFunc(void (*func)(int button, int state));
+extern void APIENTRY glutButtonBoxFunc(void (*func)(int button, int state));
+extern void APIENTRY glutDialsFunc(void (*func)(int dial, int value));
+extern void APIENTRY glutTabletMotionFunc(void (*func)(int x, int y));
+extern void APIENTRY glutTabletButtonFunc(void (*func)(int button, int state, int x, int y));
+#if (GLUT_API_VERSION >= 3)
+extern void APIENTRY glutMenuStatusFunc(void (*func)(int status, int x, int y));
+extern void APIENTRY glutOverlayDisplayFunc(void (*func)(void));
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
+extern void APIENTRY glutWindowStatusFunc(void (*func)(int state));
+#endif
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
+extern void APIENTRY glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y));
+extern void APIENTRY glutSpecialUpFunc(void (*func)(int key, int x, int y));
+extern void APIENTRY glutJoystickFunc(void (*func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
+#endif
+#endif
+#endif
+
+/* GLUT color index sub-API. */
+extern void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
+extern GLfloat APIENTRY glutGetColor(int ndx, int component);
+extern void APIENTRY glutCopyColormap(int win);
+
+/* GLUT state retrieval sub-API. */
+extern int APIENTRY glutGet(GLenum type);
+extern int APIENTRY glutDeviceGet(GLenum type);
+#if (GLUT_API_VERSION >= 2)
+/* GLUT extension support sub-API */
+extern int APIENTRY glutExtensionSupported(const char *name);
+#endif
+#if (GLUT_API_VERSION >= 3)
+extern int APIENTRY glutGetModifiers(void);
+extern int APIENTRY glutLayerGet(GLenum type);
+#endif
+
+/* GLUT font sub-API */
+extern void APIENTRY glutBitmapCharacter(void *font, int character);
+extern int APIENTRY glutBitmapWidth(void *font, int character);
+extern void APIENTRY glutStrokeCharacter(void *font, int character);
+extern int APIENTRY glutStrokeWidth(void *font, int character);
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
+extern int APIENTRY glutBitmapLength(void *font, const unsigned char *string);
+extern int APIENTRY glutStrokeLength(void *font, const unsigned char *string);
+#endif
+
+/* GLUT pre-built models sub-API */
+extern void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
+extern void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
+extern void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
+extern void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
+extern void APIENTRY glutWireCube(GLdouble size);
+extern void APIENTRY glutSolidCube(GLdouble size);
+extern void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
+extern void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
+extern void APIENTRY glutWireDodecahedron(void);
+extern void APIENTRY glutSolidDodecahedron(void);
+extern void APIENTRY glutWireTeapot(GLdouble size);
+extern void APIENTRY glutSolidTeapot(GLdouble size);
+extern void APIENTRY glutWireOctahedron(void);
+extern void APIENTRY glutSolidOctahedron(void);
+extern void APIENTRY glutWireTetrahedron(void);
+extern void APIENTRY glutSolidTetrahedron(void);
+extern void APIENTRY glutWireIcosahedron(void);
+extern void APIENTRY glutSolidIcosahedron(void);
+
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
+/* GLUT video resize sub-API. */
+extern int APIENTRY glutVideoResizeGet(GLenum param);
+extern void APIENTRY glutSetupVideoResizing(void);
+extern void APIENTRY glutStopVideoResizing(void);
+extern void APIENTRY glutVideoResize(int x, int y, int width, int height);
+extern void APIENTRY glutVideoPan(int x, int y, int width, int height);
+
+/* GLUT debugging sub-API. */
+extern void APIENTRY glutReportErrors(void);
+#endif
+
+#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
+/* GLUT device control sub-API. */
+/* glutSetKeyRepeat modes. */
+#define GLUT_KEY_REPEAT_OFF		0
+#define GLUT_KEY_REPEAT_ON		1
+#define GLUT_KEY_REPEAT_DEFAULT		2
+
+/* Joystick button masks. */
+#define GLUT_JOYSTICK_BUTTON_A		1
+#define GLUT_JOYSTICK_BUTTON_B		2
+#define GLUT_JOYSTICK_BUTTON_C		4
+#define GLUT_JOYSTICK_BUTTON_D		8
+
+extern void APIENTRY glutIgnoreKeyRepeat(int ignore);
+extern void APIENTRY glutSetKeyRepeat(int repeatMode);
+extern void APIENTRY glutForceJoystickFunc(void);
+
+/* GLUT game mode sub-API. */
+/* glutGameModeGet. */
+#define GLUT_GAME_MODE_ACTIVE           0
+#define GLUT_GAME_MODE_POSSIBLE         1
+#define GLUT_GAME_MODE_WIDTH            2
+#define GLUT_GAME_MODE_HEIGHT           3
+#define GLUT_GAME_MODE_PIXEL_DEPTH      4
+#define GLUT_GAME_MODE_REFRESH_RATE     5
+#define GLUT_GAME_MODE_DISPLAY_CHANGED  6
+
+extern void APIENTRY glutGameModeString(const char *string);
+extern int APIENTRY glutEnterGameMode(void);
+extern void APIENTRY glutLeaveGameMode(void);
+extern int APIENTRY glutGameModeGet(GLenum mode);
+#endif
+
+#ifdef __cplusplus
+}
+
+#endif
+
+#ifdef GLUT_APIENTRY_DEFINED
+# undef GLUT_APIENTRY_DEFINED
+# undef APIENTRY
+#endif
+
+#ifdef GLUT_WINGDIAPI_DEFINED
+# undef GLUT_WINGDIAPI_DEFINED
+# undef WINGDIAPI
+#endif
+
+#endif                  /* __glut_h__ */
diff --git a/samples/glut/glut_roman.c b/samples/glut/glut_roman.c
new file mode 100644
index 0000000..af2b4ec
--- /dev/null
+++ b/samples/glut/glut_roman.c
@@ -0,0 +1,2451 @@
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+#include "glutstroke.h"
+
+/* char: 33 '!' */
+
+static const CoordRec char33_stroke0[] = {
+    { 13.3819, 100 },
+    { 13.3819, 33.3333 },
+};
+
+static const CoordRec char33_stroke1[] = {
+    { 13.3819, 9.5238 },
+    { 8.62, 4.7619 },
+    { 13.3819, 0 },
+    { 18.1438, 4.7619 },
+    { 13.3819, 9.5238 },
+};
+
+static const StrokeRec char33[] = {
+   { 2, char33_stroke0 },
+   { 5, char33_stroke1 },
+};
+
+/* char: 34 '"' */
+
+static const CoordRec char34_stroke0[] = {
+    { 4.02, 100 },
+    { 4.02, 66.6667 },
+};
+
+static const CoordRec char34_stroke1[] = {
+    { 42.1152, 100 },
+    { 42.1152, 66.6667 },
+};
+
+static const StrokeRec char34[] = {
+   { 2, char34_stroke0 },
+   { 2, char34_stroke1 },
+};
+
+/* char: 35 '#' */
+
+static const CoordRec char35_stroke0[] = {
+    { 41.2952, 119.048 },
+    { 7.9619, -33.3333 },
+};
+
+static const CoordRec char35_stroke1[] = {
+    { 69.8667, 119.048 },
+    { 36.5333, -33.3333 },
+};
+
+static const CoordRec char35_stroke2[] = {
+    { 7.9619, 57.1429 },
+    { 74.6286, 57.1429 },
+};
+
+static const CoordRec char35_stroke3[] = {
+    { 3.2, 28.5714 },
+    { 69.8667, 28.5714 },
+};
+
+static const StrokeRec char35[] = {
+   { 2, char35_stroke0 },
+   { 2, char35_stroke1 },
+   { 2, char35_stroke2 },
+   { 2, char35_stroke3 },
+};
+
+/* char: 36 '$' */
+
+static const CoordRec char36_stroke0[] = {
+    { 28.6295, 119.048 },
+    { 28.6295, -19.0476 },
+};
+
+static const CoordRec char36_stroke1[] = {
+    { 47.6771, 119.048 },
+    { 47.6771, -19.0476 },
+};
+
+static const CoordRec char36_stroke2[] = {
+    { 71.4867, 85.7143 },
+    { 61.9629, 95.2381 },
+    { 47.6771, 100 },
+    { 28.6295, 100 },
+    { 14.3438, 95.2381 },
+    { 4.82, 85.7143 },
+    { 4.82, 76.1905 },
+    { 9.5819, 66.6667 },
+    { 14.3438, 61.9048 },
+    { 23.8676, 57.1429 },
+    { 52.439, 47.619 },
+    { 61.9629, 42.8571 },
+    { 66.7248, 38.0952 },
+    { 71.4867, 28.5714 },
+    { 71.4867, 14.2857 },
+    { 61.9629, 4.7619 },
+    { 47.6771, 0 },
+    { 28.6295, 0 },
+    { 14.3438, 4.7619 },
+    { 4.82, 14.2857 },
+};
+
+static const StrokeRec char36[] = {
+   { 2, char36_stroke0 },
+   { 2, char36_stroke1 },
+   { 20, char36_stroke2 },
+};
+
+/* char: 37 '%' */
+
+static const CoordRec char37_stroke0[] = {
+    { 92.0743, 100 },
+    { 6.36, 0 },
+};
+
+static const CoordRec char37_stroke1[] = {
+    { 30.1695, 100 },
+    { 39.6933, 90.4762 },
+    { 39.6933, 80.9524 },
+    { 34.9314, 71.4286 },
+    { 25.4076, 66.6667 },
+    { 15.8838, 66.6667 },
+    { 6.36, 76.1905 },
+    { 6.36, 85.7143 },
+    { 11.1219, 95.2381 },
+    { 20.6457, 100 },
+    { 30.1695, 100 },
+    { 39.6933, 95.2381 },
+    { 53.979, 90.4762 },
+    { 68.2648, 90.4762 },
+    { 82.5505, 95.2381 },
+    { 92.0743, 100 },
+};
+
+static const CoordRec char37_stroke2[] = {
+    { 73.0267, 33.3333 },
+    { 63.5029, 28.5714 },
+    { 58.741, 19.0476 },
+    { 58.741, 9.5238 },
+    { 68.2648, 0 },
+    { 77.7886, 0 },
+    { 87.3124, 4.7619 },
+    { 92.0743, 14.2857 },
+    { 92.0743, 23.8095 },
+    { 82.5505, 33.3333 },
+    { 73.0267, 33.3333 },
+};
+
+static const StrokeRec char37[] = {
+   { 2, char37_stroke0 },
+   { 16, char37_stroke1 },
+   { 11, char37_stroke2 },
+};
+
+/* char: 38 '&' */
+
+static const CoordRec char38_stroke0[] = {
+    { 101.218, 57.1429 },
+    { 101.218, 61.9048 },
+    { 96.4562, 66.6667 },
+    { 91.6943, 66.6667 },
+    { 86.9324, 61.9048 },
+    { 82.1705, 52.381 },
+    { 72.6467, 28.5714 },
+    { 63.1229, 14.2857 },
+    { 53.599, 4.7619 },
+    { 44.0752, 0 },
+    { 25.0276, 0 },
+    { 15.5038, 4.7619 },
+    { 10.7419, 9.5238 },
+    { 5.98, 19.0476 },
+    { 5.98, 28.5714 },
+    { 10.7419, 38.0952 },
+    { 15.5038, 42.8571 },
+    { 48.8371, 61.9048 },
+    { 53.599, 66.6667 },
+    { 58.361, 76.1905 },
+    { 58.361, 85.7143 },
+    { 53.599, 95.2381 },
+    { 44.0752, 100 },
+    { 34.5514, 95.2381 },
+    { 29.7895, 85.7143 },
+    { 29.7895, 76.1905 },
+    { 34.5514, 61.9048 },
+    { 44.0752, 47.619 },
+    { 67.8848, 14.2857 },
+    { 77.4086, 4.7619 },
+    { 86.9324, 0 },
+    { 96.4562, 0 },
+    { 101.218, 4.7619 },
+    { 101.218, 9.5238 },
+};
+
+static const StrokeRec char38[] = {
+   { 34, char38_stroke0 },
+};
+
+/* char: 39 ''' */
+
+static const CoordRec char39_stroke0[] = {
+    { 4.44, 100 },
+    { 4.44, 66.6667 },
+};
+
+static const StrokeRec char39[] = {
+   { 2, char39_stroke0 },
+};
+
+/* char: 40 '(' */
+
+static const CoordRec char40_stroke0[] = {
+    { 40.9133, 119.048 },
+    { 31.3895, 109.524 },
+    { 21.8657, 95.2381 },
+    { 12.3419, 76.1905 },
+    { 7.58, 52.381 },
+    { 7.58, 33.3333 },
+    { 12.3419, 9.5238 },
+    { 21.8657, -9.5238 },
+    { 31.3895, -23.8095 },
+    { 40.9133, -33.3333 },
+};
+
+static const StrokeRec char40[] = {
+   { 10, char40_stroke0 },
+};
+
+/* char: 41 ')' */
+
+static const CoordRec char41_stroke0[] = {
+    { 5.28, 119.048 },
+    { 14.8038, 109.524 },
+    { 24.3276, 95.2381 },
+    { 33.8514, 76.1905 },
+    { 38.6133, 52.381 },
+    { 38.6133, 33.3333 },
+    { 33.8514, 9.5238 },
+    { 24.3276, -9.5238 },
+    { 14.8038, -23.8095 },
+    { 5.28, -33.3333 },
+};
+
+static const StrokeRec char41[] = {
+   { 10, char41_stroke0 },
+};
+
+/* char: 42 '*' */
+
+static const CoordRec char42_stroke0[] = {
+    { 30.7695, 71.4286 },
+    { 30.7695, 14.2857 },
+};
+
+static const CoordRec char42_stroke1[] = {
+    { 6.96, 57.1429 },
+    { 54.579, 28.5714 },
+};
+
+static const CoordRec char42_stroke2[] = {
+    { 54.579, 57.1429 },
+    { 6.96, 28.5714 },
+};
+
+static const StrokeRec char42[] = {
+   { 2, char42_stroke0 },
+   { 2, char42_stroke1 },
+   { 2, char42_stroke2 },
+};
+
+/* char: 43 '+' */
+
+static const CoordRec char43_stroke0[] = {
+    { 48.8371, 85.7143 },
+    { 48.8371, 0 },
+};
+
+static const CoordRec char43_stroke1[] = {
+    { 5.98, 42.8571 },
+    { 91.6943, 42.8571 },
+};
+
+static const StrokeRec char43[] = {
+   { 2, char43_stroke0 },
+   { 2, char43_stroke1 },
+};
+
+/* char: 44 ',' */
+
+static const CoordRec char44_stroke0[] = {
+    { 18.2838, 4.7619 },
+    { 13.5219, 0 },
+    { 8.76, 4.7619 },
+    { 13.5219, 9.5238 },
+    { 18.2838, 4.7619 },
+    { 18.2838, -4.7619 },
+    { 13.5219, -14.2857 },
+    { 8.76, -19.0476 },
+};
+
+static const StrokeRec char44[] = {
+   { 8, char44_stroke0 },
+};
+
+/* char: 45 '-' */
+
+static const CoordRec char45_stroke0[] = {
+    { 7.38, 42.8571 },
+    { 93.0943, 42.8571 },
+};
+
+static const StrokeRec char45[] = {
+   { 2, char45_stroke0 },
+};
+
+/* char: 46 '.' */
+
+static const CoordRec char46_stroke0[] = {
+    { 13.1019, 9.5238 },
+    { 8.34, 4.7619 },
+    { 13.1019, 0 },
+    { 17.8638, 4.7619 },
+    { 13.1019, 9.5238 },
+};
+
+static const StrokeRec char46[] = {
+   { 5, char46_stroke0 },
+};
+
+/* char: 47 '/' */
+
+static const CoordRec char47_stroke0[] = {
+    { 7.24, -14.2857 },
+    { 73.9067, 100 },
+};
+
+static const StrokeRec char47[] = {
+   { 2, char47_stroke0 },
+};
+
+/* char: 48 '0' */
+
+static const CoordRec char48_stroke0[] = {
+    { 33.5514, 100 },
+    { 19.2657, 95.2381 },
+    { 9.7419, 80.9524 },
+    { 4.98, 57.1429 },
+    { 4.98, 42.8571 },
+    { 9.7419, 19.0476 },
+    { 19.2657, 4.7619 },
+    { 33.5514, 0 },
+    { 43.0752, 0 },
+    { 57.361, 4.7619 },
+    { 66.8848, 19.0476 },
+    { 71.6467, 42.8571 },
+    { 71.6467, 57.1429 },
+    { 66.8848, 80.9524 },
+    { 57.361, 95.2381 },
+    { 43.0752, 100 },
+    { 33.5514, 100 },
+};
+
+static const StrokeRec char48[] = {
+   { 17, char48_stroke0 },
+};
+
+/* char: 49 '1' */
+
+static const CoordRec char49_stroke0[] = {
+    { 11.82, 80.9524 },
+    { 21.3438, 85.7143 },
+    { 35.6295, 100 },
+    { 35.6295, 0 },
+};
+
+static const StrokeRec char49[] = {
+   { 4, char49_stroke0 },
+};
+
+/* char: 50 '2' */
+
+static const CoordRec char50_stroke0[] = {
+    { 10.1819, 76.1905 },
+    { 10.1819, 80.9524 },
+    { 14.9438, 90.4762 },
+    { 19.7057, 95.2381 },
+    { 29.2295, 100 },
+    { 48.2771, 100 },
+    { 57.801, 95.2381 },
+    { 62.5629, 90.4762 },
+    { 67.3248, 80.9524 },
+    { 67.3248, 71.4286 },
+    { 62.5629, 61.9048 },
+    { 53.039, 47.619 },
+    { 5.42, 0 },
+    { 72.0867, 0 },
+};
+
+static const StrokeRec char50[] = {
+   { 14, char50_stroke0 },
+};
+
+/* char: 51 '3' */
+
+static const CoordRec char51_stroke0[] = {
+    { 14.5238, 100 },
+    { 66.9048, 100 },
+    { 38.3333, 61.9048 },
+    { 52.619, 61.9048 },
+    { 62.1429, 57.1429 },
+    { 66.9048, 52.381 },
+    { 71.6667, 38.0952 },
+    { 71.6667, 28.5714 },
+    { 66.9048, 14.2857 },
+    { 57.381, 4.7619 },
+    { 43.0952, 0 },
+    { 28.8095, 0 },
+    { 14.5238, 4.7619 },
+    { 9.7619, 9.5238 },
+    { 5, 19.0476 },
+};
+
+static const StrokeRec char51[] = {
+   { 15, char51_stroke0 },
+};
+
+/* char: 52 '4' */
+
+static const CoordRec char52_stroke0[] = {
+    { 51.499, 100 },
+    { 3.88, 33.3333 },
+    { 75.3086, 33.3333 },
+};
+
+static const CoordRec char52_stroke1[] = {
+    { 51.499, 100 },
+    { 51.499, 0 },
+};
+
+static const StrokeRec char52[] = {
+   { 3, char52_stroke0 },
+   { 2, char52_stroke1 },
+};
+
+/* char: 53 '5' */
+
+static const CoordRec char53_stroke0[] = {
+    { 62.0029, 100 },
+    { 14.3838, 100 },
+    { 9.6219, 57.1429 },
+    { 14.3838, 61.9048 },
+    { 28.6695, 66.6667 },
+    { 42.9552, 66.6667 },
+    { 57.241, 61.9048 },
+    { 66.7648, 52.381 },
+    { 71.5267, 38.0952 },
+    { 71.5267, 28.5714 },
+    { 66.7648, 14.2857 },
+    { 57.241, 4.7619 },
+    { 42.9552, 0 },
+    { 28.6695, 0 },
+    { 14.3838, 4.7619 },
+    { 9.6219, 9.5238 },
+    { 4.86, 19.0476 },
+};
+
+static const StrokeRec char53[] = {
+   { 17, char53_stroke0 },
+};
+
+/* char: 54 '6' */
+
+static const CoordRec char54_stroke0[] = {
+    { 62.7229, 85.7143 },
+    { 57.961, 95.2381 },
+    { 43.6752, 100 },
+    { 34.1514, 100 },
+    { 19.8657, 95.2381 },
+    { 10.3419, 80.9524 },
+    { 5.58, 57.1429 },
+    { 5.58, 33.3333 },
+    { 10.3419, 14.2857 },
+    { 19.8657, 4.7619 },
+    { 34.1514, 0 },
+    { 38.9133, 0 },
+    { 53.199, 4.7619 },
+    { 62.7229, 14.2857 },
+    { 67.4848, 28.5714 },
+    { 67.4848, 33.3333 },
+    { 62.7229, 47.619 },
+    { 53.199, 57.1429 },
+    { 38.9133, 61.9048 },
+    { 34.1514, 61.9048 },
+    { 19.8657, 57.1429 },
+    { 10.3419, 47.619 },
+    { 5.58, 33.3333 },
+};
+
+static const StrokeRec char54[] = {
+   { 23, char54_stroke0 },
+};
+
+/* char: 55 '7' */
+
+static const CoordRec char55_stroke0[] = {
+    { 72.2267, 100 },
+    { 24.6076, 0 },
+};
+
+static const CoordRec char55_stroke1[] = {
+    { 5.56, 100 },
+    { 72.2267, 100 },
+};
+
+static const StrokeRec char55[] = {
+   { 2, char55_stroke0 },
+   { 2, char55_stroke1 },
+};
+
+/* char: 56 '8' */
+
+static const CoordRec char56_stroke0[] = {
+    { 29.4095, 100 },
+    { 15.1238, 95.2381 },
+    { 10.3619, 85.7143 },
+    { 10.3619, 76.1905 },
+    { 15.1238, 66.6667 },
+    { 24.6476, 61.9048 },
+    { 43.6952, 57.1429 },
+    { 57.981, 52.381 },
+    { 67.5048, 42.8571 },
+    { 72.2667, 33.3333 },
+    { 72.2667, 19.0476 },
+    { 67.5048, 9.5238 },
+    { 62.7429, 4.7619 },
+    { 48.4571, 0 },
+    { 29.4095, 0 },
+    { 15.1238, 4.7619 },
+    { 10.3619, 9.5238 },
+    { 5.6, 19.0476 },
+    { 5.6, 33.3333 },
+    { 10.3619, 42.8571 },
+    { 19.8857, 52.381 },
+    { 34.1714, 57.1429 },
+    { 53.219, 61.9048 },
+    { 62.7429, 66.6667 },
+    { 67.5048, 76.1905 },
+    { 67.5048, 85.7143 },
+    { 62.7429, 95.2381 },
+    { 48.4571, 100 },
+    { 29.4095, 100 },
+};
+
+static const StrokeRec char56[] = {
+   { 29, char56_stroke0 },
+};
+
+/* char: 57 '9' */
+
+static const CoordRec char57_stroke0[] = {
+    { 68.5048, 66.6667 },
+    { 63.7429, 52.381 },
+    { 54.219, 42.8571 },
+    { 39.9333, 38.0952 },
+    { 35.1714, 38.0952 },
+    { 20.8857, 42.8571 },
+    { 11.3619, 52.381 },
+    { 6.6, 66.6667 },
+    { 6.6, 71.4286 },
+    { 11.3619, 85.7143 },
+    { 20.8857, 95.2381 },
+    { 35.1714, 100 },
+    { 39.9333, 100 },
+    { 54.219, 95.2381 },
+    { 63.7429, 85.7143 },
+    { 68.5048, 66.6667 },
+    { 68.5048, 42.8571 },
+    { 63.7429, 19.0476 },
+    { 54.219, 4.7619 },
+    { 39.9333, 0 },
+    { 30.4095, 0 },
+    { 16.1238, 4.7619 },
+    { 11.3619, 14.2857 },
+};
+
+static const StrokeRec char57[] = {
+   { 23, char57_stroke0 },
+};
+
+/* char: 58 ':' */
+
+static const CoordRec char58_stroke0[] = {
+    { 14.0819, 66.6667 },
+    { 9.32, 61.9048 },
+    { 14.0819, 57.1429 },
+    { 18.8438, 61.9048 },
+    { 14.0819, 66.6667 },
+};
+
+static const CoordRec char58_stroke1[] = {
+    { 14.0819, 9.5238 },
+    { 9.32, 4.7619 },
+    { 14.0819, 0 },
+    { 18.8438, 4.7619 },
+    { 14.0819, 9.5238 },
+};
+
+static const StrokeRec char58[] = {
+   { 5, char58_stroke0 },
+   { 5, char58_stroke1 },
+};
+
+/* char: 59 ';' */
+
+static const CoordRec char59_stroke0[] = {
+    { 12.9619, 66.6667 },
+    { 8.2, 61.9048 },
+    { 12.9619, 57.1429 },
+    { 17.7238, 61.9048 },
+    { 12.9619, 66.6667 },
+};
+
+static const CoordRec char59_stroke1[] = {
+    { 17.7238, 4.7619 },
+    { 12.9619, 0 },
+    { 8.2, 4.7619 },
+    { 12.9619, 9.5238 },
+    { 17.7238, 4.7619 },
+    { 17.7238, -4.7619 },
+    { 12.9619, -14.2857 },
+    { 8.2, -19.0476 },
+};
+
+static const StrokeRec char59[] = {
+   { 5, char59_stroke0 },
+   { 8, char59_stroke1 },
+};
+
+/* char: 60 '<' */
+
+static const CoordRec char60_stroke0[] = {
+    { 79.2505, 85.7143 },
+    { 3.06, 42.8571 },
+    { 79.2505, 0 },
+};
+
+static const StrokeRec char60[] = {
+   { 3, char60_stroke0 },
+};
+
+/* char: 61 '=' */
+
+static const CoordRec char61_stroke0[] = {
+    { 5.7, 57.1429 },
+    { 91.4143, 57.1429 },
+};
+
+static const CoordRec char61_stroke1[] = {
+    { 5.7, 28.5714 },
+    { 91.4143, 28.5714 },
+};
+
+static const StrokeRec char61[] = {
+   { 2, char61_stroke0 },
+   { 2, char61_stroke1 },
+};
+
+/* char: 62 '>' */
+
+static const CoordRec char62_stroke0[] = {
+    { 2.78, 85.7143 },
+    { 78.9705, 42.8571 },
+    { 2.78, 0 },
+};
+
+static const StrokeRec char62[] = {
+   { 3, char62_stroke0 },
+};
+
+/* char: 63 '?' */
+
+static const CoordRec char63_stroke0[] = {
+    { 8.42, 76.1905 },
+    { 8.42, 80.9524 },
+    { 13.1819, 90.4762 },
+    { 17.9438, 95.2381 },
+    { 27.4676, 100 },
+    { 46.5152, 100 },
+    { 56.039, 95.2381 },
+    { 60.801, 90.4762 },
+    { 65.5629, 80.9524 },
+    { 65.5629, 71.4286 },
+    { 60.801, 61.9048 },
+    { 56.039, 57.1429 },
+    { 36.9914, 47.619 },
+    { 36.9914, 33.3333 },
+};
+
+static const CoordRec char63_stroke1[] = {
+    { 36.9914, 9.5238 },
+    { 32.2295, 4.7619 },
+    { 36.9914, 0 },
+    { 41.7533, 4.7619 },
+    { 36.9914, 9.5238 },
+};
+
+static const StrokeRec char63[] = {
+   { 14, char63_stroke0 },
+   { 5, char63_stroke1 },
+};
+
+/* char: 64 '@' */
+
+static const CoordRec char64_stroke0[] = {
+    { 49.2171, 52.381 },
+    { 39.6933, 57.1429 },
+    { 30.1695, 57.1429 },
+    { 25.4076, 47.619 },
+    { 25.4076, 42.8571 },
+    { 30.1695, 33.3333 },
+    { 39.6933, 33.3333 },
+    { 49.2171, 38.0952 },
+};
+
+static const CoordRec char64_stroke1[] = {
+    { 49.2171, 57.1429 },
+    { 49.2171, 38.0952 },
+    { 53.979, 33.3333 },
+    { 63.5029, 33.3333 },
+    { 68.2648, 42.8571 },
+    { 68.2648, 47.619 },
+    { 63.5029, 61.9048 },
+    { 53.979, 71.4286 },
+    { 39.6933, 76.1905 },
+    { 34.9314, 76.1905 },
+    { 20.6457, 71.4286 },
+    { 11.1219, 61.9048 },
+    { 6.36, 47.619 },
+    { 6.36, 42.8571 },
+    { 11.1219, 28.5714 },
+    { 20.6457, 19.0476 },
+    { 34.9314, 14.2857 },
+    { 39.6933, 14.2857 },
+    { 53.979, 19.0476 },
+};
+
+static const StrokeRec char64[] = {
+   { 8, char64_stroke0 },
+   { 19, char64_stroke1 },
+};
+
+/* char: 65 'A' */
+
+static const CoordRec char65_stroke0[] = {
+    { 40.5952, 100 },
+    { 2.5, 0 },
+};
+
+static const CoordRec char65_stroke1[] = {
+    { 40.5952, 100 },
+    { 78.6905, 0 },
+};
+
+static const CoordRec char65_stroke2[] = {
+    { 16.7857, 33.3333 },
+    { 64.4048, 33.3333 },
+};
+
+static const StrokeRec char65[] = {
+   { 2, char65_stroke0 },
+   { 2, char65_stroke1 },
+   { 2, char65_stroke2 },
+};
+
+/* char: 66 'B' */
+
+static const CoordRec char66_stroke0[] = {
+    { 11.42, 100 },
+    { 11.42, 0 },
+};
+
+static const CoordRec char66_stroke1[] = {
+    { 11.42, 100 },
+    { 54.2771, 100 },
+    { 68.5629, 95.2381 },
+    { 73.3248, 90.4762 },
+    { 78.0867, 80.9524 },
+    { 78.0867, 71.4286 },
+    { 73.3248, 61.9048 },
+    { 68.5629, 57.1429 },
+    { 54.2771, 52.381 },
+};
+
+static const CoordRec char66_stroke2[] = {
+    { 11.42, 52.381 },
+    { 54.2771, 52.381 },
+    { 68.5629, 47.619 },
+    { 73.3248, 42.8571 },
+    { 78.0867, 33.3333 },
+    { 78.0867, 19.0476 },
+    { 73.3248, 9.5238 },
+    { 68.5629, 4.7619 },
+    { 54.2771, 0 },
+    { 11.42, 0 },
+};
+
+static const StrokeRec char66[] = {
+   { 2, char66_stroke0 },
+   { 9, char66_stroke1 },
+   { 10, char66_stroke2 },
+};
+
+/* char: 67 'C' */
+
+static const CoordRec char67_stroke0[] = {
+    { 78.0886, 76.1905 },
+    { 73.3267, 85.7143 },
+    { 63.8029, 95.2381 },
+    { 54.279, 100 },
+    { 35.2314, 100 },
+    { 25.7076, 95.2381 },
+    { 16.1838, 85.7143 },
+    { 11.4219, 76.1905 },
+    { 6.66, 61.9048 },
+    { 6.66, 38.0952 },
+    { 11.4219, 23.8095 },
+    { 16.1838, 14.2857 },
+    { 25.7076, 4.7619 },
+    { 35.2314, 0 },
+    { 54.279, 0 },
+    { 63.8029, 4.7619 },
+    { 73.3267, 14.2857 },
+    { 78.0886, 23.8095 },
+};
+
+static const StrokeRec char67[] = {
+   { 18, char67_stroke0 },
+};
+
+/* char: 68 'D' */
+
+static const CoordRec char68_stroke0[] = {
+    { 11.96, 100 },
+    { 11.96, 0 },
+};
+
+static const CoordRec char68_stroke1[] = {
+    { 11.96, 100 },
+    { 45.2933, 100 },
+    { 59.579, 95.2381 },
+    { 69.1029, 85.7143 },
+    { 73.8648, 76.1905 },
+    { 78.6267, 61.9048 },
+    { 78.6267, 38.0952 },
+    { 73.8648, 23.8095 },
+    { 69.1029, 14.2857 },
+    { 59.579, 4.7619 },
+    { 45.2933, 0 },
+    { 11.96, 0 },
+};
+
+static const StrokeRec char68[] = {
+   { 2, char68_stroke0 },
+   { 12, char68_stroke1 },
+};
+
+/* char: 69 'E' */
+
+static const CoordRec char69_stroke0[] = {
+    { 11.42, 100 },
+    { 11.42, 0 },
+};
+
+static const CoordRec char69_stroke1[] = {
+    { 11.42, 100 },
+    { 73.3248, 100 },
+};
+
+static const CoordRec char69_stroke2[] = {
+    { 11.42, 52.381 },
+    { 49.5152, 52.381 },
+};
+
+static const CoordRec char69_stroke3[] = {
+    { 11.42, 0 },
+    { 73.3248, 0 },
+};
+
+static const StrokeRec char69[] = {
+   { 2, char69_stroke0 },
+   { 2, char69_stroke1 },
+   { 2, char69_stroke2 },
+   { 2, char69_stroke3 },
+};
+
+/* char: 70 'F' */
+
+static const CoordRec char70_stroke0[] = {
+    { 11.42, 100 },
+    { 11.42, 0 },
+};
+
+static const CoordRec char70_stroke1[] = {
+    { 11.42, 100 },
+    { 73.3248, 100 },
+};
+
+static const CoordRec char70_stroke2[] = {
+    { 11.42, 52.381 },
+    { 49.5152, 52.381 },
+};
+
+static const StrokeRec char70[] = {
+   { 2, char70_stroke0 },
+   { 2, char70_stroke1 },
+   { 2, char70_stroke2 },
+};
+
+/* char: 71 'G' */
+
+static const CoordRec char71_stroke0[] = {
+    { 78.4886, 76.1905 },
+    { 73.7267, 85.7143 },
+    { 64.2029, 95.2381 },
+    { 54.679, 100 },
+    { 35.6314, 100 },
+    { 26.1076, 95.2381 },
+    { 16.5838, 85.7143 },
+    { 11.8219, 76.1905 },
+    { 7.06, 61.9048 },
+    { 7.06, 38.0952 },
+    { 11.8219, 23.8095 },
+    { 16.5838, 14.2857 },
+    { 26.1076, 4.7619 },
+    { 35.6314, 0 },
+    { 54.679, 0 },
+    { 64.2029, 4.7619 },
+    { 73.7267, 14.2857 },
+    { 78.4886, 23.8095 },
+    { 78.4886, 38.0952 },
+};
+
+static const CoordRec char71_stroke1[] = {
+    { 54.679, 38.0952 },
+    { 78.4886, 38.0952 },
+};
+
+static const StrokeRec char71[] = {
+   { 19, char71_stroke0 },
+   { 2, char71_stroke1 },
+};
+
+/* char: 72 'H' */
+
+static const CoordRec char72_stroke0[] = {
+    { 11.42, 100 },
+    { 11.42, 0 },
+};
+
+static const CoordRec char72_stroke1[] = {
+    { 78.0867, 100 },
+    { 78.0867, 0 },
+};
+
+static const CoordRec char72_stroke2[] = {
+    { 11.42, 52.381 },
+    { 78.0867, 52.381 },
+};
+
+static const StrokeRec char72[] = {
+   { 2, char72_stroke0 },
+   { 2, char72_stroke1 },
+   { 2, char72_stroke2 },
+};
+
+/* char: 73 'I' */
+
+static const CoordRec char73_stroke0[] = {
+    { 10.86, 100 },
+    { 10.86, 0 },
+};
+
+static const StrokeRec char73[] = {
+   { 2, char73_stroke0 },
+};
+
+/* char: 74 'J' */
+
+static const CoordRec char74_stroke0[] = {
+    { 50.119, 100 },
+    { 50.119, 23.8095 },
+    { 45.3571, 9.5238 },
+    { 40.5952, 4.7619 },
+    { 31.0714, 0 },
+    { 21.5476, 0 },
+    { 12.0238, 4.7619 },
+    { 7.2619, 9.5238 },
+    { 2.5, 23.8095 },
+    { 2.5, 33.3333 },
+};
+
+static const StrokeRec char74[] = {
+   { 10, char74_stroke0 },
+};
+
+/* char: 75 'K' */
+
+static const CoordRec char75_stroke0[] = {
+    { 11.28, 100 },
+    { 11.28, 0 },
+};
+
+static const CoordRec char75_stroke1[] = {
+    { 77.9467, 100 },
+    { 11.28, 33.3333 },
+};
+
+static const CoordRec char75_stroke2[] = {
+    { 35.0895, 57.1429 },
+    { 77.9467, 0 },
+};
+
+static const StrokeRec char75[] = {
+   { 2, char75_stroke0 },
+   { 2, char75_stroke1 },
+   { 2, char75_stroke2 },
+};
+
+/* char: 76 'L' */
+
+static const CoordRec char76_stroke0[] = {
+    { 11.68, 100 },
+    { 11.68, 0 },
+};
+
+static const CoordRec char76_stroke1[] = {
+    { 11.68, 0 },
+    { 68.8229, 0 },
+};
+
+static const StrokeRec char76[] = {
+   { 2, char76_stroke0 },
+   { 2, char76_stroke1 },
+};
+
+/* char: 77 'M' */
+
+static const CoordRec char77_stroke0[] = {
+    { 10.86, 100 },
+    { 10.86, 0 },
+};
+
+static const CoordRec char77_stroke1[] = {
+    { 10.86, 100 },
+    { 48.9552, 0 },
+};
+
+static const CoordRec char77_stroke2[] = {
+    { 87.0505, 100 },
+    { 48.9552, 0 },
+};
+
+static const CoordRec char77_stroke3[] = {
+    { 87.0505, 100 },
+    { 87.0505, 0 },
+};
+
+static const StrokeRec char77[] = {
+   { 2, char77_stroke0 },
+   { 2, char77_stroke1 },
+   { 2, char77_stroke2 },
+   { 2, char77_stroke3 },
+};
+
+/* char: 78 'N' */
+
+static const CoordRec char78_stroke0[] = {
+    { 11.14, 100 },
+    { 11.14, 0 },
+};
+
+static const CoordRec char78_stroke1[] = {
+    { 11.14, 100 },
+    { 77.8067, 0 },
+};
+
+static const CoordRec char78_stroke2[] = {
+    { 77.8067, 100 },
+    { 77.8067, 0 },
+};
+
+static const StrokeRec char78[] = {
+   { 2, char78_stroke0 },
+   { 2, char78_stroke1 },
+   { 2, char78_stroke2 },
+};
+
+/* char: 79 'O' */
+
+static const CoordRec char79_stroke0[] = {
+    { 34.8114, 100 },
+    { 25.2876, 95.2381 },
+    { 15.7638, 85.7143 },
+    { 11.0019, 76.1905 },
+    { 6.24, 61.9048 },
+    { 6.24, 38.0952 },
+    { 11.0019, 23.8095 },
+    { 15.7638, 14.2857 },
+    { 25.2876, 4.7619 },
+    { 34.8114, 0 },
+    { 53.859, 0 },
+    { 63.3829, 4.7619 },
+    { 72.9067, 14.2857 },
+    { 77.6686, 23.8095 },
+    { 82.4305, 38.0952 },
+    { 82.4305, 61.9048 },
+    { 77.6686, 76.1905 },
+    { 72.9067, 85.7143 },
+    { 63.3829, 95.2381 },
+    { 53.859, 100 },
+    { 34.8114, 100 },
+};
+
+static const StrokeRec char79[] = {
+   { 21, char79_stroke0 },
+};
+
+/* char: 80 'P' */
+
+static const CoordRec char80_stroke0[] = {
+    { 12.1, 100 },
+    { 12.1, 0 },
+};
+
+static const CoordRec char80_stroke1[] = {
+    { 12.1, 100 },
+    { 54.9571, 100 },
+    { 69.2429, 95.2381 },
+    { 74.0048, 90.4762 },
+    { 78.7667, 80.9524 },
+    { 78.7667, 66.6667 },
+    { 74.0048, 57.1429 },
+    { 69.2429, 52.381 },
+    { 54.9571, 47.619 },
+    { 12.1, 47.619 },
+};
+
+static const StrokeRec char80[] = {
+   { 2, char80_stroke0 },
+   { 10, char80_stroke1 },
+};
+
+/* char: 81 'Q' */
+
+static const CoordRec char81_stroke0[] = {
+    { 33.8714, 100 },
+    { 24.3476, 95.2381 },
+    { 14.8238, 85.7143 },
+    { 10.0619, 76.1905 },
+    { 5.3, 61.9048 },
+    { 5.3, 38.0952 },
+    { 10.0619, 23.8095 },
+    { 14.8238, 14.2857 },
+    { 24.3476, 4.7619 },
+    { 33.8714, 0 },
+    { 52.919, 0 },
+    { 62.4429, 4.7619 },
+    { 71.9667, 14.2857 },
+    { 76.7286, 23.8095 },
+    { 81.4905, 38.0952 },
+    { 81.4905, 61.9048 },
+    { 76.7286, 76.1905 },
+    { 71.9667, 85.7143 },
+    { 62.4429, 95.2381 },
+    { 52.919, 100 },
+    { 33.8714, 100 },
+};
+
+static const CoordRec char81_stroke1[] = {
+    { 48.1571, 19.0476 },
+    { 76.7286, -9.5238 },
+};
+
+static const StrokeRec char81[] = {
+   { 21, char81_stroke0 },
+   { 2, char81_stroke1 },
+};
+
+/* char: 82 'R' */
+
+static const CoordRec char82_stroke0[] = {
+    { 11.68, 100 },
+    { 11.68, 0 },
+};
+
+static const CoordRec char82_stroke1[] = {
+    { 11.68, 100 },
+    { 54.5371, 100 },
+    { 68.8229, 95.2381 },
+    { 73.5848, 90.4762 },
+    { 78.3467, 80.9524 },
+    { 78.3467, 71.4286 },
+    { 73.5848, 61.9048 },
+    { 68.8229, 57.1429 },
+    { 54.5371, 52.381 },
+    { 11.68, 52.381 },
+};
+
+static const CoordRec char82_stroke2[] = {
+    { 45.0133, 52.381 },
+    { 78.3467, 0 },
+};
+
+static const StrokeRec char82[] = {
+   { 2, char82_stroke0 },
+   { 10, char82_stroke1 },
+   { 2, char82_stroke2 },
+};
+
+/* char: 83 'S' */
+
+static const CoordRec char83_stroke0[] = {
+    { 74.6667, 85.7143 },
+    { 65.1429, 95.2381 },
+    { 50.8571, 100 },
+    { 31.8095, 100 },
+    { 17.5238, 95.2381 },
+    { 8, 85.7143 },
+    { 8, 76.1905 },
+    { 12.7619, 66.6667 },
+    { 17.5238, 61.9048 },
+    { 27.0476, 57.1429 },
+    { 55.619, 47.619 },
+    { 65.1429, 42.8571 },
+    { 69.9048, 38.0952 },
+    { 74.6667, 28.5714 },
+    { 74.6667, 14.2857 },
+    { 65.1429, 4.7619 },
+    { 50.8571, 0 },
+    { 31.8095, 0 },
+    { 17.5238, 4.7619 },
+    { 8, 14.2857 },
+};
+
+static const StrokeRec char83[] = {
+   { 20, char83_stroke0 },
+};
+
+/* char: 84 'T' */
+
+static const CoordRec char84_stroke0[] = {
+    { 35.6933, 100 },
+    { 35.6933, 0 },
+};
+
+static const CoordRec char84_stroke1[] = {
+    { 2.36, 100 },
+    { 69.0267, 100 },
+};
+
+static const StrokeRec char84[] = {
+   { 2, char84_stroke0 },
+   { 2, char84_stroke1 },
+};
+
+/* char: 85 'U' */
+
+static const CoordRec char85_stroke0[] = {
+    { 11.54, 100 },
+    { 11.54, 28.5714 },
+    { 16.3019, 14.2857 },
+    { 25.8257, 4.7619 },
+    { 40.1114, 0 },
+    { 49.6352, 0 },
+    { 63.921, 4.7619 },
+    { 73.4448, 14.2857 },
+    { 78.2067, 28.5714 },
+    { 78.2067, 100 },
+};
+
+static const StrokeRec char85[] = {
+   { 10, char85_stroke0 },
+};
+
+/* char: 86 'V' */
+
+static const CoordRec char86_stroke0[] = {
+    { 2.36, 100 },
+    { 40.4552, 0 },
+};
+
+static const CoordRec char86_stroke1[] = {
+    { 78.5505, 100 },
+    { 40.4552, 0 },
+};
+
+static const StrokeRec char86[] = {
+   { 2, char86_stroke0 },
+   { 2, char86_stroke1 },
+};
+
+/* char: 87 'W' */
+
+static const CoordRec char87_stroke0[] = {
+    { 2.22, 100 },
+    { 26.0295, 0 },
+};
+
+static const CoordRec char87_stroke1[] = {
+    { 49.839, 100 },
+    { 26.0295, 0 },
+};
+
+static const CoordRec char87_stroke2[] = {
+    { 49.839, 100 },
+    { 73.6486, 0 },
+};
+
+static const CoordRec char87_stroke3[] = {
+    { 97.4581, 100 },
+    { 73.6486, 0 },
+};
+
+static const StrokeRec char87[] = {
+   { 2, char87_stroke0 },
+   { 2, char87_stroke1 },
+   { 2, char87_stroke2 },
+   { 2, char87_stroke3 },
+};
+
+/* char: 88 'X' */
+
+static const CoordRec char88_stroke0[] = {
+    { 2.5, 100 },
+    { 69.1667, 0 },
+};
+
+static const CoordRec char88_stroke1[] = {
+    { 69.1667, 100 },
+    { 2.5, 0 },
+};
+
+static const StrokeRec char88[] = {
+   { 2, char88_stroke0 },
+   { 2, char88_stroke1 },
+};
+
+/* char: 89 'Y' */
+
+static const CoordRec char89_stroke0[] = {
+    { 1.52, 100 },
+    { 39.6152, 52.381 },
+    { 39.6152, 0 },
+};
+
+static const CoordRec char89_stroke1[] = {
+    { 77.7105, 100 },
+    { 39.6152, 52.381 },
+};
+
+static const StrokeRec char89[] = {
+   { 3, char89_stroke0 },
+   { 2, char89_stroke1 },
+};
+
+/* char: 90 'Z' */
+
+static const CoordRec char90_stroke0[] = {
+    { 69.1667, 100 },
+    { 2.5, 0 },
+};
+
+static const CoordRec char90_stroke1[] = {
+    { 2.5, 100 },
+    { 69.1667, 100 },
+};
+
+static const CoordRec char90_stroke2[] = {
+    { 2.5, 0 },
+    { 69.1667, 0 },
+};
+
+static const StrokeRec char90[] = {
+   { 2, char90_stroke0 },
+   { 2, char90_stroke1 },
+   { 2, char90_stroke2 },
+};
+
+/* char: 91 '[' */
+
+static const CoordRec char91_stroke0[] = {
+    { 7.78, 119.048 },
+    { 7.78, -33.3333 },
+};
+
+static const CoordRec char91_stroke1[] = {
+    { 12.5419, 119.048 },
+    { 12.5419, -33.3333 },
+};
+
+static const CoordRec char91_stroke2[] = {
+    { 7.78, 119.048 },
+    { 41.1133, 119.048 },
+};
+
+static const CoordRec char91_stroke3[] = {
+    { 7.78, -33.3333 },
+    { 41.1133, -33.3333 },
+};
+
+static const StrokeRec char91[] = {
+   { 2, char91_stroke0 },
+   { 2, char91_stroke1 },
+   { 2, char91_stroke2 },
+   { 2, char91_stroke3 },
+};
+
+/* char: 92 '\' */
+
+static const CoordRec char92_stroke0[] = {
+    { 5.84, 100 },
+    { 72.5067, -14.2857 },
+};
+
+static const StrokeRec char92[] = {
+   { 2, char92_stroke0 },
+};
+
+/* char: 93 ']' */
+
+static const CoordRec char93_stroke0[] = {
+    { 33.0114, 119.048 },
+    { 33.0114, -33.3333 },
+};
+
+static const CoordRec char93_stroke1[] = {
+    { 37.7733, 119.048 },
+    { 37.7733, -33.3333 },
+};
+
+static const CoordRec char93_stroke2[] = {
+    { 4.44, 119.048 },
+    { 37.7733, 119.048 },
+};
+
+static const CoordRec char93_stroke3[] = {
+    { 4.44, -33.3333 },
+    { 37.7733, -33.3333 },
+};
+
+static const StrokeRec char93[] = {
+   { 2, char93_stroke0 },
+   { 2, char93_stroke1 },
+   { 2, char93_stroke2 },
+   { 2, char93_stroke3 },
+};
+
+/* char: 94 '^' */
+
+static const CoordRec char94_stroke0[] = {
+    { 44.0752, 109.524 },
+    { 5.98, 42.8571 },
+};
+
+static const CoordRec char94_stroke1[] = {
+    { 44.0752, 109.524 },
+    { 82.1705, 42.8571 },
+};
+
+static const StrokeRec char94[] = {
+   { 2, char94_stroke0 },
+   { 2, char94_stroke1 },
+};
+
+/* char: 95 '_' */
+
+static const CoordRec char95_stroke0[] = {
+    { -1.1, -33.3333 },
+    { 103.662, -33.3333 },
+    { 103.662, -28.5714 },
+    { -1.1, -28.5714 },
+    { -1.1, -33.3333 },
+};
+
+static const StrokeRec char95[] = {
+   { 5, char95_stroke0 },
+};
+
+/* char: 96 '`' */
+
+static const CoordRec char96_stroke0[] = {
+    { 33.0219, 100 },
+    { 56.8314, 71.4286 },
+};
+
+static const CoordRec char96_stroke1[] = {
+    { 33.0219, 100 },
+    { 28.26, 95.2381 },
+    { 56.8314, 71.4286 },
+};
+
+static const StrokeRec char96[] = {
+   { 2, char96_stroke0 },
+   { 3, char96_stroke1 },
+};
+
+/* char: 97 'a' */
+
+static const CoordRec char97_stroke0[] = {
+    { 63.8229, 66.6667 },
+    { 63.8229, 0 },
+};
+
+static const CoordRec char97_stroke1[] = {
+    { 63.8229, 52.381 },
+    { 54.299, 61.9048 },
+    { 44.7752, 66.6667 },
+    { 30.4895, 66.6667 },
+    { 20.9657, 61.9048 },
+    { 11.4419, 52.381 },
+    { 6.68, 38.0952 },
+    { 6.68, 28.5714 },
+    { 11.4419, 14.2857 },
+    { 20.9657, 4.7619 },
+    { 30.4895, 0 },
+    { 44.7752, 0 },
+    { 54.299, 4.7619 },
+    { 63.8229, 14.2857 },
+};
+
+static const StrokeRec char97[] = {
+   { 2, char97_stroke0 },
+   { 14, char97_stroke1 },
+};
+
+/* char: 98 'b' */
+
+static const CoordRec char98_stroke0[] = {
+    { 8.76, 100 },
+    { 8.76, 0 },
+};
+
+static const CoordRec char98_stroke1[] = {
+    { 8.76, 52.381 },
+    { 18.2838, 61.9048 },
+    { 27.8076, 66.6667 },
+    { 42.0933, 66.6667 },
+    { 51.6171, 61.9048 },
+    { 61.141, 52.381 },
+    { 65.9029, 38.0952 },
+    { 65.9029, 28.5714 },
+    { 61.141, 14.2857 },
+    { 51.6171, 4.7619 },
+    { 42.0933, 0 },
+    { 27.8076, 0 },
+    { 18.2838, 4.7619 },
+    { 8.76, 14.2857 },
+};
+
+static const StrokeRec char98[] = {
+   { 2, char98_stroke0 },
+   { 14, char98_stroke1 },
+};
+
+/* char: 99 'c' */
+
+static const CoordRec char99_stroke0[] = {
+    { 62.6629, 52.381 },
+    { 53.139, 61.9048 },
+    { 43.6152, 66.6667 },
+    { 29.3295, 66.6667 },
+    { 19.8057, 61.9048 },
+    { 10.2819, 52.381 },
+    { 5.52, 38.0952 },
+    { 5.52, 28.5714 },
+    { 10.2819, 14.2857 },
+    { 19.8057, 4.7619 },
+    { 29.3295, 0 },
+    { 43.6152, 0 },
+    { 53.139, 4.7619 },
+    { 62.6629, 14.2857 },
+};
+
+static const StrokeRec char99[] = {
+   { 14, char99_stroke0 },
+};
+
+/* char: 100 'd' */
+
+static const CoordRec char100_stroke0[] = {
+    { 61.7829, 100 },
+    { 61.7829, 0 },
+};
+
+static const CoordRec char100_stroke1[] = {
+    { 61.7829, 52.381 },
+    { 52.259, 61.9048 },
+    { 42.7352, 66.6667 },
+    { 28.4495, 66.6667 },
+    { 18.9257, 61.9048 },
+    { 9.4019, 52.381 },
+    { 4.64, 38.0952 },
+    { 4.64, 28.5714 },
+    { 9.4019, 14.2857 },
+    { 18.9257, 4.7619 },
+    { 28.4495, 0 },
+    { 42.7352, 0 },
+    { 52.259, 4.7619 },
+    { 61.7829, 14.2857 },
+};
+
+static const StrokeRec char100[] = {
+   { 2, char100_stroke0 },
+   { 14, char100_stroke1 },
+};
+
+/* char: 101 'e' */
+
+static const CoordRec char101_stroke0[] = {
+    { 5.72, 38.0952 },
+    { 62.8629, 38.0952 },
+    { 62.8629, 47.619 },
+    { 58.101, 57.1429 },
+    { 53.339, 61.9048 },
+    { 43.8152, 66.6667 },
+    { 29.5295, 66.6667 },
+    { 20.0057, 61.9048 },
+    { 10.4819, 52.381 },
+    { 5.72, 38.0952 },
+    { 5.72, 28.5714 },
+    { 10.4819, 14.2857 },
+    { 20.0057, 4.7619 },
+    { 29.5295, 0 },
+    { 43.8152, 0 },
+    { 53.339, 4.7619 },
+    { 62.8629, 14.2857 },
+};
+
+static const StrokeRec char101[] = {
+   { 17, char101_stroke0 },
+};
+
+/* char: 102 'f' */
+
+static const CoordRec char102_stroke0[] = {
+    { 38.7752, 100 },
+    { 29.2514, 100 },
+    { 19.7276, 95.2381 },
+    { 14.9657, 80.9524 },
+    { 14.9657, 0 },
+};
+
+static const CoordRec char102_stroke1[] = {
+    { 0.68, 66.6667 },
+    { 34.0133, 66.6667 },
+};
+
+static const StrokeRec char102[] = {
+   { 5, char102_stroke0 },
+   { 2, char102_stroke1 },
+};
+
+/* char: 103 'g' */
+
+static const CoordRec char103_stroke0[] = {
+    { 62.5029, 66.6667 },
+    { 62.5029, -9.5238 },
+    { 57.741, -23.8095 },
+    { 52.979, -28.5714 },
+    { 43.4552, -33.3333 },
+    { 29.1695, -33.3333 },
+    { 19.6457, -28.5714 },
+};
+
+static const CoordRec char103_stroke1[] = {
+    { 62.5029, 52.381 },
+    { 52.979, 61.9048 },
+    { 43.4552, 66.6667 },
+    { 29.1695, 66.6667 },
+    { 19.6457, 61.9048 },
+    { 10.1219, 52.381 },
+    { 5.36, 38.0952 },
+    { 5.36, 28.5714 },
+    { 10.1219, 14.2857 },
+    { 19.6457, 4.7619 },
+    { 29.1695, 0 },
+    { 43.4552, 0 },
+    { 52.979, 4.7619 },
+    { 62.5029, 14.2857 },
+};
+
+static const StrokeRec char103[] = {
+   { 7, char103_stroke0 },
+   { 14, char103_stroke1 },
+};
+
+/* char: 104 'h' */
+
+static const CoordRec char104_stroke0[] = {
+    { 9.6, 100 },
+    { 9.6, 0 },
+};
+
+static const CoordRec char104_stroke1[] = {
+    { 9.6, 47.619 },
+    { 23.8857, 61.9048 },
+    { 33.4095, 66.6667 },
+    { 47.6952, 66.6667 },
+    { 57.219, 61.9048 },
+    { 61.981, 47.619 },
+    { 61.981, 0 },
+};
+
+static const StrokeRec char104[] = {
+   { 2, char104_stroke0 },
+   { 7, char104_stroke1 },
+};
+
+/* char: 105 'i' */
+
+static const CoordRec char105_stroke0[] = {
+    { 10.02, 100 },
+    { 14.7819, 95.2381 },
+    { 19.5438, 100 },
+    { 14.7819, 104.762 },
+    { 10.02, 100 },
+};
+
+static const CoordRec char105_stroke1[] = {
+    { 14.7819, 66.6667 },
+    { 14.7819, 0 },
+};
+
+static const StrokeRec char105[] = {
+   { 5, char105_stroke0 },
+   { 2, char105_stroke1 },
+};
+
+/* char: 106 'j' */
+
+static const CoordRec char106_stroke0[] = {
+    { 17.3876, 100 },
+    { 22.1495, 95.2381 },
+    { 26.9114, 100 },
+    { 22.1495, 104.762 },
+    { 17.3876, 100 },
+};
+
+static const CoordRec char106_stroke1[] = {
+    { 22.1495, 66.6667 },
+    { 22.1495, -14.2857 },
+    { 17.3876, -28.5714 },
+    { 7.8638, -33.3333 },
+    { -1.66, -33.3333 },
+};
+
+static const StrokeRec char106[] = {
+   { 5, char106_stroke0 },
+   { 5, char106_stroke1 },
+};
+
+/* char: 107 'k' */
+
+static const CoordRec char107_stroke0[] = {
+    { 9.6, 100 },
+    { 9.6, 0 },
+};
+
+static const CoordRec char107_stroke1[] = {
+    { 57.219, 66.6667 },
+    { 9.6, 19.0476 },
+};
+
+static const CoordRec char107_stroke2[] = {
+    { 28.6476, 38.0952 },
+    { 61.981, 0 },
+};
+
+static const StrokeRec char107[] = {
+   { 2, char107_stroke0 },
+   { 2, char107_stroke1 },
+   { 2, char107_stroke2 },
+};
+
+/* char: 108 'l' */
+
+static const CoordRec char108_stroke0[] = {
+    { 10.02, 100 },
+    { 10.02, 0 },
+};
+
+static const StrokeRec char108[] = {
+   { 2, char108_stroke0 },
+};
+
+/* char: 109 'm' */
+
+static const CoordRec char109_stroke0[] = {
+    { 9.6, 66.6667 },
+    { 9.6, 0 },
+};
+
+static const CoordRec char109_stroke1[] = {
+    { 9.6, 47.619 },
+    { 23.8857, 61.9048 },
+    { 33.4095, 66.6667 },
+    { 47.6952, 66.6667 },
+    { 57.219, 61.9048 },
+    { 61.981, 47.619 },
+    { 61.981, 0 },
+};
+
+static const CoordRec char109_stroke2[] = {
+    { 61.981, 47.619 },
+    { 76.2667, 61.9048 },
+    { 85.7905, 66.6667 },
+    { 100.076, 66.6667 },
+    { 109.6, 61.9048 },
+    { 114.362, 47.619 },
+    { 114.362, 0 },
+};
+
+static const StrokeRec char109[] = {
+   { 2, char109_stroke0 },
+   { 7, char109_stroke1 },
+   { 7, char109_stroke2 },
+};
+
+/* char: 110 'n' */
+
+static const CoordRec char110_stroke0[] = {
+    { 9.18, 66.6667 },
+    { 9.18, 0 },
+};
+
+static const CoordRec char110_stroke1[] = {
+    { 9.18, 47.619 },
+    { 23.4657, 61.9048 },
+    { 32.9895, 66.6667 },
+    { 47.2752, 66.6667 },
+    { 56.799, 61.9048 },
+    { 61.561, 47.619 },
+    { 61.561, 0 },
+};
+
+static const StrokeRec char110[] = {
+   { 2, char110_stroke0 },
+   { 7, char110_stroke1 },
+};
+
+/* char: 111 'o' */
+
+static const CoordRec char111_stroke0[] = {
+    { 28.7895, 66.6667 },
+    { 19.2657, 61.9048 },
+    { 9.7419, 52.381 },
+    { 4.98, 38.0952 },
+    { 4.98, 28.5714 },
+    { 9.7419, 14.2857 },
+    { 19.2657, 4.7619 },
+    { 28.7895, 0 },
+    { 43.0752, 0 },
+    { 52.599, 4.7619 },
+    { 62.1229, 14.2857 },
+    { 66.8848, 28.5714 },
+    { 66.8848, 38.0952 },
+    { 62.1229, 52.381 },
+    { 52.599, 61.9048 },
+    { 43.0752, 66.6667 },
+    { 28.7895, 66.6667 },
+};
+
+static const StrokeRec char111[] = {
+   { 17, char111_stroke0 },
+};
+
+/* char: 112 'p' */
+
+static const CoordRec char112_stroke0[] = {
+    { 9.46, 66.6667 },
+    { 9.46, -33.3333 },
+};
+
+static const CoordRec char112_stroke1[] = {
+    { 9.46, 52.381 },
+    { 18.9838, 61.9048 },
+    { 28.5076, 66.6667 },
+    { 42.7933, 66.6667 },
+    { 52.3171, 61.9048 },
+    { 61.841, 52.381 },
+    { 66.6029, 38.0952 },
+    { 66.6029, 28.5714 },
+    { 61.841, 14.2857 },
+    { 52.3171, 4.7619 },
+    { 42.7933, 0 },
+    { 28.5076, 0 },
+    { 18.9838, 4.7619 },
+    { 9.46, 14.2857 },
+};
+
+static const StrokeRec char112[] = {
+   { 2, char112_stroke0 },
+   { 14, char112_stroke1 },
+};
+
+/* char: 113 'q' */
+
+static const CoordRec char113_stroke0[] = {
+    { 61.9829, 66.6667 },
+    { 61.9829, -33.3333 },
+};
+
+static const CoordRec char113_stroke1[] = {
+    { 61.9829, 52.381 },
+    { 52.459, 61.9048 },
+    { 42.9352, 66.6667 },
+    { 28.6495, 66.6667 },
+    { 19.1257, 61.9048 },
+    { 9.6019, 52.381 },
+    { 4.84, 38.0952 },
+    { 4.84, 28.5714 },
+    { 9.6019, 14.2857 },
+    { 19.1257, 4.7619 },
+    { 28.6495, 0 },
+    { 42.9352, 0 },
+    { 52.459, 4.7619 },
+    { 61.9829, 14.2857 },
+};
+
+static const StrokeRec char113[] = {
+   { 2, char113_stroke0 },
+   { 14, char113_stroke1 },
+};
+
+/* char: 114 'r' */
+
+static const CoordRec char114_stroke0[] = {
+    { 9.46, 66.6667 },
+    { 9.46, 0 },
+};
+
+static const CoordRec char114_stroke1[] = {
+    { 9.46, 38.0952 },
+    { 14.2219, 52.381 },
+    { 23.7457, 61.9048 },
+    { 33.2695, 66.6667 },
+    { 47.5552, 66.6667 },
+};
+
+static const StrokeRec char114[] = {
+   { 2, char114_stroke0 },
+   { 5, char114_stroke1 },
+};
+
+/* char: 115 's' */
+
+static const CoordRec char115_stroke0[] = {
+    { 57.081, 52.381 },
+    { 52.319, 61.9048 },
+    { 38.0333, 66.6667 },
+    { 23.7476, 66.6667 },
+    { 9.4619, 61.9048 },
+    { 4.7, 52.381 },
+    { 9.4619, 42.8571 },
+    { 18.9857, 38.0952 },
+    { 42.7952, 33.3333 },
+    { 52.319, 28.5714 },
+    { 57.081, 19.0476 },
+    { 57.081, 14.2857 },
+    { 52.319, 4.7619 },
+    { 38.0333, 0 },
+    { 23.7476, 0 },
+    { 9.4619, 4.7619 },
+    { 4.7, 14.2857 },
+};
+
+static const StrokeRec char115[] = {
+   { 17, char115_stroke0 },
+};
+
+/* char: 116 't' */
+
+static const CoordRec char116_stroke0[] = {
+    { 14.8257, 100 },
+    { 14.8257, 19.0476 },
+    { 19.5876, 4.7619 },
+    { 29.1114, 0 },
+    { 38.6352, 0 },
+};
+
+static const CoordRec char116_stroke1[] = {
+    { 0.54, 66.6667 },
+    { 33.8733, 66.6667 },
+};
+
+static const StrokeRec char116[] = {
+   { 5, char116_stroke0 },
+   { 2, char116_stroke1 },
+};
+
+/* char: 117 'u' */
+
+static const CoordRec char117_stroke0[] = {
+    { 9.46, 66.6667 },
+    { 9.46, 19.0476 },
+    { 14.2219, 4.7619 },
+    { 23.7457, 0 },
+    { 38.0314, 0 },
+    { 47.5552, 4.7619 },
+    { 61.841, 19.0476 },
+};
+
+static const CoordRec char117_stroke1[] = {
+    { 61.841, 66.6667 },
+    { 61.841, 0 },
+};
+
+static const StrokeRec char117[] = {
+   { 7, char117_stroke0 },
+   { 2, char117_stroke1 },
+};
+
+/* char: 118 'v' */
+
+static const CoordRec char118_stroke0[] = {
+    { 1.8, 66.6667 },
+    { 30.3714, 0 },
+};
+
+static const CoordRec char118_stroke1[] = {
+    { 58.9429, 66.6667 },
+    { 30.3714, 0 },
+};
+
+static const StrokeRec char118[] = {
+   { 2, char118_stroke0 },
+   { 2, char118_stroke1 },
+};
+
+/* char: 119 'w' */
+
+static const CoordRec char119_stroke0[] = {
+    { 2.5, 66.6667 },
+    { 21.5476, 0 },
+};
+
+static const CoordRec char119_stroke1[] = {
+    { 40.5952, 66.6667 },
+    { 21.5476, 0 },
+};
+
+static const CoordRec char119_stroke2[] = {
+    { 40.5952, 66.6667 },
+    { 59.6429, 0 },
+};
+
+static const CoordRec char119_stroke3[] = {
+    { 78.6905, 66.6667 },
+    { 59.6429, 0 },
+};
+
+static const StrokeRec char119[] = {
+   { 2, char119_stroke0 },
+   { 2, char119_stroke1 },
+   { 2, char119_stroke2 },
+   { 2, char119_stroke3 },
+};
+
+/* char: 120 'x' */
+
+static const CoordRec char120_stroke0[] = {
+    { 1.66, 66.6667 },
+    { 54.041, 0 },
+};
+
+static const CoordRec char120_stroke1[] = {
+    { 54.041, 66.6667 },
+    { 1.66, 0 },
+};
+
+static const StrokeRec char120[] = {
+   { 2, char120_stroke0 },
+   { 2, char120_stroke1 },
+};
+
+/* char: 121 'y' */
+
+static const CoordRec char121_stroke0[] = {
+    { 6.5619, 66.6667 },
+    { 35.1333, 0 },
+};
+
+static const CoordRec char121_stroke1[] = {
+    { 63.7048, 66.6667 },
+    { 35.1333, 0 },
+    { 25.6095, -19.0476 },
+    { 16.0857, -28.5714 },
+    { 6.5619, -33.3333 },
+    { 1.8, -33.3333 },
+};
+
+static const StrokeRec char121[] = {
+   { 2, char121_stroke0 },
+   { 6, char121_stroke1 },
+};
+
+/* char: 122 'z' */
+
+static const CoordRec char122_stroke0[] = {
+    { 56.821, 66.6667 },
+    { 4.44, 0 },
+};
+
+static const CoordRec char122_stroke1[] = {
+    { 4.44, 66.6667 },
+    { 56.821, 66.6667 },
+};
+
+static const CoordRec char122_stroke2[] = {
+    { 4.44, 0 },
+    { 56.821, 0 },
+};
+
+static const StrokeRec char122[] = {
+   { 2, char122_stroke0 },
+   { 2, char122_stroke1 },
+   { 2, char122_stroke2 },
+};
+
+/* char: 123 '{' */
+
+static const CoordRec char123_stroke0[] = {
+    { 31.1895, 119.048 },
+    { 21.6657, 114.286 },
+    { 16.9038, 109.524 },
+    { 12.1419, 100 },
+    { 12.1419, 90.4762 },
+    { 16.9038, 80.9524 },
+    { 21.6657, 76.1905 },
+    { 26.4276, 66.6667 },
+    { 26.4276, 57.1429 },
+    { 16.9038, 47.619 },
+};
+
+static const CoordRec char123_stroke1[] = {
+    { 21.6657, 114.286 },
+    { 16.9038, 104.762 },
+    { 16.9038, 95.2381 },
+    { 21.6657, 85.7143 },
+    { 26.4276, 80.9524 },
+    { 31.1895, 71.4286 },
+    { 31.1895, 61.9048 },
+    { 26.4276, 52.381 },
+    { 7.38, 42.8571 },
+    { 26.4276, 33.3333 },
+    { 31.1895, 23.8095 },
+    { 31.1895, 14.2857 },
+    { 26.4276, 4.7619 },
+    { 21.6657, 0 },
+    { 16.9038, -9.5238 },
+    { 16.9038, -19.0476 },
+    { 21.6657, -28.5714 },
+};
+
+static const CoordRec char123_stroke2[] = {
+    { 16.9038, 38.0952 },
+    { 26.4276, 28.5714 },
+    { 26.4276, 19.0476 },
+    { 21.6657, 9.5238 },
+    { 16.9038, 4.7619 },
+    { 12.1419, -4.7619 },
+    { 12.1419, -14.2857 },
+    { 16.9038, -23.8095 },
+    { 21.6657, -28.5714 },
+    { 31.1895, -33.3333 },
+};
+
+static const StrokeRec char123[] = {
+   { 10, char123_stroke0 },
+   { 17, char123_stroke1 },
+   { 10, char123_stroke2 },
+};
+
+/* char: 124 '|' */
+
+static const CoordRec char124_stroke0[] = {
+    { 11.54, 119.048 },
+    { 11.54, -33.3333 },
+};
+
+static const StrokeRec char124[] = {
+   { 2, char124_stroke0 },
+};
+
+/* char: 125 '}' */
+
+static const CoordRec char125_stroke0[] = {
+    { 9.18, 119.048 },
+    { 18.7038, 114.286 },
+    { 23.4657, 109.524 },
+    { 28.2276, 100 },
+    { 28.2276, 90.4762 },
+    { 23.4657, 80.9524 },
+    { 18.7038, 76.1905 },
+    { 13.9419, 66.6667 },
+    { 13.9419, 57.1429 },
+    { 23.4657, 47.619 },
+};
+
+static const CoordRec char125_stroke1[] = {
+    { 18.7038, 114.286 },
+    { 23.4657, 104.762 },
+    { 23.4657, 95.2381 },
+    { 18.7038, 85.7143 },
+    { 13.9419, 80.9524 },
+    { 9.18, 71.4286 },
+    { 9.18, 61.9048 },
+    { 13.9419, 52.381 },
+    { 32.9895, 42.8571 },
+    { 13.9419, 33.3333 },
+    { 9.18, 23.8095 },
+    { 9.18, 14.2857 },
+    { 13.9419, 4.7619 },
+    { 18.7038, 0 },
+    { 23.4657, -9.5238 },
+    { 23.4657, -19.0476 },
+    { 18.7038, -28.5714 },
+};
+
+static const CoordRec char125_stroke2[] = {
+    { 23.4657, 38.0952 },
+    { 13.9419, 28.5714 },
+    { 13.9419, 19.0476 },
+    { 18.7038, 9.5238 },
+    { 23.4657, 4.7619 },
+    { 28.2276, -4.7619 },
+    { 28.2276, -14.2857 },
+    { 23.4657, -23.8095 },
+    { 18.7038, -28.5714 },
+    { 9.18, -33.3333 },
+};
+
+static const StrokeRec char125[] = {
+   { 10, char125_stroke0 },
+   { 17, char125_stroke1 },
+   { 10, char125_stroke2 },
+};
+
+/* char: 126 '~' */
+
+static const CoordRec char126_stroke0[] = {
+    { 2.92, 28.5714 },
+    { 2.92, 38.0952 },
+    { 7.6819, 52.381 },
+    { 17.2057, 57.1429 },
+    { 26.7295, 57.1429 },
+    { 36.2533, 52.381 },
+    { 55.301, 38.0952 },
+    { 64.8248, 33.3333 },
+    { 74.3486, 33.3333 },
+    { 83.8724, 38.0952 },
+    { 88.6343, 47.619 },
+};
+
+static const CoordRec char126_stroke1[] = {
+    { 2.92, 38.0952 },
+    { 7.6819, 47.619 },
+    { 17.2057, 52.381 },
+    { 26.7295, 52.381 },
+    { 36.2533, 47.619 },
+    { 55.301, 33.3333 },
+    { 64.8248, 28.5714 },
+    { 74.3486, 28.5714 },
+    { 83.8724, 33.3333 },
+    { 88.6343, 47.619 },
+    { 88.6343, 57.1429 },
+};
+
+static const StrokeRec char126[] = {
+   { 11, char126_stroke0 },
+   { 11, char126_stroke1 },
+};
+
+/* char: 127 */
+
+static const CoordRec char127_stroke0[] = {
+    { 52.381, 100 },
+    { 14.2857, -33.3333 },
+};
+
+static const CoordRec char127_stroke1[] = {
+    { 28.5714, 66.6667 },
+    { 14.2857, 61.9048 },
+    { 4.7619, 52.381 },
+    { 0, 38.0952 },
+    { 0, 23.8095 },
+    { 4.7619, 14.2857 },
+    { 14.2857, 4.7619 },
+    { 28.5714, 0 },
+    { 38.0952, 0 },
+    { 52.381, 4.7619 },
+    { 61.9048, 14.2857 },
+    { 66.6667, 28.5714 },
+    { 66.6667, 42.8571 },
+    { 61.9048, 52.381 },
+    { 52.381, 61.9048 },
+    { 38.0952, 66.6667 },
+    { 28.5714, 66.6667 },
+};
+
+static const StrokeRec char127[] = {
+   { 2, char127_stroke0 },
+   { 17, char127_stroke1 },
+};
+
+static const StrokeCharRec chars[] = {
+    { 0, /* char0 */ 0, 0, 0 },
+    { 0, /* char1 */ 0, 0, 0 },
+    { 0, /* char2 */ 0, 0, 0 },
+    { 0, /* char3 */ 0, 0, 0 },
+    { 0, /* char4 */ 0, 0, 0 },
+    { 0, /* char5 */ 0, 0, 0 },
+    { 0, /* char6 */ 0, 0, 0 },
+    { 0, /* char7 */ 0, 0, 0 },
+    { 0, /* char8 */ 0, 0, 0 },
+    { 0, /* char9 */ 0, 0, 0 },
+    { 0, /* char10 */ 0, 0, 0 },
+    { 0, /* char11 */ 0, 0, 0 },
+    { 0, /* char12 */ 0, 0, 0 },
+    { 0, /* char13 */ 0, 0, 0 },
+    { 0, /* char14 */ 0, 0, 0 },
+    { 0, /* char15 */ 0, 0, 0 },
+    { 0, /* char16 */ 0, 0, 0 },
+    { 0, /* char17 */ 0, 0, 0 },
+    { 0, /* char18 */ 0, 0, 0 },
+    { 0, /* char19 */ 0, 0, 0 },
+    { 0, /* char20 */ 0, 0, 0 },
+    { 0, /* char21 */ 0, 0, 0 },
+    { 0, /* char22 */ 0, 0, 0 },
+    { 0, /* char23 */ 0, 0, 0 },
+    { 0, /* char24 */ 0, 0, 0 },
+    { 0, /* char25 */ 0, 0, 0 },
+    { 0, /* char26 */ 0, 0, 0 },
+    { 0, /* char27 */ 0, 0, 0 },
+    { 0, /* char28 */ 0, 0, 0 },
+    { 0, /* char29 */ 0, 0, 0 },
+    { 0, /* char30 */ 0, 0, 0 },
+    { 0, /* char31 */ 0, 0, 0 },
+    { 0, /* char32 */ 0, 52.381, 104.762 },
+    { 2, char33, 13.3819, 26.6238 },
+    { 2, char34, 23.0676, 51.4352 },
+    { 4, char35, 36.5333, 79.4886 },
+    { 3, char36, 38.1533, 76.2067 },
+    { 3, char37, 49.2171, 96.5743 },
+    { 1, char38, 53.599, 101.758 },
+    { 1, char39, 4.44, 13.62 },
+    { 1, char40, 21.8657, 47.1733 },
+    { 1, char41, 24.3276, 47.5333 },
+    { 3, char42, 30.7695, 59.439 },
+    { 2, char43, 48.8371, 97.2543 },
+    { 1, char44, 13.5219, 26.0638 },
+    { 1, char45, 50.2371, 100.754 },
+    { 1, char46, 13.1019, 26.4838 },
+    { 1, char47, 40.5733, 82.1067 },
+    { 1, char48, 38.3133, 77.0667 },
+    { 1, char49, 30.8676, 66.5295 },
+    { 1, char50, 38.7533, 77.6467 },
+    { 1, char51, 38.3333, 77.0467 },
+    { 2, char52, 37.2133, 80.1686 },
+    { 1, char53, 38.1933, 77.6867 },
+    { 1, char54, 34.1514, 73.8048 },
+    { 2, char55, 38.8933, 77.2267 },
+    { 1, char56, 38.9333, 77.6667 },
+    { 1, char57, 39.9333, 74.0648 },
+    { 2, char58, 14.0819, 26.2238 },
+    { 2, char59, 12.9619, 26.3038 },
+    { 1, char60, 41.1552, 81.6105 },
+    { 2, char61, 48.5571, 97.2543 },
+    { 1, char62, 40.8752, 81.6105 },
+    { 2, char63, 36.9914, 73.9029 },
+    { 2, char64, 34.9314, 74.3648 },
+    { 3, char65, 40.5952, 80.4905 },
+    { 3, char66, 44.7533, 83.6267 },
+    { 1, char67, 39.9933, 84.4886 },
+    { 2, char68, 45.2933, 85.2867 },
+    { 4, char69, 39.9914, 78.1848 },
+    { 3, char70, 39.9914, 78.7448 },
+    { 2, char71, 40.3933, 89.7686 },
+    { 3, char72, 44.7533, 89.0867 },
+    { 1, char73, 10.86, 21.3 },
+    { 1, char74, 31.0714, 59.999 },
+    { 3, char75, 44.6133, 79.3267 },
+    { 2, char76, 40.2514, 71.3229 },
+    { 4, char77, 48.9552, 97.2105 },
+    { 3, char78, 44.4733, 88.8067 },
+    { 1, char79, 44.3352, 88.8305 },
+    { 2, char80, 45.4333, 85.6667 },
+    { 2, char81, 43.3952, 88.0905 },
+    { 3, char82, 45.0133, 82.3667 },
+    { 1, char83, 41.3333, 80.8267 },
+    { 2, char84, 35.6933, 71.9467 },
+    { 1, char85, 44.8733, 89.4867 },
+    { 2, char86, 40.4552, 81.6105 },
+    { 4, char87, 49.839, 100.518 },
+    { 2, char88, 35.8333, 72.3667 },
+    { 2, char89, 39.6152, 79.6505 },
+    { 3, char90, 35.8333, 73.7467 },
+    { 4, char91, 22.0657, 46.1133 },
+    { 1, char92, 39.1733, 78.2067 },
+    { 4, char93, 23.4876, 46.3933 },
+    { 2, char94, 44.0752, 90.2305 },
+    { 1, char95, 51.281, 104.062 },
+    { 2, char96, 42.5457, 83.5714 },
+    { 2, char97, 35.2514, 66.6029 },
+    { 2, char98, 37.3314, 70.4629 },
+    { 1, char99, 34.0914, 68.9229 },
+    { 2, char100, 33.2114, 70.2629 },
+    { 1, char101, 34.2914, 68.5229 },
+    { 2, char102, 14.9657, 38.6552 },
+    { 2, char103, 33.9314, 70.9829 },
+    { 2, char104, 33.4095, 71.021 },
+    { 2, char105, 14.7819, 28.8638 },
+    { 2, char106, 17.3876, 36.2314 },
+    { 3, char107, 33.4095, 62.521 },
+    { 1, char108, 10.02, 19.34 },
+    { 3, char109, 61.981, 123.962 },
+    { 2, char110, 32.9895, 70.881 },
+    { 1, char111, 33.5514, 71.7448 },
+    { 2, char112, 38.0314, 70.8029 },
+    { 2, char113, 33.4114, 70.7429 },
+    { 2, char114, 23.7457, 49.4952 },
+    { 1, char115, 28.5095, 62.321 },
+    { 2, char116, 14.8257, 39.3152 },
+    { 2, char117, 33.2695, 71.161 },
+    { 2, char118, 30.3714, 60.6029 },
+    { 4, char119, 40.5952, 80.4905 },
+    { 2, char120, 25.4695, 56.401 },
+    { 2, char121, 35.1333, 66.0648 },
+    { 3, char122, 28.2495, 61.821 },
+    { 3, char123, 21.6657, 41.6295 },
+    { 1, char124, 11.54, 23.78 },
+    { 3, char125, 18.7038, 41.4695 },
+    { 2, char126, 45.7771, 91.2743 },
+    { 2, char127, 33.3333, 66.6667 },
+};
+
+StrokeFontRec glutStrokeRoman = { "Roman", 128, chars, 119.048, -33.3333 };
+
diff --git a/samples/glut/glut_stroke.c b/samples/glut/glut_stroke.c
new file mode 100644
index 0000000..2fe408b
--- /dev/null
+++ b/samples/glut/glut_stroke.c
@@ -0,0 +1,42 @@
+
+/* Copyright (c) Mark J. Kilgard, 1994. */
+
+/* This program is freely distributable without licensing fees
+   and is provided without guarantee or warrantee expressed or
+   implied. This program is -not- in the public domain. */
+
+#include "glutint.h"
+#include "glutstroke.h"
+
+void APIENTRY 
+glutStrokeCharacter(GLUTstrokeFont font, int c)
+{
+  const StrokeCharRec *ch;
+  const StrokeRec *stroke;
+  const CoordRec *coord;
+  StrokeFontPtr fontinfo;
+  int i, j;
+
+
+#if defined(_WIN32)
+  fontinfo = (StrokeFontPtr) __glutFont(font);
+#else
+  fontinfo = (StrokeFontPtr) font;
+#endif
+
+  if (c < 0 || c >= fontinfo->num_chars)
+    return;
+  ch = &(fontinfo->ch[c]);
+  if (ch) {
+    for (i = ch->num_strokes, stroke = ch->stroke;
+      i > 0; i--, stroke++) {
+      glBegin(GL_LINE_STRIP);
+      for (j = stroke->num_coords, coord = stroke->coord;
+        j > 0; j--, coord++) {
+        glVertex2f(coord->x, coord->y);
+      }
+      glEnd();
+    }
+    glTranslatef(ch->right, 0.0, 0.0);
+  }
+}
diff --git a/samples/glut/glut_swidth.c b/samples/glut/glut_swidth.c
new file mode 100644
index 0000000..e1b7374
--- /dev/null
+++ b/samples/glut/glut_swidth.c
@@ -0,0 +1,58 @@
+
+/* Copyright (c) Mark J. Kilgard, 1995. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#include "glutint.h"
+#include "glutstroke.h"
+
+/* CENTRY */
+int APIENTRY 
+glutStrokeWidth(GLUTstrokeFont font, int c)
+{
+  StrokeFontPtr fontinfo;
+  const StrokeCharRec *ch;
+
+#if defined(_WIN32)
+  fontinfo = (StrokeFontPtr) __glutFont(font);
+#else
+  fontinfo = (StrokeFontPtr) font;
+#endif
+
+  if (c < 0 || c >= fontinfo->num_chars)
+    return 0;
+  ch = &(fontinfo->ch[c]);
+  if (ch)
+    return ch->right;
+  else
+    return 0;
+}
+
+int APIENTRY 
+glutStrokeLength(GLUTstrokeFont font, const unsigned char *string)
+{
+  int c, length;
+  StrokeFontPtr fontinfo;
+  const StrokeCharRec *ch;
+
+#if defined(_WIN32)
+  fontinfo = (StrokeFontPtr) __glutFont(font);
+#else
+  fontinfo = (StrokeFontPtr) font;
+#endif
+
+  length = 0;
+  for (; *string != '\0'; string++) {
+    c = *string;
+    if (c >= 0 && c < fontinfo->num_chars) {
+      ch = &(fontinfo->ch[c]);
+      if (ch)
+        length += ch->right;
+    }
+  }
+  return length;
+}
+
+/* ENDCENTRY */
diff --git a/samples/glut/glutbitmap.h b/samples/glut/glutbitmap.h
new file mode 100644
index 0000000..e29a016
--- /dev/null
+++ b/samples/glut/glutbitmap.h
@@ -0,0 +1,30 @@
+#ifndef __glutbitmap_h__
+#define __glutbitmap_h__
+
+/* Copyright (c) Mark J. Kilgard, 1994. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#include "glut.h"
+
+typedef struct {
+  const GLsizei width;
+  const GLsizei height;
+  const GLfloat xorig;
+  const GLfloat yorig;
+  const GLfloat advance;
+  const GLubyte *bitmap;
+} BitmapCharRec, *BitmapCharPtr;
+
+typedef struct {
+  const char *name;
+  const int num_chars;
+  const int first;
+  const BitmapCharRec * const *ch;
+} BitmapFontRec, *BitmapFontPtr;
+
+typedef void *GLUTbitmapFont;
+
+#endif /* __glutbitmap_h__ */
diff --git a/samples/glut/glutint.h b/samples/glut/glutint.h
new file mode 100644
index 0000000..1afa6dd
--- /dev/null
+++ b/samples/glut/glutint.h
@@ -0,0 +1,24 @@
+#ifndef __glutint_h__
+#define __glutint_h__
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#if defined(_WIN32)
+#include "glutwin32.h"
+#else
+#ifdef __sgi
+#define SUPPORT_FORTRAN
+#endif
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <GL/glx.h>
+#endif
+
+#include "glut.h"
+
+
+#endif /* __glutint_h__ */
diff --git a/samples/glut/glutstroke.h b/samples/glut/glutstroke.h
new file mode 100644
index 0000000..40607d0
--- /dev/null
+++ b/samples/glut/glutstroke.h
@@ -0,0 +1,42 @@
+#ifndef __glutstroke_h__
+#define __glutstroke_h__
+
+/* Copyright (c) Mark J. Kilgard, 1994. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#if defined(_WIN32) && !defined(__MINGW32__)
+#pragma warning (disable:4244)  /* disable bogus conversion warnings */
+#pragma warning (disable:4305)  /* VC++ 5.0 version of above warning. */
+#endif
+
+typedef struct {
+  float x;
+  float y;
+} CoordRec, *CoordPtr;
+
+typedef struct {
+  int num_coords;
+  const CoordRec *coord;
+} StrokeRec, *StrokePtr;
+
+typedef struct {
+  int num_strokes;
+  const StrokeRec *stroke;
+  float center;
+  float right;
+} StrokeCharRec, *StrokeCharPtr;
+
+typedef struct {
+  const char *name;
+  int num_chars;
+  const StrokeCharRec *ch;
+  float top;
+  float bottom;
+} StrokeFontRec, *StrokeFontPtr;
+
+typedef void *GLUTstrokeFont;
+
+#endif /* __glutstroke_h__ */
diff --git a/samples/glut/glutwin32.h b/samples/glut/glutwin32.h
new file mode 100644
index 0000000..3d60c21
--- /dev/null
+++ b/samples/glut/glutwin32.h
@@ -0,0 +1,18 @@
+#ifndef __glutwin32_h__
+#define __glutwin32_h__
+
+/* Copyright (c) Nate Robins, 1997. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#include "win32_x11.h"
+#include "win32_glx.h"
+
+/* Private routines from win32_util.c */
+extern void *__glutFont(void *font);
+extern int __glutGetTransparentPixel(Display *dpy, XVisualInfo *vinfo);
+extern void __glutAdjustCoords(Window parent, int *x, int *y, int *width, int *height);
+
+#endif /* __glutwin32_h__ */
diff --git a/samples/glut/stroke.h b/samples/glut/stroke.h
new file mode 100644
index 0000000..fc29680
--- /dev/null
+++ b/samples/glut/stroke.h
@@ -0,0 +1,134 @@
+/* $XConsortium: wfont.h,v 5.1 91/02/16 09:46:37 rws Exp $ */
+
+/*****************************************************************
+Copyright (c) 1989,1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the names of Sun Microsystems,
+the X Consortium, and MIT not be used in advertising or publicity 
+pertaining to distribution of the software without specific, written 
+prior permission.  
+
+SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT 
+SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef WFONT_INCLUDED
+#define WFONT_INCLUDED
+
+#define WFONT_MAGIC	0x813
+#define WFONT_MAGIC_PLUS 0x715
+#define WFONT_MAGIC_PEX 0x70686e74
+#define START_PROPS 0x100
+#define START_DISPATCH(_num_props)  (START_PROPS + 160 * _num_props)
+#define START_PATH(_num_ch_, _num_props)  (START_DISPATCH(_num_props) + sizeof(Dispatch) * _num_ch_)
+#define NUM_DISPATCH	128
+
+typedef struct {
+  unsigned short x;
+  unsigned short y;
+} Path_point2dpx;
+
+typedef struct {
+  float x;
+  float y;
+} Path_point2df;
+
+typedef struct {
+  int x;
+  int y;
+  int z;
+} Path_point3di;
+
+typedef struct {
+  float x;
+  float y;
+  float z;
+} Path_point3df;
+
+typedef struct {
+  float x;
+  float y;
+  float z;
+  float w;
+} Path_point4df;
+
+typedef union {
+  Path_point2dpx *pt2dpx;
+  Path_point2df *pt2df;
+  Path_point3di *pt3di;
+  Path_point3df *pt3df;
+  Path_point4df *pt4df;
+} Path_pt_ptr;
+
+typedef enum {
+  PATH_2DF,
+  PATH_2DPX,
+  PATH_3DF,
+  PATH_3DI,
+  PATH_4DF
+} Path_type;
+
+typedef struct {
+  int n_pts;                    /* number of points in the subpath */
+  Path_pt_ptr pts;              /* pointer to them */
+  int closed;                   /* true if the subpath is closed */
+  int dcmp_flag;                /* flag for pgon dcmp, pgon type 
+                                 * and dcmped triangle type */
+} Path_subpath;
+
+typedef struct {
+  Path_type type;               /* type of vertices in this path */
+  int n_subpaths;               /* number of subpaths */
+  int n_vertices;               /* total number of vertices */
+  Path_subpath *subpaths;       /* array of subpaths */
+} Path;
+
+typedef Path *Path_handle;
+
+typedef struct {
+  char propname[80];            /* font property name */
+  char propvalue[80];           /* font property value */
+} Property;
+
+typedef struct {
+  int magic;                    /* magic number */
+  char name[80];                /* name of this font */
+  float top,                    /* extreme values */
+    bottom, max_width;
+  int num_ch;                   /* no. of fonts in the set */
+  int num_props;                /* no. of font properties */
+  Property *properties;         /* array of properties */
+} Font_header;
+
+typedef struct {
+  float center,                 /* center of the character */
+    right;                      /* right edge */
+  long offset;                  /* offset in the file of the character
+                                 * * description */
+} Dispatch;
+
+typedef struct {
+  float center, right;
+  Path strokes;
+} Ch_font;
+
+typedef struct {
+  char name[80];
+  float top, bottom, max_width;
+  int num_ch;                   /* # characters in the font */
+  Ch_font **ch_data;
+} Phg_font;
+
+#endif /*WFONT_INCLUDED */
diff --git a/samples/glut/win32_glx.c b/samples/glut/win32_glx.c
new file mode 100644
index 0000000..cc813a1
--- /dev/null
+++ b/samples/glut/win32_glx.c
@@ -0,0 +1,255 @@
+
+/* Copyright (c) Nate Robins, 1997. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#include <stdio.h>
+#include "win32_glx.h"
+
+/* global current HDC */
+extern HDC XHDC;
+
+GLXContext
+glXCreateContext(Display * display, XVisualInfo * visinfo,
+  GLXContext share, Bool direct)
+{
+  /* KLUDGE: GLX really expects a display pointer to be passed
+     in as the first parameter, but Win32 needs an HDC instead,
+     so BE SURE that the global XHDC is set before calling this
+     routine. */
+  HGLRC context;
+
+  context = wglCreateContext(XHDC);
+
+#if 0
+  /* XXX GLUT doesn't support it now, so don't worry about display list
+     and texture object sharing. */
+  if (share) {
+    wglShareLists(share, context);
+  }
+#endif
+
+  /* Since direct rendering is implicit, the direct flag is
+     ignored. */
+
+  return context;
+}
+
+int
+glXGetConfig(Display * display, XVisualInfo * visual, int attrib, int *value)
+{
+  if (!visual)
+    return GLX_BAD_VISUAL;
+
+  switch (attrib) {
+  case GLX_USE_GL:
+    if (visual->dwFlags & (PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW)) {
+      /* XXX Brad's Matrix Millenium II has problems creating
+         color index windows in 24-bit mode (lead to GDI crash)
+         and 32-bit mode (lead to black window).  The cColorBits
+         filed of the PIXELFORMATDESCRIPTOR returned claims to
+         have 24 and 32 bits respectively of color indices. 2^24
+         and 2^32 are ridiculously huge writable colormaps.
+         Assume that if we get back a color index
+         PIXELFORMATDESCRIPTOR with 24 or more bits, the
+         PIXELFORMATDESCRIPTOR doesn't really work and skip it.
+         -mjk */
+      if (visual->iPixelType == PFD_TYPE_COLORINDEX
+        && visual->cColorBits >= 24) {
+        *value = 0;
+      } else {
+	*value = 1;
+      }
+    } else {
+      *value = 0;
+    }
+    break;
+  case GLX_BUFFER_SIZE:
+    /* KLUDGE: if we're RGBA, return the number of bits/pixel,
+       otherwise, return 8 (we guessed at 256 colors in CI
+       mode). */
+    if (visual->iPixelType == PFD_TYPE_RGBA)
+      *value = visual->cColorBits;
+    else
+      *value = 8;
+    break;
+  case GLX_LEVEL:
+    /* The bReserved flag of the pfd contains the
+       overlay/underlay info. */
+    *value = visual->bReserved;
+    break;
+  case GLX_RGBA:
+    *value = visual->iPixelType == PFD_TYPE_RGBA;
+    break;
+  case GLX_DOUBLEBUFFER:
+    *value = visual->dwFlags & PFD_DOUBLEBUFFER;
+    break;
+  case GLX_STEREO:
+    *value = visual->dwFlags & PFD_STEREO;
+    break;
+  case GLX_AUX_BUFFERS:
+    *value = visual->cAuxBuffers;
+    break;
+  case GLX_RED_SIZE:
+    *value = visual->cRedBits;
+    break;
+  case GLX_GREEN_SIZE:
+    *value = visual->cGreenBits;
+    break;
+  case GLX_BLUE_SIZE:
+    *value = visual->cBlueBits;
+    break;
+  case GLX_ALPHA_SIZE:
+    *value = visual->cAlphaBits;
+    break;
+  case GLX_DEPTH_SIZE:
+    *value = visual->cDepthBits;
+    break;
+  case GLX_STENCIL_SIZE:
+    *value = visual->cStencilBits;
+    break;
+  case GLX_ACCUM_RED_SIZE:
+    *value = visual->cAccumRedBits;
+    break;
+  case GLX_ACCUM_GREEN_SIZE:
+    *value = visual->cAccumGreenBits;
+    break;
+  case GLX_ACCUM_BLUE_SIZE:
+    *value = visual->cAccumBlueBits;
+    break;
+  case GLX_ACCUM_ALPHA_SIZE:
+    *value = visual->cAccumAlphaBits;
+    break;
+  default:
+    return GLX_BAD_ATTRIB;
+  }
+  return 0;
+}
+
+XVisualInfo *
+glXChooseVisual(Display * display, int screen, int *attribList)
+{
+  /* KLUDGE: since we need the HDC, MAKE SURE to set XHDC
+     before calling this routine. */
+
+  int *p = attribList;
+  int pf;
+  PIXELFORMATDESCRIPTOR pfd;
+  PIXELFORMATDESCRIPTOR *match = NULL;
+  int stereo = 0;
+
+  /* Avoid seg-faults. */
+  if (!p)
+    return NULL;
+
+  memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
+  pfd.nSize = (sizeof(PIXELFORMATDESCRIPTOR));
+  pfd.nVersion = 1;
+
+  /* Defaults. */
+  pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW;
+  pfd.iPixelType = PFD_TYPE_COLORINDEX;
+  pfd.cColorBits = 32;
+  pfd.cDepthBits = 0;
+
+  while (*p) {
+    switch (*p) {
+    case GLX_USE_GL:
+      pfd.dwFlags |= PFD_SUPPORT_OPENGL;
+      break;
+    case GLX_BUFFER_SIZE:
+      pfd.cColorBits = *(++p);
+      break;
+    case GLX_LEVEL:
+      /* the bReserved flag of the pfd contains the
+         overlay/underlay info. */
+      pfd.bReserved = *(++p);
+      break;
+    case GLX_RGBA:
+      pfd.iPixelType = PFD_TYPE_RGBA;
+      break;
+    case GLX_DOUBLEBUFFER:
+      pfd.dwFlags |= PFD_DOUBLEBUFFER;
+      break;
+    case GLX_STEREO:
+      stereo = 1;
+      pfd.dwFlags |= PFD_STEREO;
+      break;
+    case GLX_AUX_BUFFERS:
+      pfd.cAuxBuffers = *(++p);
+      break;
+    case GLX_RED_SIZE:
+      pfd.cRedBits = 8; /* Try to get the maximum. */
+      ++p;
+      break;
+    case GLX_GREEN_SIZE:
+      pfd.cGreenBits = 8;
+      ++p;
+      break;
+    case GLX_BLUE_SIZE:
+      pfd.cBlueBits = 8;
+      ++p;
+      break;
+    case GLX_ALPHA_SIZE:
+      pfd.cAlphaBits = 8;
+      ++p;
+      break;
+    case GLX_DEPTH_SIZE:
+      pfd.cDepthBits = 32;
+      ++p;
+      break;
+    case GLX_STENCIL_SIZE:
+      pfd.cStencilBits = *(++p);
+      break;
+    case GLX_ACCUM_RED_SIZE:
+    case GLX_ACCUM_GREEN_SIZE:
+    case GLX_ACCUM_BLUE_SIZE:
+    case GLX_ACCUM_ALPHA_SIZE:
+      /* I believe that WGL only used the cAccumRedBits,
+	 cAccumBlueBits, cAccumGreenBits, and cAccumAlphaBits fields
+	 when returning info about the accumulation buffer precision.
+	 Only cAccumBits is used for requesting an accumulation
+	 buffer. */
+      pfd.cAccumBits = 1;
+      ++p;
+      break;
+    }
+    ++p;
+  }
+
+  /* Let Win32 choose one for us. */
+  pf = ChoosePixelFormat(XHDC, &pfd);
+  if (pf > 0) {
+    match = (PIXELFORMATDESCRIPTOR *) malloc(sizeof(PIXELFORMATDESCRIPTOR));
+    DescribePixelFormat(XHDC, pf, sizeof(PIXELFORMATDESCRIPTOR), match);
+
+    /* ChoosePixelFormat is dumb in that it will return a pixel
+       format that doesn't have stereo even if it was requested
+       so we need to make sure that if stereo was selected, we
+       got it. */
+    if (stereo) {
+      if (!(match->dwFlags & PFD_STEREO)) {
+        free(match);
+	return NULL;
+      }
+    }
+    /* XXX Brad's Matrix Millenium II has problems creating
+       color index windows in 24-bit mode (lead to GDI crash)
+       and 32-bit mode (lead to black window).  The cColorBits
+       filed of the PIXELFORMATDESCRIPTOR returned claims to
+       have 24 and 32 bits respectively of color indices. 2^24
+       and 2^32 are ridiculously huge writable colormaps.
+       Assume that if we get back a color index
+       PIXELFORMATDESCRIPTOR with 24 or more bits, the
+       PIXELFORMATDESCRIPTOR doesn't really work and skip it.
+       -mjk */
+    if (match->iPixelType == PFD_TYPE_COLORINDEX
+      && match->cColorBits >= 24) {
+      free(match);
+      return NULL;
+    }
+  }
+  return match;
+}
diff --git a/samples/glut/win32_glx.h b/samples/glut/win32_glx.h
new file mode 100644
index 0000000..d3630e7
--- /dev/null
+++ b/samples/glut/win32_glx.h
@@ -0,0 +1,58 @@
+#ifndef __win32_glx_h__
+#define __win32_glx_h__
+
+/* Copyright (c) Nate Robins, 1997. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#include "win32_x11.h"
+
+/* Type definitions (conversions). */
+typedef HGLRC GLXContext;
+
+#define GLX_USE_GL              1       /* support GLX rendering */
+#define GLX_BUFFER_SIZE         2       /* depth of the color buffer */
+#define GLX_LEVEL               3       /* level in plane stacking */
+#define GLX_RGBA                4       /* true if RGBA mode */
+#define GLX_DOUBLEBUFFER        5       /* double buffering supported */
+#define GLX_STEREO              6       /* stereo buffering supported */
+#define GLX_AUX_BUFFERS         7       /* number of aux buffers */
+#define GLX_RED_SIZE            8       /* number of red component bits */
+#define GLX_GREEN_SIZE          9       /* number of green component bits */
+#define GLX_BLUE_SIZE           10      /* number of blue component bits */
+#define GLX_ALPHA_SIZE          11      /* number of alpha component bits */
+#define GLX_DEPTH_SIZE          12      /* number of depth bits */
+#define GLX_STENCIL_SIZE        13      /* number of stencil bits */
+#define GLX_ACCUM_RED_SIZE      14      /* number of red accum bits */
+#define GLX_ACCUM_GREEN_SIZE    15      /* number of green accum bits */
+#define GLX_ACCUM_BLUE_SIZE     16      /* number of blue accum bits */
+#define GLX_ACCUM_ALPHA_SIZE    17      /* number of alpha accum bits */
+
+#define GLX_BAD_ATTRIB  2
+#define GLX_BAD_VISUAL  4
+
+/* Functions emulated by macros. */
+
+#define glXDestroyContext(display, context) \
+  wglDeleteContext(context)
+
+/* Function prototypes. */
+
+extern GLXContext glXCreateContext(
+  Display* display,
+  XVisualInfo* visinfo,
+  GLXContext share,
+  Bool direct);
+extern int glXGetConfig(
+  Display* display,
+  XVisualInfo* visual,
+  int attrib,
+  int* value);
+extern XVisualInfo* glXChooseVisual(
+  Display* display,
+  int screen,
+  int* attribList);
+
+#endif /* __win32_glx_h__ */
diff --git a/samples/glut/win32_util.c b/samples/glut/win32_util.c
new file mode 100644
index 0000000..5b473a0
--- /dev/null
+++ b/samples/glut/win32_util.c
@@ -0,0 +1,82 @@
+
+/* Copyright (c) Nate Robins, 1997. */
+
+/* portions Copyright (c) Mark Kilgard, 1997, 1998. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+
+#include "glutint.h"
+#include "glutstroke.h"
+#include "glutbitmap.h"
+
+extern StrokeFontRec glutStrokeRoman;
+
+/* To get around the fact that Microsoft DLLs only allow functions
+   to be exported and now data addresses (as Unix DSOs support), the
+   GLUT API constants such as GLUT_STROKE_ROMAN have to get passed
+   through a case statement to get mapped to the actual data structure
+   address. */
+void*
+__glutFont(void *font)
+{
+  switch (*reinterpret_cast<size_t *>(&font)) {
+#ifdef __MINGW32__
+  case 0:
+#else
+  case (size_t)GLUT_STROKE_ROMAN:
+#endif
+    return &glutStrokeRoman;
+  }
+  return &glutStrokeRoman;
+}
+
+int
+__glutGetTransparentPixel(Display * dpy, XVisualInfo * vinfo)
+{
+  /* the transparent pixel on Win32 is always index number 0.  So if
+     we put this routine in this file, we can avoid compiling the
+     whole of layerutil.c which is where this routine normally comes
+     from. */
+  return 0;
+}
+
+void
+__glutAdjustCoords(Window parent, int* x, int* y, int* width, int* height)
+{
+  RECT rect;
+
+  /* adjust the window rectangle because Win32 thinks that the x, y,
+     width & height are the WHOLE window (including decorations),
+     whereas GLUT treats the x, y, width & height as only the CLIENT
+     area of the window. */
+  rect.left = *x; rect.top = *y;
+  rect.right = *x + *width; rect.bottom = *y + *height;
+
+  /* must adjust the coordinates according to the correct style
+     because depending on the style, there may or may not be
+     borders. */
+  AdjustWindowRect(&rect, WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
+		   (parent ? WS_CHILD : WS_OVERLAPPEDWINDOW),
+		   FALSE);
+  /* FALSE in the third parameter = window has no menu bar */
+
+  /* readjust if the x and y are offscreen */
+  if(rect.left < 0) {
+    *x = 0;
+  } else {
+    *x = rect.left;
+  }
+  
+  if(rect.top < 0) {
+    *y = 0;
+  } else {
+    *y = rect.top;
+  }
+
+  *width = rect.right - rect.left;	/* adjusted width */
+  *height = rect.bottom - rect.top;	/* adjusted height */
+}
+
diff --git a/samples/glut/win32_x11.c b/samples/glut/win32_x11.c
new file mode 100644
index 0000000..327522c
--- /dev/null
+++ b/samples/glut/win32_x11.c
@@ -0,0 +1,401 @@
+
+/* Copyright (c) Nate Robins, 1997. */
+/* portions Copyright (c) Mark Kilgard, 1998. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#include <stdio.h>
+#include "win32_x11.h"
+
+/* global variable that must be set for some functions to operate
+   correctly. */
+HDC XHDC;
+
+XVisualInfo*
+XGetVisualInfo(Display* display, long mask, XVisualInfo* xtemplate, int* nitems)
+{
+  /* KLUDGE: this function needs XHDC to be set to the HDC currently
+     being operated on before it is invoked! */
+
+  PIXELFORMATDESCRIPTOR* pfds;
+  int i, n;
+
+  n = DescribePixelFormat(XHDC, 0, 0, NULL);
+  pfds = (PIXELFORMATDESCRIPTOR*)malloc(sizeof(PIXELFORMATDESCRIPTOR) * n);
+  memset(pfds, 0, sizeof(PIXELFORMATDESCRIPTOR) * n);
+  
+  for (i = 0; i < n; i++) {
+    DescribePixelFormat(XHDC, i, sizeof(PIXELFORMATDESCRIPTOR), &pfds[i]);
+  }
+
+  *nitems = n;
+  return pfds;
+}
+
+Colormap
+XCreateColormap(Display* display, Window root, Visual* visual, int alloc)
+{
+  /* KLUDGE: this function needs XHDC to be set to the HDC currently
+     being operated on before it is invoked! */
+
+  PIXELFORMATDESCRIPTOR pfd;
+  LOGPALETTE *logical;
+  HPALETTE    palette;
+  int n;
+
+  /* grab the pixel format */
+  memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
+  DescribePixelFormat(XHDC, GetPixelFormat(XHDC), 
+		      sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+
+  if (!(pfd.dwFlags & PFD_NEED_PALETTE ||
+      pfd.iPixelType == PFD_TYPE_COLORINDEX))
+  {
+    return 0;
+  }
+
+  n = 1 << pfd.cColorBits;
+
+  /* allocate a bunch of memory for the logical palette (assume 256
+     colors in a Win32 palette */
+  logical = (LOGPALETTE*)malloc(sizeof(LOGPALETTE) +
+				sizeof(PALETTEENTRY) * n);
+  memset(logical, 0, sizeof(LOGPALETTE) + sizeof(PALETTEENTRY) * n);
+
+  /* set the entries in the logical palette */
+  logical->palVersion = 0x300;
+  logical->palNumEntries = n;
+
+  /* start with a copy of the current system palette */
+  GetSystemPaletteEntries(XHDC, 0, 256, &logical->palPalEntry[0]);
+    
+  if (pfd.iPixelType == PFD_TYPE_RGBA) {
+    int redMask = (1 << pfd.cRedBits) - 1;
+    int greenMask = (1 << pfd.cGreenBits) - 1;
+    int blueMask = (1 << pfd.cBlueBits) - 1;
+    int i;
+
+    /* fill in an RGBA color palette */
+    for (i = 0; i < n; ++i) {
+      logical->palPalEntry[i].peRed = 
+	(((i >> pfd.cRedShift)   & redMask)   * 255) / redMask;
+      logical->palPalEntry[i].peGreen = 
+	(((i >> pfd.cGreenShift) & greenMask) * 255) / greenMask;
+	logical->palPalEntry[i].peBlue = 
+	(((i >> pfd.cBlueShift)  & blueMask)  * 255) / blueMask;
+      logical->palPalEntry[i].peFlags = 0;
+    }
+  }
+
+  palette = CreatePalette(logical);
+  free(logical);
+
+  SelectPalette(XHDC, palette, FALSE);
+  RealizePalette(XHDC);
+
+  return palette;
+}
+
+void
+XAllocColorCells(Display* display, Colormap colormap, Bool contig, 
+		 unsigned long plane_masks_return[], unsigned int nplanes,
+		 unsigned long pixels_return[], unsigned int npixels)
+{
+  /* NOP -- we did all the allocating in XCreateColormap! */
+}
+
+void
+XStoreColor(Display* display, Colormap colormap, XColor* color)
+{
+  /* KLUDGE: set XHDC to 0 if the palette should NOT be realized after
+     setting the color.  set XHDC to the correct HDC if it should. */
+
+  PALETTEENTRY pe;
+
+  /* X11 stores color from 0-65535, Win32 expects them to be 0-256, so
+     twiddle the bits ( / 256). */
+  pe.peRed = color->red / 256;
+  pe.peGreen = color->green / 256;
+  pe.peBlue = color->blue / 256;
+
+  /* make sure we use this flag, otherwise the colors might get mapped
+     to another place in the colormap, and when we glIndex() that
+     color, it may have moved (argh!!) */
+  pe.peFlags = PC_NOCOLLAPSE;
+
+  /* the pixel field of the XColor structure is the index into the
+     colormap */
+  SetPaletteEntries(colormap, color->pixel, 1, &pe);
+
+  if (XHDC) {
+    UnrealizeObject(colormap);
+    SelectPalette(XHDC, colormap, FALSE);
+    RealizePalette(XHDC);
+  }
+}
+
+void
+XSetWindowColormap(Display* display, Window window, Colormap colormap)
+{
+  HDC hdc = GetDC(window);
+
+  /* if the third parameter is FALSE, the logical colormap is copied
+     into the device palette when the application is in the
+     foreground, if it is TRUE, the colors are mapped into the current
+     palette in the best possible way. */
+  SelectPalette(hdc, colormap, FALSE);
+  RealizePalette(hdc);
+
+  /* note that we don't have to release the DC, since our window class
+     uses the WC_OWNDC flag! */
+}
+
+Bool
+XTranslateCoordinates(Display *display, Window src, Window dst, 
+		      int src_x, int src_y, 
+		      int* dest_x_return, int* dest_y_return,
+		      Window* child_return)
+{
+  /* KLUDGE: this isn't really a translate coordinates into some other
+  windows coordinate system...it only translates coordinates into the
+  root window (screen) coordinate system. */
+
+  POINT point;
+
+  point.x = src_x;
+  point.y = src_y;
+
+  ClientToScreen(src, &point);
+
+  *dest_x_return = point.x;
+  *dest_y_return = point.y;
+
+  /* just to make compilers happy...we don't use the return value. */
+  return True;
+}
+
+Status
+XGetGeometry(Display* display, Window window, Window* root_return, 
+	     int* x_return, int* y_return, 
+	     unsigned int* width_return, unsigned int* height_return,
+	     unsigned int *border_width_return, unsigned int* depth_return)
+{
+  /* KLUDGE: doesn't return the border_width or depth or root, x & y
+     are in screen coordinates. */
+
+  RECT rect;
+  POINT point;
+
+  GetClientRect(window, &rect);
+
+  point.x = 0;
+  point.y = 0;
+  ClientToScreen(window, &point);
+
+  *x_return = point.x;
+  *y_return = point.y;
+  *width_return = rect.right;
+  *height_return = rect.bottom;
+
+  /* just to make compilers happy...we don't use the return value. */
+  return 1;  
+}
+
+int
+DisplayWidthMM(Display* display, int screen)
+{
+  int width;
+  HWND hwnd = GetDesktopWindow();
+  HDC hdc = GetDC(hwnd);
+  
+  width = GetDeviceCaps(hdc, HORZSIZE);
+
+  /* make sure to release this DC (it's the desktops, not ours) */
+  ReleaseDC(hwnd, hdc);
+
+  return width;
+}
+
+int
+DisplayHeightMM(Display* display, int screen)
+{
+  int height;
+  HWND hwnd = GetDesktopWindow();
+  HDC hdc = GetDC(hwnd);
+  
+  height = GetDeviceCaps(hdc, VERTSIZE);
+
+  /* make sure to release this DC (it's the desktops, not ours) */
+  ReleaseDC(hwnd, hdc);
+
+  return height;
+}
+
+void
+XWarpPointer(Display* display, Window src, Window dst, 
+	     int src_x, int src_y, int src_width, int src_height,
+	     int dst_x, int dst_y)
+{
+  /* KLUDGE: this isn't really a warp pointer into some other windows
+  coordinate system...it only warps the pointer into the root window
+  (screen) coordinate system. */
+
+  POINT point;
+
+  point.x = dst_x;
+  point.y = dst_y;
+  ClientToScreen(dst, &point);
+
+  SetCursorPos(point.x, point.y);
+}
+
+int
+XPending(Display* display)
+{
+  /* similar functionality...I don't think that it is exact, but this
+     will have to do. */
+  MSG msg;
+
+  return PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
+}
+
+/* the following function was stolen from the X sources as indicated. */
+
+/* Copyright 	Massachusetts Institute of Technology  1985, 1986, 1987 */
+/* $XConsortium: XParseGeom.c,v 11.18 91/02/21 17:23:05 rws Exp $ */
+
+/*
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of M.I.T. not be used in advertising or
+publicity pertaining to distribution of the software without specific,
+written prior permission.  M.I.T. makes no representations about the
+suitability of this software for any purpose.  It is provided "as is"
+without express or implied warranty.
+*/
+
+/*
+ *    XParseGeometry parses strings of the form
+ *   "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
+ *   width, height, xoffset, and yoffset are unsigned integers.
+ *   Example:  "=80x24+300-49"
+ *   The equal sign is optional.
+ *   It returns a bitmask that indicates which of the four values
+ *   were actually found in the string.  For each value found,
+ *   the corresponding argument is updated;  for each value
+ *   not found, the corresponding argument is left unchanged. 
+ */
+
+static int
+ReadInteger(char *string, char **NextString)
+{
+    register int Result = 0;
+    int Sign = 1;
+    
+    if (*string == '+')
+	string++;
+    else if (*string == '-')
+    {
+	string++;
+	Sign = -1;
+    }
+    for (; (*string >= '0') && (*string <= '9'); string++)
+    {
+	Result = (Result * 10) + (*string - '0');
+    }
+    *NextString = string;
+    if (Sign >= 0)
+	return (Result);
+    else
+	return (-Result);
+}
+
+int XParseGeometry(char *string, int *x, int *y, unsigned int *width, unsigned int *height)
+{
+	int mask = NoValue;
+	register char *strind;
+	unsigned int tempWidth, tempHeight;
+	int tempX, tempY;
+	char *nextCharacter;
+
+	if ( (string == NULL) || (*string == '\0')) return(mask);
+	if (*string == '=')
+		string++;  /* ignore possible '=' at beg of geometry spec */
+
+	strind = (char *)string;
+	if (*strind != '+' && *strind != '-' && *strind != 'x') {
+		tempWidth = ReadInteger(strind, &nextCharacter);
+		if (strind == nextCharacter) 
+		    return (0);
+		strind = nextCharacter;
+		mask |= WidthValue;
+	}
+
+	if (*strind == 'x' || *strind == 'X') {	
+		strind++;
+		tempHeight = ReadInteger(strind, &nextCharacter);
+		if (strind == nextCharacter)
+		    return (0);
+		strind = nextCharacter;
+		mask |= HeightValue;
+	}
+
+	if ((*strind == '+') || (*strind == '-')) {
+		if (*strind == '-') {
+  			strind++;
+			tempX = -ReadInteger(strind, &nextCharacter);
+			if (strind == nextCharacter)
+			    return (0);
+			strind = nextCharacter;
+			mask |= XNegative;
+
+		}
+		else
+		{	strind++;
+			tempX = ReadInteger(strind, &nextCharacter);
+			if (strind == nextCharacter)
+			    return(0);
+			strind = nextCharacter;
+		}
+		mask |= XValue;
+		if ((*strind == '+') || (*strind == '-')) {
+			if (*strind == '-') {
+				strind++;
+				tempY = -ReadInteger(strind, &nextCharacter);
+				if (strind == nextCharacter)
+			    	    return(0);
+				strind = nextCharacter;
+				mask |= YNegative;
+
+			}
+			else
+			{
+				strind++;
+				tempY = ReadInteger(strind, &nextCharacter);
+				if (strind == nextCharacter)
+			    	    return(0);
+				strind = nextCharacter;
+			}
+			mask |= YValue;
+		}
+	}
+	
+	/* If strind isn't at the end of the string the it's an invalid
+		geometry specification. */
+
+	if (*strind != '\0') return (0);
+
+	if (mask & XValue)
+	    *x = tempX;
+ 	if (mask & YValue)
+	    *y = tempY;
+	if (mask & WidthValue)
+            *width = tempWidth;
+	if (mask & HeightValue)
+            *height = tempHeight;
+	return (mask);
+}
diff --git a/samples/glut/win32_x11.h b/samples/glut/win32_x11.h
new file mode 100644
index 0000000..bb49977
--- /dev/null
+++ b/samples/glut/win32_x11.h
@@ -0,0 +1,319 @@
+#ifndef __win32_x11_h__
+#define __win32_x11_h__
+
+/* Copyright (c) Nate Robins, 1997. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#include <stdlib.h>
+#include <windows.h>
+
+/* Type definitions (conversions) */
+typedef int Visual;			/* Win32 equivalent of X11 type */
+typedef HWND Window;
+typedef HPALETTE Colormap;
+typedef PIXELFORMATDESCRIPTOR XVisualInfo;
+typedef BOOL Bool;
+typedef MSG XEvent;
+typedef HDC Display;
+typedef HCURSOR Cursor;
+
+typedef int Atom;			/* dummies */
+typedef int XDevice;
+typedef int Status;
+
+#define True  TRUE			/* Win32 equivalents of X11 booleans */
+#define False FALSE
+
+#define None                 0L	/* universal null resource or null atom */
+
+/* Input Event Masks. Used as event-mask window attribute and as arguments
+   to Grab requests.  Not to be confused with event names.  */
+
+#define NoEventMask			0L
+#define KeyPressMask			(1L<<0)  
+#define KeyReleaseMask			(1L<<1)  
+#define ButtonPressMask			(1L<<2)  
+#define ButtonReleaseMask		(1L<<3)  
+#define EnterWindowMask			(1L<<4)  
+#define LeaveWindowMask			(1L<<5)  
+#define PointerMotionMask		(1L<<6)  
+#define PointerMotionHintMask		(1L<<7)  
+#define Button1MotionMask		(1L<<8)  
+#define Button2MotionMask		(1L<<9)  
+#define Button3MotionMask		(1L<<10) 
+#define Button4MotionMask		(1L<<11) 
+#define Button5MotionMask		(1L<<12) 
+#define ButtonMotionMask		(1L<<13) 
+#define KeymapStateMask			(1L<<14)
+#define ExposureMask			(1L<<15) 
+#define VisibilityChangeMask		(1L<<16) 
+#define StructureNotifyMask		(1L<<17) 
+#define ResizeRedirectMask		(1L<<18) 
+#define SubstructureNotifyMask		(1L<<19) 
+#define SubstructureRedirectMask	(1L<<20) 
+#define FocusChangeMask			(1L<<21) 
+#define PropertyChangeMask		(1L<<22) 
+#define ColormapChangeMask		(1L<<23) 
+#define OwnerGrabButtonMask		(1L<<24) 
+
+/* Key masks. Used as modifiers to GrabButton and GrabKey, results of
+   QueryPointer, state in various key-, mouse-, and button-related
+   events. */
+
+#define ShiftMask		(1<<0)
+#define LockMask		(1<<1)
+#define ControlMask		(1<<2)
+#define Mod1Mask		(1<<3)
+#define Mod2Mask		(1<<4)
+#define Mod3Mask		(1<<5)
+#define Mod4Mask		(1<<6)
+#define Mod5Mask		(1<<7)
+
+/* Window classes used by CreateWindow */
+/* Note that CopyFromParent is already defined as 0 above */
+
+#define InputOutput		1
+#define InputOnly		2
+
+/* Window attributes for CreateWindow and ChangeWindowAttributes */
+
+#define CWBackPixmap		(1L<<0)
+#define CWBackPixel		(1L<<1)
+#define CWBorderPixmap		(1L<<2)
+#define CWBorderPixel           (1L<<3)
+#define CWBitGravity		(1L<<4)
+#define CWWinGravity		(1L<<5)
+#define CWBackingStore          (1L<<6)
+#define CWBackingPlanes	        (1L<<7)
+#define CWBackingPixel	        (1L<<8)
+#define CWOverrideRedirect	(1L<<9)
+#define CWSaveUnder		(1L<<10)
+#define CWEventMask		(1L<<11)
+#define CWDontPropagate	        (1L<<12)
+#define CWColormap		(1L<<13)
+#define CWCursor	        (1L<<14)
+
+/* ConfigureWindow structure */
+
+#define CWX			(1<<0)
+#define CWY			(1<<1)
+#define CWWidth			(1<<2)
+#define CWHeight		(1<<3)
+#define CWBorderWidth		(1<<4)
+#define CWSibling		(1<<5)
+#define CWStackMode		(1<<6)
+
+
+/* Used in GetWindowAttributes reply */
+
+#define IsUnmapped		0
+#define IsUnviewable		1
+#define IsViewable		2
+
+/* Window stacking method (in configureWindow) */
+
+#define Above                   0
+#define Below                   1
+#define TopIf                   2
+#define BottomIf                3
+#define Opposite                4
+
+/* For CreateColormap */
+
+#define AllocNone		0	/* create map with no entries */
+#define AllocAll		1	/* allocate entire map writeable */
+
+
+/* Flags used in StoreNamedColor, StoreColors */
+
+#define DoRed			(1<<0)
+#define DoGreen			(1<<1)
+#define DoBlue			(1<<2)
+
+/* 
+ * Bitmask returned by XParseGeometry().  Each bit tells if the corresponding
+ * value (x, y, width, height) was found in the parsed string.
+ */
+#define NoValue		0x0000
+#define XValue  	0x0001
+#define YValue		0x0002
+#define WidthValue  	0x0004
+#define HeightValue  	0x0008
+#define AllValues 	0x000F
+#define XNegative 	0x0010
+#define YNegative 	0x0020
+
+/* flags argument in size hints */
+#define USPosition	(1L << 0) /* user specified x, y */
+#define USSize		(1L << 1) /* user specified width, height */
+
+/* definitions for initial window state */
+#define WithdrawnState 0	/* for windows that are not mapped */
+#define NormalState 1	/* most applications want to start this way */
+#define IconicState 3	/* application wants to start as an icon */
+#define GameModeState 4  /* Win32 GLUT only (not in Xlib!). */
+
+/* Type definitions */
+
+typedef struct {
+    unsigned int background_pixmap;	/* background pixmap */
+    unsigned long background_pixel;	/* background pixel */
+    unsigned long border_pixel;	/* border pixel value */
+    long event_mask;		/* set of events that should be saved */
+    long do_not_propagate_mask;	/* set of events that should not propagate */
+    Bool override_redirect;	   /* boolean value for override-redirect */
+    Colormap colormap;		   /* color map to be associated with window */
+} XSetWindowAttributes;
+
+typedef struct {
+  unsigned long pixel;
+  unsigned short red, green, blue;
+  char flags;  /* do_red, do_green, do_blue */
+} XColor;
+
+typedef struct {
+  unsigned char *value;	   /* same as Property routines */
+  Atom encoding;	   /* prop type */
+  int format;		   /* prop data format: 8, 16, or 32 */
+  unsigned long nitems;	   /* number of data items in value */
+} XTextProperty;
+
+typedef struct {
+  long flags;	        /* marks which fields in this structure are defined */
+  int x, y;		/* obsolete for new window mgrs, but clients */
+  int width, height;	/* should set so old wm's don't mess up */
+} XSizeHints;
+
+/* Functions emulated by macros. */
+
+#define XFreeColormap(display, colormap) \
+  DeleteObject(colormap)
+
+#define XCreateFontCursor(display, shape) \
+  LoadCursor(NULL, shape)
+
+#define XDefineCursor(display, window, cursor) \
+  SetCursor(cursor)
+
+#define XFlush(display) \
+  /* Nothing. */
+
+#define DisplayWidth(display, screen) \
+  GetSystemMetrics(SM_CXSCREEN)
+
+#define DisplayHeight(display, screen) \
+  GetSystemMetrics(SM_CYSCREEN)
+
+#define XMapWindow(display, window) \
+  ShowWindow(window, SW_SHOWNORMAL)
+
+#define XUnmapWindow(display, window) \
+  ShowWindow(window, SW_HIDE)
+
+#define XIconifyWindow(display, window, screen) \
+  ShowWindow(window, SW_MINIMIZE)
+
+#define XWithdrawWindow(display, window, screen) \
+  ShowWindow(window, SW_HIDE)
+
+#define XLowerWindow(display, window) \
+  SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)
+
+#define XSetWMName(display, window, tp) \
+  SetWindowText(window, (tp)->value)
+
+/* There really isn't a way to set the icon name separate from the
+   windows name in Win32, so, just set the windows name. */
+#define XSetWMIconName(display, window, tp) \
+  XSetWMName(display, window, tp)
+
+#define XDestroyWindow(display, window) \
+  DestroyWindow(window)
+
+/* Anything that needs to be freed was allocated with malloc in our
+   fake X windows library for Win32, so free it with plain old
+   free(). */
+#define XFree(data) \
+  free(data)
+
+/* Nothing to be done for this...the pointer is always 'ungrabbed'
+   in Win32. */
+#define XUngrabPointer(display, time) \
+  /* Nothing. */
+
+/* Function prototypes. */
+
+extern XVisualInfo* XGetVisualInfo(
+  Display* display,
+  long mask,
+  XVisualInfo* ttemplate,  /* Avoid class with C++ keyword. */
+  int*nitems);
+
+extern Colormap XCreateColormap(
+  Display* display,
+  Window root,
+  Visual* visual,
+  int alloc);
+
+extern void XAllocColorCells(
+  Display* display,
+  Colormap colormap,
+  Bool contig, 
+  unsigned long plane_masks_return[],
+  unsigned int nplanes,
+  unsigned long pixels_return[],
+  unsigned int npixels);
+
+extern void XStoreColor(
+  Display* display,
+  Colormap colormap,
+  XColor* color);
+
+extern void XSetWindowColormap(
+  Display* display,
+  Window window,
+  Colormap colormap);
+
+extern Bool XTranslateCoordinates(
+  Display *display,
+  Window src, Window dst, 
+  int src_x, int src_y, 
+  int* dest_x_return, int* dest_y_return,
+  Window* child_return);
+
+extern Status XGetGeometry(
+  Display* display,
+  Window window,
+  Window* root_return, 
+  int* x_return, int* y_return, 
+  unsigned int* width_return, unsigned int* height_return,
+  unsigned int *border_width_return,
+  unsigned int* depth_return);
+
+extern int DisplayWidthMM(
+  Display* display,
+  int screen);
+
+extern int DisplayHeightMM(
+  Display* display,
+  int screen);
+
+extern void XWarpPointer(
+  Display* display,
+  Window src, Window dst, 
+  int src_x, int src_y,
+  int src_width, int src_height, 
+  int dst_x, int dst_y);
+
+extern int XParseGeometry(
+  char* string,
+  int* x, int* y, 
+  unsigned int* width, unsigned int* height);
+
+extern int XPending(
+  Display* display);
+
+#endif /* __win32_x11_h__ */
diff --git a/samples/jpeglib/Makefile.am b/samples/jpeglib/Makefile.am
new file mode 100644
index 0000000..0300842
--- /dev/null
+++ b/samples/jpeglib/Makefile.am
@@ -0,0 +1,61 @@
+include $(top_srcdir)/Makefile.incl
+
+lib_LIBRARIES=libjpeg.a
+
+libjpeg_a_CFLAGS = $(CFLAGS) $(DEFS) -DCLIENT $(BOINC_CFLAGS) $(PTHREAD_CFLAGS)
+
+libjpeg_a_SOURCES=jcapimin.c \
+jcapistd.c \
+jccoefct.c \
+jccolor.c \
+jcdctmgr.c \
+jchuff.c \
+jcinit.c \
+jcmainct.c \
+jcmarker.c \
+jcmaster.c \
+jcomapi.c \
+jcparam.c \
+jcphuff.c \
+jcprepct.c \
+jcsample.c \
+jctrans.c \
+jdapimin.c \
+jdapistd.c \
+jdatadst.c \
+jdatasrc.c \
+jdcoefct.c \
+jdcolor.c \
+jddctmgr.c \
+jdhuff.c \
+jdinput.c \
+jdmainct.c \
+jdmarker.c \
+jdmaster.c \
+jdmerge.c \
+jdphuff.c \
+jdpostct.c \
+jdsample.c \
+jdtrans.c \
+jerror.c \
+jfdctflt.c \
+jfdctfst.c \
+jfdctint.c \
+jidctflt.c \
+jidctfst.c \
+jidctint.c \
+jidctred.c \
+jmemmgr.c \
+jmemnobs.c \
+jquant1.c \
+jquant2.c \
+jutils.c \
+rdbmp.c \
+rdcolmap.c \
+rdgif.c \
+rdppm.c \
+rdrle.c \
+rdswitch.c \
+rdtarga.c 
+
+
diff --git a/samples/jpeglib/cderror.h b/samples/jpeglib/cderror.h
new file mode 100644
index 0000000..70435e1
--- /dev/null
+++ b/samples/jpeglib/cderror.h
@@ -0,0 +1,132 @@
+/*
+ * cderror.h
+ *
+ * Copyright (C) 1994-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file defines the error and message codes for the cjpeg/djpeg
+ * applications.  These strings are not needed as part of the JPEG library
+ * proper.
+ * Edit this file to add new codes, or to translate the message strings to
+ * some other language.
+ */
+
+/*
+ * To define the enum list of message codes, include this file without
+ * defining macro JMESSAGE.  To create a message string table, include it
+ * again with a suitable JMESSAGE definition (see jerror.c for an example).
+ */
+#ifndef JMESSAGE
+#ifndef CDERROR_H
+#define CDERROR_H
+/* First time through, define the enum list */
+#define JMAKE_ENUM_LIST
+#else
+/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
+#define JMESSAGE(code,string)
+#endif /* CDERROR_H */
+#endif /* JMESSAGE */
+
+#ifdef JMAKE_ENUM_LIST
+
+typedef enum {
+
+#define JMESSAGE(code,string)	code ,
+
+#endif /* JMAKE_ENUM_LIST */
+
+JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */
+
+#ifdef BMP_SUPPORTED
+JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")
+JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported")
+JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")
+JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
+JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
+JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
+JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
+JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
+JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
+JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image")
+JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image")
+#endif /* BMP_SUPPORTED */
+
+#ifdef GIF_SUPPORTED
+JMESSAGE(JERR_GIF_BUG, "GIF output got confused")
+JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d")
+JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB")
+JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")
+JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
+JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
+JMESSAGE(JTRC_GIF_BADVERSION,
+	 "Warning: unexpected GIF version number '%c%c%c'")
+JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
+JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
+JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
+JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring")
+JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image")
+JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
+#endif /* GIF_SUPPORTED */
+
+#ifdef PPM_SUPPORTED
+JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
+JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
+JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")
+JMESSAGE(JTRC_PGM, "%ux%u PGM image")
+JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
+JMESSAGE(JTRC_PPM, "%ux%u PPM image")
+JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image")
+#endif /* PPM_SUPPORTED */
+
+#ifdef RLE_SUPPORTED
+JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library")
+JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB")
+JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE")
+JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file")
+JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header")
+JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header")
+JMESSAGE(JERR_RLE_NOT, "Not an RLE file")
+JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE")
+JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup")
+JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file")
+JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d")
+JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file")
+JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d")
+JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d")
+#endif /* RLE_SUPPORTED */
+
+#ifdef TARGA_SUPPORTED
+JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format")
+JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file")
+JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB")
+JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image")
+JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image")
+JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image")
+#else
+JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")
+#endif /* TARGA_SUPPORTED */
+
+JMESSAGE(JERR_BAD_CMAP_FILE,
+	 "Color map file is invalid or of unsupported format")
+JMESSAGE(JERR_TOO_MANY_COLORS,
+	 "Output file format cannot handle %d colormap entries")
+JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
+#ifdef TARGA_SUPPORTED
+JMESSAGE(JERR_UNKNOWN_FORMAT,
+	 "Unrecognized input file format --- perhaps you need -targa")
+#else
+JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
+#endif
+JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format")
+
+#ifdef JMAKE_ENUM_LIST
+
+  JMSG_LASTADDONCODE
+} ADDON_MESSAGE_CODE;
+
+#undef JMAKE_ENUM_LIST
+#endif /* JMAKE_ENUM_LIST */
+
+/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
+#undef JMESSAGE
diff --git a/samples/jpeglib/cdjpeg.h b/samples/jpeglib/cdjpeg.h
new file mode 100644
index 0000000..2b387b6
--- /dev/null
+++ b/samples/jpeglib/cdjpeg.h
@@ -0,0 +1,184 @@
+/*
+ * cdjpeg.h
+ *
+ * Copyright (C) 1994-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains common declarations for the sample applications
+ * cjpeg and djpeg.  It is NOT used by the core JPEG library.
+ */
+
+#define JPEG_CJPEG_DJPEG	/* define proper options in jconfig.h */
+#define JPEG_INTERNAL_OPTIONS	/* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jerror.h"		/* get library error codes too */
+#include "cderror.h"		/* get application-specific error codes */
+
+
+/*
+ * Object interface for cjpeg's source file decoding modules
+ */
+
+typedef struct cjpeg_source_struct * cjpeg_source_ptr;
+
+struct cjpeg_source_struct {
+  JMETHOD(void, start_input, (j_compress_ptr cinfo,
+			      cjpeg_source_ptr sinfo));
+  JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
+				       cjpeg_source_ptr sinfo));
+  JMETHOD(void, finish_input, (j_compress_ptr cinfo,
+			       cjpeg_source_ptr sinfo));
+
+  FILE *input_file;
+
+  JSAMPARRAY buffer;
+  JDIMENSION buffer_height;
+};
+
+
+/*
+ * Object interface for djpeg's output file encoding modules
+ */
+
+typedef struct djpeg_dest_struct * djpeg_dest_ptr;
+
+struct djpeg_dest_struct {
+  /* start_output is called after jpeg_start_decompress finishes.
+   * The color map will be ready at this time, if one is needed.
+   */
+  JMETHOD(void, start_output, (j_decompress_ptr cinfo,
+			       djpeg_dest_ptr dinfo));
+  /* Emit the specified number of pixel rows from the buffer. */
+  JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,
+				 djpeg_dest_ptr dinfo,
+				 JDIMENSION rows_supplied));
+  /* Finish up at the end of the image. */
+  JMETHOD(void, finish_output, (j_decompress_ptr cinfo,
+				djpeg_dest_ptr dinfo));
+
+  /* Target file spec; filled in by djpeg.c after object is created. */
+  FILE * output_file;
+
+  /* Output pixel-row buffer.  Created by module init or start_output.
+   * Width is cinfo->output_width * cinfo->output_components;
+   * height is buffer_height.
+   */
+  JSAMPARRAY buffer;
+  JDIMENSION buffer_height;
+};
+
+
+/*
+ * cjpeg/djpeg may need to perform extra passes to convert to or from
+ * the source/destination file format.  The JPEG library does not know
+ * about these passes, but we'd like them to be counted by the progress
+ * monitor.  We use an expanded progress monitor object to hold the
+ * additional pass count.
+ */
+
+struct cdjpeg_progress_mgr {
+  struct jpeg_progress_mgr pub;	/* fields known to JPEG library */
+  int completed_extra_passes;	/* extra passes completed */
+  int total_extra_passes;	/* total extra */
+  /* last printed percentage stored here to avoid multiple printouts */
+  int percent_done;
+};
+
+typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
+
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jinit_read_bmp		jIRdBMP
+#define jinit_write_bmp		jIWrBMP
+#define jinit_read_gif		jIRdGIF
+#define jinit_write_gif		jIWrGIF
+#define jinit_read_ppm		jIRdPPM
+#define jinit_write_ppm		jIWrPPM
+#define jinit_read_rle		jIRdRLE
+#define jinit_write_rle		jIWrRLE
+#define jinit_read_targa	jIRdTarga
+#define jinit_write_targa	jIWrTarga
+#define read_quant_tables	RdQTables
+#define read_scan_script	RdScnScript
+#define set_quant_slots		SetQSlots
+#define set_sample_factors	SetSFacts
+#define read_color_map		RdCMap
+#define enable_signal_catcher	EnSigCatcher
+#define start_progress_monitor	StProgMon
+#define end_progress_monitor	EnProgMon
+#define read_stdin		RdStdin
+#define write_stdout		WrStdout
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+/* Module selection routines for I/O modules. */
+
+EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
+EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
+					    boolean is_os2));
+EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
+EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
+EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
+EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
+EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
+EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
+EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
+EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
+
+/* cjpeg support routines (in rdswitch.c) */
+
+EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
+				    int scale_factor, boolean force_baseline));
+EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
+EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
+EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
+
+/* djpeg support routines (in rdcolmap.c) */
+
+EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
+
+/* common support routines (in cdjpeg.c) */
+
+EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
+EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
+					 cd_progress_ptr progress));
+EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
+EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
+EXTERN(FILE *) read_stdin JPP((void));
+EXTERN(FILE *) write_stdout JPP((void));
+
+/* miscellaneous useful macros */
+
+#ifdef DONT_USE_B_MODE		/* define mode parameters for fopen() */
+#define READ_BINARY	"r"
+#define WRITE_BINARY	"w"
+#else
+#ifdef VMS			/* VMS is very nonstandard */
+#define READ_BINARY	"rb", "ctx=stm"
+#define WRITE_BINARY	"wb", "ctx=stm"
+#else				/* standard ANSI-compliant case */
+#define READ_BINARY	"rb"
+#define WRITE_BINARY	"wb"
+#endif
+#endif
+
+#ifndef EXIT_FAILURE		/* define exit() codes if not provided */
+#define EXIT_FAILURE  1
+#endif
+#ifndef EXIT_SUCCESS
+#ifdef VMS
+#define EXIT_SUCCESS  1		/* VMS is very nonstandard */
+#else
+#define EXIT_SUCCESS  0
+#endif
+#endif
+#ifndef EXIT_WARNING
+#ifdef VMS
+#define EXIT_WARNING  1		/* VMS is very nonstandard */
+#else
+#define EXIT_WARNING  2
+#endif
+#endif
diff --git a/samples/jpeglib/jcapimin.c b/samples/jpeglib/jcapimin.c
new file mode 100644
index 0000000..54fb8c5
--- /dev/null
+++ b/samples/jpeglib/jcapimin.c
@@ -0,0 +1,280 @@
+/*
+ * jcapimin.c
+ *
+ * Copyright (C) 1994-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains application interface code for the compression half
+ * of the JPEG library.  These are the "minimum" API routines that may be
+ * needed in either the normal full-compression case or the transcoding-only
+ * case.
+ *
+ * Most of the routines intended to be called directly by an application
+ * are in this file or in jcapistd.c.  But also see jcparam.c for
+ * parameter-setup helper routines, jcomapi.c for routines shared by
+ * compression and decompression, and jctrans.c for the transcoding case.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/*
+ * Initialization of a JPEG compression object.
+ * The error manager must already be set up (in case memory manager fails).
+ */
+
+GLOBAL(void)
+jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
+{
+  int i;
+
+  /* Guard against version mismatches between library and caller. */
+  cinfo->mem = NULL;		/* so jpeg_destroy knows mem mgr not called */
+  if (version != JPEG_LIB_VERSION)
+    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
+  if (structsize != SIZEOF(struct jpeg_compress_struct))
+    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, 
+	     (int) SIZEOF(struct jpeg_compress_struct), (int) structsize);
+
+  /* For debugging purposes, we zero the whole master structure.
+   * But the application has already set the err pointer, and may have set
+   * client_data, so we have to save and restore those fields.
+   * Note: if application hasn't set client_data, tools like Purify may
+   * complain here.
+   */
+  {
+    struct jpeg_error_mgr * err = cinfo->err;
+    void * client_data = cinfo->client_data; /* ignore Purify complaint here */
+    MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct));
+    cinfo->err = err;
+    cinfo->client_data = client_data;
+  }
+  cinfo->is_decompressor = FALSE;
+
+  /* Initialize a memory manager instance for this object */
+  jinit_memory_mgr((j_common_ptr) cinfo);
+
+  /* Zero out pointers to permanent structures. */
+  cinfo->progress = NULL;
+  cinfo->dest = NULL;
+
+  cinfo->comp_info = NULL;
+
+  for (i = 0; i < NUM_QUANT_TBLS; i++)
+    cinfo->quant_tbl_ptrs[i] = NULL;
+
+  for (i = 0; i < NUM_HUFF_TBLS; i++) {
+    cinfo->dc_huff_tbl_ptrs[i] = NULL;
+    cinfo->ac_huff_tbl_ptrs[i] = NULL;
+  }
+
+  cinfo->script_space = NULL;
+
+  cinfo->input_gamma = 1.0;	/* in case application forgets */
+
+  /* OK, I'm ready */
+  cinfo->global_state = CSTATE_START;
+}
+
+
+/*
+ * Destruction of a JPEG compression object
+ */
+
+GLOBAL(void)
+jpeg_destroy_compress (j_compress_ptr cinfo)
+{
+  jpeg_destroy((j_common_ptr) cinfo); /* use common routine */
+}
+
+
+/*
+ * Abort processing of a JPEG compression operation,
+ * but don't destroy the object itself.
+ */
+
+GLOBAL(void)
+jpeg_abort_compress (j_compress_ptr cinfo)
+{
+  jpeg_abort((j_common_ptr) cinfo); /* use common routine */
+}
+
+
+/*
+ * Forcibly suppress or un-suppress all quantization and Huffman tables.
+ * Marks all currently defined tables as already written (if suppress)
+ * or not written (if !suppress).  This will control whether they get emitted
+ * by a subsequent jpeg_start_compress call.
+ *
+ * This routine is exported for use by applications that want to produce
+ * abbreviated JPEG datastreams.  It logically belongs in jcparam.c, but
+ * since it is called by jpeg_start_compress, we put it here --- otherwise
+ * jcparam.o would be linked whether the application used it or not.
+ */
+
+GLOBAL(void)
+jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress)
+{
+  int i;
+  JQUANT_TBL * qtbl;
+  JHUFF_TBL * htbl;
+
+  for (i = 0; i < NUM_QUANT_TBLS; i++) {
+    if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL)
+      qtbl->sent_table = suppress;
+  }
+
+  for (i = 0; i < NUM_HUFF_TBLS; i++) {
+    if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL)
+      htbl->sent_table = suppress;
+    if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL)
+      htbl->sent_table = suppress;
+  }
+}
+
+
+/*
+ * Finish JPEG compression.
+ *
+ * If a multipass operating mode was selected, this may do a great deal of
+ * work including most of the actual output.
+ */
+
+GLOBAL(void)
+jpeg_finish_compress (j_compress_ptr cinfo)
+{
+  JDIMENSION iMCU_row;
+
+  if (cinfo->global_state == CSTATE_SCANNING ||
+      cinfo->global_state == CSTATE_RAW_OK) {
+    /* Terminate first pass */
+    if (cinfo->next_scanline < cinfo->image_height)
+      ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
+    (*cinfo->master->finish_pass) (cinfo);
+  } else if (cinfo->global_state != CSTATE_WRCOEFS)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  /* Perform any remaining passes */
+  while (! cinfo->master->is_last_pass) {
+    (*cinfo->master->prepare_for_pass) (cinfo);
+    for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) {
+      if (cinfo->progress != NULL) {
+	cinfo->progress->pass_counter = (long) iMCU_row;
+	cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows;
+	(*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
+      }
+      /* We bypass the main controller and invoke coef controller directly;
+       * all work is being done from the coefficient buffer.
+       */
+      if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL))
+	ERREXIT(cinfo, JERR_CANT_SUSPEND);
+    }
+    (*cinfo->master->finish_pass) (cinfo);
+  }
+  /* Write EOI, do final cleanup */
+  (*cinfo->marker->write_file_trailer) (cinfo);
+  (*cinfo->dest->term_destination) (cinfo);
+  /* We can use jpeg_abort to release memory and reset global_state */
+  jpeg_abort((j_common_ptr) cinfo);
+}
+
+
+/*
+ * Write a special marker.
+ * This is only recommended for writing COM or APPn markers.
+ * Must be called after jpeg_start_compress() and before
+ * first call to jpeg_write_scanlines() or jpeg_write_raw_data().
+ */
+
+GLOBAL(void)
+jpeg_write_marker (j_compress_ptr cinfo, int marker,
+		   const JOCTET *dataptr, unsigned int datalen)
+{
+  JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val));
+
+  if (cinfo->next_scanline != 0 ||
+      (cinfo->global_state != CSTATE_SCANNING &&
+       cinfo->global_state != CSTATE_RAW_OK &&
+       cinfo->global_state != CSTATE_WRCOEFS))
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+  (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
+  write_marker_byte = cinfo->marker->write_marker_byte;	/* copy for speed */
+  while (datalen--) {
+    (*write_marker_byte) (cinfo, *dataptr);
+    dataptr++;
+  }
+}
+
+/* Same, but piecemeal. */
+
+GLOBAL(void)
+jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
+{
+  if (cinfo->next_scanline != 0 ||
+      (cinfo->global_state != CSTATE_SCANNING &&
+       cinfo->global_state != CSTATE_RAW_OK &&
+       cinfo->global_state != CSTATE_WRCOEFS))
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+  (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
+}
+
+GLOBAL(void)
+jpeg_write_m_byte (j_compress_ptr cinfo, int val)
+{
+  (*cinfo->marker->write_marker_byte) (cinfo, val);
+}
+
+
+/*
+ * Alternate compression function: just write an abbreviated table file.
+ * Before calling this, all parameters and a data destination must be set up.
+ *
+ * To produce a pair of files containing abbreviated tables and abbreviated
+ * image data, one would proceed as follows:
+ *
+ *		initialize JPEG object
+ *		set JPEG parameters
+ *		set destination to table file
+ *		jpeg_write_tables(cinfo);
+ *		set destination to image file
+ *		jpeg_start_compress(cinfo, FALSE);
+ *		write data...
+ *		jpeg_finish_compress(cinfo);
+ *
+ * jpeg_write_tables has the side effect of marking all tables written
+ * (same as jpeg_suppress_tables(..., TRUE)).  Thus a subsequent start_compress
+ * will not re-emit the tables unless it is passed write_all_tables=TRUE.
+ */
+
+GLOBAL(void)
+jpeg_write_tables (j_compress_ptr cinfo)
+{
+  if (cinfo->global_state != CSTATE_START)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+  /* (Re)initialize error mgr and destination modules */
+  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
+  (*cinfo->dest->init_destination) (cinfo);
+  /* Initialize the marker writer ... bit of a crock to do it here. */
+  jinit_marker_writer(cinfo);
+  /* Write them tables! */
+  (*cinfo->marker->write_tables_only) (cinfo);
+  /* And clean up. */
+  (*cinfo->dest->term_destination) (cinfo);
+  /*
+   * In library releases up through v6a, we called jpeg_abort() here to free
+   * any working memory allocated by the destination manager and marker
+   * writer.  Some applications had a problem with that: they allocated space
+   * of their own from the library memory manager, and didn't want it to go
+   * away during write_tables.  So now we do nothing.  This will cause a
+   * memory leak if an app calls write_tables repeatedly without doing a full
+   * compression cycle or otherwise resetting the JPEG object.  However, that
+   * seems less bad than unexpectedly freeing memory in the normal case.
+   * An app that prefers the old behavior can call jpeg_abort for itself after
+   * each call to jpeg_write_tables().
+   */
+}
diff --git a/samples/jpeglib/jcapistd.c b/samples/jpeglib/jcapistd.c
new file mode 100644
index 0000000..c0320b1
--- /dev/null
+++ b/samples/jpeglib/jcapistd.c
@@ -0,0 +1,161 @@
+/*
+ * jcapistd.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains application interface code for the compression half
+ * of the JPEG library.  These are the "standard" API routines that are
+ * used in the normal full-compression case.  They are not used by a
+ * transcoding-only application.  Note that if an application links in
+ * jpeg_start_compress, it will end up linking in the entire compressor.
+ * We thus must separate this file from jcapimin.c to avoid linking the
+ * whole compression library into a transcoder.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/*
+ * Compression initialization.
+ * Before calling this, all parameters and a data destination must be set up.
+ *
+ * We require a write_all_tables parameter as a failsafe check when writing
+ * multiple datastreams from the same compression object.  Since prior runs
+ * will have left all the tables marked sent_table=TRUE, a subsequent run
+ * would emit an abbreviated stream (no tables) by default.  This may be what
+ * is wanted, but for safety's sake it should not be the default behavior:
+ * programmers should have to make a deliberate choice to emit abbreviated
+ * images.  Therefore the documentation and examples should encourage people
+ * to pass write_all_tables=TRUE; then it will take active thought to do the
+ * wrong thing.
+ */
+
+GLOBAL(void)
+jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables)
+{
+  if (cinfo->global_state != CSTATE_START)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+  if (write_all_tables)
+    jpeg_suppress_tables(cinfo, FALSE);	/* mark all tables to be written */
+
+  /* (Re)initialize error mgr and destination modules */
+  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
+  (*cinfo->dest->init_destination) (cinfo);
+  /* Perform master selection of active modules */
+  jinit_compress_master(cinfo);
+  /* Set up for the first pass */
+  (*cinfo->master->prepare_for_pass) (cinfo);
+  /* Ready for application to drive first pass through jpeg_write_scanlines
+   * or jpeg_write_raw_data.
+   */
+  cinfo->next_scanline = 0;
+  cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING);
+}
+
+
+/*
+ * Write some scanlines of data to the JPEG compressor.
+ *
+ * The return value will be the number of lines actually written.
+ * This should be less than the supplied num_lines only in case that
+ * the data destination module has requested suspension of the compressor,
+ * or if more than image_height scanlines are passed in.
+ *
+ * Note: we warn about excess calls to jpeg_write_scanlines() since
+ * this likely signals an application programmer error.  However,
+ * excess scanlines passed in the last valid call are *silently* ignored,
+ * so that the application need not adjust num_lines for end-of-image
+ * when using a multiple-scanline buffer.
+ */
+
+GLOBAL(JDIMENSION)
+jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines,
+		      JDIMENSION num_lines)
+{
+  JDIMENSION row_ctr, rows_left;
+
+  if (cinfo->global_state != CSTATE_SCANNING)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  if (cinfo->next_scanline >= cinfo->image_height)
+    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
+
+  /* Call progress monitor hook if present */
+  if (cinfo->progress != NULL) {
+    cinfo->progress->pass_counter = (long) cinfo->next_scanline;
+    cinfo->progress->pass_limit = (long) cinfo->image_height;
+    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
+  }
+
+  /* Give master control module another chance if this is first call to
+   * jpeg_write_scanlines.  This lets output of the frame/scan headers be
+   * delayed so that application can write COM, etc, markers between
+   * jpeg_start_compress and jpeg_write_scanlines.
+   */
+  if (cinfo->master->call_pass_startup)
+    (*cinfo->master->pass_startup) (cinfo);
+
+  /* Ignore any extra scanlines at bottom of image. */
+  rows_left = cinfo->image_height - cinfo->next_scanline;
+  if (num_lines > rows_left)
+    num_lines = rows_left;
+
+  row_ctr = 0;
+  (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines);
+  cinfo->next_scanline += row_ctr;
+  return row_ctr;
+}
+
+
+/*
+ * Alternate entry point to write raw data.
+ * Processes exactly one iMCU row per call, unless suspended.
+ */
+
+GLOBAL(JDIMENSION)
+jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,
+		     JDIMENSION num_lines)
+{
+  JDIMENSION lines_per_iMCU_row;
+
+  if (cinfo->global_state != CSTATE_RAW_OK)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  if (cinfo->next_scanline >= cinfo->image_height) {
+    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
+    return 0;
+  }
+
+  /* Call progress monitor hook if present */
+  if (cinfo->progress != NULL) {
+    cinfo->progress->pass_counter = (long) cinfo->next_scanline;
+    cinfo->progress->pass_limit = (long) cinfo->image_height;
+    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
+  }
+
+  /* Give master control module another chance if this is first call to
+   * jpeg_write_raw_data.  This lets output of the frame/scan headers be
+   * delayed so that application can write COM, etc, markers between
+   * jpeg_start_compress and jpeg_write_raw_data.
+   */
+  if (cinfo->master->call_pass_startup)
+    (*cinfo->master->pass_startup) (cinfo);
+
+  /* Verify that at least one iMCU row has been passed. */
+  lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE;
+  if (num_lines < lines_per_iMCU_row)
+    ERREXIT(cinfo, JERR_BUFFER_SIZE);
+
+  /* Directly compress the row. */
+  if (! (*cinfo->coef->compress_data) (cinfo, data)) {
+    /* If compressor did not consume the whole row, suspend processing. */
+    return 0;
+  }
+
+  /* OK, we processed one iMCU row. */
+  cinfo->next_scanline += lines_per_iMCU_row;
+  return lines_per_iMCU_row;
+}
diff --git a/samples/jpeglib/jccoefct.c b/samples/jpeglib/jccoefct.c
new file mode 100644
index 0000000..1963ddb
--- /dev/null
+++ b/samples/jpeglib/jccoefct.c
@@ -0,0 +1,449 @@
+/*
+ * jccoefct.c
+ *
+ * Copyright (C) 1994-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains the coefficient buffer controller for compression.
+ * This controller is the top level of the JPEG compressor proper.
+ * The coefficient buffer lies between forward-DCT and entropy encoding steps.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* We use a full-image coefficient buffer when doing Huffman optimization,
+ * and also for writing multiple-scan JPEG files.  In all cases, the DCT
+ * step is run during the first pass, and subsequent passes need only read
+ * the buffered coefficients.
+ */
+#ifdef ENTROPY_OPT_SUPPORTED
+#define FULL_COEF_BUFFER_SUPPORTED
+#else
+#ifdef C_MULTISCAN_FILES_SUPPORTED
+#define FULL_COEF_BUFFER_SUPPORTED
+#endif
+#endif
+
+
+/* Private buffer controller object */
+
+typedef struct {
+  struct jpeg_c_coef_controller pub; /* public fields */
+
+  JDIMENSION iMCU_row_num;	/* iMCU row # within image */
+  JDIMENSION mcu_ctr;		/* counts MCUs processed in current row */
+  int MCU_vert_offset;		/* counts MCU rows within iMCU row */
+  int MCU_rows_per_iMCU_row;	/* number of such rows needed */
+
+  /* For single-pass compression, it's sufficient to buffer just one MCU
+   * (although this may prove a bit slow in practice).  We allocate a
+   * workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each
+   * MCU constructed and sent.  (On 80x86, the workspace is FAR even though
+   * it's not really very big; this is to keep the module interfaces unchanged
+   * when a large coefficient buffer is necessary.)
+   * In multi-pass modes, this array points to the current MCU's blocks
+   * within the virtual arrays.
+   */
+  JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU];
+
+  /* In multi-pass modes, we need a virtual block array for each component. */
+  jvirt_barray_ptr whole_image[MAX_COMPONENTS];
+} my_coef_controller;
+
+typedef my_coef_controller * my_coef_ptr;
+
+
+/* Forward declarations */
+METHODDEF(boolean) compress_data
+    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
+#ifdef FULL_COEF_BUFFER_SUPPORTED
+METHODDEF(boolean) compress_first_pass
+    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
+METHODDEF(boolean) compress_output
+    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
+#endif
+
+
+LOCAL(void)
+start_iMCU_row (j_compress_ptr cinfo)
+/* Reset within-iMCU-row counters for a new row */
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+
+  /* In an interleaved scan, an MCU row is the same as an iMCU row.
+   * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows.
+   * But at the bottom of the image, process only what's left.
+   */
+  if (cinfo->comps_in_scan > 1) {
+    coef->MCU_rows_per_iMCU_row = 1;
+  } else {
+    if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1))
+      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor;
+    else
+      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;
+  }
+
+  coef->mcu_ctr = 0;
+  coef->MCU_vert_offset = 0;
+}
+
+
+/*
+ * Initialize for a processing pass.
+ */
+
+METHODDEF(void)
+start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+
+  coef->iMCU_row_num = 0;
+  start_iMCU_row(cinfo);
+
+  switch (pass_mode) {
+  case JBUF_PASS_THRU:
+    if (coef->whole_image[0] != NULL)
+      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+    coef->pub.compress_data = compress_data;
+    break;
+#ifdef FULL_COEF_BUFFER_SUPPORTED
+  case JBUF_SAVE_AND_PASS:
+    if (coef->whole_image[0] == NULL)
+      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+    coef->pub.compress_data = compress_first_pass;
+    break;
+  case JBUF_CRANK_DEST:
+    if (coef->whole_image[0] == NULL)
+      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+    coef->pub.compress_data = compress_output;
+    break;
+#endif
+  default:
+    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+    break;
+  }
+}
+
+
+/*
+ * Process some data in the single-pass case.
+ * We process the equivalent of one fully interleaved MCU row ("iMCU" row)
+ * per call, ie, v_samp_factor block rows for each component in the image.
+ * Returns TRUE if the iMCU row is completed, FALSE if suspended.
+ *
+ * NB: input_buf contains a plane for each component in image,
+ * which we index according to the component's SOF position.
+ */
+
+METHODDEF(boolean)
+compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+  JDIMENSION MCU_col_num;	/* index of current MCU within row */
+  JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
+  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
+  int blkn, bi, ci, yindex, yoffset, blockcnt;
+  JDIMENSION ypos, xpos;
+  jpeg_component_info *compptr;
+
+  /* Loop to write as much as one whole iMCU row */
+  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
+       yoffset++) {
+    for (MCU_col_num = coef->mcu_ctr; MCU_col_num <= last_MCU_col;
+	 MCU_col_num++) {
+      /* Determine where data comes from in input_buf and do the DCT thing.
+       * Each call on forward_DCT processes a horizontal row of DCT blocks
+       * as wide as an MCU; we rely on having allocated the MCU_buffer[] blocks
+       * sequentially.  Dummy blocks at the right or bottom edge are filled in
+       * specially.  The data in them does not matter for image reconstruction,
+       * so we fill them with values that will encode to the smallest amount of
+       * data, viz: all zeroes in the AC entries, DC entries equal to previous
+       * block's DC value.  (Thanks to Thomas Kinsman for this idea.)
+       */
+      blkn = 0;
+      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+	compptr = cinfo->cur_comp_info[ci];
+	blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
+						: compptr->last_col_width;
+	xpos = MCU_col_num * compptr->MCU_sample_width;
+	ypos = yoffset * DCTSIZE; /* ypos == (yoffset+yindex) * DCTSIZE */
+	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
+	  if (coef->iMCU_row_num < last_iMCU_row ||
+	      yoffset+yindex < compptr->last_row_height) {
+	    (*cinfo->fdct->forward_DCT) (cinfo, compptr,
+					 input_buf[compptr->component_index],
+					 coef->MCU_buffer[blkn],
+					 ypos, xpos, (JDIMENSION) blockcnt);
+	    if (blockcnt < compptr->MCU_width) {
+	      /* Create some dummy blocks at the right edge of the image. */
+	      jzero_far((void FAR *) coef->MCU_buffer[blkn + blockcnt],
+			(compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK));
+	      for (bi = blockcnt; bi < compptr->MCU_width; bi++) {
+		coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0];
+	      }
+	    }
+	  } else {
+	    /* Create a row of dummy blocks at the bottom of the image. */
+	    jzero_far((void FAR *) coef->MCU_buffer[blkn],
+		      compptr->MCU_width * SIZEOF(JBLOCK));
+	    for (bi = 0; bi < compptr->MCU_width; bi++) {
+	      coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0];
+	    }
+	  }
+	  blkn += compptr->MCU_width;
+	  ypos += DCTSIZE;
+	}
+      }
+      /* Try to write the MCU.  In event of a suspension failure, we will
+       * re-DCT the MCU on restart (a bit inefficient, could be fixed...)
+       */
+      if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) {
+	/* Suspension forced; update state counters and exit */
+	coef->MCU_vert_offset = yoffset;
+	coef->mcu_ctr = MCU_col_num;
+	return FALSE;
+      }
+    }
+    /* Completed an MCU row, but perhaps not an iMCU row */
+    coef->mcu_ctr = 0;
+  }
+  /* Completed the iMCU row, advance counters for next one */
+  coef->iMCU_row_num++;
+  start_iMCU_row(cinfo);
+  return TRUE;
+}
+
+
+#ifdef FULL_COEF_BUFFER_SUPPORTED
+
+/*
+ * Process some data in the first pass of a multi-pass case.
+ * We process the equivalent of one fully interleaved MCU row ("iMCU" row)
+ * per call, ie, v_samp_factor block rows for each component in the image.
+ * This amount of data is read from the source buffer, DCT'd and quantized,
+ * and saved into the virtual arrays.  We also generate suitable dummy blocks
+ * as needed at the right and lower edges.  (The dummy blocks are constructed
+ * in the virtual arrays, which have been padded appropriately.)  This makes
+ * it possible for subsequent passes not to worry about real vs. dummy blocks.
+ *
+ * We must also emit the data to the entropy encoder.  This is conveniently
+ * done by calling compress_output() after we've loaded the current strip
+ * of the virtual arrays.
+ *
+ * NB: input_buf contains a plane for each component in image.  All
+ * components are DCT'd and loaded into the virtual arrays in this pass.
+ * However, it may be that only a subset of the components are emitted to
+ * the entropy encoder during this first pass; be careful about looking
+ * at the scan-dependent variables (MCU dimensions, etc).
+ */
+
+METHODDEF(boolean)
+compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
+  JDIMENSION blocks_across, MCUs_across, MCUindex;
+  int bi, ci, h_samp_factor, block_row, block_rows, ndummy;
+  JCOEF lastDC;
+  jpeg_component_info *compptr;
+  JBLOCKARRAY buffer;
+  JBLOCKROW thisblockrow, lastblockrow;
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* Align the virtual buffer for this component. */
+    buffer = (*cinfo->mem->access_virt_barray)
+      ((j_common_ptr) cinfo, coef->whole_image[ci],
+       coef->iMCU_row_num * compptr->v_samp_factor,
+       (JDIMENSION) compptr->v_samp_factor, TRUE);
+    /* Count non-dummy DCT block rows in this iMCU row. */
+    if (coef->iMCU_row_num < last_iMCU_row)
+      block_rows = compptr->v_samp_factor;
+    else {
+      /* NB: can't use last_row_height here, since may not be set! */
+      block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
+      if (block_rows == 0) block_rows = compptr->v_samp_factor;
+    }
+    blocks_across = compptr->width_in_blocks;
+    h_samp_factor = compptr->h_samp_factor;
+    /* Count number of dummy blocks to be added at the right margin. */
+    ndummy = (int) (blocks_across % h_samp_factor);
+    if (ndummy > 0)
+      ndummy = h_samp_factor - ndummy;
+    /* Perform DCT for all non-dummy blocks in this iMCU row.  Each call
+     * on forward_DCT processes a complete horizontal row of DCT blocks.
+     */
+    for (block_row = 0; block_row < block_rows; block_row++) {
+      thisblockrow = buffer[block_row];
+      (*cinfo->fdct->forward_DCT) (cinfo, compptr,
+				   input_buf[ci], thisblockrow,
+				   (JDIMENSION) (block_row * DCTSIZE),
+				   (JDIMENSION) 0, blocks_across);
+      if (ndummy > 0) {
+	/* Create dummy blocks at the right edge of the image. */
+	thisblockrow += blocks_across; /* => first dummy block */
+	jzero_far((void FAR *) thisblockrow, ndummy * SIZEOF(JBLOCK));
+	lastDC = thisblockrow[-1][0];
+	for (bi = 0; bi < ndummy; bi++) {
+	  thisblockrow[bi][0] = lastDC;
+	}
+      }
+    }
+    /* If at end of image, create dummy block rows as needed.
+     * The tricky part here is that within each MCU, we want the DC values
+     * of the dummy blocks to match the last real block's DC value.
+     * This squeezes a few more bytes out of the resulting file...
+     */
+    if (coef->iMCU_row_num == last_iMCU_row) {
+      blocks_across += ndummy;	/* include lower right corner */
+      MCUs_across = blocks_across / h_samp_factor;
+      for (block_row = block_rows; block_row < compptr->v_samp_factor;
+	   block_row++) {
+	thisblockrow = buffer[block_row];
+	lastblockrow = buffer[block_row-1];
+	jzero_far((void FAR *) thisblockrow,
+		  (size_t) (blocks_across * SIZEOF(JBLOCK)));
+	for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) {
+	  lastDC = lastblockrow[h_samp_factor-1][0];
+	  for (bi = 0; bi < h_samp_factor; bi++) {
+	    thisblockrow[bi][0] = lastDC;
+	  }
+	  thisblockrow += h_samp_factor; /* advance to next MCU in row */
+	  lastblockrow += h_samp_factor;
+	}
+      }
+    }
+  }
+  /* NB: compress_output will increment iMCU_row_num if successful.
+   * A suspension return will result in redoing all the work above next time.
+   */
+
+  /* Emit data to the entropy encoder, sharing code with subsequent passes */
+  return compress_output(cinfo, input_buf);
+}
+
+
+/*
+ * Process some data in subsequent passes of a multi-pass case.
+ * We process the equivalent of one fully interleaved MCU row ("iMCU" row)
+ * per call, ie, v_samp_factor block rows for each component in the scan.
+ * The data is obtained from the virtual arrays and fed to the entropy coder.
+ * Returns TRUE if the iMCU row is completed, FALSE if suspended.
+ *
+ * NB: input_buf is ignored; it is likely to be a NULL pointer.
+ */
+
+METHODDEF(boolean)
+compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+  JDIMENSION MCU_col_num;	/* index of current MCU within row */
+  int blkn, ci, xindex, yindex, yoffset;
+  JDIMENSION start_col;
+  JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];
+  JBLOCKROW buffer_ptr;
+  jpeg_component_info *compptr;
+
+  /* Align the virtual buffers for the components used in this scan.
+   * NB: during first pass, this is safe only because the buffers will
+   * already be aligned properly, so jmemmgr.c won't need to do any I/O.
+   */
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    compptr = cinfo->cur_comp_info[ci];
+    buffer[ci] = (*cinfo->mem->access_virt_barray)
+      ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index],
+       coef->iMCU_row_num * compptr->v_samp_factor,
+       (JDIMENSION) compptr->v_samp_factor, FALSE);
+  }
+
+  /* Loop to process one whole iMCU row */
+  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
+       yoffset++) {
+    for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;
+	 MCU_col_num++) {
+      /* Construct list of pointers to DCT blocks belonging to this MCU */
+      blkn = 0;			/* index of current DCT block within MCU */
+      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+	compptr = cinfo->cur_comp_info[ci];
+	start_col = MCU_col_num * compptr->MCU_width;
+	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
+	  buffer_ptr = buffer[ci][yindex+yoffset] + start_col;
+	  for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
+	    coef->MCU_buffer[blkn++] = buffer_ptr++;
+	  }
+	}
+      }
+      /* Try to write the MCU. */
+      if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) {
+	/* Suspension forced; update state counters and exit */
+	coef->MCU_vert_offset = yoffset;
+	coef->mcu_ctr = MCU_col_num;
+	return FALSE;
+      }
+    }
+    /* Completed an MCU row, but perhaps not an iMCU row */
+    coef->mcu_ctr = 0;
+  }
+  /* Completed the iMCU row, advance counters for next one */
+  coef->iMCU_row_num++;
+  start_iMCU_row(cinfo);
+  return TRUE;
+}
+
+#endif /* FULL_COEF_BUFFER_SUPPORTED */
+
+
+/*
+ * Initialize coefficient buffer controller.
+ */
+
+GLOBAL(void)
+jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
+{
+  my_coef_ptr coef;
+
+  coef = (my_coef_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_coef_controller));
+  cinfo->coef = (struct jpeg_c_coef_controller *) coef;
+  coef->pub.start_pass = start_pass_coef;
+
+  /* Create the coefficient buffer. */
+  if (need_full_buffer) {
+#ifdef FULL_COEF_BUFFER_SUPPORTED
+    /* Allocate a full-image virtual array for each component, */
+    /* padded to a multiple of samp_factor DCT blocks in each direction. */
+    int ci;
+    jpeg_component_info *compptr;
+
+    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+	 ci++, compptr++) {
+      coef->whole_image[ci] = (*cinfo->mem->request_virt_barray)
+	((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
+	 (JDIMENSION) jround_up((long) compptr->width_in_blocks,
+				(long) compptr->h_samp_factor),
+	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
+				(long) compptr->v_samp_factor),
+	 (JDIMENSION) compptr->v_samp_factor);
+    }
+#else
+    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+#endif
+  } else {
+    /* We only need a single-MCU buffer. */
+    JBLOCKROW buffer;
+    int i;
+
+    buffer = (JBLOCKROW)
+      (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
+    for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {
+      coef->MCU_buffer[i] = buffer + i;
+    }
+    coef->whole_image[0] = NULL; /* flag for no virtual arrays */
+  }
+}
diff --git a/samples/jpeglib/jccolor.c b/samples/jpeglib/jccolor.c
new file mode 100644
index 0000000..0a8a4b5
--- /dev/null
+++ b/samples/jpeglib/jccolor.c
@@ -0,0 +1,459 @@
+/*
+ * jccolor.c
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains input colorspace conversion routines.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Private subobject */
+
+typedef struct {
+  struct jpeg_color_converter pub; /* public fields */
+
+  /* Private state for RGB->YCC conversion */
+  INT32 * rgb_ycc_tab;		/* => table for RGB to YCbCr conversion */
+} my_color_converter;
+
+typedef my_color_converter * my_cconvert_ptr;
+
+
+/**************** RGB -> YCbCr conversion: most common case **************/
+
+/*
+ * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
+ * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
+ * The conversion equations to be implemented are therefore
+ *	Y  =  0.29900 * R + 0.58700 * G + 0.11400 * B
+ *	Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B  + CENTERJSAMPLE
+ *	Cr =  0.50000 * R - 0.41869 * G - 0.08131 * B  + CENTERJSAMPLE
+ * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
+ * Note: older versions of the IJG code used a zero offset of MAXJSAMPLE/2,
+ * rather than CENTERJSAMPLE, for Cb and Cr.  This gave equal positive and
+ * negative swings for Cb/Cr, but meant that grayscale values (Cb=Cr=0)
+ * were not represented exactly.  Now we sacrifice exact representation of
+ * maximum red and maximum blue in order to get exact grayscales.
+ *
+ * To avoid floating-point arithmetic, we represent the fractional constants
+ * as integers scaled up by 2^16 (about 4 digits precision); we have to divide
+ * the products by 2^16, with appropriate rounding, to get the correct answer.
+ *
+ * For even more speed, we avoid doing any multiplications in the inner loop
+ * by precalculating the constants times R,G,B for all possible values.
+ * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
+ * for 12-bit samples it is still acceptable.  It's not very reasonable for
+ * 16-bit samples, but if you want lossless storage you shouldn't be changing
+ * colorspace anyway.
+ * The CENTERJSAMPLE offsets and the rounding fudge-factor of 0.5 are included
+ * in the tables to save adding them separately in the inner loop.
+ */
+
+#define SCALEBITS	16	/* speediest right-shift on some machines */
+#define CBCR_OFFSET	((INT32) CENTERJSAMPLE << SCALEBITS)
+#define ONE_HALF	((INT32) 1 << (SCALEBITS-1))
+#define FIX(x)		((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
+
+/* We allocate one big table and divide it up into eight parts, instead of
+ * doing eight alloc_small requests.  This lets us use a single table base
+ * address, which can be held in a register in the inner loops on many
+ * machines (more than can hold all eight addresses, anyway).
+ */
+
+#define R_Y_OFF		0			/* offset to R => Y section */
+#define G_Y_OFF		(1*(MAXJSAMPLE+1))	/* offset to G => Y section */
+#define B_Y_OFF		(2*(MAXJSAMPLE+1))	/* etc. */
+#define R_CB_OFF	(3*(MAXJSAMPLE+1))
+#define G_CB_OFF	(4*(MAXJSAMPLE+1))
+#define B_CB_OFF	(5*(MAXJSAMPLE+1))
+#define R_CR_OFF	B_CB_OFF		/* B=>Cb, R=>Cr are the same */
+#define G_CR_OFF	(6*(MAXJSAMPLE+1))
+#define B_CR_OFF	(7*(MAXJSAMPLE+1))
+#define TABLE_SIZE	(8*(MAXJSAMPLE+1))
+
+
+/*
+ * Initialize for RGB->YCC colorspace conversion.
+ */
+
+METHODDEF(void)
+rgb_ycc_start (j_compress_ptr cinfo)
+{
+  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
+  INT32 * rgb_ycc_tab;
+  INT32 i;
+
+  /* Allocate and fill in the conversion tables. */
+  cconvert->rgb_ycc_tab = rgb_ycc_tab = (INT32 *)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				(TABLE_SIZE * SIZEOF(INT32)));
+
+  for (i = 0; i <= MAXJSAMPLE; i++) {
+    rgb_ycc_tab[i+R_Y_OFF] = FIX(0.29900) * i;
+    rgb_ycc_tab[i+G_Y_OFF] = FIX(0.58700) * i;
+    rgb_ycc_tab[i+B_Y_OFF] = FIX(0.11400) * i     + ONE_HALF;
+    rgb_ycc_tab[i+R_CB_OFF] = (-FIX(0.16874)) * i;
+    rgb_ycc_tab[i+G_CB_OFF] = (-FIX(0.33126)) * i;
+    /* We use a rounding fudge-factor of 0.5-epsilon for Cb and Cr.
+     * This ensures that the maximum output will round to MAXJSAMPLE
+     * not MAXJSAMPLE+1, and thus that we don't have to range-limit.
+     */
+    rgb_ycc_tab[i+B_CB_OFF] = FIX(0.50000) * i    + CBCR_OFFSET + ONE_HALF-1;
+/*  B=>Cb and R=>Cr tables are the same
+    rgb_ycc_tab[i+R_CR_OFF] = FIX(0.50000) * i    + CBCR_OFFSET + ONE_HALF-1;
+*/
+    rgb_ycc_tab[i+G_CR_OFF] = (-FIX(0.41869)) * i;
+    rgb_ycc_tab[i+B_CR_OFF] = (-FIX(0.08131)) * i;
+  }
+}
+
+
+/*
+ * Convert some rows of samples to the JPEG colorspace.
+ *
+ * Note that we change from the application's interleaved-pixel format
+ * to our internal noninterleaved, one-plane-per-component format.
+ * The input buffer is therefore three times as wide as the output buffer.
+ *
+ * A starting row offset is provided only for the output buffer.  The caller
+ * can easily adjust the passed input_buf value to accommodate any row
+ * offset required on that side.
+ */
+
+METHODDEF(void)
+rgb_ycc_convert (j_compress_ptr cinfo,
+		 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+		 JDIMENSION output_row, int num_rows)
+{
+  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
+  register int r, g, b;
+  register INT32 * ctab = cconvert->rgb_ycc_tab;
+  register JSAMPROW inptr;
+  register JSAMPROW outptr0, outptr1, outptr2;
+  register JDIMENSION col;
+  JDIMENSION num_cols = cinfo->image_width;
+
+  while (--num_rows >= 0) {
+    inptr = *input_buf++;
+    outptr0 = output_buf[0][output_row];
+    outptr1 = output_buf[1][output_row];
+    outptr2 = output_buf[2][output_row];
+    output_row++;
+    for (col = 0; col < num_cols; col++) {
+      r = GETJSAMPLE(inptr[RGB_RED]);
+      g = GETJSAMPLE(inptr[RGB_GREEN]);
+      b = GETJSAMPLE(inptr[RGB_BLUE]);
+      inptr += RGB_PIXELSIZE;
+      /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations
+       * must be too; we do not need an explicit range-limiting operation.
+       * Hence the value being shifted is never negative, and we don't
+       * need the general RIGHT_SHIFT macro.
+       */
+      /* Y */
+      outptr0[col] = (JSAMPLE)
+		((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])
+		 >> SCALEBITS);
+      /* Cb */
+      outptr1[col] = (JSAMPLE)
+		((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF])
+		 >> SCALEBITS);
+      /* Cr */
+      outptr2[col] = (JSAMPLE)
+		((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF])
+		 >> SCALEBITS);
+    }
+  }
+}
+
+
+/**************** Cases other than RGB -> YCbCr **************/
+
+
+/*
+ * Convert some rows of samples to the JPEG colorspace.
+ * This version handles RGB->grayscale conversion, which is the same
+ * as the RGB->Y portion of RGB->YCbCr.
+ * We assume rgb_ycc_start has been called (we only use the Y tables).
+ */
+
+METHODDEF(void)
+rgb_gray_convert (j_compress_ptr cinfo,
+		  JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+		  JDIMENSION output_row, int num_rows)
+{
+  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
+  register int r, g, b;
+  register INT32 * ctab = cconvert->rgb_ycc_tab;
+  register JSAMPROW inptr;
+  register JSAMPROW outptr;
+  register JDIMENSION col;
+  JDIMENSION num_cols = cinfo->image_width;
+
+  while (--num_rows >= 0) {
+    inptr = *input_buf++;
+    outptr = output_buf[0][output_row];
+    output_row++;
+    for (col = 0; col < num_cols; col++) {
+      r = GETJSAMPLE(inptr[RGB_RED]);
+      g = GETJSAMPLE(inptr[RGB_GREEN]);
+      b = GETJSAMPLE(inptr[RGB_BLUE]);
+      inptr += RGB_PIXELSIZE;
+      /* Y */
+      outptr[col] = (JSAMPLE)
+		((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])
+		 >> SCALEBITS);
+    }
+  }
+}
+
+
+/*
+ * Convert some rows of samples to the JPEG colorspace.
+ * This version handles Adobe-style CMYK->YCCK conversion,
+ * where we convert R=1-C, G=1-M, and B=1-Y to YCbCr using the same
+ * conversion as above, while passing K (black) unchanged.
+ * We assume rgb_ycc_start has been called.
+ */
+
+METHODDEF(void)
+cmyk_ycck_convert (j_compress_ptr cinfo,
+		   JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+		   JDIMENSION output_row, int num_rows)
+{
+  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
+  register int r, g, b;
+  register INT32 * ctab = cconvert->rgb_ycc_tab;
+  register JSAMPROW inptr;
+  register JSAMPROW outptr0, outptr1, outptr2, outptr3;
+  register JDIMENSION col;
+  JDIMENSION num_cols = cinfo->image_width;
+
+  while (--num_rows >= 0) {
+    inptr = *input_buf++;
+    outptr0 = output_buf[0][output_row];
+    outptr1 = output_buf[1][output_row];
+    outptr2 = output_buf[2][output_row];
+    outptr3 = output_buf[3][output_row];
+    output_row++;
+    for (col = 0; col < num_cols; col++) {
+      r = MAXJSAMPLE - GETJSAMPLE(inptr[0]);
+      g = MAXJSAMPLE - GETJSAMPLE(inptr[1]);
+      b = MAXJSAMPLE - GETJSAMPLE(inptr[2]);
+      /* K passes through as-is */
+      outptr3[col] = inptr[3];	/* don't need GETJSAMPLE here */
+      inptr += 4;
+      /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations
+       * must be too; we do not need an explicit range-limiting operation.
+       * Hence the value being shifted is never negative, and we don't
+       * need the general RIGHT_SHIFT macro.
+       */
+      /* Y */
+      outptr0[col] = (JSAMPLE)
+		((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])
+		 >> SCALEBITS);
+      /* Cb */
+      outptr1[col] = (JSAMPLE)
+		((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF])
+		 >> SCALEBITS);
+      /* Cr */
+      outptr2[col] = (JSAMPLE)
+		((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF])
+		 >> SCALEBITS);
+    }
+  }
+}
+
+
+/*
+ * Convert some rows of samples to the JPEG colorspace.
+ * This version handles grayscale output with no conversion.
+ * The source can be either plain grayscale or YCbCr (since Y == gray).
+ */
+
+METHODDEF(void)
+grayscale_convert (j_compress_ptr cinfo,
+		   JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+		   JDIMENSION output_row, int num_rows)
+{
+  register JSAMPROW inptr;
+  register JSAMPROW outptr;
+  register JDIMENSION col;
+  JDIMENSION num_cols = cinfo->image_width;
+  int instride = cinfo->input_components;
+
+  while (--num_rows >= 0) {
+    inptr = *input_buf++;
+    outptr = output_buf[0][output_row];
+    output_row++;
+    for (col = 0; col < num_cols; col++) {
+      outptr[col] = inptr[0];	/* don't need GETJSAMPLE() here */
+      inptr += instride;
+    }
+  }
+}
+
+
+/*
+ * Convert some rows of samples to the JPEG colorspace.
+ * This version handles multi-component colorspaces without conversion.
+ * We assume input_components == num_components.
+ */
+
+METHODDEF(void)
+null_convert (j_compress_ptr cinfo,
+	      JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+	      JDIMENSION output_row, int num_rows)
+{
+  register JSAMPROW inptr;
+  register JSAMPROW outptr;
+  register JDIMENSION col;
+  register int ci;
+  int nc = cinfo->num_components;
+  JDIMENSION num_cols = cinfo->image_width;
+
+  while (--num_rows >= 0) {
+    /* It seems fastest to make a separate pass for each component. */
+    for (ci = 0; ci < nc; ci++) {
+      inptr = *input_buf;
+      outptr = output_buf[ci][output_row];
+      for (col = 0; col < num_cols; col++) {
+	outptr[col] = inptr[ci]; /* don't need GETJSAMPLE() here */
+	inptr += nc;
+      }
+    }
+    input_buf++;
+    output_row++;
+  }
+}
+
+
+/*
+ * Empty method for start_pass.
+ */
+
+METHODDEF(void)
+null_method (j_compress_ptr cinfo)
+{
+  /* no work needed */
+}
+
+
+/*
+ * Module initialization routine for input colorspace conversion.
+ */
+
+GLOBAL(void)
+jinit_color_converter (j_compress_ptr cinfo)
+{
+  my_cconvert_ptr cconvert;
+
+  cconvert = (my_cconvert_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_color_converter));
+  cinfo->cconvert = (struct jpeg_color_converter *) cconvert;
+  /* set start_pass to null method until we find out differently */
+  cconvert->pub.start_pass = null_method;
+
+  /* Make sure input_components agrees with in_color_space */
+  switch (cinfo->in_color_space) {
+  case JCS_GRAYSCALE:
+    if (cinfo->input_components != 1)
+      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
+    break;
+
+  case JCS_RGB:
+#if RGB_PIXELSIZE != 3
+    if (cinfo->input_components != RGB_PIXELSIZE)
+      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
+    break;
+#endif /* else share code with YCbCr */
+
+  case JCS_YCbCr:
+    if (cinfo->input_components != 3)
+      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
+    break;
+
+  case JCS_CMYK:
+  case JCS_YCCK:
+    if (cinfo->input_components != 4)
+      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
+    break;
+
+  default:			/* JCS_UNKNOWN can be anything */
+    if (cinfo->input_components < 1)
+      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
+    break;
+  }
+
+  /* Check num_components, set conversion method based on requested space */
+  switch (cinfo->jpeg_color_space) {
+  case JCS_GRAYSCALE:
+    if (cinfo->num_components != 1)
+      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
+    if (cinfo->in_color_space == JCS_GRAYSCALE)
+      cconvert->pub.color_convert = grayscale_convert;
+    else if (cinfo->in_color_space == JCS_RGB) {
+      cconvert->pub.start_pass = rgb_ycc_start;
+      cconvert->pub.color_convert = rgb_gray_convert;
+    } else if (cinfo->in_color_space == JCS_YCbCr)
+      cconvert->pub.color_convert = grayscale_convert;
+    else
+      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
+    break;
+
+  case JCS_RGB:
+    if (cinfo->num_components != 3)
+      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
+    if (cinfo->in_color_space == JCS_RGB && RGB_PIXELSIZE == 3)
+      cconvert->pub.color_convert = null_convert;
+    else
+      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
+    break;
+
+  case JCS_YCbCr:
+    if (cinfo->num_components != 3)
+      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
+    if (cinfo->in_color_space == JCS_RGB) {
+      cconvert->pub.start_pass = rgb_ycc_start;
+      cconvert->pub.color_convert = rgb_ycc_convert;
+    } else if (cinfo->in_color_space == JCS_YCbCr)
+      cconvert->pub.color_convert = null_convert;
+    else
+      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
+    break;
+
+  case JCS_CMYK:
+    if (cinfo->num_components != 4)
+      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
+    if (cinfo->in_color_space == JCS_CMYK)
+      cconvert->pub.color_convert = null_convert;
+    else
+      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
+    break;
+
+  case JCS_YCCK:
+    if (cinfo->num_components != 4)
+      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
+    if (cinfo->in_color_space == JCS_CMYK) {
+      cconvert->pub.start_pass = rgb_ycc_start;
+      cconvert->pub.color_convert = cmyk_ycck_convert;
+    } else if (cinfo->in_color_space == JCS_YCCK)
+      cconvert->pub.color_convert = null_convert;
+    else
+      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
+    break;
+
+  default:			/* allow null conversion of JCS_UNKNOWN */
+    if (cinfo->jpeg_color_space != cinfo->in_color_space ||
+	cinfo->num_components != cinfo->input_components)
+      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
+    cconvert->pub.color_convert = null_convert;
+    break;
+  }
+}
diff --git a/samples/jpeglib/jcdctmgr.c b/samples/jpeglib/jcdctmgr.c
new file mode 100644
index 0000000..61fa79b
--- /dev/null
+++ b/samples/jpeglib/jcdctmgr.c
@@ -0,0 +1,387 @@
+/*
+ * jcdctmgr.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains the forward-DCT management logic.
+ * This code selects a particular DCT implementation to be used,
+ * and it performs related housekeeping chores including coefficient
+ * quantization.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdct.h"		/* Private declarations for DCT subsystem */
+
+
+/* Private subobject for this module */
+
+typedef struct {
+  struct jpeg_forward_dct pub;	/* public fields */
+
+  /* Pointer to the DCT routine actually in use */
+  forward_DCT_method_ptr do_dct;
+
+  /* The actual post-DCT divisors --- not identical to the quant table
+   * entries, because of scaling (especially for an unnormalized DCT).
+   * Each table is given in normal array order.
+   */
+  DCTELEM * divisors[NUM_QUANT_TBLS];
+
+#ifdef DCT_FLOAT_SUPPORTED
+  /* Same as above for the floating-point case. */
+  float_DCT_method_ptr do_float_dct;
+  FAST_FLOAT * float_divisors[NUM_QUANT_TBLS];
+#endif
+} my_fdct_controller;
+
+typedef my_fdct_controller * my_fdct_ptr;
+
+
+/*
+ * Initialize for a processing pass.
+ * Verify that all referenced Q-tables are present, and set up
+ * the divisor table for each one.
+ * In the current implementation, DCT of all components is done during
+ * the first pass, even if only some components will be output in the
+ * first scan.  Hence all components should be examined here.
+ */
+
+METHODDEF(void)
+start_pass_fdctmgr (j_compress_ptr cinfo)
+{
+  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
+  int ci, qtblno, i;
+  jpeg_component_info *compptr;
+  JQUANT_TBL * qtbl;
+  DCTELEM * dtbl;
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    qtblno = compptr->quant_tbl_no;
+    /* Make sure specified quantization table is present */
+    if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS ||
+	cinfo->quant_tbl_ptrs[qtblno] == NULL)
+      ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);
+    qtbl = cinfo->quant_tbl_ptrs[qtblno];
+    /* Compute divisors for this quant table */
+    /* We may do this more than once for same table, but it's not a big deal */
+    switch (cinfo->dct_method) {
+#ifdef DCT_ISLOW_SUPPORTED
+    case JDCT_ISLOW:
+      /* For LL&M IDCT method, divisors are equal to raw quantization
+       * coefficients multiplied by 8 (to counteract scaling).
+       */
+      if (fdct->divisors[qtblno] == NULL) {
+	fdct->divisors[qtblno] = (DCTELEM *)
+	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				      DCTSIZE2 * SIZEOF(DCTELEM));
+      }
+      dtbl = fdct->divisors[qtblno];
+      for (i = 0; i < DCTSIZE2; i++) {
+	dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3;
+      }
+      break;
+#endif
+#ifdef DCT_IFAST_SUPPORTED
+    case JDCT_IFAST:
+      {
+	/* For AA&N IDCT method, divisors are equal to quantization
+	 * coefficients scaled by scalefactor[row]*scalefactor[col], where
+	 *   scalefactor[0] = 1
+	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7
+	 * We apply a further scale factor of 8.
+	 */
+#define CONST_BITS 14
+	static const INT16 aanscales[DCTSIZE2] = {
+	  /* precomputed values scaled up by 14 bits */
+	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
+	  22725, 31521, 29692, 26722, 22725, 17855, 12299,  6270,
+	  21407, 29692, 27969, 25172, 21407, 16819, 11585,  5906,
+	  19266, 26722, 25172, 22654, 19266, 15137, 10426,  5315,
+	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
+	  12873, 17855, 16819, 15137, 12873, 10114,  6967,  3552,
+	   8867, 12299, 11585, 10426,  8867,  6967,  4799,  2446,
+	   4520,  6270,  5906,  5315,  4520,  3552,  2446,  1247
+	};
+	SHIFT_TEMPS
+
+	if (fdct->divisors[qtblno] == NULL) {
+	  fdct->divisors[qtblno] = (DCTELEM *)
+	    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+					DCTSIZE2 * SIZEOF(DCTELEM));
+	}
+	dtbl = fdct->divisors[qtblno];
+	for (i = 0; i < DCTSIZE2; i++) {
+	  dtbl[i] = (DCTELEM)
+	    DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i],
+				  (INT32) aanscales[i]),
+		    CONST_BITS-3);
+	}
+      }
+      break;
+#endif
+#ifdef DCT_FLOAT_SUPPORTED
+    case JDCT_FLOAT:
+      {
+	/* For float AA&N IDCT method, divisors are equal to quantization
+	 * coefficients scaled by scalefactor[row]*scalefactor[col], where
+	 *   scalefactor[0] = 1
+	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7
+	 * We apply a further scale factor of 8.
+	 * What's actually stored is 1/divisor so that the inner loop can
+	 * use a multiplication rather than a division.
+	 */
+	FAST_FLOAT * fdtbl;
+	int row, col;
+	static const double aanscalefactor[DCTSIZE] = {
+	  1.0, 1.387039845, 1.306562965, 1.175875602,
+	  1.0, 0.785694958, 0.541196100, 0.275899379
+	};
+
+	if (fdct->float_divisors[qtblno] == NULL) {
+	  fdct->float_divisors[qtblno] = (FAST_FLOAT *)
+	    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+					DCTSIZE2 * SIZEOF(FAST_FLOAT));
+	}
+	fdtbl = fdct->float_divisors[qtblno];
+	i = 0;
+	for (row = 0; row < DCTSIZE; row++) {
+	  for (col = 0; col < DCTSIZE; col++) {
+	    fdtbl[i] = (FAST_FLOAT)
+	      (1.0 / (((double) qtbl->quantval[i] *
+		       aanscalefactor[row] * aanscalefactor[col] * 8.0)));
+	    i++;
+	  }
+	}
+      }
+      break;
+#endif
+    default:
+      ERREXIT(cinfo, JERR_NOT_COMPILED);
+      break;
+    }
+  }
+}
+
+
+/*
+ * Perform forward DCT on one or more blocks of a component.
+ *
+ * The input samples are taken from the sample_data[] array starting at
+ * position start_row/start_col, and moving to the right for any additional
+ * blocks. The quantized coefficients are returned in coef_blocks[].
+ */
+
+METHODDEF(void)
+forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
+	     JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
+	     JDIMENSION start_row, JDIMENSION start_col,
+	     JDIMENSION num_blocks)
+/* This version is used for integer DCT implementations. */
+{
+  /* This routine is heavily used, so it's worth coding it tightly. */
+  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
+  forward_DCT_method_ptr do_dct = fdct->do_dct;
+  DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no];
+  DCTELEM workspace[DCTSIZE2];	/* work area for FDCT subroutine */
+  JDIMENSION bi;
+
+  sample_data += start_row;	/* fold in the vertical offset once */
+
+  for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {
+    /* Load data into workspace, applying unsigned->signed conversion */
+    { register DCTELEM *workspaceptr;
+      register JSAMPROW elemptr;
+      register int elemr;
+
+      workspaceptr = workspace;
+      for (elemr = 0; elemr < DCTSIZE; elemr++) {
+	elemptr = sample_data[elemr] + start_col;
+#if DCTSIZE == 8		/* unroll the inner loop */
+	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+#else
+	{ register int elemc;
+	  for (elemc = DCTSIZE; elemc > 0; elemc--) {
+	    *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+	  }
+	}
+#endif
+      }
+    }
+
+    /* Perform the DCT */
+    (*do_dct) (workspace);
+
+    /* Quantize/descale the coefficients, and store into coef_blocks[] */
+    { register DCTELEM temp, qval;
+      register int i;
+      register JCOEFPTR output_ptr = coef_blocks[bi];
+
+      for (i = 0; i < DCTSIZE2; i++) {
+	qval = divisors[i];
+	temp = workspace[i];
+	/* Divide the coefficient value by qval, ensuring proper rounding.
+	 * Since C does not specify the direction of rounding for negative
+	 * quotients, we have to force the dividend positive for portability.
+	 *
+	 * In most files, at least half of the output values will be zero
+	 * (at default quantization settings, more like three-quarters...)
+	 * so we should ensure that this case is fast.  On many machines,
+	 * a comparison is enough cheaper than a divide to make a special test
+	 * a win.  Since both inputs will be nonnegative, we need only test
+	 * for a < b to discover whether a/b is 0.
+	 * If your machine's division is fast enough, define FAST_DIVIDE.
+	 */
+#ifdef FAST_DIVIDE
+#define DIVIDE_BY(a,b)	a /= b
+#else
+#define DIVIDE_BY(a,b)	if (a >= b) a /= b; else a = 0
+#endif
+	if (temp < 0) {
+	  temp = -temp;
+	  temp += qval>>1;	/* for rounding */
+	  DIVIDE_BY(temp, qval);
+	  temp = -temp;
+	} else {
+	  temp += qval>>1;	/* for rounding */
+	  DIVIDE_BY(temp, qval);
+	}
+	output_ptr[i] = (JCOEF) temp;
+      }
+    }
+  }
+}
+
+
+#ifdef DCT_FLOAT_SUPPORTED
+
+METHODDEF(void)
+forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
+		   JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
+		   JDIMENSION start_row, JDIMENSION start_col,
+		   JDIMENSION num_blocks)
+/* This version is used for floating-point DCT implementations. */
+{
+  /* This routine is heavily used, so it's worth coding it tightly. */
+  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
+  float_DCT_method_ptr do_dct = fdct->do_float_dct;
+  FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no];
+  FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */
+  JDIMENSION bi;
+
+  sample_data += start_row;	/* fold in the vertical offset once */
+
+  for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {
+    /* Load data into workspace, applying unsigned->signed conversion */
+    { register FAST_FLOAT *workspaceptr;
+      register JSAMPROW elemptr;
+      register int elemr;
+
+      workspaceptr = workspace;
+      for (elemr = 0; elemr < DCTSIZE; elemr++) {
+	elemptr = sample_data[elemr] + start_col;
+#if DCTSIZE == 8		/* unroll the inner loop */
+	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+#else
+	{ register int elemc;
+	  for (elemc = DCTSIZE; elemc > 0; elemc--) {
+	    *workspaceptr++ = (FAST_FLOAT)
+	      (GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+	  }
+	}
+#endif
+      }
+    }
+
+    /* Perform the DCT */
+    (*do_dct) (workspace);
+
+    /* Quantize/descale the coefficients, and store into coef_blocks[] */
+    { register FAST_FLOAT temp;
+      register int i;
+      register JCOEFPTR output_ptr = coef_blocks[bi];
+
+      for (i = 0; i < DCTSIZE2; i++) {
+	/* Apply the quantization and scaling factor */
+	temp = workspace[i] * divisors[i];
+	/* Round to nearest integer.
+	 * Since C does not specify the direction of rounding for negative
+	 * quotients, we have to force the dividend positive for portability.
+	 * The maximum coefficient size is +-16K (for 12-bit data), so this
+	 * code should work for either 16-bit or 32-bit ints.
+	 */
+	output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384);
+      }
+    }
+  }
+}
+
+#endif /* DCT_FLOAT_SUPPORTED */
+
+
+/*
+ * Initialize FDCT manager.
+ */
+
+GLOBAL(void)
+jinit_forward_dct (j_compress_ptr cinfo)
+{
+  my_fdct_ptr fdct;
+  int i;
+
+  fdct = (my_fdct_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_fdct_controller));
+  cinfo->fdct = (struct jpeg_forward_dct *) fdct;
+  fdct->pub.start_pass = start_pass_fdctmgr;
+
+  switch (cinfo->dct_method) {
+#ifdef DCT_ISLOW_SUPPORTED
+  case JDCT_ISLOW:
+    fdct->pub.forward_DCT = forward_DCT;
+    fdct->do_dct = jpeg_fdct_islow;
+    break;
+#endif
+#ifdef DCT_IFAST_SUPPORTED
+  case JDCT_IFAST:
+    fdct->pub.forward_DCT = forward_DCT;
+    fdct->do_dct = jpeg_fdct_ifast;
+    break;
+#endif
+#ifdef DCT_FLOAT_SUPPORTED
+  case JDCT_FLOAT:
+    fdct->pub.forward_DCT = forward_DCT_float;
+    fdct->do_float_dct = jpeg_fdct_float;
+    break;
+#endif
+  default:
+    ERREXIT(cinfo, JERR_NOT_COMPILED);
+    break;
+  }
+
+  /* Mark divisor tables unallocated */
+  for (i = 0; i < NUM_QUANT_TBLS; i++) {
+    fdct->divisors[i] = NULL;
+#ifdef DCT_FLOAT_SUPPORTED
+    fdct->float_divisors[i] = NULL;
+#endif
+  }
+}
diff --git a/samples/jpeglib/jchuff.c b/samples/jpeglib/jchuff.c
new file mode 100644
index 0000000..f235250
--- /dev/null
+++ b/samples/jpeglib/jchuff.c
@@ -0,0 +1,909 @@
+/*
+ * jchuff.c
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains Huffman entropy encoding routines.
+ *
+ * Much of the complexity here has to do with supporting output suspension.
+ * If the data destination module demands suspension, we want to be able to
+ * back up to the start of the current MCU.  To do this, we copy state
+ * variables into local working storage, and update them back to the
+ * permanent JPEG objects only upon successful completion of an MCU.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jchuff.h"		/* Declarations shared with jcphuff.c */
+
+
+/* Expanded entropy encoder object for Huffman encoding.
+ *
+ * The savable_state subrecord contains fields that change within an MCU,
+ * but must not be updated permanently until we complete the MCU.
+ */
+
+typedef struct {
+  INT32 put_buffer;		/* current bit-accumulation buffer */
+  int put_bits;			/* # of bits now in it */
+  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
+} savable_state;
+
+/* This macro is to work around compilers with missing or broken
+ * structure assignment.  You'll need to fix this code if you have
+ * such a compiler and you change MAX_COMPS_IN_SCAN.
+ */
+
+#ifndef NO_STRUCT_ASSIGN
+#define ASSIGN_STATE(dest,src)  ((dest) = (src))
+#else
+#if MAX_COMPS_IN_SCAN == 4
+#define ASSIGN_STATE(dest,src)  \
+	((dest).put_buffer = (src).put_buffer, \
+	 (dest).put_bits = (src).put_bits, \
+	 (dest).last_dc_val[0] = (src).last_dc_val[0], \
+	 (dest).last_dc_val[1] = (src).last_dc_val[1], \
+	 (dest).last_dc_val[2] = (src).last_dc_val[2], \
+	 (dest).last_dc_val[3] = (src).last_dc_val[3])
+#endif
+#endif
+
+
+typedef struct {
+  struct jpeg_entropy_encoder pub; /* public fields */
+
+  savable_state saved;		/* Bit buffer & DC state at start of MCU */
+
+  /* These fields are NOT loaded into local working state. */
+  unsigned int restarts_to_go;	/* MCUs left in this restart interval */
+  int next_restart_num;		/* next restart number to write (0-7) */
+
+  /* Pointers to derived tables (these workspaces have image lifespan) */
+  c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS];
+  c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS];
+
+#ifdef ENTROPY_OPT_SUPPORTED	/* Statistics tables for optimization */
+  long * dc_count_ptrs[NUM_HUFF_TBLS];
+  long * ac_count_ptrs[NUM_HUFF_TBLS];
+#endif
+} huff_entropy_encoder;
+
+typedef huff_entropy_encoder * huff_entropy_ptr;
+
+/* Working state while writing an MCU.
+ * This struct contains all the fields that are needed by subroutines.
+ */
+
+typedef struct {
+  JOCTET * next_output_byte;	/* => next byte to write in buffer */
+  size_t free_in_buffer;	/* # of byte spaces remaining in buffer */
+  savable_state cur;		/* Current bit buffer & DC state */
+  j_compress_ptr cinfo;		/* dump_buffer needs access to this */
+} working_state;
+
+
+/* Forward declarations */
+METHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo,
+					JBLOCKROW *MCU_data));
+METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo));
+#ifdef ENTROPY_OPT_SUPPORTED
+METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,
+					  JBLOCKROW *MCU_data));
+METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));
+#endif
+
+
+/*
+ * Initialize for a Huffman-compressed scan.
+ * If gather_statistics is TRUE, we do not output anything during the scan,
+ * just count the Huffman symbols used and generate Huffman code tables.
+ */
+
+METHODDEF(void)
+start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)
+{
+  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+  int ci, dctbl, actbl;
+  jpeg_component_info * compptr;
+
+  if (gather_statistics) {
+#ifdef ENTROPY_OPT_SUPPORTED
+    entropy->pub.encode_mcu = encode_mcu_gather;
+    entropy->pub.finish_pass = finish_pass_gather;
+#else
+    ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+  } else {
+    entropy->pub.encode_mcu = encode_mcu_huff;
+    entropy->pub.finish_pass = finish_pass_huff;
+  }
+
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    compptr = cinfo->cur_comp_info[ci];
+    dctbl = compptr->dc_tbl_no;
+    actbl = compptr->ac_tbl_no;
+    if (gather_statistics) {
+#ifdef ENTROPY_OPT_SUPPORTED
+      /* Check for invalid table indexes */
+      /* (make_c_derived_tbl does this in the other path) */
+      if (dctbl < 0 || dctbl >= NUM_HUFF_TBLS)
+	ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, dctbl);
+      if (actbl < 0 || actbl >= NUM_HUFF_TBLS)
+	ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, actbl);
+      /* Allocate and zero the statistics tables */
+      /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */
+      if (entropy->dc_count_ptrs[dctbl] == NULL)
+	entropy->dc_count_ptrs[dctbl] = (long *)
+	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				      257 * SIZEOF(long));
+      MEMZERO(entropy->dc_count_ptrs[dctbl], 257 * SIZEOF(long));
+      if (entropy->ac_count_ptrs[actbl] == NULL)
+	entropy->ac_count_ptrs[actbl] = (long *)
+	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				      257 * SIZEOF(long));
+      MEMZERO(entropy->ac_count_ptrs[actbl], 257 * SIZEOF(long));
+#endif
+    } else {
+      /* Compute derived values for Huffman tables */
+      /* We may do this more than once for a table, but it's not expensive */
+      jpeg_make_c_derived_tbl(cinfo, TRUE, dctbl,
+			      & entropy->dc_derived_tbls[dctbl]);
+      jpeg_make_c_derived_tbl(cinfo, FALSE, actbl,
+			      & entropy->ac_derived_tbls[actbl]);
+    }
+    /* Initialize DC predictions to 0 */
+    entropy->saved.last_dc_val[ci] = 0;
+  }
+
+  /* Initialize bit buffer to empty */
+  entropy->saved.put_buffer = 0;
+  entropy->saved.put_bits = 0;
+
+  /* Initialize restart stuff */
+  entropy->restarts_to_go = cinfo->restart_interval;
+  entropy->next_restart_num = 0;
+}
+
+
+/*
+ * Compute the derived values for a Huffman table.
+ * This routine also performs some validation checks on the table.
+ *
+ * Note this is also used by jcphuff.c.
+ */
+
+GLOBAL(void)
+jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
+			 c_derived_tbl ** pdtbl)
+{
+  JHUFF_TBL *htbl;
+  c_derived_tbl *dtbl;
+  int p, i, l, lastp, si, maxsymbol;
+  char huffsize[257];
+  unsigned int huffcode[257];
+  unsigned int code;
+
+  /* Note that huffsize[] and huffcode[] are filled in code-length order,
+   * paralleling the order of the symbols themselves in htbl->huffval[].
+   */
+
+  /* Find the input Huffman table */
+  if (tblno < 0 || tblno >= NUM_HUFF_TBLS)
+    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);
+  htbl =
+    isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno];
+  if (htbl == NULL)
+    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);
+
+  /* Allocate a workspace if we haven't already done so. */
+  if (*pdtbl == NULL)
+    *pdtbl = (c_derived_tbl *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  SIZEOF(c_derived_tbl));
+  dtbl = *pdtbl;
+  
+  /* Figure C.1: make table of Huffman code length for each symbol */
+
+  p = 0;
+  for (l = 1; l <= 16; l++) {
+    i = (int) htbl->bits[l];
+    if (i < 0 || p + i > 256)	/* protect against table overrun */
+      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+    while (i--)
+      huffsize[p++] = (char) l;
+  }
+  huffsize[p] = 0;
+  lastp = p;
+  
+  /* Figure C.2: generate the codes themselves */
+  /* We also validate that the counts represent a legal Huffman code tree. */
+
+  code = 0;
+  si = huffsize[0];
+  p = 0;
+  while (huffsize[p]) {
+    while (((int) huffsize[p]) == si) {
+      huffcode[p++] = code;
+      code++;
+    }
+    /* code is now 1 more than the last code used for codelength si; but
+     * it must still fit in si bits, since no code is allowed to be all ones.
+     */
+    if (((INT32) code) >= (((INT32) 1) << si))
+      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+    code <<= 1;
+    si++;
+  }
+  
+  /* Figure C.3: generate encoding tables */
+  /* These are code and size indexed by symbol value */
+
+  /* Set all codeless symbols to have code length 0;
+   * this lets us detect duplicate VAL entries here, and later
+   * allows emit_bits to detect any attempt to emit such symbols.
+   */
+  MEMZERO(dtbl->ehufsi, SIZEOF(dtbl->ehufsi));
+
+  /* This is also a convenient place to check for out-of-range
+   * and duplicated VAL entries.  We allow 0..255 for AC symbols
+   * but only 0..15 for DC.  (We could constrain them further
+   * based on data depth and mode, but this seems enough.)
+   */
+  maxsymbol = isDC ? 15 : 255;
+
+  for (p = 0; p < lastp; p++) {
+    i = htbl->huffval[p];
+    if (i < 0 || i > maxsymbol || dtbl->ehufsi[i])
+      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+    dtbl->ehufco[i] = huffcode[p];
+    dtbl->ehufsi[i] = huffsize[p];
+  }
+}
+
+
+/* Outputting bytes to the file */
+
+/* Emit a byte, taking 'action' if must suspend. */
+#define emit_byte(state,val,action)  \
+	{ *(state)->next_output_byte++ = (JOCTET) (val);  \
+	  if (--(state)->free_in_buffer == 0)  \
+	    if (! dump_buffer(state))  \
+	      { action; } }
+
+
+LOCAL(boolean)
+dump_buffer (working_state * state)
+/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */
+{
+  struct jpeg_destination_mgr * dest = state->cinfo->dest;
+
+  if (! (*dest->empty_output_buffer) (state->cinfo))
+    return FALSE;
+  /* After a successful buffer dump, must reset buffer pointers */
+  state->next_output_byte = dest->next_output_byte;
+  state->free_in_buffer = dest->free_in_buffer;
+  return TRUE;
+}
+
+
+/* Outputting bits to the file */
+
+/* Only the right 24 bits of put_buffer are used; the valid bits are
+ * left-justified in this part.  At most 16 bits can be passed to emit_bits
+ * in one call, and we never retain more than 7 bits in put_buffer
+ * between calls, so 24 bits are sufficient.
+ */
+
+INLINE
+LOCAL(boolean)
+emit_bits (working_state * state, unsigned int code, int size)
+/* Emit some bits; return TRUE if successful, FALSE if must suspend */
+{
+  /* This routine is heavily used, so it's worth coding tightly. */
+  register INT32 put_buffer = (INT32) code;
+  register int put_bits = state->cur.put_bits;
+
+  /* if size is 0, caller used an invalid Huffman table entry */
+  if (size == 0)
+    ERREXIT(state->cinfo, JERR_HUFF_MISSING_CODE);
+
+  put_buffer &= (((INT32) 1)<<size) - 1; /* mask off any extra bits in code */
+  
+  put_bits += size;		/* new number of bits in buffer */
+  
+  put_buffer <<= 24 - put_bits; /* align incoming bits */
+
+  put_buffer |= state->cur.put_buffer; /* and merge with old buffer contents */
+  
+  while (put_bits >= 8) {
+    int c = (int) ((put_buffer >> 16) & 0xFF);
+    
+    emit_byte(state, c, return FALSE);
+    if (c == 0xFF) {		/* need to stuff a zero byte? */
+      emit_byte(state, 0, return FALSE);
+    }
+    put_buffer <<= 8;
+    put_bits -= 8;
+  }
+
+  state->cur.put_buffer = put_buffer; /* update state variables */
+  state->cur.put_bits = put_bits;
+
+  return TRUE;
+}
+
+
+LOCAL(boolean)
+flush_bits (working_state * state)
+{
+  if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */
+    return FALSE;
+  state->cur.put_buffer = 0;	/* and reset bit-buffer to empty */
+  state->cur.put_bits = 0;
+  return TRUE;
+}
+
+
+/* Encode a single block's worth of coefficients */
+
+LOCAL(boolean)
+encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
+		  c_derived_tbl *dctbl, c_derived_tbl *actbl)
+{
+  register int temp, temp2;
+  register int nbits;
+  register int k, r, i;
+  
+  /* Encode the DC coefficient difference per section F.1.2.1 */
+  
+  temp = temp2 = block[0] - last_dc_val;
+
+  if (temp < 0) {
+    temp = -temp;		/* temp is abs value of input */
+    /* For a negative input, want temp2 = bitwise complement of abs(input) */
+    /* This code assumes we are on a two's complement machine */
+    temp2--;
+  }
+  
+  /* Find the number of bits needed for the magnitude of the coefficient */
+  nbits = 0;
+  while (temp) {
+    nbits++;
+    temp >>= 1;
+  }
+  /* Check for out-of-range coefficient values.
+   * Since we're encoding a difference, the range limit is twice as much.
+   */
+  if (nbits > MAX_COEF_BITS+1)
+    ERREXIT(state->cinfo, JERR_BAD_DCT_COEF);
+  
+  /* Emit the Huffman-coded symbol for the number of bits */
+  if (! emit_bits(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits]))
+    return FALSE;
+
+  /* Emit that number of bits of the value, if positive, */
+  /* or the complement of its magnitude, if negative. */
+  if (nbits)			/* emit_bits rejects calls with size 0 */
+    if (! emit_bits(state, (unsigned int) temp2, nbits))
+      return FALSE;
+
+  /* Encode the AC coefficients per section F.1.2.2 */
+  
+  r = 0;			/* r = run length of zeros */
+  
+  for (k = 1; k < DCTSIZE2; k++) {
+    if ((temp = block[jpeg_natural_order[k]]) == 0) {
+      r++;
+    } else {
+      /* if run length > 15, must emit special run-length-16 codes (0xF0) */
+      while (r > 15) {
+	if (! emit_bits(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0]))
+	  return FALSE;
+	r -= 16;
+      }
+
+      temp2 = temp;
+      if (temp < 0) {
+	temp = -temp;		/* temp is abs value of input */
+	/* This code assumes we are on a two's complement machine */
+	temp2--;
+      }
+      
+      /* Find the number of bits needed for the magnitude of the coefficient */
+      nbits = 1;		/* there must be at least one 1 bit */
+      while ((temp >>= 1))
+	nbits++;
+      /* Check for out-of-range coefficient values */
+      if (nbits > MAX_COEF_BITS)
+	ERREXIT(state->cinfo, JERR_BAD_DCT_COEF);
+      
+      /* Emit Huffman symbol for run length / number of bits */
+      i = (r << 4) + nbits;
+      if (! emit_bits(state, actbl->ehufco[i], actbl->ehufsi[i]))
+	return FALSE;
+
+      /* Emit that number of bits of the value, if positive, */
+      /* or the complement of its magnitude, if negative. */
+      if (! emit_bits(state, (unsigned int) temp2, nbits))
+	return FALSE;
+      
+      r = 0;
+    }
+  }
+
+  /* If the last coef(s) were zero, emit an end-of-block code */
+  if (r > 0)
+    if (! emit_bits(state, actbl->ehufco[0], actbl->ehufsi[0]))
+      return FALSE;
+
+  return TRUE;
+}
+
+
+/*
+ * Emit a restart marker & resynchronize predictions.
+ */
+
+LOCAL(boolean)
+emit_restart (working_state * state, int restart_num)
+{
+  int ci;
+
+  if (! flush_bits(state))
+    return FALSE;
+
+  emit_byte(state, 0xFF, return FALSE);
+  emit_byte(state, JPEG_RST0 + restart_num, return FALSE);
+
+  /* Re-initialize DC predictions to 0 */
+  for (ci = 0; ci < state->cinfo->comps_in_scan; ci++)
+    state->cur.last_dc_val[ci] = 0;
+
+  /* The restart counter is not updated until we successfully write the MCU. */
+
+  return TRUE;
+}
+
+
+/*
+ * Encode and output one MCU's worth of Huffman-compressed coefficients.
+ */
+
+METHODDEF(boolean)
+encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+  working_state state;
+  int blkn, ci;
+  jpeg_component_info * compptr;
+
+  /* Load up working state */
+  state.next_output_byte = cinfo->dest->next_output_byte;
+  state.free_in_buffer = cinfo->dest->free_in_buffer;
+  ASSIGN_STATE(state.cur, entropy->saved);
+  state.cinfo = cinfo;
+
+  /* Emit restart marker if needed */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0)
+      if (! emit_restart(&state, entropy->next_restart_num))
+	return FALSE;
+  }
+
+  /* Encode the MCU data blocks */
+  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+    ci = cinfo->MCU_membership[blkn];
+    compptr = cinfo->cur_comp_info[ci];
+    if (! encode_one_block(&state,
+			   MCU_data[blkn][0], state.cur.last_dc_val[ci],
+			   entropy->dc_derived_tbls[compptr->dc_tbl_no],
+			   entropy->ac_derived_tbls[compptr->ac_tbl_no]))
+      return FALSE;
+    /* Update last_dc_val */
+    state.cur.last_dc_val[ci] = MCU_data[blkn][0][0];
+  }
+
+  /* Completed MCU, so update state */
+  cinfo->dest->next_output_byte = state.next_output_byte;
+  cinfo->dest->free_in_buffer = state.free_in_buffer;
+  ASSIGN_STATE(entropy->saved, state.cur);
+
+  /* Update restart-interval state too */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0) {
+      entropy->restarts_to_go = cinfo->restart_interval;
+      entropy->next_restart_num++;
+      entropy->next_restart_num &= 7;
+    }
+    entropy->restarts_to_go--;
+  }
+
+  return TRUE;
+}
+
+
+/*
+ * Finish up at the end of a Huffman-compressed scan.
+ */
+
+METHODDEF(void)
+finish_pass_huff (j_compress_ptr cinfo)
+{
+  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+  working_state state;
+
+  /* Load up working state ... flush_bits needs it */
+  state.next_output_byte = cinfo->dest->next_output_byte;
+  state.free_in_buffer = cinfo->dest->free_in_buffer;
+  ASSIGN_STATE(state.cur, entropy->saved);
+  state.cinfo = cinfo;
+
+  /* Flush out the last data */
+  if (! flush_bits(&state))
+    ERREXIT(cinfo, JERR_CANT_SUSPEND);
+
+  /* Update state */
+  cinfo->dest->next_output_byte = state.next_output_byte;
+  cinfo->dest->free_in_buffer = state.free_in_buffer;
+  ASSIGN_STATE(entropy->saved, state.cur);
+}
+
+
+/*
+ * Huffman coding optimization.
+ *
+ * We first scan the supplied data and count the number of uses of each symbol
+ * that is to be Huffman-coded. (This process MUST agree with the code above.)
+ * Then we build a Huffman coding tree for the observed counts.
+ * Symbols which are not needed at all for the particular image are not
+ * assigned any code, which saves space in the DHT marker as well as in
+ * the compressed data.
+ */
+
+#ifdef ENTROPY_OPT_SUPPORTED
+
+
+/* Process a single block's worth of coefficients */
+
+LOCAL(void)
+htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val,
+		 long dc_counts[], long ac_counts[])
+{
+  register int temp;
+  register int nbits;
+  register int k, r;
+  
+  /* Encode the DC coefficient difference per section F.1.2.1 */
+  
+  temp = block[0] - last_dc_val;
+  if (temp < 0)
+    temp = -temp;
+  
+  /* Find the number of bits needed for the magnitude of the coefficient */
+  nbits = 0;
+  while (temp) {
+    nbits++;
+    temp >>= 1;
+  }
+  /* Check for out-of-range coefficient values.
+   * Since we're encoding a difference, the range limit is twice as much.
+   */
+  if (nbits > MAX_COEF_BITS+1)
+    ERREXIT(cinfo, JERR_BAD_DCT_COEF);
+
+  /* Count the Huffman symbol for the number of bits */
+  dc_counts[nbits]++;
+  
+  /* Encode the AC coefficients per section F.1.2.2 */
+  
+  r = 0;			/* r = run length of zeros */
+  
+  for (k = 1; k < DCTSIZE2; k++) {
+    if ((temp = block[jpeg_natural_order[k]]) == 0) {
+      r++;
+    } else {
+      /* if run length > 15, must emit special run-length-16 codes (0xF0) */
+      while (r > 15) {
+	ac_counts[0xF0]++;
+	r -= 16;
+      }
+      
+      /* Find the number of bits needed for the magnitude of the coefficient */
+      if (temp < 0)
+	temp = -temp;
+      
+      /* Find the number of bits needed for the magnitude of the coefficient */
+      nbits = 1;		/* there must be at least one 1 bit */
+      while ((temp >>= 1))
+	nbits++;
+      /* Check for out-of-range coefficient values */
+      if (nbits > MAX_COEF_BITS)
+	ERREXIT(cinfo, JERR_BAD_DCT_COEF);
+      
+      /* Count Huffman symbol for run length / number of bits */
+      ac_counts[(r << 4) + nbits]++;
+      
+      r = 0;
+    }
+  }
+
+  /* If the last coef(s) were zero, emit an end-of-block code */
+  if (r > 0)
+    ac_counts[0]++;
+}
+
+
+/*
+ * Trial-encode one MCU's worth of Huffman-compressed coefficients.
+ * No data is actually output, so no suspension return is possible.
+ */
+
+METHODDEF(boolean)
+encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+  int blkn, ci;
+  jpeg_component_info * compptr;
+
+  /* Take care of restart intervals if needed */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0) {
+      /* Re-initialize DC predictions to 0 */
+      for (ci = 0; ci < cinfo->comps_in_scan; ci++)
+	entropy->saved.last_dc_val[ci] = 0;
+      /* Update restart state */
+      entropy->restarts_to_go = cinfo->restart_interval;
+    }
+    entropy->restarts_to_go--;
+  }
+
+  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+    ci = cinfo->MCU_membership[blkn];
+    compptr = cinfo->cur_comp_info[ci];
+    htest_one_block(cinfo, MCU_data[blkn][0], entropy->saved.last_dc_val[ci],
+		    entropy->dc_count_ptrs[compptr->dc_tbl_no],
+		    entropy->ac_count_ptrs[compptr->ac_tbl_no]);
+    entropy->saved.last_dc_val[ci] = MCU_data[blkn][0][0];
+  }
+
+  return TRUE;
+}
+
+
+/*
+ * Generate the best Huffman code table for the given counts, fill htbl.
+ * Note this is also used by jcphuff.c.
+ *
+ * The JPEG standard requires that no symbol be assigned a codeword of all
+ * one bits (so that padding bits added at the end of a compressed segment
+ * can't look like a valid code).  Because of the canonical ordering of
+ * codewords, this just means that there must be an unused slot in the
+ * longest codeword length category.  Section K.2 of the JPEG spec suggests
+ * reserving such a slot by pretending that symbol 256 is a valid symbol
+ * with count 1.  In theory that's not optimal; giving it count zero but
+ * including it in the symbol set anyway should give a better Huffman code.
+ * But the theoretically better code actually seems to come out worse in
+ * practice, because it produces more all-ones bytes (which incur stuffed
+ * zero bytes in the final file).  In any case the difference is tiny.
+ *
+ * The JPEG standard requires Huffman codes to be no more than 16 bits long.
+ * If some symbols have a very small but nonzero probability, the Huffman tree
+ * must be adjusted to meet the code length restriction.  We currently use
+ * the adjustment method suggested in JPEG section K.2.  This method is *not*
+ * optimal; it may not choose the best possible limited-length code.  But
+ * typically only very-low-frequency symbols will be given less-than-optimal
+ * lengths, so the code is almost optimal.  Experimental comparisons against
+ * an optimal limited-length-code algorithm indicate that the difference is
+ * microscopic --- usually less than a hundredth of a percent of total size.
+ * So the extra complexity of an optimal algorithm doesn't seem worthwhile.
+ */
+
+GLOBAL(void)
+jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])
+{
+#define MAX_CLEN 32		/* assumed maximum initial code length */
+  UINT8 bits[MAX_CLEN+1];	/* bits[k] = # of symbols with code length k */
+  int codesize[257];		/* codesize[k] = code length of symbol k */
+  int others[257];		/* next symbol in current branch of tree */
+  int c1, c2;
+  int p, i, j;
+  long v;
+
+  /* This algorithm is explained in section K.2 of the JPEG standard */
+
+  MEMZERO(bits, SIZEOF(bits));
+  MEMZERO(codesize, SIZEOF(codesize));
+  for (i = 0; i < 257; i++)
+    others[i] = -1;		/* init links to empty */
+  
+  freq[256] = 1;		/* make sure 256 has a nonzero count */
+  /* Including the pseudo-symbol 256 in the Huffman procedure guarantees
+   * that no real symbol is given code-value of all ones, because 256
+   * will be placed last in the largest codeword category.
+   */
+
+  /* Huffman's basic algorithm to assign optimal code lengths to symbols */
+
+  for (;;) {
+    /* Find the smallest nonzero frequency, set c1 = its symbol */
+    /* In case of ties, take the larger symbol number */
+    c1 = -1;
+    v = 1000000000L;
+    for (i = 0; i <= 256; i++) {
+      if (freq[i] && freq[i] <= v) {
+	v = freq[i];
+	c1 = i;
+      }
+    }
+
+    /* Find the next smallest nonzero frequency, set c2 = its symbol */
+    /* In case of ties, take the larger symbol number */
+    c2 = -1;
+    v = 1000000000L;
+    for (i = 0; i <= 256; i++) {
+      if (freq[i] && freq[i] <= v && i != c1) {
+	v = freq[i];
+	c2 = i;
+      }
+    }
+
+    /* Done if we've merged everything into one frequency */
+    if (c2 < 0)
+      break;
+    
+    /* Else merge the two counts/trees */
+    freq[c1] += freq[c2];
+    freq[c2] = 0;
+
+    /* Increment the codesize of everything in c1's tree branch */
+    codesize[c1]++;
+    while (others[c1] >= 0) {
+      c1 = others[c1];
+      codesize[c1]++;
+    }
+    
+    others[c1] = c2;		/* chain c2 onto c1's tree branch */
+    
+    /* Increment the codesize of everything in c2's tree branch */
+    codesize[c2]++;
+    while (others[c2] >= 0) {
+      c2 = others[c2];
+      codesize[c2]++;
+    }
+  }
+
+  /* Now count the number of symbols of each code length */
+  for (i = 0; i <= 256; i++) {
+    if (codesize[i]) {
+      /* The JPEG standard seems to think that this can't happen, */
+      /* but I'm paranoid... */
+      if (codesize[i] > MAX_CLEN)
+	ERREXIT(cinfo, JERR_HUFF_CLEN_OVERFLOW);
+
+      bits[codesize[i]]++;
+    }
+  }
+
+  /* JPEG doesn't allow symbols with code lengths over 16 bits, so if the pure
+   * Huffman procedure assigned any such lengths, we must adjust the coding.
+   * Here is what the JPEG spec says about how this next bit works:
+   * Since symbols are paired for the longest Huffman code, the symbols are
+   * removed from this length category two at a time.  The prefix for the pair
+   * (which is one bit shorter) is allocated to one of the pair; then,
+   * skipping the BITS entry for that prefix length, a code word from the next
+   * shortest nonzero BITS entry is converted into a prefix for two code words
+   * one bit longer.
+   */
+  
+  for (i = MAX_CLEN; i > 16; i--) {
+    while (bits[i] > 0) {
+      j = i - 2;		/* find length of new prefix to be used */
+      while (bits[j] == 0)
+	j--;
+      
+      bits[i] -= 2;		/* remove two symbols */
+      bits[i-1]++;		/* one goes in this length */
+      bits[j+1] += 2;		/* two new symbols in this length */
+      bits[j]--;		/* symbol of this length is now a prefix */
+    }
+  }
+
+  /* Remove the count for the pseudo-symbol 256 from the largest codelength */
+  while (bits[i] == 0)		/* find largest codelength still in use */
+    i--;
+  bits[i]--;
+  
+  /* Return final symbol counts (only for lengths 0..16) */
+  MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits));
+  
+  /* Return a list of the symbols sorted by code length */
+  /* It's not real clear to me why we don't need to consider the codelength
+   * changes made above, but the JPEG spec seems to think this works.
+   */
+  p = 0;
+  for (i = 1; i <= MAX_CLEN; i++) {
+    for (j = 0; j <= 255; j++) {
+      if (codesize[j] == i) {
+	htbl->huffval[p] = (UINT8) j;
+	p++;
+      }
+    }
+  }
+
+  /* Set sent_table FALSE so updated table will be written to JPEG file. */
+  htbl->sent_table = FALSE;
+}
+
+
+/*
+ * Finish up a statistics-gathering pass and create the new Huffman tables.
+ */
+
+METHODDEF(void)
+finish_pass_gather (j_compress_ptr cinfo)
+{
+  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+  int ci, dctbl, actbl;
+  jpeg_component_info * compptr;
+  JHUFF_TBL **htblptr;
+  boolean did_dc[NUM_HUFF_TBLS];
+  boolean did_ac[NUM_HUFF_TBLS];
+
+  /* It's important not to apply jpeg_gen_optimal_table more than once
+   * per table, because it clobbers the input frequency counts!
+   */
+  MEMZERO(did_dc, SIZEOF(did_dc));
+  MEMZERO(did_ac, SIZEOF(did_ac));
+
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    compptr = cinfo->cur_comp_info[ci];
+    dctbl = compptr->dc_tbl_no;
+    actbl = compptr->ac_tbl_no;
+    if (! did_dc[dctbl]) {
+      htblptr = & cinfo->dc_huff_tbl_ptrs[dctbl];
+      if (*htblptr == NULL)
+	*htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
+      jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[dctbl]);
+      did_dc[dctbl] = TRUE;
+    }
+    if (! did_ac[actbl]) {
+      htblptr = & cinfo->ac_huff_tbl_ptrs[actbl];
+      if (*htblptr == NULL)
+	*htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
+      jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[actbl]);
+      did_ac[actbl] = TRUE;
+    }
+  }
+}
+
+
+#endif /* ENTROPY_OPT_SUPPORTED */
+
+
+/*
+ * Module initialization routine for Huffman entropy encoding.
+ */
+
+GLOBAL(void)
+jinit_huff_encoder (j_compress_ptr cinfo)
+{
+  huff_entropy_ptr entropy;
+  int i;
+
+  entropy = (huff_entropy_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(huff_entropy_encoder));
+  cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;
+  entropy->pub.start_pass = start_pass_huff;
+
+  /* Mark tables unallocated */
+  for (i = 0; i < NUM_HUFF_TBLS; i++) {
+    entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
+#ifdef ENTROPY_OPT_SUPPORTED
+    entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL;
+#endif
+  }
+}
diff --git a/samples/jpeglib/jchuff.h b/samples/jpeglib/jchuff.h
new file mode 100644
index 0000000..a9599fc
--- /dev/null
+++ b/samples/jpeglib/jchuff.h
@@ -0,0 +1,47 @@
+/*
+ * jchuff.h
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains declarations for Huffman entropy encoding routines
+ * that are shared between the sequential encoder (jchuff.c) and the
+ * progressive encoder (jcphuff.c).  No other modules need to see these.
+ */
+
+/* The legal range of a DCT coefficient is
+ *  -1024 .. +1023  for 8-bit data;
+ * -16384 .. +16383 for 12-bit data.
+ * Hence the magnitude should always fit in 10 or 14 bits respectively.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+#define MAX_COEF_BITS 10
+#else
+#define MAX_COEF_BITS 14
+#endif
+
+/* Derived data constructed for each Huffman table */
+
+typedef struct {
+  unsigned int ehufco[256];	/* code for each symbol */
+  char ehufsi[256];		/* length of code for each symbol */
+  /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */
+} c_derived_tbl;
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jpeg_make_c_derived_tbl	jMkCDerived
+#define jpeg_gen_optimal_table	jGenOptTbl
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+/* Expand a Huffman table definition into the derived format */
+EXTERN(void) jpeg_make_c_derived_tbl
+	JPP((j_compress_ptr cinfo, boolean isDC, int tblno,
+	     c_derived_tbl ** pdtbl));
+
+/* Generate an optimal table definition given the specified counts */
+EXTERN(void) jpeg_gen_optimal_table
+	JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]));
diff --git a/samples/jpeglib/jcinit.c b/samples/jpeglib/jcinit.c
new file mode 100644
index 0000000..5efffe3
--- /dev/null
+++ b/samples/jpeglib/jcinit.c
@@ -0,0 +1,72 @@
+/*
+ * jcinit.c
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains initialization logic for the JPEG compressor.
+ * This routine is in charge of selecting the modules to be executed and
+ * making an initialization call to each one.
+ *
+ * Logically, this code belongs in jcmaster.c.  It's split out because
+ * linking this routine implies linking the entire compression library.
+ * For a transcoding-only application, we want to be able to use jcmaster.c
+ * without linking in the whole library.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/*
+ * Master selection of compression modules.
+ * This is done once at the start of processing an image.  We determine
+ * which modules will be used and give them appropriate initialization calls.
+ */
+
+GLOBAL(void)
+jinit_compress_master (j_compress_ptr cinfo)
+{
+  /* Initialize master control (includes parameter checking/processing) */
+  jinit_c_master_control(cinfo, FALSE /* full compression */);
+
+  /* Preprocessing */
+  if (! cinfo->raw_data_in) {
+    jinit_color_converter(cinfo);
+    jinit_downsampler(cinfo);
+    jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */);
+  }
+  /* Forward DCT */
+  jinit_forward_dct(cinfo);
+  /* Entropy encoding: either Huffman or arithmetic coding. */
+  if (cinfo->arith_code) {
+    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
+  } else {
+    if (cinfo->progressive_mode) {
+#ifdef C_PROGRESSIVE_SUPPORTED
+      jinit_phuff_encoder(cinfo);
+#else
+      ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+    } else
+      jinit_huff_encoder(cinfo);
+  }
+
+  /* Need a full-image coefficient buffer in any multi-pass mode. */
+  jinit_c_coef_controller(cinfo,
+		(boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding));
+  jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */);
+
+  jinit_marker_writer(cinfo);
+
+  /* We can now tell the memory manager to allocate virtual arrays. */
+  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
+
+  /* Write the datastream header (SOI) immediately.
+   * Frame and scan headers are postponed till later.
+   * This lets application insert special markers after the SOI.
+   */
+  (*cinfo->marker->write_file_header) (cinfo);
+}
diff --git a/samples/jpeglib/jcmainct.c b/samples/jpeglib/jcmainct.c
new file mode 100644
index 0000000..e0279a7
--- /dev/null
+++ b/samples/jpeglib/jcmainct.c
@@ -0,0 +1,293 @@
+/*
+ * jcmainct.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains the main buffer controller for compression.
+ * The main buffer lies between the pre-processor and the JPEG
+ * compressor proper; it holds downsampled data in the JPEG colorspace.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Note: currently, there is no operating mode in which a full-image buffer
+ * is needed at this step.  If there were, that mode could not be used with
+ * "raw data" input, since this module is bypassed in that case.  However,
+ * we've left the code here for possible use in special applications.
+ */
+#undef FULL_MAIN_BUFFER_SUPPORTED
+
+
+/* Private buffer controller object */
+
+typedef struct {
+  struct jpeg_c_main_controller pub; /* public fields */
+
+  JDIMENSION cur_iMCU_row;	/* number of current iMCU row */
+  JDIMENSION rowgroup_ctr;	/* counts row groups received in iMCU row */
+  boolean suspended;		/* remember if we suspended output */
+  J_BUF_MODE pass_mode;		/* current operating mode */
+
+  /* If using just a strip buffer, this points to the entire set of buffers
+   * (we allocate one for each component).  In the full-image case, this
+   * points to the currently accessible strips of the virtual arrays.
+   */
+  JSAMPARRAY buffer[MAX_COMPONENTS];
+
+#ifdef FULL_MAIN_BUFFER_SUPPORTED
+  /* If using full-image storage, this array holds pointers to virtual-array
+   * control blocks for each component.  Unused if not full-image storage.
+   */
+  jvirt_sarray_ptr whole_image[MAX_COMPONENTS];
+#endif
+} my_main_controller;
+
+typedef my_main_controller * my_main_ptr;
+
+
+/* Forward declarations */
+METHODDEF(void) process_data_simple_main
+	JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
+	     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
+#ifdef FULL_MAIN_BUFFER_SUPPORTED
+METHODDEF(void) process_data_buffer_main
+	JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
+	     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
+#endif
+
+
+/*
+ * Initialize for a processing pass.
+ */
+
+METHODDEF(void)
+start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
+{
+  my_main_ptr main = (my_main_ptr) cinfo->main;
+
+  /* Do nothing in raw-data mode. */
+  if (cinfo->raw_data_in)
+    return;
+
+  main->cur_iMCU_row = 0;	/* initialize counters */
+  main->rowgroup_ctr = 0;
+  main->suspended = FALSE;
+  main->pass_mode = pass_mode;	/* save mode for use by process_data */
+
+  switch (pass_mode) {
+  case JBUF_PASS_THRU:
+#ifdef FULL_MAIN_BUFFER_SUPPORTED
+    if (main->whole_image[0] != NULL)
+      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+#endif
+    main->pub.process_data = process_data_simple_main;
+    break;
+#ifdef FULL_MAIN_BUFFER_SUPPORTED
+  case JBUF_SAVE_SOURCE:
+  case JBUF_CRANK_DEST:
+  case JBUF_SAVE_AND_PASS:
+    if (main->whole_image[0] == NULL)
+      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+    main->pub.process_data = process_data_buffer_main;
+    break;
+#endif
+  default:
+    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+    break;
+  }
+}
+
+
+/*
+ * Process some data.
+ * This routine handles the simple pass-through mode,
+ * where we have only a strip buffer.
+ */
+
+METHODDEF(void)
+process_data_simple_main (j_compress_ptr cinfo,
+			  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
+			  JDIMENSION in_rows_avail)
+{
+  my_main_ptr main = (my_main_ptr) cinfo->main;
+
+  while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
+    /* Read input data if we haven't filled the main buffer yet */
+    if (main->rowgroup_ctr < DCTSIZE)
+      (*cinfo->prep->pre_process_data) (cinfo,
+					input_buf, in_row_ctr, in_rows_avail,
+					main->buffer, &main->rowgroup_ctr,
+					(JDIMENSION) DCTSIZE);
+
+    /* If we don't have a full iMCU row buffered, return to application for
+     * more data.  Note that preprocessor will always pad to fill the iMCU row
+     * at the bottom of the image.
+     */
+    if (main->rowgroup_ctr != DCTSIZE)
+      return;
+
+    /* Send the completed row to the compressor */
+    if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {
+      /* If compressor did not consume the whole row, then we must need to
+       * suspend processing and return to the application.  In this situation
+       * we pretend we didn't yet consume the last input row; otherwise, if
+       * it happened to be the last row of the image, the application would
+       * think we were done.
+       */
+      if (! main->suspended) {
+	(*in_row_ctr)--;
+	main->suspended = TRUE;
+      }
+      return;
+    }
+    /* We did finish the row.  Undo our little suspension hack if a previous
+     * call suspended; then mark the main buffer empty.
+     */
+    if (main->suspended) {
+      (*in_row_ctr)++;
+      main->suspended = FALSE;
+    }
+    main->rowgroup_ctr = 0;
+    main->cur_iMCU_row++;
+  }
+}
+
+
+#ifdef FULL_MAIN_BUFFER_SUPPORTED
+
+/*
+ * Process some data.
+ * This routine handles all of the modes that use a full-size buffer.
+ */
+
+METHODDEF(void)
+process_data_buffer_main (j_compress_ptr cinfo,
+			  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
+			  JDIMENSION in_rows_avail)
+{
+  my_main_ptr main = (my_main_ptr) cinfo->main;
+  int ci;
+  jpeg_component_info *compptr;
+  boolean writing = (main->pass_mode != JBUF_CRANK_DEST);
+
+  while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
+    /* Realign the virtual buffers if at the start of an iMCU row. */
+    if (main->rowgroup_ctr == 0) {
+      for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+	   ci++, compptr++) {
+	main->buffer[ci] = (*cinfo->mem->access_virt_sarray)
+	  ((j_common_ptr) cinfo, main->whole_image[ci],
+	   main->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE),
+	   (JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing);
+      }
+      /* In a read pass, pretend we just read some source data. */
+      if (! writing) {
+	*in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE;
+	main->rowgroup_ctr = DCTSIZE;
+      }
+    }
+
+    /* If a write pass, read input data until the current iMCU row is full. */
+    /* Note: preprocessor will pad if necessary to fill the last iMCU row. */
+    if (writing) {
+      (*cinfo->prep->pre_process_data) (cinfo,
+					input_buf, in_row_ctr, in_rows_avail,
+					main->buffer, &main->rowgroup_ctr,
+					(JDIMENSION) DCTSIZE);
+      /* Return to application if we need more data to fill the iMCU row. */
+      if (main->rowgroup_ctr < DCTSIZE)
+	return;
+    }
+
+    /* Emit data, unless this is a sink-only pass. */
+    if (main->pass_mode != JBUF_SAVE_SOURCE) {
+      if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {
+	/* If compressor did not consume the whole row, then we must need to
+	 * suspend processing and return to the application.  In this situation
+	 * we pretend we didn't yet consume the last input row; otherwise, if
+	 * it happened to be the last row of the image, the application would
+	 * think we were done.
+	 */
+	if (! main->suspended) {
+	  (*in_row_ctr)--;
+	  main->suspended = TRUE;
+	}
+	return;
+      }
+      /* We did finish the row.  Undo our little suspension hack if a previous
+       * call suspended; then mark the main buffer empty.
+       */
+      if (main->suspended) {
+	(*in_row_ctr)++;
+	main->suspended = FALSE;
+      }
+    }
+
+    /* If get here, we are done with this iMCU row.  Mark buffer empty. */
+    main->rowgroup_ctr = 0;
+    main->cur_iMCU_row++;
+  }
+}
+
+#endif /* FULL_MAIN_BUFFER_SUPPORTED */
+
+
+/*
+ * Initialize main buffer controller.
+ */
+
+GLOBAL(void)
+jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
+{
+  my_main_ptr main;
+  int ci;
+  jpeg_component_info *compptr;
+
+  main = (my_main_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_main_controller));
+  cinfo->main = (struct jpeg_c_main_controller *) main;
+  main->pub.start_pass = start_pass_main;
+
+  /* We don't need to create a buffer in raw-data mode. */
+  if (cinfo->raw_data_in)
+    return;
+
+  /* Create the buffer.  It holds downsampled data, so each component
+   * may be of a different size.
+   */
+  if (need_full_buffer) {
+#ifdef FULL_MAIN_BUFFER_SUPPORTED
+    /* Allocate a full-image virtual array for each component */
+    /* Note we pad the bottom to a multiple of the iMCU height */
+    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+	 ci++, compptr++) {
+      main->whole_image[ci] = (*cinfo->mem->request_virt_sarray)
+	((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
+	 compptr->width_in_blocks * DCTSIZE,
+	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
+				(long) compptr->v_samp_factor) * DCTSIZE,
+	 (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
+    }
+#else
+    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+#endif
+  } else {
+#ifdef FULL_MAIN_BUFFER_SUPPORTED
+    main->whole_image[0] = NULL; /* flag for no virtual arrays */
+#endif
+    /* Allocate a strip buffer for each component */
+    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+	 ci++, compptr++) {
+      main->buffer[ci] = (*cinfo->mem->alloc_sarray)
+	((j_common_ptr) cinfo, JPOOL_IMAGE,
+	 compptr->width_in_blocks * DCTSIZE,
+	 (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
+    }
+  }
+}
diff --git a/samples/jpeglib/jcmarker.c b/samples/jpeglib/jcmarker.c
new file mode 100644
index 0000000..3d1e6c6
--- /dev/null
+++ b/samples/jpeglib/jcmarker.c
@@ -0,0 +1,664 @@
+/*
+ * jcmarker.c
+ *
+ * Copyright (C) 1991-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains routines to write JPEG datastream markers.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+typedef enum {			/* JPEG marker codes */
+  M_SOF0  = 0xc0,
+  M_SOF1  = 0xc1,
+  M_SOF2  = 0xc2,
+  M_SOF3  = 0xc3,
+  
+  M_SOF5  = 0xc5,
+  M_SOF6  = 0xc6,
+  M_SOF7  = 0xc7,
+  
+  M_JPG   = 0xc8,
+  M_SOF9  = 0xc9,
+  M_SOF10 = 0xca,
+  M_SOF11 = 0xcb,
+  
+  M_SOF13 = 0xcd,
+  M_SOF14 = 0xce,
+  M_SOF15 = 0xcf,
+  
+  M_DHT   = 0xc4,
+  
+  M_DAC   = 0xcc,
+  
+  M_RST0  = 0xd0,
+  M_RST1  = 0xd1,
+  M_RST2  = 0xd2,
+  M_RST3  = 0xd3,
+  M_RST4  = 0xd4,
+  M_RST5  = 0xd5,
+  M_RST6  = 0xd6,
+  M_RST7  = 0xd7,
+  
+  M_SOI   = 0xd8,
+  M_EOI   = 0xd9,
+  M_SOS   = 0xda,
+  M_DQT   = 0xdb,
+  M_DNL   = 0xdc,
+  M_DRI   = 0xdd,
+  M_DHP   = 0xde,
+  M_EXP   = 0xdf,
+  
+  M_APP0  = 0xe0,
+  M_APP1  = 0xe1,
+  M_APP2  = 0xe2,
+  M_APP3  = 0xe3,
+  M_APP4  = 0xe4,
+  M_APP5  = 0xe5,
+  M_APP6  = 0xe6,
+  M_APP7  = 0xe7,
+  M_APP8  = 0xe8,
+  M_APP9  = 0xe9,
+  M_APP10 = 0xea,
+  M_APP11 = 0xeb,
+  M_APP12 = 0xec,
+  M_APP13 = 0xed,
+  M_APP14 = 0xee,
+  M_APP15 = 0xef,
+  
+  M_JPG0  = 0xf0,
+  M_JPG13 = 0xfd,
+  M_COM   = 0xfe,
+  
+  M_TEM   = 0x01,
+  
+  M_ERROR = 0x100
+} JPEG_MARKER;
+
+
+/* Private state */
+
+typedef struct {
+  struct jpeg_marker_writer pub; /* public fields */
+
+  unsigned int last_restart_interval; /* last DRI value emitted; 0 after SOI */
+} my_marker_writer;
+
+typedef my_marker_writer * my_marker_ptr;
+
+
+/*
+ * Basic output routines.
+ *
+ * Note that we do not support suspension while writing a marker.
+ * Therefore, an application using suspension must ensure that there is
+ * enough buffer space for the initial markers (typ. 600-700 bytes) before
+ * calling jpeg_start_compress, and enough space to write the trailing EOI
+ * (a few bytes) before calling jpeg_finish_compress.  Multipass compression
+ * modes are not supported at all with suspension, so those two are the only
+ * points where markers will be written.
+ */
+
+LOCAL(void)
+emit_byte (j_compress_ptr cinfo, int val)
+/* Emit a byte */
+{
+  struct jpeg_destination_mgr * dest = cinfo->dest;
+
+  *(dest->next_output_byte)++ = (JOCTET) val;
+  if (--dest->free_in_buffer == 0) {
+    if (! (*dest->empty_output_buffer) (cinfo))
+      ERREXIT(cinfo, JERR_CANT_SUSPEND);
+  }
+}
+
+
+LOCAL(void)
+emit_marker (j_compress_ptr cinfo, JPEG_MARKER mark)
+/* Emit a marker code */
+{
+  emit_byte(cinfo, 0xFF);
+  emit_byte(cinfo, (int) mark);
+}
+
+
+LOCAL(void)
+emit_2bytes (j_compress_ptr cinfo, int value)
+/* Emit a 2-byte integer; these are always MSB first in JPEG files */
+{
+  emit_byte(cinfo, (value >> 8) & 0xFF);
+  emit_byte(cinfo, value & 0xFF);
+}
+
+
+/*
+ * Routines to write specific marker types.
+ */
+
+LOCAL(int)
+emit_dqt (j_compress_ptr cinfo, int index)
+/* Emit a DQT marker */
+/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */
+{
+  JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index];
+  int prec;
+  int i;
+
+  if (qtbl == NULL)
+    ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index);
+
+  prec = 0;
+  for (i = 0; i < DCTSIZE2; i++) {
+    if (qtbl->quantval[i] > 255)
+      prec = 1;
+  }
+
+  if (! qtbl->sent_table) {
+    emit_marker(cinfo, M_DQT);
+
+    emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2);
+
+    emit_byte(cinfo, index + (prec<<4));
+
+    for (i = 0; i < DCTSIZE2; i++) {
+      /* The table entries must be emitted in zigzag order. */
+      unsigned int qval = qtbl->quantval[jpeg_natural_order[i]];
+      if (prec)
+	emit_byte(cinfo, (int) (qval >> 8));
+      emit_byte(cinfo, (int) (qval & 0xFF));
+    }
+
+    qtbl->sent_table = TRUE;
+  }
+
+  return prec;
+}
+
+
+LOCAL(void)
+emit_dht (j_compress_ptr cinfo, int index, boolean is_ac)
+/* Emit a DHT marker */
+{
+  JHUFF_TBL * htbl;
+  int length, i;
+  
+  if (is_ac) {
+    htbl = cinfo->ac_huff_tbl_ptrs[index];
+    index += 0x10;		/* output index has AC bit set */
+  } else {
+    htbl = cinfo->dc_huff_tbl_ptrs[index];
+  }
+
+  if (htbl == NULL)
+    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index);
+  
+  if (! htbl->sent_table) {
+    emit_marker(cinfo, M_DHT);
+    
+    length = 0;
+    for (i = 1; i <= 16; i++)
+      length += htbl->bits[i];
+    
+    emit_2bytes(cinfo, length + 2 + 1 + 16);
+    emit_byte(cinfo, index);
+    
+    for (i = 1; i <= 16; i++)
+      emit_byte(cinfo, htbl->bits[i]);
+    
+    for (i = 0; i < length; i++)
+      emit_byte(cinfo, htbl->huffval[i]);
+    
+    htbl->sent_table = TRUE;
+  }
+}
+
+
+LOCAL(void)
+emit_dac (j_compress_ptr cinfo)
+/* Emit a DAC marker */
+/* Since the useful info is so small, we want to emit all the tables in */
+/* one DAC marker.  Therefore this routine does its own scan of the table. */
+{
+#ifdef C_ARITH_CODING_SUPPORTED
+  char dc_in_use[NUM_ARITH_TBLS];
+  char ac_in_use[NUM_ARITH_TBLS];
+  int length, i;
+  jpeg_component_info *compptr;
+  
+  for (i = 0; i < NUM_ARITH_TBLS; i++)
+    dc_in_use[i] = ac_in_use[i] = 0;
+  
+  for (i = 0; i < cinfo->comps_in_scan; i++) {
+    compptr = cinfo->cur_comp_info[i];
+    dc_in_use[compptr->dc_tbl_no] = 1;
+    ac_in_use[compptr->ac_tbl_no] = 1;
+  }
+  
+  length = 0;
+  for (i = 0; i < NUM_ARITH_TBLS; i++)
+    length += dc_in_use[i] + ac_in_use[i];
+  
+  emit_marker(cinfo, M_DAC);
+  
+  emit_2bytes(cinfo, length*2 + 2);
+  
+  for (i = 0; i < NUM_ARITH_TBLS; i++) {
+    if (dc_in_use[i]) {
+      emit_byte(cinfo, i);
+      emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4));
+    }
+    if (ac_in_use[i]) {
+      emit_byte(cinfo, i + 0x10);
+      emit_byte(cinfo, cinfo->arith_ac_K[i]);
+    }
+  }
+#endif /* C_ARITH_CODING_SUPPORTED */
+}
+
+
+LOCAL(void)
+emit_dri (j_compress_ptr cinfo)
+/* Emit a DRI marker */
+{
+  emit_marker(cinfo, M_DRI);
+  
+  emit_2bytes(cinfo, 4);	/* fixed length */
+
+  emit_2bytes(cinfo, (int) cinfo->restart_interval);
+}
+
+
+LOCAL(void)
+emit_sof (j_compress_ptr cinfo, JPEG_MARKER code)
+/* Emit a SOF marker */
+{
+  int ci;
+  jpeg_component_info *compptr;
+  
+  emit_marker(cinfo, code);
+  
+  emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */
+
+  /* Make sure image isn't bigger than SOF field can handle */
+  if ((long) cinfo->image_height > 65535L ||
+      (long) cinfo->image_width > 65535L)
+    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535);
+
+  emit_byte(cinfo, cinfo->data_precision);
+  emit_2bytes(cinfo, (int) cinfo->image_height);
+  emit_2bytes(cinfo, (int) cinfo->image_width);
+
+  emit_byte(cinfo, cinfo->num_components);
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    emit_byte(cinfo, compptr->component_id);
+    emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor);
+    emit_byte(cinfo, compptr->quant_tbl_no);
+  }
+}
+
+
+LOCAL(void)
+emit_sos (j_compress_ptr cinfo)
+/* Emit a SOS marker */
+{
+  int i, td, ta;
+  jpeg_component_info *compptr;
+  
+  emit_marker(cinfo, M_SOS);
+  
+  emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */
+  
+  emit_byte(cinfo, cinfo->comps_in_scan);
+  
+  for (i = 0; i < cinfo->comps_in_scan; i++) {
+    compptr = cinfo->cur_comp_info[i];
+    emit_byte(cinfo, compptr->component_id);
+    td = compptr->dc_tbl_no;
+    ta = compptr->ac_tbl_no;
+    if (cinfo->progressive_mode) {
+      /* Progressive mode: only DC or only AC tables are used in one scan;
+       * furthermore, Huffman coding of DC refinement uses no table at all.
+       * We emit 0 for unused field(s); this is recommended by the P&M text
+       * but does not seem to be specified in the standard.
+       */
+      if (cinfo->Ss == 0) {
+	ta = 0;			/* DC scan */
+	if (cinfo->Ah != 0 && !cinfo->arith_code)
+	  td = 0;		/* no DC table either */
+      } else {
+	td = 0;			/* AC scan */
+      }
+    }
+    emit_byte(cinfo, (td << 4) + ta);
+  }
+
+  emit_byte(cinfo, cinfo->Ss);
+  emit_byte(cinfo, cinfo->Se);
+  emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al);
+}
+
+
+LOCAL(void)
+emit_jfif_app0 (j_compress_ptr cinfo)
+/* Emit a JFIF-compliant APP0 marker */
+{
+  /*
+   * Length of APP0 block	(2 bytes)
+   * Block ID			(4 bytes - ASCII "JFIF")
+   * Zero byte			(1 byte to terminate the ID string)
+   * Version Major, Minor	(2 bytes - major first)
+   * Units			(1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm)
+   * Xdpu			(2 bytes - dots per unit horizontal)
+   * Ydpu			(2 bytes - dots per unit vertical)
+   * Thumbnail X size		(1 byte)
+   * Thumbnail Y size		(1 byte)
+   */
+  
+  emit_marker(cinfo, M_APP0);
+  
+  emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */
+
+  emit_byte(cinfo, 0x4A);	/* Identifier: ASCII "JFIF" */
+  emit_byte(cinfo, 0x46);
+  emit_byte(cinfo, 0x49);
+  emit_byte(cinfo, 0x46);
+  emit_byte(cinfo, 0);
+  emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */
+  emit_byte(cinfo, cinfo->JFIF_minor_version);
+  emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */
+  emit_2bytes(cinfo, (int) cinfo->X_density);
+  emit_2bytes(cinfo, (int) cinfo->Y_density);
+  emit_byte(cinfo, 0);		/* No thumbnail image */
+  emit_byte(cinfo, 0);
+}
+
+
+LOCAL(void)
+emit_adobe_app14 (j_compress_ptr cinfo)
+/* Emit an Adobe APP14 marker */
+{
+  /*
+   * Length of APP14 block	(2 bytes)
+   * Block ID			(5 bytes - ASCII "Adobe")
+   * Version Number		(2 bytes - currently 100)
+   * Flags0			(2 bytes - currently 0)
+   * Flags1			(2 bytes - currently 0)
+   * Color transform		(1 byte)
+   *
+   * Although Adobe TN 5116 mentions Version = 101, all the Adobe files
+   * now in circulation seem to use Version = 100, so that's what we write.
+   *
+   * We write the color transform byte as 1 if the JPEG color space is
+   * YCbCr, 2 if it's YCCK, 0 otherwise.  Adobe's definition has to do with
+   * whether the encoder performed a transformation, which is pretty useless.
+   */
+  
+  emit_marker(cinfo, M_APP14);
+  
+  emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */
+
+  emit_byte(cinfo, 0x41);	/* Identifier: ASCII "Adobe" */
+  emit_byte(cinfo, 0x64);
+  emit_byte(cinfo, 0x6F);
+  emit_byte(cinfo, 0x62);
+  emit_byte(cinfo, 0x65);
+  emit_2bytes(cinfo, 100);	/* Version */
+  emit_2bytes(cinfo, 0);	/* Flags0 */
+  emit_2bytes(cinfo, 0);	/* Flags1 */
+  switch (cinfo->jpeg_color_space) {
+  case JCS_YCbCr:
+    emit_byte(cinfo, 1);	/* Color transform = 1 */
+    break;
+  case JCS_YCCK:
+    emit_byte(cinfo, 2);	/* Color transform = 2 */
+    break;
+  default:
+    emit_byte(cinfo, 0);	/* Color transform = 0 */
+    break;
+  }
+}
+
+
+/*
+ * These routines allow writing an arbitrary marker with parameters.
+ * The only intended use is to emit COM or APPn markers after calling
+ * write_file_header and before calling write_frame_header.
+ * Other uses are not guaranteed to produce desirable results.
+ * Counting the parameter bytes properly is the caller's responsibility.
+ */
+
+METHODDEF(void)
+write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
+/* Emit an arbitrary marker header */
+{
+  if (datalen > (unsigned int) 65533)		/* safety check */
+    ERREXIT(cinfo, JERR_BAD_LENGTH);
+
+  emit_marker(cinfo, (JPEG_MARKER) marker);
+
+  emit_2bytes(cinfo, (int) (datalen + 2));	/* total length */
+}
+
+METHODDEF(void)
+write_marker_byte (j_compress_ptr cinfo, int val)
+/* Emit one byte of marker parameters following write_marker_header */
+{
+  emit_byte(cinfo, val);
+}
+
+
+/*
+ * Write datastream header.
+ * This consists of an SOI and optional APPn markers.
+ * We recommend use of the JFIF marker, but not the Adobe marker,
+ * when using YCbCr or grayscale data.  The JFIF marker should NOT
+ * be used for any other JPEG colorspace.  The Adobe marker is helpful
+ * to distinguish RGB, CMYK, and YCCK colorspaces.
+ * Note that an application can write additional header markers after
+ * jpeg_start_compress returns.
+ */
+
+METHODDEF(void)
+write_file_header (j_compress_ptr cinfo)
+{
+  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
+
+  emit_marker(cinfo, M_SOI);	/* first the SOI */
+
+  /* SOI is defined to reset restart interval to 0 */
+  marker->last_restart_interval = 0;
+
+  if (cinfo->write_JFIF_header)	/* next an optional JFIF APP0 */
+    emit_jfif_app0(cinfo);
+  if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */
+    emit_adobe_app14(cinfo);
+}
+
+
+/*
+ * Write frame header.
+ * This consists of DQT and SOFn markers.
+ * Note that we do not emit the SOF until we have emitted the DQT(s).
+ * This avoids compatibility problems with incorrect implementations that
+ * try to error-check the quant table numbers as soon as they see the SOF.
+ */
+
+METHODDEF(void)
+write_frame_header (j_compress_ptr cinfo)
+{
+  int ci, prec;
+  boolean is_baseline;
+  jpeg_component_info *compptr;
+  
+  /* Emit DQT for each quantization table.
+   * Note that emit_dqt() suppresses any duplicate tables.
+   */
+  prec = 0;
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    prec += emit_dqt(cinfo, compptr->quant_tbl_no);
+  }
+  /* now prec is nonzero iff there are any 16-bit quant tables. */
+
+  /* Check for a non-baseline specification.
+   * Note we assume that Huffman table numbers won't be changed later.
+   */
+  if (cinfo->arith_code || cinfo->progressive_mode ||
+      cinfo->data_precision != 8) {
+    is_baseline = FALSE;
+  } else {
+    is_baseline = TRUE;
+    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+	 ci++, compptr++) {
+      if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1)
+	is_baseline = FALSE;
+    }
+    if (prec && is_baseline) {
+      is_baseline = FALSE;
+      /* If it's baseline except for quantizer size, warn the user */
+      TRACEMS(cinfo, 0, JTRC_16BIT_TABLES);
+    }
+  }
+
+  /* Emit the proper SOF marker */
+  if (cinfo->arith_code) {
+    emit_sof(cinfo, M_SOF9);	/* SOF code for arithmetic coding */
+  } else {
+    if (cinfo->progressive_mode)
+      emit_sof(cinfo, M_SOF2);	/* SOF code for progressive Huffman */
+    else if (is_baseline)
+      emit_sof(cinfo, M_SOF0);	/* SOF code for baseline implementation */
+    else
+      emit_sof(cinfo, M_SOF1);	/* SOF code for non-baseline Huffman file */
+  }
+}
+
+
+/*
+ * Write scan header.
+ * This consists of DHT or DAC markers, optional DRI, and SOS.
+ * Compressed data will be written following the SOS.
+ */
+
+METHODDEF(void)
+write_scan_header (j_compress_ptr cinfo)
+{
+  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
+  int i;
+  jpeg_component_info *compptr;
+
+  if (cinfo->arith_code) {
+    /* Emit arith conditioning info.  We may have some duplication
+     * if the file has multiple scans, but it's so small it's hardly
+     * worth worrying about.
+     */
+    emit_dac(cinfo);
+  } else {
+    /* Emit Huffman tables.
+     * Note that emit_dht() suppresses any duplicate tables.
+     */
+    for (i = 0; i < cinfo->comps_in_scan; i++) {
+      compptr = cinfo->cur_comp_info[i];
+      if (cinfo->progressive_mode) {
+	/* Progressive mode: only DC or only AC tables are used in one scan */
+	if (cinfo->Ss == 0) {
+	  if (cinfo->Ah == 0)	/* DC needs no table for refinement scan */
+	    emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
+	} else {
+	  emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
+	}
+      } else {
+	/* Sequential mode: need both DC and AC tables */
+	emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
+	emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
+      }
+    }
+  }
+
+  /* Emit DRI if required --- note that DRI value could change for each scan.
+   * We avoid wasting space with unnecessary DRIs, however.
+   */
+  if (cinfo->restart_interval != marker->last_restart_interval) {
+    emit_dri(cinfo);
+    marker->last_restart_interval = cinfo->restart_interval;
+  }
+
+  emit_sos(cinfo);
+}
+
+
+/*
+ * Write datastream trailer.
+ */
+
+METHODDEF(void)
+write_file_trailer (j_compress_ptr cinfo)
+{
+  emit_marker(cinfo, M_EOI);
+}
+
+
+/*
+ * Write an abbreviated table-specification datastream.
+ * This consists of SOI, DQT and DHT tables, and EOI.
+ * Any table that is defined and not marked sent_table = TRUE will be
+ * emitted.  Note that all tables will be marked sent_table = TRUE at exit.
+ */
+
+METHODDEF(void)
+write_tables_only (j_compress_ptr cinfo)
+{
+  int i;
+
+  emit_marker(cinfo, M_SOI);
+
+  for (i = 0; i < NUM_QUANT_TBLS; i++) {
+    if (cinfo->quant_tbl_ptrs[i] != NULL)
+      (void) emit_dqt(cinfo, i);
+  }
+
+  if (! cinfo->arith_code) {
+    for (i = 0; i < NUM_HUFF_TBLS; i++) {
+      if (cinfo->dc_huff_tbl_ptrs[i] != NULL)
+	emit_dht(cinfo, i, FALSE);
+      if (cinfo->ac_huff_tbl_ptrs[i] != NULL)
+	emit_dht(cinfo, i, TRUE);
+    }
+  }
+
+  emit_marker(cinfo, M_EOI);
+}
+
+
+/*
+ * Initialize the marker writer module.
+ */
+
+GLOBAL(void)
+jinit_marker_writer (j_compress_ptr cinfo)
+{
+  my_marker_ptr marker;
+
+  /* Create the subobject */
+  marker = (my_marker_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_marker_writer));
+  cinfo->marker = (struct jpeg_marker_writer *) marker;
+  /* Initialize method pointers */
+  marker->pub.write_file_header = write_file_header;
+  marker->pub.write_frame_header = write_frame_header;
+  marker->pub.write_scan_header = write_scan_header;
+  marker->pub.write_file_trailer = write_file_trailer;
+  marker->pub.write_tables_only = write_tables_only;
+  marker->pub.write_marker_header = write_marker_header;
+  marker->pub.write_marker_byte = write_marker_byte;
+  /* Initialize private state */
+  marker->last_restart_interval = 0;
+}
diff --git a/samples/jpeglib/jcmaster.c b/samples/jpeglib/jcmaster.c
new file mode 100644
index 0000000..aab4020
--- /dev/null
+++ b/samples/jpeglib/jcmaster.c
@@ -0,0 +1,590 @@
+/*
+ * jcmaster.c
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains master control logic for the JPEG compressor.
+ * These routines are concerned with parameter validation, initial setup,
+ * and inter-pass control (determining the number of passes and the work 
+ * to be done in each pass).
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Private state */
+
+typedef enum {
+	main_pass,		/* input data, also do first output step */
+	huff_opt_pass,		/* Huffman code optimization pass */
+	output_pass		/* data output pass */
+} c_pass_type;
+
+typedef struct {
+  struct jpeg_comp_master pub;	/* public fields */
+
+  c_pass_type pass_type;	/* the type of the current pass */
+
+  int pass_number;		/* # of passes completed */
+  int total_passes;		/* total # of passes needed */
+
+  int scan_number;		/* current index in scan_info[] */
+} my_comp_master;
+
+typedef my_comp_master * my_master_ptr;
+
+
+/*
+ * Support routines that do various essential calculations.
+ */
+
+LOCAL(void)
+initial_setup (j_compress_ptr cinfo)
+/* Do computations that are needed before master selection phase */
+{
+  int ci;
+  jpeg_component_info *compptr;
+  long samplesperrow;
+  JDIMENSION jd_samplesperrow;
+
+  /* Sanity check on image dimensions */
+  if (cinfo->image_height <= 0 || cinfo->image_width <= 0
+      || cinfo->num_components <= 0 || cinfo->input_components <= 0)
+    ERREXIT(cinfo, JERR_EMPTY_IMAGE);
+
+  /* Make sure image isn't bigger than I can handle */
+  if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||
+      (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)
+    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);
+
+  /* Width of an input scanline must be representable as JDIMENSION. */
+  samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components;
+  jd_samplesperrow = (JDIMENSION) samplesperrow;
+  if ((long) jd_samplesperrow != samplesperrow)
+    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
+
+  /* For now, precision must match compiled-in value... */
+  if (cinfo->data_precision != BITS_IN_JSAMPLE)
+    ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);
+
+  /* Check that number of components won't exceed internal array sizes */
+  if (cinfo->num_components > MAX_COMPONENTS)
+    ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
+	     MAX_COMPONENTS);
+
+  /* Compute maximum sampling factors; check factor validity */
+  cinfo->max_h_samp_factor = 1;
+  cinfo->max_v_samp_factor = 1;
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR ||
+	compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR)
+      ERREXIT(cinfo, JERR_BAD_SAMPLING);
+    cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor,
+				   compptr->h_samp_factor);
+    cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor,
+				   compptr->v_samp_factor);
+  }
+
+  /* Compute dimensions of components */
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* Fill in the correct component_index value; don't rely on application */
+    compptr->component_index = ci;
+    /* For compression, we never do DCT scaling. */
+    compptr->DCT_scaled_size = DCTSIZE;
+    /* Size in DCT blocks */
+    compptr->width_in_blocks = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
+		    (long) (cinfo->max_h_samp_factor * DCTSIZE));
+    compptr->height_in_blocks = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
+		    (long) (cinfo->max_v_samp_factor * DCTSIZE));
+    /* Size in samples */
+    compptr->downsampled_width = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
+		    (long) cinfo->max_h_samp_factor);
+    compptr->downsampled_height = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
+		    (long) cinfo->max_v_samp_factor);
+    /* Mark component needed (this flag isn't actually used for compression) */
+    compptr->component_needed = TRUE;
+  }
+
+  /* Compute number of fully interleaved MCU rows (number of times that
+   * main controller will call coefficient controller).
+   */
+  cinfo->total_iMCU_rows = (JDIMENSION)
+    jdiv_round_up((long) cinfo->image_height,
+		  (long) (cinfo->max_v_samp_factor*DCTSIZE));
+}
+
+
+#ifdef C_MULTISCAN_FILES_SUPPORTED
+
+LOCAL(void)
+validate_script (j_compress_ptr cinfo)
+/* Verify that the scan script in cinfo->scan_info[] is valid; also
+ * determine whether it uses progressive JPEG, and set cinfo->progressive_mode.
+ */
+{
+  const jpeg_scan_info * scanptr;
+  int scanno, ncomps, ci, coefi, thisi;
+  int Ss, Se, Ah, Al;
+  boolean component_sent[MAX_COMPONENTS];
+#ifdef C_PROGRESSIVE_SUPPORTED
+  int * last_bitpos_ptr;
+  int last_bitpos[MAX_COMPONENTS][DCTSIZE2];
+  /* -1 until that coefficient has been seen; then last Al for it */
+#endif
+
+  if (cinfo->num_scans <= 0)
+    ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0);
+
+  /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1;
+   * for progressive JPEG, no scan can have this.
+   */
+  scanptr = cinfo->scan_info;
+  if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) {
+#ifdef C_PROGRESSIVE_SUPPORTED
+    cinfo->progressive_mode = TRUE;
+    last_bitpos_ptr = & last_bitpos[0][0];
+    for (ci = 0; ci < cinfo->num_components; ci++) 
+      for (coefi = 0; coefi < DCTSIZE2; coefi++)
+	*last_bitpos_ptr++ = -1;
+#else
+    ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+  } else {
+    cinfo->progressive_mode = FALSE;
+    for (ci = 0; ci < cinfo->num_components; ci++) 
+      component_sent[ci] = FALSE;
+  }
+
+  for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) {
+    /* Validate component indexes */
+    ncomps = scanptr->comps_in_scan;
+    if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN)
+      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN);
+    for (ci = 0; ci < ncomps; ci++) {
+      thisi = scanptr->component_index[ci];
+      if (thisi < 0 || thisi >= cinfo->num_components)
+	ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
+      /* Components must appear in SOF order within each scan */
+      if (ci > 0 && thisi <= scanptr->component_index[ci-1])
+	ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
+    }
+    /* Validate progression parameters */
+    Ss = scanptr->Ss;
+    Se = scanptr->Se;
+    Ah = scanptr->Ah;
+    Al = scanptr->Al;
+    if (cinfo->progressive_mode) {
+#ifdef C_PROGRESSIVE_SUPPORTED
+      /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that
+       * seems wrong: the upper bound ought to depend on data precision.
+       * Perhaps they really meant 0..N+1 for N-bit precision.
+       * Here we allow 0..10 for 8-bit data; Al larger than 10 results in
+       * out-of-range reconstructed DC values during the first DC scan,
+       * which might cause problems for some decoders.
+       */
+#if BITS_IN_JSAMPLE == 8
+#define MAX_AH_AL 10
+#else
+#define MAX_AH_AL 13
+#endif
+      if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 ||
+	  Ah < 0 || Ah > MAX_AH_AL || Al < 0 || Al > MAX_AH_AL)
+	ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
+      if (Ss == 0) {
+	if (Se != 0)		/* DC and AC together not OK */
+	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
+      } else {
+	if (ncomps != 1)	/* AC scans must be for only one component */
+	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
+      }
+      for (ci = 0; ci < ncomps; ci++) {
+	last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0];
+	if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */
+	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
+	for (coefi = Ss; coefi <= Se; coefi++) {
+	  if (last_bitpos_ptr[coefi] < 0) {
+	    /* first scan of this coefficient */
+	    if (Ah != 0)
+	      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
+	  } else {
+	    /* not first scan */
+	    if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1)
+	      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
+	  }
+	  last_bitpos_ptr[coefi] = Al;
+	}
+      }
+#endif
+    } else {
+      /* For sequential JPEG, all progression parameters must be these: */
+      if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0)
+	ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
+      /* Make sure components are not sent twice */
+      for (ci = 0; ci < ncomps; ci++) {
+	thisi = scanptr->component_index[ci];
+	if (component_sent[thisi])
+	  ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
+	component_sent[thisi] = TRUE;
+      }
+    }
+  }
+
+  /* Now verify that everything got sent. */
+  if (cinfo->progressive_mode) {
+#ifdef C_PROGRESSIVE_SUPPORTED
+    /* For progressive mode, we only check that at least some DC data
+     * got sent for each component; the spec does not require that all bits
+     * of all coefficients be transmitted.  Would it be wiser to enforce
+     * transmission of all coefficient bits??
+     */
+    for (ci = 0; ci < cinfo->num_components; ci++) {
+      if (last_bitpos[ci][0] < 0)
+	ERREXIT(cinfo, JERR_MISSING_DATA);
+    }
+#endif
+  } else {
+    for (ci = 0; ci < cinfo->num_components; ci++) {
+      if (! component_sent[ci])
+	ERREXIT(cinfo, JERR_MISSING_DATA);
+    }
+  }
+}
+
+#endif /* C_MULTISCAN_FILES_SUPPORTED */
+
+
+LOCAL(void)
+select_scan_parameters (j_compress_ptr cinfo)
+/* Set up the scan parameters for the current scan */
+{
+  int ci;
+
+#ifdef C_MULTISCAN_FILES_SUPPORTED
+  if (cinfo->scan_info != NULL) {
+    /* Prepare for current scan --- the script is already validated */
+    my_master_ptr master = (my_master_ptr) cinfo->master;
+    const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number;
+
+    cinfo->comps_in_scan = scanptr->comps_in_scan;
+    for (ci = 0; ci < scanptr->comps_in_scan; ci++) {
+      cinfo->cur_comp_info[ci] =
+	&cinfo->comp_info[scanptr->component_index[ci]];
+    }
+    cinfo->Ss = scanptr->Ss;
+    cinfo->Se = scanptr->Se;
+    cinfo->Ah = scanptr->Ah;
+    cinfo->Al = scanptr->Al;
+  }
+  else
+#endif
+  {
+    /* Prepare for single sequential-JPEG scan containing all components */
+    if (cinfo->num_components > MAX_COMPS_IN_SCAN)
+      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
+	       MAX_COMPS_IN_SCAN);
+    cinfo->comps_in_scan = cinfo->num_components;
+    for (ci = 0; ci < cinfo->num_components; ci++) {
+      cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci];
+    }
+    cinfo->Ss = 0;
+    cinfo->Se = DCTSIZE2-1;
+    cinfo->Ah = 0;
+    cinfo->Al = 0;
+  }
+}
+
+
+LOCAL(void)
+per_scan_setup (j_compress_ptr cinfo)
+/* Do computations that are needed before processing a JPEG scan */
+/* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */
+{
+  int ci, mcublks, tmp;
+  jpeg_component_info *compptr;
+  
+  if (cinfo->comps_in_scan == 1) {
+    
+    /* Noninterleaved (single-component) scan */
+    compptr = cinfo->cur_comp_info[0];
+    
+    /* Overall image size in MCUs */
+    cinfo->MCUs_per_row = compptr->width_in_blocks;
+    cinfo->MCU_rows_in_scan = compptr->height_in_blocks;
+    
+    /* For noninterleaved scan, always one block per MCU */
+    compptr->MCU_width = 1;
+    compptr->MCU_height = 1;
+    compptr->MCU_blocks = 1;
+    compptr->MCU_sample_width = DCTSIZE;
+    compptr->last_col_width = 1;
+    /* For noninterleaved scans, it is convenient to define last_row_height
+     * as the number of block rows present in the last iMCU row.
+     */
+    tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
+    if (tmp == 0) tmp = compptr->v_samp_factor;
+    compptr->last_row_height = tmp;
+    
+    /* Prepare array describing MCU composition */
+    cinfo->blocks_in_MCU = 1;
+    cinfo->MCU_membership[0] = 0;
+    
+  } else {
+    
+    /* Interleaved (multi-component) scan */
+    if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)
+      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
+	       MAX_COMPS_IN_SCAN);
+    
+    /* Overall image size in MCUs */
+    cinfo->MCUs_per_row = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_width,
+		    (long) (cinfo->max_h_samp_factor*DCTSIZE));
+    cinfo->MCU_rows_in_scan = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_height,
+		    (long) (cinfo->max_v_samp_factor*DCTSIZE));
+    
+    cinfo->blocks_in_MCU = 0;
+    
+    for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+      compptr = cinfo->cur_comp_info[ci];
+      /* Sampling factors give # of blocks of component in each MCU */
+      compptr->MCU_width = compptr->h_samp_factor;
+      compptr->MCU_height = compptr->v_samp_factor;
+      compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height;
+      compptr->MCU_sample_width = compptr->MCU_width * DCTSIZE;
+      /* Figure number of non-dummy blocks in last MCU column & row */
+      tmp = (int) (compptr->width_in_blocks % compptr->MCU_width);
+      if (tmp == 0) tmp = compptr->MCU_width;
+      compptr->last_col_width = tmp;
+      tmp = (int) (compptr->height_in_blocks % compptr->MCU_height);
+      if (tmp == 0) tmp = compptr->MCU_height;
+      compptr->last_row_height = tmp;
+      /* Prepare array describing MCU composition */
+      mcublks = compptr->MCU_blocks;
+      if (cinfo->blocks_in_MCU + mcublks > C_MAX_BLOCKS_IN_MCU)
+	ERREXIT(cinfo, JERR_BAD_MCU_SIZE);
+      while (mcublks-- > 0) {
+	cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
+      }
+    }
+    
+  }
+
+  /* Convert restart specified in rows to actual MCU count. */
+  /* Note that count must fit in 16 bits, so we provide limiting. */
+  if (cinfo->restart_in_rows > 0) {
+    long nominal = (long) cinfo->restart_in_rows * (long) cinfo->MCUs_per_row;
+    cinfo->restart_interval = (unsigned int) MIN(nominal, 65535L);
+  }
+}
+
+
+/*
+ * Per-pass setup.
+ * This is called at the beginning of each pass.  We determine which modules
+ * will be active during this pass and give them appropriate start_pass calls.
+ * We also set is_last_pass to indicate whether any more passes will be
+ * required.
+ */
+
+METHODDEF(void)
+prepare_for_pass (j_compress_ptr cinfo)
+{
+  my_master_ptr master = (my_master_ptr) cinfo->master;
+
+  switch (master->pass_type) {
+  case main_pass:
+    /* Initial pass: will collect input data, and do either Huffman
+     * optimization or data output for the first scan.
+     */
+    select_scan_parameters(cinfo);
+    per_scan_setup(cinfo);
+    if (! cinfo->raw_data_in) {
+      (*cinfo->cconvert->start_pass) (cinfo);
+      (*cinfo->downsample->start_pass) (cinfo);
+      (*cinfo->prep->start_pass) (cinfo, JBUF_PASS_THRU);
+    }
+    (*cinfo->fdct->start_pass) (cinfo);
+    (*cinfo->entropy->start_pass) (cinfo, cinfo->optimize_coding);
+    (*cinfo->coef->start_pass) (cinfo,
+				(master->total_passes > 1 ?
+				 JBUF_SAVE_AND_PASS : JBUF_PASS_THRU));
+    (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU);
+    if (cinfo->optimize_coding) {
+      /* No immediate data output; postpone writing frame/scan headers */
+      master->pub.call_pass_startup = FALSE;
+    } else {
+      /* Will write frame/scan headers at first jpeg_write_scanlines call */
+      master->pub.call_pass_startup = TRUE;
+    }
+    break;
+#ifdef ENTROPY_OPT_SUPPORTED
+  case huff_opt_pass:
+    /* Do Huffman optimization for a scan after the first one. */
+    select_scan_parameters(cinfo);
+    per_scan_setup(cinfo);
+    if (cinfo->Ss != 0 || cinfo->Ah == 0 || cinfo->arith_code) {
+      (*cinfo->entropy->start_pass) (cinfo, TRUE);
+      (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST);
+      master->pub.call_pass_startup = FALSE;
+      break;
+    }
+    /* Special case: Huffman DC refinement scans need no Huffman table
+     * and therefore we can skip the optimization pass for them.
+     */
+    master->pass_type = output_pass;
+    master->pass_number++;
+    /*FALLTHROUGH*/
+#endif
+  case output_pass:
+    /* Do a data-output pass. */
+    /* We need not repeat per-scan setup if prior optimization pass did it. */
+    if (! cinfo->optimize_coding) {
+      select_scan_parameters(cinfo);
+      per_scan_setup(cinfo);
+    }
+    (*cinfo->entropy->start_pass) (cinfo, FALSE);
+    (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST);
+    /* We emit frame/scan headers now */
+    if (master->scan_number == 0)
+      (*cinfo->marker->write_frame_header) (cinfo);
+    (*cinfo->marker->write_scan_header) (cinfo);
+    master->pub.call_pass_startup = FALSE;
+    break;
+  default:
+    ERREXIT(cinfo, JERR_NOT_COMPILED);
+  }
+
+  master->pub.is_last_pass = (master->pass_number == master->total_passes-1);
+
+  /* Set up progress monitor's pass info if present */
+  if (cinfo->progress != NULL) {
+    cinfo->progress->completed_passes = master->pass_number;
+    cinfo->progress->total_passes = master->total_passes;
+  }
+}
+
+
+/*
+ * Special start-of-pass hook.
+ * This is called by jpeg_write_scanlines if call_pass_startup is TRUE.
+ * In single-pass processing, we need this hook because we don't want to
+ * write frame/scan headers during jpeg_start_compress; we want to let the
+ * application write COM markers etc. between jpeg_start_compress and the
+ * jpeg_write_scanlines loop.
+ * In multi-pass processing, this routine is not used.
+ */
+
+METHODDEF(void)
+pass_startup (j_compress_ptr cinfo)
+{
+  cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */
+
+  (*cinfo->marker->write_frame_header) (cinfo);
+  (*cinfo->marker->write_scan_header) (cinfo);
+}
+
+
+/*
+ * Finish up at end of pass.
+ */
+
+METHODDEF(void)
+finish_pass_master (j_compress_ptr cinfo)
+{
+  my_master_ptr master = (my_master_ptr) cinfo->master;
+
+  /* The entropy coder always needs an end-of-pass call,
+   * either to analyze statistics or to flush its output buffer.
+   */
+  (*cinfo->entropy->finish_pass) (cinfo);
+
+  /* Update state for next pass */
+  switch (master->pass_type) {
+  case main_pass:
+    /* next pass is either output of scan 0 (after optimization)
+     * or output of scan 1 (if no optimization).
+     */
+    master->pass_type = output_pass;
+    if (! cinfo->optimize_coding)
+      master->scan_number++;
+    break;
+  case huff_opt_pass:
+    /* next pass is always output of current scan */
+    master->pass_type = output_pass;
+    break;
+  case output_pass:
+    /* next pass is either optimization or output of next scan */
+    if (cinfo->optimize_coding)
+      master->pass_type = huff_opt_pass;
+    master->scan_number++;
+    break;
+  }
+
+  master->pass_number++;
+}
+
+
+/*
+ * Initialize master compression control.
+ */
+
+GLOBAL(void)
+jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)
+{
+  my_master_ptr master;
+
+  master = (my_master_ptr)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  SIZEOF(my_comp_master));
+  cinfo->master = (struct jpeg_comp_master *) master;
+  master->pub.prepare_for_pass = prepare_for_pass;
+  master->pub.pass_startup = pass_startup;
+  master->pub.finish_pass = finish_pass_master;
+  master->pub.is_last_pass = FALSE;
+
+  /* Validate parameters, determine derived values */
+  initial_setup(cinfo);
+
+  if (cinfo->scan_info != NULL) {
+#ifdef C_MULTISCAN_FILES_SUPPORTED
+    validate_script(cinfo);
+#else
+    ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+  } else {
+    cinfo->progressive_mode = FALSE;
+    cinfo->num_scans = 1;
+  }
+
+  if (cinfo->progressive_mode)	/*  TEMPORARY HACK ??? */
+    cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */
+
+  /* Initialize my private state */
+  if (transcode_only) {
+    /* no main pass in transcoding */
+    if (cinfo->optimize_coding)
+      master->pass_type = huff_opt_pass;
+    else
+      master->pass_type = output_pass;
+  } else {
+    /* for normal compression, first pass is always this type: */
+    master->pass_type = main_pass;
+  }
+  master->scan_number = 0;
+  master->pass_number = 0;
+  if (cinfo->optimize_coding)
+    master->total_passes = cinfo->num_scans * 2;
+  else
+    master->total_passes = cinfo->num_scans;
+}
diff --git a/samples/jpeglib/jcomapi.c b/samples/jpeglib/jcomapi.c
new file mode 100644
index 0000000..9b1fa75
--- /dev/null
+++ b/samples/jpeglib/jcomapi.c
@@ -0,0 +1,106 @@
+/*
+ * jcomapi.c
+ *
+ * Copyright (C) 1994-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains application interface routines that are used for both
+ * compression and decompression.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/*
+ * Abort processing of a JPEG compression or decompression operation,
+ * but don't destroy the object itself.
+ *
+ * For this, we merely clean up all the nonpermanent memory pools.
+ * Note that temp files (virtual arrays) are not allowed to belong to
+ * the permanent pool, so we will be able to close all temp files here.
+ * Closing a data source or destination, if necessary, is the application's
+ * responsibility.
+ */
+
+GLOBAL(void)
+jpeg_abort (j_common_ptr cinfo)
+{
+  int pool;
+
+  /* Do nothing if called on a not-initialized or destroyed JPEG object. */
+  if (cinfo->mem == NULL)
+    return;
+
+  /* Releasing pools in reverse order might help avoid fragmentation
+   * with some (brain-damaged) malloc libraries.
+   */
+  for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) {
+    (*cinfo->mem->free_pool) (cinfo, pool);
+  }
+
+  /* Reset overall state for possible reuse of object */
+  if (cinfo->is_decompressor) {
+    cinfo->global_state = DSTATE_START;
+    /* Try to keep application from accessing now-deleted marker list.
+     * A bit kludgy to do it here, but this is the most central place.
+     */
+    ((j_decompress_ptr) cinfo)->marker_list = NULL;
+  } else {
+    cinfo->global_state = CSTATE_START;
+  }
+}
+
+
+/*
+ * Destruction of a JPEG object.
+ *
+ * Everything gets deallocated except the master jpeg_compress_struct itself
+ * and the error manager struct.  Both of these are supplied by the application
+ * and must be freed, if necessary, by the application.  (Often they are on
+ * the stack and so don't need to be freed anyway.)
+ * Closing a data source or destination, if necessary, is the application's
+ * responsibility.
+ */
+
+GLOBAL(void)
+jpeg_destroy (j_common_ptr cinfo)
+{
+  /* We need only tell the memory manager to release everything. */
+  /* NB: mem pointer is NULL if memory mgr failed to initialize. */
+  if (cinfo->mem != NULL)
+    (*cinfo->mem->self_destruct) (cinfo);
+  cinfo->mem = NULL;		/* be safe if jpeg_destroy is called twice */
+  cinfo->global_state = 0;	/* mark it destroyed */
+}
+
+
+/*
+ * Convenience routines for allocating quantization and Huffman tables.
+ * (Would jutils.c be a more reasonable place to put these?)
+ */
+
+GLOBAL(JQUANT_TBL *)
+jpeg_alloc_quant_table (j_common_ptr cinfo)
+{
+  JQUANT_TBL *tbl;
+
+  tbl = (JQUANT_TBL *)
+    (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL));
+  tbl->sent_table = FALSE;	/* make sure this is false in any new table */
+  return tbl;
+}
+
+
+GLOBAL(JHUFF_TBL *)
+jpeg_alloc_huff_table (j_common_ptr cinfo)
+{
+  JHUFF_TBL *tbl;
+
+  tbl = (JHUFF_TBL *)
+    (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL));
+  tbl->sent_table = FALSE;	/* make sure this is false in any new table */
+  return tbl;
+}
diff --git a/samples/jpeglib/jconfig.h b/samples/jpeglib/jconfig.h
new file mode 100644
index 0000000..708c73f
--- /dev/null
+++ b/samples/jpeglib/jconfig.h
@@ -0,0 +1,63 @@
+/* jconfig.h Modified for multiple platforms */
+
+#ifdef _WIN32
+#include "win-config.h"
+#elif ( ! defined(__APPLE__))
+#include "config.h"
+#endif
+
+#define HAVE_PROTOTYPES
+#define HAVE_UNSIGNED_CHAR
+#define HAVE_UNSIGNED_SHORT
+#ifdef __APPLE__
+#undef void
+#undef const
+#define HAVE_STDDEF_H 
+#define INLINE __inline__
+/* These are for configuring the JPEG memory manager. */
+#undef DEFAULT_MAX_MEM
+#undef NO_MKTEMP
+#endif
+#undef CHAR_IS_UNSIGNED
+#undef NEED_BSD_STRINGS
+#ifdef HAVE_SYS_TYPES_H
+#define NEED_SYS_TYPES_H
+#else
+#undef NEED_SYS_TYPES_H
+#endif
+#undef NEED_FAR_POINTERS	/* we presume a 32-bit flat memory model */
+#undef NEED_SHORT_EXTERNAL_NAMES
+#undef INCOMPLETE_TYPES_BROKEN
+
+#ifndef __APPLE__
+/* Define "boolean" as unsigned char, not int, per Windows custom */
+#ifndef __RPCNDR_H__		/* don't conflict if rpcndr.h already read */
+typedef unsigned char boolean;
+#endif
+#define HAVE_BOOLEAN		/* prevent jmorecfg.h from redefining it */
+#endif
+
+
+#ifdef JPEG_INTERNALS
+
+#undef RIGHT_SHIFT_IS_UNSIGNED
+
+#endif /* JPEG_INTERNALS */
+
+#ifdef JPEG_CJPEG_DJPEG
+
+#define BMP_SUPPORTED		/* BMP image file format */
+#define GIF_SUPPORTED		/* GIF image file format */
+#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
+#undef RLE_SUPPORTED		/* Utah RLE image file format */
+#define TARGA_SUPPORTED		/* Targa image file format */
+
+#define TWO_FILE_COMMANDLINE	/* optional */
+#ifdef _WIN32
+#define USE_SETMODE		/* Microsoft has setmode() */
+#endif
+#undef NEED_SIGNAL_CATCHER
+#undef DONT_USE_B_MODE
+#undef PROGRESS_REPORT		/* optional */
+
+#endif /* JPEG_CJPEG_DJPEG */
diff --git a/samples/jpeglib/jcparam.c b/samples/jpeglib/jcparam.c
new file mode 100644
index 0000000..6fc48f5
--- /dev/null
+++ b/samples/jpeglib/jcparam.c
@@ -0,0 +1,610 @@
+/*
+ * jcparam.c
+ *
+ * Copyright (C) 1991-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains optional default-setting code for the JPEG compressor.
+ * Applications do not have to use this file, but those that don't use it
+ * must know a lot more about the innards of the JPEG code.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/*
+ * Quantization table setup routines
+ */
+
+GLOBAL(void)
+jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
+		      const unsigned int *basic_table,
+		      int scale_factor, boolean force_baseline)
+/* Define a quantization table equal to the basic_table times
+ * a scale factor (given as a percentage).
+ * If force_baseline is TRUE, the computed quantization table entries
+ * are limited to 1..255 for JPEG baseline compatibility.
+ */
+{
+  JQUANT_TBL ** qtblptr;
+  int i;
+  long temp;
+
+  /* Safety check to ensure start_compress not called yet. */
+  if (cinfo->global_state != CSTATE_START)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+  if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS)
+    ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl);
+
+  qtblptr = & cinfo->quant_tbl_ptrs[which_tbl];
+
+  if (*qtblptr == NULL)
+    *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo);
+
+  for (i = 0; i < DCTSIZE2; i++) {
+    temp = ((long) basic_table[i] * scale_factor + 50L) / 100L;
+    /* limit the values to the valid range */
+    if (temp <= 0L) temp = 1L;
+    if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */
+    if (force_baseline && temp > 255L)
+      temp = 255L;		/* limit to baseline range if requested */
+    (*qtblptr)->quantval[i] = (UINT16) temp;
+  }
+
+  /* Initialize sent_table FALSE so table will be written to JPEG file. */
+  (*qtblptr)->sent_table = FALSE;
+}
+
+
+GLOBAL(void)
+jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
+			 boolean force_baseline)
+/* Set or change the 'quality' (quantization) setting, using default tables
+ * and a straight percentage-scaling quality scale.  In most cases it's better
+ * to use jpeg_set_quality (below); this entry point is provided for
+ * applications that insist on a linear percentage scaling.
+ */
+{
+  /* These are the sample quantization tables given in JPEG spec section K.1.
+   * The spec says that the values given produce "good" quality, and
+   * when divided by 2, "very good" quality.
+   */
+  static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = {
+    16,  11,  10,  16,  24,  40,  51,  61,
+    12,  12,  14,  19,  26,  58,  60,  55,
+    14,  13,  16,  24,  40,  57,  69,  56,
+    14,  17,  22,  29,  51,  87,  80,  62,
+    18,  22,  37,  56,  68, 109, 103,  77,
+    24,  35,  55,  64,  81, 104, 113,  92,
+    49,  64,  78,  87, 103, 121, 120, 101,
+    72,  92,  95,  98, 112, 100, 103,  99
+  };
+  static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = {
+    17,  18,  24,  47,  99,  99,  99,  99,
+    18,  21,  26,  66,  99,  99,  99,  99,
+    24,  26,  56,  99,  99,  99,  99,  99,
+    47,  66,  99,  99,  99,  99,  99,  99,
+    99,  99,  99,  99,  99,  99,  99,  99,
+    99,  99,  99,  99,  99,  99,  99,  99,
+    99,  99,  99,  99,  99,  99,  99,  99,
+    99,  99,  99,  99,  99,  99,  99,  99
+  };
+
+  /* Set up two quantization tables using the specified scaling */
+  jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl,
+		       scale_factor, force_baseline);
+  jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl,
+		       scale_factor, force_baseline);
+}
+
+
+GLOBAL(int)
+jpeg_quality_scaling (int quality)
+/* Convert a user-specified quality rating to a percentage scaling factor
+ * for an underlying quantization table, using our recommended scaling curve.
+ * The input 'quality' factor should be 0 (terrible) to 100 (very good).
+ */
+{
+  /* Safety limit on quality factor.  Convert 0 to 1 to avoid zero divide. */
+  if (quality <= 0) quality = 1;
+  if (quality > 100) quality = 100;
+
+  /* The basic table is used as-is (scaling 100) for a quality of 50.
+   * Qualities 50..100 are converted to scaling percentage 200 - 2*Q;
+   * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table
+   * to make all the table entries 1 (hence, minimum quantization loss).
+   * Qualities 1..50 are converted to scaling percentage 5000/Q.
+   */
+  if (quality < 50)
+    quality = 5000 / quality;
+  else
+    quality = 200 - quality*2;
+
+  return quality;
+}
+
+
+GLOBAL(void)
+jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
+/* Set or change the 'quality' (quantization) setting, using default tables.
+ * This is the standard quality-adjusting entry point for typical user
+ * interfaces; only those who want detailed control over quantization tables
+ * would use the preceding three routines directly.
+ */
+{
+  /* Convert user 0-100 rating to percentage scaling */
+  quality = jpeg_quality_scaling(quality);
+
+  /* Set up standard quality tables */
+  jpeg_set_linear_quality(cinfo, quality, force_baseline);
+}
+
+
+/*
+ * Huffman table setup routines
+ */
+
+LOCAL(void)
+add_huff_table (j_compress_ptr cinfo,
+		JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
+/* Define a Huffman table */
+{
+  int nsymbols, len;
+
+  if (*htblptr == NULL)
+    *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
+
+  /* Copy the number-of-symbols-of-each-code-length counts */
+  MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));
+
+  /* Validate the counts.  We do this here mainly so we can copy the right
+   * number of symbols from the val[] array, without risking marching off
+   * the end of memory.  jchuff.c will do a more thorough test later.
+   */
+  nsymbols = 0;
+  for (len = 1; len <= 16; len++)
+    nsymbols += bits[len];
+  if (nsymbols < 1 || nsymbols > 256)
+    ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+
+  MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8));
+
+  /* Initialize sent_table FALSE so table will be written to JPEG file. */
+  (*htblptr)->sent_table = FALSE;
+}
+
+
+LOCAL(void)
+std_huff_tables (j_compress_ptr cinfo)
+/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
+/* IMPORTANT: these are only valid for 8-bit data precision! */
+{
+  static const UINT8 bits_dc_luminance[17] =
+    { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
+  static const UINT8 val_dc_luminance[] =
+    { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
+  
+  static const UINT8 bits_dc_chrominance[17] =
+    { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
+  static const UINT8 val_dc_chrominance[] =
+    { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
+  
+  static const UINT8 bits_ac_luminance[17] =
+    { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };
+  static const UINT8 val_ac_luminance[] =
+    { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
+      0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
+      0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
+      0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,
+      0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,
+      0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
+      0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+      0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
+      0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
+      0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
+      0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
+      0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
+      0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
+      0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+      0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
+      0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,
+      0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,
+      0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
+      0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,
+      0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
+      0xf9, 0xfa };
+  
+  static const UINT8 bits_ac_chrominance[17] =
+    { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };
+  static const UINT8 val_ac_chrominance[] =
+    { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
+      0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
+      0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
+      0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,
+      0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,
+      0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
+      0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,
+      0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
+      0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
+      0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
+      0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
+      0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+      0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,
+      0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,
+      0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
+      0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,
+      0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,
+      0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
+      0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
+      0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
+      0xf9, 0xfa };
+  
+  add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[0],
+		 bits_dc_luminance, val_dc_luminance);
+  add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[0],
+		 bits_ac_luminance, val_ac_luminance);
+  add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[1],
+		 bits_dc_chrominance, val_dc_chrominance);
+  add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[1],
+		 bits_ac_chrominance, val_ac_chrominance);
+}
+
+
+/*
+ * Default parameter setup for compression.
+ *
+ * Applications that don't choose to use this routine must do their
+ * own setup of all these parameters.  Alternately, you can call this
+ * to establish defaults and then alter parameters selectively.  This
+ * is the recommended approach since, if we add any new parameters,
+ * your code will still work (they'll be set to reasonable defaults).
+ */
+
+GLOBAL(void)
+jpeg_set_defaults (j_compress_ptr cinfo)
+{
+  int i;
+
+  /* Safety check to ensure start_compress not called yet. */
+  if (cinfo->global_state != CSTATE_START)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+  /* Allocate comp_info array large enough for maximum component count.
+   * Array is made permanent in case application wants to compress
+   * multiple images at same param settings.
+   */
+  if (cinfo->comp_info == NULL)
+    cinfo->comp_info = (jpeg_component_info *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
+				  MAX_COMPONENTS * SIZEOF(jpeg_component_info));
+
+  /* Initialize everything not dependent on the color space */
+
+  cinfo->data_precision = BITS_IN_JSAMPLE;
+  /* Set up two quantization tables using default quality of 75 */
+  jpeg_set_quality(cinfo, 75, TRUE);
+  /* Set up two Huffman tables */
+  std_huff_tables(cinfo);
+
+  /* Initialize default arithmetic coding conditioning */
+  for (i = 0; i < NUM_ARITH_TBLS; i++) {
+    cinfo->arith_dc_L[i] = 0;
+    cinfo->arith_dc_U[i] = 1;
+    cinfo->arith_ac_K[i] = 5;
+  }
+
+  /* Default is no multiple-scan output */
+  cinfo->scan_info = NULL;
+  cinfo->num_scans = 0;
+
+  /* Expect normal source image, not raw downsampled data */
+  cinfo->raw_data_in = FALSE;
+
+  /* Use Huffman coding, not arithmetic coding, by default */
+  cinfo->arith_code = FALSE;
+
+  /* By default, don't do extra passes to optimize entropy coding */
+  cinfo->optimize_coding = FALSE;
+  /* The standard Huffman tables are only valid for 8-bit data precision.
+   * If the precision is higher, force optimization on so that usable
+   * tables will be computed.  This test can be removed if default tables
+   * are supplied that are valid for the desired precision.
+   */
+  if (cinfo->data_precision > 8)
+    cinfo->optimize_coding = TRUE;
+
+  /* By default, use the simpler non-cosited sampling alignment */
+  cinfo->CCIR601_sampling = FALSE;
+
+  /* No input smoothing */
+  cinfo->smoothing_factor = 0;
+
+  /* DCT algorithm preference */
+  cinfo->dct_method = JDCT_DEFAULT;
+
+  /* No restart markers */
+  cinfo->restart_interval = 0;
+  cinfo->restart_in_rows = 0;
+
+  /* Fill in default JFIF marker parameters.  Note that whether the marker
+   * will actually be written is determined by jpeg_set_colorspace.
+   *
+   * By default, the library emits JFIF version code 1.01.
+   * An application that wants to emit JFIF 1.02 extension markers should set
+   * JFIF_minor_version to 2.  We could probably get away with just defaulting
+   * to 1.02, but there may still be some decoders in use that will complain
+   * about that; saying 1.01 should minimize compatibility problems.
+   */
+  cinfo->JFIF_major_version = 1; /* Default JFIF version = 1.01 */
+  cinfo->JFIF_minor_version = 1;
+  cinfo->density_unit = 0;	/* Pixel size is unknown by default */
+  cinfo->X_density = 1;		/* Pixel aspect ratio is square by default */
+  cinfo->Y_density = 1;
+
+  /* Choose JPEG colorspace based on input space, set defaults accordingly */
+
+  jpeg_default_colorspace(cinfo);
+}
+
+
+/*
+ * Select an appropriate JPEG colorspace for in_color_space.
+ */
+
+GLOBAL(void)
+jpeg_default_colorspace (j_compress_ptr cinfo)
+{
+  switch (cinfo->in_color_space) {
+  case JCS_GRAYSCALE:
+    jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
+    break;
+  case JCS_RGB:
+    jpeg_set_colorspace(cinfo, JCS_YCbCr);
+    break;
+  case JCS_YCbCr:
+    jpeg_set_colorspace(cinfo, JCS_YCbCr);
+    break;
+  case JCS_CMYK:
+    jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */
+    break;
+  case JCS_YCCK:
+    jpeg_set_colorspace(cinfo, JCS_YCCK);
+    break;
+  case JCS_UNKNOWN:
+    jpeg_set_colorspace(cinfo, JCS_UNKNOWN);
+    break;
+  default:
+    ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
+  }
+}
+
+
+/*
+ * Set the JPEG colorspace, and choose colorspace-dependent default values.
+ */
+
+GLOBAL(void)
+jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
+{
+  jpeg_component_info * compptr;
+  int ci;
+
+#define SET_COMP(index,id,hsamp,vsamp,quant,dctbl,actbl)  \
+  (compptr = &cinfo->comp_info[index], \
+   compptr->component_id = (id), \
+   compptr->h_samp_factor = (hsamp), \
+   compptr->v_samp_factor = (vsamp), \
+   compptr->quant_tbl_no = (quant), \
+   compptr->dc_tbl_no = (dctbl), \
+   compptr->ac_tbl_no = (actbl) )
+
+  /* Safety check to ensure start_compress not called yet. */
+  if (cinfo->global_state != CSTATE_START)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+  /* For all colorspaces, we use Q and Huff tables 0 for luminance components,
+   * tables 1 for chrominance components.
+   */
+
+  cinfo->jpeg_color_space = colorspace;
+
+  cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */
+  cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */
+
+  switch (colorspace) {
+  case JCS_GRAYSCALE:
+    cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */
+    cinfo->num_components = 1;
+    /* JFIF specifies component ID 1 */
+    SET_COMP(0, 1, 1,1, 0, 0,0);
+    break;
+  case JCS_RGB:
+    cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */
+    cinfo->num_components = 3;
+    SET_COMP(0, 0x52 /* 'R' */, 1,1, 0, 0,0);
+    SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0);
+    SET_COMP(2, 0x42 /* 'B' */, 1,1, 0, 0,0);
+    break;
+  case JCS_YCbCr:
+    cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */
+    cinfo->num_components = 3;
+    /* JFIF specifies component IDs 1,2,3 */
+    /* We default to 2x2 subsamples of chrominance */
+    SET_COMP(0, 1, 2,2, 0, 0,0);
+    SET_COMP(1, 2, 1,1, 1, 1,1);
+    SET_COMP(2, 3, 1,1, 1, 1,1);
+    break;
+  case JCS_CMYK:
+    cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */
+    cinfo->num_components = 4;
+    SET_COMP(0, 0x43 /* 'C' */, 1,1, 0, 0,0);
+    SET_COMP(1, 0x4D /* 'M' */, 1,1, 0, 0,0);
+    SET_COMP(2, 0x59 /* 'Y' */, 1,1, 0, 0,0);
+    SET_COMP(3, 0x4B /* 'K' */, 1,1, 0, 0,0);
+    break;
+  case JCS_YCCK:
+    cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */
+    cinfo->num_components = 4;
+    SET_COMP(0, 1, 2,2, 0, 0,0);
+    SET_COMP(1, 2, 1,1, 1, 1,1);
+    SET_COMP(2, 3, 1,1, 1, 1,1);
+    SET_COMP(3, 4, 2,2, 0, 0,0);
+    break;
+  case JCS_UNKNOWN:
+    cinfo->num_components = cinfo->input_components;
+    if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS)
+      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
+	       MAX_COMPONENTS);
+    for (ci = 0; ci < cinfo->num_components; ci++) {
+      SET_COMP(ci, ci, 1,1, 0, 0,0);
+    }
+    break;
+  default:
+    ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
+  }
+}
+
+
+#ifdef C_PROGRESSIVE_SUPPORTED
+
+LOCAL(jpeg_scan_info *)
+fill_a_scan (jpeg_scan_info * scanptr, int ci,
+	     int Ss, int Se, int Ah, int Al)
+/* Support routine: generate one scan for specified component */
+{
+  scanptr->comps_in_scan = 1;
+  scanptr->component_index[0] = ci;
+  scanptr->Ss = Ss;
+  scanptr->Se = Se;
+  scanptr->Ah = Ah;
+  scanptr->Al = Al;
+  scanptr++;
+  return scanptr;
+}
+
+LOCAL(jpeg_scan_info *)
+fill_scans (jpeg_scan_info * scanptr, int ncomps,
+	    int Ss, int Se, int Ah, int Al)
+/* Support routine: generate one scan for each component */
+{
+  int ci;
+
+  for (ci = 0; ci < ncomps; ci++) {
+    scanptr->comps_in_scan = 1;
+    scanptr->component_index[0] = ci;
+    scanptr->Ss = Ss;
+    scanptr->Se = Se;
+    scanptr->Ah = Ah;
+    scanptr->Al = Al;
+    scanptr++;
+  }
+  return scanptr;
+}
+
+LOCAL(jpeg_scan_info *)
+fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al)
+/* Support routine: generate interleaved DC scan if possible, else N scans */
+{
+  int ci;
+
+  if (ncomps <= MAX_COMPS_IN_SCAN) {
+    /* Single interleaved DC scan */
+    scanptr->comps_in_scan = ncomps;
+    for (ci = 0; ci < ncomps; ci++)
+      scanptr->component_index[ci] = ci;
+    scanptr->Ss = scanptr->Se = 0;
+    scanptr->Ah = Ah;
+    scanptr->Al = Al;
+    scanptr++;
+  } else {
+    /* Noninterleaved DC scan for each component */
+    scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al);
+  }
+  return scanptr;
+}
+
+
+/*
+ * Create a recommended progressive-JPEG script.
+ * cinfo->num_components and cinfo->jpeg_color_space must be correct.
+ */
+
+GLOBAL(void)
+jpeg_simple_progression (j_compress_ptr cinfo)
+{
+  int ncomps = cinfo->num_components;
+  int nscans;
+  jpeg_scan_info * scanptr;
+
+  /* Safety check to ensure start_compress not called yet. */
+  if (cinfo->global_state != CSTATE_START)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+  /* Figure space needed for script.  Calculation must match code below! */
+  if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) {
+    /* Custom script for YCbCr color images. */
+    nscans = 10;
+  } else {
+    /* All-purpose script for other color spaces. */
+    if (ncomps > MAX_COMPS_IN_SCAN)
+      nscans = 6 * ncomps;	/* 2 DC + 4 AC scans per component */
+    else
+      nscans = 2 + 4 * ncomps;	/* 2 DC scans; 4 AC scans per component */
+  }
+
+  /* Allocate space for script.
+   * We need to put it in the permanent pool in case the application performs
+   * multiple compressions without changing the settings.  To avoid a memory
+   * leak if jpeg_simple_progression is called repeatedly for the same JPEG
+   * object, we try to re-use previously allocated space, and we allocate
+   * enough space to handle YCbCr even if initially asked for grayscale.
+   */
+  if (cinfo->script_space == NULL || cinfo->script_space_size < nscans) {
+    cinfo->script_space_size = MAX(nscans, 10);
+    cinfo->script_space = (jpeg_scan_info *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
+			cinfo->script_space_size * SIZEOF(jpeg_scan_info));
+  }
+  scanptr = cinfo->script_space;
+  cinfo->scan_info = scanptr;
+  cinfo->num_scans = nscans;
+
+  if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) {
+    /* Custom script for YCbCr color images. */
+    /* Initial DC scan */
+    scanptr = fill_dc_scans(scanptr, ncomps, 0, 1);
+    /* Initial AC scan: get some luma data out in a hurry */
+    scanptr = fill_a_scan(scanptr, 0, 1, 5, 0, 2);
+    /* Chroma data is too small to be worth expending many scans on */
+    scanptr = fill_a_scan(scanptr, 2, 1, 63, 0, 1);
+    scanptr = fill_a_scan(scanptr, 1, 1, 63, 0, 1);
+    /* Complete spectral selection for luma AC */
+    scanptr = fill_a_scan(scanptr, 0, 6, 63, 0, 2);
+    /* Refine next bit of luma AC */
+    scanptr = fill_a_scan(scanptr, 0, 1, 63, 2, 1);
+    /* Finish DC successive approximation */
+    scanptr = fill_dc_scans(scanptr, ncomps, 1, 0);
+    /* Finish AC successive approximation */
+    scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0);
+    scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0);
+    /* Luma bottom bit comes last since it's usually largest scan */
+    scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0);
+  } else {
+    /* All-purpose script for other color spaces. */
+    /* Successive approximation first pass */
+    scanptr = fill_dc_scans(scanptr, ncomps, 0, 1);
+    scanptr = fill_scans(scanptr, ncomps, 1, 5, 0, 2);
+    scanptr = fill_scans(scanptr, ncomps, 6, 63, 0, 2);
+    /* Successive approximation second pass */
+    scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1);
+    /* Successive approximation final pass */
+    scanptr = fill_dc_scans(scanptr, ncomps, 1, 0);
+    scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0);
+  }
+}
+
+#endif /* C_PROGRESSIVE_SUPPORTED */
diff --git a/samples/jpeglib/jcphuff.c b/samples/jpeglib/jcphuff.c
new file mode 100644
index 0000000..07f9178
--- /dev/null
+++ b/samples/jpeglib/jcphuff.c
@@ -0,0 +1,833 @@
+/*
+ * jcphuff.c
+ *
+ * Copyright (C) 1995-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains Huffman entropy encoding routines for progressive JPEG.
+ *
+ * We do not support output suspension in this module, since the library
+ * currently does not allow multiple-scan files to be written with output
+ * suspension.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jchuff.h"		/* Declarations shared with jchuff.c */
+
+#ifdef C_PROGRESSIVE_SUPPORTED
+
+/* Expanded entropy encoder object for progressive Huffman encoding. */
+
+typedef struct {
+  struct jpeg_entropy_encoder pub; /* public fields */
+
+  /* Mode flag: TRUE for optimization, FALSE for actual data output */
+  boolean gather_statistics;
+
+  /* Bit-level coding status.
+   * next_output_byte/free_in_buffer are local copies of cinfo->dest fields.
+   */
+  JOCTET * next_output_byte;	/* => next byte to write in buffer */
+  size_t free_in_buffer;	/* # of byte spaces remaining in buffer */
+  INT32 put_buffer;		/* current bit-accumulation buffer */
+  int put_bits;			/* # of bits now in it */
+  j_compress_ptr cinfo;		/* link to cinfo (needed for dump_buffer) */
+
+  /* Coding status for DC components */
+  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
+
+  /* Coding status for AC components */
+  int ac_tbl_no;		/* the table number of the single component */
+  unsigned int EOBRUN;		/* run length of EOBs */
+  unsigned int BE;		/* # of buffered correction bits before MCU */
+  char * bit_buffer;		/* buffer for correction bits (1 per char) */
+  /* packing correction bits tightly would save some space but cost time... */
+
+  unsigned int restarts_to_go;	/* MCUs left in this restart interval */
+  int next_restart_num;		/* next restart number to write (0-7) */
+
+  /* Pointers to derived tables (these workspaces have image lifespan).
+   * Since any one scan codes only DC or only AC, we only need one set
+   * of tables, not one for DC and one for AC.
+   */
+  c_derived_tbl * derived_tbls[NUM_HUFF_TBLS];
+
+  /* Statistics tables for optimization; again, one set is enough */
+  long * count_ptrs[NUM_HUFF_TBLS];
+} phuff_entropy_encoder;
+
+typedef phuff_entropy_encoder * phuff_entropy_ptr;
+
+/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit
+ * buffer can hold.  Larger sizes may slightly improve compression, but
+ * 1000 is already well into the realm of overkill.
+ * The minimum safe size is 64 bits.
+ */
+
+#define MAX_CORR_BITS  1000	/* Max # of correction bits I can buffer */
+
+/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32.
+ * We assume that int right shift is unsigned if INT32 right shift is,
+ * which should be safe.
+ */
+
+#ifdef RIGHT_SHIFT_IS_UNSIGNED
+#define ISHIFT_TEMPS	int ishift_temp;
+#define IRIGHT_SHIFT(x,shft)  \
+	((ishift_temp = (x)) < 0 ? \
+	 (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \
+	 (ishift_temp >> (shft)))
+#else
+#define ISHIFT_TEMPS
+#define IRIGHT_SHIFT(x,shft)	((x) >> (shft))
+#endif
+
+/* Forward declarations */
+METHODDEF(boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo,
+					    JBLOCKROW *MCU_data));
+METHODDEF(boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo,
+					    JBLOCKROW *MCU_data));
+METHODDEF(boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo,
+					     JBLOCKROW *MCU_data));
+METHODDEF(boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo,
+					     JBLOCKROW *MCU_data));
+METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo));
+METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo));
+
+
+/*
+ * Initialize for a Huffman-compressed scan using progressive JPEG.
+ */
+
+METHODDEF(void)
+start_pass_phuff (j_compress_ptr cinfo, boolean gather_statistics)
+{  
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  boolean is_DC_band;
+  int ci, tbl;
+  jpeg_component_info * compptr;
+
+  entropy->cinfo = cinfo;
+  entropy->gather_statistics = gather_statistics;
+
+  is_DC_band = (cinfo->Ss == 0);
+
+  /* We assume jcmaster.c already validated the scan parameters. */
+
+  /* Select execution routines */
+  if (cinfo->Ah == 0) {
+    if (is_DC_band)
+      entropy->pub.encode_mcu = encode_mcu_DC_first;
+    else
+      entropy->pub.encode_mcu = encode_mcu_AC_first;
+  } else {
+    if (is_DC_band)
+      entropy->pub.encode_mcu = encode_mcu_DC_refine;
+    else {
+      entropy->pub.encode_mcu = encode_mcu_AC_refine;
+      /* AC refinement needs a correction bit buffer */
+      if (entropy->bit_buffer == NULL)
+	entropy->bit_buffer = (char *)
+	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				      MAX_CORR_BITS * SIZEOF(char));
+    }
+  }
+  if (gather_statistics)
+    entropy->pub.finish_pass = finish_pass_gather_phuff;
+  else
+    entropy->pub.finish_pass = finish_pass_phuff;
+
+  /* Only DC coefficients may be interleaved, so cinfo->comps_in_scan = 1
+   * for AC coefficients.
+   */
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    compptr = cinfo->cur_comp_info[ci];
+    /* Initialize DC predictions to 0 */
+    entropy->last_dc_val[ci] = 0;
+    /* Get table index */
+    if (is_DC_band) {
+      if (cinfo->Ah != 0)	/* DC refinement needs no table */
+	continue;
+      tbl = compptr->dc_tbl_no;
+    } else {
+      entropy->ac_tbl_no = tbl = compptr->ac_tbl_no;
+    }
+    if (gather_statistics) {
+      /* Check for invalid table index */
+      /* (make_c_derived_tbl does this in the other path) */
+      if (tbl < 0 || tbl >= NUM_HUFF_TBLS)
+        ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl);
+      /* Allocate and zero the statistics tables */
+      /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */
+      if (entropy->count_ptrs[tbl] == NULL)
+	entropy->count_ptrs[tbl] = (long *)
+	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				      257 * SIZEOF(long));
+      MEMZERO(entropy->count_ptrs[tbl], 257 * SIZEOF(long));
+    } else {
+      /* Compute derived values for Huffman table */
+      /* We may do this more than once for a table, but it's not expensive */
+      jpeg_make_c_derived_tbl(cinfo, is_DC_band, tbl,
+			      & entropy->derived_tbls[tbl]);
+    }
+  }
+
+  /* Initialize AC stuff */
+  entropy->EOBRUN = 0;
+  entropy->BE = 0;
+
+  /* Initialize bit buffer to empty */
+  entropy->put_buffer = 0;
+  entropy->put_bits = 0;
+
+  /* Initialize restart stuff */
+  entropy->restarts_to_go = cinfo->restart_interval;
+  entropy->next_restart_num = 0;
+}
+
+
+/* Outputting bytes to the file.
+ * NB: these must be called only when actually outputting,
+ * that is, entropy->gather_statistics == FALSE.
+ */
+
+/* Emit a byte */
+#define emit_byte(entropy,val)  \
+	{ *(entropy)->next_output_byte++ = (JOCTET) (val);  \
+	  if (--(entropy)->free_in_buffer == 0)  \
+	    dump_buffer(entropy); }
+
+
+LOCAL(void)
+dump_buffer (phuff_entropy_ptr entropy)
+/* Empty the output buffer; we do not support suspension in this module. */
+{
+  struct jpeg_destination_mgr * dest = entropy->cinfo->dest;
+
+  if (! (*dest->empty_output_buffer) (entropy->cinfo))
+    ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND);
+  /* After a successful buffer dump, must reset buffer pointers */
+  entropy->next_output_byte = dest->next_output_byte;
+  entropy->free_in_buffer = dest->free_in_buffer;
+}
+
+
+/* Outputting bits to the file */
+
+/* Only the right 24 bits of put_buffer are used; the valid bits are
+ * left-justified in this part.  At most 16 bits can be passed to emit_bits
+ * in one call, and we never retain more than 7 bits in put_buffer
+ * between calls, so 24 bits are sufficient.
+ */
+
+INLINE
+LOCAL(void)
+emit_bits (phuff_entropy_ptr entropy, unsigned int code, int size)
+/* Emit some bits, unless we are in gather mode */
+{
+  /* This routine is heavily used, so it's worth coding tightly. */
+  register INT32 put_buffer = (INT32) code;
+  register int put_bits = entropy->put_bits;
+
+  /* if size is 0, caller used an invalid Huffman table entry */
+  if (size == 0)
+    ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE);
+
+  if (entropy->gather_statistics)
+    return;			/* do nothing if we're only getting stats */
+
+  put_buffer &= (((INT32) 1)<<size) - 1; /* mask off any extra bits in code */
+  
+  put_bits += size;		/* new number of bits in buffer */
+  
+  put_buffer <<= 24 - put_bits; /* align incoming bits */
+
+  put_buffer |= entropy->put_buffer; /* and merge with old buffer contents */
+
+  while (put_bits >= 8) {
+    int c = (int) ((put_buffer >> 16) & 0xFF);
+    
+    emit_byte(entropy, c);
+    if (c == 0xFF) {		/* need to stuff a zero byte? */
+      emit_byte(entropy, 0);
+    }
+    put_buffer <<= 8;
+    put_bits -= 8;
+  }
+
+  entropy->put_buffer = put_buffer; /* update variables */
+  entropy->put_bits = put_bits;
+}
+
+
+LOCAL(void)
+flush_bits (phuff_entropy_ptr entropy)
+{
+  emit_bits(entropy, 0x7F, 7); /* fill any partial byte with ones */
+  entropy->put_buffer = 0;     /* and reset bit-buffer to empty */
+  entropy->put_bits = 0;
+}
+
+
+/*
+ * Emit (or just count) a Huffman symbol.
+ */
+
+INLINE
+LOCAL(void)
+emit_symbol (phuff_entropy_ptr entropy, int tbl_no, int symbol)
+{
+  if (entropy->gather_statistics)
+    entropy->count_ptrs[tbl_no][symbol]++;
+  else {
+    c_derived_tbl * tbl = entropy->derived_tbls[tbl_no];
+    emit_bits(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]);
+  }
+}
+
+
+/*
+ * Emit bits from a correction bit buffer.
+ */
+
+LOCAL(void)
+emit_buffered_bits (phuff_entropy_ptr entropy, char * bufstart,
+		    unsigned int nbits)
+{
+  if (entropy->gather_statistics)
+    return;			/* no real work */
+
+  while (nbits > 0) {
+    emit_bits(entropy, (unsigned int) (*bufstart), 1);
+    bufstart++;
+    nbits--;
+  }
+}
+
+
+/*
+ * Emit any pending EOBRUN symbol.
+ */
+
+LOCAL(void)
+emit_eobrun (phuff_entropy_ptr entropy)
+{
+  register int temp, nbits;
+
+  if (entropy->EOBRUN > 0) {	/* if there is any pending EOBRUN */
+    temp = entropy->EOBRUN;
+    nbits = 0;
+    while ((temp >>= 1))
+      nbits++;
+    /* safety check: shouldn't happen given limited correction-bit buffer */
+    if (nbits > 14)
+      ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE);
+
+    emit_symbol(entropy, entropy->ac_tbl_no, nbits << 4);
+    if (nbits)
+      emit_bits(entropy, entropy->EOBRUN, nbits);
+
+    entropy->EOBRUN = 0;
+
+    /* Emit any buffered correction bits */
+    emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE);
+    entropy->BE = 0;
+  }
+}
+
+
+/*
+ * Emit a restart marker & resynchronize predictions.
+ */
+
+LOCAL(void)
+emit_restart (phuff_entropy_ptr entropy, int restart_num)
+{
+  int ci;
+
+  emit_eobrun(entropy);
+
+  if (! entropy->gather_statistics) {
+    flush_bits(entropy);
+    emit_byte(entropy, 0xFF);
+    emit_byte(entropy, JPEG_RST0 + restart_num);
+  }
+
+  if (entropy->cinfo->Ss == 0) {
+    /* Re-initialize DC predictions to 0 */
+    for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++)
+      entropy->last_dc_val[ci] = 0;
+  } else {
+    /* Re-initialize all AC-related fields to 0 */
+    entropy->EOBRUN = 0;
+    entropy->BE = 0;
+  }
+}
+
+
+/*
+ * MCU encoding for DC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  register int temp, temp2;
+  register int nbits;
+  int blkn, ci;
+  int Al = cinfo->Al;
+  JBLOCKROW block;
+  jpeg_component_info * compptr;
+  ISHIFT_TEMPS
+
+  entropy->next_output_byte = cinfo->dest->next_output_byte;
+  entropy->free_in_buffer = cinfo->dest->free_in_buffer;
+
+  /* Emit restart marker if needed */
+  if (cinfo->restart_interval)
+    if (entropy->restarts_to_go == 0)
+      emit_restart(entropy, entropy->next_restart_num);
+
+  /* Encode the MCU data blocks */
+  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+    block = MCU_data[blkn];
+    ci = cinfo->MCU_membership[blkn];
+    compptr = cinfo->cur_comp_info[ci];
+
+    /* Compute the DC value after the required point transform by Al.
+     * This is simply an arithmetic right shift.
+     */
+    temp2 = IRIGHT_SHIFT((int) ((*block)[0]), Al);
+
+    /* DC differences are figured on the point-transformed values. */
+    temp = temp2 - entropy->last_dc_val[ci];
+    entropy->last_dc_val[ci] = temp2;
+
+    /* Encode the DC coefficient difference per section G.1.2.1 */
+    temp2 = temp;
+    if (temp < 0) {
+      temp = -temp;		/* temp is abs value of input */
+      /* For a negative input, want temp2 = bitwise complement of abs(input) */
+      /* This code assumes we are on a two's complement machine */
+      temp2--;
+    }
+    
+    /* Find the number of bits needed for the magnitude of the coefficient */
+    nbits = 0;
+    while (temp) {
+      nbits++;
+      temp >>= 1;
+    }
+    /* Check for out-of-range coefficient values.
+     * Since we're encoding a difference, the range limit is twice as much.
+     */
+    if (nbits > MAX_COEF_BITS+1)
+      ERREXIT(cinfo, JERR_BAD_DCT_COEF);
+    
+    /* Count/emit the Huffman-coded symbol for the number of bits */
+    emit_symbol(entropy, compptr->dc_tbl_no, nbits);
+    
+    /* Emit that number of bits of the value, if positive, */
+    /* or the complement of its magnitude, if negative. */
+    if (nbits)			/* emit_bits rejects calls with size 0 */
+      emit_bits(entropy, (unsigned int) temp2, nbits);
+  }
+
+  cinfo->dest->next_output_byte = entropy->next_output_byte;
+  cinfo->dest->free_in_buffer = entropy->free_in_buffer;
+
+  /* Update restart-interval state too */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0) {
+      entropy->restarts_to_go = cinfo->restart_interval;
+      entropy->next_restart_num++;
+      entropy->next_restart_num &= 7;
+    }
+    entropy->restarts_to_go--;
+  }
+
+  return TRUE;
+}
+
+
+/*
+ * MCU encoding for AC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  register int temp, temp2;
+  register int nbits;
+  register int r, k;
+  int Se = cinfo->Se;
+  int Al = cinfo->Al;
+  JBLOCKROW block;
+
+  entropy->next_output_byte = cinfo->dest->next_output_byte;
+  entropy->free_in_buffer = cinfo->dest->free_in_buffer;
+
+  /* Emit restart marker if needed */
+  if (cinfo->restart_interval)
+    if (entropy->restarts_to_go == 0)
+      emit_restart(entropy, entropy->next_restart_num);
+
+  /* Encode the MCU data block */
+  block = MCU_data[0];
+
+  /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */
+  
+  r = 0;			/* r = run length of zeros */
+   
+  for (k = cinfo->Ss; k <= Se; k++) {
+    if ((temp = (*block)[jpeg_natural_order[k]]) == 0) {
+      r++;
+      continue;
+    }
+    /* We must apply the point transform by Al.  For AC coefficients this
+     * is an integer division with rounding towards 0.  To do this portably
+     * in C, we shift after obtaining the absolute value; so the code is
+     * interwoven with finding the abs value (temp) and output bits (temp2).
+     */
+    if (temp < 0) {
+      temp = -temp;		/* temp is abs value of input */
+      temp >>= Al;		/* apply the point transform */
+      /* For a negative coef, want temp2 = bitwise complement of abs(coef) */
+      temp2 = ~temp;
+    } else {
+      temp >>= Al;		/* apply the point transform */
+      temp2 = temp;
+    }
+    /* Watch out for case that nonzero coef is zero after point transform */
+    if (temp == 0) {
+      r++;
+      continue;
+    }
+
+    /* Emit any pending EOBRUN */
+    if (entropy->EOBRUN > 0)
+      emit_eobrun(entropy);
+    /* if run length > 15, must emit special run-length-16 codes (0xF0) */
+    while (r > 15) {
+      emit_symbol(entropy, entropy->ac_tbl_no, 0xF0);
+      r -= 16;
+    }
+
+    /* Find the number of bits needed for the magnitude of the coefficient */
+    nbits = 1;			/* there must be at least one 1 bit */
+    while ((temp >>= 1))
+      nbits++;
+    /* Check for out-of-range coefficient values */
+    if (nbits > MAX_COEF_BITS)
+      ERREXIT(cinfo, JERR_BAD_DCT_COEF);
+
+    /* Count/emit Huffman symbol for run length / number of bits */
+    emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits);
+
+    /* Emit that number of bits of the value, if positive, */
+    /* or the complement of its magnitude, if negative. */
+    emit_bits(entropy, (unsigned int) temp2, nbits);
+
+    r = 0;			/* reset zero run length */
+  }
+
+  if (r > 0) {			/* If there are trailing zeroes, */
+    entropy->EOBRUN++;		/* count an EOB */
+    if (entropy->EOBRUN == 0x7FFF)
+      emit_eobrun(entropy);	/* force it out to avoid overflow */
+  }
+
+  cinfo->dest->next_output_byte = entropy->next_output_byte;
+  cinfo->dest->free_in_buffer = entropy->free_in_buffer;
+
+  /* Update restart-interval state too */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0) {
+      entropy->restarts_to_go = cinfo->restart_interval;
+      entropy->next_restart_num++;
+      entropy->next_restart_num &= 7;
+    }
+    entropy->restarts_to_go--;
+  }
+
+  return TRUE;
+}
+
+
+/*
+ * MCU encoding for DC successive approximation refinement scan.
+ * Note: we assume such scans can be multi-component, although the spec
+ * is not very clear on the point.
+ */
+
+METHODDEF(boolean)
+encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  register int temp;
+  int blkn;
+  int Al = cinfo->Al;
+  JBLOCKROW block;
+
+  entropy->next_output_byte = cinfo->dest->next_output_byte;
+  entropy->free_in_buffer = cinfo->dest->free_in_buffer;
+
+  /* Emit restart marker if needed */
+  if (cinfo->restart_interval)
+    if (entropy->restarts_to_go == 0)
+      emit_restart(entropy, entropy->next_restart_num);
+
+  /* Encode the MCU data blocks */
+  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+    block = MCU_data[blkn];
+
+    /* We simply emit the Al'th bit of the DC coefficient value. */
+    temp = (*block)[0];
+    emit_bits(entropy, (unsigned int) (temp >> Al), 1);
+  }
+
+  cinfo->dest->next_output_byte = entropy->next_output_byte;
+  cinfo->dest->free_in_buffer = entropy->free_in_buffer;
+
+  /* Update restart-interval state too */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0) {
+      entropy->restarts_to_go = cinfo->restart_interval;
+      entropy->next_restart_num++;
+      entropy->next_restart_num &= 7;
+    }
+    entropy->restarts_to_go--;
+  }
+
+  return TRUE;
+}
+
+
+/*
+ * MCU encoding for AC successive approximation refinement scan.
+ */
+
+METHODDEF(boolean)
+encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  register int temp;
+  register int r, k;
+  int EOB;
+  char *BR_buffer;
+  unsigned int BR;
+  int Se = cinfo->Se;
+  int Al = cinfo->Al;
+  JBLOCKROW block;
+  int absvalues[DCTSIZE2];
+
+  entropy->next_output_byte = cinfo->dest->next_output_byte;
+  entropy->free_in_buffer = cinfo->dest->free_in_buffer;
+
+  /* Emit restart marker if needed */
+  if (cinfo->restart_interval)
+    if (entropy->restarts_to_go == 0)
+      emit_restart(entropy, entropy->next_restart_num);
+
+  /* Encode the MCU data block */
+  block = MCU_data[0];
+
+  /* It is convenient to make a pre-pass to determine the transformed
+   * coefficients' absolute values and the EOB position.
+   */
+  EOB = 0;
+  for (k = cinfo->Ss; k <= Se; k++) {
+    temp = (*block)[jpeg_natural_order[k]];
+    /* We must apply the point transform by Al.  For AC coefficients this
+     * is an integer division with rounding towards 0.  To do this portably
+     * in C, we shift after obtaining the absolute value.
+     */
+    if (temp < 0)
+      temp = -temp;		/* temp is abs value of input */
+    temp >>= Al;		/* apply the point transform */
+    absvalues[k] = temp;	/* save abs value for main pass */
+    if (temp == 1)
+      EOB = k;			/* EOB = index of last newly-nonzero coef */
+  }
+
+  /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */
+  
+  r = 0;			/* r = run length of zeros */
+  BR = 0;			/* BR = count of buffered bits added now */
+  BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */
+
+  for (k = cinfo->Ss; k <= Se; k++) {
+    if ((temp = absvalues[k]) == 0) {
+      r++;
+      continue;
+    }
+
+    /* Emit any required ZRLs, but not if they can be folded into EOB */
+    while (r > 15 && k <= EOB) {
+      /* emit any pending EOBRUN and the BE correction bits */
+      emit_eobrun(entropy);
+      /* Emit ZRL */
+      emit_symbol(entropy, entropy->ac_tbl_no, 0xF0);
+      r -= 16;
+      /* Emit buffered correction bits that must be associated with ZRL */
+      emit_buffered_bits(entropy, BR_buffer, BR);
+      BR_buffer = entropy->bit_buffer; /* BE bits are gone now */
+      BR = 0;
+    }
+
+    /* If the coef was previously nonzero, it only needs a correction bit.
+     * NOTE: a straight translation of the spec's figure G.7 would suggest
+     * that we also need to test r > 15.  But if r > 15, we can only get here
+     * if k > EOB, which implies that this coefficient is not 1.
+     */
+    if (temp > 1) {
+      /* The correction bit is the next bit of the absolute value. */
+      BR_buffer[BR++] = (char) (temp & 1);
+      continue;
+    }
+
+    /* Emit any pending EOBRUN and the BE correction bits */
+    emit_eobrun(entropy);
+
+    /* Count/emit Huffman symbol for run length / number of bits */
+    emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1);
+
+    /* Emit output bit for newly-nonzero coef */
+    temp = ((*block)[jpeg_natural_order[k]] < 0) ? 0 : 1;
+    emit_bits(entropy, (unsigned int) temp, 1);
+
+    /* Emit buffered correction bits that must be associated with this code */
+    emit_buffered_bits(entropy, BR_buffer, BR);
+    BR_buffer = entropy->bit_buffer; /* BE bits are gone now */
+    BR = 0;
+    r = 0;			/* reset zero run length */
+  }
+
+  if (r > 0 || BR > 0) {	/* If there are trailing zeroes, */
+    entropy->EOBRUN++;		/* count an EOB */
+    entropy->BE += BR;		/* concat my correction bits to older ones */
+    /* We force out the EOB if we risk either:
+     * 1. overflow of the EOB counter;
+     * 2. overflow of the correction bit buffer during the next MCU.
+     */
+    if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1))
+      emit_eobrun(entropy);
+  }
+
+  cinfo->dest->next_output_byte = entropy->next_output_byte;
+  cinfo->dest->free_in_buffer = entropy->free_in_buffer;
+
+  /* Update restart-interval state too */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0) {
+      entropy->restarts_to_go = cinfo->restart_interval;
+      entropy->next_restart_num++;
+      entropy->next_restart_num &= 7;
+    }
+    entropy->restarts_to_go--;
+  }
+
+  return TRUE;
+}
+
+
+/*
+ * Finish up at the end of a Huffman-compressed progressive scan.
+ */
+
+METHODDEF(void)
+finish_pass_phuff (j_compress_ptr cinfo)
+{   
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+
+  entropy->next_output_byte = cinfo->dest->next_output_byte;
+  entropy->free_in_buffer = cinfo->dest->free_in_buffer;
+
+  /* Flush out any buffered data */
+  emit_eobrun(entropy);
+  flush_bits(entropy);
+
+  cinfo->dest->next_output_byte = entropy->next_output_byte;
+  cinfo->dest->free_in_buffer = entropy->free_in_buffer;
+}
+
+
+/*
+ * Finish up a statistics-gathering pass and create the new Huffman tables.
+ */
+
+METHODDEF(void)
+finish_pass_gather_phuff (j_compress_ptr cinfo)
+{
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  boolean is_DC_band;
+  int ci, tbl;
+  jpeg_component_info * compptr;
+  JHUFF_TBL **htblptr;
+  boolean did[NUM_HUFF_TBLS];
+
+  /* Flush out buffered data (all we care about is counting the EOB symbol) */
+  emit_eobrun(entropy);
+
+  is_DC_band = (cinfo->Ss == 0);
+
+  /* It's important not to apply jpeg_gen_optimal_table more than once
+   * per table, because it clobbers the input frequency counts!
+   */
+  MEMZERO(did, SIZEOF(did));
+
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    compptr = cinfo->cur_comp_info[ci];
+    if (is_DC_band) {
+      if (cinfo->Ah != 0)	/* DC refinement needs no table */
+	continue;
+      tbl = compptr->dc_tbl_no;
+    } else {
+      tbl = compptr->ac_tbl_no;
+    }
+    if (! did[tbl]) {
+      if (is_DC_band)
+        htblptr = & cinfo->dc_huff_tbl_ptrs[tbl];
+      else
+        htblptr = & cinfo->ac_huff_tbl_ptrs[tbl];
+      if (*htblptr == NULL)
+        *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
+      jpeg_gen_optimal_table(cinfo, *htblptr, entropy->count_ptrs[tbl]);
+      did[tbl] = TRUE;
+    }
+  }
+}
+
+
+/*
+ * Module initialization routine for progressive Huffman entropy encoding.
+ */
+
+GLOBAL(void)
+jinit_phuff_encoder (j_compress_ptr cinfo)
+{
+  phuff_entropy_ptr entropy;
+  int i;
+
+  entropy = (phuff_entropy_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(phuff_entropy_encoder));
+  cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;
+  entropy->pub.start_pass = start_pass_phuff;
+
+  /* Mark tables unallocated */
+  for (i = 0; i < NUM_HUFF_TBLS; i++) {
+    entropy->derived_tbls[i] = NULL;
+    entropy->count_ptrs[i] = NULL;
+  }
+  entropy->bit_buffer = NULL;	/* needed only in AC refinement scan */
+}
+
+#endif /* C_PROGRESSIVE_SUPPORTED */
diff --git a/samples/jpeglib/jcprepct.c b/samples/jpeglib/jcprepct.c
new file mode 100644
index 0000000..fa93333
--- /dev/null
+++ b/samples/jpeglib/jcprepct.c
@@ -0,0 +1,354 @@
+/*
+ * jcprepct.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains the compression preprocessing controller.
+ * This controller manages the color conversion, downsampling,
+ * and edge expansion steps.
+ *
+ * Most of the complexity here is associated with buffering input rows
+ * as required by the downsampler.  See the comments at the head of
+ * jcsample.c for the downsampler's needs.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* At present, jcsample.c can request context rows only for smoothing.
+ * In the future, we might also need context rows for CCIR601 sampling
+ * or other more-complex downsampling procedures.  The code to support
+ * context rows should be compiled only if needed.
+ */
+#ifdef INPUT_SMOOTHING_SUPPORTED
+#define CONTEXT_ROWS_SUPPORTED
+#endif
+
+
+/*
+ * For the simple (no-context-row) case, we just need to buffer one
+ * row group's worth of pixels for the downsampling step.  At the bottom of
+ * the image, we pad to a full row group by replicating the last pixel row.
+ * The downsampler's last output row is then replicated if needed to pad
+ * out to a full iMCU row.
+ *
+ * When providing context rows, we must buffer three row groups' worth of
+ * pixels.  Three row groups are physically allocated, but the row pointer
+ * arrays are made five row groups high, with the extra pointers above and
+ * below "wrapping around" to point to the last and first real row groups.
+ * This allows the downsampler to access the proper context rows.
+ * At the top and bottom of the image, we create dummy context rows by
+ * copying the first or last real pixel row.  This copying could be avoided
+ * by pointer hacking as is done in jdmainct.c, but it doesn't seem worth the
+ * trouble on the compression side.
+ */
+
+
+/* Private buffer controller object */
+
+typedef struct {
+  struct jpeg_c_prep_controller pub; /* public fields */
+
+  /* Downsampling input buffer.  This buffer holds color-converted data
+   * until we have enough to do a downsample step.
+   */
+  JSAMPARRAY color_buf[MAX_COMPONENTS];
+
+  JDIMENSION rows_to_go;	/* counts rows remaining in source image */
+  int next_buf_row;		/* index of next row to store in color_buf */
+
+#ifdef CONTEXT_ROWS_SUPPORTED	/* only needed for context case */
+  int this_row_group;		/* starting row index of group to process */
+  int next_buf_stop;		/* downsample when we reach this index */
+#endif
+} my_prep_controller;
+
+typedef my_prep_controller * my_prep_ptr;
+
+
+/*
+ * Initialize for a processing pass.
+ */
+
+METHODDEF(void)
+start_pass_prep (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
+{
+  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;
+
+  if (pass_mode != JBUF_PASS_THRU)
+    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+
+  /* Initialize total-height counter for detecting bottom of image */
+  prep->rows_to_go = cinfo->image_height;
+  /* Mark the conversion buffer empty */
+  prep->next_buf_row = 0;
+#ifdef CONTEXT_ROWS_SUPPORTED
+  /* Preset additional state variables for context mode.
+   * These aren't used in non-context mode, so we needn't test which mode.
+   */
+  prep->this_row_group = 0;
+  /* Set next_buf_stop to stop after two row groups have been read in. */
+  prep->next_buf_stop = 2 * cinfo->max_v_samp_factor;
+#endif
+}
+
+
+/*
+ * Expand an image vertically from height input_rows to height output_rows,
+ * by duplicating the bottom row.
+ */
+
+LOCAL(void)
+expand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols,
+		    int input_rows, int output_rows)
+{
+  register int row;
+
+  for (row = input_rows; row < output_rows; row++) {
+    jcopy_sample_rows(image_data, input_rows-1, image_data, row,
+		      1, num_cols);
+  }
+}
+
+
+/*
+ * Process some data in the simple no-context case.
+ *
+ * Preprocessor output data is counted in "row groups".  A row group
+ * is defined to be v_samp_factor sample rows of each component.
+ * Downsampling will produce this much data from each max_v_samp_factor
+ * input rows.
+ */
+
+METHODDEF(void)
+pre_process_data (j_compress_ptr cinfo,
+		  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
+		  JDIMENSION in_rows_avail,
+		  JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr,
+		  JDIMENSION out_row_groups_avail)
+{
+  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;
+  int numrows, ci;
+  JDIMENSION inrows;
+  jpeg_component_info * compptr;
+
+  while (*in_row_ctr < in_rows_avail &&
+	 *out_row_group_ctr < out_row_groups_avail) {
+    /* Do color conversion to fill the conversion buffer. */
+    inrows = in_rows_avail - *in_row_ctr;
+    numrows = cinfo->max_v_samp_factor - prep->next_buf_row;
+    numrows = (int) MIN((JDIMENSION) numrows, inrows);
+    (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr,
+				       prep->color_buf,
+				       (JDIMENSION) prep->next_buf_row,
+				       numrows);
+    *in_row_ctr += numrows;
+    prep->next_buf_row += numrows;
+    prep->rows_to_go -= numrows;
+    /* If at bottom of image, pad to fill the conversion buffer. */
+    if (prep->rows_to_go == 0 &&
+	prep->next_buf_row < cinfo->max_v_samp_factor) {
+      for (ci = 0; ci < cinfo->num_components; ci++) {
+	expand_bottom_edge(prep->color_buf[ci], cinfo->image_width,
+			   prep->next_buf_row, cinfo->max_v_samp_factor);
+      }
+      prep->next_buf_row = cinfo->max_v_samp_factor;
+    }
+    /* If we've filled the conversion buffer, empty it. */
+    if (prep->next_buf_row == cinfo->max_v_samp_factor) {
+      (*cinfo->downsample->downsample) (cinfo,
+					prep->color_buf, (JDIMENSION) 0,
+					output_buf, *out_row_group_ctr);
+      prep->next_buf_row = 0;
+      (*out_row_group_ctr)++;
+    }
+    /* If at bottom of image, pad the output to a full iMCU height.
+     * Note we assume the caller is providing a one-iMCU-height output buffer!
+     */
+    if (prep->rows_to_go == 0 &&
+	*out_row_group_ctr < out_row_groups_avail) {
+      for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+	   ci++, compptr++) {
+	expand_bottom_edge(output_buf[ci],
+			   compptr->width_in_blocks * DCTSIZE,
+			   (int) (*out_row_group_ctr * compptr->v_samp_factor),
+			   (int) (out_row_groups_avail * compptr->v_samp_factor));
+      }
+      *out_row_group_ctr = out_row_groups_avail;
+      break;			/* can exit outer loop without test */
+    }
+  }
+}
+
+
+#ifdef CONTEXT_ROWS_SUPPORTED
+
+/*
+ * Process some data in the context case.
+ */
+
+METHODDEF(void)
+pre_process_context (j_compress_ptr cinfo,
+		     JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
+		     JDIMENSION in_rows_avail,
+		     JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr,
+		     JDIMENSION out_row_groups_avail)
+{
+  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;
+  int numrows, ci;
+  int buf_height = cinfo->max_v_samp_factor * 3;
+  JDIMENSION inrows;
+
+  while (*out_row_group_ctr < out_row_groups_avail) {
+    if (*in_row_ctr < in_rows_avail) {
+      /* Do color conversion to fill the conversion buffer. */
+      inrows = in_rows_avail - *in_row_ctr;
+      numrows = prep->next_buf_stop - prep->next_buf_row;
+      numrows = (int) MIN((JDIMENSION) numrows, inrows);
+      (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr,
+					 prep->color_buf,
+					 (JDIMENSION) prep->next_buf_row,
+					 numrows);
+      /* Pad at top of image, if first time through */
+      if (prep->rows_to_go == cinfo->image_height) {
+	for (ci = 0; ci < cinfo->num_components; ci++) {
+	  int row;
+	  for (row = 1; row <= cinfo->max_v_samp_factor; row++) {
+	    jcopy_sample_rows(prep->color_buf[ci], 0,
+			      prep->color_buf[ci], -row,
+			      1, cinfo->image_width);
+	  }
+	}
+      }
+      *in_row_ctr += numrows;
+      prep->next_buf_row += numrows;
+      prep->rows_to_go -= numrows;
+    } else {
+      /* Return for more data, unless we are at the bottom of the image. */
+      if (prep->rows_to_go != 0)
+	break;
+      /* When at bottom of image, pad to fill the conversion buffer. */
+      if (prep->next_buf_row < prep->next_buf_stop) {
+	for (ci = 0; ci < cinfo->num_components; ci++) {
+	  expand_bottom_edge(prep->color_buf[ci], cinfo->image_width,
+			     prep->next_buf_row, prep->next_buf_stop);
+	}
+	prep->next_buf_row = prep->next_buf_stop;
+      }
+    }
+    /* If we've gotten enough data, downsample a row group. */
+    if (prep->next_buf_row == prep->next_buf_stop) {
+      (*cinfo->downsample->downsample) (cinfo,
+					prep->color_buf,
+					(JDIMENSION) prep->this_row_group,
+					output_buf, *out_row_group_ctr);
+      (*out_row_group_ctr)++;
+      /* Advance pointers with wraparound as necessary. */
+      prep->this_row_group += cinfo->max_v_samp_factor;
+      if (prep->this_row_group >= buf_height)
+	prep->this_row_group = 0;
+      if (prep->next_buf_row >= buf_height)
+	prep->next_buf_row = 0;
+      prep->next_buf_stop = prep->next_buf_row + cinfo->max_v_samp_factor;
+    }
+  }
+}
+
+
+/*
+ * Create the wrapped-around downsampling input buffer needed for context mode.
+ */
+
+LOCAL(void)
+create_context_buffer (j_compress_ptr cinfo)
+{
+  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;
+  int rgroup_height = cinfo->max_v_samp_factor;
+  int ci, i;
+  jpeg_component_info * compptr;
+  JSAMPARRAY true_buffer, fake_buffer;
+
+  /* Grab enough space for fake row pointers for all the components;
+   * we need five row groups' worth of pointers for each component.
+   */
+  fake_buffer = (JSAMPARRAY)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				(cinfo->num_components * 5 * rgroup_height) *
+				SIZEOF(JSAMPROW));
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* Allocate the actual buffer space (3 row groups) for this component.
+     * We make the buffer wide enough to allow the downsampler to edge-expand
+     * horizontally within the buffer, if it so chooses.
+     */
+    true_buffer = (*cinfo->mem->alloc_sarray)
+      ((j_common_ptr) cinfo, JPOOL_IMAGE,
+       (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE *
+		      cinfo->max_h_samp_factor) / compptr->h_samp_factor),
+       (JDIMENSION) (3 * rgroup_height));
+    /* Copy true buffer row pointers into the middle of the fake row array */
+    MEMCOPY(fake_buffer + rgroup_height, true_buffer,
+	    3 * rgroup_height * SIZEOF(JSAMPROW));
+    /* Fill in the above and below wraparound pointers */
+    for (i = 0; i < rgroup_height; i++) {
+      fake_buffer[i] = true_buffer[2 * rgroup_height + i];
+      fake_buffer[4 * rgroup_height + i] = true_buffer[i];
+    }
+    prep->color_buf[ci] = fake_buffer + rgroup_height;
+    fake_buffer += 5 * rgroup_height; /* point to space for next component */
+  }
+}
+
+#endif /* CONTEXT_ROWS_SUPPORTED */
+
+
+/*
+ * Initialize preprocessing controller.
+ */
+
+GLOBAL(void)
+jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer)
+{
+  my_prep_ptr prep;
+  int ci;
+  jpeg_component_info * compptr;
+
+  if (need_full_buffer)		/* safety check */
+    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+
+  prep = (my_prep_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_prep_controller));
+  cinfo->prep = (struct jpeg_c_prep_controller *) prep;
+  prep->pub.start_pass = start_pass_prep;
+
+  /* Allocate the color conversion buffer.
+   * We make the buffer wide enough to allow the downsampler to edge-expand
+   * horizontally within the buffer, if it so chooses.
+   */
+  if (cinfo->downsample->need_context_rows) {
+    /* Set up to provide context rows */
+#ifdef CONTEXT_ROWS_SUPPORTED
+    prep->pub.pre_process_data = pre_process_context;
+    create_context_buffer(cinfo);
+#else
+    ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+  } else {
+    /* No context, just make it tall enough for one row group */
+    prep->pub.pre_process_data = pre_process_data;
+    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+	 ci++, compptr++) {
+      prep->color_buf[ci] = (*cinfo->mem->alloc_sarray)
+	((j_common_ptr) cinfo, JPOOL_IMAGE,
+	 (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE *
+			cinfo->max_h_samp_factor) / compptr->h_samp_factor),
+	 (JDIMENSION) cinfo->max_v_samp_factor);
+    }
+  }
+}
diff --git a/samples/jpeglib/jcsample.c b/samples/jpeglib/jcsample.c
new file mode 100644
index 0000000..212ec87
--- /dev/null
+++ b/samples/jpeglib/jcsample.c
@@ -0,0 +1,519 @@
+/*
+ * jcsample.c
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains downsampling routines.
+ *
+ * Downsampling input data is counted in "row groups".  A row group
+ * is defined to be max_v_samp_factor pixel rows of each component,
+ * from which the downsampler produces v_samp_factor sample rows.
+ * A single row group is processed in each call to the downsampler module.
+ *
+ * The downsampler is responsible for edge-expansion of its output data
+ * to fill an integral number of DCT blocks horizontally.  The source buffer
+ * may be modified if it is helpful for this purpose (the source buffer is
+ * allocated wide enough to correspond to the desired output width).
+ * The caller (the prep controller) is responsible for vertical padding.
+ *
+ * The downsampler may request "context rows" by setting need_context_rows
+ * during startup.  In this case, the input arrays will contain at least
+ * one row group's worth of pixels above and below the passed-in data;
+ * the caller will create dummy rows at image top and bottom by replicating
+ * the first or last real pixel row.
+ *
+ * An excellent reference for image resampling is
+ *   Digital Image Warping, George Wolberg, 1990.
+ *   Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7.
+ *
+ * The downsampling algorithm used here is a simple average of the source
+ * pixels covered by the output pixel.  The hi-falutin sampling literature
+ * refers to this as a "box filter".  In general the characteristics of a box
+ * filter are not very good, but for the specific cases we normally use (1:1
+ * and 2:1 ratios) the box is equivalent to a "triangle filter" which is not
+ * nearly so bad.  If you intend to use other sampling ratios, you'd be well
+ * advised to improve this code.
+ *
+ * A simple input-smoothing capability is provided.  This is mainly intended
+ * for cleaning up color-dithered GIF input files (if you find it inadequate,
+ * we suggest using an external filtering program such as pnmconvol).  When
+ * enabled, each input pixel P is replaced by a weighted sum of itself and its
+ * eight neighbors.  P's weight is 1-8*SF and each neighbor's weight is SF,
+ * where SF = (smoothing_factor / 1024).
+ * Currently, smoothing is only supported for 2h2v sampling factors.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Pointer to routine to downsample a single component */
+typedef JMETHOD(void, downsample1_ptr,
+		(j_compress_ptr cinfo, jpeg_component_info * compptr,
+		 JSAMPARRAY input_data, JSAMPARRAY output_data));
+
+/* Private subobject */
+
+typedef struct {
+  struct jpeg_downsampler pub;	/* public fields */
+
+  /* Downsampling method pointers, one per component */
+  downsample1_ptr methods[MAX_COMPONENTS];
+} my_downsampler;
+
+typedef my_downsampler * my_downsample_ptr;
+
+
+/*
+ * Initialize for a downsampling pass.
+ */
+
+METHODDEF(void)
+start_pass_downsample (j_compress_ptr cinfo)
+{
+  /* no work for now */
+}
+
+
+/*
+ * Expand a component horizontally from width input_cols to width output_cols,
+ * by duplicating the rightmost samples.
+ */
+
+LOCAL(void)
+expand_right_edge (JSAMPARRAY image_data, int num_rows,
+		   JDIMENSION input_cols, JDIMENSION output_cols)
+{
+  register JSAMPROW ptr;
+  register JSAMPLE pixval;
+  register int count;
+  int row;
+  int numcols = (int) (output_cols - input_cols);
+
+  if (numcols > 0) {
+    for (row = 0; row < num_rows; row++) {
+      ptr = image_data[row] + input_cols;
+      pixval = ptr[-1];		/* don't need GETJSAMPLE() here */
+      for (count = numcols; count > 0; count--)
+	*ptr++ = pixval;
+    }
+  }
+}
+
+
+/*
+ * Do downsampling for a whole row group (all components).
+ *
+ * In this version we simply downsample each component independently.
+ */
+
+METHODDEF(void)
+sep_downsample (j_compress_ptr cinfo,
+		JSAMPIMAGE input_buf, JDIMENSION in_row_index,
+		JSAMPIMAGE output_buf, JDIMENSION out_row_group_index)
+{
+  my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample;
+  int ci;
+  jpeg_component_info * compptr;
+  JSAMPARRAY in_ptr, out_ptr;
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    in_ptr = input_buf[ci] + in_row_index;
+    out_ptr = output_buf[ci] + (out_row_group_index * compptr->v_samp_factor);
+    (*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr);
+  }
+}
+
+
+/*
+ * Downsample pixel values of a single component.
+ * One row group is processed per call.
+ * This version handles arbitrary integral sampling ratios, without smoothing.
+ * Note that this version is not actually used for customary sampling ratios.
+ */
+
+METHODDEF(void)
+int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
+		JSAMPARRAY input_data, JSAMPARRAY output_data)
+{
+  int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v;
+  JDIMENSION outcol, outcol_h;	/* outcol_h == outcol*h_expand */
+  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
+  JSAMPROW inptr, outptr;
+  INT32 outvalue;
+
+  h_expand = cinfo->max_h_samp_factor / compptr->h_samp_factor;
+  v_expand = cinfo->max_v_samp_factor / compptr->v_samp_factor;
+  numpix = h_expand * v_expand;
+  numpix2 = numpix/2;
+
+  /* Expand input data enough to let all the output samples be generated
+   * by the standard loop.  Special-casing padded output would be more
+   * efficient.
+   */
+  expand_right_edge(input_data, cinfo->max_v_samp_factor,
+		    cinfo->image_width, output_cols * h_expand);
+
+  inrow = 0;
+  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
+    outptr = output_data[outrow];
+    for (outcol = 0, outcol_h = 0; outcol < output_cols;
+	 outcol++, outcol_h += h_expand) {
+      outvalue = 0;
+      for (v = 0; v < v_expand; v++) {
+	inptr = input_data[inrow+v] + outcol_h;
+	for (h = 0; h < h_expand; h++) {
+	  outvalue += (INT32) GETJSAMPLE(*inptr++);
+	}
+      }
+      *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix);
+    }
+    inrow += v_expand;
+  }
+}
+
+
+/*
+ * Downsample pixel values of a single component.
+ * This version handles the special case of a full-size component,
+ * without smoothing.
+ */
+
+METHODDEF(void)
+fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
+		     JSAMPARRAY input_data, JSAMPARRAY output_data)
+{
+  /* Copy the data */
+  jcopy_sample_rows(input_data, 0, output_data, 0,
+		    cinfo->max_v_samp_factor, cinfo->image_width);
+  /* Edge-expand */
+  expand_right_edge(output_data, cinfo->max_v_samp_factor,
+		    cinfo->image_width, compptr->width_in_blocks * DCTSIZE);
+}
+
+
+/*
+ * Downsample pixel values of a single component.
+ * This version handles the common case of 2:1 horizontal and 1:1 vertical,
+ * without smoothing.
+ *
+ * A note about the "bias" calculations: when rounding fractional values to
+ * integer, we do not want to always round 0.5 up to the next integer.
+ * If we did that, we'd introduce a noticeable bias towards larger values.
+ * Instead, this code is arranged so that 0.5 will be rounded up or down at
+ * alternate pixel locations (a simple ordered dither pattern).
+ */
+
+METHODDEF(void)
+h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
+		 JSAMPARRAY input_data, JSAMPARRAY output_data)
+{
+  int outrow;
+  JDIMENSION outcol;
+  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
+  register JSAMPROW inptr, outptr;
+  register int bias;
+
+  /* Expand input data enough to let all the output samples be generated
+   * by the standard loop.  Special-casing padded output would be more
+   * efficient.
+   */
+  expand_right_edge(input_data, cinfo->max_v_samp_factor,
+		    cinfo->image_width, output_cols * 2);
+
+  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
+    outptr = output_data[outrow];
+    inptr = input_data[outrow];
+    bias = 0;			/* bias = 0,1,0,1,... for successive samples */
+    for (outcol = 0; outcol < output_cols; outcol++) {
+      *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1])
+			      + bias) >> 1);
+      bias ^= 1;		/* 0=>1, 1=>0 */
+      inptr += 2;
+    }
+  }
+}
+
+
+/*
+ * Downsample pixel values of a single component.
+ * This version handles the standard case of 2:1 horizontal and 2:1 vertical,
+ * without smoothing.
+ */
+
+METHODDEF(void)
+h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
+		 JSAMPARRAY input_data, JSAMPARRAY output_data)
+{
+  int inrow, outrow;
+  JDIMENSION outcol;
+  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
+  register JSAMPROW inptr0, inptr1, outptr;
+  register int bias;
+
+  /* Expand input data enough to let all the output samples be generated
+   * by the standard loop.  Special-casing padded output would be more
+   * efficient.
+   */
+  expand_right_edge(input_data, cinfo->max_v_samp_factor,
+		    cinfo->image_width, output_cols * 2);
+
+  inrow = 0;
+  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
+    outptr = output_data[outrow];
+    inptr0 = input_data[inrow];
+    inptr1 = input_data[inrow+1];
+    bias = 1;			/* bias = 1,2,1,2,... for successive samples */
+    for (outcol = 0; outcol < output_cols; outcol++) {
+      *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +
+			      GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1])
+			      + bias) >> 2);
+      bias ^= 3;		/* 1=>2, 2=>1 */
+      inptr0 += 2; inptr1 += 2;
+    }
+    inrow += 2;
+  }
+}
+
+
+#ifdef INPUT_SMOOTHING_SUPPORTED
+
+/*
+ * Downsample pixel values of a single component.
+ * This version handles the standard case of 2:1 horizontal and 2:1 vertical,
+ * with smoothing.  One row of context is required.
+ */
+
+METHODDEF(void)
+h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
+			JSAMPARRAY input_data, JSAMPARRAY output_data)
+{
+  int inrow, outrow;
+  JDIMENSION colctr;
+  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
+  register JSAMPROW inptr0, inptr1, above_ptr, below_ptr, outptr;
+  INT32 membersum, neighsum, memberscale, neighscale;
+
+  /* Expand input data enough to let all the output samples be generated
+   * by the standard loop.  Special-casing padded output would be more
+   * efficient.
+   */
+  expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2,
+		    cinfo->image_width, output_cols * 2);
+
+  /* We don't bother to form the individual "smoothed" input pixel values;
+   * we can directly compute the output which is the average of the four
+   * smoothed values.  Each of the four member pixels contributes a fraction
+   * (1-8*SF) to its own smoothed image and a fraction SF to each of the three
+   * other smoothed pixels, therefore a total fraction (1-5*SF)/4 to the final
+   * output.  The four corner-adjacent neighbor pixels contribute a fraction
+   * SF to just one smoothed pixel, or SF/4 to the final output; while the
+   * eight edge-adjacent neighbors contribute SF to each of two smoothed
+   * pixels, or SF/2 overall.  In order to use integer arithmetic, these
+   * factors are scaled by 2^16 = 65536.
+   * Also recall that SF = smoothing_factor / 1024.
+   */
+
+  memberscale = 16384 - cinfo->smoothing_factor * 80; /* scaled (1-5*SF)/4 */
+  neighscale = cinfo->smoothing_factor * 16; /* scaled SF/4 */
+
+  inrow = 0;
+  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
+    outptr = output_data[outrow];
+    inptr0 = input_data[inrow];
+    inptr1 = input_data[inrow+1];
+    above_ptr = input_data[inrow-1];
+    below_ptr = input_data[inrow+2];
+
+    /* Special case for first column: pretend column -1 is same as column 0 */
+    membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +
+		GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]);
+    neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) +
+	       GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) +
+	       GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[2]) +
+	       GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[2]);
+    neighsum += neighsum;
+    neighsum += GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[2]) +
+		GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[2]);
+    membersum = membersum * memberscale + neighsum * neighscale;
+    *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);
+    inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2;
+
+    for (colctr = output_cols - 2; colctr > 0; colctr--) {
+      /* sum of pixels directly mapped to this output element */
+      membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +
+		  GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]);
+      /* sum of edge-neighbor pixels */
+      neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) +
+		 GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) +
+		 GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[2]) +
+		 GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[2]);
+      /* The edge-neighbors count twice as much as corner-neighbors */
+      neighsum += neighsum;
+      /* Add in the corner-neighbors */
+      neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[2]) +
+		  GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[2]);
+      /* form final output scaled up by 2^16 */
+      membersum = membersum * memberscale + neighsum * neighscale;
+      /* round, descale and output it */
+      *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);
+      inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2;
+    }
+
+    /* Special case for last column */
+    membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +
+		GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]);
+    neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) +
+	       GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) +
+	       GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[1]) +
+	       GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[1]);
+    neighsum += neighsum;
+    neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[1]) +
+		GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[1]);
+    membersum = membersum * memberscale + neighsum * neighscale;
+    *outptr = (JSAMPLE) ((membersum + 32768) >> 16);
+
+    inrow += 2;
+  }
+}
+
+
+/*
+ * Downsample pixel values of a single component.
+ * This version handles the special case of a full-size component,
+ * with smoothing.  One row of context is required.
+ */
+
+METHODDEF(void)
+fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr,
+			    JSAMPARRAY input_data, JSAMPARRAY output_data)
+{
+  int outrow;
+  JDIMENSION colctr;
+  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
+  register JSAMPROW inptr, above_ptr, below_ptr, outptr;
+  INT32 membersum, neighsum, memberscale, neighscale;
+  int colsum, lastcolsum, nextcolsum;
+
+  /* Expand input data enough to let all the output samples be generated
+   * by the standard loop.  Special-casing padded output would be more
+   * efficient.
+   */
+  expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2,
+		    cinfo->image_width, output_cols);
+
+  /* Each of the eight neighbor pixels contributes a fraction SF to the
+   * smoothed pixel, while the main pixel contributes (1-8*SF).  In order
+   * to use integer arithmetic, these factors are multiplied by 2^16 = 65536.
+   * Also recall that SF = smoothing_factor / 1024.
+   */
+
+  memberscale = 65536L - cinfo->smoothing_factor * 512L; /* scaled 1-8*SF */
+  neighscale = cinfo->smoothing_factor * 64; /* scaled SF */
+
+  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
+    outptr = output_data[outrow];
+    inptr = input_data[outrow];
+    above_ptr = input_data[outrow-1];
+    below_ptr = input_data[outrow+1];
+
+    /* Special case for first column */
+    colsum = GETJSAMPLE(*above_ptr++) + GETJSAMPLE(*below_ptr++) +
+	     GETJSAMPLE(*inptr);
+    membersum = GETJSAMPLE(*inptr++);
+    nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) +
+		 GETJSAMPLE(*inptr);
+    neighsum = colsum + (colsum - membersum) + nextcolsum;
+    membersum = membersum * memberscale + neighsum * neighscale;
+    *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);
+    lastcolsum = colsum; colsum = nextcolsum;
+
+    for (colctr = output_cols - 2; colctr > 0; colctr--) {
+      membersum = GETJSAMPLE(*inptr++);
+      above_ptr++; below_ptr++;
+      nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) +
+		   GETJSAMPLE(*inptr);
+      neighsum = lastcolsum + (colsum - membersum) + nextcolsum;
+      membersum = membersum * memberscale + neighsum * neighscale;
+      *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);
+      lastcolsum = colsum; colsum = nextcolsum;
+    }
+
+    /* Special case for last column */
+    membersum = GETJSAMPLE(*inptr);
+    neighsum = lastcolsum + (colsum - membersum) + colsum;
+    membersum = membersum * memberscale + neighsum * neighscale;
+    *outptr = (JSAMPLE) ((membersum + 32768) >> 16);
+
+  }
+}
+
+#endif /* INPUT_SMOOTHING_SUPPORTED */
+
+
+/*
+ * Module initialization routine for downsampling.
+ * Note that we must select a routine for each component.
+ */
+
+GLOBAL(void)
+jinit_downsampler (j_compress_ptr cinfo)
+{
+  my_downsample_ptr downsample;
+  int ci;
+  jpeg_component_info * compptr;
+  boolean smoothok = TRUE;
+
+  downsample = (my_downsample_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_downsampler));
+  cinfo->downsample = (struct jpeg_downsampler *) downsample;
+  downsample->pub.start_pass = start_pass_downsample;
+  downsample->pub.downsample = sep_downsample;
+  downsample->pub.need_context_rows = FALSE;
+
+  if (cinfo->CCIR601_sampling)
+    ERREXIT(cinfo, JERR_CCIR601_NOTIMPL);
+
+  /* Verify we can handle the sampling factors, and set up method pointers */
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    if (compptr->h_samp_factor == cinfo->max_h_samp_factor &&
+	compptr->v_samp_factor == cinfo->max_v_samp_factor) {
+#ifdef INPUT_SMOOTHING_SUPPORTED
+      if (cinfo->smoothing_factor) {
+	downsample->methods[ci] = fullsize_smooth_downsample;
+	downsample->pub.need_context_rows = TRUE;
+      } else
+#endif
+	downsample->methods[ci] = fullsize_downsample;
+    } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor &&
+	       compptr->v_samp_factor == cinfo->max_v_samp_factor) {
+      smoothok = FALSE;
+      downsample->methods[ci] = h2v1_downsample;
+    } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor &&
+	       compptr->v_samp_factor * 2 == cinfo->max_v_samp_factor) {
+#ifdef INPUT_SMOOTHING_SUPPORTED
+      if (cinfo->smoothing_factor) {
+	downsample->methods[ci] = h2v2_smooth_downsample;
+	downsample->pub.need_context_rows = TRUE;
+      } else
+#endif
+	downsample->methods[ci] = h2v2_downsample;
+    } else if ((cinfo->max_h_samp_factor % compptr->h_samp_factor) == 0 &&
+	       (cinfo->max_v_samp_factor % compptr->v_samp_factor) == 0) {
+      smoothok = FALSE;
+      downsample->methods[ci] = int_downsample;
+    } else
+      ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL);
+  }
+
+#ifdef INPUT_SMOOTHING_SUPPORTED
+  if (cinfo->smoothing_factor && !smoothok)
+    TRACEMS(cinfo, 0, JTRC_SMOOTH_NOTIMPL);
+#endif
+}
diff --git a/samples/jpeglib/jctrans.c b/samples/jpeglib/jctrans.c
new file mode 100644
index 0000000..0e6d707
--- /dev/null
+++ b/samples/jpeglib/jctrans.c
@@ -0,0 +1,388 @@
+/*
+ * jctrans.c
+ *
+ * Copyright (C) 1995-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains library routines for transcoding compression,
+ * that is, writing raw DCT coefficient arrays to an output JPEG file.
+ * The routines in jcapimin.c will also be needed by a transcoder.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Forward declarations */
+LOCAL(void) transencode_master_selection
+	JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));
+LOCAL(void) transencode_coef_controller
+	JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));
+
+
+/*
+ * Compression initialization for writing raw-coefficient data.
+ * Before calling this, all parameters and a data destination must be set up.
+ * Call jpeg_finish_compress() to actually write the data.
+ *
+ * The number of passed virtual arrays must match cinfo->num_components.
+ * Note that the virtual arrays need not be filled or even realized at
+ * the time write_coefficients is called; indeed, if the virtual arrays
+ * were requested from this compression object's memory manager, they
+ * typically will be realized during this routine and filled afterwards.
+ */
+
+GLOBAL(void)
+jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)
+{
+  if (cinfo->global_state != CSTATE_START)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  /* Mark all tables to be written */
+  jpeg_suppress_tables(cinfo, FALSE);
+  /* (Re)initialize error mgr and destination modules */
+  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
+  (*cinfo->dest->init_destination) (cinfo);
+  /* Perform master selection of active modules */
+  transencode_master_selection(cinfo, coef_arrays);
+  /* Wait for jpeg_finish_compress() call */
+  cinfo->next_scanline = 0;	/* so jpeg_write_marker works */
+  cinfo->global_state = CSTATE_WRCOEFS;
+}
+
+
+/*
+ * Initialize the compression object with default parameters,
+ * then copy from the source object all parameters needed for lossless
+ * transcoding.  Parameters that can be varied without loss (such as
+ * scan script and Huffman optimization) are left in their default states.
+ */
+
+GLOBAL(void)
+jpeg_copy_critical_parameters (j_decompress_ptr srcinfo,
+			       j_compress_ptr dstinfo)
+{
+  JQUANT_TBL ** qtblptr;
+  jpeg_component_info *incomp, *outcomp;
+  JQUANT_TBL *c_quant, *slot_quant;
+  int tblno, ci, coefi;
+
+  /* Safety check to ensure start_compress not called yet. */
+  if (dstinfo->global_state != CSTATE_START)
+    ERREXIT1(dstinfo, JERR_BAD_STATE, dstinfo->global_state);
+  /* Copy fundamental image dimensions */
+  dstinfo->image_width = srcinfo->image_width;
+  dstinfo->image_height = srcinfo->image_height;
+  dstinfo->input_components = srcinfo->num_components;
+  dstinfo->in_color_space = srcinfo->jpeg_color_space;
+  /* Initialize all parameters to default values */
+  jpeg_set_defaults(dstinfo);
+  /* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB.
+   * Fix it to get the right header markers for the image colorspace.
+   */
+  jpeg_set_colorspace(dstinfo, srcinfo->jpeg_color_space);
+  dstinfo->data_precision = srcinfo->data_precision;
+  dstinfo->CCIR601_sampling = srcinfo->CCIR601_sampling;
+  /* Copy the source's quantization tables. */
+  for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) {
+    if (srcinfo->quant_tbl_ptrs[tblno] != NULL) {
+      qtblptr = & dstinfo->quant_tbl_ptrs[tblno];
+      if (*qtblptr == NULL)
+	*qtblptr = jpeg_alloc_quant_table((j_common_ptr) dstinfo);
+      MEMCOPY((*qtblptr)->quantval,
+	      srcinfo->quant_tbl_ptrs[tblno]->quantval,
+	      SIZEOF((*qtblptr)->quantval));
+      (*qtblptr)->sent_table = FALSE;
+    }
+  }
+  /* Copy the source's per-component info.
+   * Note we assume jpeg_set_defaults has allocated the dest comp_info array.
+   */
+  dstinfo->num_components = srcinfo->num_components;
+  if (dstinfo->num_components < 1 || dstinfo->num_components > MAX_COMPONENTS)
+    ERREXIT2(dstinfo, JERR_COMPONENT_COUNT, dstinfo->num_components,
+	     MAX_COMPONENTS);
+  for (ci = 0, incomp = srcinfo->comp_info, outcomp = dstinfo->comp_info;
+       ci < dstinfo->num_components; ci++, incomp++, outcomp++) {
+    outcomp->component_id = incomp->component_id;
+    outcomp->h_samp_factor = incomp->h_samp_factor;
+    outcomp->v_samp_factor = incomp->v_samp_factor;
+    outcomp->quant_tbl_no = incomp->quant_tbl_no;
+    /* Make sure saved quantization table for component matches the qtable
+     * slot.  If not, the input file re-used this qtable slot.
+     * IJG encoder currently cannot duplicate this.
+     */
+    tblno = outcomp->quant_tbl_no;
+    if (tblno < 0 || tblno >= NUM_QUANT_TBLS ||
+	srcinfo->quant_tbl_ptrs[tblno] == NULL)
+      ERREXIT1(dstinfo, JERR_NO_QUANT_TABLE, tblno);
+    slot_quant = srcinfo->quant_tbl_ptrs[tblno];
+    c_quant = incomp->quant_table;
+    if (c_quant != NULL) {
+      for (coefi = 0; coefi < DCTSIZE2; coefi++) {
+	if (c_quant->quantval[coefi] != slot_quant->quantval[coefi])
+	  ERREXIT1(dstinfo, JERR_MISMATCHED_QUANT_TABLE, tblno);
+      }
+    }
+    /* Note: we do not copy the source's Huffman table assignments;
+     * instead we rely on jpeg_set_colorspace to have made a suitable choice.
+     */
+  }
+  /* Also copy JFIF version and resolution information, if available.
+   * Strictly speaking this isn't "critical" info, but it's nearly
+   * always appropriate to copy it if available.  In particular,
+   * if the application chooses to copy JFIF 1.02 extension markers from
+   * the source file, we need to copy the version to make sure we don't
+   * emit a file that has 1.02 extensions but a claimed version of 1.01.
+   * We will *not*, however, copy version info from mislabeled "2.01" files.
+   */
+  if (srcinfo->saw_JFIF_marker) {
+    if (srcinfo->JFIF_major_version == 1) {
+      dstinfo->JFIF_major_version = srcinfo->JFIF_major_version;
+      dstinfo->JFIF_minor_version = srcinfo->JFIF_minor_version;
+    }
+    dstinfo->density_unit = srcinfo->density_unit;
+    dstinfo->X_density = srcinfo->X_density;
+    dstinfo->Y_density = srcinfo->Y_density;
+  }
+}
+
+
+/*
+ * Master selection of compression modules for transcoding.
+ * This substitutes for jcinit.c's initialization of the full compressor.
+ */
+
+LOCAL(void)
+transencode_master_selection (j_compress_ptr cinfo,
+			      jvirt_barray_ptr * coef_arrays)
+{
+  /* Although we don't actually use input_components for transcoding,
+   * jcmaster.c's initial_setup will complain if input_components is 0.
+   */
+  cinfo->input_components = 1;
+  /* Initialize master control (includes parameter checking/processing) */
+  jinit_c_master_control(cinfo, TRUE /* transcode only */);
+
+  /* Entropy encoding: either Huffman or arithmetic coding. */
+  if (cinfo->arith_code) {
+    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
+  } else {
+    if (cinfo->progressive_mode) {
+#ifdef C_PROGRESSIVE_SUPPORTED
+      jinit_phuff_encoder(cinfo);
+#else
+      ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+    } else
+      jinit_huff_encoder(cinfo);
+  }
+
+  /* We need a special coefficient buffer controller. */
+  transencode_coef_controller(cinfo, coef_arrays);
+
+  jinit_marker_writer(cinfo);
+
+  /* We can now tell the memory manager to allocate virtual arrays. */
+  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
+
+  /* Write the datastream header (SOI, JFIF) immediately.
+   * Frame and scan headers are postponed till later.
+   * This lets application insert special markers after the SOI.
+   */
+  (*cinfo->marker->write_file_header) (cinfo);
+}
+
+
+/*
+ * The rest of this file is a special implementation of the coefficient
+ * buffer controller.  This is similar to jccoefct.c, but it handles only
+ * output from presupplied virtual arrays.  Furthermore, we generate any
+ * dummy padding blocks on-the-fly rather than expecting them to be present
+ * in the arrays.
+ */
+
+/* Private buffer controller object */
+
+typedef struct {
+  struct jpeg_c_coef_controller pub; /* public fields */
+
+  JDIMENSION iMCU_row_num;	/* iMCU row # within image */
+  JDIMENSION mcu_ctr;		/* counts MCUs processed in current row */
+  int MCU_vert_offset;		/* counts MCU rows within iMCU row */
+  int MCU_rows_per_iMCU_row;	/* number of such rows needed */
+
+  /* Virtual block array for each component. */
+  jvirt_barray_ptr * whole_image;
+
+  /* Workspace for constructing dummy blocks at right/bottom edges. */
+  JBLOCKROW dummy_buffer[C_MAX_BLOCKS_IN_MCU];
+} my_coef_controller;
+
+typedef my_coef_controller * my_coef_ptr;
+
+
+LOCAL(void)
+start_iMCU_row (j_compress_ptr cinfo)
+/* Reset within-iMCU-row counters for a new row */
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+
+  /* In an interleaved scan, an MCU row is the same as an iMCU row.
+   * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows.
+   * But at the bottom of the image, process only what's left.
+   */
+  if (cinfo->comps_in_scan > 1) {
+    coef->MCU_rows_per_iMCU_row = 1;
+  } else {
+    if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1))
+      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor;
+    else
+      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;
+  }
+
+  coef->mcu_ctr = 0;
+  coef->MCU_vert_offset = 0;
+}
+
+
+/*
+ * Initialize for a processing pass.
+ */
+
+METHODDEF(void)
+start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+
+  if (pass_mode != JBUF_CRANK_DEST)
+    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+
+  coef->iMCU_row_num = 0;
+  start_iMCU_row(cinfo);
+}
+
+
+/*
+ * Process some data.
+ * We process the equivalent of one fully interleaved MCU row ("iMCU" row)
+ * per call, ie, v_samp_factor block rows for each component in the scan.
+ * The data is obtained from the virtual arrays and fed to the entropy coder.
+ * Returns TRUE if the iMCU row is completed, FALSE if suspended.
+ *
+ * NB: input_buf is ignored; it is likely to be a NULL pointer.
+ */
+
+METHODDEF(boolean)
+compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+  JDIMENSION MCU_col_num;	/* index of current MCU within row */
+  JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
+  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
+  int blkn, ci, xindex, yindex, yoffset, blockcnt;
+  JDIMENSION start_col;
+  JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];
+  JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU];
+  JBLOCKROW buffer_ptr;
+  jpeg_component_info *compptr;
+
+  /* Align the virtual buffers for the components used in this scan. */
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    compptr = cinfo->cur_comp_info[ci];
+    buffer[ci] = (*cinfo->mem->access_virt_barray)
+      ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index],
+       coef->iMCU_row_num * compptr->v_samp_factor,
+       (JDIMENSION) compptr->v_samp_factor, FALSE);
+  }
+
+  /* Loop to process one whole iMCU row */
+  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
+       yoffset++) {
+    for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;
+	 MCU_col_num++) {
+      /* Construct list of pointers to DCT blocks belonging to this MCU */
+      blkn = 0;			/* index of current DCT block within MCU */
+      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+	compptr = cinfo->cur_comp_info[ci];
+	start_col = MCU_col_num * compptr->MCU_width;
+	blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
+						: compptr->last_col_width;
+	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
+	  if (coef->iMCU_row_num < last_iMCU_row ||
+	      yindex+yoffset < compptr->last_row_height) {
+	    /* Fill in pointers to real blocks in this row */
+	    buffer_ptr = buffer[ci][yindex+yoffset] + start_col;
+	    for (xindex = 0; xindex < blockcnt; xindex++)
+	      MCU_buffer[blkn++] = buffer_ptr++;
+	  } else {
+	    /* At bottom of image, need a whole row of dummy blocks */
+	    xindex = 0;
+	  }
+	  /* Fill in any dummy blocks needed in this row.
+	   * Dummy blocks are filled in the same way as in jccoefct.c:
+	   * all zeroes in the AC entries, DC entries equal to previous
+	   * block's DC value.  The init routine has already zeroed the
+	   * AC entries, so we need only set the DC entries correctly.
+	   */
+	  for (; xindex < compptr->MCU_width; xindex++) {
+	    MCU_buffer[blkn] = coef->dummy_buffer[blkn];
+	    MCU_buffer[blkn][0][0] = MCU_buffer[blkn-1][0][0];
+	    blkn++;
+	  }
+	}
+      }
+      /* Try to write the MCU. */
+      if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) {
+	/* Suspension forced; update state counters and exit */
+	coef->MCU_vert_offset = yoffset;
+	coef->mcu_ctr = MCU_col_num;
+	return FALSE;
+      }
+    }
+    /* Completed an MCU row, but perhaps not an iMCU row */
+    coef->mcu_ctr = 0;
+  }
+  /* Completed the iMCU row, advance counters for next one */
+  coef->iMCU_row_num++;
+  start_iMCU_row(cinfo);
+  return TRUE;
+}
+
+
+/*
+ * Initialize coefficient buffer controller.
+ *
+ * Each passed coefficient array must be the right size for that
+ * coefficient: width_in_blocks wide and height_in_blocks high,
+ * with unitheight at least v_samp_factor.
+ */
+
+LOCAL(void)
+transencode_coef_controller (j_compress_ptr cinfo,
+			     jvirt_barray_ptr * coef_arrays)
+{
+  my_coef_ptr coef;
+  JBLOCKROW buffer;
+  int i;
+
+  coef = (my_coef_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_coef_controller));
+  cinfo->coef = (struct jpeg_c_coef_controller *) coef;
+  coef->pub.start_pass = start_pass_coef;
+  coef->pub.compress_data = compress_output;
+
+  /* Save pointer to virtual arrays */
+  coef->whole_image = coef_arrays;
+
+  /* Allocate and pre-zero space for dummy DCT blocks. */
+  buffer = (JBLOCKROW)
+    (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
+  jzero_far((void FAR *) buffer, C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
+  for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {
+    coef->dummy_buffer[i] = buffer + i;
+  }
+}
diff --git a/samples/jpeglib/jdapimin.c b/samples/jpeglib/jdapimin.c
new file mode 100644
index 0000000..cadb59f
--- /dev/null
+++ b/samples/jpeglib/jdapimin.c
@@ -0,0 +1,395 @@
+/*
+ * jdapimin.c
+ *
+ * Copyright (C) 1994-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains application interface code for the decompression half
+ * of the JPEG library.  These are the "minimum" API routines that may be
+ * needed in either the normal full-decompression case or the
+ * transcoding-only case.
+ *
+ * Most of the routines intended to be called directly by an application
+ * are in this file or in jdapistd.c.  But also see jcomapi.c for routines
+ * shared by compression and decompression, and jdtrans.c for the transcoding
+ * case.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/*
+ * Initialization of a JPEG decompression object.
+ * The error manager must already be set up (in case memory manager fails).
+ */
+
+GLOBAL(void)
+jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize)
+{
+  int i;
+
+  /* Guard against version mismatches between library and caller. */
+  cinfo->mem = NULL;		/* so jpeg_destroy knows mem mgr not called */
+  if (version != JPEG_LIB_VERSION)
+    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
+  if (structsize != SIZEOF(struct jpeg_decompress_struct))
+    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, 
+	     (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize);
+
+  /* For debugging purposes, we zero the whole master structure.
+   * But the application has already set the err pointer, and may have set
+   * client_data, so we have to save and restore those fields.
+   * Note: if application hasn't set client_data, tools like Purify may
+   * complain here.
+   */
+  {
+    struct jpeg_error_mgr * err = cinfo->err;
+    void * client_data = cinfo->client_data; /* ignore Purify complaint here */
+    MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct));
+    cinfo->err = err;
+    cinfo->client_data = client_data;
+  }
+  cinfo->is_decompressor = TRUE;
+
+  /* Initialize a memory manager instance for this object */
+  jinit_memory_mgr((j_common_ptr) cinfo);
+
+  /* Zero out pointers to permanent structures. */
+  cinfo->progress = NULL;
+  cinfo->src = NULL;
+
+  for (i = 0; i < NUM_QUANT_TBLS; i++)
+    cinfo->quant_tbl_ptrs[i] = NULL;
+
+  for (i = 0; i < NUM_HUFF_TBLS; i++) {
+    cinfo->dc_huff_tbl_ptrs[i] = NULL;
+    cinfo->ac_huff_tbl_ptrs[i] = NULL;
+  }
+
+  /* Initialize marker processor so application can override methods
+   * for COM, APPn markers before calling jpeg_read_header.
+   */
+  cinfo->marker_list = NULL;
+  jinit_marker_reader(cinfo);
+
+  /* And initialize the overall input controller. */
+  jinit_input_controller(cinfo);
+
+  /* OK, I'm ready */
+  cinfo->global_state = DSTATE_START;
+}
+
+
+/*
+ * Destruction of a JPEG decompression object
+ */
+
+GLOBAL(void)
+jpeg_destroy_decompress (j_decompress_ptr cinfo)
+{
+  jpeg_destroy((j_common_ptr) cinfo); /* use common routine */
+}
+
+
+/*
+ * Abort processing of a JPEG decompression operation,
+ * but don't destroy the object itself.
+ */
+
+GLOBAL(void)
+jpeg_abort_decompress (j_decompress_ptr cinfo)
+{
+  jpeg_abort((j_common_ptr) cinfo); /* use common routine */
+}
+
+
+/*
+ * Set default decompression parameters.
+ */
+
+LOCAL(void)
+default_decompress_parms (j_decompress_ptr cinfo)
+{
+  /* Guess the input colorspace, and set output colorspace accordingly. */
+  /* (Wish JPEG committee had provided a real way to specify this...) */
+  /* Note application may override our guesses. */
+  switch (cinfo->num_components) {
+  case 1:
+    cinfo->jpeg_color_space = JCS_GRAYSCALE;
+    cinfo->out_color_space = JCS_GRAYSCALE;
+    break;
+    
+  case 3:
+    if (cinfo->saw_JFIF_marker) {
+      cinfo->jpeg_color_space = JCS_YCbCr; /* JFIF implies YCbCr */
+    } else if (cinfo->saw_Adobe_marker) {
+      switch (cinfo->Adobe_transform) {
+      case 0:
+	cinfo->jpeg_color_space = JCS_RGB;
+	break;
+      case 1:
+	cinfo->jpeg_color_space = JCS_YCbCr;
+	break;
+      default:
+	WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
+	cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */
+	break;
+      }
+    } else {
+      /* Saw no special markers, try to guess from the component IDs */
+      int cid0 = cinfo->comp_info[0].component_id;
+      int cid1 = cinfo->comp_info[1].component_id;
+      int cid2 = cinfo->comp_info[2].component_id;
+
+      if (cid0 == 1 && cid1 == 2 && cid2 == 3)
+	cinfo->jpeg_color_space = JCS_YCbCr; /* assume JFIF w/out marker */
+      else if (cid0 == 82 && cid1 == 71 && cid2 == 66)
+	cinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */
+      else {
+	TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2);
+	cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */
+      }
+    }
+    /* Always guess RGB is proper output colorspace. */
+    cinfo->out_color_space = JCS_RGB;
+    break;
+    
+  case 4:
+    if (cinfo->saw_Adobe_marker) {
+      switch (cinfo->Adobe_transform) {
+      case 0:
+	cinfo->jpeg_color_space = JCS_CMYK;
+	break;
+      case 2:
+	cinfo->jpeg_color_space = JCS_YCCK;
+	break;
+      default:
+	WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
+	cinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */
+	break;
+      }
+    } else {
+      /* No special markers, assume straight CMYK. */
+      cinfo->jpeg_color_space = JCS_CMYK;
+    }
+    cinfo->out_color_space = JCS_CMYK;
+    break;
+    
+  default:
+    cinfo->jpeg_color_space = JCS_UNKNOWN;
+    cinfo->out_color_space = JCS_UNKNOWN;
+    break;
+  }
+
+  /* Set defaults for other decompression parameters. */
+  cinfo->scale_num = 1;		/* 1:1 scaling */
+  cinfo->scale_denom = 1;
+  cinfo->output_gamma = 1.0;
+  cinfo->buffered_image = FALSE;
+  cinfo->raw_data_out = FALSE;
+  cinfo->dct_method = JDCT_DEFAULT;
+  cinfo->do_fancy_upsampling = TRUE;
+  cinfo->do_block_smoothing = TRUE;
+  cinfo->quantize_colors = FALSE;
+  /* We set these in case application only sets quantize_colors. */
+  cinfo->dither_mode = JDITHER_FS;
+#ifdef QUANT_2PASS_SUPPORTED
+  cinfo->two_pass_quantize = TRUE;
+#else
+  cinfo->two_pass_quantize = FALSE;
+#endif
+  cinfo->desired_number_of_colors = 256;
+  cinfo->colormap = NULL;
+  /* Initialize for no mode change in buffered-image mode. */
+  cinfo->enable_1pass_quant = FALSE;
+  cinfo->enable_external_quant = FALSE;
+  cinfo->enable_2pass_quant = FALSE;
+}
+
+
+/*
+ * Decompression startup: read start of JPEG datastream to see what's there.
+ * Need only initialize JPEG object and supply a data source before calling.
+ *
+ * This routine will read as far as the first SOS marker (ie, actual start of
+ * compressed data), and will save all tables and parameters in the JPEG
+ * object.  It will also initialize the decompression parameters to default
+ * values, and finally return JPEG_HEADER_OK.  On return, the application may
+ * adjust the decompression parameters and then call jpeg_start_decompress.
+ * (Or, if the application only wanted to determine the image parameters,
+ * the data need not be decompressed.  In that case, call jpeg_abort or
+ * jpeg_destroy to release any temporary space.)
+ * If an abbreviated (tables only) datastream is presented, the routine will
+ * return JPEG_HEADER_TABLES_ONLY upon reaching EOI.  The application may then
+ * re-use the JPEG object to read the abbreviated image datastream(s).
+ * It is unnecessary (but OK) to call jpeg_abort in this case.
+ * The JPEG_SUSPENDED return code only occurs if the data source module
+ * requests suspension of the decompressor.  In this case the application
+ * should load more source data and then re-call jpeg_read_header to resume
+ * processing.
+ * If a non-suspending data source is used and require_image is TRUE, then the
+ * return code need not be inspected since only JPEG_HEADER_OK is possible.
+ *
+ * This routine is now just a front end to jpeg_consume_input, with some
+ * extra error checking.
+ */
+
+GLOBAL(int)
+jpeg_read_header (j_decompress_ptr cinfo, boolean require_image)
+{
+  int retcode;
+
+  if (cinfo->global_state != DSTATE_START &&
+      cinfo->global_state != DSTATE_INHEADER)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+  retcode = jpeg_consume_input(cinfo);
+
+  switch (retcode) {
+  case JPEG_REACHED_SOS:
+    retcode = JPEG_HEADER_OK;
+    break;
+  case JPEG_REACHED_EOI:
+    if (require_image)		/* Complain if application wanted an image */
+      ERREXIT(cinfo, JERR_NO_IMAGE);
+    /* Reset to start state; it would be safer to require the application to
+     * call jpeg_abort, but we can't change it now for compatibility reasons.
+     * A side effect is to free any temporary memory (there shouldn't be any).
+     */
+    jpeg_abort((j_common_ptr) cinfo); /* sets state = DSTATE_START */
+    retcode = JPEG_HEADER_TABLES_ONLY;
+    break;
+  case JPEG_SUSPENDED:
+    /* no work */
+    break;
+  }
+
+  return retcode;
+}
+
+
+/*
+ * Consume data in advance of what the decompressor requires.
+ * This can be called at any time once the decompressor object has
+ * been created and a data source has been set up.
+ *
+ * This routine is essentially a state machine that handles a couple
+ * of critical state-transition actions, namely initial setup and
+ * transition from header scanning to ready-for-start_decompress.
+ * All the actual input is done via the input controller's consume_input
+ * method.
+ */
+
+GLOBAL(int)
+jpeg_consume_input (j_decompress_ptr cinfo)
+{
+  int retcode = JPEG_SUSPENDED;
+
+  /* NB: every possible DSTATE value should be listed in this switch */
+  switch (cinfo->global_state) {
+  case DSTATE_START:
+    /* Start-of-datastream actions: reset appropriate modules */
+    (*cinfo->inputctl->reset_input_controller) (cinfo);
+    /* Initialize application's data source module */
+    (*cinfo->src->init_source) (cinfo);
+    cinfo->global_state = DSTATE_INHEADER;
+    /*FALLTHROUGH*/
+  case DSTATE_INHEADER:
+    retcode = (*cinfo->inputctl->consume_input) (cinfo);
+    if (retcode == JPEG_REACHED_SOS) { /* Found SOS, prepare to decompress */
+      /* Set up default parameters based on header data */
+      default_decompress_parms(cinfo);
+      /* Set global state: ready for start_decompress */
+      cinfo->global_state = DSTATE_READY;
+    }
+    break;
+  case DSTATE_READY:
+    /* Can't advance past first SOS until start_decompress is called */
+    retcode = JPEG_REACHED_SOS;
+    break;
+  case DSTATE_PRELOAD:
+  case DSTATE_PRESCAN:
+  case DSTATE_SCANNING:
+  case DSTATE_RAW_OK:
+  case DSTATE_BUFIMAGE:
+  case DSTATE_BUFPOST:
+  case DSTATE_STOPPING:
+    retcode = (*cinfo->inputctl->consume_input) (cinfo);
+    break;
+  default:
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  }
+  return retcode;
+}
+
+
+/*
+ * Have we finished reading the input file?
+ */
+
+GLOBAL(boolean)
+jpeg_input_complete (j_decompress_ptr cinfo)
+{
+  /* Check for valid jpeg object */
+  if (cinfo->global_state < DSTATE_START ||
+      cinfo->global_state > DSTATE_STOPPING)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  return cinfo->inputctl->eoi_reached;
+}
+
+
+/*
+ * Is there more than one scan?
+ */
+
+GLOBAL(boolean)
+jpeg_has_multiple_scans (j_decompress_ptr cinfo)
+{
+  /* Only valid after jpeg_read_header completes */
+  if (cinfo->global_state < DSTATE_READY ||
+      cinfo->global_state > DSTATE_STOPPING)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  return cinfo->inputctl->has_multiple_scans;
+}
+
+
+/*
+ * Finish JPEG decompression.
+ *
+ * This will normally just verify the file trailer and release temp storage.
+ *
+ * Returns FALSE if suspended.  The return value need be inspected only if
+ * a suspending data source is used.
+ */
+
+GLOBAL(boolean)
+jpeg_finish_decompress (j_decompress_ptr cinfo)
+{
+  if ((cinfo->global_state == DSTATE_SCANNING ||
+       cinfo->global_state == DSTATE_RAW_OK) && ! cinfo->buffered_image) {
+    /* Terminate final pass of non-buffered mode */
+    if (cinfo->output_scanline < cinfo->output_height)
+      ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
+    (*cinfo->master->finish_output_pass) (cinfo);
+    cinfo->global_state = DSTATE_STOPPING;
+  } else if (cinfo->global_state == DSTATE_BUFIMAGE) {
+    /* Finishing after a buffered-image operation */
+    cinfo->global_state = DSTATE_STOPPING;
+  } else if (cinfo->global_state != DSTATE_STOPPING) {
+    /* STOPPING = repeat call after a suspension, anything else is error */
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  }
+  /* Read until EOI */
+  while (! cinfo->inputctl->eoi_reached) {
+    if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED)
+      return FALSE;		/* Suspend, come back later */
+  }
+  /* Do final cleanup */
+  (*cinfo->src->term_source) (cinfo);
+  /* We can use jpeg_abort to release memory and reset global_state */
+  jpeg_abort((j_common_ptr) cinfo);
+  return TRUE;
+}
diff --git a/samples/jpeglib/jdapistd.c b/samples/jpeglib/jdapistd.c
new file mode 100644
index 0000000..c8e3fa0
--- /dev/null
+++ b/samples/jpeglib/jdapistd.c
@@ -0,0 +1,275 @@
+/*
+ * jdapistd.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains application interface code for the decompression half
+ * of the JPEG library.  These are the "standard" API routines that are
+ * used in the normal full-decompression case.  They are not used by a
+ * transcoding-only application.  Note that if an application links in
+ * jpeg_start_decompress, it will end up linking in the entire decompressor.
+ * We thus must separate this file from jdapimin.c to avoid linking the
+ * whole decompression library into a transcoder.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Forward declarations */
+LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
+
+
+/*
+ * Decompression initialization.
+ * jpeg_read_header must be completed before calling this.
+ *
+ * If a multipass operating mode was selected, this will do all but the
+ * last pass, and thus may take a great deal of time.
+ *
+ * Returns FALSE if suspended.  The return value need be inspected only if
+ * a suspending data source is used.
+ */
+
+GLOBAL(boolean)
+jpeg_start_decompress (j_decompress_ptr cinfo)
+{
+  if (cinfo->global_state == DSTATE_READY) {
+    /* First call: initialize master control, select active modules */
+    jinit_master_decompress(cinfo);
+    if (cinfo->buffered_image) {
+      /* No more work here; expecting jpeg_start_output next */
+      cinfo->global_state = DSTATE_BUFIMAGE;
+      return TRUE;
+    }
+    cinfo->global_state = DSTATE_PRELOAD;
+  }
+  if (cinfo->global_state == DSTATE_PRELOAD) {
+    /* If file has multiple scans, absorb them all into the coef buffer */
+    if (cinfo->inputctl->has_multiple_scans) {
+#ifdef D_MULTISCAN_FILES_SUPPORTED
+      for (;;) {
+	int retcode;
+	/* Call progress monitor hook if present */
+	if (cinfo->progress != NULL)
+	  (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
+	/* Absorb some more input */
+	retcode = (*cinfo->inputctl->consume_input) (cinfo);
+	if (retcode == JPEG_SUSPENDED)
+	  return FALSE;
+	if (retcode == JPEG_REACHED_EOI)
+	  break;
+	/* Advance progress counter if appropriate */
+	if (cinfo->progress != NULL &&
+	    (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) {
+	  if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) {
+	    /* jdmaster underestimated number of scans; ratchet up one scan */
+	    cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows;
+	  }
+	}
+      }
+#else
+      ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif /* D_MULTISCAN_FILES_SUPPORTED */
+    }
+    cinfo->output_scan_number = cinfo->input_scan_number;
+  } else if (cinfo->global_state != DSTATE_PRESCAN)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  /* Perform any dummy output passes, and set up for the final pass */
+  return output_pass_setup(cinfo);
+}
+
+
+/*
+ * Set up for an output pass, and perform any dummy pass(es) needed.
+ * Common subroutine for jpeg_start_decompress and jpeg_start_output.
+ * Entry: global_state = DSTATE_PRESCAN only if previously suspended.
+ * Exit: If done, returns TRUE and sets global_state for proper output mode.
+ *       If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN.
+ */
+
+LOCAL(boolean)
+output_pass_setup (j_decompress_ptr cinfo)
+{
+  if (cinfo->global_state != DSTATE_PRESCAN) {
+    /* First call: do pass setup */
+    (*cinfo->master->prepare_for_output_pass) (cinfo);
+    cinfo->output_scanline = 0;
+    cinfo->global_state = DSTATE_PRESCAN;
+  }
+  /* Loop over any required dummy passes */
+  while (cinfo->master->is_dummy_pass) {
+#ifdef QUANT_2PASS_SUPPORTED
+    /* Crank through the dummy pass */
+    while (cinfo->output_scanline < cinfo->output_height) {
+      JDIMENSION last_scanline;
+      /* Call progress monitor hook if present */
+      if (cinfo->progress != NULL) {
+	cinfo->progress->pass_counter = (long) cinfo->output_scanline;
+	cinfo->progress->pass_limit = (long) cinfo->output_height;
+	(*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
+      }
+      /* Process some data */
+      last_scanline = cinfo->output_scanline;
+      (*cinfo->main->process_data) (cinfo, (JSAMPARRAY) NULL,
+				    &cinfo->output_scanline, (JDIMENSION) 0);
+      if (cinfo->output_scanline == last_scanline)
+	return FALSE;		/* No progress made, must suspend */
+    }
+    /* Finish up dummy pass, and set up for another one */
+    (*cinfo->master->finish_output_pass) (cinfo);
+    (*cinfo->master->prepare_for_output_pass) (cinfo);
+    cinfo->output_scanline = 0;
+#else
+    ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif /* QUANT_2PASS_SUPPORTED */
+  }
+  /* Ready for application to drive output pass through
+   * jpeg_read_scanlines or jpeg_read_raw_data.
+   */
+  cinfo->global_state = cinfo->raw_data_out ? DSTATE_RAW_OK : DSTATE_SCANNING;
+  return TRUE;
+}
+
+
+/*
+ * Read some scanlines of data from the JPEG decompressor.
+ *
+ * The return value will be the number of lines actually read.
+ * This may be less than the number requested in several cases,
+ * including bottom of image, data source suspension, and operating
+ * modes that emit multiple scanlines at a time.
+ *
+ * Note: we warn about excess calls to jpeg_read_scanlines() since
+ * this likely signals an application programmer error.  However,
+ * an oversize buffer (max_lines > scanlines remaining) is not an error.
+ */
+
+GLOBAL(JDIMENSION)
+jpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines,
+		     JDIMENSION max_lines)
+{
+  JDIMENSION row_ctr;
+
+  if (cinfo->global_state != DSTATE_SCANNING)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  if (cinfo->output_scanline >= cinfo->output_height) {
+    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
+    return 0;
+  }
+
+  /* Call progress monitor hook if present */
+  if (cinfo->progress != NULL) {
+    cinfo->progress->pass_counter = (long) cinfo->output_scanline;
+    cinfo->progress->pass_limit = (long) cinfo->output_height;
+    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
+  }
+
+  /* Process some data */
+  row_ctr = 0;
+  (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, max_lines);
+  cinfo->output_scanline += row_ctr;
+  return row_ctr;
+}
+
+
+/*
+ * Alternate entry point to read raw data.
+ * Processes exactly one iMCU row per call, unless suspended.
+ */
+
+GLOBAL(JDIMENSION)
+jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,
+		    JDIMENSION max_lines)
+{
+  JDIMENSION lines_per_iMCU_row;
+
+  if (cinfo->global_state != DSTATE_RAW_OK)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  if (cinfo->output_scanline >= cinfo->output_height) {
+    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
+    return 0;
+  }
+
+  /* Call progress monitor hook if present */
+  if (cinfo->progress != NULL) {
+    cinfo->progress->pass_counter = (long) cinfo->output_scanline;
+    cinfo->progress->pass_limit = (long) cinfo->output_height;
+    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
+  }
+
+  /* Verify that at least one iMCU row can be returned. */
+  lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size;
+  if (max_lines < lines_per_iMCU_row)
+    ERREXIT(cinfo, JERR_BUFFER_SIZE);
+
+  /* Decompress directly into user's buffer. */
+  if (! (*cinfo->coef->decompress_data) (cinfo, data))
+    return 0;			/* suspension forced, can do nothing more */
+
+  /* OK, we processed one iMCU row. */
+  cinfo->output_scanline += lines_per_iMCU_row;
+  return lines_per_iMCU_row;
+}
+
+
+/* Additional entry points for buffered-image mode. */
+
+#ifdef D_MULTISCAN_FILES_SUPPORTED
+
+/*
+ * Initialize for an output pass in buffered-image mode.
+ */
+
+GLOBAL(boolean)
+jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
+{
+  if (cinfo->global_state != DSTATE_BUFIMAGE &&
+      cinfo->global_state != DSTATE_PRESCAN)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  /* Limit scan number to valid range */
+  if (scan_number <= 0)
+    scan_number = 1;
+  if (cinfo->inputctl->eoi_reached &&
+      scan_number > cinfo->input_scan_number)
+    scan_number = cinfo->input_scan_number;
+  cinfo->output_scan_number = scan_number;
+  /* Perform any dummy output passes, and set up for the real pass */
+  return output_pass_setup(cinfo);
+}
+
+
+/*
+ * Finish up after an output pass in buffered-image mode.
+ *
+ * Returns FALSE if suspended.  The return value need be inspected only if
+ * a suspending data source is used.
+ */
+
+GLOBAL(boolean)
+jpeg_finish_output (j_decompress_ptr cinfo)
+{
+  if ((cinfo->global_state == DSTATE_SCANNING ||
+       cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) {
+    /* Terminate this pass. */
+    /* We do not require the whole pass to have been completed. */
+    (*cinfo->master->finish_output_pass) (cinfo);
+    cinfo->global_state = DSTATE_BUFPOST;
+  } else if (cinfo->global_state != DSTATE_BUFPOST) {
+    /* BUFPOST = repeat call after a suspension, anything else is error */
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  }
+  /* Read markers looking for SOS or EOI */
+  while (cinfo->input_scan_number <= cinfo->output_scan_number &&
+	 ! cinfo->inputctl->eoi_reached) {
+    if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED)
+      return FALSE;		/* Suspend, come back later */
+  }
+  cinfo->global_state = DSTATE_BUFIMAGE;
+  return TRUE;
+}
+
+#endif /* D_MULTISCAN_FILES_SUPPORTED */
diff --git a/samples/jpeglib/jdatadst.c b/samples/jpeglib/jdatadst.c
new file mode 100644
index 0000000..a8f6fb0
--- /dev/null
+++ b/samples/jpeglib/jdatadst.c
@@ -0,0 +1,151 @@
+/*
+ * jdatadst.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains compression data destination routines for the case of
+ * emitting JPEG data to a file (or any stdio stream).  While these routines
+ * are sufficient for most applications, some will want to use a different
+ * destination manager.
+ * IMPORTANT: we assume that fwrite() will correctly transcribe an array of
+ * JOCTETs into 8-bit-wide elements on external storage.  If char is wider
+ * than 8 bits on your machine, you may need to do some tweaking.
+ */
+
+/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jerror.h"
+
+
+/* Expanded data destination object for stdio output */
+
+typedef struct {
+  struct jpeg_destination_mgr pub; /* public fields */
+
+  FILE * outfile;		/* target stream */
+  JOCTET * buffer;		/* start of buffer */
+} my_destination_mgr;
+
+typedef my_destination_mgr * my_dest_ptr;
+
+#define OUTPUT_BUF_SIZE  4096	/* choose an efficiently fwrite'able size */
+
+
+/*
+ * Initialize destination --- called by jpeg_start_compress
+ * before any data is actually written.
+ */
+
+METHODDEF(void)
+init_destination (j_compress_ptr cinfo)
+{
+  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
+
+  /* Allocate the output buffer --- it will be released when done with image */
+  dest->buffer = (JOCTET *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  OUTPUT_BUF_SIZE * SIZEOF(JOCTET));
+
+  dest->pub.next_output_byte = dest->buffer;
+  dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
+}
+
+
+/*
+ * Empty the output buffer --- called whenever buffer fills up.
+ *
+ * In typical applications, this should write the entire output buffer
+ * (ignoring the current state of next_output_byte & free_in_buffer),
+ * reset the pointer & count to the start of the buffer, and return TRUE
+ * indicating that the buffer has been dumped.
+ *
+ * In applications that need to be able to suspend compression due to output
+ * overrun, a FALSE return indicates that the buffer cannot be emptied now.
+ * In this situation, the compressor will return to its caller (possibly with
+ * an indication that it has not accepted all the supplied scanlines).  The
+ * application should resume compression after it has made more room in the
+ * output buffer.  Note that there are substantial restrictions on the use of
+ * suspension --- see the documentation.
+ *
+ * When suspending, the compressor will back up to a convenient restart point
+ * (typically the start of the current MCU). next_output_byte & free_in_buffer
+ * indicate where the restart point will be if the current call returns FALSE.
+ * Data beyond this point will be regenerated after resumption, so do not
+ * write it out when emptying the buffer externally.
+ */
+
+METHODDEF(boolean)
+empty_output_buffer (j_compress_ptr cinfo)
+{
+  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
+
+  if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) !=
+      (size_t) OUTPUT_BUF_SIZE)
+    ERREXIT(cinfo, JERR_FILE_WRITE);
+
+  dest->pub.next_output_byte = dest->buffer;
+  dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
+
+  return TRUE;
+}
+
+
+/*
+ * Terminate destination --- called by jpeg_finish_compress
+ * after all data has been written.  Usually needs to flush buffer.
+ *
+ * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding
+ * application must deal with any cleanup that should happen even
+ * for error exit.
+ */
+
+METHODDEF(void)
+term_destination (j_compress_ptr cinfo)
+{
+  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
+  size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer;
+
+  /* Write any data remaining in the buffer */
+  if (datacount > 0) {
+    if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount)
+      ERREXIT(cinfo, JERR_FILE_WRITE);
+  }
+  fflush(dest->outfile);
+  /* Make sure we wrote the output file OK */
+  if (ferror(dest->outfile))
+    ERREXIT(cinfo, JERR_FILE_WRITE);
+}
+
+
+/*
+ * Prepare for output to a stdio stream.
+ * The caller must have already opened the stream, and is responsible
+ * for closing it after finishing compression.
+ */
+
+GLOBAL(void)
+jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
+{
+  my_dest_ptr dest;
+
+  /* The destination object is made permanent so that multiple JPEG images
+   * can be written to the same file without re-executing jpeg_stdio_dest.
+   * This makes it dangerous to use this manager and a different destination
+   * manager serially with the same JPEG object, because their private object
+   * sizes may be different.  Caveat programmer.
+   */
+  if (cinfo->dest == NULL) {	/* first time for this JPEG object? */
+    cinfo->dest = (struct jpeg_destination_mgr *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
+				  SIZEOF(my_destination_mgr));
+  }
+
+  dest = (my_dest_ptr) cinfo->dest;
+  dest->pub.init_destination = init_destination;
+  dest->pub.empty_output_buffer = empty_output_buffer;
+  dest->pub.term_destination = term_destination;
+  dest->outfile = outfile;
+}
diff --git a/samples/jpeglib/jdatasrc.c b/samples/jpeglib/jdatasrc.c
new file mode 100644
index 0000000..edc752b
--- /dev/null
+++ b/samples/jpeglib/jdatasrc.c
@@ -0,0 +1,212 @@
+/*
+ * jdatasrc.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains decompression data source routines for the case of
+ * reading JPEG data from a file (or any stdio stream).  While these routines
+ * are sufficient for most applications, some will want to use a different
+ * source manager.
+ * IMPORTANT: we assume that fread() will correctly transcribe an array of
+ * JOCTETs from 8-bit-wide elements on external storage.  If char is wider
+ * than 8 bits on your machine, you may need to do some tweaking.
+ */
+
+/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jerror.h"
+
+
+/* Expanded data source object for stdio input */
+
+typedef struct {
+  struct jpeg_source_mgr pub;	/* public fields */
+
+  FILE * infile;		/* source stream */
+  JOCTET * buffer;		/* start of buffer */
+  boolean start_of_file;	/* have we gotten any data yet? */
+} my_source_mgr;
+
+typedef my_source_mgr * my_src_ptr;
+
+#define INPUT_BUF_SIZE  4096	/* choose an efficiently fread'able size */
+
+
+/*
+ * Initialize source --- called by jpeg_read_header
+ * before any data is actually read.
+ */
+
+METHODDEF(void)
+init_source (j_decompress_ptr cinfo)
+{
+  my_src_ptr src = (my_src_ptr) cinfo->src;
+
+  /* We reset the empty-input-file flag for each image,
+   * but we don't clear the input buffer.
+   * This is correct behavior for reading a series of images from one source.
+   */
+  src->start_of_file = TRUE;
+}
+
+
+/*
+ * Fill the input buffer --- called whenever buffer is emptied.
+ *
+ * In typical applications, this should read fresh data into the buffer
+ * (ignoring the current state of next_input_byte & bytes_in_buffer),
+ * reset the pointer & count to the start of the buffer, and return TRUE
+ * indicating that the buffer has been reloaded.  It is not necessary to
+ * fill the buffer entirely, only to obtain at least one more byte.
+ *
+ * There is no such thing as an EOF return.  If the end of the file has been
+ * reached, the routine has a choice of ERREXIT() or inserting fake data into
+ * the buffer.  In most cases, generating a warning message and inserting a
+ * fake EOI marker is the best course of action --- this will allow the
+ * decompressor to output however much of the image is there.  However,
+ * the resulting error message is misleading if the real problem is an empty
+ * input file, so we handle that case specially.
+ *
+ * In applications that need to be able to suspend compression due to input
+ * not being available yet, a FALSE return indicates that no more data can be
+ * obtained right now, but more may be forthcoming later.  In this situation,
+ * the decompressor will return to its caller (with an indication of the
+ * number of scanlines it has read, if any).  The application should resume
+ * decompression after it has loaded more data into the input buffer.  Note
+ * that there are substantial restrictions on the use of suspension --- see
+ * the documentation.
+ *
+ * When suspending, the decompressor will back up to a convenient restart point
+ * (typically the start of the current MCU). next_input_byte & bytes_in_buffer
+ * indicate where the restart point will be if the current call returns FALSE.
+ * Data beyond this point must be rescanned after resumption, so move it to
+ * the front of the buffer rather than discarding it.
+ */
+
+METHODDEF(boolean)
+fill_input_buffer (j_decompress_ptr cinfo)
+{
+  my_src_ptr src = (my_src_ptr) cinfo->src;
+  size_t nbytes;
+
+  nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE);
+
+  if (nbytes <= 0) {
+    if (src->start_of_file)	/* Treat empty input file as fatal error */
+      ERREXIT(cinfo, JERR_INPUT_EMPTY);
+    WARNMS(cinfo, JWRN_JPEG_EOF);
+    /* Insert a fake EOI marker */
+    src->buffer[0] = (JOCTET) 0xFF;
+    src->buffer[1] = (JOCTET) JPEG_EOI;
+    nbytes = 2;
+  }
+
+  src->pub.next_input_byte = src->buffer;
+  src->pub.bytes_in_buffer = nbytes;
+  src->start_of_file = FALSE;
+
+  return TRUE;
+}
+
+
+/*
+ * Skip data --- used to skip over a potentially large amount of
+ * uninteresting data (such as an APPn marker).
+ *
+ * Writers of suspendable-input applications must note that skip_input_data
+ * is not granted the right to give a suspension return.  If the skip extends
+ * beyond the data currently in the buffer, the buffer can be marked empty so
+ * that the next read will cause a fill_input_buffer call that can suspend.
+ * Arranging for additional bytes to be discarded before reloading the input
+ * buffer is the application writer's problem.
+ */
+
+METHODDEF(void)
+skip_input_data (j_decompress_ptr cinfo, long num_bytes)
+{
+  my_src_ptr src = (my_src_ptr) cinfo->src;
+
+  /* Just a dumb implementation for now.  Could use fseek() except
+   * it doesn't work on pipes.  Not clear that being smart is worth
+   * any trouble anyway --- large skips are infrequent.
+   */
+  if (num_bytes > 0) {
+    while (num_bytes > (long) src->pub.bytes_in_buffer) {
+      num_bytes -= (long) src->pub.bytes_in_buffer;
+      (void) fill_input_buffer(cinfo);
+      /* note we assume that fill_input_buffer will never return FALSE,
+       * so suspension need not be handled.
+       */
+    }
+    src->pub.next_input_byte += (size_t) num_bytes;
+    src->pub.bytes_in_buffer -= (size_t) num_bytes;
+  }
+}
+
+
+/*
+ * An additional method that can be provided by data source modules is the
+ * resync_to_restart method for error recovery in the presence of RST markers.
+ * For the moment, this source module just uses the default resync method
+ * provided by the JPEG library.  That method assumes that no backtracking
+ * is possible.
+ */
+
+
+/*
+ * Terminate source --- called by jpeg_finish_decompress
+ * after all data has been read.  Often a no-op.
+ *
+ * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding
+ * application must deal with any cleanup that should happen even
+ * for error exit.
+ */
+
+METHODDEF(void)
+term_source (j_decompress_ptr cinfo)
+{
+  /* no work necessary here */
+}
+
+
+/*
+ * Prepare for input from a stdio stream.
+ * The caller must have already opened the stream, and is responsible
+ * for closing it after finishing decompression.
+ */
+
+GLOBAL(void)
+jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile)
+{
+  my_src_ptr src;
+
+  /* The source object and input buffer are made permanent so that a series
+   * of JPEG images can be read from the same file by calling jpeg_stdio_src
+   * only before the first one.  (If we discarded the buffer at the end of
+   * one image, we'd likely lose the start of the next one.)
+   * This makes it unsafe to use this manager and a different source
+   * manager serially with the same JPEG object.  Caveat programmer.
+   */
+  if (cinfo->src == NULL) {	/* first time for this JPEG object? */
+    cinfo->src = (struct jpeg_source_mgr *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
+				  SIZEOF(my_source_mgr));
+    src = (my_src_ptr) cinfo->src;
+    src->buffer = (JOCTET *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
+				  INPUT_BUF_SIZE * SIZEOF(JOCTET));
+  }
+
+  src = (my_src_ptr) cinfo->src;
+  src->pub.init_source = init_source;
+  src->pub.fill_input_buffer = fill_input_buffer;
+  src->pub.skip_input_data = skip_input_data;
+  src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
+  src->pub.term_source = term_source;
+  src->infile = infile;
+  src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
+  src->pub.next_input_byte = NULL; /* until buffer loaded */
+}
diff --git a/samples/jpeglib/jdcoefct.c b/samples/jpeglib/jdcoefct.c
new file mode 100644
index 0000000..4938d20
--- /dev/null
+++ b/samples/jpeglib/jdcoefct.c
@@ -0,0 +1,736 @@
+/*
+ * jdcoefct.c
+ *
+ * Copyright (C) 1994-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains the coefficient buffer controller for decompression.
+ * This controller is the top level of the JPEG decompressor proper.
+ * The coefficient buffer lies between entropy decoding and inverse-DCT steps.
+ *
+ * In buffered-image mode, this controller is the interface between
+ * input-oriented processing and output-oriented processing.
+ * Also, the input side (only) is used when reading a file for transcoding.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+/* Block smoothing is only applicable for progressive JPEG, so: */
+#ifndef D_PROGRESSIVE_SUPPORTED
+#undef BLOCK_SMOOTHING_SUPPORTED
+#endif
+
+/* Private buffer controller object */
+
+typedef struct {
+  struct jpeg_d_coef_controller pub; /* public fields */
+
+  /* These variables keep track of the current location of the input side. */
+  /* cinfo->input_iMCU_row is also used for this. */
+  JDIMENSION MCU_ctr;		/* counts MCUs processed in current row */
+  int MCU_vert_offset;		/* counts MCU rows within iMCU row */
+  int MCU_rows_per_iMCU_row;	/* number of such rows needed */
+
+  /* The output side's location is represented by cinfo->output_iMCU_row. */
+
+  /* In single-pass modes, it's sufficient to buffer just one MCU.
+   * We allocate a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks,
+   * and let the entropy decoder write into that workspace each time.
+   * (On 80x86, the workspace is FAR even though it's not really very big;
+   * this is to keep the module interfaces unchanged when a large coefficient
+   * buffer is necessary.)
+   * In multi-pass modes, this array points to the current MCU's blocks
+   * within the virtual arrays; it is used only by the input side.
+   */
+  JBLOCKROW MCU_buffer[D_MAX_BLOCKS_IN_MCU];
+
+#ifdef D_MULTISCAN_FILES_SUPPORTED
+  /* In multi-pass modes, we need a virtual block array for each component. */
+  jvirt_barray_ptr whole_image[MAX_COMPONENTS];
+#endif
+
+#ifdef BLOCK_SMOOTHING_SUPPORTED
+  /* When doing block smoothing, we latch coefficient Al values here */
+  int * coef_bits_latch;
+#define SAVED_COEFS  6		/* we save coef_bits[0..5] */
+#endif
+} my_coef_controller;
+
+typedef my_coef_controller * my_coef_ptr;
+
+/* Forward declarations */
+METHODDEF(int) decompress_onepass
+	JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
+#ifdef D_MULTISCAN_FILES_SUPPORTED
+METHODDEF(int) decompress_data
+	JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
+#endif
+#ifdef BLOCK_SMOOTHING_SUPPORTED
+LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo));
+METHODDEF(int) decompress_smooth_data
+	JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
+#endif
+
+
+LOCAL(void)
+start_iMCU_row (j_decompress_ptr cinfo)
+/* Reset within-iMCU-row counters for a new row (input side) */
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+
+  /* In an interleaved scan, an MCU row is the same as an iMCU row.
+   * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows.
+   * But at the bottom of the image, process only what's left.
+   */
+  if (cinfo->comps_in_scan > 1) {
+    coef->MCU_rows_per_iMCU_row = 1;
+  } else {
+    if (cinfo->input_iMCU_row < (cinfo->total_iMCU_rows-1))
+      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor;
+    else
+      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;
+  }
+
+  coef->MCU_ctr = 0;
+  coef->MCU_vert_offset = 0;
+}
+
+
+/*
+ * Initialize for an input processing pass.
+ */
+
+METHODDEF(void)
+start_input_pass (j_decompress_ptr cinfo)
+{
+  cinfo->input_iMCU_row = 0;
+  start_iMCU_row(cinfo);
+}
+
+
+/*
+ * Initialize for an output processing pass.
+ */
+
+METHODDEF(void)
+start_output_pass (j_decompress_ptr cinfo)
+{
+#ifdef BLOCK_SMOOTHING_SUPPORTED
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+
+  /* If multipass, check to see whether to use block smoothing on this pass */
+  if (coef->pub.coef_arrays != NULL) {
+    if (cinfo->do_block_smoothing && smoothing_ok(cinfo))
+      coef->pub.decompress_data = decompress_smooth_data;
+    else
+      coef->pub.decompress_data = decompress_data;
+  }
+#endif
+  cinfo->output_iMCU_row = 0;
+}
+
+
+/*
+ * Decompress and return some data in the single-pass case.
+ * Always attempts to emit one fully interleaved MCU row ("iMCU" row).
+ * Input and output must run in lockstep since we have only a one-MCU buffer.
+ * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED.
+ *
+ * NB: output_buf contains a plane for each component in image,
+ * which we index according to the component's SOF position.
+ */
+
+METHODDEF(int)
+decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+  JDIMENSION MCU_col_num;	/* index of current MCU within row */
+  JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
+  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
+  int blkn, ci, xindex, yindex, yoffset, useful_width;
+  JSAMPARRAY output_ptr;
+  JDIMENSION start_col, output_col;
+  jpeg_component_info *compptr;
+  inverse_DCT_method_ptr inverse_DCT;
+
+  /* Loop to process as much as one whole iMCU row */
+  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
+       yoffset++) {
+    for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col;
+	 MCU_col_num++) {
+      /* Try to fetch an MCU.  Entropy decoder expects buffer to be zeroed. */
+      jzero_far((void FAR *) coef->MCU_buffer[0],
+		(size_t) (cinfo->blocks_in_MCU * SIZEOF(JBLOCK)));
+      if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) {
+	/* Suspension forced; update state counters and exit */
+	coef->MCU_vert_offset = yoffset;
+	coef->MCU_ctr = MCU_col_num;
+	return JPEG_SUSPENDED;
+      }
+      /* Determine where data should go in output_buf and do the IDCT thing.
+       * We skip dummy blocks at the right and bottom edges (but blkn gets
+       * incremented past them!).  Note the inner loop relies on having
+       * allocated the MCU_buffer[] blocks sequentially.
+       */
+      blkn = 0;			/* index of current DCT block within MCU */
+      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+	compptr = cinfo->cur_comp_info[ci];
+	/* Don't bother to IDCT an uninteresting component. */
+	if (! compptr->component_needed) {
+	  blkn += compptr->MCU_blocks;
+	  continue;
+	}
+	inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index];
+	useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
+						    : compptr->last_col_width;
+	output_ptr = output_buf[compptr->component_index] +
+	  yoffset * compptr->DCT_scaled_size;
+	start_col = MCU_col_num * compptr->MCU_sample_width;
+	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
+	  if (cinfo->input_iMCU_row < last_iMCU_row ||
+	      yoffset+yindex < compptr->last_row_height) {
+	    output_col = start_col;
+	    for (xindex = 0; xindex < useful_width; xindex++) {
+	      (*inverse_DCT) (cinfo, compptr,
+			      (JCOEFPTR) coef->MCU_buffer[blkn+xindex],
+			      output_ptr, output_col);
+	      output_col += compptr->DCT_scaled_size;
+	    }
+	  }
+	  blkn += compptr->MCU_width;
+	  output_ptr += compptr->DCT_scaled_size;
+	}
+      }
+    }
+    /* Completed an MCU row, but perhaps not an iMCU row */
+    coef->MCU_ctr = 0;
+  }
+  /* Completed the iMCU row, advance counters for next one */
+  cinfo->output_iMCU_row++;
+  if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) {
+    start_iMCU_row(cinfo);
+    return JPEG_ROW_COMPLETED;
+  }
+  /* Completed the scan */
+  (*cinfo->inputctl->finish_input_pass) (cinfo);
+  return JPEG_SCAN_COMPLETED;
+}
+
+
+/*
+ * Dummy consume-input routine for single-pass operation.
+ */
+
+METHODDEF(int)
+dummy_consume_data (j_decompress_ptr cinfo)
+{
+  return JPEG_SUSPENDED;	/* Always indicate nothing was done */
+}
+
+
+#ifdef D_MULTISCAN_FILES_SUPPORTED
+
+/*
+ * Consume input data and store it in the full-image coefficient buffer.
+ * We read as much as one fully interleaved MCU row ("iMCU" row) per call,
+ * ie, v_samp_factor block rows for each component in the scan.
+ * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED.
+ */
+
+METHODDEF(int)
+consume_data (j_decompress_ptr cinfo)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+  JDIMENSION MCU_col_num;	/* index of current MCU within row */
+  int blkn, ci, xindex, yindex, yoffset;
+  JDIMENSION start_col;
+  JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];
+  JBLOCKROW buffer_ptr;
+  jpeg_component_info *compptr;
+
+  /* Align the virtual buffers for the components used in this scan. */
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    compptr = cinfo->cur_comp_info[ci];
+    buffer[ci] = (*cinfo->mem->access_virt_barray)
+      ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index],
+       cinfo->input_iMCU_row * compptr->v_samp_factor,
+       (JDIMENSION) compptr->v_samp_factor, TRUE);
+    /* Note: entropy decoder expects buffer to be zeroed,
+     * but this is handled automatically by the memory manager
+     * because we requested a pre-zeroed array.
+     */
+  }
+
+  /* Loop to process one whole iMCU row */
+  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
+       yoffset++) {
+    for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row;
+	 MCU_col_num++) {
+      /* Construct list of pointers to DCT blocks belonging to this MCU */
+      blkn = 0;			/* index of current DCT block within MCU */
+      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+	compptr = cinfo->cur_comp_info[ci];
+	start_col = MCU_col_num * compptr->MCU_width;
+	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
+	  buffer_ptr = buffer[ci][yindex+yoffset] + start_col;
+	  for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
+	    coef->MCU_buffer[blkn++] = buffer_ptr++;
+	  }
+	}
+      }
+      /* Try to fetch the MCU. */
+      if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) {
+	/* Suspension forced; update state counters and exit */
+	coef->MCU_vert_offset = yoffset;
+	coef->MCU_ctr = MCU_col_num;
+	return JPEG_SUSPENDED;
+      }
+    }
+    /* Completed an MCU row, but perhaps not an iMCU row */
+    coef->MCU_ctr = 0;
+  }
+  /* Completed the iMCU row, advance counters for next one */
+  if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) {
+    start_iMCU_row(cinfo);
+    return JPEG_ROW_COMPLETED;
+  }
+  /* Completed the scan */
+  (*cinfo->inputctl->finish_input_pass) (cinfo);
+  return JPEG_SCAN_COMPLETED;
+}
+
+
+/*
+ * Decompress and return some data in the multi-pass case.
+ * Always attempts to emit one fully interleaved MCU row ("iMCU" row).
+ * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED.
+ *
+ * NB: output_buf contains a plane for each component in image.
+ */
+
+METHODDEF(int)
+decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
+  JDIMENSION block_num;
+  int ci, block_row, block_rows;
+  JBLOCKARRAY buffer;
+  JBLOCKROW buffer_ptr;
+  JSAMPARRAY output_ptr;
+  JDIMENSION output_col;
+  jpeg_component_info *compptr;
+  inverse_DCT_method_ptr inverse_DCT;
+
+  /* Force some input to be done if we are getting ahead of the input. */
+  while (cinfo->input_scan_number < cinfo->output_scan_number ||
+	 (cinfo->input_scan_number == cinfo->output_scan_number &&
+	  cinfo->input_iMCU_row <= cinfo->output_iMCU_row)) {
+    if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED)
+      return JPEG_SUSPENDED;
+  }
+
+  /* OK, output from the virtual arrays. */
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* Don't bother to IDCT an uninteresting component. */
+    if (! compptr->component_needed)
+      continue;
+    /* Align the virtual buffer for this component. */
+    buffer = (*cinfo->mem->access_virt_barray)
+      ((j_common_ptr) cinfo, coef->whole_image[ci],
+       cinfo->output_iMCU_row * compptr->v_samp_factor,
+       (JDIMENSION) compptr->v_samp_factor, FALSE);
+    /* Count non-dummy DCT block rows in this iMCU row. */
+    if (cinfo->output_iMCU_row < last_iMCU_row)
+      block_rows = compptr->v_samp_factor;
+    else {
+      /* NB: can't use last_row_height here; it is input-side-dependent! */
+      block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
+      if (block_rows == 0) block_rows = compptr->v_samp_factor;
+    }
+    inverse_DCT = cinfo->idct->inverse_DCT[ci];
+    output_ptr = output_buf[ci];
+    /* Loop over all DCT blocks to be processed. */
+    for (block_row = 0; block_row < block_rows; block_row++) {
+      buffer_ptr = buffer[block_row];
+      output_col = 0;
+      for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) {
+	(*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr,
+			output_ptr, output_col);
+	buffer_ptr++;
+	output_col += compptr->DCT_scaled_size;
+      }
+      output_ptr += compptr->DCT_scaled_size;
+    }
+  }
+
+  if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows)
+    return JPEG_ROW_COMPLETED;
+  return JPEG_SCAN_COMPLETED;
+}
+
+#endif /* D_MULTISCAN_FILES_SUPPORTED */
+
+
+#ifdef BLOCK_SMOOTHING_SUPPORTED
+
+/*
+ * This code applies interblock smoothing as described by section K.8
+ * of the JPEG standard: the first 5 AC coefficients are estimated from
+ * the DC values of a DCT block and its 8 neighboring blocks.
+ * We apply smoothing only for progressive JPEG decoding, and only if
+ * the coefficients it can estimate are not yet known to full precision.
+ */
+
+/* Natural-order array positions of the first 5 zigzag-order coefficients */
+#define Q01_POS  1
+#define Q10_POS  8
+#define Q20_POS  16
+#define Q11_POS  9
+#define Q02_POS  2
+
+/*
+ * Determine whether block smoothing is applicable and safe.
+ * We also latch the current states of the coef_bits[] entries for the
+ * AC coefficients; otherwise, if the input side of the decompressor
+ * advances into a new scan, we might think the coefficients are known
+ * more accurately than they really are.
+ */
+
+LOCAL(boolean)
+smoothing_ok (j_decompress_ptr cinfo)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+  boolean smoothing_useful = FALSE;
+  int ci, coefi;
+  jpeg_component_info *compptr;
+  JQUANT_TBL * qtable;
+  int * coef_bits;
+  int * coef_bits_latch;
+
+  if (! cinfo->progressive_mode || cinfo->coef_bits == NULL)
+    return FALSE;
+
+  /* Allocate latch area if not already done */
+  if (coef->coef_bits_latch == NULL)
+    coef->coef_bits_latch = (int *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  cinfo->num_components *
+				  (SAVED_COEFS * SIZEOF(int)));
+  coef_bits_latch = coef->coef_bits_latch;
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* All components' quantization values must already be latched. */
+    if ((qtable = compptr->quant_table) == NULL)
+      return FALSE;
+    /* Verify DC & first 5 AC quantizers are nonzero to avoid zero-divide. */
+    if (qtable->quantval[0] == 0 ||
+	qtable->quantval[Q01_POS] == 0 ||
+	qtable->quantval[Q10_POS] == 0 ||
+	qtable->quantval[Q20_POS] == 0 ||
+	qtable->quantval[Q11_POS] == 0 ||
+	qtable->quantval[Q02_POS] == 0)
+      return FALSE;
+    /* DC values must be at least partly known for all components. */
+    coef_bits = cinfo->coef_bits[ci];
+    if (coef_bits[0] < 0)
+      return FALSE;
+    /* Block smoothing is helpful if some AC coefficients remain inaccurate. */
+    for (coefi = 1; coefi <= 5; coefi++) {
+      coef_bits_latch[coefi] = coef_bits[coefi];
+      if (coef_bits[coefi] != 0)
+	smoothing_useful = TRUE;
+    }
+    coef_bits_latch += SAVED_COEFS;
+  }
+
+  return smoothing_useful;
+}
+
+
+/*
+ * Variant of decompress_data for use when doing block smoothing.
+ */
+
+METHODDEF(int)
+decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
+{
+  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
+  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
+  JDIMENSION block_num, last_block_column;
+  int ci, block_row, block_rows, access_rows;
+  JBLOCKARRAY buffer;
+  JBLOCKROW buffer_ptr, prev_block_row, next_block_row;
+  JSAMPARRAY output_ptr;
+  JDIMENSION output_col;
+  jpeg_component_info *compptr;
+  inverse_DCT_method_ptr inverse_DCT;
+  boolean first_row, last_row;
+  JBLOCK workspace;
+  int *coef_bits;
+  JQUANT_TBL *quanttbl;
+  INT32 Q00,Q01,Q02,Q10,Q11,Q20, num;
+  int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9;
+  int Al, pred;
+
+  /* Force some input to be done if we are getting ahead of the input. */
+  while (cinfo->input_scan_number <= cinfo->output_scan_number &&
+	 ! cinfo->inputctl->eoi_reached) {
+    if (cinfo->input_scan_number == cinfo->output_scan_number) {
+      /* If input is working on current scan, we ordinarily want it to
+       * have completed the current row.  But if input scan is DC,
+       * we want it to keep one row ahead so that next block row's DC
+       * values are up to date.
+       */
+      JDIMENSION delta = (cinfo->Ss == 0) ? 1 : 0;
+      if (cinfo->input_iMCU_row > cinfo->output_iMCU_row+delta)
+	break;
+    }
+    if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED)
+      return JPEG_SUSPENDED;
+  }
+
+  /* OK, output from the virtual arrays. */
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* Don't bother to IDCT an uninteresting component. */
+    if (! compptr->component_needed)
+      continue;
+    /* Count non-dummy DCT block rows in this iMCU row. */
+    if (cinfo->output_iMCU_row < last_iMCU_row) {
+      block_rows = compptr->v_samp_factor;
+      access_rows = block_rows * 2; /* this and next iMCU row */
+      last_row = FALSE;
+    } else {
+      /* NB: can't use last_row_height here; it is input-side-dependent! */
+      block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
+      if (block_rows == 0) block_rows = compptr->v_samp_factor;
+      access_rows = block_rows; /* this iMCU row only */
+      last_row = TRUE;
+    }
+    /* Align the virtual buffer for this component. */
+    if (cinfo->output_iMCU_row > 0) {
+      access_rows += compptr->v_samp_factor; /* prior iMCU row too */
+      buffer = (*cinfo->mem->access_virt_barray)
+	((j_common_ptr) cinfo, coef->whole_image[ci],
+	 (cinfo->output_iMCU_row - 1) * compptr->v_samp_factor,
+	 (JDIMENSION) access_rows, FALSE);
+      buffer += compptr->v_samp_factor;	/* point to current iMCU row */
+      first_row = FALSE;
+    } else {
+      buffer = (*cinfo->mem->access_virt_barray)
+	((j_common_ptr) cinfo, coef->whole_image[ci],
+	 (JDIMENSION) 0, (JDIMENSION) access_rows, FALSE);
+      first_row = TRUE;
+    }
+    /* Fetch component-dependent info */
+    coef_bits = coef->coef_bits_latch + (ci * SAVED_COEFS);
+    quanttbl = compptr->quant_table;
+    Q00 = quanttbl->quantval[0];
+    Q01 = quanttbl->quantval[Q01_POS];
+    Q10 = quanttbl->quantval[Q10_POS];
+    Q20 = quanttbl->quantval[Q20_POS];
+    Q11 = quanttbl->quantval[Q11_POS];
+    Q02 = quanttbl->quantval[Q02_POS];
+    inverse_DCT = cinfo->idct->inverse_DCT[ci];
+    output_ptr = output_buf[ci];
+    /* Loop over all DCT blocks to be processed. */
+    for (block_row = 0; block_row < block_rows; block_row++) {
+      buffer_ptr = buffer[block_row];
+      if (first_row && block_row == 0)
+	prev_block_row = buffer_ptr;
+      else
+	prev_block_row = buffer[block_row-1];
+      if (last_row && block_row == block_rows-1)
+	next_block_row = buffer_ptr;
+      else
+	next_block_row = buffer[block_row+1];
+      /* We fetch the surrounding DC values using a sliding-register approach.
+       * Initialize all nine here so as to do the right thing on narrow pics.
+       */
+      DC1 = DC2 = DC3 = (int) prev_block_row[0][0];
+      DC4 = DC5 = DC6 = (int) buffer_ptr[0][0];
+      DC7 = DC8 = DC9 = (int) next_block_row[0][0];
+      output_col = 0;
+      last_block_column = compptr->width_in_blocks - 1;
+      for (block_num = 0; block_num <= last_block_column; block_num++) {
+	/* Fetch current DCT block into workspace so we can modify it. */
+	jcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1);
+	/* Update DC values */
+	if (block_num < last_block_column) {
+	  DC3 = (int) prev_block_row[1][0];
+	  DC6 = (int) buffer_ptr[1][0];
+	  DC9 = (int) next_block_row[1][0];
+	}
+	/* Compute coefficient estimates per K.8.
+	 * An estimate is applied only if coefficient is still zero,
+	 * and is not known to be fully accurate.
+	 */
+	/* AC01 */
+	if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) {
+	  num = 36 * Q00 * (DC4 - DC6);
+	  if (num >= 0) {
+	    pred = (int) (((Q01<<7) + num) / (Q01<<8));
+	    if (Al > 0 && pred >= (1<<Al))
+	      pred = (1<<Al)-1;
+	  } else {
+	    pred = (int) (((Q01<<7) - num) / (Q01<<8));
+	    if (Al > 0 && pred >= (1<<Al))
+	      pred = (1<<Al)-1;
+	    pred = -pred;
+	  }
+	  workspace[1] = (JCOEF) pred;
+	}
+	/* AC10 */
+	if ((Al=coef_bits[2]) != 0 && workspace[8] == 0) {
+	  num = 36 * Q00 * (DC2 - DC8);
+	  if (num >= 0) {
+	    pred = (int) (((Q10<<7) + num) / (Q10<<8));
+	    if (Al > 0 && pred >= (1<<Al))
+	      pred = (1<<Al)-1;
+	  } else {
+	    pred = (int) (((Q10<<7) - num) / (Q10<<8));
+	    if (Al > 0 && pred >= (1<<Al))
+	      pred = (1<<Al)-1;
+	    pred = -pred;
+	  }
+	  workspace[8] = (JCOEF) pred;
+	}
+	/* AC20 */
+	if ((Al=coef_bits[3]) != 0 && workspace[16] == 0) {
+	  num = 9 * Q00 * (DC2 + DC8 - 2*DC5);
+	  if (num >= 0) {
+	    pred = (int) (((Q20<<7) + num) / (Q20<<8));
+	    if (Al > 0 && pred >= (1<<Al))
+	      pred = (1<<Al)-1;
+	  } else {
+	    pred = (int) (((Q20<<7) - num) / (Q20<<8));
+	    if (Al > 0 && pred >= (1<<Al))
+	      pred = (1<<Al)-1;
+	    pred = -pred;
+	  }
+	  workspace[16] = (JCOEF) pred;
+	}
+	/* AC11 */
+	if ((Al=coef_bits[4]) != 0 && workspace[9] == 0) {
+	  num = 5 * Q00 * (DC1 - DC3 - DC7 + DC9);
+	  if (num >= 0) {
+	    pred = (int) (((Q11<<7) + num) / (Q11<<8));
+	    if (Al > 0 && pred >= (1<<Al))
+	      pred = (1<<Al)-1;
+	  } else {
+	    pred = (int) (((Q11<<7) - num) / (Q11<<8));
+	    if (Al > 0 && pred >= (1<<Al))
+	      pred = (1<<Al)-1;
+	    pred = -pred;
+	  }
+	  workspace[9] = (JCOEF) pred;
+	}
+	/* AC02 */
+	if ((Al=coef_bits[5]) != 0 && workspace[2] == 0) {
+	  num = 9 * Q00 * (DC4 + DC6 - 2*DC5);
+	  if (num >= 0) {
+	    pred = (int) (((Q02<<7) + num) / (Q02<<8));
+	    if (Al > 0 && pred >= (1<<Al))
+	      pred = (1<<Al)-1;
+	  } else {
+	    pred = (int) (((Q02<<7) - num) / (Q02<<8));
+	    if (Al > 0 && pred >= (1<<Al))
+	      pred = (1<<Al)-1;
+	    pred = -pred;
+	  }
+	  workspace[2] = (JCOEF) pred;
+	}
+	/* OK, do the IDCT */
+	(*inverse_DCT) (cinfo, compptr, (JCOEFPTR) workspace,
+			output_ptr, output_col);
+	/* Advance for next column */
+	DC1 = DC2; DC2 = DC3;
+	DC4 = DC5; DC5 = DC6;
+	DC7 = DC8; DC8 = DC9;
+	buffer_ptr++, prev_block_row++, next_block_row++;
+	output_col += compptr->DCT_scaled_size;
+      }
+      output_ptr += compptr->DCT_scaled_size;
+    }
+  }
+
+  if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows)
+    return JPEG_ROW_COMPLETED;
+  return JPEG_SCAN_COMPLETED;
+}
+
+#endif /* BLOCK_SMOOTHING_SUPPORTED */
+
+
+/*
+ * Initialize coefficient buffer controller.
+ */
+
+GLOBAL(void)
+jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
+{
+  my_coef_ptr coef;
+
+  coef = (my_coef_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_coef_controller));
+  cinfo->coef = (struct jpeg_d_coef_controller *) coef;
+  coef->pub.start_input_pass = start_input_pass;
+  coef->pub.start_output_pass = start_output_pass;
+#ifdef BLOCK_SMOOTHING_SUPPORTED
+  coef->coef_bits_latch = NULL;
+#endif
+
+  /* Create the coefficient buffer. */
+  if (need_full_buffer) {
+#ifdef D_MULTISCAN_FILES_SUPPORTED
+    /* Allocate a full-image virtual array for each component, */
+    /* padded to a multiple of samp_factor DCT blocks in each direction. */
+    /* Note we ask for a pre-zeroed array. */
+    int ci, access_rows;
+    jpeg_component_info *compptr;
+
+    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+	 ci++, compptr++) {
+      access_rows = compptr->v_samp_factor;
+#ifdef BLOCK_SMOOTHING_SUPPORTED
+      /* If block smoothing could be used, need a bigger window */
+      if (cinfo->progressive_mode)
+	access_rows *= 3;
+#endif
+      coef->whole_image[ci] = (*cinfo->mem->request_virt_barray)
+	((j_common_ptr) cinfo, JPOOL_IMAGE, TRUE,
+	 (JDIMENSION) jround_up((long) compptr->width_in_blocks,
+				(long) compptr->h_samp_factor),
+	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
+				(long) compptr->v_samp_factor),
+	 (JDIMENSION) access_rows);
+    }
+    coef->pub.consume_data = consume_data;
+    coef->pub.decompress_data = decompress_data;
+    coef->pub.coef_arrays = coef->whole_image; /* link to virtual arrays */
+#else
+    ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+  } else {
+    /* We only need a single-MCU buffer. */
+    JBLOCKROW buffer;
+    int i;
+
+    buffer = (JBLOCKROW)
+      (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
+    for (i = 0; i < D_MAX_BLOCKS_IN_MCU; i++) {
+      coef->MCU_buffer[i] = buffer + i;
+    }
+    coef->pub.consume_data = dummy_consume_data;
+    coef->pub.decompress_data = decompress_onepass;
+    coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */
+  }
+}
diff --git a/samples/jpeglib/jdcolor.c b/samples/jpeglib/jdcolor.c
new file mode 100644
index 0000000..6c04dfe
--- /dev/null
+++ b/samples/jpeglib/jdcolor.c
@@ -0,0 +1,396 @@
+/*
+ * jdcolor.c
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains output colorspace conversion routines.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Private subobject */
+
+typedef struct {
+  struct jpeg_color_deconverter pub; /* public fields */
+
+  /* Private state for YCC->RGB conversion */
+  int * Cr_r_tab;		/* => table for Cr to R conversion */
+  int * Cb_b_tab;		/* => table for Cb to B conversion */
+  INT32 * Cr_g_tab;		/* => table for Cr to G conversion */
+  INT32 * Cb_g_tab;		/* => table for Cb to G conversion */
+} my_color_deconverter;
+
+typedef my_color_deconverter * my_cconvert_ptr;
+
+
+/**************** YCbCr -> RGB conversion: most common case **************/
+
+/*
+ * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
+ * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
+ * The conversion equations to be implemented are therefore
+ *	R = Y                + 1.40200 * Cr
+ *	G = Y - 0.34414 * Cb - 0.71414 * Cr
+ *	B = Y + 1.77200 * Cb
+ * where Cb and Cr represent the incoming values less CENTERJSAMPLE.
+ * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
+ *
+ * To avoid floating-point arithmetic, we represent the fractional constants
+ * as integers scaled up by 2^16 (about 4 digits precision); we have to divide
+ * the products by 2^16, with appropriate rounding, to get the correct answer.
+ * Notice that Y, being an integral input, does not contribute any fraction
+ * so it need not participate in the rounding.
+ *
+ * For even more speed, we avoid doing any multiplications in the inner loop
+ * by precalculating the constants times Cb and Cr for all possible values.
+ * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
+ * for 12-bit samples it is still acceptable.  It's not very reasonable for
+ * 16-bit samples, but if you want lossless storage you shouldn't be changing
+ * colorspace anyway.
+ * The Cr=>R and Cb=>B values can be rounded to integers in advance; the
+ * values for the G calculation are left scaled up, since we must add them
+ * together before rounding.
+ */
+
+#define SCALEBITS	16	/* speediest right-shift on some machines */
+#define ONE_HALF	((INT32) 1 << (SCALEBITS-1))
+#define FIX(x)		((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
+
+
+/*
+ * Initialize tables for YCC->RGB colorspace conversion.
+ */
+
+LOCAL(void)
+build_ycc_rgb_table (j_decompress_ptr cinfo)
+{
+  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
+  int i;
+  INT32 x;
+  SHIFT_TEMPS
+
+  cconvert->Cr_r_tab = (int *)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				(MAXJSAMPLE+1) * SIZEOF(int));
+  cconvert->Cb_b_tab = (int *)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				(MAXJSAMPLE+1) * SIZEOF(int));
+  cconvert->Cr_g_tab = (INT32 *)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				(MAXJSAMPLE+1) * SIZEOF(INT32));
+  cconvert->Cb_g_tab = (INT32 *)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				(MAXJSAMPLE+1) * SIZEOF(INT32));
+
+  for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {
+    /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */
+    /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */
+    /* Cr=>R value is nearest int to 1.40200 * x */
+    cconvert->Cr_r_tab[i] = (int)
+		    RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS);
+    /* Cb=>B value is nearest int to 1.77200 * x */
+    cconvert->Cb_b_tab[i] = (int)
+		    RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS);
+    /* Cr=>G value is scaled-up -0.71414 * x */
+    cconvert->Cr_g_tab[i] = (- FIX(0.71414)) * x;
+    /* Cb=>G value is scaled-up -0.34414 * x */
+    /* We also add in ONE_HALF so that need not do it in inner loop */
+    cconvert->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF;
+  }
+}
+
+
+/*
+ * Convert some rows of samples to the output colorspace.
+ *
+ * Note that we change from noninterleaved, one-plane-per-component format
+ * to interleaved-pixel format.  The output buffer is therefore three times
+ * as wide as the input buffer.
+ * A starting row offset is provided only for the input buffer.  The caller
+ * can easily adjust the passed output_buf value to accommodate any row
+ * offset required on that side.
+ */
+
+METHODDEF(void)
+ycc_rgb_convert (j_decompress_ptr cinfo,
+		 JSAMPIMAGE input_buf, JDIMENSION input_row,
+		 JSAMPARRAY output_buf, int num_rows)
+{
+  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
+  register int y, cb, cr;
+  register JSAMPROW outptr;
+  register JSAMPROW inptr0, inptr1, inptr2;
+  register JDIMENSION col;
+  JDIMENSION num_cols = cinfo->output_width;
+  /* copy these pointers into registers if possible */
+  register JSAMPLE * range_limit = cinfo->sample_range_limit;
+  register int * Crrtab = cconvert->Cr_r_tab;
+  register int * Cbbtab = cconvert->Cb_b_tab;
+  register INT32 * Crgtab = cconvert->Cr_g_tab;
+  register INT32 * Cbgtab = cconvert->Cb_g_tab;
+  SHIFT_TEMPS
+
+  while (--num_rows >= 0) {
+    inptr0 = input_buf[0][input_row];
+    inptr1 = input_buf[1][input_row];
+    inptr2 = input_buf[2][input_row];
+    input_row++;
+    outptr = *output_buf++;
+    for (col = 0; col < num_cols; col++) {
+      y  = GETJSAMPLE(inptr0[col]);
+      cb = GETJSAMPLE(inptr1[col]);
+      cr = GETJSAMPLE(inptr2[col]);
+      /* Range-limiting is essential due to noise introduced by DCT losses. */
+      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
+      outptr[RGB_GREEN] = range_limit[y +
+			      ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
+						 SCALEBITS))];
+      outptr[RGB_BLUE] =  range_limit[y + Cbbtab[cb]];
+      outptr += RGB_PIXELSIZE;
+    }
+  }
+}
+
+
+/**************** Cases other than YCbCr -> RGB **************/
+
+
+/*
+ * Color conversion for no colorspace change: just copy the data,
+ * converting from separate-planes to interleaved representation.
+ */
+
+METHODDEF(void)
+null_convert (j_decompress_ptr cinfo,
+	      JSAMPIMAGE input_buf, JDIMENSION input_row,
+	      JSAMPARRAY output_buf, int num_rows)
+{
+  register JSAMPROW inptr, outptr;
+  register JDIMENSION count;
+  register int num_components = cinfo->num_components;
+  JDIMENSION num_cols = cinfo->output_width;
+  int ci;
+
+  while (--num_rows >= 0) {
+    for (ci = 0; ci < num_components; ci++) {
+      inptr = input_buf[ci][input_row];
+      outptr = output_buf[0] + ci;
+      for (count = num_cols; count > 0; count--) {
+	*outptr = *inptr++;	/* needn't bother with GETJSAMPLE() here */
+	outptr += num_components;
+      }
+    }
+    input_row++;
+    output_buf++;
+  }
+}
+
+
+/*
+ * Color conversion for grayscale: just copy the data.
+ * This also works for YCbCr -> grayscale conversion, in which
+ * we just copy the Y (luminance) component and ignore chrominance.
+ */
+
+METHODDEF(void)
+grayscale_convert (j_decompress_ptr cinfo,
+		   JSAMPIMAGE input_buf, JDIMENSION input_row,
+		   JSAMPARRAY output_buf, int num_rows)
+{
+  jcopy_sample_rows(input_buf[0], (int) input_row, output_buf, 0,
+		    num_rows, cinfo->output_width);
+}
+
+
+/*
+ * Convert grayscale to RGB: just duplicate the graylevel three times.
+ * This is provided to support applications that don't want to cope
+ * with grayscale as a separate case.
+ */
+
+METHODDEF(void)
+gray_rgb_convert (j_decompress_ptr cinfo,
+		  JSAMPIMAGE input_buf, JDIMENSION input_row,
+		  JSAMPARRAY output_buf, int num_rows)
+{
+  register JSAMPROW inptr, outptr;
+  register JDIMENSION col;
+  JDIMENSION num_cols = cinfo->output_width;
+
+  while (--num_rows >= 0) {
+    inptr = input_buf[0][input_row++];
+    outptr = *output_buf++;
+    for (col = 0; col < num_cols; col++) {
+      /* We can dispense with GETJSAMPLE() here */
+      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
+      outptr += RGB_PIXELSIZE;
+    }
+  }
+}
+
+
+/*
+ * Adobe-style YCCK->CMYK conversion.
+ * We convert YCbCr to R=1-C, G=1-M, and B=1-Y using the same
+ * conversion as above, while passing K (black) unchanged.
+ * We assume build_ycc_rgb_table has been called.
+ */
+
+METHODDEF(void)
+ycck_cmyk_convert (j_decompress_ptr cinfo,
+		   JSAMPIMAGE input_buf, JDIMENSION input_row,
+		   JSAMPARRAY output_buf, int num_rows)
+{
+  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
+  register int y, cb, cr;
+  register JSAMPROW outptr;
+  register JSAMPROW inptr0, inptr1, inptr2, inptr3;
+  register JDIMENSION col;
+  JDIMENSION num_cols = cinfo->output_width;
+  /* copy these pointers into registers if possible */
+  register JSAMPLE * range_limit = cinfo->sample_range_limit;
+  register int * Crrtab = cconvert->Cr_r_tab;
+  register int * Cbbtab = cconvert->Cb_b_tab;
+  register INT32 * Crgtab = cconvert->Cr_g_tab;
+  register INT32 * Cbgtab = cconvert->Cb_g_tab;
+  SHIFT_TEMPS
+
+  while (--num_rows >= 0) {
+    inptr0 = input_buf[0][input_row];
+    inptr1 = input_buf[1][input_row];
+    inptr2 = input_buf[2][input_row];
+    inptr3 = input_buf[3][input_row];
+    input_row++;
+    outptr = *output_buf++;
+    for (col = 0; col < num_cols; col++) {
+      y  = GETJSAMPLE(inptr0[col]);
+      cb = GETJSAMPLE(inptr1[col]);
+      cr = GETJSAMPLE(inptr2[col]);
+      /* Range-limiting is essential due to noise introduced by DCT losses. */
+      outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])];	/* red */
+      outptr[1] = range_limit[MAXJSAMPLE - (y +			/* green */
+			      ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
+						 SCALEBITS)))];
+      outptr[2] = range_limit[MAXJSAMPLE - (y + Cbbtab[cb])];	/* blue */
+      /* K passes through unchanged */
+      outptr[3] = inptr3[col];	/* don't need GETJSAMPLE here */
+      outptr += 4;
+    }
+  }
+}
+
+
+/*
+ * Empty method for start_pass.
+ */
+
+METHODDEF(void)
+start_pass_dcolor (j_decompress_ptr cinfo)
+{
+  /* no work needed */
+}
+
+
+/*
+ * Module initialization routine for output colorspace conversion.
+ */
+
+GLOBAL(void)
+jinit_color_deconverter (j_decompress_ptr cinfo)
+{
+  my_cconvert_ptr cconvert;
+  int ci;
+
+  cconvert = (my_cconvert_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_color_deconverter));
+  cinfo->cconvert = (struct jpeg_color_deconverter *) cconvert;
+  cconvert->pub.start_pass = start_pass_dcolor;
+
+  /* Make sure num_components agrees with jpeg_color_space */
+  switch (cinfo->jpeg_color_space) {
+  case JCS_GRAYSCALE:
+    if (cinfo->num_components != 1)
+      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
+    break;
+
+  case JCS_RGB:
+  case JCS_YCbCr:
+    if (cinfo->num_components != 3)
+      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
+    break;
+
+  case JCS_CMYK:
+  case JCS_YCCK:
+    if (cinfo->num_components != 4)
+      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
+    break;
+
+  default:			/* JCS_UNKNOWN can be anything */
+    if (cinfo->num_components < 1)
+      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
+    break;
+  }
+
+  /* Set out_color_components and conversion method based on requested space.
+   * Also clear the component_needed flags for any unused components,
+   * so that earlier pipeline stages can avoid useless computation.
+   */
+
+  switch (cinfo->out_color_space) {
+  case JCS_GRAYSCALE:
+    cinfo->out_color_components = 1;
+    if (cinfo->jpeg_color_space == JCS_GRAYSCALE ||
+	cinfo->jpeg_color_space == JCS_YCbCr) {
+      cconvert->pub.color_convert = grayscale_convert;
+      /* For color->grayscale conversion, only the Y (0) component is needed */
+      for (ci = 1; ci < cinfo->num_components; ci++)
+	cinfo->comp_info[ci].component_needed = FALSE;
+    } else
+      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
+    break;
+
+  case JCS_RGB:
+    cinfo->out_color_components = RGB_PIXELSIZE;
+    if (cinfo->jpeg_color_space == JCS_YCbCr) {
+      cconvert->pub.color_convert = ycc_rgb_convert;
+      build_ycc_rgb_table(cinfo);
+    } else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) {
+      cconvert->pub.color_convert = gray_rgb_convert;
+    } else if (cinfo->jpeg_color_space == JCS_RGB && RGB_PIXELSIZE == 3) {
+      cconvert->pub.color_convert = null_convert;
+    } else
+      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
+    break;
+
+  case JCS_CMYK:
+    cinfo->out_color_components = 4;
+    if (cinfo->jpeg_color_space == JCS_YCCK) {
+      cconvert->pub.color_convert = ycck_cmyk_convert;
+      build_ycc_rgb_table(cinfo);
+    } else if (cinfo->jpeg_color_space == JCS_CMYK) {
+      cconvert->pub.color_convert = null_convert;
+    } else
+      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
+    break;
+
+  default:
+    /* Permit null conversion to same output space */
+    if (cinfo->out_color_space == cinfo->jpeg_color_space) {
+      cinfo->out_color_components = cinfo->num_components;
+      cconvert->pub.color_convert = null_convert;
+    } else			/* unsupported non-null conversion */
+      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
+    break;
+  }
+
+  if (cinfo->quantize_colors)
+    cinfo->output_components = 1; /* single colormapped output component */
+  else
+    cinfo->output_components = cinfo->out_color_components;
+}
diff --git a/samples/jpeglib/jdct.h b/samples/jpeglib/jdct.h
new file mode 100644
index 0000000..04192a2
--- /dev/null
+++ b/samples/jpeglib/jdct.h
@@ -0,0 +1,176 @@
+/*
+ * jdct.h
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This include file contains common declarations for the forward and
+ * inverse DCT modules.  These declarations are private to the DCT managers
+ * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
+ * The individual DCT algorithms are kept in separate files to ease 
+ * machine-dependent tuning (e.g., assembly coding).
+ */
+
+
+/*
+ * A forward DCT routine is given a pointer to a work area of type DCTELEM[];
+ * the DCT is to be performed in-place in that buffer.  Type DCTELEM is int
+ * for 8-bit samples, INT32 for 12-bit samples.  (NOTE: Floating-point DCT
+ * implementations use an array of type FAST_FLOAT, instead.)
+ * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE).
+ * The DCT outputs are returned scaled up by a factor of 8; they therefore
+ * have a range of +-8K for 8-bit data, +-128K for 12-bit data.  This
+ * convention improves accuracy in integer implementations and saves some
+ * work in floating-point ones.
+ * Quantization of the output coefficients is done by jcdctmgr.c.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+typedef int DCTELEM;		/* 16 or 32 bits is fine */
+#else
+typedef INT32 DCTELEM;		/* must have 32 bits */
+#endif
+
+typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data));
+typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data));
+
+
+/*
+ * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer
+ * to an output sample array.  The routine must dequantize the input data as
+ * well as perform the IDCT; for dequantization, it uses the multiplier table
+ * pointed to by compptr->dct_table.  The output data is to be placed into the
+ * sample array starting at a specified column.  (Any row offset needed will
+ * be applied to the array pointer before it is passed to the IDCT code.)
+ * Note that the number of samples emitted by the IDCT routine is
+ * DCT_scaled_size * DCT_scaled_size.
+ */
+
+/* typedef inverse_DCT_method_ptr is declared in jpegint.h */
+
+/*
+ * Each IDCT routine has its own ideas about the best dct_table element type.
+ */
+
+typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */
+#if BITS_IN_JSAMPLE == 8
+typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */
+#define IFAST_SCALE_BITS  2	/* fractional bits in scale factors */
+#else
+typedef INT32 IFAST_MULT_TYPE;	/* need 32 bits for scaled quantizers */
+#define IFAST_SCALE_BITS  13	/* fractional bits in scale factors */
+#endif
+typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
+
+
+/*
+ * Each IDCT routine is responsible for range-limiting its results and
+ * converting them to unsigned form (0..MAXJSAMPLE).  The raw outputs could
+ * be quite far out of range if the input data is corrupt, so a bulletproof
+ * range-limiting step is required.  We use a mask-and-table-lookup method
+ * to do the combined operations quickly.  See the comments with
+ * prepare_range_limit_table (in jdmaster.c) for more info.
+ */
+
+#define IDCT_range_limit(cinfo)  ((cinfo)->sample_range_limit + CENTERJSAMPLE)
+
+#define RANGE_MASK  (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */
+
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jpeg_fdct_islow		jFDislow
+#define jpeg_fdct_ifast		jFDifast
+#define jpeg_fdct_float		jFDfloat
+#define jpeg_idct_islow		jRDislow
+#define jpeg_idct_ifast		jRDifast
+#define jpeg_idct_float		jRDfloat
+#define jpeg_idct_4x4		jRD4x4
+#define jpeg_idct_2x2		jRD2x2
+#define jpeg_idct_1x1		jRD1x1
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+/* Extern declarations for the forward and inverse DCT routines. */
+
+EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data));
+EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data));
+EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data));
+
+EXTERN(void) jpeg_idct_islow
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_ifast
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_float
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_4x4
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_2x2
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_1x1
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+
+
+/*
+ * Macros for handling fixed-point arithmetic; these are used by many
+ * but not all of the DCT/IDCT modules.
+ *
+ * All values are expected to be of type INT32.
+ * Fractional constants are scaled left by CONST_BITS bits.
+ * CONST_BITS is defined within each module using these macros,
+ * and may differ from one module to the next.
+ */
+
+#define ONE	((INT32) 1)
+#define CONST_SCALE (ONE << CONST_BITS)
+
+/* Convert a positive real constant to an integer scaled by CONST_SCALE.
+ * Caution: some C compilers fail to reduce "FIX(constant)" at compile time,
+ * thus causing a lot of useless floating-point operations at run time.
+ */
+
+#define FIX(x)	((INT32) ((x) * CONST_SCALE + 0.5))
+
+/* Descale and correctly round an INT32 value that's scaled by N bits.
+ * We assume RIGHT_SHIFT rounds towards minus infinity, so adding
+ * the fudge factor is correct for either sign of X.
+ */
+
+#define DESCALE(x,n)  RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
+
+/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
+ * This macro is used only when the two inputs will actually be no more than
+ * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a
+ * full 32x32 multiply.  This provides a useful speedup on many machines.
+ * Unfortunately there is no way to specify a 16x16->32 multiply portably
+ * in C, but some C compilers will do the right thing if you provide the
+ * correct combination of casts.
+ */
+
+#ifdef SHORTxSHORT_32		/* may work if 'int' is 32 bits */
+#define MULTIPLY16C16(var,const)  (((INT16) (var)) * ((INT16) (const)))
+#endif
+#ifdef SHORTxLCONST_32		/* known to work with Microsoft C 6.0 */
+#define MULTIPLY16C16(var,const)  (((INT16) (var)) * ((INT32) (const)))
+#endif
+
+#ifndef MULTIPLY16C16		/* default definition */
+#define MULTIPLY16C16(var,const)  ((var) * (const))
+#endif
+
+/* Same except both inputs are variables. */
+
+#ifdef SHORTxSHORT_32		/* may work if 'int' is 32 bits */
+#define MULTIPLY16V16(var1,var2)  (((INT16) (var1)) * ((INT16) (var2)))
+#endif
+
+#ifndef MULTIPLY16V16		/* default definition */
+#define MULTIPLY16V16(var1,var2)  ((var1) * (var2))
+#endif
diff --git a/samples/jpeglib/jddctmgr.c b/samples/jpeglib/jddctmgr.c
new file mode 100644
index 0000000..bbf8d0e
--- /dev/null
+++ b/samples/jpeglib/jddctmgr.c
@@ -0,0 +1,269 @@
+/*
+ * jddctmgr.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains the inverse-DCT management logic.
+ * This code selects a particular IDCT implementation to be used,
+ * and it performs related housekeeping chores.  No code in this file
+ * is executed per IDCT step, only during output pass setup.
+ *
+ * Note that the IDCT routines are responsible for performing coefficient
+ * dequantization as well as the IDCT proper.  This module sets up the
+ * dequantization multiplier table needed by the IDCT routine.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdct.h"		/* Private declarations for DCT subsystem */
+
+
+/*
+ * The decompressor input side (jdinput.c) saves away the appropriate
+ * quantization table for each component at the start of the first scan
+ * involving that component.  (This is necessary in order to correctly
+ * decode files that reuse Q-table slots.)
+ * When we are ready to make an output pass, the saved Q-table is converted
+ * to a multiplier table that will actually be used by the IDCT routine.
+ * The multiplier table contents are IDCT-method-dependent.  To support
+ * application changes in IDCT method between scans, we can remake the
+ * multiplier tables if necessary.
+ * In buffered-image mode, the first output pass may occur before any data
+ * has been seen for some components, and thus before their Q-tables have
+ * been saved away.  To handle this case, multiplier tables are preset
+ * to zeroes; the result of the IDCT will be a neutral gray level.
+ */
+
+
+/* Private subobject for this module */
+
+typedef struct {
+  struct jpeg_inverse_dct pub;	/* public fields */
+
+  /* This array contains the IDCT method code that each multiplier table
+   * is currently set up for, or -1 if it's not yet set up.
+   * The actual multiplier tables are pointed to by dct_table in the
+   * per-component comp_info structures.
+   */
+  int cur_method[MAX_COMPONENTS];
+} my_idct_controller;
+
+typedef my_idct_controller * my_idct_ptr;
+
+
+/* Allocated multiplier tables: big enough for any supported variant */
+
+typedef union {
+  ISLOW_MULT_TYPE islow_array[DCTSIZE2];
+#ifdef DCT_IFAST_SUPPORTED
+  IFAST_MULT_TYPE ifast_array[DCTSIZE2];
+#endif
+#ifdef DCT_FLOAT_SUPPORTED
+  FLOAT_MULT_TYPE float_array[DCTSIZE2];
+#endif
+} multiplier_table;
+
+
+/* The current scaled-IDCT routines require ISLOW-style multiplier tables,
+ * so be sure to compile that code if either ISLOW or SCALING is requested.
+ */
+#ifdef DCT_ISLOW_SUPPORTED
+#define PROVIDE_ISLOW_TABLES
+#else
+#ifdef IDCT_SCALING_SUPPORTED
+#define PROVIDE_ISLOW_TABLES
+#endif
+#endif
+
+
+/*
+ * Prepare for an output pass.
+ * Here we select the proper IDCT routine for each component and build
+ * a matching multiplier table.
+ */
+
+METHODDEF(void)
+start_pass (j_decompress_ptr cinfo)
+{
+  my_idct_ptr idct = (my_idct_ptr) cinfo->idct;
+  int ci, i;
+  jpeg_component_info *compptr;
+  int method = 0;
+  inverse_DCT_method_ptr method_ptr = NULL;
+  JQUANT_TBL * qtbl;
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* Select the proper IDCT routine for this component's scaling */
+    switch (compptr->DCT_scaled_size) {
+#ifdef IDCT_SCALING_SUPPORTED
+    case 1:
+      method_ptr = jpeg_idct_1x1;
+      method = JDCT_ISLOW;	/* jidctred uses islow-style table */
+      break;
+    case 2:
+      method_ptr = jpeg_idct_2x2;
+      method = JDCT_ISLOW;	/* jidctred uses islow-style table */
+      break;
+    case 4:
+      method_ptr = jpeg_idct_4x4;
+      method = JDCT_ISLOW;	/* jidctred uses islow-style table */
+      break;
+#endif
+    case DCTSIZE:
+      switch (cinfo->dct_method) {
+#ifdef DCT_ISLOW_SUPPORTED
+      case JDCT_ISLOW:
+	method_ptr = jpeg_idct_islow;
+	method = JDCT_ISLOW;
+	break;
+#endif
+#ifdef DCT_IFAST_SUPPORTED
+      case JDCT_IFAST:
+	method_ptr = jpeg_idct_ifast;
+	method = JDCT_IFAST;
+	break;
+#endif
+#ifdef DCT_FLOAT_SUPPORTED
+      case JDCT_FLOAT:
+	method_ptr = jpeg_idct_float;
+	method = JDCT_FLOAT;
+	break;
+#endif
+      default:
+	ERREXIT(cinfo, JERR_NOT_COMPILED);
+	break;
+      }
+      break;
+    default:
+      ERREXIT1(cinfo, JERR_BAD_DCTSIZE, compptr->DCT_scaled_size);
+      break;
+    }
+    idct->pub.inverse_DCT[ci] = method_ptr;
+    /* Create multiplier table from quant table.
+     * However, we can skip this if the component is uninteresting
+     * or if we already built the table.  Also, if no quant table
+     * has yet been saved for the component, we leave the
+     * multiplier table all-zero; we'll be reading zeroes from the
+     * coefficient controller's buffer anyway.
+     */
+    if (! compptr->component_needed || idct->cur_method[ci] == method)
+      continue;
+    qtbl = compptr->quant_table;
+    if (qtbl == NULL)		/* happens if no data yet for component */
+      continue;
+    idct->cur_method[ci] = method;
+    switch (method) {
+#ifdef PROVIDE_ISLOW_TABLES
+    case JDCT_ISLOW:
+      {
+	/* For LL&M IDCT method, multipliers are equal to raw quantization
+	 * coefficients, but are stored as ints to ensure access efficiency.
+	 */
+	ISLOW_MULT_TYPE * ismtbl = (ISLOW_MULT_TYPE *) compptr->dct_table;
+	for (i = 0; i < DCTSIZE2; i++) {
+	  ismtbl[i] = (ISLOW_MULT_TYPE) qtbl->quantval[i];
+	}
+      }
+      break;
+#endif
+#ifdef DCT_IFAST_SUPPORTED
+    case JDCT_IFAST:
+      {
+	/* For AA&N IDCT method, multipliers are equal to quantization
+	 * coefficients scaled by scalefactor[row]*scalefactor[col], where
+	 *   scalefactor[0] = 1
+	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7
+	 * For integer operation, the multiplier table is to be scaled by
+	 * IFAST_SCALE_BITS.
+	 */
+	IFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table;
+#define CONST_BITS 14
+	static const INT16 aanscales[DCTSIZE2] = {
+	  /* precomputed values scaled up by 14 bits */
+	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
+	  22725, 31521, 29692, 26722, 22725, 17855, 12299,  6270,
+	  21407, 29692, 27969, 25172, 21407, 16819, 11585,  5906,
+	  19266, 26722, 25172, 22654, 19266, 15137, 10426,  5315,
+	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
+	  12873, 17855, 16819, 15137, 12873, 10114,  6967,  3552,
+	   8867, 12299, 11585, 10426,  8867,  6967,  4799,  2446,
+	   4520,  6270,  5906,  5315,  4520,  3552,  2446,  1247
+	};
+	SHIFT_TEMPS
+
+	for (i = 0; i < DCTSIZE2; i++) {
+	  ifmtbl[i] = (IFAST_MULT_TYPE)
+	    DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i],
+				  (INT32) aanscales[i]),
+		    CONST_BITS-IFAST_SCALE_BITS);
+	}
+      }
+      break;
+#endif
+#ifdef DCT_FLOAT_SUPPORTED
+    case JDCT_FLOAT:
+      {
+	/* For float AA&N IDCT method, multipliers are equal to quantization
+	 * coefficients scaled by scalefactor[row]*scalefactor[col], where
+	 *   scalefactor[0] = 1
+	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7
+	 */
+	FLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table;
+	int row, col;
+	static const double aanscalefactor[DCTSIZE] = {
+	  1.0, 1.387039845, 1.306562965, 1.175875602,
+	  1.0, 0.785694958, 0.541196100, 0.275899379
+	};
+
+	i = 0;
+	for (row = 0; row < DCTSIZE; row++) {
+	  for (col = 0; col < DCTSIZE; col++) {
+	    fmtbl[i] = (FLOAT_MULT_TYPE)
+	      ((double) qtbl->quantval[i] *
+	       aanscalefactor[row] * aanscalefactor[col]);
+	    i++;
+	  }
+	}
+      }
+      break;
+#endif
+    default:
+      ERREXIT(cinfo, JERR_NOT_COMPILED);
+      break;
+    }
+  }
+}
+
+
+/*
+ * Initialize IDCT manager.
+ */
+
+GLOBAL(void)
+jinit_inverse_dct (j_decompress_ptr cinfo)
+{
+  my_idct_ptr idct;
+  int ci;
+  jpeg_component_info *compptr;
+
+  idct = (my_idct_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_idct_controller));
+  cinfo->idct = (struct jpeg_inverse_dct *) idct;
+  idct->pub.start_pass = start_pass;
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* Allocate and pre-zero a multiplier table for each component */
+    compptr->dct_table =
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  SIZEOF(multiplier_table));
+    MEMZERO(compptr->dct_table, SIZEOF(multiplier_table));
+    /* Mark multiplier table not yet set up for any method */
+    idct->cur_method[ci] = -1;
+  }
+}
diff --git a/samples/jpeglib/jdhuff.c b/samples/jpeglib/jdhuff.c
new file mode 100644
index 0000000..b5ba39f
--- /dev/null
+++ b/samples/jpeglib/jdhuff.c
@@ -0,0 +1,651 @@
+/*
+ * jdhuff.c
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains Huffman entropy decoding routines.
+ *
+ * Much of the complexity here has to do with supporting input suspension.
+ * If the data source module demands suspension, we want to be able to back
+ * up to the start of the current MCU.  To do this, we copy state variables
+ * into local working storage, and update them back to the permanent
+ * storage only upon successful completion of an MCU.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdhuff.h"		/* Declarations shared with jdphuff.c */
+
+
+/*
+ * Expanded entropy decoder object for Huffman decoding.
+ *
+ * The savable_state subrecord contains fields that change within an MCU,
+ * but must not be updated permanently until we complete the MCU.
+ */
+
+typedef struct {
+  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
+} savable_state;
+
+/* This macro is to work around compilers with missing or broken
+ * structure assignment.  You'll need to fix this code if you have
+ * such a compiler and you change MAX_COMPS_IN_SCAN.
+ */
+
+#ifndef NO_STRUCT_ASSIGN
+#define ASSIGN_STATE(dest,src)  ((dest) = (src))
+#else
+#if MAX_COMPS_IN_SCAN == 4
+#define ASSIGN_STATE(dest,src)  \
+	((dest).last_dc_val[0] = (src).last_dc_val[0], \
+	 (dest).last_dc_val[1] = (src).last_dc_val[1], \
+	 (dest).last_dc_val[2] = (src).last_dc_val[2], \
+	 (dest).last_dc_val[3] = (src).last_dc_val[3])
+#endif
+#endif
+
+
+typedef struct {
+  struct jpeg_entropy_decoder pub; /* public fields */
+
+  /* These fields are loaded into local variables at start of each MCU.
+   * In case of suspension, we exit WITHOUT updating them.
+   */
+  bitread_perm_state bitstate;	/* Bit buffer at start of MCU */
+  savable_state saved;		/* Other state at start of MCU */
+
+  /* These fields are NOT loaded into local working state. */
+  unsigned int restarts_to_go;	/* MCUs left in this restart interval */
+
+  /* Pointers to derived tables (these workspaces have image lifespan) */
+  d_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS];
+  d_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS];
+
+  /* Precalculated info set up by start_pass for use in decode_mcu: */
+
+  /* Pointers to derived tables to be used for each block within an MCU */
+  d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU];
+  d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU];
+  /* Whether we care about the DC and AC coefficient values for each block */
+  boolean dc_needed[D_MAX_BLOCKS_IN_MCU];
+  boolean ac_needed[D_MAX_BLOCKS_IN_MCU];
+} huff_entropy_decoder;
+
+typedef huff_entropy_decoder * huff_entropy_ptr;
+
+
+/*
+ * Initialize for a Huffman-compressed scan.
+ */
+
+METHODDEF(void)
+start_pass_huff_decoder (j_decompress_ptr cinfo)
+{
+  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+  int ci, blkn, dctbl, actbl;
+  jpeg_component_info * compptr;
+
+  /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG.
+   * This ought to be an error condition, but we make it a warning because
+   * there are some baseline files out there with all zeroes in these bytes.
+   */
+  if (cinfo->Ss != 0 || cinfo->Se != DCTSIZE2-1 ||
+      cinfo->Ah != 0 || cinfo->Al != 0)
+    WARNMS(cinfo, JWRN_NOT_SEQUENTIAL);
+
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    compptr = cinfo->cur_comp_info[ci];
+    dctbl = compptr->dc_tbl_no;
+    actbl = compptr->ac_tbl_no;
+    /* Compute derived values for Huffman tables */
+    /* We may do this more than once for a table, but it's not expensive */
+    jpeg_make_d_derived_tbl(cinfo, TRUE, dctbl,
+			    & entropy->dc_derived_tbls[dctbl]);
+    jpeg_make_d_derived_tbl(cinfo, FALSE, actbl,
+			    & entropy->ac_derived_tbls[actbl]);
+    /* Initialize DC predictions to 0 */
+    entropy->saved.last_dc_val[ci] = 0;
+  }
+
+  /* Precalculate decoding info for each block in an MCU of this scan */
+  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+    ci = cinfo->MCU_membership[blkn];
+    compptr = cinfo->cur_comp_info[ci];
+    /* Precalculate which table to use for each block */
+    entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no];
+    entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no];
+    /* Decide whether we really care about the coefficient values */
+    if (compptr->component_needed) {
+      entropy->dc_needed[blkn] = TRUE;
+      /* we don't need the ACs if producing a 1/8th-size image */
+      entropy->ac_needed[blkn] = (compptr->DCT_scaled_size > 1);
+    } else {
+      entropy->dc_needed[blkn] = entropy->ac_needed[blkn] = FALSE;
+    }
+  }
+
+  /* Initialize bitread state variables */
+  entropy->bitstate.bits_left = 0;
+  entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
+  entropy->pub.insufficient_data = FALSE;
+
+  /* Initialize restart counter */
+  entropy->restarts_to_go = cinfo->restart_interval;
+}
+
+
+/*
+ * Compute the derived values for a Huffman table.
+ * This routine also performs some validation checks on the table.
+ *
+ * Note this is also used by jdphuff.c.
+ */
+
+GLOBAL(void)
+jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
+			 d_derived_tbl ** pdtbl)
+{
+  JHUFF_TBL *htbl;
+  d_derived_tbl *dtbl;
+  int p, i, l, si, numsymbols;
+  int lookbits, ctr;
+  char huffsize[257];
+  unsigned int huffcode[257];
+  unsigned int code;
+
+  /* Note that huffsize[] and huffcode[] are filled in code-length order,
+   * paralleling the order of the symbols themselves in htbl->huffval[].
+   */
+
+  /* Find the input Huffman table */
+  if (tblno < 0 || tblno >= NUM_HUFF_TBLS)
+    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);
+  htbl =
+    isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno];
+  if (htbl == NULL)
+    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);
+
+  /* Allocate a workspace if we haven't already done so. */
+  if (*pdtbl == NULL)
+    *pdtbl = (d_derived_tbl *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  SIZEOF(d_derived_tbl));
+  dtbl = *pdtbl;
+  dtbl->pub = htbl;		/* fill in back link */
+  
+  /* Figure C.1: make table of Huffman code length for each symbol */
+
+  p = 0;
+  for (l = 1; l <= 16; l++) {
+    i = (int) htbl->bits[l];
+    if (i < 0 || p + i > 256)	/* protect against table overrun */
+      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+    while (i--)
+      huffsize[p++] = (char) l;
+  }
+  huffsize[p] = 0;
+  numsymbols = p;
+  
+  /* Figure C.2: generate the codes themselves */
+  /* We also validate that the counts represent a legal Huffman code tree. */
+  
+  code = 0;
+  si = huffsize[0];
+  p = 0;
+  while (huffsize[p]) {
+    while (((int) huffsize[p]) == si) {
+      huffcode[p++] = code;
+      code++;
+    }
+    /* code is now 1 more than the last code used for codelength si; but
+     * it must still fit in si bits, since no code is allowed to be all ones.
+     */
+    if (((INT32) code) >= (((INT32) 1) << si))
+      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+    code <<= 1;
+    si++;
+  }
+
+  /* Figure F.15: generate decoding tables for bit-sequential decoding */
+
+  p = 0;
+  for (l = 1; l <= 16; l++) {
+    if (htbl->bits[l]) {
+      /* valoffset[l] = huffval[] index of 1st symbol of code length l,
+       * minus the minimum code of length l
+       */
+      dtbl->valoffset[l] = (INT32) p - (INT32) huffcode[p];
+      p += htbl->bits[l];
+      dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */
+    } else {
+      dtbl->maxcode[l] = -1;	/* -1 if no codes of this length */
+    }
+  }
+  dtbl->maxcode[17] = 0xFFFFFL; /* ensures jpeg_huff_decode terminates */
+
+  /* Compute lookahead tables to speed up decoding.
+   * First we set all the table entries to 0, indicating "too long";
+   * then we iterate through the Huffman codes that are short enough and
+   * fill in all the entries that correspond to bit sequences starting
+   * with that code.
+   */
+
+  MEMZERO(dtbl->look_nbits, SIZEOF(dtbl->look_nbits));
+
+  p = 0;
+  for (l = 1; l <= HUFF_LOOKAHEAD; l++) {
+    for (i = 1; i <= (int) htbl->bits[l]; i++, p++) {
+      /* l = current code's length, p = its index in huffcode[] & huffval[]. */
+      /* Generate left-justified code followed by all possible bit sequences */
+      lookbits = huffcode[p] << (HUFF_LOOKAHEAD-l);
+      for (ctr = 1 << (HUFF_LOOKAHEAD-l); ctr > 0; ctr--) {
+	dtbl->look_nbits[lookbits] = l;
+	dtbl->look_sym[lookbits] = htbl->huffval[p];
+	lookbits++;
+      }
+    }
+  }
+
+  /* Validate symbols as being reasonable.
+   * For AC tables, we make no check, but accept all byte values 0..255.
+   * For DC tables, we require the symbols to be in range 0..15.
+   * (Tighter bounds could be applied depending on the data depth and mode,
+   * but this is sufficient to ensure safe decoding.)
+   */
+  if (isDC) {
+    for (i = 0; i < numsymbols; i++) {
+      int sym = htbl->huffval[i];
+      if (sym < 0 || sym > 15)
+	ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+    }
+  }
+}
+
+
+/*
+ * Out-of-line code for bit fetching (shared with jdphuff.c).
+ * See jdhuff.h for info about usage.
+ * Note: current values of get_buffer and bits_left are passed as parameters,
+ * but are returned in the corresponding fields of the state struct.
+ *
+ * On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width
+ * of get_buffer to be used.  (On machines with wider words, an even larger
+ * buffer could be used.)  However, on some machines 32-bit shifts are
+ * quite slow and take time proportional to the number of places shifted.
+ * (This is true with most PC compilers, for instance.)  In this case it may
+ * be a win to set MIN_GET_BITS to the minimum value of 15.  This reduces the
+ * average shift distance at the cost of more calls to jpeg_fill_bit_buffer.
+ */
+
+#ifdef SLOW_SHIFT_32
+#define MIN_GET_BITS  15	/* minimum allowable value */
+#else
+#define MIN_GET_BITS  (BIT_BUF_SIZE-7)
+#endif
+
+
+GLOBAL(boolean)
+jpeg_fill_bit_buffer (bitread_working_state * state,
+		      register bit_buf_type get_buffer, register int bits_left,
+		      int nbits)
+/* Load up the bit buffer to a depth of at least nbits */
+{
+  /* Copy heavily used state fields into locals (hopefully registers) */
+  register const JOCTET * next_input_byte = state->next_input_byte;
+  register size_t bytes_in_buffer = state->bytes_in_buffer;
+  j_decompress_ptr cinfo = state->cinfo;
+
+  /* Attempt to load at least MIN_GET_BITS bits into get_buffer. */
+  /* (It is assumed that no request will be for more than that many bits.) */
+  /* We fail to do so only if we hit a marker or are forced to suspend. */
+
+  if (cinfo->unread_marker == 0) {	/* cannot advance past a marker */
+    while (bits_left < MIN_GET_BITS) {
+      register int c;
+
+      /* Attempt to read a byte */
+      if (bytes_in_buffer == 0) {
+	if (! (*cinfo->src->fill_input_buffer) (cinfo))
+	  return FALSE;
+	next_input_byte = cinfo->src->next_input_byte;
+	bytes_in_buffer = cinfo->src->bytes_in_buffer;
+      }
+      bytes_in_buffer--;
+      c = GETJOCTET(*next_input_byte++);
+
+      /* If it's 0xFF, check and discard stuffed zero byte */
+      if (c == 0xFF) {
+	/* Loop here to discard any padding FF's on terminating marker,
+	 * so that we can save a valid unread_marker value.  NOTE: we will
+	 * accept multiple FF's followed by a 0 as meaning a single FF data
+	 * byte.  This data pattern is not valid according to the standard.
+	 */
+	do {
+	  if (bytes_in_buffer == 0) {
+	    if (! (*cinfo->src->fill_input_buffer) (cinfo))
+	      return FALSE;
+	    next_input_byte = cinfo->src->next_input_byte;
+	    bytes_in_buffer = cinfo->src->bytes_in_buffer;
+	  }
+	  bytes_in_buffer--;
+	  c = GETJOCTET(*next_input_byte++);
+	} while (c == 0xFF);
+
+	if (c == 0) {
+	  /* Found FF/00, which represents an FF data byte */
+	  c = 0xFF;
+	} else {
+	  /* Oops, it's actually a marker indicating end of compressed data.
+	   * Save the marker code for later use.
+	   * Fine point: it might appear that we should save the marker into
+	   * bitread working state, not straight into permanent state.  But
+	   * once we have hit a marker, we cannot need to suspend within the
+	   * current MCU, because we will read no more bytes from the data
+	   * source.  So it is OK to update permanent state right away.
+	   */
+	  cinfo->unread_marker = c;
+	  /* See if we need to insert some fake zero bits. */
+	  goto no_more_bytes;
+	}
+      }
+
+      /* OK, load c into get_buffer */
+      get_buffer = (get_buffer << 8) | c;
+      bits_left += 8;
+    } /* end while */
+  } else {
+  no_more_bytes:
+    /* We get here if we've read the marker that terminates the compressed
+     * data segment.  There should be enough bits in the buffer register
+     * to satisfy the request; if so, no problem.
+     */
+    if (nbits > bits_left) {
+      /* Uh-oh.  Report corrupted data to user and stuff zeroes into
+       * the data stream, so that we can produce some kind of image.
+       * We use a nonvolatile flag to ensure that only one warning message
+       * appears per data segment.
+       */
+      if (! cinfo->entropy->insufficient_data) {
+	WARNMS(cinfo, JWRN_HIT_MARKER);
+	cinfo->entropy->insufficient_data = TRUE;
+      }
+      /* Fill the buffer with zero bits */
+      get_buffer <<= MIN_GET_BITS - bits_left;
+      bits_left = MIN_GET_BITS;
+    }
+  }
+
+  /* Unload the local registers */
+  state->next_input_byte = next_input_byte;
+  state->bytes_in_buffer = bytes_in_buffer;
+  state->get_buffer = get_buffer;
+  state->bits_left = bits_left;
+
+  return TRUE;
+}
+
+
+/*
+ * Out-of-line code for Huffman code decoding.
+ * See jdhuff.h for info about usage.
+ */
+
+GLOBAL(int)
+jpeg_huff_decode (bitread_working_state * state,
+		  register bit_buf_type get_buffer, register int bits_left,
+		  d_derived_tbl * htbl, int min_bits)
+{
+  register int l = min_bits;
+  register INT32 code;
+
+  /* HUFF_DECODE has determined that the code is at least min_bits */
+  /* bits long, so fetch that many bits in one swoop. */
+
+  CHECK_BIT_BUFFER(*state, l, return -1);
+  code = GET_BITS(l);
+
+  /* Collect the rest of the Huffman code one bit at a time. */
+  /* This is per Figure F.16 in the JPEG spec. */
+
+  while (code > htbl->maxcode[l]) {
+    code <<= 1;
+    CHECK_BIT_BUFFER(*state, 1, return -1);
+    code |= GET_BITS(1);
+    l++;
+  }
+
+  /* Unload the local registers */
+  state->get_buffer = get_buffer;
+  state->bits_left = bits_left;
+
+  /* With garbage input we may reach the sentinel value l = 17. */
+
+  if (l > 16) {
+    WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE);
+    return 0;			/* fake a zero as the safest result */
+  }
+
+  return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ];
+}
+
+
+/*
+ * Figure F.12: extend sign bit.
+ * On some machines, a shift and add will be faster than a table lookup.
+ */
+
+#ifdef AVOID_TABLES
+
+#define HUFF_EXTEND(x,s)  ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
+
+#else
+
+#define HUFF_EXTEND(x,s)  ((x) < extend_test[s] ? (x) + extend_offset[s] : (x))
+
+static const int extend_test[16] =   /* entry n is 2**(n-1) */
+  { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,
+    0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
+
+static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
+  { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
+    ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
+    ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
+    ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
+
+#endif /* AVOID_TABLES */
+
+
+/*
+ * Check for a restart marker & resynchronize decoder.
+ * Returns FALSE if must suspend.
+ */
+
+LOCAL(boolean)
+process_restart (j_decompress_ptr cinfo)
+{
+  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+  int ci;
+
+  /* Throw away any unused bits remaining in bit buffer; */
+  /* include any full bytes in next_marker's count of discarded bytes */
+  cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;
+  entropy->bitstate.bits_left = 0;
+
+  /* Advance past the RSTn marker */
+  if (! (*cinfo->marker->read_restart_marker) (cinfo))
+    return FALSE;
+
+  /* Re-initialize DC predictions to 0 */
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++)
+    entropy->saved.last_dc_val[ci] = 0;
+
+  /* Reset restart counter */
+  entropy->restarts_to_go = cinfo->restart_interval;
+
+  /* Reset out-of-data flag, unless read_restart_marker left us smack up
+   * against a marker.  In that case we will end up treating the next data
+   * segment as empty, and we can avoid producing bogus output pixels by
+   * leaving the flag set.
+   */
+  if (cinfo->unread_marker == 0)
+    entropy->pub.insufficient_data = FALSE;
+
+  return TRUE;
+}
+
+
+/*
+ * Decode and return one MCU's worth of Huffman-compressed coefficients.
+ * The coefficients are reordered from zigzag order into natural array order,
+ * but are not dequantized.
+ *
+ * The i'th block of the MCU is stored into the block pointed to by
+ * MCU_data[i].  WE ASSUME THIS AREA HAS BEEN ZEROED BY THE CALLER.
+ * (Wholesale zeroing is usually a little faster than retail...)
+ *
+ * Returns FALSE if data source requested suspension.  In that case no
+ * changes have been made to permanent state.  (Exception: some output
+ * coefficients may already have been assigned.  This is harmless for
+ * this module, since we'll just re-assign them on the next call.)
+ */
+
+METHODDEF(boolean)
+decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+  int blkn;
+  BITREAD_STATE_VARS;
+  savable_state state;
+
+  /* Process restart marker if needed; may have to suspend */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0)
+      if (! process_restart(cinfo))
+	return FALSE;
+  }
+
+  /* If we've run out of data, just leave the MCU set to zeroes.
+   * This way, we return uniform gray for the remainder of the segment.
+   */
+  if (! entropy->pub.insufficient_data) {
+
+    /* Load up working state */
+    BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+    ASSIGN_STATE(state, entropy->saved);
+
+    /* Outer loop handles each block in the MCU */
+
+    for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+      JBLOCKROW block = MCU_data[blkn];
+      d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn];
+      d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn];
+      register int s, k, r;
+
+      /* Decode a single block's worth of coefficients */
+
+      /* Section F.2.2.1: decode the DC coefficient difference */
+      HUFF_DECODE(s, br_state, dctbl, return FALSE, label1);
+      if (s) {
+	CHECK_BIT_BUFFER(br_state, s, return FALSE);
+	r = GET_BITS(s);
+	s = HUFF_EXTEND(r, s);
+      }
+
+      if (entropy->dc_needed[blkn]) {
+	/* Convert DC difference to actual value, update last_dc_val */
+	int ci = cinfo->MCU_membership[blkn];
+	s += state.last_dc_val[ci];
+	state.last_dc_val[ci] = s;
+	/* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */
+	(*block)[0] = (JCOEF) s;
+      }
+
+      if (entropy->ac_needed[blkn]) {
+
+	/* Section F.2.2.2: decode the AC coefficients */
+	/* Since zeroes are skipped, output area must be cleared beforehand */
+	for (k = 1; k < DCTSIZE2; k++) {
+	  HUFF_DECODE(s, br_state, actbl, return FALSE, label2);
+      
+	  r = s >> 4;
+	  s &= 15;
+      
+	  if (s) {
+	    k += r;
+	    CHECK_BIT_BUFFER(br_state, s, return FALSE);
+	    r = GET_BITS(s);
+	    s = HUFF_EXTEND(r, s);
+	    /* Output coefficient in natural (dezigzagged) order.
+	     * Note: the extra entries in jpeg_natural_order[] will save us
+	     * if k >= DCTSIZE2, which could happen if the data is corrupted.
+	     */
+	    (*block)[jpeg_natural_order[k]] = (JCOEF) s;
+	  } else {
+	    if (r != 15)
+	      break;
+	    k += 15;
+	  }
+	}
+
+      } else {
+
+	/* Section F.2.2.2: decode the AC coefficients */
+	/* In this path we just discard the values */
+	for (k = 1; k < DCTSIZE2; k++) {
+	  HUFF_DECODE(s, br_state, actbl, return FALSE, label3);
+      
+	  r = s >> 4;
+	  s &= 15;
+      
+	  if (s) {
+	    k += r;
+	    CHECK_BIT_BUFFER(br_state, s, return FALSE);
+	    DROP_BITS(s);
+	  } else {
+	    if (r != 15)
+	      break;
+	    k += 15;
+	  }
+	}
+
+      }
+    }
+
+    /* Completed MCU, so update state */
+    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
+    ASSIGN_STATE(entropy->saved, state);
+  }
+
+  /* Account for restart interval (no-op if not using restarts) */
+  entropy->restarts_to_go--;
+
+  return TRUE;
+}
+
+
+/*
+ * Module initialization routine for Huffman entropy decoding.
+ */
+
+GLOBAL(void)
+jinit_huff_decoder (j_decompress_ptr cinfo)
+{
+  huff_entropy_ptr entropy;
+  int i;
+
+  entropy = (huff_entropy_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(huff_entropy_decoder));
+  cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
+  entropy->pub.start_pass = start_pass_huff_decoder;
+  entropy->pub.decode_mcu = decode_mcu;
+
+  /* Mark tables unallocated */
+  for (i = 0; i < NUM_HUFF_TBLS; i++) {
+    entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
+  }
+}
diff --git a/samples/jpeglib/jdhuff.h b/samples/jpeglib/jdhuff.h
new file mode 100644
index 0000000..ae19b6c
--- /dev/null
+++ b/samples/jpeglib/jdhuff.h
@@ -0,0 +1,201 @@
+/*
+ * jdhuff.h
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains declarations for Huffman entropy decoding routines
+ * that are shared between the sequential decoder (jdhuff.c) and the
+ * progressive decoder (jdphuff.c).  No other modules need to see these.
+ */
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jpeg_make_d_derived_tbl	jMkDDerived
+#define jpeg_fill_bit_buffer	jFilBitBuf
+#define jpeg_huff_decode	jHufDecode
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+
+/* Derived data constructed for each Huffman table */
+
+#define HUFF_LOOKAHEAD	8	/* # of bits of lookahead */
+
+typedef struct {
+  /* Basic tables: (element [0] of each array is unused) */
+  INT32 maxcode[18];		/* largest code of length k (-1 if none) */
+  /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */
+  INT32 valoffset[17];		/* huffval[] offset for codes of length k */
+  /* valoffset[k] = huffval[] index of 1st symbol of code length k, less
+   * the smallest code of length k; so given a code of length k, the
+   * corresponding symbol is huffval[code + valoffset[k]]
+   */
+
+  /* Link to public Huffman table (needed only in jpeg_huff_decode) */
+  JHUFF_TBL *pub;
+
+  /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of
+   * the input data stream.  If the next Huffman code is no more
+   * than HUFF_LOOKAHEAD bits long, we can obtain its length and
+   * the corresponding symbol directly from these tables.
+   */
+  int look_nbits[1<<HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */
+  UINT8 look_sym[1<<HUFF_LOOKAHEAD]; /* symbol, or unused */
+} d_derived_tbl;
+
+/* Expand a Huffman table definition into the derived format */
+EXTERN(void) jpeg_make_d_derived_tbl
+	JPP((j_decompress_ptr cinfo, boolean isDC, int tblno,
+	     d_derived_tbl ** pdtbl));
+
+
+/*
+ * Fetching the next N bits from the input stream is a time-critical operation
+ * for the Huffman decoders.  We implement it with a combination of inline
+ * macros and out-of-line subroutines.  Note that N (the number of bits
+ * demanded at one time) never exceeds 15 for JPEG use.
+ *
+ * We read source bytes into get_buffer and dole out bits as needed.
+ * If get_buffer already contains enough bits, they are fetched in-line
+ * by the macros CHECK_BIT_BUFFER and GET_BITS.  When there aren't enough
+ * bits, jpeg_fill_bit_buffer is called; it will attempt to fill get_buffer
+ * as full as possible (not just to the number of bits needed; this
+ * prefetching reduces the overhead cost of calling jpeg_fill_bit_buffer).
+ * Note that jpeg_fill_bit_buffer may return FALSE to indicate suspension.
+ * On TRUE return, jpeg_fill_bit_buffer guarantees that get_buffer contains
+ * at least the requested number of bits --- dummy zeroes are inserted if
+ * necessary.
+ */
+
+typedef INT32 bit_buf_type;	/* type of bit-extraction buffer */
+#define BIT_BUF_SIZE  32	/* size of buffer in bits */
+
+/* If long is > 32 bits on your machine, and shifting/masking longs is
+ * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE
+ * appropriately should be a win.  Unfortunately we can't define the size
+ * with something like  #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8)
+ * because not all machines measure sizeof in 8-bit bytes.
+ */
+
+typedef struct {		/* Bitreading state saved across MCUs */
+  bit_buf_type get_buffer;	/* current bit-extraction buffer */
+  int bits_left;		/* # of unused bits in it */
+} bitread_perm_state;
+
+typedef struct {		/* Bitreading working state within an MCU */
+  /* Current data source location */
+  /* We need a copy, rather than munging the original, in case of suspension */
+  const JOCTET * next_input_byte; /* => next byte to read from source */
+  size_t bytes_in_buffer;	/* # of bytes remaining in source buffer */
+  /* Bit input buffer --- note these values are kept in register variables,
+   * not in this struct, inside the inner loops.
+   */
+  bit_buf_type get_buffer;	/* current bit-extraction buffer */
+  int bits_left;		/* # of unused bits in it */
+  /* Pointer needed by jpeg_fill_bit_buffer. */
+  j_decompress_ptr cinfo;	/* back link to decompress master record */
+} bitread_working_state;
+
+/* Macros to declare and load/save bitread local variables. */
+#define BITREAD_STATE_VARS  \
+	register bit_buf_type get_buffer;  \
+	register int bits_left;  \
+	bitread_working_state br_state
+
+#define BITREAD_LOAD_STATE(cinfop,permstate)  \
+	br_state.cinfo = cinfop; \
+	br_state.next_input_byte = cinfop->src->next_input_byte; \
+	br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \
+	get_buffer = permstate.get_buffer; \
+	bits_left = permstate.bits_left;
+
+#define BITREAD_SAVE_STATE(cinfop,permstate)  \
+	cinfop->src->next_input_byte = br_state.next_input_byte; \
+	cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \
+	permstate.get_buffer = get_buffer; \
+	permstate.bits_left = bits_left
+
+/*
+ * These macros provide the in-line portion of bit fetching.
+ * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer
+ * before using GET_BITS, PEEK_BITS, or DROP_BITS.
+ * The variables get_buffer and bits_left are assumed to be locals,
+ * but the state struct might not be (jpeg_huff_decode needs this).
+ *	CHECK_BIT_BUFFER(state,n,action);
+ *		Ensure there are N bits in get_buffer; if suspend, take action.
+ *      val = GET_BITS(n);
+ *		Fetch next N bits.
+ *      val = PEEK_BITS(n);
+ *		Fetch next N bits without removing them from the buffer.
+ *	DROP_BITS(n);
+ *		Discard next N bits.
+ * The value N should be a simple variable, not an expression, because it
+ * is evaluated multiple times.
+ */
+
+#define CHECK_BIT_BUFFER(state,nbits,action) \
+	{ if (bits_left < (nbits)) {  \
+	    if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits))  \
+	      { action; }  \
+	    get_buffer = (state).get_buffer; bits_left = (state).bits_left; } }
+
+#define GET_BITS(nbits) \
+	(((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1))
+
+#define PEEK_BITS(nbits) \
+	(((int) (get_buffer >> (bits_left -  (nbits)))) & ((1<<(nbits))-1))
+
+#define DROP_BITS(nbits) \
+	(bits_left -= (nbits))
+
+/* Load up the bit buffer to a depth of at least nbits */
+EXTERN(boolean) jpeg_fill_bit_buffer
+	JPP((bitread_working_state * state, register bit_buf_type get_buffer,
+	     register int bits_left, int nbits));
+
+
+/*
+ * Code for extracting next Huffman-coded symbol from input bit stream.
+ * Again, this is time-critical and we make the main paths be macros.
+ *
+ * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits
+ * without looping.  Usually, more than 95% of the Huffman codes will be 8
+ * or fewer bits long.  The few overlength codes are handled with a loop,
+ * which need not be inline code.
+ *
+ * Notes about the HUFF_DECODE macro:
+ * 1. Near the end of the data segment, we may fail to get enough bits
+ *    for a lookahead.  In that case, we do it the hard way.
+ * 2. If the lookahead table contains no entry, the next code must be
+ *    more than HUFF_LOOKAHEAD bits long.
+ * 3. jpeg_huff_decode returns -1 if forced to suspend.
+ */
+
+#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
+{ register int nb, look; \
+  if (bits_left < HUFF_LOOKAHEAD) { \
+    if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
+    get_buffer = state.get_buffer; bits_left = state.bits_left; \
+    if (bits_left < HUFF_LOOKAHEAD) { \
+      nb = 1; goto slowlabel; \
+    } \
+  } \
+  look = PEEK_BITS(HUFF_LOOKAHEAD); \
+  if ((nb = htbl->look_nbits[look]) != 0) { \
+    DROP_BITS(nb); \
+    result = htbl->look_sym[look]; \
+  } else { \
+    nb = HUFF_LOOKAHEAD+1; \
+slowlabel: \
+    if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \
+	{ failaction; } \
+    get_buffer = state.get_buffer; bits_left = state.bits_left; \
+  } \
+}
+
+/* Out-of-line case for Huffman code fetching */
+EXTERN(int) jpeg_huff_decode
+	JPP((bitread_working_state * state, register bit_buf_type get_buffer,
+	     register int bits_left, d_derived_tbl * htbl, int min_bits));
diff --git a/samples/jpeglib/jdinput.c b/samples/jpeglib/jdinput.c
new file mode 100644
index 0000000..0c2ac8f
--- /dev/null
+++ b/samples/jpeglib/jdinput.c
@@ -0,0 +1,381 @@
+/*
+ * jdinput.c
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains input control logic for the JPEG decompressor.
+ * These routines are concerned with controlling the decompressor's input
+ * processing (marker reading and coefficient decoding).  The actual input
+ * reading is done in jdmarker.c, jdhuff.c, and jdphuff.c.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Private state */
+
+typedef struct {
+  struct jpeg_input_controller pub; /* public fields */
+
+  boolean inheaders;		/* TRUE until first SOS is reached */
+} my_input_controller;
+
+typedef my_input_controller * my_inputctl_ptr;
+
+
+/* Forward declarations */
+METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo));
+
+
+/*
+ * Routines to calculate various quantities related to the size of the image.
+ */
+
+LOCAL(void)
+initial_setup (j_decompress_ptr cinfo)
+/* Called once, when first SOS marker is reached */
+{
+  int ci;
+  jpeg_component_info *compptr;
+
+  /* Make sure image isn't bigger than I can handle */
+  if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||
+      (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)
+    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);
+
+  /* For now, precision must match compiled-in value... */
+  if (cinfo->data_precision != BITS_IN_JSAMPLE)
+    ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);
+
+  /* Check that number of components won't exceed internal array sizes */
+  if (cinfo->num_components > MAX_COMPONENTS)
+    ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
+	     MAX_COMPONENTS);
+
+  /* Compute maximum sampling factors; check factor validity */
+  cinfo->max_h_samp_factor = 1;
+  cinfo->max_v_samp_factor = 1;
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR ||
+	compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR)
+      ERREXIT(cinfo, JERR_BAD_SAMPLING);
+    cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor,
+				   compptr->h_samp_factor);
+    cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor,
+				   compptr->v_samp_factor);
+  }
+
+  /* We initialize DCT_scaled_size and min_DCT_scaled_size to DCTSIZE.
+   * In the full decompressor, this will be overridden by jdmaster.c;
+   * but in the transcoder, jdmaster.c is not used, so we must do it here.
+   */
+  cinfo->min_DCT_scaled_size = DCTSIZE;
+
+  /* Compute dimensions of components */
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    compptr->DCT_scaled_size = DCTSIZE;
+    /* Size in DCT blocks */
+    compptr->width_in_blocks = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
+		    (long) (cinfo->max_h_samp_factor * DCTSIZE));
+    compptr->height_in_blocks = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
+		    (long) (cinfo->max_v_samp_factor * DCTSIZE));
+    /* downsampled_width and downsampled_height will also be overridden by
+     * jdmaster.c if we are doing full decompression.  The transcoder library
+     * doesn't use these values, but the calling application might.
+     */
+    /* Size in samples */
+    compptr->downsampled_width = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
+		    (long) cinfo->max_h_samp_factor);
+    compptr->downsampled_height = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
+		    (long) cinfo->max_v_samp_factor);
+    /* Mark component needed, until color conversion says otherwise */
+    compptr->component_needed = TRUE;
+    /* Mark no quantization table yet saved for component */
+    compptr->quant_table = NULL;
+  }
+
+  /* Compute number of fully interleaved MCU rows. */
+  cinfo->total_iMCU_rows = (JDIMENSION)
+    jdiv_round_up((long) cinfo->image_height,
+		  (long) (cinfo->max_v_samp_factor*DCTSIZE));
+
+  /* Decide whether file contains multiple scans */
+  if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode)
+    cinfo->inputctl->has_multiple_scans = TRUE;
+  else
+    cinfo->inputctl->has_multiple_scans = FALSE;
+}
+
+
+LOCAL(void)
+per_scan_setup (j_decompress_ptr cinfo)
+/* Do computations that are needed before processing a JPEG scan */
+/* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */
+{
+  int ci, mcublks, tmp;
+  jpeg_component_info *compptr;
+  
+  if (cinfo->comps_in_scan == 1) {
+    
+    /* Noninterleaved (single-component) scan */
+    compptr = cinfo->cur_comp_info[0];
+    
+    /* Overall image size in MCUs */
+    cinfo->MCUs_per_row = compptr->width_in_blocks;
+    cinfo->MCU_rows_in_scan = compptr->height_in_blocks;
+    
+    /* For noninterleaved scan, always one block per MCU */
+    compptr->MCU_width = 1;
+    compptr->MCU_height = 1;
+    compptr->MCU_blocks = 1;
+    compptr->MCU_sample_width = compptr->DCT_scaled_size;
+    compptr->last_col_width = 1;
+    /* For noninterleaved scans, it is convenient to define last_row_height
+     * as the number of block rows present in the last iMCU row.
+     */
+    tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
+    if (tmp == 0) tmp = compptr->v_samp_factor;
+    compptr->last_row_height = tmp;
+    
+    /* Prepare array describing MCU composition */
+    cinfo->blocks_in_MCU = 1;
+    cinfo->MCU_membership[0] = 0;
+    
+  } else {
+    
+    /* Interleaved (multi-component) scan */
+    if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)
+      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
+	       MAX_COMPS_IN_SCAN);
+    
+    /* Overall image size in MCUs */
+    cinfo->MCUs_per_row = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_width,
+		    (long) (cinfo->max_h_samp_factor*DCTSIZE));
+    cinfo->MCU_rows_in_scan = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_height,
+		    (long) (cinfo->max_v_samp_factor*DCTSIZE));
+    
+    cinfo->blocks_in_MCU = 0;
+    
+    for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+      compptr = cinfo->cur_comp_info[ci];
+      /* Sampling factors give # of blocks of component in each MCU */
+      compptr->MCU_width = compptr->h_samp_factor;
+      compptr->MCU_height = compptr->v_samp_factor;
+      compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height;
+      compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_scaled_size;
+      /* Figure number of non-dummy blocks in last MCU column & row */
+      tmp = (int) (compptr->width_in_blocks % compptr->MCU_width);
+      if (tmp == 0) tmp = compptr->MCU_width;
+      compptr->last_col_width = tmp;
+      tmp = (int) (compptr->height_in_blocks % compptr->MCU_height);
+      if (tmp == 0) tmp = compptr->MCU_height;
+      compptr->last_row_height = tmp;
+      /* Prepare array describing MCU composition */
+      mcublks = compptr->MCU_blocks;
+      if (cinfo->blocks_in_MCU + mcublks > D_MAX_BLOCKS_IN_MCU)
+	ERREXIT(cinfo, JERR_BAD_MCU_SIZE);
+      while (mcublks-- > 0) {
+	cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
+      }
+    }
+    
+  }
+}
+
+
+/*
+ * Save away a copy of the Q-table referenced by each component present
+ * in the current scan, unless already saved during a prior scan.
+ *
+ * In a multiple-scan JPEG file, the encoder could assign different components
+ * the same Q-table slot number, but change table definitions between scans
+ * so that each component uses a different Q-table.  (The IJG encoder is not
+ * currently capable of doing this, but other encoders might.)  Since we want
+ * to be able to dequantize all the components at the end of the file, this
+ * means that we have to save away the table actually used for each component.
+ * We do this by copying the table at the start of the first scan containing
+ * the component.
+ * The JPEG spec prohibits the encoder from changing the contents of a Q-table
+ * slot between scans of a component using that slot.  If the encoder does so
+ * anyway, this decoder will simply use the Q-table values that were current
+ * at the start of the first scan for the component.
+ *
+ * The decompressor output side looks only at the saved quant tables,
+ * not at the current Q-table slots.
+ */
+
+LOCAL(void)
+latch_quant_tables (j_decompress_ptr cinfo)
+{
+  int ci, qtblno;
+  jpeg_component_info *compptr;
+  JQUANT_TBL * qtbl;
+
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    compptr = cinfo->cur_comp_info[ci];
+    /* No work if we already saved Q-table for this component */
+    if (compptr->quant_table != NULL)
+      continue;
+    /* Make sure specified quantization table is present */
+    qtblno = compptr->quant_tbl_no;
+    if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS ||
+	cinfo->quant_tbl_ptrs[qtblno] == NULL)
+      ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);
+    /* OK, save away the quantization table */
+    qtbl = (JQUANT_TBL *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  SIZEOF(JQUANT_TBL));
+    MEMCOPY(qtbl, cinfo->quant_tbl_ptrs[qtblno], SIZEOF(JQUANT_TBL));
+    compptr->quant_table = qtbl;
+  }
+}
+
+
+/*
+ * Initialize the input modules to read a scan of compressed data.
+ * The first call to this is done by jdmaster.c after initializing
+ * the entire decompressor (during jpeg_start_decompress).
+ * Subsequent calls come from consume_markers, below.
+ */
+
+METHODDEF(void)
+start_input_pass (j_decompress_ptr cinfo)
+{
+  per_scan_setup(cinfo);
+  latch_quant_tables(cinfo);
+  (*cinfo->entropy->start_pass) (cinfo);
+  (*cinfo->coef->start_input_pass) (cinfo);
+  cinfo->inputctl->consume_input = cinfo->coef->consume_data;
+}
+
+
+/*
+ * Finish up after inputting a compressed-data scan.
+ * This is called by the coefficient controller after it's read all
+ * the expected data of the scan.
+ */
+
+METHODDEF(void)
+finish_input_pass (j_decompress_ptr cinfo)
+{
+  cinfo->inputctl->consume_input = consume_markers;
+}
+
+
+/*
+ * Read JPEG markers before, between, or after compressed-data scans.
+ * Change state as necessary when a new scan is reached.
+ * Return value is JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
+ *
+ * The consume_input method pointer points either here or to the
+ * coefficient controller's consume_data routine, depending on whether
+ * we are reading a compressed data segment or inter-segment markers.
+ */
+
+METHODDEF(int)
+consume_markers (j_decompress_ptr cinfo)
+{
+  my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl;
+  int val;
+
+  if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */
+    return JPEG_REACHED_EOI;
+
+  val = (*cinfo->marker->read_markers) (cinfo);
+
+  switch (val) {
+  case JPEG_REACHED_SOS:	/* Found SOS */
+    if (inputctl->inheaders) {	/* 1st SOS */
+      initial_setup(cinfo);
+      inputctl->inheaders = FALSE;
+      /* Note: start_input_pass must be called by jdmaster.c
+       * before any more input can be consumed.  jdapimin.c is
+       * responsible for enforcing this sequencing.
+       */
+    } else {			/* 2nd or later SOS marker */
+      if (! inputctl->pub.has_multiple_scans)
+	ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */
+      start_input_pass(cinfo);
+    }
+    break;
+  case JPEG_REACHED_EOI:	/* Found EOI */
+    inputctl->pub.eoi_reached = TRUE;
+    if (inputctl->inheaders) {	/* Tables-only datastream, apparently */
+      if (cinfo->marker->saw_SOF)
+	ERREXIT(cinfo, JERR_SOF_NO_SOS);
+    } else {
+      /* Prevent infinite loop in coef ctlr's decompress_data routine
+       * if user set output_scan_number larger than number of scans.
+       */
+      if (cinfo->output_scan_number > cinfo->input_scan_number)
+	cinfo->output_scan_number = cinfo->input_scan_number;
+    }
+    break;
+  case JPEG_SUSPENDED:
+    break;
+  }
+
+  return val;
+}
+
+
+/*
+ * Reset state to begin a fresh datastream.
+ */
+
+METHODDEF(void)
+reset_input_controller (j_decompress_ptr cinfo)
+{
+  my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl;
+
+  inputctl->pub.consume_input = consume_markers;
+  inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */
+  inputctl->pub.eoi_reached = FALSE;
+  inputctl->inheaders = TRUE;
+  /* Reset other modules */
+  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
+  (*cinfo->marker->reset_marker_reader) (cinfo);
+  /* Reset progression state -- would be cleaner if entropy decoder did this */
+  cinfo->coef_bits = NULL;
+}
+
+
+/*
+ * Initialize the input controller module.
+ * This is called only once, when the decompression object is created.
+ */
+
+GLOBAL(void)
+jinit_input_controller (j_decompress_ptr cinfo)
+{
+  my_inputctl_ptr inputctl;
+
+  /* Create subobject in permanent pool */
+  inputctl = (my_inputctl_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
+				SIZEOF(my_input_controller));
+  cinfo->inputctl = (struct jpeg_input_controller *) inputctl;
+  /* Initialize method pointers */
+  inputctl->pub.consume_input = consume_markers;
+  inputctl->pub.reset_input_controller = reset_input_controller;
+  inputctl->pub.start_input_pass = start_input_pass;
+  inputctl->pub.finish_input_pass = finish_input_pass;
+  /* Initialize state: can't use reset_input_controller since we don't
+   * want to try to reset other modules yet.
+   */
+  inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */
+  inputctl->pub.eoi_reached = FALSE;
+  inputctl->inheaders = TRUE;
+}
diff --git a/samples/jpeglib/jdmainct.c b/samples/jpeglib/jdmainct.c
new file mode 100644
index 0000000..13c956f
--- /dev/null
+++ b/samples/jpeglib/jdmainct.c
@@ -0,0 +1,512 @@
+/*
+ * jdmainct.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains the main buffer controller for decompression.
+ * The main buffer lies between the JPEG decompressor proper and the
+ * post-processor; it holds downsampled data in the JPEG colorspace.
+ *
+ * Note that this code is bypassed in raw-data mode, since the application
+ * supplies the equivalent of the main buffer in that case.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/*
+ * In the current system design, the main buffer need never be a full-image
+ * buffer; any full-height buffers will be found inside the coefficient or
+ * postprocessing controllers.  Nonetheless, the main controller is not
+ * trivial.  Its responsibility is to provide context rows for upsampling/
+ * rescaling, and doing this in an efficient fashion is a bit tricky.
+ *
+ * Postprocessor input data is counted in "row groups".  A row group
+ * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size)
+ * sample rows of each component.  (We require DCT_scaled_size values to be
+ * chosen such that these numbers are integers.  In practice DCT_scaled_size
+ * values will likely be powers of two, so we actually have the stronger
+ * condition that DCT_scaled_size / min_DCT_scaled_size is an integer.)
+ * Upsampling will typically produce max_v_samp_factor pixel rows from each
+ * row group (times any additional scale factor that the upsampler is
+ * applying).
+ *
+ * The coefficient controller will deliver data to us one iMCU row at a time;
+ * each iMCU row contains v_samp_factor * DCT_scaled_size sample rows, or
+ * exactly min_DCT_scaled_size row groups.  (This amount of data corresponds
+ * to one row of MCUs when the image is fully interleaved.)  Note that the
+ * number of sample rows varies across components, but the number of row
+ * groups does not.  Some garbage sample rows may be included in the last iMCU
+ * row at the bottom of the image.
+ *
+ * Depending on the vertical scaling algorithm used, the upsampler may need
+ * access to the sample row(s) above and below its current input row group.
+ * The upsampler is required to set need_context_rows TRUE at global selection
+ * time if so.  When need_context_rows is FALSE, this controller can simply
+ * obtain one iMCU row at a time from the coefficient controller and dole it
+ * out as row groups to the postprocessor.
+ *
+ * When need_context_rows is TRUE, this controller guarantees that the buffer
+ * passed to postprocessing contains at least one row group's worth of samples
+ * above and below the row group(s) being processed.  Note that the context
+ * rows "above" the first passed row group appear at negative row offsets in
+ * the passed buffer.  At the top and bottom of the image, the required
+ * context rows are manufactured by duplicating the first or last real sample
+ * row; this avoids having special cases in the upsampling inner loops.
+ *
+ * The amount of context is fixed at one row group just because that's a
+ * convenient number for this controller to work with.  The existing
+ * upsamplers really only need one sample row of context.  An upsampler
+ * supporting arbitrary output rescaling might wish for more than one row
+ * group of context when shrinking the image; tough, we don't handle that.
+ * (This is justified by the assumption that downsizing will be handled mostly
+ * by adjusting the DCT_scaled_size values, so that the actual scale factor at
+ * the upsample step needn't be much less than one.)
+ *
+ * To provide the desired context, we have to retain the last two row groups
+ * of one iMCU row while reading in the next iMCU row.  (The last row group
+ * can't be processed until we have another row group for its below-context,
+ * and so we have to save the next-to-last group too for its above-context.)
+ * We could do this most simply by copying data around in our buffer, but
+ * that'd be very slow.  We can avoid copying any data by creating a rather
+ * strange pointer structure.  Here's how it works.  We allocate a workspace
+ * consisting of M+2 row groups (where M = min_DCT_scaled_size is the number
+ * of row groups per iMCU row).  We create two sets of redundant pointers to
+ * the workspace.  Labeling the physical row groups 0 to M+1, the synthesized
+ * pointer lists look like this:
+ *                   M+1                          M-1
+ * master pointer --> 0         master pointer --> 0
+ *                    1                            1
+ *                   ...                          ...
+ *                   M-3                          M-3
+ *                   M-2                           M
+ *                   M-1                          M+1
+ *                    M                           M-2
+ *                   M+1                          M-1
+ *                    0                            0
+ * We read alternate iMCU rows using each master pointer; thus the last two
+ * row groups of the previous iMCU row remain un-overwritten in the workspace.
+ * The pointer lists are set up so that the required context rows appear to
+ * be adjacent to the proper places when we pass the pointer lists to the
+ * upsampler.
+ *
+ * The above pictures describe the normal state of the pointer lists.
+ * At top and bottom of the image, we diddle the pointer lists to duplicate
+ * the first or last sample row as necessary (this is cheaper than copying
+ * sample rows around).
+ *
+ * This scheme breaks down if M < 2, ie, min_DCT_scaled_size is 1.  In that
+ * situation each iMCU row provides only one row group so the buffering logic
+ * must be different (eg, we must read two iMCU rows before we can emit the
+ * first row group).  For now, we simply do not support providing context
+ * rows when min_DCT_scaled_size is 1.  That combination seems unlikely to
+ * be worth providing --- if someone wants a 1/8th-size preview, they probably
+ * want it quick and dirty, so a context-free upsampler is sufficient.
+ */
+
+
+/* Private buffer controller object */
+
+typedef struct {
+  struct jpeg_d_main_controller pub; /* public fields */
+
+  /* Pointer to allocated workspace (M or M+2 row groups). */
+  JSAMPARRAY buffer[MAX_COMPONENTS];
+
+  boolean buffer_full;		/* Have we gotten an iMCU row from decoder? */
+  JDIMENSION rowgroup_ctr;	/* counts row groups output to postprocessor */
+
+  /* Remaining fields are only used in the context case. */
+
+  /* These are the master pointers to the funny-order pointer lists. */
+  JSAMPIMAGE xbuffer[2];	/* pointers to weird pointer lists */
+
+  int whichptr;			/* indicates which pointer set is now in use */
+  int context_state;		/* process_data state machine status */
+  JDIMENSION rowgroups_avail;	/* row groups available to postprocessor */
+  JDIMENSION iMCU_row_ctr;	/* counts iMCU rows to detect image top/bot */
+} my_main_controller;
+
+typedef my_main_controller * my_main_ptr;
+
+/* context_state values: */
+#define CTX_PREPARE_FOR_IMCU	0	/* need to prepare for MCU row */
+#define CTX_PROCESS_IMCU	1	/* feeding iMCU to postprocessor */
+#define CTX_POSTPONED_ROW	2	/* feeding postponed row group */
+
+
+/* Forward declarations */
+METHODDEF(void) process_data_simple_main
+	JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
+	     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
+METHODDEF(void) process_data_context_main
+	JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
+	     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
+#ifdef QUANT_2PASS_SUPPORTED
+METHODDEF(void) process_data_crank_post
+	JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
+	     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
+#endif
+
+
+LOCAL(void)
+alloc_funny_pointers (j_decompress_ptr cinfo)
+/* Allocate space for the funny pointer lists.
+ * This is done only once, not once per pass.
+ */
+{
+  my_main_ptr main = (my_main_ptr) cinfo->main;
+  int ci, rgroup;
+  int M = cinfo->min_DCT_scaled_size;
+  jpeg_component_info *compptr;
+  JSAMPARRAY xbuf;
+
+  /* Get top-level space for component array pointers.
+   * We alloc both arrays with one call to save a few cycles.
+   */
+  main->xbuffer[0] = (JSAMPIMAGE)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				cinfo->num_components * 2 * SIZEOF(JSAMPARRAY));
+  main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components;
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
+      cinfo->min_DCT_scaled_size; /* height of a row group of component */
+    /* Get space for pointer lists --- M+4 row groups in each list.
+     * We alloc both pointer lists with one call to save a few cycles.
+     */
+    xbuf = (JSAMPARRAY)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW));
+    xbuf += rgroup;		/* want one row group at negative offsets */
+    main->xbuffer[0][ci] = xbuf;
+    xbuf += rgroup * (M + 4);
+    main->xbuffer[1][ci] = xbuf;
+  }
+}
+
+
+LOCAL(void)
+make_funny_pointers (j_decompress_ptr cinfo)
+/* Create the funny pointer lists discussed in the comments above.
+ * The actual workspace is already allocated (in main->buffer),
+ * and the space for the pointer lists is allocated too.
+ * This routine just fills in the curiously ordered lists.
+ * This will be repeated at the beginning of each pass.
+ */
+{
+  my_main_ptr main = (my_main_ptr) cinfo->main;
+  int ci, i, rgroup;
+  int M = cinfo->min_DCT_scaled_size;
+  jpeg_component_info *compptr;
+  JSAMPARRAY buf, xbuf0, xbuf1;
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
+      cinfo->min_DCT_scaled_size; /* height of a row group of component */
+    xbuf0 = main->xbuffer[0][ci];
+    xbuf1 = main->xbuffer[1][ci];
+    /* First copy the workspace pointers as-is */
+    buf = main->buffer[ci];
+    for (i = 0; i < rgroup * (M + 2); i++) {
+      xbuf0[i] = xbuf1[i] = buf[i];
+    }
+    /* In the second list, put the last four row groups in swapped order */
+    for (i = 0; i < rgroup * 2; i++) {
+      xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i];
+      xbuf1[rgroup*M + i] = buf[rgroup*(M-2) + i];
+    }
+    /* The wraparound pointers at top and bottom will be filled later
+     * (see set_wraparound_pointers, below).  Initially we want the "above"
+     * pointers to duplicate the first actual data line.  This only needs
+     * to happen in xbuffer[0].
+     */
+    for (i = 0; i < rgroup; i++) {
+      xbuf0[i - rgroup] = xbuf0[0];
+    }
+  }
+}
+
+
+LOCAL(void)
+set_wraparound_pointers (j_decompress_ptr cinfo)
+/* Set up the "wraparound" pointers at top and bottom of the pointer lists.
+ * This changes the pointer list state from top-of-image to the normal state.
+ */
+{
+  my_main_ptr main = (my_main_ptr) cinfo->main;
+  int ci, i, rgroup;
+  int M = cinfo->min_DCT_scaled_size;
+  jpeg_component_info *compptr;
+  JSAMPARRAY xbuf0, xbuf1;
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
+      cinfo->min_DCT_scaled_size; /* height of a row group of component */
+    xbuf0 = main->xbuffer[0][ci];
+    xbuf1 = main->xbuffer[1][ci];
+    for (i = 0; i < rgroup; i++) {
+      xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i];
+      xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i];
+      xbuf0[rgroup*(M+2) + i] = xbuf0[i];
+      xbuf1[rgroup*(M+2) + i] = xbuf1[i];
+    }
+  }
+}
+
+
+LOCAL(void)
+set_bottom_pointers (j_decompress_ptr cinfo)
+/* Change the pointer lists to duplicate the last sample row at the bottom
+ * of the image.  whichptr indicates which xbuffer holds the final iMCU row.
+ * Also sets rowgroups_avail to indicate number of nondummy row groups in row.
+ */
+{
+  my_main_ptr main = (my_main_ptr) cinfo->main;
+  int ci, i, rgroup, iMCUheight, rows_left;
+  jpeg_component_info *compptr;
+  JSAMPARRAY xbuf;
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* Count sample rows in one iMCU row and in one row group */
+    iMCUheight = compptr->v_samp_factor * compptr->DCT_scaled_size;
+    rgroup = iMCUheight / cinfo->min_DCT_scaled_size;
+    /* Count nondummy sample rows remaining for this component */
+    rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight);
+    if (rows_left == 0) rows_left = iMCUheight;
+    /* Count nondummy row groups.  Should get same answer for each component,
+     * so we need only do it once.
+     */
+    if (ci == 0) {
+      main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1);
+    }
+    /* Duplicate the last real sample row rgroup*2 times; this pads out the
+     * last partial rowgroup and ensures at least one full rowgroup of context.
+     */
+    xbuf = main->xbuffer[main->whichptr][ci];
+    for (i = 0; i < rgroup * 2; i++) {
+      xbuf[rows_left + i] = xbuf[rows_left-1];
+    }
+  }
+}
+
+
+/*
+ * Initialize for a processing pass.
+ */
+
+METHODDEF(void)
+start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
+{
+  my_main_ptr main = (my_main_ptr) cinfo->main;
+
+  switch (pass_mode) {
+  case JBUF_PASS_THRU:
+    if (cinfo->upsample->need_context_rows) {
+      main->pub.process_data = process_data_context_main;
+      make_funny_pointers(cinfo); /* Create the xbuffer[] lists */
+      main->whichptr = 0;	/* Read first iMCU row into xbuffer[0] */
+      main->context_state = CTX_PREPARE_FOR_IMCU;
+      main->iMCU_row_ctr = 0;
+    } else {
+      /* Simple case with no context needed */
+      main->pub.process_data = process_data_simple_main;
+    }
+    main->buffer_full = FALSE;	/* Mark buffer empty */
+    main->rowgroup_ctr = 0;
+    break;
+#ifdef QUANT_2PASS_SUPPORTED
+  case JBUF_CRANK_DEST:
+    /* For last pass of 2-pass quantization, just crank the postprocessor */
+    main->pub.process_data = process_data_crank_post;
+    break;
+#endif
+  default:
+    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+    break;
+  }
+}
+
+
+/*
+ * Process some data.
+ * This handles the simple case where no context is required.
+ */
+
+METHODDEF(void)
+process_data_simple_main (j_decompress_ptr cinfo,
+			  JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+			  JDIMENSION out_rows_avail)
+{
+  my_main_ptr main = (my_main_ptr) cinfo->main;
+  JDIMENSION rowgroups_avail;
+
+  /* Read input data if we haven't filled the main buffer yet */
+  if (! main->buffer_full) {
+    if (! (*cinfo->coef->decompress_data) (cinfo, main->buffer))
+      return;			/* suspension forced, can do nothing more */
+    main->buffer_full = TRUE;	/* OK, we have an iMCU row to work with */
+  }
+
+  /* There are always min_DCT_scaled_size row groups in an iMCU row. */
+  rowgroups_avail = (JDIMENSION) cinfo->min_DCT_scaled_size;
+  /* Note: at the bottom of the image, we may pass extra garbage row groups
+   * to the postprocessor.  The postprocessor has to check for bottom
+   * of image anyway (at row resolution), so no point in us doing it too.
+   */
+
+  /* Feed the postprocessor */
+  (*cinfo->post->post_process_data) (cinfo, main->buffer,
+				     &main->rowgroup_ctr, rowgroups_avail,
+				     output_buf, out_row_ctr, out_rows_avail);
+
+  /* Has postprocessor consumed all the data yet? If so, mark buffer empty */
+  if (main->rowgroup_ctr >= rowgroups_avail) {
+    main->buffer_full = FALSE;
+    main->rowgroup_ctr = 0;
+  }
+}
+
+
+/*
+ * Process some data.
+ * This handles the case where context rows must be provided.
+ */
+
+METHODDEF(void)
+process_data_context_main (j_decompress_ptr cinfo,
+			   JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+			   JDIMENSION out_rows_avail)
+{
+  my_main_ptr main = (my_main_ptr) cinfo->main;
+
+  /* Read input data if we haven't filled the main buffer yet */
+  if (! main->buffer_full) {
+    if (! (*cinfo->coef->decompress_data) (cinfo,
+					   main->xbuffer[main->whichptr]))
+      return;			/* suspension forced, can do nothing more */
+    main->buffer_full = TRUE;	/* OK, we have an iMCU row to work with */
+    main->iMCU_row_ctr++;	/* count rows received */
+  }
+
+  /* Postprocessor typically will not swallow all the input data it is handed
+   * in one call (due to filling the output buffer first).  Must be prepared
+   * to exit and restart.  This switch lets us keep track of how far we got.
+   * Note that each case falls through to the next on successful completion.
+   */
+  switch (main->context_state) {
+  case CTX_POSTPONED_ROW:
+    /* Call postprocessor using previously set pointers for postponed row */
+    (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr],
+			&main->rowgroup_ctr, main->rowgroups_avail,
+			output_buf, out_row_ctr, out_rows_avail);
+    if (main->rowgroup_ctr < main->rowgroups_avail)
+      return;			/* Need to suspend */
+    main->context_state = CTX_PREPARE_FOR_IMCU;
+    if (*out_row_ctr >= out_rows_avail)
+      return;			/* Postprocessor exactly filled output buf */
+    /*FALLTHROUGH*/
+  case CTX_PREPARE_FOR_IMCU:
+    /* Prepare to process first M-1 row groups of this iMCU row */
+    main->rowgroup_ctr = 0;
+    main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size - 1);
+    /* Check for bottom of image: if so, tweak pointers to "duplicate"
+     * the last sample row, and adjust rowgroups_avail to ignore padding rows.
+     */
+    if (main->iMCU_row_ctr == cinfo->total_iMCU_rows)
+      set_bottom_pointers(cinfo);
+    main->context_state = CTX_PROCESS_IMCU;
+    /*FALLTHROUGH*/
+  case CTX_PROCESS_IMCU:
+    /* Call postprocessor using previously set pointers */
+    (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr],
+			&main->rowgroup_ctr, main->rowgroups_avail,
+			output_buf, out_row_ctr, out_rows_avail);
+    if (main->rowgroup_ctr < main->rowgroups_avail)
+      return;			/* Need to suspend */
+    /* After the first iMCU, change wraparound pointers to normal state */
+    if (main->iMCU_row_ctr == 1)
+      set_wraparound_pointers(cinfo);
+    /* Prepare to load new iMCU row using other xbuffer list */
+    main->whichptr ^= 1;	/* 0=>1 or 1=>0 */
+    main->buffer_full = FALSE;
+    /* Still need to process last row group of this iMCU row, */
+    /* which is saved at index M+1 of the other xbuffer */
+    main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_scaled_size + 1);
+    main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size + 2);
+    main->context_state = CTX_POSTPONED_ROW;
+  }
+}
+
+
+/*
+ * Process some data.
+ * Final pass of two-pass quantization: just call the postprocessor.
+ * Source data will be the postprocessor controller's internal buffer.
+ */
+
+#ifdef QUANT_2PASS_SUPPORTED
+
+METHODDEF(void)
+process_data_crank_post (j_decompress_ptr cinfo,
+			 JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+			 JDIMENSION out_rows_avail)
+{
+  (*cinfo->post->post_process_data) (cinfo, (JSAMPIMAGE) NULL,
+				     (JDIMENSION *) NULL, (JDIMENSION) 0,
+				     output_buf, out_row_ctr, out_rows_avail);
+}
+
+#endif /* QUANT_2PASS_SUPPORTED */
+
+
+/*
+ * Initialize main buffer controller.
+ */
+
+GLOBAL(void)
+jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
+{
+  my_main_ptr main;
+  int ci, rgroup, ngroups;
+  jpeg_component_info *compptr;
+
+  main = (my_main_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_main_controller));
+  cinfo->main = (struct jpeg_d_main_controller *) main;
+  main->pub.start_pass = start_pass_main;
+
+  if (need_full_buffer)		/* shouldn't happen */
+    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+
+  /* Allocate the workspace.
+   * ngroups is the number of row groups we need.
+   */
+  if (cinfo->upsample->need_context_rows) {
+    if (cinfo->min_DCT_scaled_size < 2) /* unsupported, see comments above */
+      ERREXIT(cinfo, JERR_NOTIMPL);
+    alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */
+    ngroups = cinfo->min_DCT_scaled_size + 2;
+  } else {
+    ngroups = cinfo->min_DCT_scaled_size;
+  }
+
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
+      cinfo->min_DCT_scaled_size; /* height of a row group of component */
+    main->buffer[ci] = (*cinfo->mem->alloc_sarray)
+			((j_common_ptr) cinfo, JPOOL_IMAGE,
+			 compptr->width_in_blocks * compptr->DCT_scaled_size,
+			 (JDIMENSION) (rgroup * ngroups));
+  }
+}
diff --git a/samples/jpeglib/jdmarker.c b/samples/jpeglib/jdmarker.c
new file mode 100644
index 0000000..f4cca8c
--- /dev/null
+++ b/samples/jpeglib/jdmarker.c
@@ -0,0 +1,1360 @@
+/*
+ * jdmarker.c
+ *
+ * Copyright (C) 1991-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains routines to decode JPEG datastream markers.
+ * Most of the complexity arises from our desire to support input
+ * suspension: if not all of the data for a marker is available,
+ * we must exit back to the application.  On resumption, we reprocess
+ * the marker.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+typedef enum {			/* JPEG marker codes */
+  M_SOF0  = 0xc0,
+  M_SOF1  = 0xc1,
+  M_SOF2  = 0xc2,
+  M_SOF3  = 0xc3,
+  
+  M_SOF5  = 0xc5,
+  M_SOF6  = 0xc6,
+  M_SOF7  = 0xc7,
+  
+  M_JPG   = 0xc8,
+  M_SOF9  = 0xc9,
+  M_SOF10 = 0xca,
+  M_SOF11 = 0xcb,
+  
+  M_SOF13 = 0xcd,
+  M_SOF14 = 0xce,
+  M_SOF15 = 0xcf,
+  
+  M_DHT   = 0xc4,
+  
+  M_DAC   = 0xcc,
+  
+  M_RST0  = 0xd0,
+  M_RST1  = 0xd1,
+  M_RST2  = 0xd2,
+  M_RST3  = 0xd3,
+  M_RST4  = 0xd4,
+  M_RST5  = 0xd5,
+  M_RST6  = 0xd6,
+  M_RST7  = 0xd7,
+  
+  M_SOI   = 0xd8,
+  M_EOI   = 0xd9,
+  M_SOS   = 0xda,
+  M_DQT   = 0xdb,
+  M_DNL   = 0xdc,
+  M_DRI   = 0xdd,
+  M_DHP   = 0xde,
+  M_EXP   = 0xdf,
+  
+  M_APP0  = 0xe0,
+  M_APP1  = 0xe1,
+  M_APP2  = 0xe2,
+  M_APP3  = 0xe3,
+  M_APP4  = 0xe4,
+  M_APP5  = 0xe5,
+  M_APP6  = 0xe6,
+  M_APP7  = 0xe7,
+  M_APP8  = 0xe8,
+  M_APP9  = 0xe9,
+  M_APP10 = 0xea,
+  M_APP11 = 0xeb,
+  M_APP12 = 0xec,
+  M_APP13 = 0xed,
+  M_APP14 = 0xee,
+  M_APP15 = 0xef,
+  
+  M_JPG0  = 0xf0,
+  M_JPG13 = 0xfd,
+  M_COM   = 0xfe,
+  
+  M_TEM   = 0x01,
+  
+  M_ERROR = 0x100
+} JPEG_MARKER;
+
+
+/* Private state */
+
+typedef struct {
+  struct jpeg_marker_reader pub; /* public fields */
+
+  /* Application-overridable marker processing methods */
+  jpeg_marker_parser_method process_COM;
+  jpeg_marker_parser_method process_APPn[16];
+
+  /* Limit on marker data length to save for each marker type */
+  unsigned int length_limit_COM;
+  unsigned int length_limit_APPn[16];
+
+  /* Status of COM/APPn marker saving */
+  jpeg_saved_marker_ptr cur_marker;	/* NULL if not processing a marker */
+  unsigned int bytes_read;		/* data bytes read so far in marker */
+  /* Note: cur_marker is not linked into marker_list until it's all read. */
+} my_marker_reader;
+
+typedef my_marker_reader * my_marker_ptr;
+
+
+/*
+ * Macros for fetching data from the data source module.
+ *
+ * At all times, cinfo->src->next_input_byte and ->bytes_in_buffer reflect
+ * the current restart point; we update them only when we have reached a
+ * suitable place to restart if a suspension occurs.
+ */
+
+/* Declare and initialize local copies of input pointer/count */
+#define INPUT_VARS(cinfo)  \
+	struct jpeg_source_mgr * datasrc = (cinfo)->src;  \
+	const JOCTET * next_input_byte = datasrc->next_input_byte;  \
+	size_t bytes_in_buffer = datasrc->bytes_in_buffer
+
+/* Unload the local copies --- do this only at a restart boundary */
+#define INPUT_SYNC(cinfo)  \
+	( datasrc->next_input_byte = next_input_byte,  \
+	  datasrc->bytes_in_buffer = bytes_in_buffer )
+
+/* Reload the local copies --- used only in MAKE_BYTE_AVAIL */
+#define INPUT_RELOAD(cinfo)  \
+	( next_input_byte = datasrc->next_input_byte,  \
+	  bytes_in_buffer = datasrc->bytes_in_buffer )
+
+/* Internal macro for INPUT_BYTE and INPUT_2BYTES: make a byte available.
+ * Note we do *not* do INPUT_SYNC before calling fill_input_buffer,
+ * but we must reload the local copies after a successful fill.
+ */
+#define MAKE_BYTE_AVAIL(cinfo,action)  \
+	if (bytes_in_buffer == 0) {  \
+	  if (! (*datasrc->fill_input_buffer) (cinfo))  \
+	    { action; }  \
+	  INPUT_RELOAD(cinfo);  \
+	}
+
+/* Read a byte into variable V.
+ * If must suspend, take the specified action (typically "return FALSE").
+ */
+#define INPUT_BYTE(cinfo,V,action)  \
+	MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \
+		  bytes_in_buffer--; \
+		  V = GETJOCTET(*next_input_byte++); )
+
+/* As above, but read two bytes interpreted as an unsigned 16-bit integer.
+ * V should be declared unsigned int or perhaps INT32.
+ */
+#define INPUT_2BYTES(cinfo,V,action)  \
+	MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \
+		  bytes_in_buffer--; \
+		  V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \
+		  MAKE_BYTE_AVAIL(cinfo,action); \
+		  bytes_in_buffer--; \
+		  V += GETJOCTET(*next_input_byte++); )
+
+
+/*
+ * Routines to process JPEG markers.
+ *
+ * Entry condition: JPEG marker itself has been read and its code saved
+ *   in cinfo->unread_marker; input restart point is just after the marker.
+ *
+ * Exit: if return TRUE, have read and processed any parameters, and have
+ *   updated the restart point to point after the parameters.
+ *   If return FALSE, was forced to suspend before reaching end of
+ *   marker parameters; restart point has not been moved.  Same routine
+ *   will be called again after application supplies more input data.
+ *
+ * This approach to suspension assumes that all of a marker's parameters
+ * can fit into a single input bufferload.  This should hold for "normal"
+ * markers.  Some COM/APPn markers might have large parameter segments
+ * that might not fit.  If we are simply dropping such a marker, we use
+ * skip_input_data to get past it, and thereby put the problem on the
+ * source manager's shoulders.  If we are saving the marker's contents
+ * into memory, we use a slightly different convention: when forced to
+ * suspend, the marker processor updates the restart point to the end of
+ * what it's consumed (ie, the end of the buffer) before returning FALSE.
+ * On resumption, cinfo->unread_marker still contains the marker code,
+ * but the data source will point to the next chunk of marker data.
+ * The marker processor must retain internal state to deal with this.
+ *
+ * Note that we don't bother to avoid duplicate trace messages if a
+ * suspension occurs within marker parameters.  Other side effects
+ * require more care.
+ */
+
+
+LOCAL(boolean)
+get_soi (j_decompress_ptr cinfo)
+/* Process an SOI marker */
+{
+  int i;
+  
+  TRACEMS(cinfo, 1, JTRC_SOI);
+
+  if (cinfo->marker->saw_SOI)
+    ERREXIT(cinfo, JERR_SOI_DUPLICATE);
+
+  /* Reset all parameters that are defined to be reset by SOI */
+
+  for (i = 0; i < NUM_ARITH_TBLS; i++) {
+    cinfo->arith_dc_L[i] = 0;
+    cinfo->arith_dc_U[i] = 1;
+    cinfo->arith_ac_K[i] = 5;
+  }
+  cinfo->restart_interval = 0;
+
+  /* Set initial assumptions for colorspace etc */
+
+  cinfo->jpeg_color_space = JCS_UNKNOWN;
+  cinfo->CCIR601_sampling = FALSE; /* Assume non-CCIR sampling??? */
+
+  cinfo->saw_JFIF_marker = FALSE;
+  cinfo->JFIF_major_version = 1; /* set default JFIF APP0 values */
+  cinfo->JFIF_minor_version = 1;
+  cinfo->density_unit = 0;
+  cinfo->X_density = 1;
+  cinfo->Y_density = 1;
+  cinfo->saw_Adobe_marker = FALSE;
+  cinfo->Adobe_transform = 0;
+
+  cinfo->marker->saw_SOI = TRUE;
+
+  return TRUE;
+}
+
+
+LOCAL(boolean)
+get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
+/* Process a SOFn marker */
+{
+  INT32 length;
+  int c, ci;
+  jpeg_component_info * compptr;
+  INPUT_VARS(cinfo);
+
+  cinfo->progressive_mode = is_prog;
+  cinfo->arith_code = is_arith;
+
+  INPUT_2BYTES(cinfo, length, return FALSE);
+
+  INPUT_BYTE(cinfo, cinfo->data_precision, return FALSE);
+  INPUT_2BYTES(cinfo, cinfo->image_height, return FALSE);
+  INPUT_2BYTES(cinfo, cinfo->image_width, return FALSE);
+  INPUT_BYTE(cinfo, cinfo->num_components, return FALSE);
+
+  length -= 8;
+
+  TRACEMS4(cinfo, 1, JTRC_SOF, cinfo->unread_marker,
+	   (int) cinfo->image_width, (int) cinfo->image_height,
+	   cinfo->num_components);
+
+  if (cinfo->marker->saw_SOF)
+    ERREXIT(cinfo, JERR_SOF_DUPLICATE);
+
+  /* We don't support files in which the image height is initially specified */
+  /* as 0 and is later redefined by DNL.  As long as we have to check that,  */
+  /* might as well have a general sanity check. */
+  if (cinfo->image_height <= 0 || cinfo->image_width <= 0
+      || cinfo->num_components <= 0)
+    ERREXIT(cinfo, JERR_EMPTY_IMAGE);
+
+  if (length != (cinfo->num_components * 3))
+    ERREXIT(cinfo, JERR_BAD_LENGTH);
+
+  if (cinfo->comp_info == NULL)	/* do only once, even if suspend */
+    cinfo->comp_info = (jpeg_component_info *) (*cinfo->mem->alloc_small)
+			((j_common_ptr) cinfo, JPOOL_IMAGE,
+			 cinfo->num_components * SIZEOF(jpeg_component_info));
+  
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    compptr->component_index = ci;
+    INPUT_BYTE(cinfo, compptr->component_id, return FALSE);
+    INPUT_BYTE(cinfo, c, return FALSE);
+    compptr->h_samp_factor = (c >> 4) & 15;
+    compptr->v_samp_factor = (c     ) & 15;
+    INPUT_BYTE(cinfo, compptr->quant_tbl_no, return FALSE);
+
+    TRACEMS4(cinfo, 1, JTRC_SOF_COMPONENT,
+	     compptr->component_id, compptr->h_samp_factor,
+	     compptr->v_samp_factor, compptr->quant_tbl_no);
+  }
+
+  cinfo->marker->saw_SOF = TRUE;
+
+  INPUT_SYNC(cinfo);
+  return TRUE;
+}
+
+
+LOCAL(boolean)
+get_sos (j_decompress_ptr cinfo)
+/* Process a SOS marker */
+{
+  INT32 length;
+  int i, ci, n, c, cc;
+  jpeg_component_info * compptr;
+  INPUT_VARS(cinfo);
+
+  if (! cinfo->marker->saw_SOF)
+    ERREXIT(cinfo, JERR_SOS_NO_SOF);
+
+  INPUT_2BYTES(cinfo, length, return FALSE);
+
+  INPUT_BYTE(cinfo, n, return FALSE); /* Number of components */
+
+  TRACEMS1(cinfo, 1, JTRC_SOS, n);
+
+  if (length != (n * 2 + 6) || n < 1 || n > MAX_COMPS_IN_SCAN)
+    ERREXIT(cinfo, JERR_BAD_LENGTH);
+
+  cinfo->comps_in_scan = n;
+
+  /* Collect the component-spec parameters */
+
+  for (i = 0; i < n; i++) {
+    INPUT_BYTE(cinfo, cc, return FALSE);
+    INPUT_BYTE(cinfo, c, return FALSE);
+    
+    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+	 ci++, compptr++) {
+      if (cc == compptr->component_id)
+	goto id_found;
+    }
+
+    ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
+
+  id_found:
+
+    cinfo->cur_comp_info[i] = compptr;
+    compptr->dc_tbl_no = (c >> 4) & 15;
+    compptr->ac_tbl_no = (c     ) & 15;
+    
+    TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
+	     compptr->dc_tbl_no, compptr->ac_tbl_no);
+  }
+
+  /* Collect the additional scan parameters Ss, Se, Ah/Al. */
+  INPUT_BYTE(cinfo, c, return FALSE);
+  cinfo->Ss = c;
+  INPUT_BYTE(cinfo, c, return FALSE);
+  cinfo->Se = c;
+  INPUT_BYTE(cinfo, c, return FALSE);
+  cinfo->Ah = (c >> 4) & 15;
+  cinfo->Al = (c     ) & 15;
+
+  TRACEMS4(cinfo, 1, JTRC_SOS_PARAMS, cinfo->Ss, cinfo->Se,
+	   cinfo->Ah, cinfo->Al);
+
+  /* Prepare to scan data & restart markers */
+  cinfo->marker->next_restart_num = 0;
+
+  /* Count another SOS marker */
+  cinfo->input_scan_number++;
+
+  INPUT_SYNC(cinfo);
+  return TRUE;
+}
+
+
+#ifdef D_ARITH_CODING_SUPPORTED
+
+LOCAL(boolean)
+get_dac (j_decompress_ptr cinfo)
+/* Process a DAC marker */
+{
+  INT32 length;
+  int index, val;
+  INPUT_VARS(cinfo);
+
+  INPUT_2BYTES(cinfo, length, return FALSE);
+  length -= 2;
+  
+  while (length > 0) {
+    INPUT_BYTE(cinfo, index, return FALSE);
+    INPUT_BYTE(cinfo, val, return FALSE);
+
+    length -= 2;
+
+    TRACEMS2(cinfo, 1, JTRC_DAC, index, val);
+
+    if (index < 0 || index >= (2*NUM_ARITH_TBLS))
+      ERREXIT1(cinfo, JERR_DAC_INDEX, index);
+
+    if (index >= NUM_ARITH_TBLS) { /* define AC table */
+      cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (UINT8) val;
+    } else {			/* define DC table */
+      cinfo->arith_dc_L[index] = (UINT8) (val & 0x0F);
+      cinfo->arith_dc_U[index] = (UINT8) (val >> 4);
+      if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index])
+	ERREXIT1(cinfo, JERR_DAC_VALUE, val);
+    }
+  }
+
+  if (length != 0)
+    ERREXIT(cinfo, JERR_BAD_LENGTH);
+
+  INPUT_SYNC(cinfo);
+  return TRUE;
+}
+
+#else /* ! D_ARITH_CODING_SUPPORTED */
+
+#define get_dac(cinfo)  skip_variable(cinfo)
+
+#endif /* D_ARITH_CODING_SUPPORTED */
+
+
+LOCAL(boolean)
+get_dht (j_decompress_ptr cinfo)
+/* Process a DHT marker */
+{
+  INT32 length;
+  UINT8 bits[17];
+  UINT8 huffval[256];
+  int i, index, count;
+  JHUFF_TBL **htblptr;
+  INPUT_VARS(cinfo);
+
+  INPUT_2BYTES(cinfo, length, return FALSE);
+  length -= 2;
+  
+  while (length > 16) {
+    INPUT_BYTE(cinfo, index, return FALSE);
+
+    TRACEMS1(cinfo, 1, JTRC_DHT, index);
+      
+    bits[0] = 0;
+    count = 0;
+    for (i = 1; i <= 16; i++) {
+      INPUT_BYTE(cinfo, bits[i], return FALSE);
+      count += bits[i];
+    }
+
+    length -= 1 + 16;
+
+    TRACEMS8(cinfo, 2, JTRC_HUFFBITS,
+	     bits[1], bits[2], bits[3], bits[4],
+	     bits[5], bits[6], bits[7], bits[8]);
+    TRACEMS8(cinfo, 2, JTRC_HUFFBITS,
+	     bits[9], bits[10], bits[11], bits[12],
+	     bits[13], bits[14], bits[15], bits[16]);
+
+    /* Here we just do minimal validation of the counts to avoid walking
+     * off the end of our table space.  jdhuff.c will check more carefully.
+     */
+    if (count > 256 || ((INT32) count) > length)
+      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+
+    for (i = 0; i < count; i++)
+      INPUT_BYTE(cinfo, huffval[i], return FALSE);
+
+    length -= count;
+
+    if (index & 0x10) {		/* AC table definition */
+      index -= 0x10;
+      htblptr = &cinfo->ac_huff_tbl_ptrs[index];
+    } else {			/* DC table definition */
+      htblptr = &cinfo->dc_huff_tbl_ptrs[index];
+    }
+
+    if (index < 0 || index >= NUM_HUFF_TBLS)
+      ERREXIT1(cinfo, JERR_DHT_INDEX, index);
+
+    if (*htblptr == NULL)
+      *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
+  
+    MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));
+    MEMCOPY((*htblptr)->huffval, huffval, SIZEOF((*htblptr)->huffval));
+  }
+
+  if (length != 0)
+    ERREXIT(cinfo, JERR_BAD_LENGTH);
+
+  INPUT_SYNC(cinfo);
+  return TRUE;
+}
+
+
+LOCAL(boolean)
+get_dqt (j_decompress_ptr cinfo)
+/* Process a DQT marker */
+{
+  INT32 length;
+  int n, i, prec;
+  unsigned int tmp;
+  JQUANT_TBL *quant_ptr;
+  INPUT_VARS(cinfo);
+
+  INPUT_2BYTES(cinfo, length, return FALSE);
+  length -= 2;
+
+  while (length > 0) {
+    INPUT_BYTE(cinfo, n, return FALSE);
+    prec = n >> 4;
+    n &= 0x0F;
+
+    TRACEMS2(cinfo, 1, JTRC_DQT, n, prec);
+
+    if (n >= NUM_QUANT_TBLS)
+      ERREXIT1(cinfo, JERR_DQT_INDEX, n);
+      
+    if (cinfo->quant_tbl_ptrs[n] == NULL)
+      cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo);
+    quant_ptr = cinfo->quant_tbl_ptrs[n];
+
+    for (i = 0; i < DCTSIZE2; i++) {
+      if (prec)
+	INPUT_2BYTES(cinfo, tmp, return FALSE);
+      else
+	INPUT_BYTE(cinfo, tmp, return FALSE);
+      /* We convert the zigzag-order table to natural array order. */
+      quant_ptr->quantval[jpeg_natural_order[i]] = (UINT16) tmp;
+    }
+
+    if (cinfo->err->trace_level >= 2) {
+      for (i = 0; i < DCTSIZE2; i += 8) {
+	TRACEMS8(cinfo, 2, JTRC_QUANTVALS,
+		 quant_ptr->quantval[i],   quant_ptr->quantval[i+1],
+		 quant_ptr->quantval[i+2], quant_ptr->quantval[i+3],
+		 quant_ptr->quantval[i+4], quant_ptr->quantval[i+5],
+		 quant_ptr->quantval[i+6], quant_ptr->quantval[i+7]);
+      }
+    }
+
+    length -= DCTSIZE2+1;
+    if (prec) length -= DCTSIZE2;
+  }
+
+  if (length != 0)
+    ERREXIT(cinfo, JERR_BAD_LENGTH);
+
+  INPUT_SYNC(cinfo);
+  return TRUE;
+}
+
+
+LOCAL(boolean)
+get_dri (j_decompress_ptr cinfo)
+/* Process a DRI marker */
+{
+  INT32 length;
+  unsigned int tmp;
+  INPUT_VARS(cinfo);
+
+  INPUT_2BYTES(cinfo, length, return FALSE);
+  
+  if (length != 4)
+    ERREXIT(cinfo, JERR_BAD_LENGTH);
+
+  INPUT_2BYTES(cinfo, tmp, return FALSE);
+
+  TRACEMS1(cinfo, 1, JTRC_DRI, tmp);
+
+  cinfo->restart_interval = tmp;
+
+  INPUT_SYNC(cinfo);
+  return TRUE;
+}
+
+
+/*
+ * Routines for processing APPn and COM markers.
+ * These are either saved in memory or discarded, per application request.
+ * APP0 and APP14 are specially checked to see if they are
+ * JFIF and Adobe markers, respectively.
+ */
+
+#define APP0_DATA_LEN	14	/* Length of interesting data in APP0 */
+#define APP14_DATA_LEN	12	/* Length of interesting data in APP14 */
+#define APPN_DATA_LEN	14	/* Must be the largest of the above!! */
+
+
+LOCAL(void)
+examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data,
+	      unsigned int datalen, INT32 remaining)
+/* Examine first few bytes from an APP0.
+ * Take appropriate action if it is a JFIF marker.
+ * datalen is # of bytes at data[], remaining is length of rest of marker data.
+ */
+{
+  INT32 totallen = (INT32) datalen + remaining;
+
+  if (datalen >= APP0_DATA_LEN &&
+      GETJOCTET(data[0]) == 0x4A &&
+      GETJOCTET(data[1]) == 0x46 &&
+      GETJOCTET(data[2]) == 0x49 &&
+      GETJOCTET(data[3]) == 0x46 &&
+      GETJOCTET(data[4]) == 0) {
+    /* Found JFIF APP0 marker: save info */
+    cinfo->saw_JFIF_marker = TRUE;
+    cinfo->JFIF_major_version = GETJOCTET(data[5]);
+    cinfo->JFIF_minor_version = GETJOCTET(data[6]);
+    cinfo->density_unit = GETJOCTET(data[7]);
+    cinfo->X_density = (GETJOCTET(data[8]) << 8) + GETJOCTET(data[9]);
+    cinfo->Y_density = (GETJOCTET(data[10]) << 8) + GETJOCTET(data[11]);
+    /* Check version.
+     * Major version must be 1, anything else signals an incompatible change.
+     * (We used to treat this as an error, but now it's a nonfatal warning,
+     * because some bozo at Hijaak couldn't read the spec.)
+     * Minor version should be 0..2, but process anyway if newer.
+     */
+    if (cinfo->JFIF_major_version != 1)
+      WARNMS2(cinfo, JWRN_JFIF_MAJOR,
+	      cinfo->JFIF_major_version, cinfo->JFIF_minor_version);
+    /* Generate trace messages */
+    TRACEMS5(cinfo, 1, JTRC_JFIF,
+	     cinfo->JFIF_major_version, cinfo->JFIF_minor_version,
+	     cinfo->X_density, cinfo->Y_density, cinfo->density_unit);
+    /* Validate thumbnail dimensions and issue appropriate messages */
+    if (GETJOCTET(data[12]) | GETJOCTET(data[13]))
+      TRACEMS2(cinfo, 1, JTRC_JFIF_THUMBNAIL,
+	       GETJOCTET(data[12]), GETJOCTET(data[13]));
+    totallen -= APP0_DATA_LEN;
+    if (totallen !=
+	((INT32)GETJOCTET(data[12]) * (INT32)GETJOCTET(data[13]) * (INT32) 3))
+      TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) totallen);
+  } else if (datalen >= 6 &&
+      GETJOCTET(data[0]) == 0x4A &&
+      GETJOCTET(data[1]) == 0x46 &&
+      GETJOCTET(data[2]) == 0x58 &&
+      GETJOCTET(data[3]) == 0x58 &&
+      GETJOCTET(data[4]) == 0) {
+    /* Found JFIF "JFXX" extension APP0 marker */
+    /* The library doesn't actually do anything with these,
+     * but we try to produce a helpful trace message.
+     */
+    switch (GETJOCTET(data[5])) {
+    case 0x10:
+      TRACEMS1(cinfo, 1, JTRC_THUMB_JPEG, (int) totallen);
+      break;
+    case 0x11:
+      TRACEMS1(cinfo, 1, JTRC_THUMB_PALETTE, (int) totallen);
+      break;
+    case 0x13:
+      TRACEMS1(cinfo, 1, JTRC_THUMB_RGB, (int) totallen);
+      break;
+    default:
+      TRACEMS2(cinfo, 1, JTRC_JFIF_EXTENSION,
+	       GETJOCTET(data[5]), (int) totallen);
+      break;
+    }
+  } else {
+    /* Start of APP0 does not match "JFIF" or "JFXX", or too short */
+    TRACEMS1(cinfo, 1, JTRC_APP0, (int) totallen);
+  }
+}
+
+
+LOCAL(void)
+examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data,
+	       unsigned int datalen, INT32 remaining)
+/* Examine first few bytes from an APP14.
+ * Take appropriate action if it is an Adobe marker.
+ * datalen is # of bytes at data[], remaining is length of rest of marker data.
+ */
+{
+  unsigned int version, flags0, flags1, transform;
+
+  if (datalen >= APP14_DATA_LEN &&
+      GETJOCTET(data[0]) == 0x41 &&
+      GETJOCTET(data[1]) == 0x64 &&
+      GETJOCTET(data[2]) == 0x6F &&
+      GETJOCTET(data[3]) == 0x62 &&
+      GETJOCTET(data[4]) == 0x65) {
+    /* Found Adobe APP14 marker */
+    version = (GETJOCTET(data[5]) << 8) + GETJOCTET(data[6]);
+    flags0 = (GETJOCTET(data[7]) << 8) + GETJOCTET(data[8]);
+    flags1 = (GETJOCTET(data[9]) << 8) + GETJOCTET(data[10]);
+    transform = GETJOCTET(data[11]);
+    TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform);
+    cinfo->saw_Adobe_marker = TRUE;
+    cinfo->Adobe_transform = (UINT8) transform;
+  } else {
+    /* Start of APP14 does not match "Adobe", or too short */
+    TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining));
+  }
+}
+
+
+METHODDEF(boolean)
+get_interesting_appn (j_decompress_ptr cinfo)
+/* Process an APP0 or APP14 marker without saving it */
+{
+  INT32 length;
+  JOCTET b[APPN_DATA_LEN];
+  unsigned int i, numtoread;
+  INPUT_VARS(cinfo);
+
+  INPUT_2BYTES(cinfo, length, return FALSE);
+  length -= 2;
+
+  /* get the interesting part of the marker data */
+  if (length >= APPN_DATA_LEN)
+    numtoread = APPN_DATA_LEN;
+  else if (length > 0)
+    numtoread = (unsigned int) length;
+  else
+    numtoread = 0;
+  for (i = 0; i < numtoread; i++)
+    INPUT_BYTE(cinfo, b[i], return FALSE);
+  length -= numtoread;
+
+  /* process it */
+  switch (cinfo->unread_marker) {
+  case M_APP0:
+    examine_app0(cinfo, (JOCTET FAR *) b, numtoread, length);
+    break;
+  case M_APP14:
+    examine_app14(cinfo, (JOCTET FAR *) b, numtoread, length);
+    break;
+  default:
+    /* can't get here unless jpeg_save_markers chooses wrong processor */
+    ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker);
+    break;
+  }
+
+  /* skip any remaining data -- could be lots */
+  INPUT_SYNC(cinfo);
+  if (length > 0)
+    (*cinfo->src->skip_input_data) (cinfo, (long) length);
+
+  return TRUE;
+}
+
+
+#ifdef SAVE_MARKERS_SUPPORTED
+
+METHODDEF(boolean)
+save_marker (j_decompress_ptr cinfo)
+/* Save an APPn or COM marker into the marker list */
+{
+  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
+  jpeg_saved_marker_ptr cur_marker = marker->cur_marker;
+  unsigned int bytes_read, data_length;
+  JOCTET FAR * data;
+  INT32 length = 0;
+  INPUT_VARS(cinfo);
+
+  if (cur_marker == NULL) {
+    /* begin reading a marker */
+    INPUT_2BYTES(cinfo, length, return FALSE);
+    length -= 2;
+    if (length >= 0) {		/* watch out for bogus length word */
+      /* figure out how much we want to save */
+      unsigned int limit;
+      if (cinfo->unread_marker == (int) M_COM)
+	limit = marker->length_limit_COM;
+      else
+	limit = marker->length_limit_APPn[cinfo->unread_marker - (int) M_APP0];
+      if ((unsigned int) length < limit)
+	limit = (unsigned int) length;
+      /* allocate and initialize the marker item */
+      cur_marker = (jpeg_saved_marker_ptr)
+	(*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				    SIZEOF(struct jpeg_marker_struct) + limit);
+      cur_marker->next = NULL;
+      cur_marker->marker = (UINT8) cinfo->unread_marker;
+      cur_marker->original_length = (unsigned int) length;
+      cur_marker->data_length = limit;
+      /* data area is just beyond the jpeg_marker_struct */
+      data = cur_marker->data = (JOCTET FAR *) (cur_marker + 1);
+      marker->cur_marker = cur_marker;
+      marker->bytes_read = 0;
+      bytes_read = 0;
+      data_length = limit;
+    } else {
+      /* deal with bogus length word */
+      bytes_read = data_length = 0;
+      data = NULL;
+    }
+  } else {
+    /* resume reading a marker */
+    bytes_read = marker->bytes_read;
+    data_length = cur_marker->data_length;
+    data = cur_marker->data + bytes_read;
+  }
+
+  while (bytes_read < data_length) {
+    INPUT_SYNC(cinfo);		/* move the restart point to here */
+    marker->bytes_read = bytes_read;
+    /* If there's not at least one byte in buffer, suspend */
+    MAKE_BYTE_AVAIL(cinfo, return FALSE);
+    /* Copy bytes with reasonable rapidity */
+    while (bytes_read < data_length && bytes_in_buffer > 0) {
+      *data++ = *next_input_byte++;
+      bytes_in_buffer--;
+      bytes_read++;
+    }
+  }
+
+  /* Done reading what we want to read */
+  if (cur_marker != NULL) {	/* will be NULL if bogus length word */
+    /* Add new marker to end of list */
+    if (cinfo->marker_list == NULL) {
+      cinfo->marker_list = cur_marker;
+    } else {
+      jpeg_saved_marker_ptr prev = cinfo->marker_list;
+      while (prev->next != NULL)
+	prev = prev->next;
+      prev->next = cur_marker;
+    }
+    /* Reset pointer & calc remaining data length */
+    data = cur_marker->data;
+    length = cur_marker->original_length - data_length;
+  }
+  /* Reset to initial state for next marker */
+  marker->cur_marker = NULL;
+
+  /* Process the marker if interesting; else just make a generic trace msg */
+  switch (cinfo->unread_marker) {
+  case M_APP0:
+    examine_app0(cinfo, data, data_length, length);
+    break;
+  case M_APP14:
+    examine_app14(cinfo, data, data_length, length);
+    break;
+  default:
+    TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker,
+	     (int) (data_length + length));
+    break;
+  }
+
+  /* skip any remaining data -- could be lots */
+  INPUT_SYNC(cinfo);		/* do before skip_input_data */
+  if (length > 0)
+    (*cinfo->src->skip_input_data) (cinfo, (long) length);
+
+  return TRUE;
+}
+
+#endif /* SAVE_MARKERS_SUPPORTED */
+
+
+METHODDEF(boolean)
+skip_variable (j_decompress_ptr cinfo)
+/* Skip over an unknown or uninteresting variable-length marker */
+{
+  INT32 length;
+  INPUT_VARS(cinfo);
+
+  INPUT_2BYTES(cinfo, length, return FALSE);
+  length -= 2;
+  
+  TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, (int) length);
+
+  INPUT_SYNC(cinfo);		/* do before skip_input_data */
+  if (length > 0)
+    (*cinfo->src->skip_input_data) (cinfo, (long) length);
+
+  return TRUE;
+}
+
+
+/*
+ * Find the next JPEG marker, save it in cinfo->unread_marker.
+ * Returns FALSE if had to suspend before reaching a marker;
+ * in that case cinfo->unread_marker is unchanged.
+ *
+ * Note that the result might not be a valid marker code,
+ * but it will never be 0 or FF.
+ */
+
+LOCAL(boolean)
+next_marker (j_decompress_ptr cinfo)
+{
+  int c;
+  INPUT_VARS(cinfo);
+
+  for (;;) {
+    INPUT_BYTE(cinfo, c, return FALSE);
+    /* Skip any non-FF bytes.
+     * This may look a bit inefficient, but it will not occur in a valid file.
+     * We sync after each discarded byte so that a suspending data source
+     * can discard the byte from its buffer.
+     */
+    while (c != 0xFF) {
+      cinfo->marker->discarded_bytes++;
+      INPUT_SYNC(cinfo);
+      INPUT_BYTE(cinfo, c, return FALSE);
+    }
+    /* This loop swallows any duplicate FF bytes.  Extra FFs are legal as
+     * pad bytes, so don't count them in discarded_bytes.  We assume there
+     * will not be so many consecutive FF bytes as to overflow a suspending
+     * data source's input buffer.
+     */
+    do {
+      INPUT_BYTE(cinfo, c, return FALSE);
+    } while (c == 0xFF);
+    if (c != 0)
+      break;			/* found a valid marker, exit loop */
+    /* Reach here if we found a stuffed-zero data sequence (FF/00).
+     * Discard it and loop back to try again.
+     */
+    cinfo->marker->discarded_bytes += 2;
+    INPUT_SYNC(cinfo);
+  }
+
+  if (cinfo->marker->discarded_bytes != 0) {
+    WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA, cinfo->marker->discarded_bytes, c);
+    cinfo->marker->discarded_bytes = 0;
+  }
+
+  cinfo->unread_marker = c;
+
+  INPUT_SYNC(cinfo);
+  return TRUE;
+}
+
+
+LOCAL(boolean)
+first_marker (j_decompress_ptr cinfo)
+/* Like next_marker, but used to obtain the initial SOI marker. */
+/* For this marker, we do not allow preceding garbage or fill; otherwise,
+ * we might well scan an entire input file before realizing it ain't JPEG.
+ * If an application wants to process non-JFIF files, it must seek to the
+ * SOI before calling the JPEG library.
+ */
+{
+  int c, c2;
+  INPUT_VARS(cinfo);
+
+  INPUT_BYTE(cinfo, c, return FALSE);
+  INPUT_BYTE(cinfo, c2, return FALSE);
+  if (c != 0xFF || c2 != (int) M_SOI)
+    ERREXIT2(cinfo, JERR_NO_SOI, c, c2);
+
+  cinfo->unread_marker = c2;
+
+  INPUT_SYNC(cinfo);
+  return TRUE;
+}
+
+
+/*
+ * Read markers until SOS or EOI.
+ *
+ * Returns same codes as are defined for jpeg_consume_input:
+ * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
+ */
+
+METHODDEF(int)
+read_markers (j_decompress_ptr cinfo)
+{
+  /* Outer loop repeats once for each marker. */
+  for (;;) {
+    /* Collect the marker proper, unless we already did. */
+    /* NB: first_marker() enforces the requirement that SOI appear first. */
+    if (cinfo->unread_marker == 0) {
+      if (! cinfo->marker->saw_SOI) {
+	if (! first_marker(cinfo))
+	  return JPEG_SUSPENDED;
+      } else {
+	if (! next_marker(cinfo))
+	  return JPEG_SUSPENDED;
+      }
+    }
+    /* At this point cinfo->unread_marker contains the marker code and the
+     * input point is just past the marker proper, but before any parameters.
+     * A suspension will cause us to return with this state still true.
+     */
+    switch (cinfo->unread_marker) {
+    case M_SOI:
+      if (! get_soi(cinfo))
+	return JPEG_SUSPENDED;
+      break;
+
+    case M_SOF0:		/* Baseline */
+    case M_SOF1:		/* Extended sequential, Huffman */
+      if (! get_sof(cinfo, FALSE, FALSE))
+	return JPEG_SUSPENDED;
+      break;
+
+    case M_SOF2:		/* Progressive, Huffman */
+      if (! get_sof(cinfo, TRUE, FALSE))
+	return JPEG_SUSPENDED;
+      break;
+
+    case M_SOF9:		/* Extended sequential, arithmetic */
+      if (! get_sof(cinfo, FALSE, TRUE))
+	return JPEG_SUSPENDED;
+      break;
+
+    case M_SOF10:		/* Progressive, arithmetic */
+      if (! get_sof(cinfo, TRUE, TRUE))
+	return JPEG_SUSPENDED;
+      break;
+
+    /* Currently unsupported SOFn types */
+    case M_SOF3:		/* Lossless, Huffman */
+    case M_SOF5:		/* Differential sequential, Huffman */
+    case M_SOF6:		/* Differential progressive, Huffman */
+    case M_SOF7:		/* Differential lossless, Huffman */
+    case M_JPG:			/* Reserved for JPEG extensions */
+    case M_SOF11:		/* Lossless, arithmetic */
+    case M_SOF13:		/* Differential sequential, arithmetic */
+    case M_SOF14:		/* Differential progressive, arithmetic */
+    case M_SOF15:		/* Differential lossless, arithmetic */
+      ERREXIT1(cinfo, JERR_SOF_UNSUPPORTED, cinfo->unread_marker);
+      break;
+
+    case M_SOS:
+      if (! get_sos(cinfo))
+	return JPEG_SUSPENDED;
+      cinfo->unread_marker = 0;	/* processed the marker */
+      return JPEG_REACHED_SOS;
+    
+    case M_EOI:
+      TRACEMS(cinfo, 1, JTRC_EOI);
+      cinfo->unread_marker = 0;	/* processed the marker */
+      return JPEG_REACHED_EOI;
+      
+    case M_DAC:
+      if (! get_dac(cinfo))
+	return JPEG_SUSPENDED;
+      break;
+      
+    case M_DHT:
+      if (! get_dht(cinfo))
+	return JPEG_SUSPENDED;
+      break;
+      
+    case M_DQT:
+      if (! get_dqt(cinfo))
+	return JPEG_SUSPENDED;
+      break;
+      
+    case M_DRI:
+      if (! get_dri(cinfo))
+	return JPEG_SUSPENDED;
+      break;
+      
+    case M_APP0:
+    case M_APP1:
+    case M_APP2:
+    case M_APP3:
+    case M_APP4:
+    case M_APP5:
+    case M_APP6:
+    case M_APP7:
+    case M_APP8:
+    case M_APP9:
+    case M_APP10:
+    case M_APP11:
+    case M_APP12:
+    case M_APP13:
+    case M_APP14:
+    case M_APP15:
+      if (! (*((my_marker_ptr) cinfo->marker)->process_APPn[
+		cinfo->unread_marker - (int) M_APP0]) (cinfo))
+	return JPEG_SUSPENDED;
+      break;
+      
+    case M_COM:
+      if (! (*((my_marker_ptr) cinfo->marker)->process_COM) (cinfo))
+	return JPEG_SUSPENDED;
+      break;
+
+    case M_RST0:		/* these are all parameterless */
+    case M_RST1:
+    case M_RST2:
+    case M_RST3:
+    case M_RST4:
+    case M_RST5:
+    case M_RST6:
+    case M_RST7:
+    case M_TEM:
+      TRACEMS1(cinfo, 1, JTRC_PARMLESS_MARKER, cinfo->unread_marker);
+      break;
+
+    case M_DNL:			/* Ignore DNL ... perhaps the wrong thing */
+      if (! skip_variable(cinfo))
+	return JPEG_SUSPENDED;
+      break;
+
+    default:			/* must be DHP, EXP, JPGn, or RESn */
+      /* For now, we treat the reserved markers as fatal errors since they are
+       * likely to be used to signal incompatible JPEG Part 3 extensions.
+       * Once the JPEG 3 version-number marker is well defined, this code
+       * ought to change!
+       */
+      ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker);
+      break;
+    }
+    /* Successfully processed marker, so reset state variable */
+    cinfo->unread_marker = 0;
+  } /* end loop */
+}
+
+
+/*
+ * Read a restart marker, which is expected to appear next in the datastream;
+ * if the marker is not there, take appropriate recovery action.
+ * Returns FALSE if suspension is required.
+ *
+ * This is called by the entropy decoder after it has read an appropriate
+ * number of MCUs.  cinfo->unread_marker may be nonzero if the entropy decoder
+ * has already read a marker from the data source.  Under normal conditions
+ * cinfo->unread_marker will be reset to 0 before returning; if not reset,
+ * it holds a marker which the decoder will be unable to read past.
+ */
+
+METHODDEF(boolean)
+read_restart_marker (j_decompress_ptr cinfo)
+{
+  /* Obtain a marker unless we already did. */
+  /* Note that next_marker will complain if it skips any data. */
+  if (cinfo->unread_marker == 0) {
+    if (! next_marker(cinfo))
+      return FALSE;
+  }
+
+  if (cinfo->unread_marker ==
+      ((int) M_RST0 + cinfo->marker->next_restart_num)) {
+    /* Normal case --- swallow the marker and let entropy decoder continue */
+    TRACEMS1(cinfo, 3, JTRC_RST, cinfo->marker->next_restart_num);
+    cinfo->unread_marker = 0;
+  } else {
+    /* Uh-oh, the restart markers have been messed up. */
+    /* Let the data source manager determine how to resync. */
+    if (! (*cinfo->src->resync_to_restart) (cinfo,
+					    cinfo->marker->next_restart_num))
+      return FALSE;
+  }
+
+  /* Update next-restart state */
+  cinfo->marker->next_restart_num = (cinfo->marker->next_restart_num + 1) & 7;
+
+  return TRUE;
+}
+
+
+/*
+ * This is the default resync_to_restart method for data source managers
+ * to use if they don't have any better approach.  Some data source managers
+ * may be able to back up, or may have additional knowledge about the data
+ * which permits a more intelligent recovery strategy; such managers would
+ * presumably supply their own resync method.
+ *
+ * read_restart_marker calls resync_to_restart if it finds a marker other than
+ * the restart marker it was expecting.  (This code is *not* used unless
+ * a nonzero restart interval has been declared.)  cinfo->unread_marker is
+ * the marker code actually found (might be anything, except 0 or FF).
+ * The desired restart marker number (0..7) is passed as a parameter.
+ * This routine is supposed to apply whatever error recovery strategy seems
+ * appropriate in order to position the input stream to the next data segment.
+ * Note that cinfo->unread_marker is treated as a marker appearing before
+ * the current data-source input point; usually it should be reset to zero
+ * before returning.
+ * Returns FALSE if suspension is required.
+ *
+ * This implementation is substantially constrained by wanting to treat the
+ * input as a data stream; this means we can't back up.  Therefore, we have
+ * only the following actions to work with:
+ *   1. Simply discard the marker and let the entropy decoder resume at next
+ *      byte of file.
+ *   2. Read forward until we find another marker, discarding intervening
+ *      data.  (In theory we could look ahead within the current bufferload,
+ *      without having to discard data if we don't find the desired marker.
+ *      This idea is not implemented here, in part because it makes behavior
+ *      dependent on buffer size and chance buffer-boundary positions.)
+ *   3. Leave the marker unread (by failing to zero cinfo->unread_marker).
+ *      This will cause the entropy decoder to process an empty data segment,
+ *      inserting dummy zeroes, and then we will reprocess the marker.
+ *
+ * #2 is appropriate if we think the desired marker lies ahead, while #3 is
+ * appropriate if the found marker is a future restart marker (indicating
+ * that we have missed the desired restart marker, probably because it got
+ * corrupted).
+ * We apply #2 or #3 if the found marker is a restart marker no more than
+ * two counts behind or ahead of the expected one.  We also apply #2 if the
+ * found marker is not a legal JPEG marker code (it's certainly bogus data).
+ * If the found marker is a restart marker more than 2 counts away, we do #1
+ * (too much risk that the marker is erroneous; with luck we will be able to
+ * resync at some future point).
+ * For any valid non-restart JPEG marker, we apply #3.  This keeps us from
+ * overrunning the end of a scan.  An implementation limited to single-scan
+ * files might find it better to apply #2 for markers other than EOI, since
+ * any other marker would have to be bogus data in that case.
+ */
+
+GLOBAL(boolean)
+jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired)
+{
+  int marker = cinfo->unread_marker;
+  int action = 1;
+  
+  /* Always put up a warning. */
+  WARNMS2(cinfo, JWRN_MUST_RESYNC, marker, desired);
+  
+  /* Outer loop handles repeated decision after scanning forward. */
+  for (;;) {
+    if (marker < (int) M_SOF0)
+      action = 2;		/* invalid marker */
+    else if (marker < (int) M_RST0 || marker > (int) M_RST7)
+      action = 3;		/* valid non-restart marker */
+    else {
+      if (marker == ((int) M_RST0 + ((desired+1) & 7)) ||
+	  marker == ((int) M_RST0 + ((desired+2) & 7)))
+	action = 3;		/* one of the next two expected restarts */
+      else if (marker == ((int) M_RST0 + ((desired-1) & 7)) ||
+	       marker == ((int) M_RST0 + ((desired-2) & 7)))
+	action = 2;		/* a prior restart, so advance */
+      else
+	action = 1;		/* desired restart or too far away */
+    }
+    TRACEMS2(cinfo, 4, JTRC_RECOVERY_ACTION, marker, action);
+    switch (action) {
+    case 1:
+      /* Discard marker and let entropy decoder resume processing. */
+      cinfo->unread_marker = 0;
+      return TRUE;
+    case 2:
+      /* Scan to the next marker, and repeat the decision loop. */
+      if (! next_marker(cinfo))
+	return FALSE;
+      marker = cinfo->unread_marker;
+      break;
+    case 3:
+      /* Return without advancing past this marker. */
+      /* Entropy decoder will be forced to process an empty segment. */
+      return TRUE;
+    }
+  } /* end loop */
+}
+
+
+/*
+ * Reset marker processing state to begin a fresh datastream.
+ */
+
+METHODDEF(void)
+reset_marker_reader (j_decompress_ptr cinfo)
+{
+  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
+
+  cinfo->comp_info = NULL;		/* until allocated by get_sof */
+  cinfo->input_scan_number = 0;		/* no SOS seen yet */
+  cinfo->unread_marker = 0;		/* no pending marker */
+  marker->pub.saw_SOI = FALSE;		/* set internal state too */
+  marker->pub.saw_SOF = FALSE;
+  marker->pub.discarded_bytes = 0;
+  marker->cur_marker = NULL;
+}
+
+
+/*
+ * Initialize the marker reader module.
+ * This is called only once, when the decompression object is created.
+ */
+
+GLOBAL(void)
+jinit_marker_reader (j_decompress_ptr cinfo)
+{
+  my_marker_ptr marker;
+  int i;
+
+  /* Create subobject in permanent pool */
+  marker = (my_marker_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
+				SIZEOF(my_marker_reader));
+  cinfo->marker = (struct jpeg_marker_reader *) marker;
+  /* Initialize public method pointers */
+  marker->pub.reset_marker_reader = reset_marker_reader;
+  marker->pub.read_markers = read_markers;
+  marker->pub.read_restart_marker = read_restart_marker;
+  /* Initialize COM/APPn processing.
+   * By default, we examine and then discard APP0 and APP14,
+   * but simply discard COM and all other APPn.
+   */
+  marker->process_COM = skip_variable;
+  marker->length_limit_COM = 0;
+  for (i = 0; i < 16; i++) {
+    marker->process_APPn[i] = skip_variable;
+    marker->length_limit_APPn[i] = 0;
+  }
+  marker->process_APPn[0] = get_interesting_appn;
+  marker->process_APPn[14] = get_interesting_appn;
+  /* Reset marker processing state */
+  reset_marker_reader(cinfo);
+}
+
+
+/*
+ * Control saving of COM and APPn markers into marker_list.
+ */
+
+#ifdef SAVE_MARKERS_SUPPORTED
+
+GLOBAL(void)
+jpeg_save_markers (j_decompress_ptr cinfo, int marker_code,
+		   unsigned int length_limit)
+{
+  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
+  long maxlength;
+  jpeg_marker_parser_method processor;
+
+  /* Length limit mustn't be larger than what we can allocate
+   * (should only be a concern in a 16-bit environment).
+   */
+  maxlength = cinfo->mem->max_alloc_chunk - SIZEOF(struct jpeg_marker_struct);
+  if (((long) length_limit) > maxlength)
+    length_limit = (unsigned int) maxlength;
+
+  /* Choose processor routine to use.
+   * APP0/APP14 have special requirements.
+   */
+  if (length_limit) {
+    processor = save_marker;
+    /* If saving APP0/APP14, save at least enough for our internal use. */
+    if (marker_code == (int) M_APP0 && length_limit < APP0_DATA_LEN)
+      length_limit = APP0_DATA_LEN;
+    else if (marker_code == (int) M_APP14 && length_limit < APP14_DATA_LEN)
+      length_limit = APP14_DATA_LEN;
+  } else {
+    processor = skip_variable;
+    /* If discarding APP0/APP14, use our regular on-the-fly processor. */
+    if (marker_code == (int) M_APP0 || marker_code == (int) M_APP14)
+      processor = get_interesting_appn;
+  }
+
+  if (marker_code == (int) M_COM) {
+    marker->process_COM = processor;
+    marker->length_limit_COM = length_limit;
+  } else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) {
+    marker->process_APPn[marker_code - (int) M_APP0] = processor;
+    marker->length_limit_APPn[marker_code - (int) M_APP0] = length_limit;
+  } else
+    ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code);
+}
+
+#endif /* SAVE_MARKERS_SUPPORTED */
+
+
+/*
+ * Install a special processing method for COM or APPn markers.
+ */
+
+GLOBAL(void)
+jpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code,
+			   jpeg_marker_parser_method routine)
+{
+  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
+
+  if (marker_code == (int) M_COM)
+    marker->process_COM = routine;
+  else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15)
+    marker->process_APPn[marker_code - (int) M_APP0] = routine;
+  else
+    ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code);
+}
diff --git a/samples/jpeglib/jdmaster.c b/samples/jpeglib/jdmaster.c
new file mode 100644
index 0000000..2802c5b
--- /dev/null
+++ b/samples/jpeglib/jdmaster.c
@@ -0,0 +1,557 @@
+/*
+ * jdmaster.c
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains master control logic for the JPEG decompressor.
+ * These routines are concerned with selecting the modules to be executed
+ * and with determining the number of passes and the work to be done in each
+ * pass.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Private state */
+
+typedef struct {
+  struct jpeg_decomp_master pub; /* public fields */
+
+  int pass_number;		/* # of passes completed */
+
+  boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */
+
+  /* Saved references to initialized quantizer modules,
+   * in case we need to switch modes.
+   */
+  struct jpeg_color_quantizer * quantizer_1pass;
+  struct jpeg_color_quantizer * quantizer_2pass;
+} my_decomp_master;
+
+typedef my_decomp_master * my_master_ptr;
+
+
+/*
+ * Determine whether merged upsample/color conversion should be used.
+ * CRUCIAL: this must match the actual capabilities of jdmerge.c!
+ */
+
+LOCAL(boolean)
+use_merged_upsample (j_decompress_ptr cinfo)
+{
+#ifdef UPSAMPLE_MERGING_SUPPORTED
+  /* Merging is the equivalent of plain box-filter upsampling */
+  if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling)
+    return FALSE;
+  /* jdmerge.c only supports YCC=>RGB color conversion */
+  if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 ||
+      cinfo->out_color_space != JCS_RGB ||
+      cinfo->out_color_components != RGB_PIXELSIZE)
+    return FALSE;
+  /* and it only handles 2h1v or 2h2v sampling ratios */
+  if (cinfo->comp_info[0].h_samp_factor != 2 ||
+      cinfo->comp_info[1].h_samp_factor != 1 ||
+      cinfo->comp_info[2].h_samp_factor != 1 ||
+      cinfo->comp_info[0].v_samp_factor >  2 ||
+      cinfo->comp_info[1].v_samp_factor != 1 ||
+      cinfo->comp_info[2].v_samp_factor != 1)
+    return FALSE;
+  /* furthermore, it doesn't work if we've scaled the IDCTs differently */
+  if (cinfo->comp_info[0].DCT_scaled_size != cinfo->min_DCT_scaled_size ||
+      cinfo->comp_info[1].DCT_scaled_size != cinfo->min_DCT_scaled_size ||
+      cinfo->comp_info[2].DCT_scaled_size != cinfo->min_DCT_scaled_size)
+    return FALSE;
+  /* ??? also need to test for upsample-time rescaling, when & if supported */
+  return TRUE;			/* by golly, it'll work... */
+#else
+  return FALSE;
+#endif
+}
+
+
+/*
+ * Compute output image dimensions and related values.
+ * NOTE: this is exported for possible use by application.
+ * Hence it mustn't do anything that can't be done twice.
+ * Also note that it may be called before the master module is initialized!
+ */
+
+GLOBAL(void)
+jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
+/* Do computations that are needed before master selection phase */
+{
+#ifdef IDCT_SCALING_SUPPORTED
+  int ci;
+  jpeg_component_info *compptr;
+#endif
+
+  /* Prevent application from calling me at wrong times */
+  if (cinfo->global_state != DSTATE_READY)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+#ifdef IDCT_SCALING_SUPPORTED
+
+  /* Compute actual output image dimensions and DCT scaling choices. */
+  if (cinfo->scale_num * 8 <= cinfo->scale_denom) {
+    /* Provide 1/8 scaling */
+    cinfo->output_width = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_width, 8L);
+    cinfo->output_height = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_height, 8L);
+    cinfo->min_DCT_scaled_size = 1;
+  } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) {
+    /* Provide 1/4 scaling */
+    cinfo->output_width = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_width, 4L);
+    cinfo->output_height = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_height, 4L);
+    cinfo->min_DCT_scaled_size = 2;
+  } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) {
+    /* Provide 1/2 scaling */
+    cinfo->output_width = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_width, 2L);
+    cinfo->output_height = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_height, 2L);
+    cinfo->min_DCT_scaled_size = 4;
+  } else {
+    /* Provide 1/1 scaling */
+    cinfo->output_width = cinfo->image_width;
+    cinfo->output_height = cinfo->image_height;
+    cinfo->min_DCT_scaled_size = DCTSIZE;
+  }
+  /* In selecting the actual DCT scaling for each component, we try to
+   * scale up the chroma components via IDCT scaling rather than upsampling.
+   * This saves time if the upsampler gets to use 1:1 scaling.
+   * Note this code assumes that the supported DCT scalings are powers of 2.
+   */
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    int ssize = cinfo->min_DCT_scaled_size;
+    while (ssize < DCTSIZE &&
+	   (compptr->h_samp_factor * ssize * 2 <=
+	    cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) &&
+	   (compptr->v_samp_factor * ssize * 2 <=
+	    cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size)) {
+      ssize = ssize * 2;
+    }
+    compptr->DCT_scaled_size = ssize;
+  }
+
+  /* Recompute downsampled dimensions of components;
+   * application needs to know these if using raw downsampled data.
+   */
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* Size in samples, after IDCT scaling */
+    compptr->downsampled_width = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_width *
+		    (long) (compptr->h_samp_factor * compptr->DCT_scaled_size),
+		    (long) (cinfo->max_h_samp_factor * DCTSIZE));
+    compptr->downsampled_height = (JDIMENSION)
+      jdiv_round_up((long) cinfo->image_height *
+		    (long) (compptr->v_samp_factor * compptr->DCT_scaled_size),
+		    (long) (cinfo->max_v_samp_factor * DCTSIZE));
+  }
+
+#else /* !IDCT_SCALING_SUPPORTED */
+
+  /* Hardwire it to "no scaling" */
+  cinfo->output_width = cinfo->image_width;
+  cinfo->output_height = cinfo->image_height;
+  /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE,
+   * and has computed unscaled downsampled_width and downsampled_height.
+   */
+
+#endif /* IDCT_SCALING_SUPPORTED */
+
+  /* Report number of components in selected colorspace. */
+  /* Probably this should be in the color conversion module... */
+  switch (cinfo->out_color_space) {
+  case JCS_GRAYSCALE:
+    cinfo->out_color_components = 1;
+    break;
+  case JCS_RGB:
+#if RGB_PIXELSIZE != 3
+    cinfo->out_color_components = RGB_PIXELSIZE;
+    break;
+#endif /* else share code with YCbCr */
+  case JCS_YCbCr:
+    cinfo->out_color_components = 3;
+    break;
+  case JCS_CMYK:
+  case JCS_YCCK:
+    cinfo->out_color_components = 4;
+    break;
+  default:			/* else must be same colorspace as in file */
+    cinfo->out_color_components = cinfo->num_components;
+    break;
+  }
+  cinfo->output_components = (cinfo->quantize_colors ? 1 :
+			      cinfo->out_color_components);
+
+  /* See if upsampler will want to emit more than one row at a time */
+  if (use_merged_upsample(cinfo))
+    cinfo->rec_outbuf_height = cinfo->max_v_samp_factor;
+  else
+    cinfo->rec_outbuf_height = 1;
+}
+
+
+/*
+ * Several decompression processes need to range-limit values to the range
+ * 0..MAXJSAMPLE; the input value may fall somewhat outside this range
+ * due to noise introduced by quantization, roundoff error, etc.  These
+ * processes are inner loops and need to be as fast as possible.  On most
+ * machines, particularly CPUs with pipelines or instruction prefetch,
+ * a (subscript-check-less) C table lookup
+ *		x = sample_range_limit[x];
+ * is faster than explicit tests
+ *		if (x < 0)  x = 0;
+ *		else if (x > MAXJSAMPLE)  x = MAXJSAMPLE;
+ * These processes all use a common table prepared by the routine below.
+ *
+ * For most steps we can mathematically guarantee that the initial value
+ * of x is within MAXJSAMPLE+1 of the legal range, so a table running from
+ * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient.  But for the initial
+ * limiting step (just after the IDCT), a wildly out-of-range value is 
+ * possible if the input data is corrupt.  To avoid any chance of indexing
+ * off the end of memory and getting a bad-pointer trap, we perform the
+ * post-IDCT limiting thus:
+ *		x = range_limit[x & MASK];
+ * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit
+ * samples.  Under normal circumstances this is more than enough range and
+ * a correct output will be generated; with bogus input data the mask will
+ * cause wraparound, and we will safely generate a bogus-but-in-range output.
+ * For the post-IDCT step, we want to convert the data from signed to unsigned
+ * representation by adding CENTERJSAMPLE at the same time that we limit it.
+ * So the post-IDCT limiting table ends up looking like this:
+ *   CENTERJSAMPLE,CENTERJSAMPLE+1,...,MAXJSAMPLE,
+ *   MAXJSAMPLE (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times),
+ *   0          (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times),
+ *   0,1,...,CENTERJSAMPLE-1
+ * Negative inputs select values from the upper half of the table after
+ * masking.
+ *
+ * We can save some space by overlapping the start of the post-IDCT table
+ * with the simpler range limiting table.  The post-IDCT table begins at
+ * sample_range_limit + CENTERJSAMPLE.
+ *
+ * Note that the table is allocated in near data space on PCs; it's small
+ * enough and used often enough to justify this.
+ */
+
+LOCAL(void)
+prepare_range_limit_table (j_decompress_ptr cinfo)
+/* Allocate and fill in the sample_range_limit table */
+{
+  JSAMPLE * table;
+  int i;
+
+  table = (JSAMPLE *)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+		(5 * (MAXJSAMPLE+1) + CENTERJSAMPLE) * SIZEOF(JSAMPLE));
+  table += (MAXJSAMPLE+1);	/* allow negative subscripts of simple table */
+  cinfo->sample_range_limit = table;
+  /* First segment of "simple" table: limit[x] = 0 for x < 0 */
+  MEMZERO(table - (MAXJSAMPLE+1), (MAXJSAMPLE+1) * SIZEOF(JSAMPLE));
+  /* Main part of "simple" table: limit[x] = x */
+  for (i = 0; i <= MAXJSAMPLE; i++)
+    table[i] = (JSAMPLE) i;
+  table += CENTERJSAMPLE;	/* Point to where post-IDCT table starts */
+  /* End of simple table, rest of first half of post-IDCT table */
+  for (i = CENTERJSAMPLE; i < 2*(MAXJSAMPLE+1); i++)
+    table[i] = MAXJSAMPLE;
+  /* Second half of post-IDCT table */
+  MEMZERO(table + (2 * (MAXJSAMPLE+1)),
+	  (2 * (MAXJSAMPLE+1) - CENTERJSAMPLE) * SIZEOF(JSAMPLE));
+  MEMCOPY(table + (4 * (MAXJSAMPLE+1) - CENTERJSAMPLE),
+	  cinfo->sample_range_limit, CENTERJSAMPLE * SIZEOF(JSAMPLE));
+}
+
+
+/*
+ * Master selection of decompression modules.
+ * This is done once at jpeg_start_decompress time.  We determine
+ * which modules will be used and give them appropriate initialization calls.
+ * We also initialize the decompressor input side to begin consuming data.
+ *
+ * Since jpeg_read_header has finished, we know what is in the SOF
+ * and (first) SOS markers.  We also have all the application parameter
+ * settings.
+ */
+
+LOCAL(void)
+master_selection (j_decompress_ptr cinfo)
+{
+  my_master_ptr master = (my_master_ptr) cinfo->master;
+  boolean use_c_buffer;
+  long samplesperrow;
+  JDIMENSION jd_samplesperrow;
+
+  /* Initialize dimensions and other stuff */
+  jpeg_calc_output_dimensions(cinfo);
+  prepare_range_limit_table(cinfo);
+
+  /* Width of an output scanline must be representable as JDIMENSION. */
+  samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components;
+  jd_samplesperrow = (JDIMENSION) samplesperrow;
+  if ((long) jd_samplesperrow != samplesperrow)
+    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
+
+  /* Initialize my private state */
+  master->pass_number = 0;
+  master->using_merged_upsample = use_merged_upsample(cinfo);
+
+  /* Color quantizer selection */
+  master->quantizer_1pass = NULL;
+  master->quantizer_2pass = NULL;
+  /* No mode changes if not using buffered-image mode. */
+  if (! cinfo->quantize_colors || ! cinfo->buffered_image) {
+    cinfo->enable_1pass_quant = FALSE;
+    cinfo->enable_external_quant = FALSE;
+    cinfo->enable_2pass_quant = FALSE;
+  }
+  if (cinfo->quantize_colors) {
+    if (cinfo->raw_data_out)
+      ERREXIT(cinfo, JERR_NOTIMPL);
+    /* 2-pass quantizer only works in 3-component color space. */
+    if (cinfo->out_color_components != 3) {
+      cinfo->enable_1pass_quant = TRUE;
+      cinfo->enable_external_quant = FALSE;
+      cinfo->enable_2pass_quant = FALSE;
+      cinfo->colormap = NULL;
+    } else if (cinfo->colormap != NULL) {
+      cinfo->enable_external_quant = TRUE;
+    } else if (cinfo->two_pass_quantize) {
+      cinfo->enable_2pass_quant = TRUE;
+    } else {
+      cinfo->enable_1pass_quant = TRUE;
+    }
+
+    if (cinfo->enable_1pass_quant) {
+#ifdef QUANT_1PASS_SUPPORTED
+      jinit_1pass_quantizer(cinfo);
+      master->quantizer_1pass = cinfo->cquantize;
+#else
+      ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+    }
+
+    /* We use the 2-pass code to map to external colormaps. */
+    if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) {
+#ifdef QUANT_2PASS_SUPPORTED
+      jinit_2pass_quantizer(cinfo);
+      master->quantizer_2pass = cinfo->cquantize;
+#else
+      ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+    }
+    /* If both quantizers are initialized, the 2-pass one is left active;
+     * this is necessary for starting with quantization to an external map.
+     */
+  }
+
+  /* Post-processing: in particular, color conversion first */
+  if (! cinfo->raw_data_out) {
+    if (master->using_merged_upsample) {
+#ifdef UPSAMPLE_MERGING_SUPPORTED
+      jinit_merged_upsampler(cinfo); /* does color conversion too */
+#else
+      ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+    } else {
+      jinit_color_deconverter(cinfo);
+      jinit_upsampler(cinfo);
+    }
+    jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant);
+  }
+  /* Inverse DCT */
+  jinit_inverse_dct(cinfo);
+  /* Entropy decoding: either Huffman or arithmetic coding. */
+  if (cinfo->arith_code) {
+    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
+  } else {
+    if (cinfo->progressive_mode) {
+#ifdef D_PROGRESSIVE_SUPPORTED
+      jinit_phuff_decoder(cinfo);
+#else
+      ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+    } else
+      jinit_huff_decoder(cinfo);
+  }
+
+  /* Initialize principal buffer controllers. */
+  use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image;
+  jinit_d_coef_controller(cinfo, use_c_buffer);
+
+  if (! cinfo->raw_data_out)
+    jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */);
+
+  /* We can now tell the memory manager to allocate virtual arrays. */
+  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
+
+  /* Initialize input side of decompressor to consume first scan. */
+  (*cinfo->inputctl->start_input_pass) (cinfo);
+
+#ifdef D_MULTISCAN_FILES_SUPPORTED
+  /* If jpeg_start_decompress will read the whole file, initialize
+   * progress monitoring appropriately.  The input step is counted
+   * as one pass.
+   */
+  if (cinfo->progress != NULL && ! cinfo->buffered_image &&
+      cinfo->inputctl->has_multiple_scans) {
+    int nscans;
+    /* Estimate number of scans to set pass_limit. */
+    if (cinfo->progressive_mode) {
+      /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */
+      nscans = 2 + 3 * cinfo->num_components;
+    } else {
+      /* For a nonprogressive multiscan file, estimate 1 scan per component. */
+      nscans = cinfo->num_components;
+    }
+    cinfo->progress->pass_counter = 0L;
+    cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans;
+    cinfo->progress->completed_passes = 0;
+    cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2);
+    /* Count the input pass as done */
+    master->pass_number++;
+  }
+#endif /* D_MULTISCAN_FILES_SUPPORTED */
+}
+
+
+/*
+ * Per-pass setup.
+ * This is called at the beginning of each output pass.  We determine which
+ * modules will be active during this pass and give them appropriate
+ * start_pass calls.  We also set is_dummy_pass to indicate whether this
+ * is a "real" output pass or a dummy pass for color quantization.
+ * (In the latter case, jdapistd.c will crank the pass to completion.)
+ */
+
+METHODDEF(void)
+prepare_for_output_pass (j_decompress_ptr cinfo)
+{
+  my_master_ptr master = (my_master_ptr) cinfo->master;
+
+  if (master->pub.is_dummy_pass) {
+#ifdef QUANT_2PASS_SUPPORTED
+    /* Final pass of 2-pass quantization */
+    master->pub.is_dummy_pass = FALSE;
+    (*cinfo->cquantize->start_pass) (cinfo, FALSE);
+    (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST);
+    (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST);
+#else
+    ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif /* QUANT_2PASS_SUPPORTED */
+  } else {
+    if (cinfo->quantize_colors && cinfo->colormap == NULL) {
+      /* Select new quantization method */
+      if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) {
+	cinfo->cquantize = master->quantizer_2pass;
+	master->pub.is_dummy_pass = TRUE;
+      } else if (cinfo->enable_1pass_quant) {
+	cinfo->cquantize = master->quantizer_1pass;
+      } else {
+	ERREXIT(cinfo, JERR_MODE_CHANGE);
+      }
+    }
+    (*cinfo->idct->start_pass) (cinfo);
+    (*cinfo->coef->start_output_pass) (cinfo);
+    if (! cinfo->raw_data_out) {
+      if (! master->using_merged_upsample)
+	(*cinfo->cconvert->start_pass) (cinfo);
+      (*cinfo->upsample->start_pass) (cinfo);
+      if (cinfo->quantize_colors)
+	(*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass);
+      (*cinfo->post->start_pass) (cinfo,
+	    (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU));
+      (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU);
+    }
+  }
+
+  /* Set up progress monitor's pass info if present */
+  if (cinfo->progress != NULL) {
+    cinfo->progress->completed_passes = master->pass_number;
+    cinfo->progress->total_passes = master->pass_number +
+				    (master->pub.is_dummy_pass ? 2 : 1);
+    /* In buffered-image mode, we assume one more output pass if EOI not
+     * yet reached, but no more passes if EOI has been reached.
+     */
+    if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) {
+      cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1);
+    }
+  }
+}
+
+
+/*
+ * Finish up at end of an output pass.
+ */
+
+METHODDEF(void)
+finish_output_pass (j_decompress_ptr cinfo)
+{
+  my_master_ptr master = (my_master_ptr) cinfo->master;
+
+  if (cinfo->quantize_colors)
+    (*cinfo->cquantize->finish_pass) (cinfo);
+  master->pass_number++;
+}
+
+
+#ifdef D_MULTISCAN_FILES_SUPPORTED
+
+/*
+ * Switch to a new external colormap between output passes.
+ */
+
+GLOBAL(void)
+jpeg_new_colormap (j_decompress_ptr cinfo)
+{
+  my_master_ptr master = (my_master_ptr) cinfo->master;
+
+  /* Prevent application from calling me at wrong times */
+  if (cinfo->global_state != DSTATE_BUFIMAGE)
+    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+
+  if (cinfo->quantize_colors && cinfo->enable_external_quant &&
+      cinfo->colormap != NULL) {
+    /* Select 2-pass quantizer for external colormap use */
+    cinfo->cquantize = master->quantizer_2pass;
+    /* Notify quantizer of colormap change */
+    (*cinfo->cquantize->new_color_map) (cinfo);
+    master->pub.is_dummy_pass = FALSE; /* just in case */
+  } else
+    ERREXIT(cinfo, JERR_MODE_CHANGE);
+}
+
+#endif /* D_MULTISCAN_FILES_SUPPORTED */
+
+
+/*
+ * Initialize master decompression control and select active modules.
+ * This is performed at the start of jpeg_start_decompress.
+ */
+
+GLOBAL(void)
+jinit_master_decompress (j_decompress_ptr cinfo)
+{
+  my_master_ptr master;
+
+  master = (my_master_ptr)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  SIZEOF(my_decomp_master));
+  cinfo->master = (struct jpeg_decomp_master *) master;
+  master->pub.prepare_for_output_pass = prepare_for_output_pass;
+  master->pub.finish_output_pass = finish_output_pass;
+
+  master->pub.is_dummy_pass = FALSE;
+
+  master_selection(cinfo);
+}
diff --git a/samples/jpeglib/jdmerge.c b/samples/jpeglib/jdmerge.c
new file mode 100644
index 0000000..3744446
--- /dev/null
+++ b/samples/jpeglib/jdmerge.c
@@ -0,0 +1,400 @@
+/*
+ * jdmerge.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains code for merged upsampling/color conversion.
+ *
+ * This file combines functions from jdsample.c and jdcolor.c;
+ * read those files first to understand what's going on.
+ *
+ * When the chroma components are to be upsampled by simple replication
+ * (ie, box filtering), we can save some work in color conversion by
+ * calculating all the output pixels corresponding to a pair of chroma
+ * samples at one time.  In the conversion equations
+ *	R = Y           + K1 * Cr
+ *	G = Y + K2 * Cb + K3 * Cr
+ *	B = Y + K4 * Cb
+ * only the Y term varies among the group of pixels corresponding to a pair
+ * of chroma samples, so the rest of the terms can be calculated just once.
+ * At typical sampling ratios, this eliminates half or three-quarters of the
+ * multiplications needed for color conversion.
+ *
+ * This file currently provides implementations for the following cases:
+ *	YCbCr => RGB color conversion only.
+ *	Sampling ratios of 2h1v or 2h2v.
+ *	No scaling needed at upsample time.
+ *	Corner-aligned (non-CCIR601) sampling alignment.
+ * Other special cases could be added, but in most applications these are
+ * the only common cases.  (For uncommon cases we fall back on the more
+ * general code in jdsample.c and jdcolor.c.)
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+#ifdef UPSAMPLE_MERGING_SUPPORTED
+
+
+/* Private subobject */
+
+typedef struct {
+  struct jpeg_upsampler pub;	/* public fields */
+
+  /* Pointer to routine to do actual upsampling/conversion of one row group */
+  JMETHOD(void, upmethod, (j_decompress_ptr cinfo,
+			   JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
+			   JSAMPARRAY output_buf));
+
+  /* Private state for YCC->RGB conversion */
+  int * Cr_r_tab;		/* => table for Cr to R conversion */
+  int * Cb_b_tab;		/* => table for Cb to B conversion */
+  INT32 * Cr_g_tab;		/* => table for Cr to G conversion */
+  INT32 * Cb_g_tab;		/* => table for Cb to G conversion */
+
+  /* For 2:1 vertical sampling, we produce two output rows at a time.
+   * We need a "spare" row buffer to hold the second output row if the
+   * application provides just a one-row buffer; we also use the spare
+   * to discard the dummy last row if the image height is odd.
+   */
+  JSAMPROW spare_row;
+  boolean spare_full;		/* T if spare buffer is occupied */
+
+  JDIMENSION out_row_width;	/* samples per output row */
+  JDIMENSION rows_to_go;	/* counts rows remaining in image */
+} my_upsampler;
+
+typedef my_upsampler * my_upsample_ptr;
+
+#define SCALEBITS	16	/* speediest right-shift on some machines */
+#define ONE_HALF	((INT32) 1 << (SCALEBITS-1))
+#define FIX(x)		((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
+
+
+/*
+ * Initialize tables for YCC->RGB colorspace conversion.
+ * This is taken directly from jdcolor.c; see that file for more info.
+ */
+
+LOCAL(void)
+build_ycc_rgb_table (j_decompress_ptr cinfo)
+{
+  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
+  int i;
+  INT32 x;
+  SHIFT_TEMPS
+
+  upsample->Cr_r_tab = (int *)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				(MAXJSAMPLE+1) * SIZEOF(int));
+  upsample->Cb_b_tab = (int *)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				(MAXJSAMPLE+1) * SIZEOF(int));
+  upsample->Cr_g_tab = (INT32 *)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				(MAXJSAMPLE+1) * SIZEOF(INT32));
+  upsample->Cb_g_tab = (INT32 *)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				(MAXJSAMPLE+1) * SIZEOF(INT32));
+
+  for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {
+    /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */
+    /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */
+    /* Cr=>R value is nearest int to 1.40200 * x */
+    upsample->Cr_r_tab[i] = (int)
+		    RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS);
+    /* Cb=>B value is nearest int to 1.77200 * x */
+    upsample->Cb_b_tab[i] = (int)
+		    RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS);
+    /* Cr=>G value is scaled-up -0.71414 * x */
+    upsample->Cr_g_tab[i] = (- FIX(0.71414)) * x;
+    /* Cb=>G value is scaled-up -0.34414 * x */
+    /* We also add in ONE_HALF so that need not do it in inner loop */
+    upsample->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF;
+  }
+}
+
+
+/*
+ * Initialize for an upsampling pass.
+ */
+
+METHODDEF(void)
+start_pass_merged_upsample (j_decompress_ptr cinfo)
+{
+  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
+
+  /* Mark the spare buffer empty */
+  upsample->spare_full = FALSE;
+  /* Initialize total-height counter for detecting bottom of image */
+  upsample->rows_to_go = cinfo->output_height;
+}
+
+
+/*
+ * Control routine to do upsampling (and color conversion).
+ *
+ * The control routine just handles the row buffering considerations.
+ */
+
+METHODDEF(void)
+merged_2v_upsample (j_decompress_ptr cinfo,
+		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
+		    JDIMENSION in_row_groups_avail,
+		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+		    JDIMENSION out_rows_avail)
+/* 2:1 vertical sampling case: may need a spare row. */
+{
+  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
+  JSAMPROW work_ptrs[2];
+  JDIMENSION num_rows;		/* number of rows returned to caller */
+
+  if (upsample->spare_full) {
+    /* If we have a spare row saved from a previous cycle, just return it. */
+    jcopy_sample_rows(& upsample->spare_row, 0, output_buf + *out_row_ctr, 0,
+		      1, upsample->out_row_width);
+    num_rows = 1;
+    upsample->spare_full = FALSE;
+  } else {
+    /* Figure number of rows to return to caller. */
+    num_rows = 2;
+    /* Not more than the distance to the end of the image. */
+    if (num_rows > upsample->rows_to_go)
+      num_rows = upsample->rows_to_go;
+    /* And not more than what the client can accept: */
+    out_rows_avail -= *out_row_ctr;
+    if (num_rows > out_rows_avail)
+      num_rows = out_rows_avail;
+    /* Create output pointer array for upsampler. */
+    work_ptrs[0] = output_buf[*out_row_ctr];
+    if (num_rows > 1) {
+      work_ptrs[1] = output_buf[*out_row_ctr + 1];
+    } else {
+      work_ptrs[1] = upsample->spare_row;
+      upsample->spare_full = TRUE;
+    }
+    /* Now do the upsampling. */
+    (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, work_ptrs);
+  }
+
+  /* Adjust counts */
+  *out_row_ctr += num_rows;
+  upsample->rows_to_go -= num_rows;
+  /* When the buffer is emptied, declare this input row group consumed */
+  if (! upsample->spare_full)
+    (*in_row_group_ctr)++;
+}
+
+
+METHODDEF(void)
+merged_1v_upsample (j_decompress_ptr cinfo,
+		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
+		    JDIMENSION in_row_groups_avail,
+		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+		    JDIMENSION out_rows_avail)
+/* 1:1 vertical sampling case: much easier, never need a spare row. */
+{
+  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
+
+  /* Just do the upsampling. */
+  (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr,
+			 output_buf + *out_row_ctr);
+  /* Adjust counts */
+  (*out_row_ctr)++;
+  (*in_row_group_ctr)++;
+}
+
+
+/*
+ * These are the routines invoked by the control routines to do
+ * the actual upsampling/conversion.  One row group is processed per call.
+ *
+ * Note: since we may be writing directly into application-supplied buffers,
+ * we have to be honest about the output width; we can't assume the buffer
+ * has been rounded up to an even width.
+ */
+
+
+/*
+ * Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical.
+ */
+
+METHODDEF(void)
+h2v1_merged_upsample (j_decompress_ptr cinfo,
+		      JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
+		      JSAMPARRAY output_buf)
+{
+  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
+  register int y, cred, cgreen, cblue;
+  int cb, cr;
+  register JSAMPROW outptr;
+  JSAMPROW inptr0, inptr1, inptr2;
+  JDIMENSION col;
+  /* copy these pointers into registers if possible */
+  register JSAMPLE * range_limit = cinfo->sample_range_limit;
+  int * Crrtab = upsample->Cr_r_tab;
+  int * Cbbtab = upsample->Cb_b_tab;
+  INT32 * Crgtab = upsample->Cr_g_tab;
+  INT32 * Cbgtab = upsample->Cb_g_tab;
+  SHIFT_TEMPS
+
+  inptr0 = input_buf[0][in_row_group_ctr];
+  inptr1 = input_buf[1][in_row_group_ctr];
+  inptr2 = input_buf[2][in_row_group_ctr];
+  outptr = output_buf[0];
+  /* Loop for each pair of output pixels */
+  for (col = cinfo->output_width >> 1; col > 0; col--) {
+    /* Do the chroma part of the calculation */
+    cb = GETJSAMPLE(*inptr1++);
+    cr = GETJSAMPLE(*inptr2++);
+    cred = Crrtab[cr];
+    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);
+    cblue = Cbbtab[cb];
+    /* Fetch 2 Y values and emit 2 pixels */
+    y  = GETJSAMPLE(*inptr0++);
+    outptr[RGB_RED] =   range_limit[y + cred];
+    outptr[RGB_GREEN] = range_limit[y + cgreen];
+    outptr[RGB_BLUE] =  range_limit[y + cblue];
+    outptr += RGB_PIXELSIZE;
+    y  = GETJSAMPLE(*inptr0++);
+    outptr[RGB_RED] =   range_limit[y + cred];
+    outptr[RGB_GREEN] = range_limit[y + cgreen];
+    outptr[RGB_BLUE] =  range_limit[y + cblue];
+    outptr += RGB_PIXELSIZE;
+  }
+  /* If image width is odd, do the last output column separately */
+  if (cinfo->output_width & 1) {
+    cb = GETJSAMPLE(*inptr1);
+    cr = GETJSAMPLE(*inptr2);
+    cred = Crrtab[cr];
+    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);
+    cblue = Cbbtab[cb];
+    y  = GETJSAMPLE(*inptr0);
+    outptr[RGB_RED] =   range_limit[y + cred];
+    outptr[RGB_GREEN] = range_limit[y + cgreen];
+    outptr[RGB_BLUE] =  range_limit[y + cblue];
+  }
+}
+
+
+/*
+ * Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical.
+ */
+
+METHODDEF(void)
+h2v2_merged_upsample (j_decompress_ptr cinfo,
+		      JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
+		      JSAMPARRAY output_buf)
+{
+  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
+  register int y, cred, cgreen, cblue;
+  int cb, cr;
+  register JSAMPROW outptr0, outptr1;
+  JSAMPROW inptr00, inptr01, inptr1, inptr2;
+  JDIMENSION col;
+  /* copy these pointers into registers if possible */
+  register JSAMPLE * range_limit = cinfo->sample_range_limit;
+  int * Crrtab = upsample->Cr_r_tab;
+  int * Cbbtab = upsample->Cb_b_tab;
+  INT32 * Crgtab = upsample->Cr_g_tab;
+  INT32 * Cbgtab = upsample->Cb_g_tab;
+  SHIFT_TEMPS
+
+  inptr00 = input_buf[0][in_row_group_ctr*2];
+  inptr01 = input_buf[0][in_row_group_ctr*2 + 1];
+  inptr1 = input_buf[1][in_row_group_ctr];
+  inptr2 = input_buf[2][in_row_group_ctr];
+  outptr0 = output_buf[0];
+  outptr1 = output_buf[1];
+  /* Loop for each group of output pixels */
+  for (col = cinfo->output_width >> 1; col > 0; col--) {
+    /* Do the chroma part of the calculation */
+    cb = GETJSAMPLE(*inptr1++);
+    cr = GETJSAMPLE(*inptr2++);
+    cred = Crrtab[cr];
+    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);
+    cblue = Cbbtab[cb];
+    /* Fetch 4 Y values and emit 4 pixels */
+    y  = GETJSAMPLE(*inptr00++);
+    outptr0[RGB_RED] =   range_limit[y + cred];
+    outptr0[RGB_GREEN] = range_limit[y + cgreen];
+    outptr0[RGB_BLUE] =  range_limit[y + cblue];
+    outptr0 += RGB_PIXELSIZE;
+    y  = GETJSAMPLE(*inptr00++);
+    outptr0[RGB_RED] =   range_limit[y + cred];
+    outptr0[RGB_GREEN] = range_limit[y + cgreen];
+    outptr0[RGB_BLUE] =  range_limit[y + cblue];
+    outptr0 += RGB_PIXELSIZE;
+    y  = GETJSAMPLE(*inptr01++);
+    outptr1[RGB_RED] =   range_limit[y + cred];
+    outptr1[RGB_GREEN] = range_limit[y + cgreen];
+    outptr1[RGB_BLUE] =  range_limit[y + cblue];
+    outptr1 += RGB_PIXELSIZE;
+    y  = GETJSAMPLE(*inptr01++);
+    outptr1[RGB_RED] =   range_limit[y + cred];
+    outptr1[RGB_GREEN] = range_limit[y + cgreen];
+    outptr1[RGB_BLUE] =  range_limit[y + cblue];
+    outptr1 += RGB_PIXELSIZE;
+  }
+  /* If image width is odd, do the last output column separately */
+  if (cinfo->output_width & 1) {
+    cb = GETJSAMPLE(*inptr1);
+    cr = GETJSAMPLE(*inptr2);
+    cred = Crrtab[cr];
+    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);
+    cblue = Cbbtab[cb];
+    y  = GETJSAMPLE(*inptr00);
+    outptr0[RGB_RED] =   range_limit[y + cred];
+    outptr0[RGB_GREEN] = range_limit[y + cgreen];
+    outptr0[RGB_BLUE] =  range_limit[y + cblue];
+    y  = GETJSAMPLE(*inptr01);
+    outptr1[RGB_RED] =   range_limit[y + cred];
+    outptr1[RGB_GREEN] = range_limit[y + cgreen];
+    outptr1[RGB_BLUE] =  range_limit[y + cblue];
+  }
+}
+
+
+/*
+ * Module initialization routine for merged upsampling/color conversion.
+ *
+ * NB: this is called under the conditions determined by use_merged_upsample()
+ * in jdmaster.c.  That routine MUST correspond to the actual capabilities
+ * of this module; no safety checks are made here.
+ */
+
+GLOBAL(void)
+jinit_merged_upsampler (j_decompress_ptr cinfo)
+{
+  my_upsample_ptr upsample;
+
+  upsample = (my_upsample_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_upsampler));
+  cinfo->upsample = (struct jpeg_upsampler *) upsample;
+  upsample->pub.start_pass = start_pass_merged_upsample;
+  upsample->pub.need_context_rows = FALSE;
+
+  upsample->out_row_width = cinfo->output_width * cinfo->out_color_components;
+
+  if (cinfo->max_v_samp_factor == 2) {
+    upsample->pub.upsample = merged_2v_upsample;
+    upsample->upmethod = h2v2_merged_upsample;
+    /* Allocate a spare row buffer */
+    upsample->spare_row = (JSAMPROW)
+      (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+		(size_t) (upsample->out_row_width * SIZEOF(JSAMPLE)));
+  } else {
+    upsample->pub.upsample = merged_1v_upsample;
+    upsample->upmethod = h2v1_merged_upsample;
+    /* No spare row needed */
+    upsample->spare_row = NULL;
+  }
+
+  build_ycc_rgb_table(cinfo);
+}
+
+#endif /* UPSAMPLE_MERGING_SUPPORTED */
diff --git a/samples/jpeglib/jdphuff.c b/samples/jpeglib/jdphuff.c
new file mode 100644
index 0000000..2267809
--- /dev/null
+++ b/samples/jpeglib/jdphuff.c
@@ -0,0 +1,668 @@
+/*
+ * jdphuff.c
+ *
+ * Copyright (C) 1995-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains Huffman entropy decoding routines for progressive JPEG.
+ *
+ * Much of the complexity here has to do with supporting input suspension.
+ * If the data source module demands suspension, we want to be able to back
+ * up to the start of the current MCU.  To do this, we copy state variables
+ * into local working storage, and update them back to the permanent
+ * storage only upon successful completion of an MCU.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdhuff.h"		/* Declarations shared with jdhuff.c */
+
+
+#ifdef D_PROGRESSIVE_SUPPORTED
+
+/*
+ * Expanded entropy decoder object for progressive Huffman decoding.
+ *
+ * The savable_state subrecord contains fields that change within an MCU,
+ * but must not be updated permanently until we complete the MCU.
+ */
+
+typedef struct {
+  unsigned int EOBRUN;			/* remaining EOBs in EOBRUN */
+  int last_dc_val[MAX_COMPS_IN_SCAN];	/* last DC coef for each component */
+} savable_state;
+
+/* This macro is to work around compilers with missing or broken
+ * structure assignment.  You'll need to fix this code if you have
+ * such a compiler and you change MAX_COMPS_IN_SCAN.
+ */
+
+#ifndef NO_STRUCT_ASSIGN
+#define ASSIGN_STATE(dest,src)  ((dest) = (src))
+#else
+#if MAX_COMPS_IN_SCAN == 4
+#define ASSIGN_STATE(dest,src)  \
+	((dest).EOBRUN = (src).EOBRUN, \
+	 (dest).last_dc_val[0] = (src).last_dc_val[0], \
+	 (dest).last_dc_val[1] = (src).last_dc_val[1], \
+	 (dest).last_dc_val[2] = (src).last_dc_val[2], \
+	 (dest).last_dc_val[3] = (src).last_dc_val[3])
+#endif
+#endif
+
+
+typedef struct {
+  struct jpeg_entropy_decoder pub; /* public fields */
+
+  /* These fields are loaded into local variables at start of each MCU.
+   * In case of suspension, we exit WITHOUT updating them.
+   */
+  bitread_perm_state bitstate;	/* Bit buffer at start of MCU */
+  savable_state saved;		/* Other state at start of MCU */
+
+  /* These fields are NOT loaded into local working state. */
+  unsigned int restarts_to_go;	/* MCUs left in this restart interval */
+
+  /* Pointers to derived tables (these workspaces have image lifespan) */
+  d_derived_tbl * derived_tbls[NUM_HUFF_TBLS];
+
+  d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */
+} phuff_entropy_decoder;
+
+typedef phuff_entropy_decoder * phuff_entropy_ptr;
+
+/* Forward declarations */
+METHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo,
+					    JBLOCKROW *MCU_data));
+METHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo,
+					    JBLOCKROW *MCU_data));
+METHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo,
+					     JBLOCKROW *MCU_data));
+METHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo,
+					     JBLOCKROW *MCU_data));
+
+
+/*
+ * Initialize for a Huffman-compressed scan.
+ */
+
+METHODDEF(void)
+start_pass_phuff_decoder (j_decompress_ptr cinfo)
+{
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  boolean is_DC_band, bad;
+  int ci, coefi, tbl;
+  int *coef_bit_ptr;
+  jpeg_component_info * compptr;
+
+  is_DC_band = (cinfo->Ss == 0);
+
+  /* Validate scan parameters */
+  bad = FALSE;
+  if (is_DC_band) {
+    if (cinfo->Se != 0)
+      bad = TRUE;
+  } else {
+    /* need not check Ss/Se < 0 since they came from unsigned bytes */
+    if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2)
+      bad = TRUE;
+    /* AC scans may have only one component */
+    if (cinfo->comps_in_scan != 1)
+      bad = TRUE;
+  }
+  if (cinfo->Ah != 0) {
+    /* Successive approximation refinement scan: must have Al = Ah-1. */
+    if (cinfo->Al != cinfo->Ah-1)
+      bad = TRUE;
+  }
+  if (cinfo->Al > 13)		/* need not check for < 0 */
+    bad = TRUE;
+  /* Arguably the maximum Al value should be less than 13 for 8-bit precision,
+   * but the spec doesn't say so, and we try to be liberal about what we
+   * accept.  Note: large Al values could result in out-of-range DC
+   * coefficients during early scans, leading to bizarre displays due to
+   * overflows in the IDCT math.  But we won't crash.
+   */
+  if (bad)
+    ERREXIT4(cinfo, JERR_BAD_PROGRESSION,
+	     cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al);
+  /* Update progression status, and verify that scan order is legal.
+   * Note that inter-scan inconsistencies are treated as warnings
+   * not fatal errors ... not clear if this is right way to behave.
+   */
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    int cindex = cinfo->cur_comp_info[ci]->component_index;
+    coef_bit_ptr = & cinfo->coef_bits[cindex][0];
+    if (!is_DC_band && coef_bit_ptr[0] < 0) /* AC without prior DC scan */
+      WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0);
+    for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) {
+      int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi];
+      if (cinfo->Ah != expected)
+	WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi);
+      coef_bit_ptr[coefi] = cinfo->Al;
+    }
+  }
+
+  /* Select MCU decoding routine */
+  if (cinfo->Ah == 0) {
+    if (is_DC_band)
+      entropy->pub.decode_mcu = decode_mcu_DC_first;
+    else
+      entropy->pub.decode_mcu = decode_mcu_AC_first;
+  } else {
+    if (is_DC_band)
+      entropy->pub.decode_mcu = decode_mcu_DC_refine;
+    else
+      entropy->pub.decode_mcu = decode_mcu_AC_refine;
+  }
+
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+    compptr = cinfo->cur_comp_info[ci];
+    /* Make sure requested tables are present, and compute derived tables.
+     * We may build same derived table more than once, but it's not expensive.
+     */
+    if (is_DC_band) {
+      if (cinfo->Ah == 0) {	/* DC refinement needs no table */
+	tbl = compptr->dc_tbl_no;
+	jpeg_make_d_derived_tbl(cinfo, TRUE, tbl,
+				& entropy->derived_tbls[tbl]);
+      }
+    } else {
+      tbl = compptr->ac_tbl_no;
+      jpeg_make_d_derived_tbl(cinfo, FALSE, tbl,
+			      & entropy->derived_tbls[tbl]);
+      /* remember the single active table */
+      entropy->ac_derived_tbl = entropy->derived_tbls[tbl];
+    }
+    /* Initialize DC predictions to 0 */
+    entropy->saved.last_dc_val[ci] = 0;
+  }
+
+  /* Initialize bitread state variables */
+  entropy->bitstate.bits_left = 0;
+  entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
+  entropy->pub.insufficient_data = FALSE;
+
+  /* Initialize private state variables */
+  entropy->saved.EOBRUN = 0;
+
+  /* Initialize restart counter */
+  entropy->restarts_to_go = cinfo->restart_interval;
+}
+
+
+/*
+ * Figure F.12: extend sign bit.
+ * On some machines, a shift and add will be faster than a table lookup.
+ */
+
+#ifdef AVOID_TABLES
+
+#define HUFF_EXTEND(x,s)  ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
+
+#else
+
+#define HUFF_EXTEND(x,s)  ((x) < extend_test[s] ? (x) + extend_offset[s] : (x))
+
+static const int extend_test[16] =   /* entry n is 2**(n-1) */
+  { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,
+    0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
+
+static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
+  { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
+    ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
+    ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
+    ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
+
+#endif /* AVOID_TABLES */
+
+
+/*
+ * Check for a restart marker & resynchronize decoder.
+ * Returns FALSE if must suspend.
+ */
+
+LOCAL(boolean)
+process_restart (j_decompress_ptr cinfo)
+{
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  int ci;
+
+  /* Throw away any unused bits remaining in bit buffer; */
+  /* include any full bytes in next_marker's count of discarded bytes */
+  cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;
+  entropy->bitstate.bits_left = 0;
+
+  /* Advance past the RSTn marker */
+  if (! (*cinfo->marker->read_restart_marker) (cinfo))
+    return FALSE;
+
+  /* Re-initialize DC predictions to 0 */
+  for (ci = 0; ci < cinfo->comps_in_scan; ci++)
+    entropy->saved.last_dc_val[ci] = 0;
+  /* Re-init EOB run count, too */
+  entropy->saved.EOBRUN = 0;
+
+  /* Reset restart counter */
+  entropy->restarts_to_go = cinfo->restart_interval;
+
+  /* Reset out-of-data flag, unless read_restart_marker left us smack up
+   * against a marker.  In that case we will end up treating the next data
+   * segment as empty, and we can avoid producing bogus output pixels by
+   * leaving the flag set.
+   */
+  if (cinfo->unread_marker == 0)
+    entropy->pub.insufficient_data = FALSE;
+
+  return TRUE;
+}
+
+
+/*
+ * Huffman MCU decoding.
+ * Each of these routines decodes and returns one MCU's worth of
+ * Huffman-compressed coefficients. 
+ * The coefficients are reordered from zigzag order into natural array order,
+ * but are not dequantized.
+ *
+ * The i'th block of the MCU is stored into the block pointed to by
+ * MCU_data[i].  WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER.
+ *
+ * We return FALSE if data source requested suspension.  In that case no
+ * changes have been made to permanent state.  (Exception: some output
+ * coefficients may already have been assigned.  This is harmless for
+ * spectral selection, since we'll just re-assign them on the next call.
+ * Successive approximation AC refinement has to be more careful, however.)
+ */
+
+/*
+ * MCU decoding for DC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{   
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  int Al = cinfo->Al;
+  register int s, r;
+  int blkn, ci;
+  JBLOCKROW block;
+  BITREAD_STATE_VARS;
+  savable_state state;
+  d_derived_tbl * tbl;
+  jpeg_component_info * compptr;
+
+  /* Process restart marker if needed; may have to suspend */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0)
+      if (! process_restart(cinfo))
+	return FALSE;
+  }
+
+  /* If we've run out of data, just leave the MCU set to zeroes.
+   * This way, we return uniform gray for the remainder of the segment.
+   */
+  if (! entropy->pub.insufficient_data) {
+
+    /* Load up working state */
+    BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+    ASSIGN_STATE(state, entropy->saved);
+
+    /* Outer loop handles each block in the MCU */
+
+    for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+      block = MCU_data[blkn];
+      ci = cinfo->MCU_membership[blkn];
+      compptr = cinfo->cur_comp_info[ci];
+      tbl = entropy->derived_tbls[compptr->dc_tbl_no];
+
+      /* Decode a single block's worth of coefficients */
+
+      /* Section F.2.2.1: decode the DC coefficient difference */
+      HUFF_DECODE(s, br_state, tbl, return FALSE, label1);
+      if (s) {
+	CHECK_BIT_BUFFER(br_state, s, return FALSE);
+	r = GET_BITS(s);
+	s = HUFF_EXTEND(r, s);
+      }
+
+      /* Convert DC difference to actual value, update last_dc_val */
+      s += state.last_dc_val[ci];
+      state.last_dc_val[ci] = s;
+      /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */
+      (*block)[0] = (JCOEF) (s << Al);
+    }
+
+    /* Completed MCU, so update state */
+    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
+    ASSIGN_STATE(entropy->saved, state);
+  }
+
+  /* Account for restart interval (no-op if not using restarts) */
+  entropy->restarts_to_go--;
+
+  return TRUE;
+}
+
+
+/*
+ * MCU decoding for AC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{   
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  int Se = cinfo->Se;
+  int Al = cinfo->Al;
+  register int s, k, r;
+  unsigned int EOBRUN;
+  JBLOCKROW block;
+  BITREAD_STATE_VARS;
+  d_derived_tbl * tbl;
+
+  /* Process restart marker if needed; may have to suspend */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0)
+      if (! process_restart(cinfo))
+	return FALSE;
+  }
+
+  /* If we've run out of data, just leave the MCU set to zeroes.
+   * This way, we return uniform gray for the remainder of the segment.
+   */
+  if (! entropy->pub.insufficient_data) {
+
+    /* Load up working state.
+     * We can avoid loading/saving bitread state if in an EOB run.
+     */
+    EOBRUN = entropy->saved.EOBRUN;	/* only part of saved state we need */
+
+    /* There is always only one block per MCU */
+
+    if (EOBRUN > 0)		/* if it's a band of zeroes... */
+      EOBRUN--;			/* ...process it now (we do nothing) */
+    else {
+      BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+      block = MCU_data[0];
+      tbl = entropy->ac_derived_tbl;
+
+      for (k = cinfo->Ss; k <= Se; k++) {
+	HUFF_DECODE(s, br_state, tbl, return FALSE, label2);
+	r = s >> 4;
+	s &= 15;
+	if (s) {
+	  k += r;
+	  CHECK_BIT_BUFFER(br_state, s, return FALSE);
+	  r = GET_BITS(s);
+	  s = HUFF_EXTEND(r, s);
+	  /* Scale and output coefficient in natural (dezigzagged) order */
+	  (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al);
+	} else {
+	  if (r == 15) {	/* ZRL */
+	    k += 15;		/* skip 15 zeroes in band */
+	  } else {		/* EOBr, run length is 2^r + appended bits */
+	    EOBRUN = 1 << r;
+	    if (r) {		/* EOBr, r > 0 */
+	      CHECK_BIT_BUFFER(br_state, r, return FALSE);
+	      r = GET_BITS(r);
+	      EOBRUN += r;
+	    }
+	    EOBRUN--;		/* this band is processed at this moment */
+	    break;		/* force end-of-band */
+	  }
+	}
+      }
+
+      BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
+    }
+
+    /* Completed MCU, so update state */
+    entropy->saved.EOBRUN = EOBRUN;	/* only part of saved state we need */
+  }
+
+  /* Account for restart interval (no-op if not using restarts) */
+  entropy->restarts_to_go--;
+
+  return TRUE;
+}
+
+
+/*
+ * MCU decoding for DC successive approximation refinement scan.
+ * Note: we assume such scans can be multi-component, although the spec
+ * is not very clear on the point.
+ */
+
+METHODDEF(boolean)
+decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{   
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  int p1 = 1 << cinfo->Al;	/* 1 in the bit position being coded */
+  int blkn;
+  JBLOCKROW block;
+  BITREAD_STATE_VARS;
+
+  /* Process restart marker if needed; may have to suspend */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0)
+      if (! process_restart(cinfo))
+	return FALSE;
+  }
+
+  /* Not worth the cycles to check insufficient_data here,
+   * since we will not change the data anyway if we read zeroes.
+   */
+
+  /* Load up working state */
+  BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+
+  /* Outer loop handles each block in the MCU */
+
+  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+    block = MCU_data[blkn];
+
+    /* Encoded data is simply the next bit of the two's-complement DC value */
+    CHECK_BIT_BUFFER(br_state, 1, return FALSE);
+    if (GET_BITS(1))
+      (*block)[0] |= p1;
+    /* Note: since we use |=, repeating the assignment later is safe */
+  }
+
+  /* Completed MCU, so update state */
+  BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
+
+  /* Account for restart interval (no-op if not using restarts) */
+  entropy->restarts_to_go--;
+
+  return TRUE;
+}
+
+
+/*
+ * MCU decoding for AC successive approximation refinement scan.
+ */
+
+METHODDEF(boolean)
+decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{   
+  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+  int Se = cinfo->Se;
+  int p1 = 1 << cinfo->Al;	/* 1 in the bit position being coded */
+  int m1 = (-1) << cinfo->Al;	/* -1 in the bit position being coded */
+  register int s, k, r;
+  unsigned int EOBRUN;
+  JBLOCKROW block;
+  JCOEFPTR thiscoef;
+  BITREAD_STATE_VARS;
+  d_derived_tbl * tbl;
+  int num_newnz;
+  int newnz_pos[DCTSIZE2];
+
+  /* Process restart marker if needed; may have to suspend */
+  if (cinfo->restart_interval) {
+    if (entropy->restarts_to_go == 0)
+      if (! process_restart(cinfo))
+	return FALSE;
+  }
+
+  /* If we've run out of data, don't modify the MCU.
+   */
+  if (! entropy->pub.insufficient_data) {
+
+    /* Load up working state */
+    BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+    EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
+
+    /* There is always only one block per MCU */
+    block = MCU_data[0];
+    tbl = entropy->ac_derived_tbl;
+
+    /* If we are forced to suspend, we must undo the assignments to any newly
+     * nonzero coefficients in the block, because otherwise we'd get confused
+     * next time about which coefficients were already nonzero.
+     * But we need not undo addition of bits to already-nonzero coefficients;
+     * instead, we can test the current bit to see if we already did it.
+     */
+    num_newnz = 0;
+
+    /* initialize coefficient loop counter to start of band */
+    k = cinfo->Ss;
+
+    if (EOBRUN == 0) {
+      for (; k <= Se; k++) {
+	HUFF_DECODE(s, br_state, tbl, goto undoit, label3);
+	r = s >> 4;
+	s &= 15;
+	if (s) {
+	  if (s != 1)		/* size of new coef should always be 1 */
+	    WARNMS(cinfo, JWRN_HUFF_BAD_CODE);
+	  CHECK_BIT_BUFFER(br_state, 1, goto undoit);
+	  if (GET_BITS(1))
+	    s = p1;		/* newly nonzero coef is positive */
+	  else
+	    s = m1;		/* newly nonzero coef is negative */
+	} else {
+	  if (r != 15) {
+	    EOBRUN = 1 << r;	/* EOBr, run length is 2^r + appended bits */
+	    if (r) {
+	      CHECK_BIT_BUFFER(br_state, r, goto undoit);
+	      r = GET_BITS(r);
+	      EOBRUN += r;
+	    }
+	    break;		/* rest of block is handled by EOB logic */
+	  }
+	  /* note s = 0 for processing ZRL */
+	}
+	/* Advance over already-nonzero coefs and r still-zero coefs,
+	 * appending correction bits to the nonzeroes.  A correction bit is 1
+	 * if the absolute value of the coefficient must be increased.
+	 */
+	do {
+	  thiscoef = *block + jpeg_natural_order[k];
+	  if (*thiscoef != 0) {
+	    CHECK_BIT_BUFFER(br_state, 1, goto undoit);
+	    if (GET_BITS(1)) {
+	      if ((*thiscoef & p1) == 0) { /* do nothing if already set it */
+		if (*thiscoef >= 0)
+		  *thiscoef += p1;
+		else
+		  *thiscoef += m1;
+	      }
+	    }
+	  } else {
+	    if (--r < 0)
+	      break;		/* reached target zero coefficient */
+	  }
+	  k++;
+	} while (k <= Se);
+	if (s) {
+	  int pos = jpeg_natural_order[k];
+	  /* Output newly nonzero coefficient */
+	  (*block)[pos] = (JCOEF) s;
+	  /* Remember its position in case we have to suspend */
+	  newnz_pos[num_newnz++] = pos;
+	}
+      }
+    }
+
+    if (EOBRUN > 0) {
+      /* Scan any remaining coefficient positions after the end-of-band
+       * (the last newly nonzero coefficient, if any).  Append a correction
+       * bit to each already-nonzero coefficient.  A correction bit is 1
+       * if the absolute value of the coefficient must be increased.
+       */
+      for (; k <= Se; k++) {
+	thiscoef = *block + jpeg_natural_order[k];
+	if (*thiscoef != 0) {
+	  CHECK_BIT_BUFFER(br_state, 1, goto undoit);
+	  if (GET_BITS(1)) {
+	    if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */
+	      if (*thiscoef >= 0)
+		*thiscoef += p1;
+	      else
+		*thiscoef += m1;
+	    }
+	  }
+	}
+      }
+      /* Count one block completed in EOB run */
+      EOBRUN--;
+    }
+
+    /* Completed MCU, so update state */
+    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
+    entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
+  }
+
+  /* Account for restart interval (no-op if not using restarts) */
+  entropy->restarts_to_go--;
+
+  return TRUE;
+
+undoit:
+  /* Re-zero any output coefficients that we made newly nonzero */
+  while (num_newnz > 0)
+    (*block)[newnz_pos[--num_newnz]] = 0;
+
+  return FALSE;
+}
+
+
+/*
+ * Module initialization routine for progressive Huffman entropy decoding.
+ */
+
+GLOBAL(void)
+jinit_phuff_decoder (j_decompress_ptr cinfo)
+{
+  phuff_entropy_ptr entropy;
+  int *coef_bit_ptr;
+  int ci, i;
+
+  entropy = (phuff_entropy_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(phuff_entropy_decoder));
+  cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
+  entropy->pub.start_pass = start_pass_phuff_decoder;
+
+  /* Mark derived tables unallocated */
+  for (i = 0; i < NUM_HUFF_TBLS; i++) {
+    entropy->derived_tbls[i] = NULL;
+  }
+
+  /* Create progression status table */
+  cinfo->coef_bits = (int (*)[DCTSIZE2])
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				cinfo->num_components*DCTSIZE2*SIZEOF(int));
+  coef_bit_ptr = & cinfo->coef_bits[0][0];
+  for (ci = 0; ci < cinfo->num_components; ci++) 
+    for (i = 0; i < DCTSIZE2; i++)
+      *coef_bit_ptr++ = -1;
+}
+
+#endif /* D_PROGRESSIVE_SUPPORTED */
diff --git a/samples/jpeglib/jdpostct.c b/samples/jpeglib/jdpostct.c
new file mode 100644
index 0000000..571563d
--- /dev/null
+++ b/samples/jpeglib/jdpostct.c
@@ -0,0 +1,290 @@
+/*
+ * jdpostct.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains the decompression postprocessing controller.
+ * This controller manages the upsampling, color conversion, and color
+ * quantization/reduction steps; specifically, it controls the buffering
+ * between upsample/color conversion and color quantization/reduction.
+ *
+ * If no color quantization/reduction is required, then this module has no
+ * work to do, and it just hands off to the upsample/color conversion code.
+ * An integrated upsample/convert/quantize process would replace this module
+ * entirely.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Private buffer controller object */
+
+typedef struct {
+  struct jpeg_d_post_controller pub; /* public fields */
+
+  /* Color quantization source buffer: this holds output data from
+   * the upsample/color conversion step to be passed to the quantizer.
+   * For two-pass color quantization, we need a full-image buffer;
+   * for one-pass operation, a strip buffer is sufficient.
+   */
+  jvirt_sarray_ptr whole_image;	/* virtual array, or NULL if one-pass */
+  JSAMPARRAY buffer;		/* strip buffer, or current strip of virtual */
+  JDIMENSION strip_height;	/* buffer size in rows */
+  /* for two-pass mode only: */
+  JDIMENSION starting_row;	/* row # of first row in current strip */
+  JDIMENSION next_row;		/* index of next row to fill/empty in strip */
+} my_post_controller;
+
+typedef my_post_controller * my_post_ptr;
+
+
+/* Forward declarations */
+METHODDEF(void) post_process_1pass
+	JPP((j_decompress_ptr cinfo,
+	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
+	     JDIMENSION in_row_groups_avail,
+	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+	     JDIMENSION out_rows_avail));
+#ifdef QUANT_2PASS_SUPPORTED
+METHODDEF(void) post_process_prepass
+	JPP((j_decompress_ptr cinfo,
+	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
+	     JDIMENSION in_row_groups_avail,
+	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+	     JDIMENSION out_rows_avail));
+METHODDEF(void) post_process_2pass
+	JPP((j_decompress_ptr cinfo,
+	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
+	     JDIMENSION in_row_groups_avail,
+	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+	     JDIMENSION out_rows_avail));
+#endif
+
+
+/*
+ * Initialize for a processing pass.
+ */
+
+METHODDEF(void)
+start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
+{
+  my_post_ptr post = (my_post_ptr) cinfo->post;
+
+  switch (pass_mode) {
+  case JBUF_PASS_THRU:
+    if (cinfo->quantize_colors) {
+      /* Single-pass processing with color quantization. */
+      post->pub.post_process_data = post_process_1pass;
+      /* We could be doing buffered-image output before starting a 2-pass
+       * color quantization; in that case, jinit_d_post_controller did not
+       * allocate a strip buffer.  Use the virtual-array buffer as workspace.
+       */
+      if (post->buffer == NULL) {
+	post->buffer = (*cinfo->mem->access_virt_sarray)
+	  ((j_common_ptr) cinfo, post->whole_image,
+	   (JDIMENSION) 0, post->strip_height, TRUE);
+      }
+    } else {
+      /* For single-pass processing without color quantization,
+       * I have no work to do; just call the upsampler directly.
+       */
+      post->pub.post_process_data = cinfo->upsample->upsample;
+    }
+    break;
+#ifdef QUANT_2PASS_SUPPORTED
+  case JBUF_SAVE_AND_PASS:
+    /* First pass of 2-pass quantization */
+    if (post->whole_image == NULL)
+      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+    post->pub.post_process_data = post_process_prepass;
+    break;
+  case JBUF_CRANK_DEST:
+    /* Second pass of 2-pass quantization */
+    if (post->whole_image == NULL)
+      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+    post->pub.post_process_data = post_process_2pass;
+    break;
+#endif /* QUANT_2PASS_SUPPORTED */
+  default:
+    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+    break;
+  }
+  post->starting_row = post->next_row = 0;
+}
+
+
+/*
+ * Process some data in the one-pass (strip buffer) case.
+ * This is used for color precision reduction as well as one-pass quantization.
+ */
+
+METHODDEF(void)
+post_process_1pass (j_decompress_ptr cinfo,
+		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
+		    JDIMENSION in_row_groups_avail,
+		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+		    JDIMENSION out_rows_avail)
+{
+  my_post_ptr post = (my_post_ptr) cinfo->post;
+  JDIMENSION num_rows, max_rows;
+
+  /* Fill the buffer, but not more than what we can dump out in one go. */
+  /* Note we rely on the upsampler to detect bottom of image. */
+  max_rows = out_rows_avail - *out_row_ctr;
+  if (max_rows > post->strip_height)
+    max_rows = post->strip_height;
+  num_rows = 0;
+  (*cinfo->upsample->upsample) (cinfo,
+		input_buf, in_row_group_ctr, in_row_groups_avail,
+		post->buffer, &num_rows, max_rows);
+  /* Quantize and emit data. */
+  (*cinfo->cquantize->color_quantize) (cinfo,
+		post->buffer, output_buf + *out_row_ctr, (int) num_rows);
+  *out_row_ctr += num_rows;
+}
+
+
+#ifdef QUANT_2PASS_SUPPORTED
+
+/*
+ * Process some data in the first pass of 2-pass quantization.
+ */
+
+METHODDEF(void)
+post_process_prepass (j_decompress_ptr cinfo,
+		      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
+		      JDIMENSION in_row_groups_avail,
+		      JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+		      JDIMENSION out_rows_avail)
+{
+  my_post_ptr post = (my_post_ptr) cinfo->post;
+  JDIMENSION old_next_row, num_rows;
+
+  /* Reposition virtual buffer if at start of strip. */
+  if (post->next_row == 0) {
+    post->buffer = (*cinfo->mem->access_virt_sarray)
+	((j_common_ptr) cinfo, post->whole_image,
+	 post->starting_row, post->strip_height, TRUE);
+  }
+
+  /* Upsample some data (up to a strip height's worth). */
+  old_next_row = post->next_row;
+  (*cinfo->upsample->upsample) (cinfo,
+		input_buf, in_row_group_ctr, in_row_groups_avail,
+		post->buffer, &post->next_row, post->strip_height);
+
+  /* Allow quantizer to scan new data.  No data is emitted, */
+  /* but we advance out_row_ctr so outer loop can tell when we're done. */
+  if (post->next_row > old_next_row) {
+    num_rows = post->next_row - old_next_row;
+    (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row,
+					 (JSAMPARRAY) NULL, (int) num_rows);
+    *out_row_ctr += num_rows;
+  }
+
+  /* Advance if we filled the strip. */
+  if (post->next_row >= post->strip_height) {
+    post->starting_row += post->strip_height;
+    post->next_row = 0;
+  }
+}
+
+
+/*
+ * Process some data in the second pass of 2-pass quantization.
+ */
+
+METHODDEF(void)
+post_process_2pass (j_decompress_ptr cinfo,
+		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
+		    JDIMENSION in_row_groups_avail,
+		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+		    JDIMENSION out_rows_avail)
+{
+  my_post_ptr post = (my_post_ptr) cinfo->post;
+  JDIMENSION num_rows, max_rows;
+
+  /* Reposition virtual buffer if at start of strip. */
+  if (post->next_row == 0) {
+    post->buffer = (*cinfo->mem->access_virt_sarray)
+	((j_common_ptr) cinfo, post->whole_image,
+	 post->starting_row, post->strip_height, FALSE);
+  }
+
+  /* Determine number of rows to emit. */
+  num_rows = post->strip_height - post->next_row; /* available in strip */
+  max_rows = out_rows_avail - *out_row_ctr; /* available in output area */
+  if (num_rows > max_rows)
+    num_rows = max_rows;
+  /* We have to check bottom of image here, can't depend on upsampler. */
+  max_rows = cinfo->output_height - post->starting_row;
+  if (num_rows > max_rows)
+    num_rows = max_rows;
+
+  /* Quantize and emit data. */
+  (*cinfo->cquantize->color_quantize) (cinfo,
+		post->buffer + post->next_row, output_buf + *out_row_ctr,
+		(int) num_rows);
+  *out_row_ctr += num_rows;
+
+  /* Advance if we filled the strip. */
+  post->next_row += num_rows;
+  if (post->next_row >= post->strip_height) {
+    post->starting_row += post->strip_height;
+    post->next_row = 0;
+  }
+}
+
+#endif /* QUANT_2PASS_SUPPORTED */
+
+
+/*
+ * Initialize postprocessing controller.
+ */
+
+GLOBAL(void)
+jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
+{
+  my_post_ptr post;
+
+  post = (my_post_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_post_controller));
+  cinfo->post = (struct jpeg_d_post_controller *) post;
+  post->pub.start_pass = start_pass_dpost;
+  post->whole_image = NULL;	/* flag for no virtual arrays */
+  post->buffer = NULL;		/* flag for no strip buffer */
+
+  /* Create the quantization buffer, if needed */
+  if (cinfo->quantize_colors) {
+    /* The buffer strip height is max_v_samp_factor, which is typically
+     * an efficient number of rows for upsampling to return.
+     * (In the presence of output rescaling, we might want to be smarter?)
+     */
+    post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor;
+    if (need_full_buffer) {
+      /* Two-pass color quantization: need full-image storage. */
+      /* We round up the number of rows to a multiple of the strip height. */
+#ifdef QUANT_2PASS_SUPPORTED
+      post->whole_image = (*cinfo->mem->request_virt_sarray)
+	((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
+	 cinfo->output_width * cinfo->out_color_components,
+	 (JDIMENSION) jround_up((long) cinfo->output_height,
+				(long) post->strip_height),
+	 post->strip_height);
+#else
+      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
+#endif /* QUANT_2PASS_SUPPORTED */
+    } else {
+      /* One-pass color quantization: just make a strip buffer. */
+      post->buffer = (*cinfo->mem->alloc_sarray)
+	((j_common_ptr) cinfo, JPOOL_IMAGE,
+	 cinfo->output_width * cinfo->out_color_components,
+	 post->strip_height);
+    }
+  }
+}
diff --git a/samples/jpeglib/jdsample.c b/samples/jpeglib/jdsample.c
new file mode 100644
index 0000000..80ffefb
--- /dev/null
+++ b/samples/jpeglib/jdsample.c
@@ -0,0 +1,478 @@
+/*
+ * jdsample.c
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains upsampling routines.
+ *
+ * Upsampling input data is counted in "row groups".  A row group
+ * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size)
+ * sample rows of each component.  Upsampling will normally produce
+ * max_v_samp_factor pixel rows from each row group (but this could vary
+ * if the upsampler is applying a scale factor of its own).
+ *
+ * An excellent reference for image resampling is
+ *   Digital Image Warping, George Wolberg, 1990.
+ *   Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Pointer to routine to upsample a single component */
+typedef JMETHOD(void, upsample1_ptr,
+		(j_decompress_ptr cinfo, jpeg_component_info * compptr,
+		 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+
+/* Private subobject */
+
+typedef struct {
+  struct jpeg_upsampler pub;	/* public fields */
+
+  /* Color conversion buffer.  When using separate upsampling and color
+   * conversion steps, this buffer holds one upsampled row group until it
+   * has been color converted and output.
+   * Note: we do not allocate any storage for component(s) which are full-size,
+   * ie do not need rescaling.  The corresponding entry of color_buf[] is
+   * simply set to point to the input data array, thereby avoiding copying.
+   */
+  JSAMPARRAY color_buf[MAX_COMPONENTS];
+
+  /* Per-component upsampling method pointers */
+  upsample1_ptr methods[MAX_COMPONENTS];
+
+  int next_row_out;		/* counts rows emitted from color_buf */
+  JDIMENSION rows_to_go;	/* counts rows remaining in image */
+
+  /* Height of an input row group for each component. */
+  int rowgroup_height[MAX_COMPONENTS];
+
+  /* These arrays save pixel expansion factors so that int_expand need not
+   * recompute them each time.  They are unused for other upsampling methods.
+   */
+  UINT8 h_expand[MAX_COMPONENTS];
+  UINT8 v_expand[MAX_COMPONENTS];
+} my_upsampler;
+
+typedef my_upsampler * my_upsample_ptr;
+
+
+/*
+ * Initialize for an upsampling pass.
+ */
+
+METHODDEF(void)
+start_pass_upsample (j_decompress_ptr cinfo)
+{
+  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
+
+  /* Mark the conversion buffer empty */
+  upsample->next_row_out = cinfo->max_v_samp_factor;
+  /* Initialize total-height counter for detecting bottom of image */
+  upsample->rows_to_go = cinfo->output_height;
+}
+
+
+/*
+ * Control routine to do upsampling (and color conversion).
+ *
+ * In this version we upsample each component independently.
+ * We upsample one row group into the conversion buffer, then apply
+ * color conversion a row at a time.
+ */
+
+METHODDEF(void)
+sep_upsample (j_decompress_ptr cinfo,
+	      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
+	      JDIMENSION in_row_groups_avail,
+	      JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+	      JDIMENSION out_rows_avail)
+{
+  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
+  int ci;
+  jpeg_component_info * compptr;
+  JDIMENSION num_rows;
+
+  /* Fill the conversion buffer, if it's empty */
+  if (upsample->next_row_out >= cinfo->max_v_samp_factor) {
+    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+	 ci++, compptr++) {
+      /* Invoke per-component upsample method.  Notice we pass a POINTER
+       * to color_buf[ci], so that fullsize_upsample can change it.
+       */
+      (*upsample->methods[ci]) (cinfo, compptr,
+	input_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]),
+	upsample->color_buf + ci);
+    }
+    upsample->next_row_out = 0;
+  }
+
+  /* Color-convert and emit rows */
+
+  /* How many we have in the buffer: */
+  num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out);
+  /* Not more than the distance to the end of the image.  Need this test
+   * in case the image height is not a multiple of max_v_samp_factor:
+   */
+  if (num_rows > upsample->rows_to_go) 
+    num_rows = upsample->rows_to_go;
+  /* And not more than what the client can accept: */
+  out_rows_avail -= *out_row_ctr;
+  if (num_rows > out_rows_avail)
+    num_rows = out_rows_avail;
+
+  (*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf,
+				     (JDIMENSION) upsample->next_row_out,
+				     output_buf + *out_row_ctr,
+				     (int) num_rows);
+
+  /* Adjust counts */
+  *out_row_ctr += num_rows;
+  upsample->rows_to_go -= num_rows;
+  upsample->next_row_out += num_rows;
+  /* When the buffer is emptied, declare this input row group consumed */
+  if (upsample->next_row_out >= cinfo->max_v_samp_factor)
+    (*in_row_group_ctr)++;
+}
+
+
+/*
+ * These are the routines invoked by sep_upsample to upsample pixel values
+ * of a single component.  One row group is processed per call.
+ */
+
+
+/*
+ * For full-size components, we just make color_buf[ci] point at the
+ * input buffer, and thus avoid copying any data.  Note that this is
+ * safe only because sep_upsample doesn't declare the input row group
+ * "consumed" until we are done color converting and emitting it.
+ */
+
+METHODDEF(void)
+fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+		   JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
+{
+  *output_data_ptr = input_data;
+}
+
+
+/*
+ * This is a no-op version used for "uninteresting" components.
+ * These components will not be referenced by color conversion.
+ */
+
+METHODDEF(void)
+noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
+{
+  *output_data_ptr = NULL;	/* safety check */
+}
+
+
+/*
+ * This version handles any integral sampling ratios.
+ * This is not used for typical JPEG files, so it need not be fast.
+ * Nor, for that matter, is it particularly accurate: the algorithm is
+ * simple replication of the input pixel onto the corresponding output
+ * pixels.  The hi-falutin sampling literature refers to this as a
+ * "box filter".  A box filter tends to introduce visible artifacts,
+ * so if you are actually going to use 3:1 or 4:1 sampling ratios
+ * you would be well advised to improve this code.
+ */
+
+METHODDEF(void)
+int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	      JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
+{
+  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
+  JSAMPARRAY output_data = *output_data_ptr;
+  register JSAMPROW inptr, outptr;
+  register JSAMPLE invalue;
+  register int h;
+  JSAMPROW outend;
+  int h_expand, v_expand;
+  int inrow, outrow;
+
+  h_expand = upsample->h_expand[compptr->component_index];
+  v_expand = upsample->v_expand[compptr->component_index];
+
+  inrow = outrow = 0;
+  while (outrow < cinfo->max_v_samp_factor) {
+    /* Generate one output row with proper horizontal expansion */
+    inptr = input_data[inrow];
+    outptr = output_data[outrow];
+    outend = outptr + cinfo->output_width;
+    while (outptr < outend) {
+      invalue = *inptr++;	/* don't need GETJSAMPLE() here */
+      for (h = h_expand; h > 0; h--) {
+	*outptr++ = invalue;
+      }
+    }
+    /* Generate any additional output rows by duplicating the first one */
+    if (v_expand > 1) {
+      jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
+			v_expand-1, cinfo->output_width);
+    }
+    inrow++;
+    outrow += v_expand;
+  }
+}
+
+
+/*
+ * Fast processing for the common case of 2:1 horizontal and 1:1 vertical.
+ * It's still a box filter.
+ */
+
+METHODDEF(void)
+h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
+{
+  JSAMPARRAY output_data = *output_data_ptr;
+  register JSAMPROW inptr, outptr;
+  register JSAMPLE invalue;
+  JSAMPROW outend;
+  int inrow;
+
+  for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
+    inptr = input_data[inrow];
+    outptr = output_data[inrow];
+    outend = outptr + cinfo->output_width;
+    while (outptr < outend) {
+      invalue = *inptr++;	/* don't need GETJSAMPLE() here */
+      *outptr++ = invalue;
+      *outptr++ = invalue;
+    }
+  }
+}
+
+
+/*
+ * Fast processing for the common case of 2:1 horizontal and 2:1 vertical.
+ * It's still a box filter.
+ */
+
+METHODDEF(void)
+h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
+{
+  JSAMPARRAY output_data = *output_data_ptr;
+  register JSAMPROW inptr, outptr;
+  register JSAMPLE invalue;
+  JSAMPROW outend;
+  int inrow, outrow;
+
+  inrow = outrow = 0;
+  while (outrow < cinfo->max_v_samp_factor) {
+    inptr = input_data[inrow];
+    outptr = output_data[outrow];
+    outend = outptr + cinfo->output_width;
+    while (outptr < outend) {
+      invalue = *inptr++;	/* don't need GETJSAMPLE() here */
+      *outptr++ = invalue;
+      *outptr++ = invalue;
+    }
+    jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
+		      1, cinfo->output_width);
+    inrow++;
+    outrow += 2;
+  }
+}
+
+
+/*
+ * Fancy processing for the common case of 2:1 horizontal and 1:1 vertical.
+ *
+ * The upsampling algorithm is linear interpolation between pixel centers,
+ * also known as a "triangle filter".  This is a good compromise between
+ * speed and visual quality.  The centers of the output pixels are 1/4 and 3/4
+ * of the way between input pixel centers.
+ *
+ * A note about the "bias" calculations: when rounding fractional values to
+ * integer, we do not want to always round 0.5 up to the next integer.
+ * If we did that, we'd introduce a noticeable bias towards larger values.
+ * Instead, this code is arranged so that 0.5 will be rounded up or down at
+ * alternate pixel locations (a simple ordered dither pattern).
+ */
+
+METHODDEF(void)
+h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+		     JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
+{
+  JSAMPARRAY output_data = *output_data_ptr;
+  register JSAMPROW inptr, outptr;
+  register int invalue;
+  register JDIMENSION colctr;
+  int inrow;
+
+  for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
+    inptr = input_data[inrow];
+    outptr = output_data[inrow];
+    /* Special case for first column */
+    invalue = GETJSAMPLE(*inptr++);
+    *outptr++ = (JSAMPLE) invalue;
+    *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(*inptr) + 2) >> 2);
+
+    for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {
+      /* General case: 3/4 * nearer pixel + 1/4 * further pixel */
+      invalue = GETJSAMPLE(*inptr++) * 3;
+      *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(inptr[-2]) + 1) >> 2);
+      *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(*inptr) + 2) >> 2);
+    }
+
+    /* Special case for last column */
+    invalue = GETJSAMPLE(*inptr);
+    *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(inptr[-1]) + 1) >> 2);
+    *outptr++ = (JSAMPLE) invalue;
+  }
+}
+
+
+/*
+ * Fancy processing for the common case of 2:1 horizontal and 2:1 vertical.
+ * Again a triangle filter; see comments for h2v1 case, above.
+ *
+ * It is OK for us to reference the adjacent input rows because we demanded
+ * context from the main buffer controller (see initialization code).
+ */
+
+METHODDEF(void)
+h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+		     JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
+{
+  JSAMPARRAY output_data = *output_data_ptr;
+  register JSAMPROW inptr0, inptr1, outptr;
+#if BITS_IN_JSAMPLE == 8
+  register int thiscolsum, lastcolsum, nextcolsum;
+#else
+  register INT32 thiscolsum, lastcolsum, nextcolsum;
+#endif
+  register JDIMENSION colctr;
+  int inrow, outrow, v;
+
+  inrow = outrow = 0;
+  while (outrow < cinfo->max_v_samp_factor) {
+    for (v = 0; v < 2; v++) {
+      /* inptr0 points to nearest input row, inptr1 points to next nearest */
+      inptr0 = input_data[inrow];
+      if (v == 0)		/* next nearest is row above */
+	inptr1 = input_data[inrow-1];
+      else			/* next nearest is row below */
+	inptr1 = input_data[inrow+1];
+      outptr = output_data[outrow++];
+
+      /* Special case for first column */
+      thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
+      nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
+      *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 8) >> 4);
+      *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4);
+      lastcolsum = thiscolsum; thiscolsum = nextcolsum;
+
+      for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {
+	/* General case: 3/4 * nearer pixel + 1/4 * further pixel in each */
+	/* dimension, thus 9/16, 3/16, 3/16, 1/16 overall */
+	nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
+	*outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4);
+	*outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4);
+	lastcolsum = thiscolsum; thiscolsum = nextcolsum;
+      }
+
+      /* Special case for last column */
+      *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4);
+      *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 7) >> 4);
+    }
+    inrow++;
+  }
+}
+
+
+/*
+ * Module initialization routine for upsampling.
+ */
+
+GLOBAL(void)
+jinit_upsampler (j_decompress_ptr cinfo)
+{
+  my_upsample_ptr upsample;
+  int ci;
+  jpeg_component_info * compptr;
+  boolean need_buffer, do_fancy;
+  int h_in_group, v_in_group, h_out_group, v_out_group;
+
+  upsample = (my_upsample_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_upsampler));
+  cinfo->upsample = (struct jpeg_upsampler *) upsample;
+  upsample->pub.start_pass = start_pass_upsample;
+  upsample->pub.upsample = sep_upsample;
+  upsample->pub.need_context_rows = FALSE; /* until we find out differently */
+
+  if (cinfo->CCIR601_sampling)	/* this isn't supported */
+    ERREXIT(cinfo, JERR_CCIR601_NOTIMPL);
+
+  /* jdmainct.c doesn't support context rows when min_DCT_scaled_size = 1,
+   * so don't ask for it.
+   */
+  do_fancy = cinfo->do_fancy_upsampling && cinfo->min_DCT_scaled_size > 1;
+
+  /* Verify we can handle the sampling factors, select per-component methods,
+   * and create storage as needed.
+   */
+  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+       ci++, compptr++) {
+    /* Compute size of an "input group" after IDCT scaling.  This many samples
+     * are to be converted to max_h_samp_factor * max_v_samp_factor pixels.
+     */
+    h_in_group = (compptr->h_samp_factor * compptr->DCT_scaled_size) /
+		 cinfo->min_DCT_scaled_size;
+    v_in_group = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
+		 cinfo->min_DCT_scaled_size;
+    h_out_group = cinfo->max_h_samp_factor;
+    v_out_group = cinfo->max_v_samp_factor;
+    upsample->rowgroup_height[ci] = v_in_group; /* save for use later */
+    need_buffer = TRUE;
+    if (! compptr->component_needed) {
+      /* Don't bother to upsample an uninteresting component. */
+      upsample->methods[ci] = noop_upsample;
+      need_buffer = FALSE;
+    } else if (h_in_group == h_out_group && v_in_group == v_out_group) {
+      /* Fullsize components can be processed without any work. */
+      upsample->methods[ci] = fullsize_upsample;
+      need_buffer = FALSE;
+    } else if (h_in_group * 2 == h_out_group &&
+	       v_in_group == v_out_group) {
+      /* Special cases for 2h1v upsampling */
+      if (do_fancy && compptr->downsampled_width > 2)
+	upsample->methods[ci] = h2v1_fancy_upsample;
+      else
+	upsample->methods[ci] = h2v1_upsample;
+    } else if (h_in_group * 2 == h_out_group &&
+	       v_in_group * 2 == v_out_group) {
+      /* Special cases for 2h2v upsampling */
+      if (do_fancy && compptr->downsampled_width > 2) {
+	upsample->methods[ci] = h2v2_fancy_upsample;
+	upsample->pub.need_context_rows = TRUE;
+      } else
+	upsample->methods[ci] = h2v2_upsample;
+    } else if ((h_out_group % h_in_group) == 0 &&
+	       (v_out_group % v_in_group) == 0) {
+      /* Generic integral-factors upsampling method */
+      upsample->methods[ci] = int_upsample;
+      upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group);
+      upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group);
+    } else
+      ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL);
+    if (need_buffer) {
+      upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray)
+	((j_common_ptr) cinfo, JPOOL_IMAGE,
+	 (JDIMENSION) jround_up((long) cinfo->output_width,
+				(long) cinfo->max_h_samp_factor),
+	 (JDIMENSION) cinfo->max_v_samp_factor);
+    }
+  }
+}
diff --git a/samples/jpeglib/jdtrans.c b/samples/jpeglib/jdtrans.c
new file mode 100644
index 0000000..6c0ab71
--- /dev/null
+++ b/samples/jpeglib/jdtrans.c
@@ -0,0 +1,143 @@
+/*
+ * jdtrans.c
+ *
+ * Copyright (C) 1995-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains library routines for transcoding decompression,
+ * that is, reading raw DCT coefficient arrays from an input JPEG file.
+ * The routines in jdapimin.c will also be needed by a transcoder.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Forward declarations */
+LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo));
+
+
+/*
+ * Read the coefficient arrays from a JPEG file.
+ * jpeg_read_header must be completed before calling this.
+ *
+ * The entire image is read into a set of virtual coefficient-block arrays,
+ * one per component.  The return value is a pointer to the array of
+ * virtual-array descriptors.  These can be manipulated directly via the
+ * JPEG memory manager, or handed off to jpeg_write_coefficients().
+ * To release the memory occupied by the virtual arrays, call
+ * jpeg_finish_decompress() when done with the data.
+ *
+ * An alternative usage is to simply obtain access to the coefficient arrays
+ * during a buffered-image-mode decompression operation.  This is allowed
+ * after any jpeg_finish_output() call.  The arrays can be accessed until
+ * jpeg_finish_decompress() is called.  (Note that any call to the library
+ * may reposition the arrays, so don't rely on access_virt_barray() results
+ * to stay valid across library calls.)
+ *
+ * Returns NULL if suspended.  This case need be checked only if
+ * a suspending data source is used.
+ */
+
+GLOBAL(jvirt_barray_ptr *)
+jpeg_read_coefficients (j_decompress_ptr cinfo)
+{
+  if (cinfo->global_state == DSTATE_READY) {
+    /* First call: initialize active modules */
+    transdecode_master_selection(cinfo);
+    cinfo->global_state = DSTATE_RDCOEFS;
+  }
+  if (cinfo->global_state == DSTATE_RDCOEFS) {
+    /* Absorb whole file into the coef buffer */
+    for (;;) {
+      int retcode;
+      /* Call progress monitor hook if present */
+      if (cinfo->progress != NULL)
+	(*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
+      /* Absorb some more input */
+      retcode = (*cinfo->inputctl->consume_input) (cinfo);
+      if (retcode == JPEG_SUSPENDED)
+	return NULL;
+      if (retcode == JPEG_REACHED_EOI)
+	break;
+      /* Advance progress counter if appropriate */
+      if (cinfo->progress != NULL &&
+	  (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) {
+	if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) {
+	  /* startup underestimated number of scans; ratchet up one scan */
+	  cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows;
+	}
+      }
+    }
+    /* Set state so that jpeg_finish_decompress does the right thing */
+    cinfo->global_state = DSTATE_STOPPING;
+  }
+  /* At this point we should be in state DSTATE_STOPPING if being used
+   * standalone, or in state DSTATE_BUFIMAGE if being invoked to get access
+   * to the coefficients during a full buffered-image-mode decompression.
+   */
+  if ((cinfo->global_state == DSTATE_STOPPING ||
+       cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) {
+    return cinfo->coef->coef_arrays;
+  }
+  /* Oops, improper usage */
+  ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+  return NULL;			/* keep compiler happy */
+}
+
+
+/*
+ * Master selection of decompression modules for transcoding.
+ * This substitutes for jdmaster.c's initialization of the full decompressor.
+ */
+
+LOCAL(void)
+transdecode_master_selection (j_decompress_ptr cinfo)
+{
+  /* This is effectively a buffered-image operation. */
+  cinfo->buffered_image = TRUE;
+
+  /* Entropy decoding: either Huffman or arithmetic coding. */
+  if (cinfo->arith_code) {
+    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
+  } else {
+    if (cinfo->progressive_mode) {
+#ifdef D_PROGRESSIVE_SUPPORTED
+      jinit_phuff_decoder(cinfo);
+#else
+      ERREXIT(cinfo, JERR_NOT_COMPILED);
+#endif
+    } else
+      jinit_huff_decoder(cinfo);
+  }
+
+  /* Always get a full-image coefficient buffer. */
+  jinit_d_coef_controller(cinfo, TRUE);
+
+  /* We can now tell the memory manager to allocate virtual arrays. */
+  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
+
+  /* Initialize input side of decompressor to consume first scan. */
+  (*cinfo->inputctl->start_input_pass) (cinfo);
+
+  /* Initialize progress monitoring. */
+  if (cinfo->progress != NULL) {
+    int nscans;
+    /* Estimate number of scans to set pass_limit. */
+    if (cinfo->progressive_mode) {
+      /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */
+      nscans = 2 + 3 * cinfo->num_components;
+    } else if (cinfo->inputctl->has_multiple_scans) {
+      /* For a nonprogressive multiscan file, estimate 1 scan per component. */
+      nscans = cinfo->num_components;
+    } else {
+      nscans = 1;
+    }
+    cinfo->progress->pass_counter = 0L;
+    cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans;
+    cinfo->progress->completed_passes = 0;
+    cinfo->progress->total_passes = 1;
+  }
+}
diff --git a/samples/jpeglib/jerror.c b/samples/jpeglib/jerror.c
new file mode 100644
index 0000000..3da7be8
--- /dev/null
+++ b/samples/jpeglib/jerror.c
@@ -0,0 +1,252 @@
+/*
+ * jerror.c
+ *
+ * Copyright (C) 1991-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains simple error-reporting and trace-message routines.
+ * These are suitable for Unix-like systems and others where writing to
+ * stderr is the right thing to do.  Many applications will want to replace
+ * some or all of these routines.
+ *
+ * If you define USE_WINDOWS_MESSAGEBOX in jconfig.h or in the makefile,
+ * you get a Windows-specific hack to display error messages in a dialog box.
+ * It ain't much, but it beats dropping error messages into the bit bucket,
+ * which is what happens to output to stderr under most Windows C compilers.
+ *
+ * These routines are used by both the compression and decompression code.
+ */
+
+/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jversion.h"
+#include "jerror.h"
+
+#ifdef USE_WINDOWS_MESSAGEBOX
+#include <windows.h>
+#endif
+
+#ifndef EXIT_FAILURE		/* define exit() codes if not provided */
+#define EXIT_FAILURE  1
+#endif
+
+
+/*
+ * Create the message string table.
+ * We do this from the master message list in jerror.h by re-reading
+ * jerror.h with a suitable definition for macro JMESSAGE.
+ * The message table is made an external symbol just in case any applications
+ * want to refer to it directly.
+ */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jpeg_std_message_table	jMsgTable
+#endif
+
+#define JMESSAGE(code,string)	string ,
+
+const char * const jpeg_std_message_table[] = {
+#include "jerror.h"
+  NULL
+};
+
+
+/*
+ * Error exit handler: must not return to caller.
+ *
+ * Applications may override this if they want to get control back after
+ * an error.  Typically one would longjmp somewhere instead of exiting.
+ * The setjmp buffer can be made a private field within an expanded error
+ * handler object.  Note that the info needed to generate an error message
+ * is stored in the error object, so you can generate the message now or
+ * later, at your convenience.
+ * You should make sure that the JPEG object is cleaned up (with jpeg_abort
+ * or jpeg_destroy) at some point.
+ */
+
+METHODDEF(void)
+error_exit (j_common_ptr cinfo)
+{
+  /* Always display the message */
+  (*cinfo->err->output_message) (cinfo);
+
+  /* Let the memory manager delete any temp files before we die */
+  jpeg_destroy(cinfo);
+
+  exit(EXIT_FAILURE);
+}
+
+
+/*
+ * Actual output of an error or trace message.
+ * Applications may override this method to send JPEG messages somewhere
+ * other than stderr.
+ *
+ * On Windows, printing to stderr is generally completely useless,
+ * so we provide optional code to produce an error-dialog popup.
+ * Most Windows applications will still prefer to override this routine,
+ * but if they don't, it'll do something at least marginally useful.
+ *
+ * NOTE: to use the library in an environment that doesn't support the
+ * C stdio library, you may have to delete the call to fprintf() entirely,
+ * not just not use this routine.
+ */
+
+METHODDEF(void)
+output_message (j_common_ptr cinfo)
+{
+  char buffer[JMSG_LENGTH_MAX];
+
+  /* Create the message */
+  (*cinfo->err->format_message) (cinfo, buffer);
+
+#ifdef USE_WINDOWS_MESSAGEBOX
+  /* Display it in a message dialog box */
+  MessageBox(GetActiveWindow(), buffer, "JPEG Library Error",
+	     MB_OK | MB_ICONERROR);
+#else
+  /* Send it to stderr, adding a newline */
+  fprintf(stderr, "%s\n", buffer);
+#endif
+}
+
+
+/*
+ * Decide whether to emit a trace or warning message.
+ * msg_level is one of:
+ *   -1: recoverable corrupt-data warning, may want to abort.
+ *    0: important advisory messages (always display to user).
+ *    1: first level of tracing detail.
+ *    2,3,...: successively more detailed tracing messages.
+ * An application might override this method if it wanted to abort on warnings
+ * or change the policy about which messages to display.
+ */
+
+METHODDEF(void)
+emit_message (j_common_ptr cinfo, int msg_level)
+{
+  struct jpeg_error_mgr * err = cinfo->err;
+
+  if (msg_level < 0) {
+    /* It's a warning message.  Since corrupt files may generate many warnings,
+     * the policy implemented here is to show only the first warning,
+     * unless trace_level >= 3.
+     */
+    if (err->num_warnings == 0 || err->trace_level >= 3)
+      (*err->output_message) (cinfo);
+    /* Always count warnings in num_warnings. */
+    err->num_warnings++;
+  } else {
+    /* It's a trace message.  Show it if trace_level >= msg_level. */
+    if (err->trace_level >= msg_level)
+      (*err->output_message) (cinfo);
+  }
+}
+
+
+/*
+ * Format a message string for the most recent JPEG error or message.
+ * The message is stored into buffer, which should be at least JMSG_LENGTH_MAX
+ * characters.  Note that no '\n' character is added to the string.
+ * Few applications should need to override this method.
+ */
+
+METHODDEF(void)
+format_message (j_common_ptr cinfo, char * buffer)
+{
+  struct jpeg_error_mgr * err = cinfo->err;
+  int msg_code = err->msg_code;
+  const char * msgtext = NULL;
+  const char * msgptr;
+  char ch;
+  boolean isstring;
+
+  /* Look up message string in proper table */
+  if (msg_code > 0 && msg_code <= err->last_jpeg_message) {
+    msgtext = err->jpeg_message_table[msg_code];
+  } else if (err->addon_message_table != NULL &&
+	     msg_code >= err->first_addon_message &&
+	     msg_code <= err->last_addon_message) {
+    msgtext = err->addon_message_table[msg_code - err->first_addon_message];
+  }
+
+  /* Defend against bogus message number */
+  if (msgtext == NULL) {
+    err->msg_parm.i[0] = msg_code;
+    msgtext = err->jpeg_message_table[0];
+  }
+
+  /* Check for string parameter, as indicated by %s in the message text */
+  isstring = FALSE;
+  msgptr = msgtext;
+  while ((ch = *msgptr++) != '\0') {
+    if (ch == '%') {
+      if (*msgptr == 's') isstring = TRUE;
+      break;
+    }
+  }
+
+  /* Format the message into the passed buffer */
+  if (isstring)
+    sprintf(buffer, msgtext, err->msg_parm.s);
+  else
+    sprintf(buffer, msgtext,
+	    err->msg_parm.i[0], err->msg_parm.i[1],
+	    err->msg_parm.i[2], err->msg_parm.i[3],
+	    err->msg_parm.i[4], err->msg_parm.i[5],
+	    err->msg_parm.i[6], err->msg_parm.i[7]);
+}
+
+
+/*
+ * Reset error state variables at start of a new image.
+ * This is called during compression startup to reset trace/error
+ * processing to default state, without losing any application-specific
+ * method pointers.  An application might possibly want to override
+ * this method if it has additional error processing state.
+ */
+
+METHODDEF(void)
+reset_error_mgr (j_common_ptr cinfo)
+{
+  cinfo->err->num_warnings = 0;
+  /* trace_level is not reset since it is an application-supplied parameter */
+  cinfo->err->msg_code = 0;	/* may be useful as a flag for "no error" */
+}
+
+
+/*
+ * Fill in the standard error-handling methods in a jpeg_error_mgr object.
+ * Typical call is:
+ *	struct jpeg_compress_struct cinfo;
+ *	struct jpeg_error_mgr err;
+ *
+ *	cinfo.err = jpeg_std_error(&err);
+ * after which the application may override some of the methods.
+ */
+
+GLOBAL(struct jpeg_error_mgr *)
+jpeg_std_error (struct jpeg_error_mgr * err)
+{
+  err->error_exit = error_exit;
+  err->emit_message = emit_message;
+  err->output_message = output_message;
+  err->format_message = format_message;
+  err->reset_error_mgr = reset_error_mgr;
+
+  err->trace_level = 0;		/* default = no tracing */
+  err->num_warnings = 0;	/* no warnings emitted yet */
+  err->msg_code = 0;		/* may be useful as a flag for "no error" */
+
+  /* Initialize message table pointers */
+  err->jpeg_message_table = jpeg_std_message_table;
+  err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1;
+
+  err->addon_message_table = NULL;
+  err->first_addon_message = 0;	/* for safety */
+  err->last_addon_message = 0;
+
+  return err;
+}
diff --git a/samples/jpeglib/jerror.h b/samples/jpeglib/jerror.h
new file mode 100644
index 0000000..fc2fffe
--- /dev/null
+++ b/samples/jpeglib/jerror.h
@@ -0,0 +1,291 @@
+/*
+ * jerror.h
+ *
+ * Copyright (C) 1994-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file defines the error and message codes for the JPEG library.
+ * Edit this file to add new codes, or to translate the message strings to
+ * some other language.
+ * A set of error-reporting macros are defined too.  Some applications using
+ * the JPEG library may wish to include this file to get the error codes
+ * and/or the macros.
+ */
+
+/*
+ * To define the enum list of message codes, include this file without
+ * defining macro JMESSAGE.  To create a message string table, include it
+ * again with a suitable JMESSAGE definition (see jerror.c for an example).
+ */
+#ifndef JMESSAGE
+#ifndef JERROR_H
+/* First time through, define the enum list */
+#define JMAKE_ENUM_LIST
+#else
+/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
+#define JMESSAGE(code,string)
+#endif /* JERROR_H */
+#endif /* JMESSAGE */
+
+#ifdef JMAKE_ENUM_LIST
+
+typedef enum {
+
+#define JMESSAGE(code,string)	code ,
+
+#endif /* JMAKE_ENUM_LIST */
+
+JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
+
+/* For maintenance convenience, list is alphabetical by message code name */
+JMESSAGE(JERR_ARITH_NOTIMPL,
+	 "Sorry, there are legal restrictions on arithmetic coding")
+JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix")
+JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
+JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode")
+JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS")
+JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
+JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported")
+JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition")
+JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace")
+JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace")
+JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length")
+JMESSAGE(JERR_BAD_LIB_VERSION,
+	 "Wrong JPEG library version: library is %d, caller expects %d")
+JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan")
+JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d")
+JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d")
+JMESSAGE(JERR_BAD_PROGRESSION,
+	 "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d")
+JMESSAGE(JERR_BAD_PROG_SCRIPT,
+	 "Invalid progressive parameters at scan script entry %d")
+JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors")
+JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d")
+JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d")
+JMESSAGE(JERR_BAD_STRUCT_SIZE,
+	 "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u")
+JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access")
+JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small")
+JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here")
+JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet")
+JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d")
+JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request")
+JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d")
+JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x")
+JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d")
+JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d")
+JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)")
+JMESSAGE(JERR_EMS_READ, "Read from EMS failed")
+JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed")
+JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan")
+JMESSAGE(JERR_FILE_READ, "Input file read error")
+JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?")
+JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet")
+JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow")
+JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry")
+JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels")
+JMESSAGE(JERR_INPUT_EMPTY, "Empty input file")
+JMESSAGE(JERR_INPUT_EOF, "Premature end of input file")
+JMESSAGE(JERR_MISMATCHED_QUANT_TABLE,
+	 "Cannot transcode due to multiple use of quantization table %d")
+JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data")
+JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change")
+JMESSAGE(JERR_NOTIMPL, "Not implemented yet")
+JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
+JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported")
+JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined")
+JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image")
+JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined")
+JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x")
+JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)")
+JMESSAGE(JERR_QUANT_COMPONENTS,
+	 "Cannot quantize more than %d color components")
+JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors")
+JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors")
+JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers")
+JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker")
+JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x")
+JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers")
+JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF")
+JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s")
+JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file")
+JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file")
+JMESSAGE(JERR_TFILE_WRITE,
+	 "Write failed on temporary file --- out of disk space?")
+JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines")
+JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x")
+JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up")
+JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation")
+JMESSAGE(JERR_XMS_READ, "Read from XMS failed")
+JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed")
+JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT)
+JMESSAGE(JMSG_VERSION, JVERSION)
+JMESSAGE(JTRC_16BIT_TABLES,
+	 "Caution: quantization tables are too coarse for baseline JPEG")
+JMESSAGE(JTRC_ADOBE,
+	 "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d")
+JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u")
+JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u")
+JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x")
+JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x")
+JMESSAGE(JTRC_DQT, "Define Quantization Table %d  precision %d")
+JMESSAGE(JTRC_DRI, "Define Restart Interval %u")
+JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u")
+JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u")
+JMESSAGE(JTRC_EOI, "End Of Image")
+JMESSAGE(JTRC_HUFFBITS, "        %3d %3d %3d %3d %3d %3d %3d %3d")
+JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d  %d")
+JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE,
+	 "Warning: thumbnail image size does not match data length %u")
+JMESSAGE(JTRC_JFIF_EXTENSION,
+	 "JFIF extension marker: type 0x%02x, length %u")
+JMESSAGE(JTRC_JFIF_THUMBNAIL, "    with %d x %d thumbnail image")
+JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u")
+JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x")
+JMESSAGE(JTRC_QUANTVALS, "        %4u %4u %4u %4u %4u %4u %4u %4u")
+JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors")
+JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors")
+JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization")
+JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d")
+JMESSAGE(JTRC_RST, "RST%d")
+JMESSAGE(JTRC_SMOOTH_NOTIMPL,
+	 "Smoothing not supported with nonstandard sampling ratios")
+JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d")
+JMESSAGE(JTRC_SOF_COMPONENT, "    Component %d: %dhx%dv q=%d")
+JMESSAGE(JTRC_SOI, "Start of Image")
+JMESSAGE(JTRC_SOS, "Start Of Scan: %d components")
+JMESSAGE(JTRC_SOS_COMPONENT, "    Component %d: dc=%d ac=%d")
+JMESSAGE(JTRC_SOS_PARAMS, "  Ss=%d, Se=%d, Ah=%d, Al=%d")
+JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s")
+JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s")
+JMESSAGE(JTRC_THUMB_JPEG,
+	 "JFIF extension marker: JPEG-compressed thumbnail image, length %u")
+JMESSAGE(JTRC_THUMB_PALETTE,
+	 "JFIF extension marker: palette thumbnail image, length %u")
+JMESSAGE(JTRC_THUMB_RGB,
+	 "JFIF extension marker: RGB thumbnail image, length %u")
+JMESSAGE(JTRC_UNKNOWN_IDS,
+	 "Unrecognized component IDs %d %d %d, assuming YCbCr")
+JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
+JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
+JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
+JMESSAGE(JWRN_BOGUS_PROGRESSION,
+	 "Inconsistent progression sequence for component %d coefficient %d")
+JMESSAGE(JWRN_EXTRANEOUS_DATA,
+	 "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x")
+JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment")
+JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code")
+JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d")
+JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file")
+JMESSAGE(JWRN_MUST_RESYNC,
+	 "Corrupt JPEG data: found marker 0x%02x instead of RST%d")
+JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG")
+JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines")
+
+#ifdef JMAKE_ENUM_LIST
+
+  JMSG_LASTMSGCODE
+} J_MESSAGE_CODE;
+
+#undef JMAKE_ENUM_LIST
+#endif /* JMAKE_ENUM_LIST */
+
+/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
+#undef JMESSAGE
+
+
+#ifndef JERROR_H
+#define JERROR_H
+
+/* Macros to simplify using the error and trace message stuff */
+/* The first parameter is either type of cinfo pointer */
+
+/* Fatal errors (print message and exit) */
+#define ERREXIT(cinfo,code)  \
+  ((cinfo)->err->msg_code = (code), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXIT1(cinfo,code,p1)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXIT2(cinfo,code,p1,p2)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXIT3(cinfo,code,p1,p2,p3)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (cinfo)->err->msg_parm.i[2] = (p3), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXIT4(cinfo,code,p1,p2,p3,p4)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (cinfo)->err->msg_parm.i[2] = (p3), \
+   (cinfo)->err->msg_parm.i[3] = (p4), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXITS(cinfo,code,str)  \
+  ((cinfo)->err->msg_code = (code), \
+   strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+
+#define MAKESTMT(stuff)		do { stuff } while (0)
+
+/* Nonfatal errors (we can keep going, but the data is probably corrupt) */
+#define WARNMS(cinfo,code)  \
+  ((cinfo)->err->msg_code = (code), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
+#define WARNMS1(cinfo,code,p1)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
+#define WARNMS2(cinfo,code,p1,p2)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
+
+/* Informational/debugging messages */
+#define TRACEMS(cinfo,lvl,code)  \
+  ((cinfo)->err->msg_code = (code), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
+#define TRACEMS1(cinfo,lvl,code,p1)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
+#define TRACEMS2(cinfo,lvl,code,p1,p2)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
+#define TRACEMS3(cinfo,lvl,code,p1,p2,p3)  \
+  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
+	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \
+	   (cinfo)->err->msg_code = (code); \
+	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
+#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4)  \
+  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
+	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
+	   (cinfo)->err->msg_code = (code); \
+	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
+#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5)  \
+  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
+	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
+	   _mp[4] = (p5); \
+	   (cinfo)->err->msg_code = (code); \
+	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
+#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8)  \
+  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
+	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
+	   _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \
+	   (cinfo)->err->msg_code = (code); \
+	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
+#define TRACEMSS(cinfo,lvl,code,str)  \
+  ((cinfo)->err->msg_code = (code), \
+   strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
+
+#endif /* JERROR_H */
diff --git a/samples/jpeglib/jfdctflt.c b/samples/jpeglib/jfdctflt.c
new file mode 100644
index 0000000..79d7a00
--- /dev/null
+++ b/samples/jpeglib/jfdctflt.c
@@ -0,0 +1,168 @@
+/*
+ * jfdctflt.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains a floating-point implementation of the
+ * forward DCT (Discrete Cosine Transform).
+ *
+ * This implementation should be more accurate than either of the integer
+ * DCT implementations.  However, it may not give the same results on all
+ * machines because of differences in roundoff behavior.  Speed will depend
+ * on the hardware's floating point capacity.
+ *
+ * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT
+ * on each column.  Direct algorithms are also available, but they are
+ * much more complex and seem not to be any faster when reduced to code.
+ *
+ * This implementation is based on Arai, Agui, and Nakajima's algorithm for
+ * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in
+ * Japanese, but the algorithm is described in the Pennebaker & Mitchell
+ * JPEG textbook (see REFERENCES section in file README).  The following code
+ * is based directly on figure 4-8 in P&M.
+ * While an 8-point DCT cannot be done in less than 11 multiplies, it is
+ * possible to arrange the computation so that many of the multiplies are
+ * simple scalings of the final outputs.  These multiplies can then be
+ * folded into the multiplications or divisions by the JPEG quantization
+ * table entries.  The AA&N method leaves only 5 multiplies and 29 adds
+ * to be done in the DCT itself.
+ * The primary disadvantage of this method is that with a fixed-point
+ * implementation, accuracy is lost due to imprecise representation of the
+ * scaled quantization values.  However, that problem does not arise if
+ * we use floating point arithmetic.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdct.h"		/* Private declarations for DCT subsystem */
+
+#ifdef DCT_FLOAT_SUPPORTED
+
+
+/*
+ * This module is specialized to the case DCTSIZE = 8.
+ */
+
+#if DCTSIZE != 8
+  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
+#endif
+
+
+/*
+ * Perform the forward DCT on one block of samples.
+ */
+
+GLOBAL(void)
+jpeg_fdct_float (FAST_FLOAT * data)
+{
+  FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  FAST_FLOAT tmp10, tmp11, tmp12, tmp13;
+  FAST_FLOAT z1, z2, z3, z4, z5, z11, z13;
+  FAST_FLOAT *dataptr;
+  int ctr;
+
+  /* Pass 1: process rows. */
+
+  dataptr = data;
+  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+    tmp0 = dataptr[0] + dataptr[7];
+    tmp7 = dataptr[0] - dataptr[7];
+    tmp1 = dataptr[1] + dataptr[6];
+    tmp6 = dataptr[1] - dataptr[6];
+    tmp2 = dataptr[2] + dataptr[5];
+    tmp5 = dataptr[2] - dataptr[5];
+    tmp3 = dataptr[3] + dataptr[4];
+    tmp4 = dataptr[3] - dataptr[4];
+    
+    /* Even part */
+    
+    tmp10 = tmp0 + tmp3;	/* phase 2 */
+    tmp13 = tmp0 - tmp3;
+    tmp11 = tmp1 + tmp2;
+    tmp12 = tmp1 - tmp2;
+    
+    dataptr[0] = tmp10 + tmp11; /* phase 3 */
+    dataptr[4] = tmp10 - tmp11;
+    
+    z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */
+    dataptr[2] = tmp13 + z1;	/* phase 5 */
+    dataptr[6] = tmp13 - z1;
+    
+    /* Odd part */
+
+    tmp10 = tmp4 + tmp5;	/* phase 2 */
+    tmp11 = tmp5 + tmp6;
+    tmp12 = tmp6 + tmp7;
+
+    /* The rotator is modified from fig 4-8 to avoid extra negations. */
+    z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */
+    z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */
+    z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */
+    z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */
+
+    z11 = tmp7 + z3;		/* phase 5 */
+    z13 = tmp7 - z3;
+
+    dataptr[5] = z13 + z2;	/* phase 6 */
+    dataptr[3] = z13 - z2;
+    dataptr[1] = z11 + z4;
+    dataptr[7] = z11 - z4;
+
+    dataptr += DCTSIZE;		/* advance pointer to next row */
+  }
+
+  /* Pass 2: process columns. */
+
+  dataptr = data;
+  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+    tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
+    tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
+    tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
+    tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
+    tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
+    tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
+    tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
+    tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
+    
+    /* Even part */
+    
+    tmp10 = tmp0 + tmp3;	/* phase 2 */
+    tmp13 = tmp0 - tmp3;
+    tmp11 = tmp1 + tmp2;
+    tmp12 = tmp1 - tmp2;
+    
+    dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */
+    dataptr[DCTSIZE*4] = tmp10 - tmp11;
+    
+    z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */
+    dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */
+    dataptr[DCTSIZE*6] = tmp13 - z1;
+    
+    /* Odd part */
+
+    tmp10 = tmp4 + tmp5;	/* phase 2 */
+    tmp11 = tmp5 + tmp6;
+    tmp12 = tmp6 + tmp7;
+
+    /* The rotator is modified from fig 4-8 to avoid extra negations. */
+    z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */
+    z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */
+    z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */
+    z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */
+
+    z11 = tmp7 + z3;		/* phase 5 */
+    z13 = tmp7 - z3;
+
+    dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */
+    dataptr[DCTSIZE*3] = z13 - z2;
+    dataptr[DCTSIZE*1] = z11 + z4;
+    dataptr[DCTSIZE*7] = z11 - z4;
+
+    dataptr++;			/* advance pointer to next column */
+  }
+}
+
+#endif /* DCT_FLOAT_SUPPORTED */
diff --git a/samples/jpeglib/jfdctfst.c b/samples/jpeglib/jfdctfst.c
new file mode 100644
index 0000000..ccb378a
--- /dev/null
+++ b/samples/jpeglib/jfdctfst.c
@@ -0,0 +1,224 @@
+/*
+ * jfdctfst.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains a fast, not so accurate integer implementation of the
+ * forward DCT (Discrete Cosine Transform).
+ *
+ * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT
+ * on each column.  Direct algorithms are also available, but they are
+ * much more complex and seem not to be any faster when reduced to code.
+ *
+ * This implementation is based on Arai, Agui, and Nakajima's algorithm for
+ * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in
+ * Japanese, but the algorithm is described in the Pennebaker & Mitchell
+ * JPEG textbook (see REFERENCES section in file README).  The following code
+ * is based directly on figure 4-8 in P&M.
+ * While an 8-point DCT cannot be done in less than 11 multiplies, it is
+ * possible to arrange the computation so that many of the multiplies are
+ * simple scalings of the final outputs.  These multiplies can then be
+ * folded into the multiplications or divisions by the JPEG quantization
+ * table entries.  The AA&N method leaves only 5 multiplies and 29 adds
+ * to be done in the DCT itself.
+ * The primary disadvantage of this method is that with fixed-point math,
+ * accuracy is lost due to imprecise representation of the scaled
+ * quantization values.  The smaller the quantization table entry, the less
+ * precise the scaled value, so this implementation does worse with high-
+ * quality-setting files than with low-quality ones.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdct.h"		/* Private declarations for DCT subsystem */
+
+#ifdef DCT_IFAST_SUPPORTED
+
+
+/*
+ * This module is specialized to the case DCTSIZE = 8.
+ */
+
+#if DCTSIZE != 8
+  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
+#endif
+
+
+/* Scaling decisions are generally the same as in the LL&M algorithm;
+ * see jfdctint.c for more details.  However, we choose to descale
+ * (right shift) multiplication products as soon as they are formed,
+ * rather than carrying additional fractional bits into subsequent additions.
+ * This compromises accuracy slightly, but it lets us save a few shifts.
+ * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples)
+ * everywhere except in the multiplications proper; this saves a good deal
+ * of work on 16-bit-int machines.
+ *
+ * Again to save a few shifts, the intermediate results between pass 1 and
+ * pass 2 are not upscaled, but are represented only to integral precision.
+ *
+ * A final compromise is to represent the multiplicative constants to only
+ * 8 fractional bits, rather than 13.  This saves some shifting work on some
+ * machines, and may also reduce the cost of multiplication (since there
+ * are fewer one-bits in the constants).
+ */
+
+#define CONST_BITS  8
+
+
+/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
+ * causing a lot of useless floating-point operations at run time.
+ * To get around this we use the following pre-calculated constants.
+ * If you change CONST_BITS you may want to add appropriate values.
+ * (With a reasonable C compiler, you can just rely on the FIX() macro...)
+ */
+
+#if CONST_BITS == 8
+#define FIX_0_382683433  ((INT32)   98)		/* FIX(0.382683433) */
+#define FIX_0_541196100  ((INT32)  139)		/* FIX(0.541196100) */
+#define FIX_0_707106781  ((INT32)  181)		/* FIX(0.707106781) */
+#define FIX_1_306562965  ((INT32)  334)		/* FIX(1.306562965) */
+#else
+#define FIX_0_382683433  FIX(0.382683433)
+#define FIX_0_541196100  FIX(0.541196100)
+#define FIX_0_707106781  FIX(0.707106781)
+#define FIX_1_306562965  FIX(1.306562965)
+#endif
+
+
+/* We can gain a little more speed, with a further compromise in accuracy,
+ * by omitting the addition in a descaling shift.  This yields an incorrectly
+ * rounded result half the time...
+ */
+
+#ifndef USE_ACCURATE_ROUNDING
+#undef DESCALE
+#define DESCALE(x,n)  RIGHT_SHIFT(x, n)
+#endif
+
+
+/* Multiply a DCTELEM variable by an INT32 constant, and immediately
+ * descale to yield a DCTELEM result.
+ */
+
+#define MULTIPLY(var,const)  ((DCTELEM) DESCALE((var) * (const), CONST_BITS))
+
+
+/*
+ * Perform the forward DCT on one block of samples.
+ */
+
+GLOBAL(void)
+jpeg_fdct_ifast (DCTELEM * data)
+{
+  DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  DCTELEM tmp10, tmp11, tmp12, tmp13;
+  DCTELEM z1, z2, z3, z4, z5, z11, z13;
+  DCTELEM *dataptr;
+  int ctr;
+  SHIFT_TEMPS
+
+  /* Pass 1: process rows. */
+
+  dataptr = data;
+  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+    tmp0 = dataptr[0] + dataptr[7];
+    tmp7 = dataptr[0] - dataptr[7];
+    tmp1 = dataptr[1] + dataptr[6];
+    tmp6 = dataptr[1] - dataptr[6];
+    tmp2 = dataptr[2] + dataptr[5];
+    tmp5 = dataptr[2] - dataptr[5];
+    tmp3 = dataptr[3] + dataptr[4];
+    tmp4 = dataptr[3] - dataptr[4];
+    
+    /* Even part */
+    
+    tmp10 = tmp0 + tmp3;	/* phase 2 */
+    tmp13 = tmp0 - tmp3;
+    tmp11 = tmp1 + tmp2;
+    tmp12 = tmp1 - tmp2;
+    
+    dataptr[0] = tmp10 + tmp11; /* phase 3 */
+    dataptr[4] = tmp10 - tmp11;
+    
+    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */
+    dataptr[2] = tmp13 + z1;	/* phase 5 */
+    dataptr[6] = tmp13 - z1;
+    
+    /* Odd part */
+
+    tmp10 = tmp4 + tmp5;	/* phase 2 */
+    tmp11 = tmp5 + tmp6;
+    tmp12 = tmp6 + tmp7;
+
+    /* The rotator is modified from fig 4-8 to avoid extra negations. */
+    z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */
+    z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */
+    z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */
+    z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */
+
+    z11 = tmp7 + z3;		/* phase 5 */
+    z13 = tmp7 - z3;
+
+    dataptr[5] = z13 + z2;	/* phase 6 */
+    dataptr[3] = z13 - z2;
+    dataptr[1] = z11 + z4;
+    dataptr[7] = z11 - z4;
+
+    dataptr += DCTSIZE;		/* advance pointer to next row */
+  }
+
+  /* Pass 2: process columns. */
+
+  dataptr = data;
+  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+    tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
+    tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
+    tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
+    tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
+    tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
+    tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
+    tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
+    tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
+    
+    /* Even part */
+    
+    tmp10 = tmp0 + tmp3;	/* phase 2 */
+    tmp13 = tmp0 - tmp3;
+    tmp11 = tmp1 + tmp2;
+    tmp12 = tmp1 - tmp2;
+    
+    dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */
+    dataptr[DCTSIZE*4] = tmp10 - tmp11;
+    
+    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */
+    dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */
+    dataptr[DCTSIZE*6] = tmp13 - z1;
+    
+    /* Odd part */
+
+    tmp10 = tmp4 + tmp5;	/* phase 2 */
+    tmp11 = tmp5 + tmp6;
+    tmp12 = tmp6 + tmp7;
+
+    /* The rotator is modified from fig 4-8 to avoid extra negations. */
+    z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */
+    z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */
+    z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */
+    z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */
+
+    z11 = tmp7 + z3;		/* phase 5 */
+    z13 = tmp7 - z3;
+
+    dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */
+    dataptr[DCTSIZE*3] = z13 - z2;
+    dataptr[DCTSIZE*1] = z11 + z4;
+    dataptr[DCTSIZE*7] = z11 - z4;
+
+    dataptr++;			/* advance pointer to next column */
+  }
+}
+
+#endif /* DCT_IFAST_SUPPORTED */
diff --git a/samples/jpeglib/jfdctint.c b/samples/jpeglib/jfdctint.c
new file mode 100644
index 0000000..0a78b64
--- /dev/null
+++ b/samples/jpeglib/jfdctint.c
@@ -0,0 +1,283 @@
+/*
+ * jfdctint.c
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains a slow-but-accurate integer implementation of the
+ * forward DCT (Discrete Cosine Transform).
+ *
+ * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT
+ * on each column.  Direct algorithms are also available, but they are
+ * much more complex and seem not to be any faster when reduced to code.
+ *
+ * This implementation is based on an algorithm described in
+ *   C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT
+ *   Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics,
+ *   Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991.
+ * The primary algorithm described there uses 11 multiplies and 29 adds.
+ * We use their alternate method with 12 multiplies and 32 adds.
+ * The advantage of this method is that no data path contains more than one
+ * multiplication; this allows a very simple and accurate implementation in
+ * scaled fixed-point arithmetic, with a minimal number of shifts.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdct.h"		/* Private declarations for DCT subsystem */
+
+#ifdef DCT_ISLOW_SUPPORTED
+
+
+/*
+ * This module is specialized to the case DCTSIZE = 8.
+ */
+
+#if DCTSIZE != 8
+  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
+#endif
+
+
+/*
+ * The poop on this scaling stuff is as follows:
+ *
+ * Each 1-D DCT step produces outputs which are a factor of sqrt(N)
+ * larger than the true DCT outputs.  The final outputs are therefore
+ * a factor of N larger than desired; since N=8 this can be cured by
+ * a simple right shift at the end of the algorithm.  The advantage of
+ * this arrangement is that we save two multiplications per 1-D DCT,
+ * because the y0 and y4 outputs need not be divided by sqrt(N).
+ * In the IJG code, this factor of 8 is removed by the quantization step
+ * (in jcdctmgr.c), NOT in this module.
+ *
+ * We have to do addition and subtraction of the integer inputs, which
+ * is no problem, and multiplication by fractional constants, which is
+ * a problem to do in integer arithmetic.  We multiply all the constants
+ * by CONST_SCALE and convert them to integer constants (thus retaining
+ * CONST_BITS bits of precision in the constants).  After doing a
+ * multiplication we have to divide the product by CONST_SCALE, with proper
+ * rounding, to produce the correct output.  This division can be done
+ * cheaply as a right shift of CONST_BITS bits.  We postpone shifting
+ * as long as possible so that partial sums can be added together with
+ * full fractional precision.
+ *
+ * The outputs of the first pass are scaled up by PASS1_BITS bits so that
+ * they are represented to better-than-integral precision.  These outputs
+ * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word
+ * with the recommended scaling.  (For 12-bit sample data, the intermediate
+ * array is INT32 anyway.)
+ *
+ * To avoid overflow of the 32-bit intermediate results in pass 2, we must
+ * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26.  Error analysis
+ * shows that the values given below are the most effective.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+#define CONST_BITS  13
+#define PASS1_BITS  2
+#else
+#define CONST_BITS  13
+#define PASS1_BITS  1		/* lose a little precision to avoid overflow */
+#endif
+
+/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
+ * causing a lot of useless floating-point operations at run time.
+ * To get around this we use the following pre-calculated constants.
+ * If you change CONST_BITS you may want to add appropriate values.
+ * (With a reasonable C compiler, you can just rely on the FIX() macro...)
+ */
+
+#if CONST_BITS == 13
+#define FIX_0_298631336  ((INT32)  2446)	/* FIX(0.298631336) */
+#define FIX_0_390180644  ((INT32)  3196)	/* FIX(0.390180644) */
+#define FIX_0_541196100  ((INT32)  4433)	/* FIX(0.541196100) */
+#define FIX_0_765366865  ((INT32)  6270)	/* FIX(0.765366865) */
+#define FIX_0_899976223  ((INT32)  7373)	/* FIX(0.899976223) */
+#define FIX_1_175875602  ((INT32)  9633)	/* FIX(1.175875602) */
+#define FIX_1_501321110  ((INT32)  12299)	/* FIX(1.501321110) */
+#define FIX_1_847759065  ((INT32)  15137)	/* FIX(1.847759065) */
+#define FIX_1_961570560  ((INT32)  16069)	/* FIX(1.961570560) */
+#define FIX_2_053119869  ((INT32)  16819)	/* FIX(2.053119869) */
+#define FIX_2_562915447  ((INT32)  20995)	/* FIX(2.562915447) */
+#define FIX_3_072711026  ((INT32)  25172)	/* FIX(3.072711026) */
+#else
+#define FIX_0_298631336  FIX(0.298631336)
+#define FIX_0_390180644  FIX(0.390180644)
+#define FIX_0_541196100  FIX(0.541196100)
+#define FIX_0_765366865  FIX(0.765366865)
+#define FIX_0_899976223  FIX(0.899976223)
+#define FIX_1_175875602  FIX(1.175875602)
+#define FIX_1_501321110  FIX(1.501321110)
+#define FIX_1_847759065  FIX(1.847759065)
+#define FIX_1_961570560  FIX(1.961570560)
+#define FIX_2_053119869  FIX(2.053119869)
+#define FIX_2_562915447  FIX(2.562915447)
+#define FIX_3_072711026  FIX(3.072711026)
+#endif
+
+
+/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
+ * For 8-bit samples with the recommended scaling, all the variable
+ * and constant values involved are no more than 16 bits wide, so a
+ * 16x16->32 bit multiply can be used instead of a full 32x32 multiply.
+ * For 12-bit samples, a full 32-bit multiplication will be needed.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+#define MULTIPLY(var,const)  MULTIPLY16C16(var,const)
+#else
+#define MULTIPLY(var,const)  ((var) * (const))
+#endif
+
+
+/*
+ * Perform the forward DCT on one block of samples.
+ */
+
+GLOBAL(void)
+jpeg_fdct_islow (DCTELEM * data)
+{
+  INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  INT32 tmp10, tmp11, tmp12, tmp13;
+  INT32 z1, z2, z3, z4, z5;
+  DCTELEM *dataptr;
+  int ctr;
+  SHIFT_TEMPS
+
+  /* Pass 1: process rows. */
+  /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+  /* furthermore, we scale the results by 2**PASS1_BITS. */
+
+  dataptr = data;
+  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+    tmp0 = dataptr[0] + dataptr[7];
+    tmp7 = dataptr[0] - dataptr[7];
+    tmp1 = dataptr[1] + dataptr[6];
+    tmp6 = dataptr[1] - dataptr[6];
+    tmp2 = dataptr[2] + dataptr[5];
+    tmp5 = dataptr[2] - dataptr[5];
+    tmp3 = dataptr[3] + dataptr[4];
+    tmp4 = dataptr[3] - dataptr[4];
+    
+    /* Even part per LL&M figure 1 --- note that published figure is faulty;
+     * rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
+     */
+    
+    tmp10 = tmp0 + tmp3;
+    tmp13 = tmp0 - tmp3;
+    tmp11 = tmp1 + tmp2;
+    tmp12 = tmp1 - tmp2;
+    
+    dataptr[0] = (DCTELEM) ((tmp10 + tmp11) << PASS1_BITS);
+    dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS);
+    
+    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
+    dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
+				   CONST_BITS-PASS1_BITS);
+    dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
+				   CONST_BITS-PASS1_BITS);
+    
+    /* Odd part per figure 8 --- note paper omits factor of sqrt(2).
+     * cK represents cos(K*pi/16).
+     * i0..i3 in the paper are tmp4..tmp7 here.
+     */
+    
+    z1 = tmp4 + tmp7;
+    z2 = tmp5 + tmp6;
+    z3 = tmp4 + tmp6;
+    z4 = tmp5 + tmp7;
+    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
+    
+    tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+    tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
+    tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
+    tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
+    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
+    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+    
+    z3 += z5;
+    z4 += z5;
+    
+    dataptr[7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS);
+    dataptr[5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS);
+    dataptr[3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS);
+    dataptr[1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS);
+    
+    dataptr += DCTSIZE;		/* advance pointer to next row */
+  }
+
+  /* Pass 2: process columns.
+   * We remove the PASS1_BITS scaling, but leave the results scaled up
+   * by an overall factor of 8.
+   */
+
+  dataptr = data;
+  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+    tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
+    tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
+    tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
+    tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
+    tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
+    tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
+    tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
+    tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
+    
+    /* Even part per LL&M figure 1 --- note that published figure is faulty;
+     * rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
+     */
+    
+    tmp10 = tmp0 + tmp3;
+    tmp13 = tmp0 - tmp3;
+    tmp11 = tmp1 + tmp2;
+    tmp12 = tmp1 - tmp2;
+    
+    dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS);
+    dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS);
+    
+    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
+    dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
+					   CONST_BITS+PASS1_BITS);
+    dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
+					   CONST_BITS+PASS1_BITS);
+    
+    /* Odd part per figure 8 --- note paper omits factor of sqrt(2).
+     * cK represents cos(K*pi/16).
+     * i0..i3 in the paper are tmp4..tmp7 here.
+     */
+    
+    z1 = tmp4 + tmp7;
+    z2 = tmp5 + tmp6;
+    z3 = tmp4 + tmp6;
+    z4 = tmp5 + tmp7;
+    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
+    
+    tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+    tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
+    tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
+    tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
+    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
+    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+    
+    z3 += z5;
+    z4 += z5;
+    
+    dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp4 + z1 + z3,
+					   CONST_BITS+PASS1_BITS);
+    dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp5 + z2 + z4,
+					   CONST_BITS+PASS1_BITS);
+    dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp6 + z2 + z3,
+					   CONST_BITS+PASS1_BITS);
+    dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp7 + z1 + z4,
+					   CONST_BITS+PASS1_BITS);
+    
+    dataptr++;			/* advance pointer to next column */
+  }
+}
+
+#endif /* DCT_ISLOW_SUPPORTED */
diff --git a/samples/jpeglib/jidctflt.c b/samples/jpeglib/jidctflt.c
new file mode 100644
index 0000000..0188ce3
--- /dev/null
+++ b/samples/jpeglib/jidctflt.c
@@ -0,0 +1,242 @@
+/*
+ * jidctflt.c
+ *
+ * Copyright (C) 1994-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains a floating-point implementation of the
+ * inverse DCT (Discrete Cosine Transform).  In the IJG code, this routine
+ * must also perform dequantization of the input coefficients.
+ *
+ * This implementation should be more accurate than either of the integer
+ * IDCT implementations.  However, it may not give the same results on all
+ * machines because of differences in roundoff behavior.  Speed will depend
+ * on the hardware's floating point capacity.
+ *
+ * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT
+ * on each row (or vice versa, but it's more convenient to emit a row at
+ * a time).  Direct algorithms are also available, but they are much more
+ * complex and seem not to be any faster when reduced to code.
+ *
+ * This implementation is based on Arai, Agui, and Nakajima's algorithm for
+ * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in
+ * Japanese, but the algorithm is described in the Pennebaker & Mitchell
+ * JPEG textbook (see REFERENCES section in file README).  The following code
+ * is based directly on figure 4-8 in P&M.
+ * While an 8-point DCT cannot be done in less than 11 multiplies, it is
+ * possible to arrange the computation so that many of the multiplies are
+ * simple scalings of the final outputs.  These multiplies can then be
+ * folded into the multiplications or divisions by the JPEG quantization
+ * table entries.  The AA&N method leaves only 5 multiplies and 29 adds
+ * to be done in the DCT itself.
+ * The primary disadvantage of this method is that with a fixed-point
+ * implementation, accuracy is lost due to imprecise representation of the
+ * scaled quantization values.  However, that problem does not arise if
+ * we use floating point arithmetic.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdct.h"		/* Private declarations for DCT subsystem */
+
+#ifdef DCT_FLOAT_SUPPORTED
+
+
+/*
+ * This module is specialized to the case DCTSIZE = 8.
+ */
+
+#if DCTSIZE != 8
+  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
+#endif
+
+
+/* Dequantize a coefficient by multiplying it by the multiplier-table
+ * entry; produce a float result.
+ */
+
+#define DEQUANTIZE(coef,quantval)  (((FAST_FLOAT) (coef)) * (quantval))
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients.
+ */
+
+GLOBAL(void)
+jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+		 JCOEFPTR coef_block,
+		 JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+  FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  FAST_FLOAT tmp10, tmp11, tmp12, tmp13;
+  FAST_FLOAT z5, z10, z11, z12, z13;
+  JCOEFPTR inptr;
+  FLOAT_MULT_TYPE * quantptr;
+  FAST_FLOAT * wsptr;
+  JSAMPROW outptr;
+  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+  int ctr;
+  FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */
+  SHIFT_TEMPS
+
+  /* Pass 1: process columns from input, store into work array. */
+
+  inptr = coef_block;
+  quantptr = (FLOAT_MULT_TYPE *) compptr->dct_table;
+  wsptr = workspace;
+  for (ctr = DCTSIZE; ctr > 0; ctr--) {
+    /* Due to quantization, we will usually find that many of the input
+     * coefficients are zero, especially the AC terms.  We can exploit this
+     * by short-circuiting the IDCT calculation for any column in which all
+     * the AC terms are zero.  In that case each output is equal to the
+     * DC coefficient (with scale factor as needed).
+     * With typical images and quantization tables, half or more of the
+     * column DCT calculations can be simplified this way.
+     */
+    
+    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
+	inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&
+	inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&
+	inptr[DCTSIZE*7] == 0) {
+      /* AC terms all zero */
+      FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+      
+      wsptr[DCTSIZE*0] = dcval;
+      wsptr[DCTSIZE*1] = dcval;
+      wsptr[DCTSIZE*2] = dcval;
+      wsptr[DCTSIZE*3] = dcval;
+      wsptr[DCTSIZE*4] = dcval;
+      wsptr[DCTSIZE*5] = dcval;
+      wsptr[DCTSIZE*6] = dcval;
+      wsptr[DCTSIZE*7] = dcval;
+      
+      inptr++;			/* advance pointers to next column */
+      quantptr++;
+      wsptr++;
+      continue;
+    }
+    
+    /* Even part */
+
+    tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+    tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+    tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+    tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+    tmp10 = tmp0 + tmp2;	/* phase 3 */
+    tmp11 = tmp0 - tmp2;
+
+    tmp13 = tmp1 + tmp3;	/* phases 5-3 */
+    tmp12 = (tmp1 - tmp3) * ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */
+
+    tmp0 = tmp10 + tmp13;	/* phase 2 */
+    tmp3 = tmp10 - tmp13;
+    tmp1 = tmp11 + tmp12;
+    tmp2 = tmp11 - tmp12;
+    
+    /* Odd part */
+
+    tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+    tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+    tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+    tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+    z13 = tmp6 + tmp5;		/* phase 6 */
+    z10 = tmp6 - tmp5;
+    z11 = tmp4 + tmp7;
+    z12 = tmp4 - tmp7;
+
+    tmp7 = z11 + z13;		/* phase 5 */
+    tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */
+
+    z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */
+    tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */
+    tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */
+
+    tmp6 = tmp12 - tmp7;	/* phase 2 */
+    tmp5 = tmp11 - tmp6;
+    tmp4 = tmp10 + tmp5;
+
+    wsptr[DCTSIZE*0] = tmp0 + tmp7;
+    wsptr[DCTSIZE*7] = tmp0 - tmp7;
+    wsptr[DCTSIZE*1] = tmp1 + tmp6;
+    wsptr[DCTSIZE*6] = tmp1 - tmp6;
+    wsptr[DCTSIZE*2] = tmp2 + tmp5;
+    wsptr[DCTSIZE*5] = tmp2 - tmp5;
+    wsptr[DCTSIZE*4] = tmp3 + tmp4;
+    wsptr[DCTSIZE*3] = tmp3 - tmp4;
+
+    inptr++;			/* advance pointers to next column */
+    quantptr++;
+    wsptr++;
+  }
+  
+  /* Pass 2: process rows from work array, store into output array. */
+  /* Note that we must descale the results by a factor of 8 == 2**3. */
+
+  wsptr = workspace;
+  for (ctr = 0; ctr < DCTSIZE; ctr++) {
+    outptr = output_buf[ctr] + output_col;
+    /* Rows of zeroes can be exploited in the same way as we did with columns.
+     * However, the column calculation has created many nonzero AC terms, so
+     * the simplification applies less often (typically 5% to 10% of the time).
+     * And testing floats for zero is relatively expensive, so we don't bother.
+     */
+    
+    /* Even part */
+
+    tmp10 = wsptr[0] + wsptr[4];
+    tmp11 = wsptr[0] - wsptr[4];
+
+    tmp13 = wsptr[2] + wsptr[6];
+    tmp12 = (wsptr[2] - wsptr[6]) * ((FAST_FLOAT) 1.414213562) - tmp13;
+
+    tmp0 = tmp10 + tmp13;
+    tmp3 = tmp10 - tmp13;
+    tmp1 = tmp11 + tmp12;
+    tmp2 = tmp11 - tmp12;
+
+    /* Odd part */
+
+    z13 = wsptr[5] + wsptr[3];
+    z10 = wsptr[5] - wsptr[3];
+    z11 = wsptr[1] + wsptr[7];
+    z12 = wsptr[1] - wsptr[7];
+
+    tmp7 = z11 + z13;
+    tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562);
+
+    z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */
+    tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */
+    tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */
+
+    tmp6 = tmp12 - tmp7;
+    tmp5 = tmp11 - tmp6;
+    tmp4 = tmp10 + tmp5;
+
+    /* Final output stage: scale down by a factor of 8 and range-limit */
+
+    outptr[0] = range_limit[(int) DESCALE((INT32) (tmp0 + tmp7), 3)
+			    & RANGE_MASK];
+    outptr[7] = range_limit[(int) DESCALE((INT32) (tmp0 - tmp7), 3)
+			    & RANGE_MASK];
+    outptr[1] = range_limit[(int) DESCALE((INT32) (tmp1 + tmp6), 3)
+			    & RANGE_MASK];
+    outptr[6] = range_limit[(int) DESCALE((INT32) (tmp1 - tmp6), 3)
+			    & RANGE_MASK];
+    outptr[2] = range_limit[(int) DESCALE((INT32) (tmp2 + tmp5), 3)
+			    & RANGE_MASK];
+    outptr[5] = range_limit[(int) DESCALE((INT32) (tmp2 - tmp5), 3)
+			    & RANGE_MASK];
+    outptr[4] = range_limit[(int) DESCALE((INT32) (tmp3 + tmp4), 3)
+			    & RANGE_MASK];
+    outptr[3] = range_limit[(int) DESCALE((INT32) (tmp3 - tmp4), 3)
+			    & RANGE_MASK];
+    
+    wsptr += DCTSIZE;		/* advance pointer to next row */
+  }
+}
+
+#endif /* DCT_FLOAT_SUPPORTED */
diff --git a/samples/jpeglib/jidctfst.c b/samples/jpeglib/jidctfst.c
new file mode 100644
index 0000000..dba4216
--- /dev/null
+++ b/samples/jpeglib/jidctfst.c
@@ -0,0 +1,368 @@
+/*
+ * jidctfst.c
+ *
+ * Copyright (C) 1994-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains a fast, not so accurate integer implementation of the
+ * inverse DCT (Discrete Cosine Transform).  In the IJG code, this routine
+ * must also perform dequantization of the input coefficients.
+ *
+ * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT
+ * on each row (or vice versa, but it's more convenient to emit a row at
+ * a time).  Direct algorithms are also available, but they are much more
+ * complex and seem not to be any faster when reduced to code.
+ *
+ * This implementation is based on Arai, Agui, and Nakajima's algorithm for
+ * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in
+ * Japanese, but the algorithm is described in the Pennebaker & Mitchell
+ * JPEG textbook (see REFERENCES section in file README).  The following code
+ * is based directly on figure 4-8 in P&M.
+ * While an 8-point DCT cannot be done in less than 11 multiplies, it is
+ * possible to arrange the computation so that many of the multiplies are
+ * simple scalings of the final outputs.  These multiplies can then be
+ * folded into the multiplications or divisions by the JPEG quantization
+ * table entries.  The AA&N method leaves only 5 multiplies and 29 adds
+ * to be done in the DCT itself.
+ * The primary disadvantage of this method is that with fixed-point math,
+ * accuracy is lost due to imprecise representation of the scaled
+ * quantization values.  The smaller the quantization table entry, the less
+ * precise the scaled value, so this implementation does worse with high-
+ * quality-setting files than with low-quality ones.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdct.h"		/* Private declarations for DCT subsystem */
+
+#ifdef DCT_IFAST_SUPPORTED
+
+
+/*
+ * This module is specialized to the case DCTSIZE = 8.
+ */
+
+#if DCTSIZE != 8
+  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
+#endif
+
+
+/* Scaling decisions are generally the same as in the LL&M algorithm;
+ * see jidctint.c for more details.  However, we choose to descale
+ * (right shift) multiplication products as soon as they are formed,
+ * rather than carrying additional fractional bits into subsequent additions.
+ * This compromises accuracy slightly, but it lets us save a few shifts.
+ * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples)
+ * everywhere except in the multiplications proper; this saves a good deal
+ * of work on 16-bit-int machines.
+ *
+ * The dequantized coefficients are not integers because the AA&N scaling
+ * factors have been incorporated.  We represent them scaled up by PASS1_BITS,
+ * so that the first and second IDCT rounds have the same input scaling.
+ * For 8-bit JSAMPLEs, we choose IFAST_SCALE_BITS = PASS1_BITS so as to
+ * avoid a descaling shift; this compromises accuracy rather drastically
+ * for small quantization table entries, but it saves a lot of shifts.
+ * For 12-bit JSAMPLEs, there's no hope of using 16x16 multiplies anyway,
+ * so we use a much larger scaling factor to preserve accuracy.
+ *
+ * A final compromise is to represent the multiplicative constants to only
+ * 8 fractional bits, rather than 13.  This saves some shifting work on some
+ * machines, and may also reduce the cost of multiplication (since there
+ * are fewer one-bits in the constants).
+ */
+
+#if BITS_IN_JSAMPLE == 8
+#define CONST_BITS  8
+#define PASS1_BITS  2
+#else
+#define CONST_BITS  8
+#define PASS1_BITS  1		/* lose a little precision to avoid overflow */
+#endif
+
+/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
+ * causing a lot of useless floating-point operations at run time.
+ * To get around this we use the following pre-calculated constants.
+ * If you change CONST_BITS you may want to add appropriate values.
+ * (With a reasonable C compiler, you can just rely on the FIX() macro...)
+ */
+
+#if CONST_BITS == 8
+#define FIX_1_082392200  ((INT32)  277)		/* FIX(1.082392200) */
+#define FIX_1_414213562  ((INT32)  362)		/* FIX(1.414213562) */
+#define FIX_1_847759065  ((INT32)  473)		/* FIX(1.847759065) */
+#define FIX_2_613125930  ((INT32)  669)		/* FIX(2.613125930) */
+#else
+#define FIX_1_082392200  FIX(1.082392200)
+#define FIX_1_414213562  FIX(1.414213562)
+#define FIX_1_847759065  FIX(1.847759065)
+#define FIX_2_613125930  FIX(2.613125930)
+#endif
+
+
+/* We can gain a little more speed, with a further compromise in accuracy,
+ * by omitting the addition in a descaling shift.  This yields an incorrectly
+ * rounded result half the time...
+ */
+
+#ifndef USE_ACCURATE_ROUNDING
+#undef DESCALE
+#define DESCALE(x,n)  RIGHT_SHIFT(x, n)
+#endif
+
+
+/* Multiply a DCTELEM variable by an INT32 constant, and immediately
+ * descale to yield a DCTELEM result.
+ */
+
+#define MULTIPLY(var,const)  ((DCTELEM) DESCALE((var) * (const), CONST_BITS))
+
+
+/* Dequantize a coefficient by multiplying it by the multiplier-table
+ * entry; produce a DCTELEM result.  For 8-bit data a 16x16->16
+ * multiplication will do.  For 12-bit data, the multiplier table is
+ * declared INT32, so a 32-bit multiply will be used.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+#define DEQUANTIZE(coef,quantval)  (((IFAST_MULT_TYPE) (coef)) * (quantval))
+#else
+#define DEQUANTIZE(coef,quantval)  \
+	DESCALE((coef)*(quantval), IFAST_SCALE_BITS-PASS1_BITS)
+#endif
+
+
+/* Like DESCALE, but applies to a DCTELEM and produces an int.
+ * We assume that int right shift is unsigned if INT32 right shift is.
+ */
+
+#ifdef RIGHT_SHIFT_IS_UNSIGNED
+#define ISHIFT_TEMPS	DCTELEM ishift_temp;
+#if BITS_IN_JSAMPLE == 8
+#define DCTELEMBITS  16		/* DCTELEM may be 16 or 32 bits */
+#else
+#define DCTELEMBITS  32		/* DCTELEM must be 32 bits */
+#endif
+#define IRIGHT_SHIFT(x,shft)  \
+    ((ishift_temp = (x)) < 0 ? \
+     (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \
+     (ishift_temp >> (shft)))
+#else
+#define ISHIFT_TEMPS
+#define IRIGHT_SHIFT(x,shft)	((x) >> (shft))
+#endif
+
+#ifdef USE_ACCURATE_ROUNDING
+#define IDESCALE(x,n)  ((int) IRIGHT_SHIFT((x) + (1 << ((n)-1)), n))
+#else
+#define IDESCALE(x,n)  ((int) IRIGHT_SHIFT(x, n))
+#endif
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients.
+ */
+
+GLOBAL(void)
+jpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+		 JCOEFPTR coef_block,
+		 JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+  DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  DCTELEM tmp10, tmp11, tmp12, tmp13;
+  DCTELEM z5, z10, z11, z12, z13;
+  JCOEFPTR inptr;
+  IFAST_MULT_TYPE * quantptr;
+  int * wsptr;
+  JSAMPROW outptr;
+  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+  int ctr;
+  int workspace[DCTSIZE2];	/* buffers data between passes */
+  SHIFT_TEMPS			/* for DESCALE */
+  ISHIFT_TEMPS			/* for IDESCALE */
+
+  /* Pass 1: process columns from input, store into work array. */
+
+  inptr = coef_block;
+  quantptr = (IFAST_MULT_TYPE *) compptr->dct_table;
+  wsptr = workspace;
+  for (ctr = DCTSIZE; ctr > 0; ctr--) {
+    /* Due to quantization, we will usually find that many of the input
+     * coefficients are zero, especially the AC terms.  We can exploit this
+     * by short-circuiting the IDCT calculation for any column in which all
+     * the AC terms are zero.  In that case each output is equal to the
+     * DC coefficient (with scale factor as needed).
+     * With typical images and quantization tables, half or more of the
+     * column DCT calculations can be simplified this way.
+     */
+    
+    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
+	inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&
+	inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&
+	inptr[DCTSIZE*7] == 0) {
+      /* AC terms all zero */
+      int dcval = (int) DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+
+      wsptr[DCTSIZE*0] = dcval;
+      wsptr[DCTSIZE*1] = dcval;
+      wsptr[DCTSIZE*2] = dcval;
+      wsptr[DCTSIZE*3] = dcval;
+      wsptr[DCTSIZE*4] = dcval;
+      wsptr[DCTSIZE*5] = dcval;
+      wsptr[DCTSIZE*6] = dcval;
+      wsptr[DCTSIZE*7] = dcval;
+      
+      inptr++;			/* advance pointers to next column */
+      quantptr++;
+      wsptr++;
+      continue;
+    }
+    
+    /* Even part */
+
+    tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+    tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+    tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+    tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+    tmp10 = tmp0 + tmp2;	/* phase 3 */
+    tmp11 = tmp0 - tmp2;
+
+    tmp13 = tmp1 + tmp3;	/* phases 5-3 */
+    tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */
+
+    tmp0 = tmp10 + tmp13;	/* phase 2 */
+    tmp3 = tmp10 - tmp13;
+    tmp1 = tmp11 + tmp12;
+    tmp2 = tmp11 - tmp12;
+    
+    /* Odd part */
+
+    tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+    tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+    tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+    tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+    z13 = tmp6 + tmp5;		/* phase 6 */
+    z10 = tmp6 - tmp5;
+    z11 = tmp4 + tmp7;
+    z12 = tmp4 - tmp7;
+
+    tmp7 = z11 + z13;		/* phase 5 */
+    tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */
+
+    z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */
+    tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */
+    tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */
+
+    tmp6 = tmp12 - tmp7;	/* phase 2 */
+    tmp5 = tmp11 - tmp6;
+    tmp4 = tmp10 + tmp5;
+
+    wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7);
+    wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7);
+    wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6);
+    wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6);
+    wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5);
+    wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5);
+    wsptr[DCTSIZE*4] = (int) (tmp3 + tmp4);
+    wsptr[DCTSIZE*3] = (int) (tmp3 - tmp4);
+
+    inptr++;			/* advance pointers to next column */
+    quantptr++;
+    wsptr++;
+  }
+  
+  /* Pass 2: process rows from work array, store into output array. */
+  /* Note that we must descale the results by a factor of 8 == 2**3, */
+  /* and also undo the PASS1_BITS scaling. */
+
+  wsptr = workspace;
+  for (ctr = 0; ctr < DCTSIZE; ctr++) {
+    outptr = output_buf[ctr] + output_col;
+    /* Rows of zeroes can be exploited in the same way as we did with columns.
+     * However, the column calculation has created many nonzero AC terms, so
+     * the simplification applies less often (typically 5% to 10% of the time).
+     * On machines with very fast multiplication, it's possible that the
+     * test takes more time than it's worth.  In that case this section
+     * may be commented out.
+     */
+    
+#ifndef NO_ZERO_ROW_TEST
+    if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 &&
+	wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {
+      /* AC terms all zero */
+      JSAMPLE dcval = range_limit[IDESCALE(wsptr[0], PASS1_BITS+3)
+				  & RANGE_MASK];
+      
+      outptr[0] = dcval;
+      outptr[1] = dcval;
+      outptr[2] = dcval;
+      outptr[3] = dcval;
+      outptr[4] = dcval;
+      outptr[5] = dcval;
+      outptr[6] = dcval;
+      outptr[7] = dcval;
+
+      wsptr += DCTSIZE;		/* advance pointer to next row */
+      continue;
+    }
+#endif
+    
+    /* Even part */
+
+    tmp10 = ((DCTELEM) wsptr[0] + (DCTELEM) wsptr[4]);
+    tmp11 = ((DCTELEM) wsptr[0] - (DCTELEM) wsptr[4]);
+
+    tmp13 = ((DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]);
+    tmp12 = MULTIPLY((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6], FIX_1_414213562)
+	    - tmp13;
+
+    tmp0 = tmp10 + tmp13;
+    tmp3 = tmp10 - tmp13;
+    tmp1 = tmp11 + tmp12;
+    tmp2 = tmp11 - tmp12;
+
+    /* Odd part */
+
+    z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3];
+    z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3];
+    z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7];
+    z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7];
+
+    tmp7 = z11 + z13;		/* phase 5 */
+    tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */
+
+    z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */
+    tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */
+    tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */
+
+    tmp6 = tmp12 - tmp7;	/* phase 2 */
+    tmp5 = tmp11 - tmp6;
+    tmp4 = tmp10 + tmp5;
+
+    /* Final output stage: scale down by a factor of 8 and range-limit */
+
+    outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3)
+			    & RANGE_MASK];
+
+    wsptr += DCTSIZE;		/* advance pointer to next row */
+  }
+}
+
+#endif /* DCT_IFAST_SUPPORTED */
diff --git a/samples/jpeglib/jidctint.c b/samples/jpeglib/jidctint.c
new file mode 100644
index 0000000..a72b320
--- /dev/null
+++ b/samples/jpeglib/jidctint.c
@@ -0,0 +1,389 @@
+/*
+ * jidctint.c
+ *
+ * Copyright (C) 1991-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains a slow-but-accurate integer implementation of the
+ * inverse DCT (Discrete Cosine Transform).  In the IJG code, this routine
+ * must also perform dequantization of the input coefficients.
+ *
+ * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT
+ * on each row (or vice versa, but it's more convenient to emit a row at
+ * a time).  Direct algorithms are also available, but they are much more
+ * complex and seem not to be any faster when reduced to code.
+ *
+ * This implementation is based on an algorithm described in
+ *   C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT
+ *   Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics,
+ *   Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991.
+ * The primary algorithm described there uses 11 multiplies and 29 adds.
+ * We use their alternate method with 12 multiplies and 32 adds.
+ * The advantage of this method is that no data path contains more than one
+ * multiplication; this allows a very simple and accurate implementation in
+ * scaled fixed-point arithmetic, with a minimal number of shifts.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdct.h"		/* Private declarations for DCT subsystem */
+
+#ifdef DCT_ISLOW_SUPPORTED
+
+
+/*
+ * This module is specialized to the case DCTSIZE = 8.
+ */
+
+#if DCTSIZE != 8
+  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
+#endif
+
+
+/*
+ * The poop on this scaling stuff is as follows:
+ *
+ * Each 1-D IDCT step produces outputs which are a factor of sqrt(N)
+ * larger than the true IDCT outputs.  The final outputs are therefore
+ * a factor of N larger than desired; since N=8 this can be cured by
+ * a simple right shift at the end of the algorithm.  The advantage of
+ * this arrangement is that we save two multiplications per 1-D IDCT,
+ * because the y0 and y4 inputs need not be divided by sqrt(N).
+ *
+ * We have to do addition and subtraction of the integer inputs, which
+ * is no problem, and multiplication by fractional constants, which is
+ * a problem to do in integer arithmetic.  We multiply all the constants
+ * by CONST_SCALE and convert them to integer constants (thus retaining
+ * CONST_BITS bits of precision in the constants).  After doing a
+ * multiplication we have to divide the product by CONST_SCALE, with proper
+ * rounding, to produce the correct output.  This division can be done
+ * cheaply as a right shift of CONST_BITS bits.  We postpone shifting
+ * as long as possible so that partial sums can be added together with
+ * full fractional precision.
+ *
+ * The outputs of the first pass are scaled up by PASS1_BITS bits so that
+ * they are represented to better-than-integral precision.  These outputs
+ * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word
+ * with the recommended scaling.  (To scale up 12-bit sample data further, an
+ * intermediate INT32 array would be needed.)
+ *
+ * To avoid overflow of the 32-bit intermediate results in pass 2, we must
+ * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26.  Error analysis
+ * shows that the values given below are the most effective.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+#define CONST_BITS  13
+#define PASS1_BITS  2
+#else
+#define CONST_BITS  13
+#define PASS1_BITS  1		/* lose a little precision to avoid overflow */
+#endif
+
+/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
+ * causing a lot of useless floating-point operations at run time.
+ * To get around this we use the following pre-calculated constants.
+ * If you change CONST_BITS you may want to add appropriate values.
+ * (With a reasonable C compiler, you can just rely on the FIX() macro...)
+ */
+
+#if CONST_BITS == 13
+#define FIX_0_298631336  ((INT32)  2446)	/* FIX(0.298631336) */
+#define FIX_0_390180644  ((INT32)  3196)	/* FIX(0.390180644) */
+#define FIX_0_541196100  ((INT32)  4433)	/* FIX(0.541196100) */
+#define FIX_0_765366865  ((INT32)  6270)	/* FIX(0.765366865) */
+#define FIX_0_899976223  ((INT32)  7373)	/* FIX(0.899976223) */
+#define FIX_1_175875602  ((INT32)  9633)	/* FIX(1.175875602) */
+#define FIX_1_501321110  ((INT32)  12299)	/* FIX(1.501321110) */
+#define FIX_1_847759065  ((INT32)  15137)	/* FIX(1.847759065) */
+#define FIX_1_961570560  ((INT32)  16069)	/* FIX(1.961570560) */
+#define FIX_2_053119869  ((INT32)  16819)	/* FIX(2.053119869) */
+#define FIX_2_562915447  ((INT32)  20995)	/* FIX(2.562915447) */
+#define FIX_3_072711026  ((INT32)  25172)	/* FIX(3.072711026) */
+#else
+#define FIX_0_298631336  FIX(0.298631336)
+#define FIX_0_390180644  FIX(0.390180644)
+#define FIX_0_541196100  FIX(0.541196100)
+#define FIX_0_765366865  FIX(0.765366865)
+#define FIX_0_899976223  FIX(0.899976223)
+#define FIX_1_175875602  FIX(1.175875602)
+#define FIX_1_501321110  FIX(1.501321110)
+#define FIX_1_847759065  FIX(1.847759065)
+#define FIX_1_961570560  FIX(1.961570560)
+#define FIX_2_053119869  FIX(2.053119869)
+#define FIX_2_562915447  FIX(2.562915447)
+#define FIX_3_072711026  FIX(3.072711026)
+#endif
+
+
+/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
+ * For 8-bit samples with the recommended scaling, all the variable
+ * and constant values involved are no more than 16 bits wide, so a
+ * 16x16->32 bit multiply can be used instead of a full 32x32 multiply.
+ * For 12-bit samples, a full 32-bit multiplication will be needed.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+#define MULTIPLY(var,const)  MULTIPLY16C16(var,const)
+#else
+#define MULTIPLY(var,const)  ((var) * (const))
+#endif
+
+
+/* Dequantize a coefficient by multiplying it by the multiplier-table
+ * entry; produce an int result.  In this module, both inputs and result
+ * are 16 bits or less, so either int or short multiply will work.
+ */
+
+#define DEQUANTIZE(coef,quantval)  (((ISLOW_MULT_TYPE) (coef)) * (quantval))
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients.
+ */
+
+GLOBAL(void)
+jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+		 JCOEFPTR coef_block,
+		 JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+  INT32 tmp0, tmp1, tmp2, tmp3;
+  INT32 tmp10, tmp11, tmp12, tmp13;
+  INT32 z1, z2, z3, z4, z5;
+  JCOEFPTR inptr;
+  ISLOW_MULT_TYPE * quantptr;
+  int * wsptr;
+  JSAMPROW outptr;
+  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+  int ctr;
+  int workspace[DCTSIZE2];	/* buffers data between passes */
+  SHIFT_TEMPS
+
+  /* Pass 1: process columns from input, store into work array. */
+  /* Note results are scaled up by sqrt(8) compared to a true IDCT; */
+  /* furthermore, we scale the results by 2**PASS1_BITS. */
+
+  inptr = coef_block;
+  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+  wsptr = workspace;
+  for (ctr = DCTSIZE; ctr > 0; ctr--) {
+    /* Due to quantization, we will usually find that many of the input
+     * coefficients are zero, especially the AC terms.  We can exploit this
+     * by short-circuiting the IDCT calculation for any column in which all
+     * the AC terms are zero.  In that case each output is equal to the
+     * DC coefficient (with scale factor as needed).
+     * With typical images and quantization tables, half or more of the
+     * column DCT calculations can be simplified this way.
+     */
+    
+    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
+	inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&
+	inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&
+	inptr[DCTSIZE*7] == 0) {
+      /* AC terms all zero */
+      int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
+      
+      wsptr[DCTSIZE*0] = dcval;
+      wsptr[DCTSIZE*1] = dcval;
+      wsptr[DCTSIZE*2] = dcval;
+      wsptr[DCTSIZE*3] = dcval;
+      wsptr[DCTSIZE*4] = dcval;
+      wsptr[DCTSIZE*5] = dcval;
+      wsptr[DCTSIZE*6] = dcval;
+      wsptr[DCTSIZE*7] = dcval;
+      
+      inptr++;			/* advance pointers to next column */
+      quantptr++;
+      wsptr++;
+      continue;
+    }
+    
+    /* Even part: reverse the even part of the forward DCT. */
+    /* The rotator is sqrt(2)*c(-6). */
+    
+    z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+    z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+    
+    z1 = MULTIPLY(z2 + z3, FIX_0_541196100);
+    tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065);
+    tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865);
+    
+    z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+    z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+
+    tmp0 = (z2 + z3) << CONST_BITS;
+    tmp1 = (z2 - z3) << CONST_BITS;
+    
+    tmp10 = tmp0 + tmp3;
+    tmp13 = tmp0 - tmp3;
+    tmp11 = tmp1 + tmp2;
+    tmp12 = tmp1 - tmp2;
+    
+    /* Odd part per figure 8; the matrix is unitary and hence its
+     * transpose is its inverse.  i0..i3 are y7,y5,y3,y1 respectively.
+     */
+    
+    tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+    tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+    tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+    tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+    
+    z1 = tmp0 + tmp3;
+    z2 = tmp1 + tmp2;
+    z3 = tmp0 + tmp2;
+    z4 = tmp1 + tmp3;
+    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
+    
+    tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+    tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
+    tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
+    tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
+    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
+    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+    
+    z3 += z5;
+    z4 += z5;
+    
+    tmp0 += z1 + z3;
+    tmp1 += z2 + z4;
+    tmp2 += z2 + z3;
+    tmp3 += z1 + z4;
+    
+    /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
+    
+    wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS);
+    wsptr[DCTSIZE*7] = (int) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS);
+    wsptr[DCTSIZE*1] = (int) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS);
+    wsptr[DCTSIZE*6] = (int) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS);
+    wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS);
+    wsptr[DCTSIZE*5] = (int) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS);
+    wsptr[DCTSIZE*3] = (int) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS);
+    wsptr[DCTSIZE*4] = (int) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS);
+    
+    inptr++;			/* advance pointers to next column */
+    quantptr++;
+    wsptr++;
+  }
+  
+  /* Pass 2: process rows from work array, store into output array. */
+  /* Note that we must descale the results by a factor of 8 == 2**3, */
+  /* and also undo the PASS1_BITS scaling. */
+
+  wsptr = workspace;
+  for (ctr = 0; ctr < DCTSIZE; ctr++) {
+    outptr = output_buf[ctr] + output_col;
+    /* Rows of zeroes can be exploited in the same way as we did with columns.
+     * However, the column calculation has created many nonzero AC terms, so
+     * the simplification applies less often (typically 5% to 10% of the time).
+     * On machines with very fast multiplication, it's possible that the
+     * test takes more time than it's worth.  In that case this section
+     * may be commented out.
+     */
+    
+#ifndef NO_ZERO_ROW_TEST
+    if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 &&
+	wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {
+      /* AC terms all zero */
+      JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)
+				  & RANGE_MASK];
+      
+      outptr[0] = dcval;
+      outptr[1] = dcval;
+      outptr[2] = dcval;
+      outptr[3] = dcval;
+      outptr[4] = dcval;
+      outptr[5] = dcval;
+      outptr[6] = dcval;
+      outptr[7] = dcval;
+
+      wsptr += DCTSIZE;		/* advance pointer to next row */
+      continue;
+    }
+#endif
+    
+    /* Even part: reverse the even part of the forward DCT. */
+    /* The rotator is sqrt(2)*c(-6). */
+    
+    z2 = (INT32) wsptr[2];
+    z3 = (INT32) wsptr[6];
+    
+    z1 = MULTIPLY(z2 + z3, FIX_0_541196100);
+    tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065);
+    tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865);
+    
+    tmp0 = ((INT32) wsptr[0] + (INT32) wsptr[4]) << CONST_BITS;
+    tmp1 = ((INT32) wsptr[0] - (INT32) wsptr[4]) << CONST_BITS;
+    
+    tmp10 = tmp0 + tmp3;
+    tmp13 = tmp0 - tmp3;
+    tmp11 = tmp1 + tmp2;
+    tmp12 = tmp1 - tmp2;
+    
+    /* Odd part per figure 8; the matrix is unitary and hence its
+     * transpose is its inverse.  i0..i3 are y7,y5,y3,y1 respectively.
+     */
+    
+    tmp0 = (INT32) wsptr[7];
+    tmp1 = (INT32) wsptr[5];
+    tmp2 = (INT32) wsptr[3];
+    tmp3 = (INT32) wsptr[1];
+    
+    z1 = tmp0 + tmp3;
+    z2 = tmp1 + tmp2;
+    z3 = tmp0 + tmp2;
+    z4 = tmp1 + tmp3;
+    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
+    
+    tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+    tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
+    tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
+    tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
+    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
+    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+    
+    z3 += z5;
+    z4 += z5;
+    
+    tmp0 += z1 + z3;
+    tmp1 += z2 + z4;
+    tmp2 += z2 + z3;
+    tmp3 += z1 + z4;
+    
+    /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
+    
+    outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp3,
+					  CONST_BITS+PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[7] = range_limit[(int) DESCALE(tmp10 - tmp3,
+					  CONST_BITS+PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[1] = range_limit[(int) DESCALE(tmp11 + tmp2,
+					  CONST_BITS+PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[6] = range_limit[(int) DESCALE(tmp11 - tmp2,
+					  CONST_BITS+PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[2] = range_limit[(int) DESCALE(tmp12 + tmp1,
+					  CONST_BITS+PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[5] = range_limit[(int) DESCALE(tmp12 - tmp1,
+					  CONST_BITS+PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[3] = range_limit[(int) DESCALE(tmp13 + tmp0,
+					  CONST_BITS+PASS1_BITS+3)
+			    & RANGE_MASK];
+    outptr[4] = range_limit[(int) DESCALE(tmp13 - tmp0,
+					  CONST_BITS+PASS1_BITS+3)
+			    & RANGE_MASK];
+    
+    wsptr += DCTSIZE;		/* advance pointer to next row */
+  }
+}
+
+#endif /* DCT_ISLOW_SUPPORTED */
diff --git a/samples/jpeglib/jidctred.c b/samples/jpeglib/jidctred.c
new file mode 100644
index 0000000..421f3c7
--- /dev/null
+++ b/samples/jpeglib/jidctred.c
@@ -0,0 +1,398 @@
+/*
+ * jidctred.c
+ *
+ * Copyright (C) 1994-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains inverse-DCT routines that produce reduced-size output:
+ * either 4x4, 2x2, or 1x1 pixels from an 8x8 DCT block.
+ *
+ * The implementation is based on the Loeffler, Ligtenberg and Moschytz (LL&M)
+ * algorithm used in jidctint.c.  We simply replace each 8-to-8 1-D IDCT step
+ * with an 8-to-4 step that produces the four averages of two adjacent outputs
+ * (or an 8-to-2 step producing two averages of four outputs, for 2x2 output).
+ * These steps were derived by computing the corresponding values at the end
+ * of the normal LL&M code, then simplifying as much as possible.
+ *
+ * 1x1 is trivial: just take the DC coefficient divided by 8.
+ *
+ * See jidctint.c for additional comments.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jdct.h"		/* Private declarations for DCT subsystem */
+
+#ifdef IDCT_SCALING_SUPPORTED
+
+
+/*
+ * This module is specialized to the case DCTSIZE = 8.
+ */
+
+#if DCTSIZE != 8
+  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
+#endif
+
+
+/* Scaling is the same as in jidctint.c. */
+
+#if BITS_IN_JSAMPLE == 8
+#define CONST_BITS  13
+#define PASS1_BITS  2
+#else
+#define CONST_BITS  13
+#define PASS1_BITS  1		/* lose a little precision to avoid overflow */
+#endif
+
+/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
+ * causing a lot of useless floating-point operations at run time.
+ * To get around this we use the following pre-calculated constants.
+ * If you change CONST_BITS you may want to add appropriate values.
+ * (With a reasonable C compiler, you can just rely on the FIX() macro...)
+ */
+
+#if CONST_BITS == 13
+#define FIX_0_211164243  ((INT32)  1730)	/* FIX(0.211164243) */
+#define FIX_0_509795579  ((INT32)  4176)	/* FIX(0.509795579) */
+#define FIX_0_601344887  ((INT32)  4926)	/* FIX(0.601344887) */
+#define FIX_0_720959822  ((INT32)  5906)	/* FIX(0.720959822) */
+#define FIX_0_765366865  ((INT32)  6270)	/* FIX(0.765366865) */
+#define FIX_0_850430095  ((INT32)  6967)	/* FIX(0.850430095) */
+#define FIX_0_899976223  ((INT32)  7373)	/* FIX(0.899976223) */
+#define FIX_1_061594337  ((INT32)  8697)	/* FIX(1.061594337) */
+#define FIX_1_272758580  ((INT32)  10426)	/* FIX(1.272758580) */
+#define FIX_1_451774981  ((INT32)  11893)	/* FIX(1.451774981) */
+#define FIX_1_847759065  ((INT32)  15137)	/* FIX(1.847759065) */
+#define FIX_2_172734803  ((INT32)  17799)	/* FIX(2.172734803) */
+#define FIX_2_562915447  ((INT32)  20995)	/* FIX(2.562915447) */
+#define FIX_3_624509785  ((INT32)  29692)	/* FIX(3.624509785) */
+#else
+#define FIX_0_211164243  FIX(0.211164243)
+#define FIX_0_509795579  FIX(0.509795579)
+#define FIX_0_601344887  FIX(0.601344887)
+#define FIX_0_720959822  FIX(0.720959822)
+#define FIX_0_765366865  FIX(0.765366865)
+#define FIX_0_850430095  FIX(0.850430095)
+#define FIX_0_899976223  FIX(0.899976223)
+#define FIX_1_061594337  FIX(1.061594337)
+#define FIX_1_272758580  FIX(1.272758580)
+#define FIX_1_451774981  FIX(1.451774981)
+#define FIX_1_847759065  FIX(1.847759065)
+#define FIX_2_172734803  FIX(2.172734803)
+#define FIX_2_562915447  FIX(2.562915447)
+#define FIX_3_624509785  FIX(3.624509785)
+#endif
+
+
+/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
+ * For 8-bit samples with the recommended scaling, all the variable
+ * and constant values involved are no more than 16 bits wide, so a
+ * 16x16->32 bit multiply can be used instead of a full 32x32 multiply.
+ * For 12-bit samples, a full 32-bit multiplication will be needed.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+#define MULTIPLY(var,const)  MULTIPLY16C16(var,const)
+#else
+#define MULTIPLY(var,const)  ((var) * (const))
+#endif
+
+
+/* Dequantize a coefficient by multiplying it by the multiplier-table
+ * entry; produce an int result.  In this module, both inputs and result
+ * are 16 bits or less, so either int or short multiply will work.
+ */
+
+#define DEQUANTIZE(coef,quantval)  (((ISLOW_MULT_TYPE) (coef)) * (quantval))
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 4x4 output block.
+ */
+
+GLOBAL(void)
+jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	       JCOEFPTR coef_block,
+	       JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+  INT32 tmp0, tmp2, tmp10, tmp12;
+  INT32 z1, z2, z3, z4;
+  JCOEFPTR inptr;
+  ISLOW_MULT_TYPE * quantptr;
+  int * wsptr;
+  JSAMPROW outptr;
+  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+  int ctr;
+  int workspace[DCTSIZE*4];	/* buffers data between passes */
+  SHIFT_TEMPS
+
+  /* Pass 1: process columns from input, store into work array. */
+
+  inptr = coef_block;
+  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+  wsptr = workspace;
+  for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) {
+    /* Don't bother to process column 4, because second pass won't use it */
+    if (ctr == DCTSIZE-4)
+      continue;
+    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
+	inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*5] == 0 &&
+	inptr[DCTSIZE*6] == 0 && inptr[DCTSIZE*7] == 0) {
+      /* AC terms all zero; we need not examine term 4 for 4x4 output */
+      int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
+      
+      wsptr[DCTSIZE*0] = dcval;
+      wsptr[DCTSIZE*1] = dcval;
+      wsptr[DCTSIZE*2] = dcval;
+      wsptr[DCTSIZE*3] = dcval;
+      
+      continue;
+    }
+    
+    /* Even part */
+    
+    tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+    tmp0 <<= (CONST_BITS+1);
+    
+    z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+    z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+    tmp2 = MULTIPLY(z2, FIX_1_847759065) + MULTIPLY(z3, - FIX_0_765366865);
+    
+    tmp10 = tmp0 + tmp2;
+    tmp12 = tmp0 - tmp2;
+    
+    /* Odd part */
+    
+    z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+    z2 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+    z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+    z4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+    
+    tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */
+	 + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */
+	 + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */
+	 + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */
+    
+    tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */
+	 + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */
+	 + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */
+	 + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */
+
+    /* Final output stage */
+    
+    wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp2, CONST_BITS-PASS1_BITS+1);
+    wsptr[DCTSIZE*3] = (int) DESCALE(tmp10 - tmp2, CONST_BITS-PASS1_BITS+1);
+    wsptr[DCTSIZE*1] = (int) DESCALE(tmp12 + tmp0, CONST_BITS-PASS1_BITS+1);
+    wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 - tmp0, CONST_BITS-PASS1_BITS+1);
+  }
+  
+  /* Pass 2: process 4 rows from work array, store into output array. */
+
+  wsptr = workspace;
+  for (ctr = 0; ctr < 4; ctr++) {
+    outptr = output_buf[ctr] + output_col;
+    /* It's not clear whether a zero row test is worthwhile here ... */
+
+#ifndef NO_ZERO_ROW_TEST
+    if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 &&
+	wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {
+      /* AC terms all zero */
+      JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)
+				  & RANGE_MASK];
+      
+      outptr[0] = dcval;
+      outptr[1] = dcval;
+      outptr[2] = dcval;
+      outptr[3] = dcval;
+      
+      wsptr += DCTSIZE;		/* advance pointer to next row */
+      continue;
+    }
+#endif
+    
+    /* Even part */
+    
+    tmp0 = ((INT32) wsptr[0]) << (CONST_BITS+1);
+    
+    tmp2 = MULTIPLY((INT32) wsptr[2], FIX_1_847759065)
+	 + MULTIPLY((INT32) wsptr[6], - FIX_0_765366865);
+    
+    tmp10 = tmp0 + tmp2;
+    tmp12 = tmp0 - tmp2;
+    
+    /* Odd part */
+    
+    z1 = (INT32) wsptr[7];
+    z2 = (INT32) wsptr[5];
+    z3 = (INT32) wsptr[3];
+    z4 = (INT32) wsptr[1];
+    
+    tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */
+	 + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */
+	 + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */
+	 + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */
+    
+    tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */
+	 + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */
+	 + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */
+	 + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */
+
+    /* Final output stage */
+    
+    outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp2,
+					  CONST_BITS+PASS1_BITS+3+1)
+			    & RANGE_MASK];
+    outptr[3] = range_limit[(int) DESCALE(tmp10 - tmp2,
+					  CONST_BITS+PASS1_BITS+3+1)
+			    & RANGE_MASK];
+    outptr[1] = range_limit[(int) DESCALE(tmp12 + tmp0,
+					  CONST_BITS+PASS1_BITS+3+1)
+			    & RANGE_MASK];
+    outptr[2] = range_limit[(int) DESCALE(tmp12 - tmp0,
+					  CONST_BITS+PASS1_BITS+3+1)
+			    & RANGE_MASK];
+    
+    wsptr += DCTSIZE;		/* advance pointer to next row */
+  }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 2x2 output block.
+ */
+
+GLOBAL(void)
+jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	       JCOEFPTR coef_block,
+	       JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+  INT32 tmp0, tmp10, z1;
+  JCOEFPTR inptr;
+  ISLOW_MULT_TYPE * quantptr;
+  int * wsptr;
+  JSAMPROW outptr;
+  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+  int ctr;
+  int workspace[DCTSIZE*2];	/* buffers data between passes */
+  SHIFT_TEMPS
+
+  /* Pass 1: process columns from input, store into work array. */
+
+  inptr = coef_block;
+  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+  wsptr = workspace;
+  for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) {
+    /* Don't bother to process columns 2,4,6 */
+    if (ctr == DCTSIZE-2 || ctr == DCTSIZE-4 || ctr == DCTSIZE-6)
+      continue;
+    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*3] == 0 &&
+	inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*7] == 0) {
+      /* AC terms all zero; we need not examine terms 2,4,6 for 2x2 output */
+      int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
+      
+      wsptr[DCTSIZE*0] = dcval;
+      wsptr[DCTSIZE*1] = dcval;
+      
+      continue;
+    }
+    
+    /* Even part */
+    
+    z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+    tmp10 = z1 << (CONST_BITS+2);
+    
+    /* Odd part */
+
+    z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+    tmp0 = MULTIPLY(z1, - FIX_0_720959822); /* sqrt(2) * (c7-c5+c3-c1) */
+    z1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+    tmp0 += MULTIPLY(z1, FIX_0_850430095); /* sqrt(2) * (-c1+c3+c5+c7) */
+    z1 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+    tmp0 += MULTIPLY(z1, - FIX_1_272758580); /* sqrt(2) * (-c1+c3-c5-c7) */
+    z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+    tmp0 += MULTIPLY(z1, FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */
+
+    /* Final output stage */
+    
+    wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp0, CONST_BITS-PASS1_BITS+2);
+    wsptr[DCTSIZE*1] = (int) DESCALE(tmp10 - tmp0, CONST_BITS-PASS1_BITS+2);
+  }
+  
+  /* Pass 2: process 2 rows from work array, store into output array. */
+
+  wsptr = workspace;
+  for (ctr = 0; ctr < 2; ctr++) {
+    outptr = output_buf[ctr] + output_col;
+    /* It's not clear whether a zero row test is worthwhile here ... */
+
+#ifndef NO_ZERO_ROW_TEST
+    if (wsptr[1] == 0 && wsptr[3] == 0 && wsptr[5] == 0 && wsptr[7] == 0) {
+      /* AC terms all zero */
+      JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)
+				  & RANGE_MASK];
+      
+      outptr[0] = dcval;
+      outptr[1] = dcval;
+      
+      wsptr += DCTSIZE;		/* advance pointer to next row */
+      continue;
+    }
+#endif
+    
+    /* Even part */
+    
+    tmp10 = ((INT32) wsptr[0]) << (CONST_BITS+2);
+    
+    /* Odd part */
+
+    tmp0 = MULTIPLY((INT32) wsptr[7], - FIX_0_720959822) /* sqrt(2) * (c7-c5+c3-c1) */
+	 + MULTIPLY((INT32) wsptr[5], FIX_0_850430095) /* sqrt(2) * (-c1+c3+c5+c7) */
+	 + MULTIPLY((INT32) wsptr[3], - FIX_1_272758580) /* sqrt(2) * (-c1+c3-c5-c7) */
+	 + MULTIPLY((INT32) wsptr[1], FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */
+
+    /* Final output stage */
+    
+    outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp0,
+					  CONST_BITS+PASS1_BITS+3+2)
+			    & RANGE_MASK];
+    outptr[1] = range_limit[(int) DESCALE(tmp10 - tmp0,
+					  CONST_BITS+PASS1_BITS+3+2)
+			    & RANGE_MASK];
+    
+    wsptr += DCTSIZE;		/* advance pointer to next row */
+  }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 1x1 output block.
+ */
+
+GLOBAL(void)
+jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	       JCOEFPTR coef_block,
+	       JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+  int dcval;
+  ISLOW_MULT_TYPE * quantptr;
+  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+  SHIFT_TEMPS
+
+  /* We hardly need an inverse DCT routine for this: just take the
+   * average pixel value, which is one-eighth of the DC coefficient.
+   */
+  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+  dcval = DEQUANTIZE(coef_block[0], quantptr[0]);
+  dcval = (int) DESCALE((INT32) dcval, 3);
+
+  output_buf[0][output_col] = range_limit[dcval & RANGE_MASK];
+}
+
+#endif /* IDCT_SCALING_SUPPORTED */
diff --git a/samples/jpeglib/jinclude.h b/samples/jpeglib/jinclude.h
new file mode 100644
index 0000000..0a4f151
--- /dev/null
+++ b/samples/jpeglib/jinclude.h
@@ -0,0 +1,91 @@
+/*
+ * jinclude.h
+ *
+ * Copyright (C) 1991-1994, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file exists to provide a single place to fix any problems with
+ * including the wrong system include files.  (Common problems are taken
+ * care of by the standard jconfig symbols, but on really weird systems
+ * you may have to edit this file.)
+ *
+ * NOTE: this file is NOT intended to be included by applications using the
+ * JPEG library.  Most applications need only include jpeglib.h.
+ */
+
+
+/* Include auto-config file to find out which system include files we need. */
+
+#include "jconfig.h"		/* auto configuration options */
+#define JCONFIG_INCLUDED	/* so that jpeglib.h doesn't do it again */
+
+/*
+ * We need the NULL macro and size_t typedef.
+ * On an ANSI-conforming system it is sufficient to include <stddef.h>.
+ * Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to
+ * pull in <sys/types.h> as well.
+ * Note that the core JPEG library does not require <stdio.h>;
+ * only the default error handler and data source/destination modules do.
+ * But we must pull it in because of the references to FILE in jpeglib.h.
+ * You can remove those references if you want to compile without <stdio.h>.
+ */
+
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef NEED_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include <stdio.h>
+
+/*
+ * We need memory copying and zeroing functions, plus strncpy().
+ * ANSI and System V implementations declare these in <string.h>.
+ * BSD doesn't have the mem() functions, but it does have bcopy()/bzero().
+ * Some systems may declare memset and memcpy in <memory.h>.
+ *
+ * NOTE: we assume the size parameters to these functions are of type size_t.
+ * Change the casts in these macros if not!
+ */
+
+#ifdef NEED_BSD_STRINGS
+
+#include <strings.h>
+#define MEMZERO(target,size)	bzero((void *)(target), (size_t)(size))
+#define MEMCOPY(dest,src,size)	bcopy((const void *)(src), (void *)(dest), (size_t)(size))
+
+#else /* not BSD, assume ANSI/SysV string lib */
+
+#include <string.h>
+#define MEMZERO(target,size)	memset((void *)(target), 0, (size_t)(size))
+#define MEMCOPY(dest,src,size)	memcpy((void *)(dest), (const void *)(src), (size_t)(size))
+
+#endif
+
+/*
+ * In ANSI C, and indeed any rational implementation, size_t is also the
+ * type returned by sizeof().  However, it seems there are some irrational
+ * implementations out there, in which sizeof() returns an int even though
+ * size_t is defined as long or unsigned long.  To ensure consistent results
+ * we always use this SIZEOF() macro in place of using sizeof() directly.
+ */
+
+#define SIZEOF(object)	((size_t) sizeof(object))
+
+/*
+ * The modules that use fread() and fwrite() always invoke them through
+ * these macros.  On some systems you may need to twiddle the argument casts.
+ * CAUTION: argument order is different from underlying functions!
+ */
+
+#define JFREAD(file,buf,sizeofbuf)  \
+  ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
+#define JFWRITE(file,buf,sizeofbuf)  \
+  ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
diff --git a/samples/jpeglib/jmemmgr.c b/samples/jpeglib/jmemmgr.c
new file mode 100644
index 0000000..b66dd4c
--- /dev/null
+++ b/samples/jpeglib/jmemmgr.c
@@ -0,0 +1,1118 @@
+/*
+ * jmemmgr.c
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains the JPEG system-independent memory management
+ * routines.  This code is usable across a wide variety of machines; most
+ * of the system dependencies have been isolated in a separate file.
+ * The major functions provided here are:
+ *   * pool-based allocation and freeing of memory;
+ *   * policy decisions about how to divide available memory among the
+ *     virtual arrays;
+ *   * control logic for swapping virtual arrays between main memory and
+ *     backing storage.
+ * The separate system-dependent file provides the actual backing-storage
+ * access code, and it contains the policy decision about how much total
+ * main memory to use.
+ * This file is system-dependent in the sense that some of its functions
+ * are unnecessary in some systems.  For example, if there is enough virtual
+ * memory so that backing storage will never be used, much of the virtual
+ * array control logic could be removed.  (Of course, if you have that much
+ * memory then you shouldn't care about a little bit of unused code...)
+ */
+
+#define JPEG_INTERNALS
+#define AM_MEMORY_MANAGER	/* we define jvirt_Xarray_control structs */
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jmemsys.h"		/* import the system-dependent declarations */
+
+#ifndef NO_GETENV
+#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare getenv() */
+extern char * getenv JPP((const char * name));
+#endif
+#endif
+
+
+/*
+ * Some important notes:
+ *   The allocation routines provided here must never return NULL.
+ *   They should exit to error_exit if unsuccessful.
+ *
+ *   It's not a good idea to try to merge the sarray and barray routines,
+ *   even though they are textually almost the same, because samples are
+ *   usually stored as bytes while coefficients are shorts or ints.  Thus,
+ *   in machines where byte pointers have a different representation from
+ *   word pointers, the resulting machine code could not be the same.
+ */
+
+
+/*
+ * Many machines require storage alignment: longs must start on 4-byte
+ * boundaries, doubles on 8-byte boundaries, etc.  On such machines, malloc()
+ * always returns pointers that are multiples of the worst-case alignment
+ * requirement, and we had better do so too.
+ * There isn't any really portable way to determine the worst-case alignment
+ * requirement.  This module assumes that the alignment requirement is
+ * multiples of sizeof(ALIGN_TYPE).
+ * By default, we define ALIGN_TYPE as double.  This is necessary on some
+ * workstations (where doubles really do need 8-byte alignment) and will work
+ * fine on nearly everything.  If your machine has lesser alignment needs,
+ * you can save a few bytes by making ALIGN_TYPE smaller.
+ * The only place I know of where this will NOT work is certain Macintosh
+ * 680x0 compilers that define double as a 10-byte IEEE extended float.
+ * Doing 10-byte alignment is counterproductive because longwords won't be
+ * aligned well.  Put "#define ALIGN_TYPE long" in jconfig.h if you have
+ * such a compiler.
+ */
+
+#ifndef ALIGN_TYPE		/* so can override from jconfig.h */
+#define ALIGN_TYPE  double
+#endif
+
+
+/*
+ * We allocate objects from "pools", where each pool is gotten with a single
+ * request to jpeg_get_small() or jpeg_get_large().  There is no per-object
+ * overhead within a pool, except for alignment padding.  Each pool has a
+ * header with a link to the next pool of the same class.
+ * Small and large pool headers are identical except that the latter's
+ * link pointer must be FAR on 80x86 machines.
+ * Notice that the "real" header fields are union'ed with a dummy ALIGN_TYPE
+ * field.  This forces the compiler to make SIZEOF(small_pool_hdr) a multiple
+ * of the alignment requirement of ALIGN_TYPE.
+ */
+
+typedef union small_pool_struct * small_pool_ptr;
+
+typedef union small_pool_struct {
+  struct {
+    small_pool_ptr next;	/* next in list of pools */
+    size_t bytes_used;		/* how many bytes already used within pool */
+    size_t bytes_left;		/* bytes still available in this pool */
+  } hdr;
+  ALIGN_TYPE dummy;		/* included in union to ensure alignment */
+} small_pool_hdr;
+
+typedef union large_pool_struct FAR * large_pool_ptr;
+
+typedef union large_pool_struct {
+  struct {
+    large_pool_ptr next;	/* next in list of pools */
+    size_t bytes_used;		/* how many bytes already used within pool */
+    size_t bytes_left;		/* bytes still available in this pool */
+  } hdr;
+  ALIGN_TYPE dummy;		/* included in union to ensure alignment */
+} large_pool_hdr;
+
+
+/*
+ * Here is the full definition of a memory manager object.
+ */
+
+typedef struct {
+  struct jpeg_memory_mgr pub;	/* public fields */
+
+  /* Each pool identifier (lifetime class) names a linked list of pools. */
+  small_pool_ptr small_list[JPOOL_NUMPOOLS];
+  large_pool_ptr large_list[JPOOL_NUMPOOLS];
+
+  /* Since we only have one lifetime class of virtual arrays, only one
+   * linked list is necessary (for each datatype).  Note that the virtual
+   * array control blocks being linked together are actually stored somewhere
+   * in the small-pool list.
+   */
+  jvirt_sarray_ptr virt_sarray_list;
+  jvirt_barray_ptr virt_barray_list;
+
+  /* This counts total space obtained from jpeg_get_small/large */
+  long total_space_allocated;
+
+  /* alloc_sarray and alloc_barray set this value for use by virtual
+   * array routines.
+   */
+  JDIMENSION last_rowsperchunk;	/* from most recent alloc_sarray/barray */
+} my_memory_mgr;
+
+typedef my_memory_mgr * my_mem_ptr;
+
+
+/*
+ * The control blocks for virtual arrays.
+ * Note that these blocks are allocated in the "small" pool area.
+ * System-dependent info for the associated backing store (if any) is hidden
+ * inside the backing_store_info struct.
+ */
+
+struct jvirt_sarray_control {
+  JSAMPARRAY mem_buffer;	/* => the in-memory buffer */
+  JDIMENSION rows_in_array;	/* total virtual array height */
+  JDIMENSION samplesperrow;	/* width of array (and of memory buffer) */
+  JDIMENSION maxaccess;		/* max rows accessed by access_virt_sarray */
+  JDIMENSION rows_in_mem;	/* height of memory buffer */
+  JDIMENSION rowsperchunk;	/* allocation chunk size in mem_buffer */
+  JDIMENSION cur_start_row;	/* first logical row # in the buffer */
+  JDIMENSION first_undef_row;	/* row # of first uninitialized row */
+  boolean pre_zero;		/* pre-zero mode requested? */
+  boolean dirty;		/* do current buffer contents need written? */
+  boolean b_s_open;		/* is backing-store data valid? */
+  jvirt_sarray_ptr next;	/* link to next virtual sarray control block */
+  backing_store_info b_s_info;	/* System-dependent control info */
+};
+
+struct jvirt_barray_control {
+  JBLOCKARRAY mem_buffer;	/* => the in-memory buffer */
+  JDIMENSION rows_in_array;	/* total virtual array height */
+  JDIMENSION blocksperrow;	/* width of array (and of memory buffer) */
+  JDIMENSION maxaccess;		/* max rows accessed by access_virt_barray */
+  JDIMENSION rows_in_mem;	/* height of memory buffer */
+  JDIMENSION rowsperchunk;	/* allocation chunk size in mem_buffer */
+  JDIMENSION cur_start_row;	/* first logical row # in the buffer */
+  JDIMENSION first_undef_row;	/* row # of first uninitialized row */
+  boolean pre_zero;		/* pre-zero mode requested? */
+  boolean dirty;		/* do current buffer contents need written? */
+  boolean b_s_open;		/* is backing-store data valid? */
+  jvirt_barray_ptr next;	/* link to next virtual barray control block */
+  backing_store_info b_s_info;	/* System-dependent control info */
+};
+
+
+#ifdef MEM_STATS		/* optional extra stuff for statistics */
+
+LOCAL(void)
+print_mem_stats (j_common_ptr cinfo, int pool_id)
+{
+  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
+  small_pool_ptr shdr_ptr;
+  large_pool_ptr lhdr_ptr;
+
+  /* Since this is only a debugging stub, we can cheat a little by using
+   * fprintf directly rather than going through the trace message code.
+   * This is helpful because message parm array can't handle longs.
+   */
+  fprintf(stderr, "Freeing pool %d, total space = %ld\n",
+	  pool_id, mem->total_space_allocated);
+
+  for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL;
+       lhdr_ptr = lhdr_ptr->hdr.next) {
+    fprintf(stderr, "  Large chunk used %ld\n",
+	    (long) lhdr_ptr->hdr.bytes_used);
+  }
+
+  for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL;
+       shdr_ptr = shdr_ptr->hdr.next) {
+    fprintf(stderr, "  Small chunk used %ld free %ld\n",
+	    (long) shdr_ptr->hdr.bytes_used,
+	    (long) shdr_ptr->hdr.bytes_left);
+  }
+}
+
+#endif /* MEM_STATS */
+
+
+LOCAL(void)
+out_of_memory (j_common_ptr cinfo, int which)
+/* Report an out-of-memory error and stop execution */
+/* If we compiled MEM_STATS support, report alloc requests before dying */
+{
+#ifdef MEM_STATS
+  cinfo->err->trace_level = 2;	/* force self_destruct to report stats */
+#endif
+  ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which);
+}
+
+
+/*
+ * Allocation of "small" objects.
+ *
+ * For these, we use pooled storage.  When a new pool must be created,
+ * we try to get enough space for the current request plus a "slop" factor,
+ * where the slop will be the amount of leftover space in the new pool.
+ * The speed vs. space tradeoff is largely determined by the slop values.
+ * A different slop value is provided for each pool class (lifetime),
+ * and we also distinguish the first pool of a class from later ones.
+ * NOTE: the values given work fairly well on both 16- and 32-bit-int
+ * machines, but may be too small if longs are 64 bits or more.
+ */
+
+static const size_t first_pool_slop[JPOOL_NUMPOOLS] = 
+{
+	1600,			/* first PERMANENT pool */
+	16000			/* first IMAGE pool */
+};
+
+static const size_t extra_pool_slop[JPOOL_NUMPOOLS] = 
+{
+	0,			/* additional PERMANENT pools */
+	5000			/* additional IMAGE pools */
+};
+
+#define MIN_SLOP  50		/* greater than 0 to avoid futile looping */
+
+
+METHODDEF(void *)
+alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
+/* Allocate a "small" object */
+{
+  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
+  small_pool_ptr hdr_ptr, prev_hdr_ptr;
+  char * data_ptr;
+  size_t odd_bytes, min_request, slop;
+
+  /* Check for unsatisfiable request (do now to ensure no overflow below) */
+  if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(small_pool_hdr)))
+    out_of_memory(cinfo, 1);	/* request exceeds malloc's ability */
+
+  /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */
+  odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE);
+  if (odd_bytes > 0)
+    sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes;
+
+  /* See if space is available in any existing pool */
+  if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)
+    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);	/* safety check */
+  prev_hdr_ptr = NULL;
+  hdr_ptr = mem->small_list[pool_id];
+  while (hdr_ptr != NULL) {
+    if (hdr_ptr->hdr.bytes_left >= sizeofobject)
+      break;			/* found pool with enough space */
+    prev_hdr_ptr = hdr_ptr;
+    hdr_ptr = hdr_ptr->hdr.next;
+  }
+
+  /* Time to make a new pool? */
+  if (hdr_ptr == NULL) {
+    /* min_request is what we need now, slop is what will be leftover */
+    min_request = sizeofobject + SIZEOF(small_pool_hdr);
+    if (prev_hdr_ptr == NULL)	/* first pool in class? */
+      slop = first_pool_slop[pool_id];
+    else
+      slop = extra_pool_slop[pool_id];
+    /* Don't ask for more than MAX_ALLOC_CHUNK */
+    if (slop > (size_t) (MAX_ALLOC_CHUNK-min_request))
+      slop = (size_t) (MAX_ALLOC_CHUNK-min_request);
+    /* Try to get space, if fail reduce slop and try again */
+    for (;;) {
+      hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop);
+      if (hdr_ptr != NULL)
+	break;
+      slop /= 2;
+      if (slop < MIN_SLOP)	/* give up when it gets real small */
+	out_of_memory(cinfo, 2); /* jpeg_get_small failed */
+    }
+    mem->total_space_allocated += (long)min_request + (long)slop;
+    /* Success, initialize the new pool header and add to end of list */
+    hdr_ptr->hdr.next = NULL;
+    hdr_ptr->hdr.bytes_used = 0;
+    hdr_ptr->hdr.bytes_left = sizeofobject + slop;
+    if (prev_hdr_ptr == NULL)	/* first pool in class? */
+      mem->small_list[pool_id] = hdr_ptr;
+    else
+      prev_hdr_ptr->hdr.next = hdr_ptr;
+  }
+
+  /* OK, allocate the object from the current pool */
+  data_ptr = (char *) (hdr_ptr + 1); /* point to first data byte in pool */
+  data_ptr += hdr_ptr->hdr.bytes_used; /* point to place for object */
+  hdr_ptr->hdr.bytes_used += sizeofobject;
+  hdr_ptr->hdr.bytes_left -= sizeofobject;
+
+  return (void *) data_ptr;
+}
+
+
+/*
+ * Allocation of "large" objects.
+ *
+ * The external semantics of these are the same as "small" objects,
+ * except that FAR pointers are used on 80x86.  However the pool
+ * management heuristics are quite different.  We assume that each
+ * request is large enough that it may as well be passed directly to
+ * jpeg_get_large; the pool management just links everything together
+ * so that we can free it all on demand.
+ * Note: the major use of "large" objects is in JSAMPARRAY and JBLOCKARRAY
+ * structures.  The routines that create these structures (see below)
+ * deliberately bunch rows together to ensure a large request size.
+ */
+
+METHODDEF(void FAR *)
+alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
+/* Allocate a "large" object */
+{
+  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
+  large_pool_ptr hdr_ptr;
+  size_t odd_bytes;
+
+  /* Check for unsatisfiable request (do now to ensure no overflow below) */
+  if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)))
+    out_of_memory(cinfo, 3);	/* request exceeds malloc's ability */
+
+  /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */
+  odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE);
+  if (odd_bytes > 0)
+    sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes;
+
+  /* Always make a new pool */
+  if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)
+    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);	/* safety check */
+
+  hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject +
+					    SIZEOF(large_pool_hdr));
+  if (hdr_ptr == NULL)
+    out_of_memory(cinfo, 4);	/* jpeg_get_large failed */
+  mem->total_space_allocated += (long)sizeofobject + SIZEOF(large_pool_hdr);
+
+  /* Success, initialize the new pool header and add to list */
+  hdr_ptr->hdr.next = mem->large_list[pool_id];
+  /* We maintain space counts in each pool header for statistical purposes,
+   * even though they are not needed for allocation.
+   */
+  hdr_ptr->hdr.bytes_used = sizeofobject;
+  hdr_ptr->hdr.bytes_left = 0;
+  mem->large_list[pool_id] = hdr_ptr;
+
+  return (void FAR *) (hdr_ptr + 1); /* point to first data byte in pool */
+}
+
+
+/*
+ * Creation of 2-D sample arrays.
+ * The pointers are in near heap, the samples themselves in FAR heap.
+ *
+ * To minimize allocation overhead and to allow I/O of large contiguous
+ * blocks, we allocate the sample rows in groups of as many rows as possible
+ * without exceeding MAX_ALLOC_CHUNK total bytes per allocation request.
+ * NB: the virtual array control routines, later in this file, know about
+ * this chunking of rows.  The rowsperchunk value is left in the mem manager
+ * object so that it can be saved away if this sarray is the workspace for
+ * a virtual array.
+ */
+
+METHODDEF(JSAMPARRAY)
+alloc_sarray (j_common_ptr cinfo, int pool_id,
+	      JDIMENSION samplesperrow, JDIMENSION numrows)
+/* Allocate a 2-D sample array */
+{
+  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
+  JSAMPARRAY result;
+  JSAMPROW workspace;
+  JDIMENSION rowsperchunk, currow, i;
+  long ltemp;
+
+  /* Calculate max # of rows allowed in one allocation chunk */
+  ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
+	  ((long) samplesperrow * SIZEOF(JSAMPLE));
+  if (ltemp <= 0)
+    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
+  if (ltemp < (long) numrows)
+    rowsperchunk = (JDIMENSION) ltemp;
+  else
+    rowsperchunk = numrows;
+  mem->last_rowsperchunk = rowsperchunk;
+
+  /* Get space for row pointers (small object) */
+  result = (JSAMPARRAY) alloc_small(cinfo, pool_id,
+				    (size_t) (numrows * SIZEOF(JSAMPROW)));
+
+  /* Get the rows themselves (large objects) */
+  currow = 0;
+  while (currow < numrows) {
+    rowsperchunk = MIN(rowsperchunk, numrows - currow);
+    workspace = (JSAMPROW) alloc_large(cinfo, pool_id,
+	(size_t) ((size_t) rowsperchunk * (size_t) samplesperrow
+		  * SIZEOF(JSAMPLE)));
+    for (i = rowsperchunk; i > 0; i--) {
+      result[currow++] = workspace;
+      workspace += samplesperrow;
+    }
+  }
+
+  return result;
+}
+
+
+/*
+ * Creation of 2-D coefficient-block arrays.
+ * This is essentially the same as the code for sample arrays, above.
+ */
+
+METHODDEF(JBLOCKARRAY)
+alloc_barray (j_common_ptr cinfo, int pool_id,
+	      JDIMENSION blocksperrow, JDIMENSION numrows)
+/* Allocate a 2-D coefficient-block array */
+{
+  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
+  JBLOCKARRAY result;
+  JBLOCKROW workspace;
+  JDIMENSION rowsperchunk, currow, i;
+  long ltemp;
+
+  /* Calculate max # of rows allowed in one allocation chunk */
+  ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
+	  ((long) blocksperrow * SIZEOF(JBLOCK));
+  if (ltemp <= 0)
+    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
+  if (ltemp < (long) numrows)
+    rowsperchunk = (JDIMENSION) ltemp;
+  else
+    rowsperchunk = numrows;
+  mem->last_rowsperchunk = rowsperchunk;
+
+  /* Get space for row pointers (small object) */
+  result = (JBLOCKARRAY) alloc_small(cinfo, pool_id,
+				     (size_t) (numrows * SIZEOF(JBLOCKROW)));
+
+  /* Get the rows themselves (large objects) */
+  currow = 0;
+  while (currow < numrows) {
+    rowsperchunk = MIN(rowsperchunk, numrows - currow);
+    workspace = (JBLOCKROW) alloc_large(cinfo, pool_id,
+	(size_t) ((size_t) rowsperchunk * (size_t) blocksperrow
+		  * SIZEOF(JBLOCK)));
+    for (i = rowsperchunk; i > 0; i--) {
+      result[currow++] = workspace;
+      workspace += blocksperrow;
+    }
+  }
+
+  return result;
+}
+
+
+/*
+ * About virtual array management:
+ *
+ * The above "normal" array routines are only used to allocate strip buffers
+ * (as wide as the image, but just a few rows high).  Full-image-sized buffers
+ * are handled as "virtual" arrays.  The array is still accessed a strip at a
+ * time, but the memory manager must save the whole array for repeated
+ * accesses.  The intended implementation is that there is a strip buffer in
+ * memory (as high as is possible given the desired memory limit), plus a
+ * backing file that holds the rest of the array.
+ *
+ * The request_virt_array routines are told the total size of the image and
+ * the maximum number of rows that will be accessed at once.  The in-memory
+ * buffer must be at least as large as the maxaccess value.
+ *
+ * The request routines create control blocks but not the in-memory buffers.
+ * That is postponed until realize_virt_arrays is called.  At that time the
+ * total amount of space needed is known (approximately, anyway), so free
+ * memory can be divided up fairly.
+ *
+ * The access_virt_array routines are responsible for making a specific strip
+ * area accessible (after reading or writing the backing file, if necessary).
+ * Note that the access routines are told whether the caller intends to modify
+ * the accessed strip; during a read-only pass this saves having to rewrite
+ * data to disk.  The access routines are also responsible for pre-zeroing
+ * any newly accessed rows, if pre-zeroing was requested.
+ *
+ * In current usage, the access requests are usually for nonoverlapping
+ * strips; that is, successive access start_row numbers differ by exactly
+ * num_rows = maxaccess.  This means we can get good performance with simple
+ * buffer dump/reload logic, by making the in-memory buffer be a multiple
+ * of the access height; then there will never be accesses across bufferload
+ * boundaries.  The code will still work with overlapping access requests,
+ * but it doesn't handle bufferload overlaps very efficiently.
+ */
+
+
+METHODDEF(jvirt_sarray_ptr)
+request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
+		     JDIMENSION samplesperrow, JDIMENSION numrows,
+		     JDIMENSION maxaccess)
+/* Request a virtual 2-D sample array */
+{
+  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
+  jvirt_sarray_ptr result;
+
+  /* Only IMAGE-lifetime virtual arrays are currently supported */
+  if (pool_id != JPOOL_IMAGE)
+    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);	/* safety check */
+
+  /* get control block */
+  result = (jvirt_sarray_ptr) alloc_small(cinfo, pool_id,
+					  SIZEOF(struct jvirt_sarray_control));
+
+  result->mem_buffer = NULL;	/* marks array not yet realized */
+  result->rows_in_array = numrows;
+  result->samplesperrow = samplesperrow;
+  result->maxaccess = maxaccess;
+  result->pre_zero = pre_zero;
+  result->b_s_open = FALSE;	/* no associated backing-store object */
+  result->next = mem->virt_sarray_list; /* add to list of virtual arrays */
+  mem->virt_sarray_list = result;
+
+  return result;
+}
+
+
+METHODDEF(jvirt_barray_ptr)
+request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
+		     JDIMENSION blocksperrow, JDIMENSION numrows,
+		     JDIMENSION maxaccess)
+/* Request a virtual 2-D coefficient-block array */
+{
+  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
+  jvirt_barray_ptr result;
+
+  /* Only IMAGE-lifetime virtual arrays are currently supported */
+  if (pool_id != JPOOL_IMAGE)
+    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);	/* safety check */
+
+  /* get control block */
+  result = (jvirt_barray_ptr) alloc_small(cinfo, pool_id,
+					  SIZEOF(struct jvirt_barray_control));
+
+  result->mem_buffer = NULL;	/* marks array not yet realized */
+  result->rows_in_array = numrows;
+  result->blocksperrow = blocksperrow;
+  result->maxaccess = maxaccess;
+  result->pre_zero = pre_zero;
+  result->b_s_open = FALSE;	/* no associated backing-store object */
+  result->next = mem->virt_barray_list; /* add to list of virtual arrays */
+  mem->virt_barray_list = result;
+
+  return result;
+}
+
+
+METHODDEF(void)
+realize_virt_arrays (j_common_ptr cinfo)
+/* Allocate the in-memory buffers for any unrealized virtual arrays */
+{
+  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
+  long space_per_minheight, maximum_space, avail_mem;
+  long minheights, max_minheights;
+  jvirt_sarray_ptr sptr;
+  jvirt_barray_ptr bptr;
+
+  /* Compute the minimum space needed (maxaccess rows in each buffer)
+   * and the maximum space needed (full image height in each buffer).
+   * These may be of use to the system-dependent jpeg_mem_available routine.
+   */
+  space_per_minheight = 0;
+  maximum_space = 0;
+  for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
+    if (sptr->mem_buffer == NULL) { /* if not realized yet */
+      space_per_minheight += (long) sptr->maxaccess *
+			     (long) sptr->samplesperrow * SIZEOF(JSAMPLE);
+      maximum_space += (long) sptr->rows_in_array *
+		       (long) sptr->samplesperrow * SIZEOF(JSAMPLE);
+    }
+  }
+  for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
+    if (bptr->mem_buffer == NULL) { /* if not realized yet */
+      space_per_minheight += (long) bptr->maxaccess *
+			     (long) bptr->blocksperrow * SIZEOF(JBLOCK);
+      maximum_space += (long) bptr->rows_in_array *
+		       (long) bptr->blocksperrow * SIZEOF(JBLOCK);
+    }
+  }
+
+  if (space_per_minheight <= 0)
+    return;			/* no unrealized arrays, no work */
+
+  /* Determine amount of memory to actually use; this is system-dependent. */
+  avail_mem = jpeg_mem_available(cinfo, space_per_minheight, maximum_space,
+				 mem->total_space_allocated);
+
+  /* If the maximum space needed is available, make all the buffers full
+   * height; otherwise parcel it out with the same number of minheights
+   * in each buffer.
+   */
+  if (avail_mem >= maximum_space)
+    max_minheights = 1000000000L;
+  else {
+    max_minheights = avail_mem / space_per_minheight;
+    /* If there doesn't seem to be enough space, try to get the minimum
+     * anyway.  This allows a "stub" implementation of jpeg_mem_available().
+     */
+    if (max_minheights <= 0)
+      max_minheights = 1;
+  }
+
+  /* Allocate the in-memory buffers and initialize backing store as needed. */
+
+  for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
+    if (sptr->mem_buffer == NULL) { /* if not realized yet */
+      minheights = ((long) sptr->rows_in_array - 1L) / sptr->maxaccess + 1L;
+      if (minheights <= max_minheights) {
+	/* This buffer fits in memory */
+	sptr->rows_in_mem = sptr->rows_in_array;
+      } else {
+	/* It doesn't fit in memory, create backing store. */
+	sptr->rows_in_mem = (JDIMENSION) (max_minheights * sptr->maxaccess);
+	jpeg_open_backing_store(cinfo, & sptr->b_s_info,
+				(long) sptr->rows_in_array *
+				(long) sptr->samplesperrow *
+				(long) SIZEOF(JSAMPLE));
+	sptr->b_s_open = TRUE;
+      }
+      sptr->mem_buffer = alloc_sarray(cinfo, JPOOL_IMAGE,
+				      sptr->samplesperrow, sptr->rows_in_mem);
+      sptr->rowsperchunk = mem->last_rowsperchunk;
+      sptr->cur_start_row = 0;
+      sptr->first_undef_row = 0;
+      sptr->dirty = FALSE;
+    }
+  }
+
+  for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
+    if (bptr->mem_buffer == NULL) { /* if not realized yet */
+      minheights = ((long) bptr->rows_in_array - 1L) / bptr->maxaccess + 1L;
+      if (minheights <= max_minheights) {
+	/* This buffer fits in memory */
+	bptr->rows_in_mem = bptr->rows_in_array;
+      } else {
+	/* It doesn't fit in memory, create backing store. */
+	bptr->rows_in_mem = (JDIMENSION) (max_minheights * bptr->maxaccess);
+	jpeg_open_backing_store(cinfo, & bptr->b_s_info,
+				(long) bptr->rows_in_array *
+				(long) bptr->blocksperrow *
+				(long) SIZEOF(JBLOCK));
+	bptr->b_s_open = TRUE;
+      }
+      bptr->mem_buffer = alloc_barray(cinfo, JPOOL_IMAGE,
+				      bptr->blocksperrow, bptr->rows_in_mem);
+      bptr->rowsperchunk = mem->last_rowsperchunk;
+      bptr->cur_start_row = 0;
+      bptr->first_undef_row = 0;
+      bptr->dirty = FALSE;
+    }
+  }
+}
+
+
+LOCAL(void)
+do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing)
+/* Do backing store read or write of a virtual sample array */
+{
+  long bytesperrow, file_offset, byte_count, rows, thisrow, i;
+
+  bytesperrow = (long) ptr->samplesperrow * SIZEOF(JSAMPLE);
+  file_offset = ptr->cur_start_row * bytesperrow;
+  /* Loop to read or write each allocation chunk in mem_buffer */
+  for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) {
+    /* One chunk, but check for short chunk at end of buffer */
+    rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i);
+    /* Transfer no more than is currently defined */
+    thisrow = (long) ptr->cur_start_row + i;
+    rows = MIN(rows, (long) ptr->first_undef_row - thisrow);
+    /* Transfer no more than fits in file */
+    rows = MIN(rows, (long) ptr->rows_in_array - thisrow);
+    if (rows <= 0)		/* this chunk might be past end of file! */
+      break;
+    byte_count = rows * bytesperrow;
+    if (writing)
+      (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info,
+					    (void FAR *) ptr->mem_buffer[i],
+					    file_offset, byte_count);
+    else
+      (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info,
+					   (void FAR *) ptr->mem_buffer[i],
+					   file_offset, byte_count);
+    file_offset += byte_count;
+  }
+}
+
+
+LOCAL(void)
+do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing)
+/* Do backing store read or write of a virtual coefficient-block array */
+{
+  long bytesperrow, file_offset, byte_count, rows, thisrow, i;
+
+  bytesperrow = (long) ptr->blocksperrow * SIZEOF(JBLOCK);
+  file_offset = ptr->cur_start_row * bytesperrow;
+  /* Loop to read or write each allocation chunk in mem_buffer */
+  for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) {
+    /* One chunk, but check for short chunk at end of buffer */
+    rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i);
+    /* Transfer no more than is currently defined */
+    thisrow = (long) ptr->cur_start_row + i;
+    rows = MIN(rows, (long) ptr->first_undef_row - thisrow);
+    /* Transfer no more than fits in file */
+    rows = MIN(rows, (long) ptr->rows_in_array - thisrow);
+    if (rows <= 0)		/* this chunk might be past end of file! */
+      break;
+    byte_count = rows * bytesperrow;
+    if (writing)
+      (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info,
+					    (void FAR *) ptr->mem_buffer[i],
+					    file_offset, byte_count);
+    else
+      (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info,
+					   (void FAR *) ptr->mem_buffer[i],
+					   file_offset, byte_count);
+    file_offset += byte_count;
+  }
+}
+
+
+METHODDEF(JSAMPARRAY)
+access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
+		    JDIMENSION start_row, JDIMENSION num_rows,
+		    boolean writable)
+/* Access the part of a virtual sample array starting at start_row */
+/* and extending for num_rows rows.  writable is true if  */
+/* caller intends to modify the accessed area. */
+{
+  JDIMENSION end_row = start_row + num_rows;
+  JDIMENSION undef_row;
+
+  /* debugging check */
+  if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess ||
+      ptr->mem_buffer == NULL)
+    ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
+
+  /* Make the desired part of the virtual array accessible */
+  if (start_row < ptr->cur_start_row ||
+      end_row > ptr->cur_start_row+ptr->rows_in_mem) {
+    if (! ptr->b_s_open)
+      ERREXIT(cinfo, JERR_VIRTUAL_BUG);
+    /* Flush old buffer contents if necessary */
+    if (ptr->dirty) {
+      do_sarray_io(cinfo, ptr, TRUE);
+      ptr->dirty = FALSE;
+    }
+    /* Decide what part of virtual array to access.
+     * Algorithm: if target address > current window, assume forward scan,
+     * load starting at target address.  If target address < current window,
+     * assume backward scan, load so that target area is top of window.
+     * Note that when switching from forward write to forward read, will have
+     * start_row = 0, so the limiting case applies and we load from 0 anyway.
+     */
+    if (start_row > ptr->cur_start_row) {
+      ptr->cur_start_row = start_row;
+    } else {
+      /* use long arithmetic here to avoid overflow & unsigned problems */
+      long ltemp;
+
+      ltemp = (long) end_row - (long) ptr->rows_in_mem;
+      if (ltemp < 0)
+	ltemp = 0;		/* don't fall off front end of file */
+      ptr->cur_start_row = (JDIMENSION) ltemp;
+    }
+    /* Read in the selected part of the array.
+     * During the initial write pass, we will do no actual read
+     * because the selected part is all undefined.
+     */
+    do_sarray_io(cinfo, ptr, FALSE);
+  }
+  /* Ensure the accessed part of the array is defined; prezero if needed.
+   * To improve locality of access, we only prezero the part of the array
+   * that the caller is about to access, not the entire in-memory array.
+   */
+  if (ptr->first_undef_row < end_row) {
+    if (ptr->first_undef_row < start_row) {
+      if (writable)		/* writer skipped over a section of array */
+	ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
+      undef_row = start_row;	/* but reader is allowed to read ahead */
+    } else {
+      undef_row = ptr->first_undef_row;
+    }
+    if (writable)
+      ptr->first_undef_row = end_row;
+    if (ptr->pre_zero) {
+      size_t bytesperrow = (size_t) ptr->samplesperrow * SIZEOF(JSAMPLE);
+      undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */
+      end_row -= ptr->cur_start_row;
+      while (undef_row < end_row) {
+	jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow);
+	undef_row++;
+      }
+    } else {
+      if (! writable)		/* reader looking at undefined data */
+	ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
+    }
+  }
+  /* Flag the buffer dirty if caller will write in it */
+  if (writable)
+    ptr->dirty = TRUE;
+  /* Return address of proper part of the buffer */
+  return ptr->mem_buffer + (start_row - ptr->cur_start_row);
+}
+
+
+METHODDEF(JBLOCKARRAY)
+access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr,
+		    JDIMENSION start_row, JDIMENSION num_rows,
+		    boolean writable)
+/* Access the part of a virtual block array starting at start_row */
+/* and extending for num_rows rows.  writable is true if  */
+/* caller intends to modify the accessed area. */
+{
+  JDIMENSION end_row = start_row + num_rows;
+  JDIMENSION undef_row;
+
+  /* debugging check */
+  if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess ||
+      ptr->mem_buffer == NULL)
+    ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
+
+  /* Make the desired part of the virtual array accessible */
+  if (start_row < ptr->cur_start_row ||
+      end_row > ptr->cur_start_row+ptr->rows_in_mem) {
+    if (! ptr->b_s_open)
+      ERREXIT(cinfo, JERR_VIRTUAL_BUG);
+    /* Flush old buffer contents if necessary */
+    if (ptr->dirty) {
+      do_barray_io(cinfo, ptr, TRUE);
+      ptr->dirty = FALSE;
+    }
+    /* Decide what part of virtual array to access.
+     * Algorithm: if target address > current window, assume forward scan,
+     * load starting at target address.  If target address < current window,
+     * assume backward scan, load so that target area is top of window.
+     * Note that when switching from forward write to forward read, will have
+     * start_row = 0, so the limiting case applies and we load from 0 anyway.
+     */
+    if (start_row > ptr->cur_start_row) {
+      ptr->cur_start_row = start_row;
+    } else {
+      /* use long arithmetic here to avoid overflow & unsigned problems */
+      long ltemp;
+
+      ltemp = (long) end_row - (long) ptr->rows_in_mem;
+      if (ltemp < 0)
+	ltemp = 0;		/* don't fall off front end of file */
+      ptr->cur_start_row = (JDIMENSION) ltemp;
+    }
+    /* Read in the selected part of the array.
+     * During the initial write pass, we will do no actual read
+     * because the selected part is all undefined.
+     */
+    do_barray_io(cinfo, ptr, FALSE);
+  }
+  /* Ensure the accessed part of the array is defined; prezero if needed.
+   * To improve locality of access, we only prezero the part of the array
+   * that the caller is about to access, not the entire in-memory array.
+   */
+  if (ptr->first_undef_row < end_row) {
+    if (ptr->first_undef_row < start_row) {
+      if (writable)		/* writer skipped over a section of array */
+	ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
+      undef_row = start_row;	/* but reader is allowed to read ahead */
+    } else {
+      undef_row = ptr->first_undef_row;
+    }
+    if (writable)
+      ptr->first_undef_row = end_row;
+    if (ptr->pre_zero) {
+      size_t bytesperrow = (size_t) ptr->blocksperrow * SIZEOF(JBLOCK);
+      undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */
+      end_row -= ptr->cur_start_row;
+      while (undef_row < end_row) {
+	jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow);
+	undef_row++;
+      }
+    } else {
+      if (! writable)		/* reader looking at undefined data */
+	ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
+    }
+  }
+  /* Flag the buffer dirty if caller will write in it */
+  if (writable)
+    ptr->dirty = TRUE;
+  /* Return address of proper part of the buffer */
+  return ptr->mem_buffer + (start_row - ptr->cur_start_row);
+}
+
+
+/*
+ * Release all objects belonging to a specified pool.
+ */
+
+METHODDEF(void)
+free_pool (j_common_ptr cinfo, int pool_id)
+{
+  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
+  small_pool_ptr shdr_ptr;
+  large_pool_ptr lhdr_ptr;
+  size_t space_freed;
+
+  if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)
+    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);	/* safety check */
+
+#ifdef MEM_STATS
+  if (cinfo->err->trace_level > 1)
+    print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */
+#endif
+
+  /* If freeing IMAGE pool, close any virtual arrays first */
+  if (pool_id == JPOOL_IMAGE) {
+    jvirt_sarray_ptr sptr;
+    jvirt_barray_ptr bptr;
+
+    for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
+      if (sptr->b_s_open) {	/* there may be no backing store */
+	sptr->b_s_open = FALSE;	/* prevent recursive close if error */
+	(*sptr->b_s_info.close_backing_store) (cinfo, & sptr->b_s_info);
+      }
+    }
+    mem->virt_sarray_list = NULL;
+    for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
+      if (bptr->b_s_open) {	/* there may be no backing store */
+	bptr->b_s_open = FALSE;	/* prevent recursive close if error */
+	(*bptr->b_s_info.close_backing_store) (cinfo, & bptr->b_s_info);
+      }
+    }
+    mem->virt_barray_list = NULL;
+  }
+
+  /* Release large objects */
+  lhdr_ptr = mem->large_list[pool_id];
+  mem->large_list[pool_id] = NULL;
+
+  while (lhdr_ptr != NULL) {
+    large_pool_ptr next_lhdr_ptr = lhdr_ptr->hdr.next;
+    space_freed = lhdr_ptr->hdr.bytes_used +
+		  lhdr_ptr->hdr.bytes_left +
+		  SIZEOF(large_pool_hdr);
+    jpeg_free_large(cinfo, (void FAR *) lhdr_ptr, space_freed);
+    mem->total_space_allocated -= (long)space_freed;
+    lhdr_ptr = next_lhdr_ptr;
+  }
+
+  /* Release small objects */
+  shdr_ptr = mem->small_list[pool_id];
+  mem->small_list[pool_id] = NULL;
+
+  while (shdr_ptr != NULL) {
+    small_pool_ptr next_shdr_ptr = shdr_ptr->hdr.next;
+    space_freed = shdr_ptr->hdr.bytes_used +
+		  shdr_ptr->hdr.bytes_left +
+		  SIZEOF(small_pool_hdr);
+    jpeg_free_small(cinfo, (void *) shdr_ptr, space_freed);
+    mem->total_space_allocated -= (long)space_freed;
+    shdr_ptr = next_shdr_ptr;
+  }
+}
+
+
+/*
+ * Close up shop entirely.
+ * Note that this cannot be called unless cinfo->mem is non-NULL.
+ */
+
+METHODDEF(void)
+self_destruct (j_common_ptr cinfo)
+{
+  int pool;
+
+  /* Close all backing store, release all memory.
+   * Releasing pools in reverse order might help avoid fragmentation
+   * with some (brain-damaged) malloc libraries.
+   */
+  for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) {
+    free_pool(cinfo, pool);
+  }
+
+  /* Release the memory manager control block too. */
+  jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr));
+  cinfo->mem = NULL;		/* ensures I will be called only once */
+
+  jpeg_mem_term(cinfo);		/* system-dependent cleanup */
+}
+
+
+/*
+ * Memory manager initialization.
+ * When this is called, only the error manager pointer is valid in cinfo!
+ */
+
+GLOBAL(void)
+jinit_memory_mgr (j_common_ptr cinfo)
+{
+  my_mem_ptr mem;
+  long max_to_use;
+  int pool;
+  size_t test_mac;
+
+  cinfo->mem = NULL;		/* for safety if init fails */
+
+  /* Check for configuration errors.
+   * SIZEOF(ALIGN_TYPE) should be a power of 2; otherwise, it probably
+   * doesn't reflect any real hardware alignment requirement.
+   * The test is a little tricky: for X>0, X and X-1 have no one-bits
+   * in common if and only if X is a power of 2, ie has only one one-bit.
+   * Some compilers may give an "unreachable code" warning here; ignore it.
+   */
+  if ((SIZEOF(ALIGN_TYPE) & (SIZEOF(ALIGN_TYPE)-1)) != 0)
+    ERREXIT(cinfo, JERR_BAD_ALIGN_TYPE);
+  /* MAX_ALLOC_CHUNK must be representable as type size_t, and must be
+   * a multiple of SIZEOF(ALIGN_TYPE).
+   * Again, an "unreachable code" warning may be ignored here.
+   * But a "constant too large" warning means you need to fix MAX_ALLOC_CHUNK.
+   */
+  test_mac = (size_t) MAX_ALLOC_CHUNK;
+  if ((long) test_mac != MAX_ALLOC_CHUNK ||
+      (MAX_ALLOC_CHUNK % SIZEOF(ALIGN_TYPE)) != 0)
+    ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
+
+  max_to_use = jpeg_mem_init(cinfo); /* system-dependent initialization */
+
+  /* Attempt to allocate memory manager's control block */
+  mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr));
+
+  if (mem == NULL) {
+    jpeg_mem_term(cinfo);	/* system-dependent cleanup */
+    ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0);
+  }
+
+  /* OK, fill in the method pointers */
+  mem->pub.alloc_small = alloc_small;
+  mem->pub.alloc_large = alloc_large;
+  mem->pub.alloc_sarray = alloc_sarray;
+  mem->pub.alloc_barray = alloc_barray;
+  mem->pub.request_virt_sarray = request_virt_sarray;
+  mem->pub.request_virt_barray = request_virt_barray;
+  mem->pub.realize_virt_arrays = realize_virt_arrays;
+  mem->pub.access_virt_sarray = access_virt_sarray;
+  mem->pub.access_virt_barray = access_virt_barray;
+  mem->pub.free_pool = free_pool;
+  mem->pub.self_destruct = self_destruct;
+
+  /* Make MAX_ALLOC_CHUNK accessible to other modules */
+  mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK;
+
+  /* Initialize working state */
+  mem->pub.max_memory_to_use = max_to_use;
+
+  for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) {
+    mem->small_list[pool] = NULL;
+    mem->large_list[pool] = NULL;
+  }
+  mem->virt_sarray_list = NULL;
+  mem->virt_barray_list = NULL;
+
+  mem->total_space_allocated = SIZEOF(my_memory_mgr);
+
+  /* Declare ourselves open for business */
+  cinfo->mem = & mem->pub;
+
+  /* Check for an environment variable JPEGMEM; if found, override the
+   * default max_memory setting from jpeg_mem_init.  Note that the
+   * surrounding application may again override this value.
+   * If your system doesn't support getenv(), define NO_GETENV to disable
+   * this feature.
+   */
+#ifndef NO_GETENV
+  { char * memenv;
+
+    if ((memenv = getenv("JPEGMEM")) != NULL) {
+      char ch = 'x';
+
+      if (sscanf(memenv, "%ld%c", &max_to_use, &ch) > 0) {
+	if (ch == 'm' || ch == 'M')
+	  max_to_use *= 1000L;
+	mem->pub.max_memory_to_use = max_to_use * 1000L;
+      }
+    }
+  }
+#endif
+
+}
diff --git a/samples/jpeglib/jmemnobs.c b/samples/jpeglib/jmemnobs.c
new file mode 100644
index 0000000..eb8c337
--- /dev/null
+++ b/samples/jpeglib/jmemnobs.c
@@ -0,0 +1,109 @@
+/*
+ * jmemnobs.c
+ *
+ * Copyright (C) 1992-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file provides a really simple implementation of the system-
+ * dependent portion of the JPEG memory manager.  This implementation
+ * assumes that no backing-store files are needed: all required space
+ * can be obtained from malloc().
+ * This is very portable in the sense that it'll compile on almost anything,
+ * but you'd better have lots of main memory (or virtual memory) if you want
+ * to process big images.
+ * Note that the max_memory_to_use option is ignored by this implementation.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jmemsys.h"		/* import the system-dependent declarations */
+
+#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare malloc(),free() */
+extern void * malloc JPP((size_t size));
+extern void free JPP((void *ptr));
+#endif
+
+
+/*
+ * Memory allocation and freeing are controlled by the regular library
+ * routines malloc() and free().
+ */
+
+GLOBAL(void *)
+jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
+{
+  return (void *) malloc(sizeofobject);
+}
+
+GLOBAL(void)
+jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
+{
+  free(object);
+}
+
+
+/*
+ * "Large" objects are treated the same as "small" ones.
+ * NB: although we include FAR keywords in the routine declarations,
+ * this file won't actually work in 80x86 small/medium model; at least,
+ * you probably won't be able to process useful-size images in only 64KB.
+ */
+
+GLOBAL(void FAR *)
+jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
+{
+  return (void FAR *) malloc(sizeofobject);
+}
+
+GLOBAL(void)
+jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
+{
+  free(object);
+}
+
+
+/*
+ * This routine computes the total memory space available for allocation.
+ * Here we always say, "we got all you want bud!"
+ */
+
+GLOBAL(long)
+jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
+		    long max_bytes_needed, long already_allocated)
+{
+  return max_bytes_needed;
+}
+
+
+/*
+ * Backing store (temporary file) management.
+ * Since jpeg_mem_available always promised the moon,
+ * this should never be called and we can just error out.
+ */
+
+GLOBAL(void)
+jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+			 long total_bytes_needed)
+{
+  ERREXIT(cinfo, JERR_NO_BACKING_STORE);
+}
+
+
+/*
+ * These routines take care of any system-dependent initialization and
+ * cleanup required.  Here, there isn't any.
+ */
+
+GLOBAL(long)
+jpeg_mem_init (j_common_ptr cinfo)
+{
+  return 0;			/* just set max_memory_to_use to 0 */
+}
+
+GLOBAL(void)
+jpeg_mem_term (j_common_ptr cinfo)
+{
+  /* no work */
+}
diff --git a/samples/jpeglib/jmemsys.h b/samples/jpeglib/jmemsys.h
new file mode 100644
index 0000000..6c3c6d3
--- /dev/null
+++ b/samples/jpeglib/jmemsys.h
@@ -0,0 +1,198 @@
+/*
+ * jmemsys.h
+ *
+ * Copyright (C) 1992-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This include file defines the interface between the system-independent
+ * and system-dependent portions of the JPEG memory manager.  No other
+ * modules need include it.  (The system-independent portion is jmemmgr.c;
+ * there are several different versions of the system-dependent portion.)
+ *
+ * This file works as-is for the system-dependent memory managers supplied
+ * in the IJG distribution.  You may need to modify it if you write a
+ * custom memory manager.  If system-dependent changes are needed in
+ * this file, the best method is to #ifdef them based on a configuration
+ * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR
+ * and USE_MAC_MEMMGR.
+ */
+
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jpeg_get_small		jGetSmall
+#define jpeg_free_small		jFreeSmall
+#define jpeg_get_large		jGetLarge
+#define jpeg_free_large		jFreeLarge
+#define jpeg_mem_available	jMemAvail
+#define jpeg_open_backing_store	jOpenBackStore
+#define jpeg_mem_init		jMemInit
+#define jpeg_mem_term		jMemTerm
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+
+/*
+ * These two functions are used to allocate and release small chunks of
+ * memory.  (Typically the total amount requested through jpeg_get_small is
+ * no more than 20K or so; this will be requested in chunks of a few K each.)
+ * Behavior should be the same as for the standard library functions malloc
+ * and free; in particular, jpeg_get_small must return NULL on failure.
+ * On most systems, these ARE malloc and free.  jpeg_free_small is passed the
+ * size of the object being freed, just in case it's needed.
+ * On an 80x86 machine using small-data memory model, these manage near heap.
+ */
+
+EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject));
+EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,
+				  size_t sizeofobject));
+
+/*
+ * These two functions are used to allocate and release large chunks of
+ * memory (up to the total free space designated by jpeg_mem_available).
+ * The interface is the same as above, except that on an 80x86 machine,
+ * far pointers are used.  On most other machines these are identical to
+ * the jpeg_get/free_small routines; but we keep them separate anyway,
+ * in case a different allocation strategy is desirable for large chunks.
+ */
+
+EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo,
+				       size_t sizeofobject));
+EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
+				  size_t sizeofobject));
+
+/*
+ * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may
+ * be requested in a single call to jpeg_get_large (and jpeg_get_small for that
+ * matter, but that case should never come into play).  This macro is needed
+ * to model the 64Kb-segment-size limit of far addressing on 80x86 machines.
+ * On those machines, we expect that jconfig.h will provide a proper value.
+ * On machines with 32-bit flat address spaces, any large constant may be used.
+ *
+ * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type
+ * size_t and will be a multiple of sizeof(align_type).
+ */
+
+#ifndef MAX_ALLOC_CHUNK		/* may be overridden in jconfig.h */
+#define MAX_ALLOC_CHUNK  1000000000L
+#endif
+
+/*
+ * This routine computes the total space still available for allocation by
+ * jpeg_get_large.  If more space than this is needed, backing store will be
+ * used.  NOTE: any memory already allocated must not be counted.
+ *
+ * There is a minimum space requirement, corresponding to the minimum
+ * feasible buffer sizes; jmemmgr.c will request that much space even if
+ * jpeg_mem_available returns zero.  The maximum space needed, enough to hold
+ * all working storage in memory, is also passed in case it is useful.
+ * Finally, the total space already allocated is passed.  If no better
+ * method is available, cinfo->mem->max_memory_to_use - already_allocated
+ * is often a suitable calculation.
+ *
+ * It is OK for jpeg_mem_available to underestimate the space available
+ * (that'll just lead to more backing-store access than is really necessary).
+ * However, an overestimate will lead to failure.  Hence it's wise to subtract
+ * a slop factor from the true available space.  5% should be enough.
+ *
+ * On machines with lots of virtual memory, any large constant may be returned.
+ * Conversely, zero may be returned to always use the minimum amount of memory.
+ */
+
+EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,
+				     long min_bytes_needed,
+				     long max_bytes_needed,
+				     long already_allocated));
+
+
+/*
+ * This structure holds whatever state is needed to access a single
+ * backing-store object.  The read/write/close method pointers are called
+ * by jmemmgr.c to manipulate the backing-store object; all other fields
+ * are private to the system-dependent backing store routines.
+ */
+
+#define TEMP_NAME_LENGTH   64	/* max length of a temporary file's name */
+
+
+#ifdef USE_MSDOS_MEMMGR		/* DOS-specific junk */
+
+typedef unsigned short XMSH;	/* type of extended-memory handles */
+typedef unsigned short EMSH;	/* type of expanded-memory handles */
+
+typedef union {
+  short file_handle;		/* DOS file handle if it's a temp file */
+  XMSH xms_handle;		/* handle if it's a chunk of XMS */
+  EMSH ems_handle;		/* handle if it's a chunk of EMS */
+} handle_union;
+
+#endif /* USE_MSDOS_MEMMGR */
+
+#ifdef USE_MAC_MEMMGR		/* Mac-specific junk */
+#include <Files.h>
+#endif /* USE_MAC_MEMMGR */
+
+
+typedef struct backing_store_struct * backing_store_ptr;
+
+typedef struct backing_store_struct {
+  /* Methods for reading/writing/closing this backing-store object */
+  JMETHOD(void, read_backing_store, (j_common_ptr cinfo,
+				     backing_store_ptr info,
+				     void FAR * buffer_address,
+				     long file_offset, long byte_count));
+  JMETHOD(void, write_backing_store, (j_common_ptr cinfo,
+				      backing_store_ptr info,
+				      void FAR * buffer_address,
+				      long file_offset, long byte_count));
+  JMETHOD(void, close_backing_store, (j_common_ptr cinfo,
+				      backing_store_ptr info));
+
+  /* Private fields for system-dependent backing-store management */
+#ifdef USE_MSDOS_MEMMGR
+  /* For the MS-DOS manager (jmemdos.c), we need: */
+  handle_union handle;		/* reference to backing-store storage object */
+  char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
+#else
+#ifdef USE_MAC_MEMMGR
+  /* For the Mac manager (jmemmac.c), we need: */
+  short temp_file;		/* file reference number to temp file */
+  FSSpec tempSpec;		/* the FSSpec for the temp file */
+  char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
+#else
+  /* For a typical implementation with temp files, we need: */
+  FILE * temp_file;		/* stdio reference to temp file */
+  char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */
+#endif
+#endif
+} backing_store_info;
+
+
+/*
+ * Initial opening of a backing-store object.  This must fill in the
+ * read/write/close pointers in the object.  The read/write routines
+ * may take an error exit if the specified maximum file size is exceeded.
+ * (If jpeg_mem_available always returns a large value, this routine can
+ * just take an error exit.)
+ */
+
+EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,
+					  backing_store_ptr info,
+					  long total_bytes_needed));
+
+
+/*
+ * These routines take care of any system-dependent initialization and
+ * cleanup required.  jpeg_mem_init will be called before anything is
+ * allocated (and, therefore, nothing in cinfo is of use except the error
+ * manager pointer).  It should return a suitable default value for
+ * max_memory_to_use; this may subsequently be overridden by the surrounding
+ * application.  (Note that max_memory_to_use is only important if
+ * jpeg_mem_available chooses to consult it ... no one else will.)
+ * jpeg_mem_term may assume that all requested memory has been freed and that
+ * all opened backing-store objects have been closed.
+ */
+
+EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));
+EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));
diff --git a/samples/jpeglib/jmorecfg.h b/samples/jpeglib/jmorecfg.h
new file mode 100644
index 0000000..6e2f37e
--- /dev/null
+++ b/samples/jpeglib/jmorecfg.h
@@ -0,0 +1,362 @@
+/*
+ * jmorecfg.h
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains additional configuration options that customize the
+ * JPEG software for special applications or support machine-dependent
+ * optimizations.  Most users will not need to touch this file.
+ */
+
+
+/*
+ * Define BITS_IN_JSAMPLE as either
+ *   8   for 8-bit sample values (the usual setting)
+ *   12  for 12-bit sample values
+ * Only 8 and 12 are legal data precisions for lossy JPEG according to the
+ * JPEG standard, and the IJG code does not support anything else!
+ * We do not support run-time selection of data precision, sorry.
+ */
+
+#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
+
+
+/*
+ * Maximum number of components (color channels) allowed in JPEG image.
+ * To meet the letter of the JPEG spec, set this to 255.  However, darn
+ * few applications need more than 4 channels (maybe 5 for CMYK + alpha
+ * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
+ * really short on memory.  (Each allowed component costs a hundred or so
+ * bytes of storage, whether actually used in an image or not.)
+ */
+
+#define MAX_COMPONENTS  10	/* maximum number of image components */
+
+
+/*
+ * Basic data types.
+ * You may need to change these if you have a machine with unusual data
+ * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
+ * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
+ * but it had better be at least 16.
+ */
+
+/* Representation of a single sample (pixel element value).
+ * We frequently allocate large arrays of these, so it's important to keep
+ * them small.  But if you have memory to burn and access to char or short
+ * arrays is very slow on your hardware, you might want to change these.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+/* JSAMPLE should be the smallest type that will hold the values 0..255.
+ * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JSAMPLE;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJSAMPLE(value)  ((int) (value))
+#else
+#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+#define MAXJSAMPLE	255
+#define CENTERJSAMPLE	128
+
+#endif /* BITS_IN_JSAMPLE == 8 */
+
+
+#if BITS_IN_JSAMPLE == 12
+/* JSAMPLE should be the smallest type that will hold the values 0..4095.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE	4095
+#define CENTERJSAMPLE	2048
+
+#endif /* BITS_IN_JSAMPLE == 12 */
+
+
+/* Representation of a DCT frequency coefficient.
+ * This should be a signed value of at least 16 bits; "short" is usually OK.
+ * Again, we allocate large arrays of these, but you can change to int
+ * if you have memory to burn and "short" is really slow.
+ */
+
+typedef short JCOEF;
+
+
+/* Compressed datastreams are represented as arrays of JOCTET.
+ * These must be EXACTLY 8 bits wide, at least once they are written to
+ * external storage.  Note that when using the stdio data source/destination
+ * managers, this is also the data type passed to fread/fwrite.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JOCTET;
+#define GETJOCTET(value)  (value)
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JOCTET;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJOCTET(value)  (value)
+#else
+#define GETJOCTET(value)  ((value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+/* These typedefs are used for various table entries and so forth.
+ * They must be at least as wide as specified; but making them too big
+ * won't cost a huge amount of memory, so we don't provide special
+ * extraction code like we did for JSAMPLE.  (In other words, these
+ * typedefs live at a different point on the speed/space tradeoff curve.)
+ */
+
+/* UINT8 must hold at least the values 0..255. */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char UINT8;
+#elif defined(CHAR_IS_UNSIGNED)
+typedef char UINT8;
+#else /* not CHAR_IS_UNSIGNED */
+typedef short UINT8;
+#endif /* CHAR_IS_UNSIGNED */
+
+/* UINT16 must hold at least the values 0..65535. */
+
+#ifdef HAVE_UNSIGNED_SHORT
+typedef unsigned short UINT16;
+#else /* not HAVE_UNSIGNED_SHORT */
+typedef unsigned int UINT16;
+#endif /* HAVE_UNSIGNED_SHORT */
+
+/* INT16 must hold at least the values -32768..32767. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
+typedef short INT16;
+#endif
+
+/* INT32 must hold at least signed 32-bit values. */
+
+#if !defined(XMD_H) && !defined(_WIN32)			/* X11/xmd.h correctly defines INT32 */
+typedef long INT32;
+#endif
+
+/* Datatype used for image dimensions.  The JPEG standard only supports
+ * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
+ * "unsigned int" is sufficient on all machines.  However, if you need to
+ * handle larger images and you don't mind deviating from the spec, you
+ * can change this datatype.
+ */
+
+typedef unsigned int JDIMENSION;
+
+#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
+
+
+/* These macros are used in all function definitions and extern declarations.
+ * You could modify them if you need to change function linkage conventions;
+ * in particular, you'll need to do that to make the library a Windows DLL.
+ * Another application is to make all functions global for use with debuggers
+ * or code profilers that require it.
+ */
+
+/* a function called through method pointers: */
+#define METHODDEF(type)		static type
+/* a function used only in its module: */
+#define LOCAL(type)		static type
+/* a function referenced thru EXTERNs: */
+#define GLOBAL(type)		type
+/* a reference to a GLOBAL function: */
+#define EXTERN(type)		extern type
+
+
+/* This macro is used to declare a "method", that is, a function pointer.
+ * We want to supply prototype parameters if the compiler can cope.
+ * Note that the arglist parameter must be parenthesized!
+ * Again, you can customize this if you need special linkage keywords.
+ */
+
+#ifdef HAVE_PROTOTYPES
+#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
+#else
+#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
+#endif
+
+
+/* Here is the pseudo-keyword for declaring pointers that must be "far"
+ * on 80x86 machines.  Most of the specialized coding for 80x86 is handled
+ * by just saying "FAR *" where such a pointer is needed.  In a few places
+ * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
+ */
+
+#ifndef FAR
+#ifdef NEED_FAR_POINTERS
+#define FAR  far
+#else
+#define FAR
+#endif
+#endif
+
+/*
+ * On a few systems, type boolean and/or its values FALSE, TRUE may appear
+ * in standard header files.  Or you may have conflicts with application-
+ * specific header files that you want to include together with these files.
+ * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
+ */
+
+#ifndef HAVE_BOOLEAN
+typedef int boolean;
+#endif
+#ifndef FALSE			/* in case these macros already exist */
+#define FALSE	0		/* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE	1
+#endif
+
+
+/*
+ * The remaining options affect code selection within the JPEG library,
+ * but they don't need to be visible to most applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
+ */
+
+#ifdef JPEG_INTERNALS
+#define JPEG_INTERNAL_OPTIONS
+#endif
+
+#ifdef JPEG_INTERNAL_OPTIONS
+
+
+/*
+ * These defines indicate whether to include various optional functions.
+ * Undefining some of these symbols will produce a smaller but less capable
+ * library.  Note that you can leave certain source files out of the
+ * compilation/linking process if you've #undef'd the corresponding symbols.
+ * (You may HAVE to do that if your compiler doesn't like null source files.)
+ */
+
+/* Arithmetic coding is unsupported for legal reasons.  Complaints to IBM. */
+
+/* Capability options common to encoder and decoder: */
+
+#define DCT_ISLOW_SUPPORTED	/* slow but accurate integer algorithm */
+#define DCT_IFAST_SUPPORTED	/* faster, less accurate integer method */
+#define DCT_FLOAT_SUPPORTED	/* floating-point: accurate, fast on fast HW */
+
+/* Encoder capability options: */
+
+#undef  C_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
+/* Note: if you selected 12-bit data precision, it is dangerous to turn off
+ * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
+ * precision, so jchuff.c normally uses entropy optimization to compute
+ * usable tables for higher precision.  If you don't want to do optimization,
+ * you'll have to supply different default Huffman tables.
+ * The exact same statements apply for progressive JPEG: the default tables
+ * don't work for progressive mode.  (This may get fixed, however.)
+ */
+#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
+
+/* Decoder capability options: */
+
+#undef  D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define SAVE_MARKERS_SUPPORTED	    /* jpeg_save_markers() needed? */
+#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
+#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
+#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
+#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
+#define QUANT_1PASS_SUPPORTED	    /* 1-pass color quantization? */
+#define QUANT_2PASS_SUPPORTED	    /* 2-pass color quantization? */
+
+/* more capability options later, no doubt */
+
+
+/*
+ * Ordering of RGB data in scanlines passed to or from the application.
+ * If your application wants to deal with data in the order B,G,R, just
+ * change these macros.  You can also deal with formats such as R,G,B,X
+ * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
+ * the offsets will also change the order in which colormap data is organized.
+ * RESTRICTIONS:
+ * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
+ * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
+ *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
+ * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
+ *    is not 3 (they don't understand about dummy color components!).  So you
+ *    can't use color quantization if you change that value.
+ */
+
+#define RGB_RED		0	/* Offset of Red in an RGB scanline element */
+#define RGB_GREEN	1	/* Offset of Green */
+#define RGB_BLUE	2	/* Offset of Blue */
+#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */
+
+
+/* Definitions for speed-related optimizations. */
+
+
+/* If your compiler supports inline functions, define INLINE
+ * as the inline keyword; otherwise define it as empty.
+ */
+
+#ifndef INLINE
+#ifdef __GNUC__			/* for instance, GNU C knows about inline */
+#define INLINE __inline__
+#endif
+#ifndef INLINE
+#define INLINE			/* default is to define it as empty */
+#endif
+#endif
+
+
+/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
+ * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
+ * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
+ */
+
+#ifndef MULTIPLIER
+#define MULTIPLIER  int		/* type for fastest integer multiply */
+#endif
+
+
+/* FAST_FLOAT should be either float or double, whichever is done faster
+ * by your compiler.  (Note that this type is only used in the floating point
+ * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
+ * Typically, float is faster in ANSI C compilers, while double is faster in
+ * pre-ANSI compilers (because they insist on converting to double anyway).
+ * The code below therefore chooses float if we have ANSI-style prototypes.
+ */
+
+#ifndef FAST_FLOAT
+#ifdef HAVE_PROTOTYPES
+#define FAST_FLOAT  float
+#else
+#define FAST_FLOAT  double
+#endif
+#endif
+
+#endif /* JPEG_INTERNAL_OPTIONS */
diff --git a/samples/jpeglib/jpegint.h b/samples/jpeglib/jpegint.h
new file mode 100644
index 0000000..95b00d4
--- /dev/null
+++ b/samples/jpeglib/jpegint.h
@@ -0,0 +1,392 @@
+/*
+ * jpegint.h
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file provides common declarations for the various JPEG modules.
+ * These declarations are considered internal to the JPEG library; most
+ * applications using the library shouldn't need to include this file.
+ */
+
+
+/* Declarations for both compression & decompression */
+
+typedef enum {			/* Operating modes for buffer controllers */
+	JBUF_PASS_THRU,		/* Plain stripwise operation */
+	/* Remaining modes require a full-image buffer to have been created */
+	JBUF_SAVE_SOURCE,	/* Run source subobject only, save output */
+	JBUF_CRANK_DEST,	/* Run dest subobject only, using saved data */
+	JBUF_SAVE_AND_PASS	/* Run both subobjects, save output */
+} J_BUF_MODE;
+
+/* Values of global_state field (jdapi.c has some dependencies on ordering!) */
+#define CSTATE_START	100	/* after create_compress */
+#define CSTATE_SCANNING	101	/* start_compress done, write_scanlines OK */
+#define CSTATE_RAW_OK	102	/* start_compress done, write_raw_data OK */
+#define CSTATE_WRCOEFS	103	/* jpeg_write_coefficients done */
+#define DSTATE_START	200	/* after create_decompress */
+#define DSTATE_INHEADER	201	/* reading header markers, no SOS yet */
+#define DSTATE_READY	202	/* found SOS, ready for start_decompress */
+#define DSTATE_PRELOAD	203	/* reading multiscan file in start_decompress*/
+#define DSTATE_PRESCAN	204	/* performing dummy pass for 2-pass quant */
+#define DSTATE_SCANNING	205	/* start_decompress done, read_scanlines OK */
+#define DSTATE_RAW_OK	206	/* start_decompress done, read_raw_data OK */
+#define DSTATE_BUFIMAGE	207	/* expecting jpeg_start_output */
+#define DSTATE_BUFPOST	208	/* looking for SOS/EOI in jpeg_finish_output */
+#define DSTATE_RDCOEFS	209	/* reading file in jpeg_read_coefficients */
+#define DSTATE_STOPPING	210	/* looking for EOI in jpeg_finish_decompress */
+
+
+/* Declarations for compression modules */
+
+/* Master control module */
+struct jpeg_comp_master {
+  JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, pass_startup, (j_compress_ptr cinfo));
+  JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
+
+  /* State variables made visible to other modules */
+  boolean call_pass_startup;	/* True if pass_startup must be called */
+  boolean is_last_pass;		/* True during last pass */
+};
+
+/* Main buffer control (downsampled-data buffer) */
+struct jpeg_c_main_controller {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, process_data, (j_compress_ptr cinfo,
+			       JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
+			       JDIMENSION in_rows_avail));
+};
+
+/* Compression preprocessing (downsampling input buffer control) */
+struct jpeg_c_prep_controller {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,
+				   JSAMPARRAY input_buf,
+				   JDIMENSION *in_row_ctr,
+				   JDIMENSION in_rows_avail,
+				   JSAMPIMAGE output_buf,
+				   JDIMENSION *out_row_group_ctr,
+				   JDIMENSION out_row_groups_avail));
+};
+
+/* Coefficient buffer control */
+struct jpeg_c_coef_controller {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
+				   JSAMPIMAGE input_buf));
+};
+
+/* Colorspace conversion */
+struct jpeg_color_converter {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, color_convert, (j_compress_ptr cinfo,
+				JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+				JDIMENSION output_row, int num_rows));
+};
+
+/* Downsampling */
+struct jpeg_downsampler {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, downsample, (j_compress_ptr cinfo,
+			     JSAMPIMAGE input_buf, JDIMENSION in_row_index,
+			     JSAMPIMAGE output_buf,
+			     JDIMENSION out_row_group_index));
+
+  boolean need_context_rows;	/* TRUE if need rows above & below */
+};
+
+/* Forward DCT (also controls coefficient quantization) */
+struct jpeg_forward_dct {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
+  /* perhaps this should be an array??? */
+  JMETHOD(void, forward_DCT, (j_compress_ptr cinfo,
+			      jpeg_component_info * compptr,
+			      JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
+			      JDIMENSION start_row, JDIMENSION start_col,
+			      JDIMENSION num_blocks));
+};
+
+/* Entropy encoding */
+struct jpeg_entropy_encoder {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
+  JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
+  JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
+};
+
+/* Marker writing */
+struct jpeg_marker_writer {
+  JMETHOD(void, write_file_header, (j_compress_ptr cinfo));
+  JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));
+  JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));
+  JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));
+  JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));
+  /* These routines are exported to allow insertion of extra markers */
+  /* Probably only COM and APPn markers should be written this way */
+  JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
+				      unsigned int datalen));
+  JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
+};
+
+
+/* Declarations for decompression modules */
+
+/* Master control module */
+struct jpeg_decomp_master {
+  JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
+
+  /* State variables made visible to other modules */
+  boolean is_dummy_pass;	/* True during 1st pass for 2-pass quant */
+};
+
+/* Input control module */
+struct jpeg_input_controller {
+  JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
+  JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
+  JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
+
+  /* State variables made visible to other modules */
+  boolean has_multiple_scans;	/* True if file has multiple scans */
+  boolean eoi_reached;		/* True when EOI has been consumed */
+};
+
+/* Main buffer control (downsampled-data buffer) */
+struct jpeg_d_main_controller {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, process_data, (j_decompress_ptr cinfo,
+			       JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+			       JDIMENSION out_rows_avail));
+};
+
+/* Coefficient buffer control */
+struct jpeg_d_coef_controller {
+  JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
+  JMETHOD(int, consume_data, (j_decompress_ptr cinfo));
+  JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));
+  JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,
+				 JSAMPIMAGE output_buf));
+  /* Pointer to array of coefficient virtual arrays, or NULL if none */
+  jvirt_barray_ptr *coef_arrays;
+};
+
+/* Decompression postprocessing (color quantization buffer control) */
+struct jpeg_d_post_controller {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,
+				    JSAMPIMAGE input_buf,
+				    JDIMENSION *in_row_group_ctr,
+				    JDIMENSION in_row_groups_avail,
+				    JSAMPARRAY output_buf,
+				    JDIMENSION *out_row_ctr,
+				    JDIMENSION out_rows_avail));
+};
+
+/* Marker reading & parsing */
+struct jpeg_marker_reader {
+  JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
+  /* Read markers until SOS or EOI.
+   * Returns same codes as are defined for jpeg_consume_input:
+   * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
+   */
+  JMETHOD(int, read_markers, (j_decompress_ptr cinfo));
+  /* Read a restart marker --- exported for use by entropy decoder only */
+  jpeg_marker_parser_method read_restart_marker;
+
+  /* State of marker reader --- nominally internal, but applications
+   * supplying COM or APPn handlers might like to know the state.
+   */
+  boolean saw_SOI;		/* found SOI? */
+  boolean saw_SOF;		/* found SOF? */
+  int next_restart_num;		/* next restart number expected (0-7) */
+  unsigned int discarded_bytes;	/* # of bytes skipped looking for a marker */
+};
+
+/* Entropy decoding */
+struct jpeg_entropy_decoder {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
+				JBLOCKROW *MCU_data));
+
+  /* This is here to share code between baseline and progressive decoders; */
+  /* other modules probably should not use it */
+  boolean insufficient_data;	/* set TRUE after emitting warning */
+};
+
+/* Inverse DCT (also performs dequantization) */
+typedef JMETHOD(void, inverse_DCT_method_ptr,
+		(j_decompress_ptr cinfo, jpeg_component_info * compptr,
+		 JCOEFPTR coef_block,
+		 JSAMPARRAY output_buf, JDIMENSION output_col));
+
+struct jpeg_inverse_dct {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  /* It is useful to allow each component to have a separate IDCT method. */
+  inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
+};
+
+/* Upsampling (note that upsampler must also call color converter) */
+struct jpeg_upsampler {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, upsample, (j_decompress_ptr cinfo,
+			   JSAMPIMAGE input_buf,
+			   JDIMENSION *in_row_group_ctr,
+			   JDIMENSION in_row_groups_avail,
+			   JSAMPARRAY output_buf,
+			   JDIMENSION *out_row_ctr,
+			   JDIMENSION out_rows_avail));
+
+  boolean need_context_rows;	/* TRUE if need rows above & below */
+};
+
+/* Colorspace conversion */
+struct jpeg_color_deconverter {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
+				JSAMPIMAGE input_buf, JDIMENSION input_row,
+				JSAMPARRAY output_buf, int num_rows));
+};
+
+/* Color quantization or color precision reduction */
+struct jpeg_color_quantizer {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
+  JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
+				 JSAMPARRAY input_buf, JSAMPARRAY output_buf,
+				 int num_rows));
+  JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
+};
+
+
+/* Miscellaneous useful macros */
+
+#undef MAX
+#define MAX(a,b)	((a) > (b) ? (a) : (b))
+#undef MIN
+#define MIN(a,b)	((a) < (b) ? (a) : (b))
+
+
+/* We assume that right shift corresponds to signed division by 2 with
+ * rounding towards minus infinity.  This is correct for typical "arithmetic
+ * shift" instructions that shift in copies of the sign bit.  But some
+ * C compilers implement >> with an unsigned shift.  For these machines you
+ * must define RIGHT_SHIFT_IS_UNSIGNED.
+ * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
+ * It is only applied with constant shift counts.  SHIFT_TEMPS must be
+ * included in the variables of any routine using RIGHT_SHIFT.
+ */
+
+#ifdef RIGHT_SHIFT_IS_UNSIGNED
+#define SHIFT_TEMPS	INT32 shift_temp;
+#define RIGHT_SHIFT(x,shft)  \
+	((shift_temp = (x)) < 0 ? \
+	 (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
+	 (shift_temp >> (shft)))
+#else
+#define SHIFT_TEMPS
+#define RIGHT_SHIFT(x,shft)	((x) >> (shft))
+#endif
+
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jinit_compress_master	jICompress
+#define jinit_c_master_control	jICMaster
+#define jinit_c_main_controller	jICMainC
+#define jinit_c_prep_controller	jICPrepC
+#define jinit_c_coef_controller	jICCoefC
+#define jinit_color_converter	jICColor
+#define jinit_downsampler	jIDownsampler
+#define jinit_forward_dct	jIFDCT
+#define jinit_huff_encoder	jIHEncoder
+#define jinit_phuff_encoder	jIPHEncoder
+#define jinit_marker_writer	jIMWriter
+#define jinit_master_decompress	jIDMaster
+#define jinit_d_main_controller	jIDMainC
+#define jinit_d_coef_controller	jIDCoefC
+#define jinit_d_post_controller	jIDPostC
+#define jinit_input_controller	jIInCtlr
+#define jinit_marker_reader	jIMReader
+#define jinit_huff_decoder	jIHDecoder
+#define jinit_phuff_decoder	jIPHDecoder
+#define jinit_inverse_dct	jIIDCT
+#define jinit_upsampler		jIUpsampler
+#define jinit_color_deconverter	jIDColor
+#define jinit_1pass_quantizer	jI1Quant
+#define jinit_2pass_quantizer	jI2Quant
+#define jinit_merged_upsampler	jIMUpsampler
+#define jinit_memory_mgr	jIMemMgr
+#define jdiv_round_up		jDivRound
+#define jround_up		jRound
+#define jcopy_sample_rows	jCopySamples
+#define jcopy_block_row		jCopyBlocks
+#define jzero_far		jZeroFar
+#define jpeg_zigzag_order	jZIGTable
+#define jpeg_natural_order	jZAGTable
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+
+/* Compression module initialization routines */
+EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
+					 boolean transcode_only));
+EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
+/* Decompression module initialization routines */
+EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));
+/* Memory manager initialization */
+EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
+
+/* Utility routines in jutils.c */
+EXTERN(long) jdiv_round_up JPP((long a, long b));
+EXTERN(long) jround_up JPP((long a, long b));
+EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
+				    JSAMPARRAY output_array, int dest_row,
+				    int num_rows, JDIMENSION num_cols));
+EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
+				  JDIMENSION num_blocks));
+EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
+/* Constant tables in jutils.c */
+#if 0				/* This table is not actually needed in v6a */
+extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
+#endif
+extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
+
+/* Suppress undefined-structure complaints if necessary. */
+
+#ifdef INCOMPLETE_TYPES_BROKEN
+#ifndef AM_MEMORY_MANAGER	/* only jmemmgr.c defines these */
+struct jvirt_sarray_control { long dummy; };
+struct jvirt_barray_control { long dummy; };
+#endif
+#endif /* INCOMPLETE_TYPES_BROKEN */
diff --git a/samples/jpeglib/jpeglib.h b/samples/jpeglib/jpeglib.h
new file mode 100644
index 0000000..9579cb7
--- /dev/null
+++ b/samples/jpeglib/jpeglib.h
@@ -0,0 +1,1115 @@
+/*
+ * jpeglib.h
+ *
+ * Copyright (C) 1991-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file defines the application interface for the JPEG library.
+ * Most applications using the library need only include this file,
+ * and perhaps jerror.h if they want to know the exact error codes.
+ */
+
+#ifndef JPEGLIB_H
+#define JPEGLIB_H
+/*
+ * First we include the configuration files that record how this
+ * installation of the JPEG library is set up.  jconfig.h can be
+ * generated automatically for many systems.  jmorecfg.h contains
+ * manual configuration options that most people need not worry about.
+ */
+
+/* 
+ * Added by EK to make it explicit that this is a C library, not a C++
+ * library
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef JCONFIG_INCLUDED	/* in case jinclude.h already did */
+#include "jconfig.h"		/* widely used configuration options */
+#endif
+#include "jmorecfg.h"		/* seldom changed options */
+
+
+#ifdef _WIN32
+#include <windows.h>
+#include <stdio.h>
+#include <io.h>
+#endif
+
+
+/* Version ID for the JPEG library.
+ * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
+ */
+
+#define JPEG_LIB_VERSION  62	/* Version 6b */
+
+
+/* Various constants determining the sizes of things.
+ * All of these are specified by the JPEG standard, so don't change them
+ * if you want to be compatible.
+ */
+
+#define DCTSIZE		    8	/* The basic DCT block is 8x8 samples */
+#define DCTSIZE2	    64	/* DCTSIZE squared; # of elements in a block */
+#define NUM_QUANT_TBLS      4	/* Quantization tables are numbered 0..3 */
+#define NUM_HUFF_TBLS       4	/* Huffman tables are numbered 0..3 */
+#define NUM_ARITH_TBLS      16	/* Arith-coding tables are numbered 0..15 */
+#define MAX_COMPS_IN_SCAN   4	/* JPEG limit on # of components in one scan */
+#define MAX_SAMP_FACTOR     4	/* JPEG limit on sampling factors */
+/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard;
+ * the PostScript DCT filter can emit files with many more than 10 blocks/MCU.
+ * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU
+ * to handle it.  We even let you do this from the jconfig.h file.  However,
+ * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe
+ * sometimes emits noncompliant files doesn't mean you should too.
+ */
+#define C_MAX_BLOCKS_IN_MCU   10 /* compressor's limit on blocks per MCU */
+#ifndef D_MAX_BLOCKS_IN_MCU
+#define D_MAX_BLOCKS_IN_MCU   10 /* decompressor's limit on blocks per MCU */
+#endif
+
+
+/* Data structures for images (arrays of samples and of DCT coefficients).
+ * On 80x86 machines, the image arrays are too big for near pointers,
+ * but the pointer arrays can fit in near memory.
+ */
+
+typedef JSAMPLE FAR *JSAMPROW;	/* ptr to one image row of pixel samples. */
+typedef JSAMPROW *JSAMPARRAY;	/* ptr to some rows (a 2-D sample array) */
+typedef JSAMPARRAY *JSAMPIMAGE;	/* a 3-D sample array: top index is color */
+
+typedef JCOEF JBLOCK[DCTSIZE2];	/* one block of coefficients */
+typedef JBLOCK FAR *JBLOCKROW;	/* pointer to one row of coefficient blocks */
+typedef JBLOCKROW *JBLOCKARRAY;		/* a 2-D array of coefficient blocks */
+typedef JBLOCKARRAY *JBLOCKIMAGE;	/* a 3-D array of coefficient blocks */
+
+typedef JCOEF FAR *JCOEFPTR;	/* useful in a couple of places */
+
+
+/* Types for JPEG compression parameters and working tables. */
+
+
+/* DCT coefficient quantization tables. */
+
+typedef struct {
+  /* This array gives the coefficient quantizers in natural array order
+   * (not the zigzag order in which they are stored in a JPEG DQT marker).
+   * CAUTION: IJG versions prior to v6a kept this array in zigzag order.
+   */
+  UINT16 quantval[DCTSIZE2];	/* quantization step for each coefficient */
+  /* This field is used only during compression.  It's initialized FALSE when
+   * the table is created, and set TRUE when it's been output to the file.
+   * You could suppress output of a table by setting this to TRUE.
+   * (See jpeg_suppress_tables for an example.)
+   */
+  boolean sent_table;		/* TRUE when table has been output */
+} JQUANT_TBL;
+
+
+/* Huffman coding tables. */
+
+typedef struct {
+  /* These two fields directly represent the contents of a JPEG DHT marker */
+  UINT8 bits[17];		/* bits[k] = # of symbols with codes of */
+				/* length k bits; bits[0] is unused */
+  UINT8 huffval[256];		/* The symbols, in order of incr code length */
+  /* This field is used only during compression.  It's initialized FALSE when
+   * the table is created, and set TRUE when it's been output to the file.
+   * You could suppress output of a table by setting this to TRUE.
+   * (See jpeg_suppress_tables for an example.)
+   */
+  boolean sent_table;		/* TRUE when table has been output */
+} JHUFF_TBL;
+
+
+/* Basic info about one component (color channel). */
+
+typedef struct {
+  /* These values are fixed over the whole image. */
+  /* For compression, they must be supplied by parameter setup; */
+  /* for decompression, they are read from the SOF marker. */
+  int component_id;		/* identifier for this component (0..255) */
+  int component_index;		/* its index in SOF or cinfo->comp_info[] */
+  int h_samp_factor;		/* horizontal sampling factor (1..4) */
+  int v_samp_factor;		/* vertical sampling factor (1..4) */
+  int quant_tbl_no;		/* quantization table selector (0..3) */
+  /* These values may vary between scans. */
+  /* For compression, they must be supplied by parameter setup; */
+  /* for decompression, they are read from the SOS marker. */
+  /* The decompressor output side may not use these variables. */
+  int dc_tbl_no;		/* DC entropy table selector (0..3) */
+  int ac_tbl_no;		/* AC entropy table selector (0..3) */
+  
+  /* Remaining fields should be treated as private by applications. */
+  
+  /* These values are computed during compression or decompression startup: */
+  /* Component's size in DCT blocks.
+   * Any dummy blocks added to complete an MCU are not counted; therefore
+   * these values do not depend on whether a scan is interleaved or not.
+   */
+  JDIMENSION width_in_blocks;
+  JDIMENSION height_in_blocks;
+  /* Size of a DCT block in samples.  Always DCTSIZE for compression.
+   * For decompression this is the size of the output from one DCT block,
+   * reflecting any scaling we choose to apply during the IDCT step.
+   * Values of 1,2,4,8 are likely to be supported.  Note that different
+   * components may receive different IDCT scalings.
+   */
+  int DCT_scaled_size;
+  /* The downsampled dimensions are the component's actual, unpadded number
+   * of samples at the main buffer (preprocessing/compression interface), thus
+   * downsampled_width = ceil(image_width * Hi/Hmax)
+   * and similarly for height.  For decompression, IDCT scaling is included, so
+   * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE)
+   */
+  JDIMENSION downsampled_width;	 /* actual width in samples */
+  JDIMENSION downsampled_height; /* actual height in samples */
+  /* This flag is used only for decompression.  In cases where some of the
+   * components will be ignored (eg grayscale output from YCbCr image),
+   * we can skip most computations for the unused components.
+   */
+  boolean component_needed;	/* do we need the value of this component? */
+
+  /* These values are computed before starting a scan of the component. */
+  /* The decompressor output side may not use these variables. */
+  int MCU_width;		/* number of blocks per MCU, horizontally */
+  int MCU_height;		/* number of blocks per MCU, vertically */
+  int MCU_blocks;		/* MCU_width * MCU_height */
+  int MCU_sample_width;		/* MCU width in samples, MCU_width*DCT_scaled_size */
+  int last_col_width;		/* # of non-dummy blocks across in last MCU */
+  int last_row_height;		/* # of non-dummy blocks down in last MCU */
+
+  /* Saved quantization table for component; NULL if none yet saved.
+   * See jdinput.c comments about the need for this information.
+   * This field is currently used only for decompression.
+   */
+  JQUANT_TBL * quant_table;
+
+  /* Private per-component storage for DCT or IDCT subsystem. */
+  void * dct_table;
+} jpeg_component_info;
+
+
+/* The script for encoding a multiple-scan file is an array of these: */
+
+typedef struct {
+  int comps_in_scan;		/* number of components encoded in this scan */
+  int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */
+  int Ss, Se;			/* progressive JPEG spectral selection parms */
+  int Ah, Al;			/* progressive JPEG successive approx. parms */
+} jpeg_scan_info;
+
+/* The decompressor can save APPn and COM markers in a list of these: */
+
+typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr;
+
+struct jpeg_marker_struct {
+  jpeg_saved_marker_ptr next;	/* next in list, or NULL */
+  UINT8 marker;			/* marker code: JPEG_COM, or JPEG_APP0+n */
+  unsigned int original_length;	/* # bytes of data in the file */
+  unsigned int data_length;	/* # bytes of data saved at data[] */
+  JOCTET FAR * data;		/* the data contained in the marker */
+  /* the marker length word is not counted in data_length or original_length */
+};
+
+/* Known color spaces. */
+
+typedef enum {
+	JCS_UNKNOWN,		/* error/unspecified */
+	JCS_GRAYSCALE,		/* monochrome */
+	JCS_RGB,		/* red/green/blue */
+	JCS_YCbCr,		/* Y/Cb/Cr (also known as YUV) */
+	JCS_CMYK,		/* C/M/Y/K */
+	JCS_YCCK		/* Y/Cb/Cr/K */
+} J_COLOR_SPACE;
+
+/* DCT/IDCT algorithm options. */
+
+typedef enum {
+	JDCT_ISLOW,		/* slow but accurate integer algorithm */
+	JDCT_IFAST,		/* faster, less accurate integer method */
+	JDCT_FLOAT		/* floating-point: accurate, fast on fast HW */
+} J_DCT_METHOD;
+
+#ifndef JDCT_DEFAULT		/* may be overridden in jconfig.h */
+#define JDCT_DEFAULT  JDCT_ISLOW
+#endif
+#ifndef JDCT_FASTEST		/* may be overridden in jconfig.h */
+#define JDCT_FASTEST  JDCT_IFAST
+#endif
+
+/* Dithering options for decompression. */
+
+typedef enum {
+	JDITHER_NONE,		/* no dithering */
+	JDITHER_ORDERED,	/* simple ordered dither */
+	JDITHER_FS		/* Floyd-Steinberg error diffusion dither */
+} J_DITHER_MODE;
+
+
+/* Common fields between JPEG compression and decompression master structs. */
+
+#define jpeg_common_fields \
+  struct jpeg_error_mgr * err;	/* Error handler module */\
+  struct jpeg_memory_mgr * mem;	/* Memory manager module */\
+  struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\
+  void * client_data;		/* Available for use by application */\
+  boolean is_decompressor;	/* So common code can tell which is which */\
+  int global_state		/* For checking call sequence validity */
+
+/* Routines that are to be used by both halves of the library are declared
+ * to receive a pointer to this structure.  There are no actual instances of
+ * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct.
+ */
+struct jpeg_common_struct {
+  jpeg_common_fields;		/* Fields common to both master struct types */
+  /* Additional fields follow in an actual jpeg_compress_struct or
+   * jpeg_decompress_struct.  All three structs must agree on these
+   * initial fields!  (This would be a lot cleaner in C++.)
+   */
+};
+
+typedef struct jpeg_common_struct * j_common_ptr;
+typedef struct jpeg_compress_struct * j_compress_ptr;
+typedef struct jpeg_decompress_struct * j_decompress_ptr;
+
+
+/* Master record for a compression instance */
+
+struct jpeg_compress_struct {
+  jpeg_common_fields;		/* Fields shared with jpeg_decompress_struct */
+
+  /* Destination for compressed data */
+  struct jpeg_destination_mgr * dest;
+
+  /* Description of source image --- these fields must be filled in by
+   * outer application before starting compression.  in_color_space must
+   * be correct before you can even call jpeg_set_defaults().
+   */
+
+  JDIMENSION image_width;	/* input image width */
+  JDIMENSION image_height;	/* input image height */
+  int input_components;		/* # of color components in input image */
+  J_COLOR_SPACE in_color_space;	/* colorspace of input image */
+
+  double input_gamma;		/* image gamma of input image */
+
+  /* Compression parameters --- these fields must be set before calling
+   * jpeg_start_compress().  We recommend calling jpeg_set_defaults() to
+   * initialize everything to reasonable defaults, then changing anything
+   * the application specifically wants to change.  That way you won't get
+   * burnt when new parameters are added.  Also note that there are several
+   * helper routines to simplify changing parameters.
+   */
+
+  int data_precision;		/* bits of precision in image data */
+
+  int num_components;		/* # of color components in JPEG image */
+  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
+
+  jpeg_component_info * comp_info;
+  /* comp_info[i] describes component that appears i'th in SOF */
+  
+  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
+  /* ptrs to coefficient quantization tables, or NULL if not defined */
+  
+  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
+  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
+  /* ptrs to Huffman coding tables, or NULL if not defined */
+  
+  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
+  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
+  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
+
+  int num_scans;		/* # of entries in scan_info array */
+  const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */
+  /* The default value of scan_info is NULL, which causes a single-scan
+   * sequential JPEG file to be emitted.  To create a multi-scan file,
+   * set num_scans and scan_info to point to an array of scan definitions.
+   */
+
+  boolean raw_data_in;		/* TRUE=caller supplies downsampled data */
+  boolean arith_code;		/* TRUE=arithmetic coding, FALSE=Huffman */
+  boolean optimize_coding;	/* TRUE=optimize entropy encoding parms */
+  boolean CCIR601_sampling;	/* TRUE=first samples are cosited */
+  int smoothing_factor;		/* 1..100, or 0 for no input smoothing */
+  J_DCT_METHOD dct_method;	/* DCT algorithm selector */
+
+  /* The restart interval can be specified in absolute MCUs by setting
+   * restart_interval, or in MCU rows by setting restart_in_rows
+   * (in which case the correct restart_interval will be figured
+   * for each scan).
+   */
+  unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */
+  int restart_in_rows;		/* if > 0, MCU rows per restart interval */
+
+  /* Parameters controlling emission of special markers. */
+
+  boolean write_JFIF_header;	/* should a JFIF marker be written? */
+  UINT8 JFIF_major_version;	/* What to write for the JFIF version number */
+  UINT8 JFIF_minor_version;
+  /* These three values are not used by the JPEG code, merely copied */
+  /* into the JFIF APP0 marker.  density_unit can be 0 for unknown, */
+  /* 1 for dots/inch, or 2 for dots/cm.  Note that the pixel aspect */
+  /* ratio is defined by X_density/Y_density even when density_unit=0. */
+  UINT8 density_unit;		/* JFIF code for pixel size units */
+  UINT16 X_density;		/* Horizontal pixel density */
+  UINT16 Y_density;		/* Vertical pixel density */
+  boolean write_Adobe_marker;	/* should an Adobe marker be written? */
+  
+  /* State variable: index of next scanline to be written to
+   * jpeg_write_scanlines().  Application may use this to control its
+   * processing loop, e.g., "while (next_scanline < image_height)".
+   */
+
+  JDIMENSION next_scanline;	/* 0 .. image_height-1  */
+
+  /* Remaining fields are known throughout compressor, but generally
+   * should not be touched by a surrounding application.
+   */
+
+  /*
+   * These fields are computed during compression startup
+   */
+  boolean progressive_mode;	/* TRUE if scan script uses progressive mode */
+  int max_h_samp_factor;	/* largest h_samp_factor */
+  int max_v_samp_factor;	/* largest v_samp_factor */
+
+  JDIMENSION total_iMCU_rows;	/* # of iMCU rows to be input to coef ctlr */
+  /* The coefficient controller receives data in units of MCU rows as defined
+   * for fully interleaved scans (whether the JPEG file is interleaved or not).
+   * There are v_samp_factor * DCTSIZE sample rows of each component in an
+   * "iMCU" (interleaved MCU) row.
+   */
+  
+  /*
+   * These fields are valid during any one scan.
+   * They describe the components and MCUs actually appearing in the scan.
+   */
+  int comps_in_scan;		/* # of JPEG components in this scan */
+  jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
+  /* *cur_comp_info[i] describes component that appears i'th in SOS */
+  
+  JDIMENSION MCUs_per_row;	/* # of MCUs across the image */
+  JDIMENSION MCU_rows_in_scan;	/* # of MCU rows in the image */
+  
+  int blocks_in_MCU;		/* # of DCT blocks per MCU */
+  int MCU_membership[C_MAX_BLOCKS_IN_MCU];
+  /* MCU_membership[i] is index in cur_comp_info of component owning */
+  /* i'th block in an MCU */
+
+  int Ss, Se, Ah, Al;		/* progressive JPEG parameters for scan */
+
+  /*
+   * Links to compression subobjects (methods and private variables of modules)
+   */
+  struct jpeg_comp_master * master;
+  struct jpeg_c_main_controller * main;
+  struct jpeg_c_prep_controller * prep;
+  struct jpeg_c_coef_controller * coef;
+  struct jpeg_marker_writer * marker;
+  struct jpeg_color_converter * cconvert;
+  struct jpeg_downsampler * downsample;
+  struct jpeg_forward_dct * fdct;
+  struct jpeg_entropy_encoder * entropy;
+  jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */
+  int script_space_size;
+};
+
+
+/* Master record for a decompression instance */
+
+struct jpeg_decompress_struct {
+  jpeg_common_fields;		/* Fields shared with jpeg_compress_struct */
+
+  /* Source of compressed data */
+  struct jpeg_source_mgr * src;
+
+  /* Basic description of image --- filled in by jpeg_read_header(). */
+  /* Application may inspect these values to decide how to process image. */
+
+  JDIMENSION image_width;	/* nominal image width (from SOF marker) */
+  JDIMENSION image_height;	/* nominal image height */
+  int num_components;		/* # of color components in JPEG image */
+  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
+
+  /* Decompression processing parameters --- these fields must be set before
+   * calling jpeg_start_decompress().  Note that jpeg_read_header() initializes
+   * them to default values.
+   */
+
+  J_COLOR_SPACE out_color_space; /* colorspace for output */
+
+  unsigned int scale_num, scale_denom; /* fraction by which to scale image */
+
+  double output_gamma;		/* image gamma wanted in output */
+
+  boolean buffered_image;	/* TRUE=multiple output passes */
+  boolean raw_data_out;		/* TRUE=downsampled data wanted */
+
+  J_DCT_METHOD dct_method;	/* IDCT algorithm selector */
+  boolean do_fancy_upsampling;	/* TRUE=apply fancy upsampling */
+  boolean do_block_smoothing;	/* TRUE=apply interblock smoothing */
+
+  boolean quantize_colors;	/* TRUE=colormapped output wanted */
+  /* the following are ignored if not quantize_colors: */
+  J_DITHER_MODE dither_mode;	/* type of color dithering to use */
+  boolean two_pass_quantize;	/* TRUE=use two-pass color quantization */
+  int desired_number_of_colors;	/* max # colors to use in created colormap */
+  /* these are significant only in buffered-image mode: */
+  boolean enable_1pass_quant;	/* enable future use of 1-pass quantizer */
+  boolean enable_external_quant;/* enable future use of external colormap */
+  boolean enable_2pass_quant;	/* enable future use of 2-pass quantizer */
+
+  /* Description of actual output image that will be returned to application.
+   * These fields are computed by jpeg_start_decompress().
+   * You can also use jpeg_calc_output_dimensions() to determine these values
+   * in advance of calling jpeg_start_decompress().
+   */
+
+  JDIMENSION output_width;	/* scaled image width */
+  JDIMENSION output_height;	/* scaled image height */
+  int out_color_components;	/* # of color components in out_color_space */
+  int output_components;	/* # of color components returned */
+  /* output_components is 1 (a colormap index) when quantizing colors;
+   * otherwise it equals out_color_components.
+   */
+  int rec_outbuf_height;	/* min recommended height of scanline buffer */
+  /* If the buffer passed to jpeg_read_scanlines() is less than this many rows
+   * high, space and time will be wasted due to unnecessary data copying.
+   * Usually rec_outbuf_height will be 1 or 2, at most 4.
+   */
+
+  /* When quantizing colors, the output colormap is described by these fields.
+   * The application can supply a colormap by setting colormap non-NULL before
+   * calling jpeg_start_decompress; otherwise a colormap is created during
+   * jpeg_start_decompress or jpeg_start_output.
+   * The map has out_color_components rows and actual_number_of_colors columns.
+   */
+  int actual_number_of_colors;	/* number of entries in use */
+  JSAMPARRAY colormap;		/* The color map as a 2-D pixel array */
+
+  /* State variables: these variables indicate the progress of decompression.
+   * The application may examine these but must not modify them.
+   */
+
+  /* Row index of next scanline to be read from jpeg_read_scanlines().
+   * Application may use this to control its processing loop, e.g.,
+   * "while (output_scanline < output_height)".
+   */
+  JDIMENSION output_scanline;	/* 0 .. output_height-1  */
+
+  /* Current input scan number and number of iMCU rows completed in scan.
+   * These indicate the progress of the decompressor input side.
+   */
+  int input_scan_number;	/* Number of SOS markers seen so far */
+  JDIMENSION input_iMCU_row;	/* Number of iMCU rows completed */
+
+  /* The "output scan number" is the notional scan being displayed by the
+   * output side.  The decompressor will not allow output scan/row number
+   * to get ahead of input scan/row, but it can fall arbitrarily far behind.
+   */
+  int output_scan_number;	/* Nominal scan number being displayed */
+  JDIMENSION output_iMCU_row;	/* Number of iMCU rows read */
+
+  /* Current progression status.  coef_bits[c][i] indicates the precision
+   * with which component c's DCT coefficient i (in zigzag order) is known.
+   * It is -1 when no data has yet been received, otherwise it is the point
+   * transform (shift) value for the most recent scan of the coefficient
+   * (thus, 0 at completion of the progression).
+   * This pointer is NULL when reading a non-progressive file.
+   */
+  int (*coef_bits)[DCTSIZE2];	/* -1 or current Al value for each coef */
+
+  /* Internal JPEG parameters --- the application usually need not look at
+   * these fields.  Note that the decompressor output side may not use
+   * any parameters that can change between scans.
+   */
+
+  /* Quantization and Huffman tables are carried forward across input
+   * datastreams when processing abbreviated JPEG datastreams.
+   */
+
+  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
+  /* ptrs to coefficient quantization tables, or NULL if not defined */
+
+  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
+  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
+  /* ptrs to Huffman coding tables, or NULL if not defined */
+
+  /* These parameters are never carried across datastreams, since they
+   * are given in SOF/SOS markers or defined to be reset by SOI.
+   */
+
+  int data_precision;		/* bits of precision in image data */
+
+  jpeg_component_info * comp_info;
+  /* comp_info[i] describes component that appears i'th in SOF */
+
+  boolean progressive_mode;	/* TRUE if SOFn specifies progressive mode */
+  boolean arith_code;		/* TRUE=arithmetic coding, FALSE=Huffman */
+
+  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
+  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
+  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
+
+  unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */
+
+  /* These fields record data obtained from optional markers recognized by
+   * the JPEG library.
+   */
+  boolean saw_JFIF_marker;	/* TRUE iff a JFIF APP0 marker was found */
+  /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
+  UINT8 JFIF_major_version;	/* JFIF version number */
+  UINT8 JFIF_minor_version;
+  UINT8 density_unit;		/* JFIF code for pixel size units */
+  UINT16 X_density;		/* Horizontal pixel density */
+  UINT16 Y_density;		/* Vertical pixel density */
+  boolean saw_Adobe_marker;	/* TRUE iff an Adobe APP14 marker was found */
+  UINT8 Adobe_transform;	/* Color transform code from Adobe marker */
+
+  boolean CCIR601_sampling;	/* TRUE=first samples are cosited */
+
+  /* Aside from the specific data retained from APPn markers known to the
+   * library, the uninterpreted contents of any or all APPn and COM markers
+   * can be saved in a list for examination by the application.
+   */
+  jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */
+
+  /* Remaining fields are known throughout decompressor, but generally
+   * should not be touched by a surrounding application.
+   */
+
+  /*
+   * These fields are computed during decompression startup
+   */
+  int max_h_samp_factor;	/* largest h_samp_factor */
+  int max_v_samp_factor;	/* largest v_samp_factor */
+
+  int min_DCT_scaled_size;	/* smallest DCT_scaled_size of any component */
+
+  JDIMENSION total_iMCU_rows;	/* # of iMCU rows in image */
+  /* The coefficient controller's input and output progress is measured in
+   * units of "iMCU" (interleaved MCU) rows.  These are the same as MCU rows
+   * in fully interleaved JPEG scans, but are used whether the scan is
+   * interleaved or not.  We define an iMCU row as v_samp_factor DCT block
+   * rows of each component.  Therefore, the IDCT output contains
+   * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row.
+   */
+
+  JSAMPLE * sample_range_limit; /* table for fast range-limiting */
+
+  /*
+   * These fields are valid during any one scan.
+   * They describe the components and MCUs actually appearing in the scan.
+   * Note that the decompressor output side must not use these fields.
+   */
+  int comps_in_scan;		/* # of JPEG components in this scan */
+  jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
+  /* *cur_comp_info[i] describes component that appears i'th in SOS */
+
+  JDIMENSION MCUs_per_row;	/* # of MCUs across the image */
+  JDIMENSION MCU_rows_in_scan;	/* # of MCU rows in the image */
+
+  int blocks_in_MCU;		/* # of DCT blocks per MCU */
+  int MCU_membership[D_MAX_BLOCKS_IN_MCU];
+  /* MCU_membership[i] is index in cur_comp_info of component owning */
+  /* i'th block in an MCU */
+
+  int Ss, Se, Ah, Al;		/* progressive JPEG parameters for scan */
+
+  /* This field is shared between entropy decoder and marker parser.
+   * It is either zero or the code of a JPEG marker that has been
+   * read from the data source, but has not yet been processed.
+   */
+  int unread_marker;
+
+  /*
+   * Links to decompression subobjects (methods, private variables of modules)
+   */
+  struct jpeg_decomp_master * master;
+  struct jpeg_d_main_controller * main;
+  struct jpeg_d_coef_controller * coef;
+  struct jpeg_d_post_controller * post;
+  struct jpeg_input_controller * inputctl;
+  struct jpeg_marker_reader * marker;
+  struct jpeg_entropy_decoder * entropy;
+  struct jpeg_inverse_dct * idct;
+  struct jpeg_upsampler * upsample;
+  struct jpeg_color_deconverter * cconvert;
+  struct jpeg_color_quantizer * cquantize;
+};
+
+
+/* "Object" declarations for JPEG modules that may be supplied or called
+ * directly by the surrounding application.
+ * As with all objects in the JPEG library, these structs only define the
+ * publicly visible methods and state variables of a module.  Additional
+ * private fields may exist after the public ones.
+ */
+
+
+/* Error handler object */
+
+struct jpeg_error_mgr {
+  /* Error exit handler: does not return to caller */
+  JMETHOD(void, error_exit, (j_common_ptr cinfo));
+  /* Conditionally emit a trace or warning message */
+  JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level));
+  /* Routine that actually outputs a trace or error message */
+  JMETHOD(void, output_message, (j_common_ptr cinfo));
+  /* Format a message string for the most recent JPEG error or message */
+  JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer));
+#define JMSG_LENGTH_MAX  200	/* recommended size of format_message buffer */
+  /* Reset error state variables at start of a new image */
+  JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo));
+  
+  /* The message ID code and any parameters are saved here.
+   * A message can have one string parameter or up to 8 int parameters.
+   */
+  int msg_code;
+#define JMSG_STR_PARM_MAX  80
+  union {
+    int i[8];
+    char s[JMSG_STR_PARM_MAX];
+  } msg_parm;
+  
+  /* Standard state variables for error facility */
+  
+  int trace_level;		/* max msg_level that will be displayed */
+  
+  /* For recoverable corrupt-data errors, we emit a warning message,
+   * but keep going unless emit_message chooses to abort.  emit_message
+   * should count warnings in num_warnings.  The surrounding application
+   * can check for bad data by seeing if num_warnings is nonzero at the
+   * end of processing.
+   */
+  long num_warnings;		/* number of corrupt-data warnings */
+
+  /* These fields point to the table(s) of error message strings.
+   * An application can change the table pointer to switch to a different
+   * message list (typically, to change the language in which errors are
+   * reported).  Some applications may wish to add additional error codes
+   * that will be handled by the JPEG library error mechanism; the second
+   * table pointer is used for this purpose.
+   *
+   * First table includes all errors generated by JPEG library itself.
+   * Error code 0 is reserved for a "no such error string" message.
+   */
+  const char * const * jpeg_message_table; /* Library errors */
+  int last_jpeg_message;    /* Table contains strings 0..last_jpeg_message */
+  /* Second table can be added by application (see cjpeg/djpeg for example).
+   * It contains strings numbered first_addon_message..last_addon_message.
+   */
+  const char * const * addon_message_table; /* Non-library errors */
+  int first_addon_message;	/* code for first string in addon table */
+  int last_addon_message;	/* code for last string in addon table */
+};
+
+
+/* Progress monitor object */
+
+struct jpeg_progress_mgr {
+  JMETHOD(void, progress_monitor, (j_common_ptr cinfo));
+
+  long pass_counter;		/* work units completed in this pass */
+  long pass_limit;		/* total number of work units in this pass */
+  int completed_passes;		/* passes completed so far */
+  int total_passes;		/* total number of passes expected */
+};
+
+
+/* Data destination object for compression */
+
+struct jpeg_destination_mgr {
+  JOCTET * next_output_byte;	/* => next byte to write in buffer */
+  size_t free_in_buffer;	/* # of byte spaces remaining in buffer */
+
+  JMETHOD(void, init_destination, (j_compress_ptr cinfo));
+  JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
+  JMETHOD(void, term_destination, (j_compress_ptr cinfo));
+};
+
+
+/* Data source object for decompression */
+
+struct jpeg_source_mgr {
+  const JOCTET * next_input_byte; /* => next byte to read from buffer */
+  size_t bytes_in_buffer;	/* # of bytes remaining in buffer */
+
+  JMETHOD(void, init_source, (j_decompress_ptr cinfo));
+  JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));
+  JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
+  JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
+  JMETHOD(void, term_source, (j_decompress_ptr cinfo));
+};
+
+
+/* Memory manager object.
+ * Allocates "small" objects (a few K total), "large" objects (tens of K),
+ * and "really big" objects (virtual arrays with backing store if needed).
+ * The memory manager does not allow individual objects to be freed; rather,
+ * each created object is assigned to a pool, and whole pools can be freed
+ * at once.  This is faster and more convenient than remembering exactly what
+ * to free, especially where malloc()/free() are not too speedy.
+ * NB: alloc routines never return NULL.  They exit to error_exit if not
+ * successful.
+ */
+
+#define JPOOL_PERMANENT	0	/* lasts until master record is destroyed */
+#define JPOOL_IMAGE	1	/* lasts until done with image/datastream */
+#define JPOOL_NUMPOOLS	2
+
+typedef struct jvirt_sarray_control * jvirt_sarray_ptr;
+typedef struct jvirt_barray_control * jvirt_barray_ptr;
+
+
+struct jpeg_memory_mgr {
+  /* Method pointers */
+  JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
+				size_t sizeofobject));
+  JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id,
+				     size_t sizeofobject));
+  JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id,
+				     JDIMENSION samplesperrow,
+				     JDIMENSION numrows));
+  JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
+				      JDIMENSION blocksperrow,
+				      JDIMENSION numrows));
+  JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
+						  int pool_id,
+						  boolean pre_zero,
+						  JDIMENSION samplesperrow,
+						  JDIMENSION numrows,
+						  JDIMENSION maxaccess));
+  JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
+						  int pool_id,
+						  boolean pre_zero,
+						  JDIMENSION blocksperrow,
+						  JDIMENSION numrows,
+						  JDIMENSION maxaccess));
+  JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo));
+  JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo,
+					   jvirt_sarray_ptr ptr,
+					   JDIMENSION start_row,
+					   JDIMENSION num_rows,
+					   boolean writable));
+  JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
+					    jvirt_barray_ptr ptr,
+					    JDIMENSION start_row,
+					    JDIMENSION num_rows,
+					    boolean writable));
+  JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
+  JMETHOD(void, self_destruct, (j_common_ptr cinfo));
+
+  /* Limit on memory allocation for this JPEG object.  (Note that this is
+   * merely advisory, not a guaranteed maximum; it only affects the space
+   * used for virtual-array buffers.)  May be changed by outer application
+   * after creating the JPEG object.
+   */
+  long max_memory_to_use;
+
+  /* Maximum allocation request accepted by alloc_large. */
+  long max_alloc_chunk;
+};
+
+
+/* Routine signature for application-supplied marker processing methods.
+ * Need not pass marker code since it is stored in cinfo->unread_marker.
+ */
+typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
+
+
+/* Declarations for routines called by application.
+ * The JPP macro hides prototype parameters from compilers that can't cope.
+ * Note JPP requires double parentheses.
+ */
+
+#ifdef HAVE_PROTOTYPES
+#define JPP(arglist)	arglist
+#else
+#define JPP(arglist)	()
+#endif
+
+
+/* Short forms of external names for systems with brain-damaged linkers.
+ * We shorten external names to be unique in the first six letters, which
+ * is good enough for all known systems.
+ * (If your compiler itself needs names to be unique in less than 15 
+ * characters, you are out of luck.  Get a better compiler.)
+ */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jpeg_std_error		jStdError
+#define jpeg_CreateCompress	jCreaCompress
+#define jpeg_CreateDecompress	jCreaDecompress
+#define jpeg_destroy_compress	jDestCompress
+#define jpeg_destroy_decompress	jDestDecompress
+#define jpeg_stdio_dest		jStdDest
+#define jpeg_stdio_src		jStdSrc
+#define jpeg_set_defaults	jSetDefaults
+#define jpeg_set_colorspace	jSetColorspace
+#define jpeg_default_colorspace	jDefColorspace
+#define jpeg_set_quality	jSetQuality
+#define jpeg_set_linear_quality	jSetLQuality
+#define jpeg_add_quant_table	jAddQuantTable
+#define jpeg_quality_scaling	jQualityScaling
+#define jpeg_simple_progression	jSimProgress
+#define jpeg_suppress_tables	jSuppressTables
+#define jpeg_alloc_quant_table	jAlcQTable
+#define jpeg_alloc_huff_table	jAlcHTable
+#define jpeg_start_compress	jStrtCompress
+#define jpeg_write_scanlines	jWrtScanlines
+#define jpeg_finish_compress	jFinCompress
+#define jpeg_write_raw_data	jWrtRawData
+#define jpeg_write_marker	jWrtMarker
+#define jpeg_write_m_header	jWrtMHeader
+#define jpeg_write_m_byte	jWrtMByte
+#define jpeg_write_tables	jWrtTables
+#define jpeg_read_header	jReadHeader
+#define jpeg_start_decompress	jStrtDecompress
+#define jpeg_read_scanlines	jReadScanlines
+#define jpeg_finish_decompress	jFinDecompress
+#define jpeg_read_raw_data	jReadRawData
+#define jpeg_has_multiple_scans	jHasMultScn
+#define jpeg_start_output	jStrtOutput
+#define jpeg_finish_output	jFinOutput
+#define jpeg_input_complete	jInComplete
+#define jpeg_new_colormap	jNewCMap
+#define jpeg_consume_input	jConsumeInput
+#define jpeg_calc_output_dimensions	jCalcDimensions
+#define jpeg_save_markers	jSaveMarkers
+#define jpeg_set_marker_processor	jSetMarker
+#define jpeg_read_coefficients	jReadCoefs
+#define jpeg_write_coefficients	jWrtCoefs
+#define jpeg_copy_critical_parameters	jCopyCrit
+#define jpeg_abort_compress	jAbrtCompress
+#define jpeg_abort_decompress	jAbrtDecompress
+#define jpeg_abort		jAbort
+#define jpeg_destroy		jDestroy
+#define jpeg_resync_to_restart	jResyncRestart
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+
+/* Default error-management setup */
+EXTERN(struct jpeg_error_mgr *) jpeg_std_error
+	JPP((struct jpeg_error_mgr * err));
+
+/* Initialization of JPEG compression objects.
+ * jpeg_create_compress() and jpeg_create_decompress() are the exported
+ * names that applications should call.  These expand to calls on
+ * jpeg_CreateCompress and jpeg_CreateDecompress with additional information
+ * passed for version mismatch checking.
+ * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx.
+ */
+#define jpeg_create_compress(cinfo) \
+    jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \
+			(size_t) sizeof(struct jpeg_compress_struct))
+#define jpeg_create_decompress(cinfo) \
+    jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
+			  (size_t) sizeof(struct jpeg_decompress_struct))
+EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo,
+				      int version, size_t structsize));
+EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,
+					int version, size_t structsize));
+/* Destruction of JPEG compression objects */
+EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
+
+/* Standard data source and destination managers: stdio streams. */
+/* Caller is responsible for opening the file before and closing after. */
+EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
+EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
+
+/* Default parameter setup for compression */
+EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
+/* Compression parameter setup aids */
+EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
+				      J_COLOR_SPACE colorspace));
+EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
+				   boolean force_baseline));
+EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
+					  int scale_factor,
+					  boolean force_baseline));
+EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
+				       const unsigned int *basic_table,
+				       int scale_factor,
+				       boolean force_baseline));
+EXTERN(int) jpeg_quality_scaling JPP((int quality));
+EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
+				       boolean suppress));
+EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
+EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
+
+/* Main entry points for compression */
+EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
+				      boolean write_all_tables));
+EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
+					     JSAMPARRAY scanlines,
+					     JDIMENSION num_lines));
+EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
+
+/* Replaces jpeg_write_scanlines when writing raw downsampled data. */
+EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
+					    JSAMPIMAGE data,
+					    JDIMENSION num_lines));
+
+/* Write a special marker.  See libjpeg.doc concerning safe usage. */
+EXTERN(void) jpeg_write_marker
+	JPP((j_compress_ptr cinfo, int marker,
+	     const JOCTET * dataptr, unsigned int datalen));
+/* Same, but piecemeal. */
+EXTERN(void) jpeg_write_m_header
+	JPP((j_compress_ptr cinfo, int marker, unsigned int datalen));
+EXTERN(void) jpeg_write_m_byte
+	JPP((j_compress_ptr cinfo, int val));
+
+/* Alternate compression function: just write an abbreviated table file */
+EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
+
+/* Decompression startup: read start of JPEG datastream to see what's there */
+EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
+				  boolean require_image));
+/* Return value is one of: */
+#define JPEG_SUSPENDED		0 /* Suspended due to lack of input data */
+#define JPEG_HEADER_OK		1 /* Found valid image datastream */
+#define JPEG_HEADER_TABLES_ONLY	2 /* Found valid table-specs-only datastream */
+/* If you pass require_image = TRUE (normal case), you need not check for
+ * a TABLES_ONLY return code; an abbreviated file will cause an error exit.
+ * JPEG_SUSPENDED is only possible if you use a data source module that can
+ * give a suspension return (the stdio source module doesn't).
+ */
+
+/* Main entry points for decompression */
+EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
+EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
+					    JSAMPARRAY scanlines,
+					    JDIMENSION max_lines));
+EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
+
+/* Replaces jpeg_read_scanlines when reading raw downsampled data. */
+EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
+					   JSAMPIMAGE data,
+					   JDIMENSION max_lines));
+
+/* Additional entry points for buffered-image mode. */
+EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
+EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
+				       int scan_number));
+EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
+EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
+EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));
+EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
+/* Return value is one of: */
+/* #define JPEG_SUSPENDED	0    Suspended due to lack of input data */
+#define JPEG_REACHED_SOS	1 /* Reached start of new scan */
+#define JPEG_REACHED_EOI	2 /* Reached end of image */
+#define JPEG_ROW_COMPLETED	3 /* Completed one iMCU row */
+#define JPEG_SCAN_COMPLETED	4 /* Completed last iMCU row of a scan */
+
+/* Precalculate output dimensions for current decompression parameters. */
+EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
+
+/* Control saving of COM and APPn markers into marker_list. */
+EXTERN(void) jpeg_save_markers
+	JPP((j_decompress_ptr cinfo, int marker_code,
+	     unsigned int length_limit));
+
+/* Install a special processing method for COM or APPn markers. */
+EXTERN(void) jpeg_set_marker_processor
+	JPP((j_decompress_ptr cinfo, int marker_code,
+	     jpeg_marker_parser_method routine));
+
+/* Read or write raw DCT coefficients --- useful for lossless transcoding. */
+EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));
+EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo,
+					  jvirt_barray_ptr * coef_arrays));
+EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
+						j_compress_ptr dstinfo));
+
+/* If you choose to abort compression or decompression before completing
+ * jpeg_finish_(de)compress, then you need to clean up to release memory,
+ * temporary files, etc.  You can just call jpeg_destroy_(de)compress
+ * if you're done with the JPEG object, but if you want to clean it up and
+ * reuse it, call this:
+ */
+EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));
+
+/* Generic versions of jpeg_abort and jpeg_destroy that work on either
+ * flavor of JPEG object.  These may be more convenient in some places.
+ */
+EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
+EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
+
+/* Default restart-marker-resync procedure for use by data source modules */
+EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
+					    int desired));
+
+
+/* These marker codes are exported since applications and data source modules
+ * are likely to want to use them.
+ */
+
+#define JPEG_RST0	0xD0	/* RST0 marker code */
+#define JPEG_EOI	0xD9	/* EOI marker code */
+#define JPEG_APP0	0xE0	/* APP0 marker code */
+#define JPEG_COM	0xFE	/* COM marker code */
+
+
+/* If we have a brain-damaged compiler that emits warnings (or worse, errors)
+ * for structure definitions that are never filled in, keep it quiet by
+ * supplying dummy definitions for the various substructures.
+ */
+
+#ifdef INCOMPLETE_TYPES_BROKEN
+#ifndef JPEG_INTERNALS		/* will be defined in jpegint.h */
+struct jvirt_sarray_control { long dummy; };
+struct jvirt_barray_control { long dummy; };
+struct jpeg_comp_master { long dummy; };
+struct jpeg_c_main_controller { long dummy; };
+struct jpeg_c_prep_controller { long dummy; };
+struct jpeg_c_coef_controller { long dummy; };
+struct jpeg_marker_writer { long dummy; };
+struct jpeg_color_converter { long dummy; };
+struct jpeg_downsampler { long dummy; };
+struct jpeg_forward_dct { long dummy; };
+struct jpeg_entropy_encoder { long dummy; };
+struct jpeg_decomp_master { long dummy; };
+struct jpeg_d_main_controller { long dummy; };
+struct jpeg_d_coef_controller { long dummy; };
+struct jpeg_d_post_controller { long dummy; };
+struct jpeg_input_controller { long dummy; };
+struct jpeg_marker_reader { long dummy; };
+struct jpeg_entropy_decoder { long dummy; };
+struct jpeg_inverse_dct { long dummy; };
+struct jpeg_upsampler { long dummy; };
+struct jpeg_color_deconverter { long dummy; };
+struct jpeg_color_quantizer { long dummy; };
+#endif /* JPEG_INTERNALS */
+#endif /* INCOMPLETE_TYPES_BROKEN */
+
+
+/*
+ * The JPEG library modules define JPEG_INTERNALS before including this file.
+ * The internal structure declarations are read only when that is true.
+ * Applications using the library should not include jpegint.h, but may wish
+ * to include jerror.h.
+ */
+
+#ifdef JPEG_INTERNALS
+#include "jpegint.h"		/* fetch private declarations */
+#include "jerror.h"		/* fetch error codes too */
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* JPEGLIB_H */
diff --git a/samples/jpeglib/jquant1.c b/samples/jpeglib/jquant1.c
new file mode 100644
index 0000000..b2f96aa
--- /dev/null
+++ b/samples/jpeglib/jquant1.c
@@ -0,0 +1,856 @@
+/*
+ * jquant1.c
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains 1-pass color quantization (color mapping) routines.
+ * These routines provide mapping to a fixed color map using equally spaced
+ * color values.  Optional Floyd-Steinberg or ordered dithering is available.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+#ifdef QUANT_1PASS_SUPPORTED
+
+
+/*
+ * The main purpose of 1-pass quantization is to provide a fast, if not very
+ * high quality, colormapped output capability.  A 2-pass quantizer usually
+ * gives better visual quality; however, for quantized grayscale output this
+ * quantizer is perfectly adequate.  Dithering is highly recommended with this
+ * quantizer, though you can turn it off if you really want to.
+ *
+ * In 1-pass quantization the colormap must be chosen in advance of seeing the
+ * image.  We use a map consisting of all combinations of Ncolors[i] color
+ * values for the i'th component.  The Ncolors[] values are chosen so that
+ * their product, the total number of colors, is no more than that requested.
+ * (In most cases, the product will be somewhat less.)
+ *
+ * Since the colormap is orthogonal, the representative value for each color
+ * component can be determined without considering the other components;
+ * then these indexes can be combined into a colormap index by a standard
+ * N-dimensional-array-subscript calculation.  Most of the arithmetic involved
+ * can be precalculated and stored in the lookup table colorindex[].
+ * colorindex[i][j] maps pixel value j in component i to the nearest
+ * representative value (grid plane) for that component; this index is
+ * multiplied by the array stride for component i, so that the
+ * index of the colormap entry closest to a given pixel value is just
+ *    sum( colorindex[component-number][pixel-component-value] )
+ * Aside from being fast, this scheme allows for variable spacing between
+ * representative values with no additional lookup cost.
+ *
+ * If gamma correction has been applied in color conversion, it might be wise
+ * to adjust the color grid spacing so that the representative colors are
+ * equidistant in linear space.  At this writing, gamma correction is not
+ * implemented by jdcolor, so nothing is done here.
+ */
+
+
+/* Declarations for ordered dithering.
+ *
+ * We use a standard 16x16 ordered dither array.  The basic concept of ordered
+ * dithering is described in many references, for instance Dale Schumacher's
+ * chapter II.2 of Graphics Gems II (James Arvo, ed. Academic Press, 1991).
+ * In place of Schumacher's comparisons against a "threshold" value, we add a
+ * "dither" value to the input pixel and then round the result to the nearest
+ * output value.  The dither value is equivalent to (0.5 - threshold) times
+ * the distance between output values.  For ordered dithering, we assume that
+ * the output colors are equally spaced; if not, results will probably be
+ * worse, since the dither may be too much or too little at a given point.
+ *
+ * The normal calculation would be to form pixel value + dither, range-limit
+ * this to 0..MAXJSAMPLE, and then index into the colorindex table as usual.
+ * We can skip the separate range-limiting step by extending the colorindex
+ * table in both directions.
+ */
+
+#define ODITHER_SIZE  16	/* dimension of dither matrix */
+/* NB: if ODITHER_SIZE is not a power of 2, ODITHER_MASK uses will break */
+#define ODITHER_CELLS (ODITHER_SIZE*ODITHER_SIZE)	/* # cells in matrix */
+#define ODITHER_MASK  (ODITHER_SIZE-1) /* mask for wrapping around counters */
+
+typedef int ODITHER_MATRIX[ODITHER_SIZE][ODITHER_SIZE];
+typedef int (*ODITHER_MATRIX_PTR)[ODITHER_SIZE];
+
+static const UINT8 base_dither_matrix[ODITHER_SIZE][ODITHER_SIZE] = {
+  /* Bayer's order-4 dither array.  Generated by the code given in
+   * Stephen Hawley's article "Ordered Dithering" in Graphics Gems I.
+   * The values in this array must range from 0 to ODITHER_CELLS-1.
+   */
+  {   0,192, 48,240, 12,204, 60,252,  3,195, 51,243, 15,207, 63,255 },
+  { 128, 64,176,112,140, 76,188,124,131, 67,179,115,143, 79,191,127 },
+  {  32,224, 16,208, 44,236, 28,220, 35,227, 19,211, 47,239, 31,223 },
+  { 160, 96,144, 80,172,108,156, 92,163, 99,147, 83,175,111,159, 95 },
+  {   8,200, 56,248,  4,196, 52,244, 11,203, 59,251,  7,199, 55,247 },
+  { 136, 72,184,120,132, 68,180,116,139, 75,187,123,135, 71,183,119 },
+  {  40,232, 24,216, 36,228, 20,212, 43,235, 27,219, 39,231, 23,215 },
+  { 168,104,152, 88,164,100,148, 84,171,107,155, 91,167,103,151, 87 },
+  {   2,194, 50,242, 14,206, 62,254,  1,193, 49,241, 13,205, 61,253 },
+  { 130, 66,178,114,142, 78,190,126,129, 65,177,113,141, 77,189,125 },
+  {  34,226, 18,210, 46,238, 30,222, 33,225, 17,209, 45,237, 29,221 },
+  { 162, 98,146, 82,174,110,158, 94,161, 97,145, 81,173,109,157, 93 },
+  {  10,202, 58,250,  6,198, 54,246,  9,201, 57,249,  5,197, 53,245 },
+  { 138, 74,186,122,134, 70,182,118,137, 73,185,121,133, 69,181,117 },
+  {  42,234, 26,218, 38,230, 22,214, 41,233, 25,217, 37,229, 21,213 },
+  { 170,106,154, 90,166,102,150, 86,169,105,153, 89,165,101,149, 85 }
+};
+
+
+/* Declarations for Floyd-Steinberg dithering.
+ *
+ * Errors are accumulated into the array fserrors[], at a resolution of
+ * 1/16th of a pixel count.  The error at a given pixel is propagated
+ * to its not-yet-processed neighbors using the standard F-S fractions,
+ *		...	(here)	7/16
+ *		3/16	5/16	1/16
+ * We work left-to-right on even rows, right-to-left on odd rows.
+ *
+ * We can get away with a single array (holding one row's worth of errors)
+ * by using it to store the current row's errors at pixel columns not yet
+ * processed, but the next row's errors at columns already processed.  We
+ * need only a few extra variables to hold the errors immediately around the
+ * current column.  (If we are lucky, those variables are in registers, but
+ * even if not, they're probably cheaper to access than array elements are.)
+ *
+ * The fserrors[] array is indexed [component#][position].
+ * We provide (#columns + 2) entries per component; the extra entry at each
+ * end saves us from special-casing the first and last pixels.
+ *
+ * Note: on a wide image, we might not have enough room in a PC's near data
+ * segment to hold the error array; so it is allocated with alloc_large.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+typedef INT16 FSERROR;		/* 16 bits should be enough */
+typedef int LOCFSERROR;		/* use 'int' for calculation temps */
+#else
+typedef INT32 FSERROR;		/* may need more than 16 bits */
+typedef INT32 LOCFSERROR;	/* be sure calculation temps are big enough */
+#endif
+
+typedef FSERROR FAR *FSERRPTR;	/* pointer to error array (in FAR storage!) */
+
+
+/* Private subobject */
+
+#define MAX_Q_COMPS 4		/* max components I can handle */
+
+typedef struct {
+  struct jpeg_color_quantizer pub; /* public fields */
+
+  /* Initially allocated colormap is saved here */
+  JSAMPARRAY sv_colormap;	/* The color map as a 2-D pixel array */
+  int sv_actual;		/* number of entries in use */
+
+  JSAMPARRAY colorindex;	/* Precomputed mapping for speed */
+  /* colorindex[i][j] = index of color closest to pixel value j in component i,
+   * premultiplied as described above.  Since colormap indexes must fit into
+   * JSAMPLEs, the entries of this array will too.
+   */
+  boolean is_padded;		/* is the colorindex padded for odither? */
+
+  int Ncolors[MAX_Q_COMPS];	/* # of values alloced to each component */
+
+  /* Variables for ordered dithering */
+  int row_index;		/* cur row's vertical index in dither matrix */
+  ODITHER_MATRIX_PTR odither[MAX_Q_COMPS]; /* one dither array per component */
+
+  /* Variables for Floyd-Steinberg dithering */
+  FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */
+  boolean on_odd_row;		/* flag to remember which row we are on */
+} my_cquantizer;
+
+typedef my_cquantizer * my_cquantize_ptr;
+
+
+/*
+ * Policy-making subroutines for create_colormap and create_colorindex.
+ * These routines determine the colormap to be used.  The rest of the module
+ * only assumes that the colormap is orthogonal.
+ *
+ *  * select_ncolors decides how to divvy up the available colors
+ *    among the components.
+ *  * output_value defines the set of representative values for a component.
+ *  * largest_input_value defines the mapping from input values to
+ *    representative values for a component.
+ * Note that the latter two routines may impose different policies for
+ * different components, though this is not currently done.
+ */
+
+
+LOCAL(int)
+select_ncolors (j_decompress_ptr cinfo, int Ncolors[])
+/* Determine allocation of desired colors to components, */
+/* and fill in Ncolors[] array to indicate choice. */
+/* Return value is total number of colors (product of Ncolors[] values). */
+{
+  int nc = cinfo->out_color_components; /* number of color components */
+  int max_colors = cinfo->desired_number_of_colors;
+  int total_colors, iroot, i, j;
+  boolean changed;
+  long temp;
+  static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE };
+
+  /* We can allocate at least the nc'th root of max_colors per component. */
+  /* Compute floor(nc'th root of max_colors). */
+  iroot = 1;
+  do {
+    iroot++;
+    temp = iroot;		/* set temp = iroot ** nc */
+    for (i = 1; i < nc; i++)
+      temp *= iroot;
+  } while (temp <= (long) max_colors); /* repeat till iroot exceeds root */
+  iroot--;			/* now iroot = floor(root) */
+
+  /* Must have at least 2 color values per component */
+  if (iroot < 2)
+    ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp);
+
+  /* Initialize to iroot color values for each component */
+  total_colors = 1;
+  for (i = 0; i < nc; i++) {
+    Ncolors[i] = iroot;
+    total_colors *= iroot;
+  }
+  /* We may be able to increment the count for one or more components without
+   * exceeding max_colors, though we know not all can be incremented.
+   * Sometimes, the first component can be incremented more than once!
+   * (Example: for 16 colors, we start at 2*2*2, go to 3*2*2, then 4*2*2.)
+   * In RGB colorspace, try to increment G first, then R, then B.
+   */
+  do {
+    changed = FALSE;
+    for (i = 0; i < nc; i++) {
+      j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i);
+      /* calculate new total_colors if Ncolors[j] is incremented */
+      temp = total_colors / Ncolors[j];
+      temp *= Ncolors[j]+1;	/* done in long arith to avoid oflo */
+      if (temp > (long) max_colors)
+	break;			/* won't fit, done with this pass */
+      Ncolors[j]++;		/* OK, apply the increment */
+      total_colors = (int) temp;
+      changed = TRUE;
+    }
+  } while (changed);
+
+  return total_colors;
+}
+
+
+LOCAL(int)
+output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
+/* Return j'th output value, where j will range from 0 to maxj */
+/* The output values must fall in 0..MAXJSAMPLE in increasing order */
+{
+  /* We always provide values 0 and MAXJSAMPLE for each component;
+   * any additional values are equally spaced between these limits.
+   * (Forcing the upper and lower values to the limits ensures that
+   * dithering can't produce a color outside the selected gamut.)
+   */
+  return (int) (((INT32) j * MAXJSAMPLE + maxj/2) / maxj);
+}
+
+
+LOCAL(int)
+largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
+/* Return largest input value that should map to j'th output value */
+/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */
+{
+  /* Breakpoints are halfway between values returned by output_value */
+  return (int) (((INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj));
+}
+
+
+/*
+ * Create the colormap.
+ */
+
+LOCAL(void)
+create_colormap (j_decompress_ptr cinfo)
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  JSAMPARRAY colormap;		/* Created colormap */
+  int total_colors;		/* Number of distinct output colors */
+  int i,j,k, nci, blksize, blkdist, ptr, val;
+
+  /* Select number of colors for each component */
+  total_colors = select_ncolors(cinfo, cquantize->Ncolors);
+
+  /* Report selected color counts */
+  if (cinfo->out_color_components == 3)
+    TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS,
+	     total_colors, cquantize->Ncolors[0],
+	     cquantize->Ncolors[1], cquantize->Ncolors[2]);
+  else
+    TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors);
+
+  /* Allocate and fill in the colormap. */
+  /* The colors are ordered in the map in standard row-major order, */
+  /* i.e. rightmost (highest-indexed) color changes most rapidly. */
+
+  colormap = (*cinfo->mem->alloc_sarray)
+    ((j_common_ptr) cinfo, JPOOL_IMAGE,
+     (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components);
+
+  /* blksize is number of adjacent repeated entries for a component */
+  /* blkdist is distance between groups of identical entries for a component */
+  blkdist = total_colors;
+
+  for (i = 0; i < cinfo->out_color_components; i++) {
+    /* fill in colormap entries for i'th color component */
+    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */
+    blksize = blkdist / nci;
+    for (j = 0; j < nci; j++) {
+      /* Compute j'th output value (out of nci) for component */
+      val = output_value(cinfo, i, j, nci-1);
+      /* Fill in all colormap entries that have this value of this component */
+      for (ptr = j * blksize; ptr < total_colors; ptr += blkdist) {
+	/* fill in blksize entries beginning at ptr */
+	for (k = 0; k < blksize; k++)
+	  colormap[i][ptr+k] = (JSAMPLE) val;
+      }
+    }
+    blkdist = blksize;		/* blksize of this color is blkdist of next */
+  }
+
+  /* Save the colormap in private storage,
+   * where it will survive color quantization mode changes.
+   */
+  cquantize->sv_colormap = colormap;
+  cquantize->sv_actual = total_colors;
+}
+
+
+/*
+ * Create the color index table.
+ */
+
+LOCAL(void)
+create_colorindex (j_decompress_ptr cinfo)
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  JSAMPROW indexptr;
+  int i,j,k, nci, blksize, val, pad;
+
+  /* For ordered dither, we pad the color index tables by MAXJSAMPLE in
+   * each direction (input index values can be -MAXJSAMPLE .. 2*MAXJSAMPLE).
+   * This is not necessary in the other dithering modes.  However, we
+   * flag whether it was done in case user changes dithering mode.
+   */
+  if (cinfo->dither_mode == JDITHER_ORDERED) {
+    pad = MAXJSAMPLE*2;
+    cquantize->is_padded = TRUE;
+  } else {
+    pad = 0;
+    cquantize->is_padded = FALSE;
+  }
+
+  cquantize->colorindex = (*cinfo->mem->alloc_sarray)
+    ((j_common_ptr) cinfo, JPOOL_IMAGE,
+     (JDIMENSION) (MAXJSAMPLE+1 + pad),
+     (JDIMENSION) cinfo->out_color_components);
+
+  /* blksize is number of adjacent repeated entries for a component */
+  blksize = cquantize->sv_actual;
+
+  for (i = 0; i < cinfo->out_color_components; i++) {
+    /* fill in colorindex entries for i'th color component */
+    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */
+    blksize = blksize / nci;
+
+    /* adjust colorindex pointers to provide padding at negative indexes. */
+    if (pad)
+      cquantize->colorindex[i] += MAXJSAMPLE;
+
+    /* in loop, val = index of current output value, */
+    /* and k = largest j that maps to current val */
+    indexptr = cquantize->colorindex[i];
+    val = 0;
+    k = largest_input_value(cinfo, i, 0, nci-1);
+    for (j = 0; j <= MAXJSAMPLE; j++) {
+      while (j > k)		/* advance val if past boundary */
+	k = largest_input_value(cinfo, i, ++val, nci-1);
+      /* premultiply so that no multiplication needed in main processing */
+      indexptr[j] = (JSAMPLE) (val * blksize);
+    }
+    /* Pad at both ends if necessary */
+    if (pad)
+      for (j = 1; j <= MAXJSAMPLE; j++) {
+	indexptr[-j] = indexptr[0];
+	indexptr[MAXJSAMPLE+j] = indexptr[MAXJSAMPLE];
+      }
+  }
+}
+
+
+/*
+ * Create an ordered-dither array for a component having ncolors
+ * distinct output values.
+ */
+
+LOCAL(ODITHER_MATRIX_PTR)
+make_odither_array (j_decompress_ptr cinfo, int ncolors)
+{
+  ODITHER_MATRIX_PTR odither;
+  int j,k;
+  INT32 num,den;
+
+  odither = (ODITHER_MATRIX_PTR)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(ODITHER_MATRIX));
+  /* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1).
+   * Hence the dither value for the matrix cell with fill order f
+   * (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1).
+   * On 16-bit-int machine, be careful to avoid overflow.
+   */
+  den = 2 * ODITHER_CELLS * ((INT32) (ncolors - 1));
+  for (j = 0; j < ODITHER_SIZE; j++) {
+    for (k = 0; k < ODITHER_SIZE; k++) {
+      num = ((INT32) (ODITHER_CELLS-1 - 2*((int)base_dither_matrix[j][k])))
+	    * MAXJSAMPLE;
+      /* Ensure round towards zero despite C's lack of consistency
+       * about rounding negative values in integer division...
+       */
+      odither[j][k] = (int) (num<0 ? -((-num)/den) : num/den);
+    }
+  }
+  return odither;
+}
+
+
+/*
+ * Create the ordered-dither tables.
+ * Components having the same number of representative colors may 
+ * share a dither table.
+ */
+
+LOCAL(void)
+create_odither_tables (j_decompress_ptr cinfo)
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  ODITHER_MATRIX_PTR odither;
+  int i, j, nci;
+
+  for (i = 0; i < cinfo->out_color_components; i++) {
+    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */
+    odither = NULL;		/* search for matching prior component */
+    for (j = 0; j < i; j++) {
+      if (nci == cquantize->Ncolors[j]) {
+	odither = cquantize->odither[j];
+	break;
+      }
+    }
+    if (odither == NULL)	/* need a new table? */
+      odither = make_odither_array(cinfo, nci);
+    cquantize->odither[i] = odither;
+  }
+}
+
+
+/*
+ * Map some rows of pixels to the output colormapped representation.
+ */
+
+METHODDEF(void)
+color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
+		JSAMPARRAY output_buf, int num_rows)
+/* General case, no dithering */
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  JSAMPARRAY colorindex = cquantize->colorindex;
+  register int pixcode, ci;
+  register JSAMPROW ptrin, ptrout;
+  int row;
+  JDIMENSION col;
+  JDIMENSION width = cinfo->output_width;
+  register int nc = cinfo->out_color_components;
+
+  for (row = 0; row < num_rows; row++) {
+    ptrin = input_buf[row];
+    ptrout = output_buf[row];
+    for (col = width; col > 0; col--) {
+      pixcode = 0;
+      for (ci = 0; ci < nc; ci++) {
+	pixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]);
+      }
+      *ptrout++ = (JSAMPLE) pixcode;
+    }
+  }
+}
+
+
+METHODDEF(void)
+color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
+		 JSAMPARRAY output_buf, int num_rows)
+/* Fast path for out_color_components==3, no dithering */
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  register int pixcode;
+  register JSAMPROW ptrin, ptrout;
+  JSAMPROW colorindex0 = cquantize->colorindex[0];
+  JSAMPROW colorindex1 = cquantize->colorindex[1];
+  JSAMPROW colorindex2 = cquantize->colorindex[2];
+  int row;
+  JDIMENSION col;
+  JDIMENSION width = cinfo->output_width;
+
+  for (row = 0; row < num_rows; row++) {
+    ptrin = input_buf[row];
+    ptrout = output_buf[row];
+    for (col = width; col > 0; col--) {
+      pixcode  = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]);
+      pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]);
+      pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]);
+      *ptrout++ = (JSAMPLE) pixcode;
+    }
+  }
+}
+
+
+METHODDEF(void)
+quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
+		     JSAMPARRAY output_buf, int num_rows)
+/* General case, with ordered dithering */
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  register JSAMPROW input_ptr;
+  register JSAMPROW output_ptr;
+  JSAMPROW colorindex_ci;
+  int * dither;			/* points to active row of dither matrix */
+  int row_index, col_index;	/* current indexes into dither matrix */
+  int nc = cinfo->out_color_components;
+  int ci;
+  int row;
+  JDIMENSION col;
+  JDIMENSION width = cinfo->output_width;
+
+  for (row = 0; row < num_rows; row++) {
+    /* Initialize output values to 0 so can process components separately */
+    jzero_far((void FAR *) output_buf[row],
+	      (size_t) (width * SIZEOF(JSAMPLE)));
+    row_index = cquantize->row_index;
+    for (ci = 0; ci < nc; ci++) {
+      input_ptr = input_buf[row] + ci;
+      output_ptr = output_buf[row];
+      colorindex_ci = cquantize->colorindex[ci];
+      dither = cquantize->odither[ci][row_index];
+      col_index = 0;
+
+      for (col = width; col > 0; col--) {
+	/* Form pixel value + dither, range-limit to 0..MAXJSAMPLE,
+	 * select output value, accumulate into output code for this pixel.
+	 * Range-limiting need not be done explicitly, as we have extended
+	 * the colorindex table to produce the right answers for out-of-range
+	 * inputs.  The maximum dither is +- MAXJSAMPLE; this sets the
+	 * required amount of padding.
+	 */
+	*output_ptr += colorindex_ci[GETJSAMPLE(*input_ptr)+dither[col_index]];
+	input_ptr += nc;
+	output_ptr++;
+	col_index = (col_index + 1) & ODITHER_MASK;
+      }
+    }
+    /* Advance row index for next row */
+    row_index = (row_index + 1) & ODITHER_MASK;
+    cquantize->row_index = row_index;
+  }
+}
+
+
+METHODDEF(void)
+quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
+		      JSAMPARRAY output_buf, int num_rows)
+/* Fast path for out_color_components==3, with ordered dithering */
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  register int pixcode;
+  register JSAMPROW input_ptr;
+  register JSAMPROW output_ptr;
+  JSAMPROW colorindex0 = cquantize->colorindex[0];
+  JSAMPROW colorindex1 = cquantize->colorindex[1];
+  JSAMPROW colorindex2 = cquantize->colorindex[2];
+  int * dither0;		/* points to active row of dither matrix */
+  int * dither1;
+  int * dither2;
+  int row_index, col_index;	/* current indexes into dither matrix */
+  int row;
+  JDIMENSION col;
+  JDIMENSION width = cinfo->output_width;
+
+  for (row = 0; row < num_rows; row++) {
+    row_index = cquantize->row_index;
+    input_ptr = input_buf[row];
+    output_ptr = output_buf[row];
+    dither0 = cquantize->odither[0][row_index];
+    dither1 = cquantize->odither[1][row_index];
+    dither2 = cquantize->odither[2][row_index];
+    col_index = 0;
+
+    for (col = width; col > 0; col--) {
+      pixcode  = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) +
+					dither0[col_index]]);
+      pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) +
+					dither1[col_index]]);
+      pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) +
+					dither2[col_index]]);
+      *output_ptr++ = (JSAMPLE) pixcode;
+      col_index = (col_index + 1) & ODITHER_MASK;
+    }
+    row_index = (row_index + 1) & ODITHER_MASK;
+    cquantize->row_index = row_index;
+  }
+}
+
+
+METHODDEF(void)
+quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
+		    JSAMPARRAY output_buf, int num_rows)
+/* General case, with Floyd-Steinberg dithering */
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  register LOCFSERROR cur;	/* current error or pixel value */
+  LOCFSERROR belowerr;		/* error for pixel below cur */
+  LOCFSERROR bpreverr;		/* error for below/prev col */
+  LOCFSERROR bnexterr;		/* error for below/next col */
+  LOCFSERROR delta;
+  register FSERRPTR errorptr;	/* => fserrors[] at column before current */
+  register JSAMPROW input_ptr;
+  register JSAMPROW output_ptr;
+  JSAMPROW colorindex_ci;
+  JSAMPROW colormap_ci;
+  int pixcode;
+  int nc = cinfo->out_color_components;
+  int dir;			/* 1 for left-to-right, -1 for right-to-left */
+  int dirnc;			/* dir * nc */
+  int ci;
+  int row;
+  JDIMENSION col;
+  JDIMENSION width = cinfo->output_width;
+  JSAMPLE *range_limit = cinfo->sample_range_limit;
+  SHIFT_TEMPS
+
+  for (row = 0; row < num_rows; row++) {
+    /* Initialize output values to 0 so can process components separately */
+    jzero_far((void FAR *) output_buf[row],
+	      (size_t) (width * SIZEOF(JSAMPLE)));
+    for (ci = 0; ci < nc; ci++) {
+      input_ptr = input_buf[row] + ci;
+      output_ptr = output_buf[row];
+      if (cquantize->on_odd_row) {
+	/* work right to left in this row */
+	input_ptr += (width-1) * nc; /* so point to rightmost pixel */
+	output_ptr += width-1;
+	dir = -1;
+	dirnc = -nc;
+	errorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */
+      } else {
+	/* work left to right in this row */
+	dir = 1;
+	dirnc = nc;
+	errorptr = cquantize->fserrors[ci]; /* => entry before first column */
+      }
+      colorindex_ci = cquantize->colorindex[ci];
+      colormap_ci = cquantize->sv_colormap[ci];
+      /* Preset error values: no error propagated to first pixel from left */
+      cur = 0;
+      /* and no error propagated to row below yet */
+      belowerr = bpreverr = 0;
+
+      for (col = width; col > 0; col--) {
+	/* cur holds the error propagated from the previous pixel on the
+	 * current line.  Add the error propagated from the previous line
+	 * to form the complete error correction term for this pixel, and
+	 * round the error term (which is expressed * 16) to an integer.
+	 * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct
+	 * for either sign of the error value.
+	 * Note: errorptr points to *previous* column's array entry.
+	 */
+	cur = RIGHT_SHIFT(cur + errorptr[dir] + 8, 4);
+	/* Form pixel value + error, and range-limit to 0..MAXJSAMPLE.
+	 * The maximum error is +- MAXJSAMPLE; this sets the required size
+	 * of the range_limit array.
+	 */
+	cur += GETJSAMPLE(*input_ptr);
+	cur = GETJSAMPLE(range_limit[cur]);
+	/* Select output value, accumulate into output code for this pixel */
+	pixcode = GETJSAMPLE(colorindex_ci[cur]);
+	*output_ptr += (JSAMPLE) pixcode;
+	/* Compute actual representation error at this pixel */
+	/* Note: we can do this even though we don't have the final */
+	/* pixel code, because the colormap is orthogonal. */
+	cur -= GETJSAMPLE(colormap_ci[pixcode]);
+	/* Compute error fractions to be propagated to adjacent pixels.
+	 * Add these into the running sums, and simultaneously shift the
+	 * next-line error sums left by 1 column.
+	 */
+	bnexterr = cur;
+	delta = cur * 2;
+	cur += delta;		/* form error * 3 */
+	errorptr[0] = (FSERROR) (bpreverr + cur);
+	cur += delta;		/* form error * 5 */
+	bpreverr = belowerr + cur;
+	belowerr = bnexterr;
+	cur += delta;		/* form error * 7 */
+	/* At this point cur contains the 7/16 error value to be propagated
+	 * to the next pixel on the current line, and all the errors for the
+	 * next line have been shifted over. We are therefore ready to move on.
+	 */
+	input_ptr += dirnc;	/* advance input ptr to next column */
+	output_ptr += dir;	/* advance output ptr to next column */
+	errorptr += dir;	/* advance errorptr to current column */
+      }
+      /* Post-loop cleanup: we must unload the final error value into the
+       * final fserrors[] entry.  Note we need not unload belowerr because
+       * it is for the dummy column before or after the actual array.
+       */
+      errorptr[0] = (FSERROR) bpreverr; /* unload prev err into array */
+    }
+    cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE);
+  }
+}
+
+
+/*
+ * Allocate workspace for Floyd-Steinberg errors.
+ */
+
+LOCAL(void)
+alloc_fs_workspace (j_decompress_ptr cinfo)
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  size_t arraysize;
+  int i;
+
+  arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
+  for (i = 0; i < cinfo->out_color_components; i++) {
+    cquantize->fserrors[i] = (FSERRPTR)
+      (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);
+  }
+}
+
+
+/*
+ * Initialize for one-pass color quantization.
+ */
+
+METHODDEF(void)
+start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  size_t arraysize;
+  int i;
+
+  /* Install my colormap. */
+  cinfo->colormap = cquantize->sv_colormap;
+  cinfo->actual_number_of_colors = cquantize->sv_actual;
+
+  /* Initialize for desired dithering mode. */
+  switch (cinfo->dither_mode) {
+  case JDITHER_NONE:
+    if (cinfo->out_color_components == 3)
+      cquantize->pub.color_quantize = color_quantize3;
+    else
+      cquantize->pub.color_quantize = color_quantize;
+    break;
+  case JDITHER_ORDERED:
+    if (cinfo->out_color_components == 3)
+      cquantize->pub.color_quantize = quantize3_ord_dither;
+    else
+      cquantize->pub.color_quantize = quantize_ord_dither;
+    cquantize->row_index = 0;	/* initialize state for ordered dither */
+    /* If user changed to ordered dither from another mode,
+     * we must recreate the color index table with padding.
+     * This will cost extra space, but probably isn't very likely.
+     */
+    if (! cquantize->is_padded)
+      create_colorindex(cinfo);
+    /* Create ordered-dither tables if we didn't already. */
+    if (cquantize->odither[0] == NULL)
+      create_odither_tables(cinfo);
+    break;
+  case JDITHER_FS:
+    cquantize->pub.color_quantize = quantize_fs_dither;
+    cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */
+    /* Allocate Floyd-Steinberg workspace if didn't already. */
+    if (cquantize->fserrors[0] == NULL)
+      alloc_fs_workspace(cinfo);
+    /* Initialize the propagated errors to zero. */
+    arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
+    for (i = 0; i < cinfo->out_color_components; i++)
+      jzero_far((void FAR *) cquantize->fserrors[i], arraysize);
+    break;
+  default:
+    ERREXIT(cinfo, JERR_NOT_COMPILED);
+    break;
+  }
+}
+
+
+/*
+ * Finish up at the end of the pass.
+ */
+
+METHODDEF(void)
+finish_pass_1_quant (j_decompress_ptr cinfo)
+{
+  /* no work in 1-pass case */
+}
+
+
+/*
+ * Switch to a new external colormap between output passes.
+ * Shouldn't get to this module!
+ */
+
+METHODDEF(void)
+new_color_map_1_quant (j_decompress_ptr cinfo)
+{
+  ERREXIT(cinfo, JERR_MODE_CHANGE);
+}
+
+
+/*
+ * Module initialization routine for 1-pass color quantization.
+ */
+
+GLOBAL(void)
+jinit_1pass_quantizer (j_decompress_ptr cinfo)
+{
+  my_cquantize_ptr cquantize;
+
+  cquantize = (my_cquantize_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_cquantizer));
+  cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
+  cquantize->pub.start_pass = start_pass_1_quant;
+  cquantize->pub.finish_pass = finish_pass_1_quant;
+  cquantize->pub.new_color_map = new_color_map_1_quant;
+  cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */
+  cquantize->odither[0] = NULL;	/* Also flag odither arrays not allocated */
+
+  /* Make sure my internal arrays won't overflow */
+  if (cinfo->out_color_components > MAX_Q_COMPS)
+    ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS);
+  /* Make sure colormap indexes can be represented by JSAMPLEs */
+  if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1))
+    ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1);
+
+  /* Create the colormap and color index table. */
+  create_colormap(cinfo);
+  create_colorindex(cinfo);
+
+  /* Allocate Floyd-Steinberg workspace now if requested.
+   * We do this now since it is FAR storage and may affect the memory
+   * manager's space calculations.  If the user changes to FS dither
+   * mode in a later pass, we will allocate the space then, and will
+   * possibly overrun the max_memory_to_use setting.
+   */
+  if (cinfo->dither_mode == JDITHER_FS)
+    alloc_fs_workspace(cinfo);
+}
+
+#endif /* QUANT_1PASS_SUPPORTED */
diff --git a/samples/jpeglib/jquant2.c b/samples/jpeglib/jquant2.c
new file mode 100644
index 0000000..af601e3
--- /dev/null
+++ b/samples/jpeglib/jquant2.c
@@ -0,0 +1,1310 @@
+/*
+ * jquant2.c
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains 2-pass color quantization (color mapping) routines.
+ * These routines provide selection of a custom color map for an image,
+ * followed by mapping of the image to that color map, with optional
+ * Floyd-Steinberg dithering.
+ * It is also possible to use just the second pass to map to an arbitrary
+ * externally-given color map.
+ *
+ * Note: ordered dithering is not supported, since there isn't any fast
+ * way to compute intercolor distances; it's unclear that ordered dither's
+ * fundamental assumptions even hold with an irregularly spaced color map.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+#ifdef QUANT_2PASS_SUPPORTED
+
+
+/*
+ * This module implements the well-known Heckbert paradigm for color
+ * quantization.  Most of the ideas used here can be traced back to
+ * Heckbert's seminal paper
+ *   Heckbert, Paul.  "Color Image Quantization for Frame Buffer Display",
+ *   Proc. SIGGRAPH '82, Computer Graphics v.16 #3 (July 1982), pp 297-304.
+ *
+ * In the first pass over the image, we accumulate a histogram showing the
+ * usage count of each possible color.  To keep the histogram to a reasonable
+ * size, we reduce the precision of the input; typical practice is to retain
+ * 5 or 6 bits per color, so that 8 or 4 different input values are counted
+ * in the same histogram cell.
+ *
+ * Next, the color-selection step begins with a box representing the whole
+ * color space, and repeatedly splits the "largest" remaining box until we
+ * have as many boxes as desired colors.  Then the mean color in each
+ * remaining box becomes one of the possible output colors.
+ * 
+ * The second pass over the image maps each input pixel to the closest output
+ * color (optionally after applying a Floyd-Steinberg dithering correction).
+ * This mapping is logically trivial, but making it go fast enough requires
+ * considerable care.
+ *
+ * Heckbert-style quantizers vary a good deal in their policies for choosing
+ * the "largest" box and deciding where to cut it.  The particular policies
+ * used here have proved out well in experimental comparisons, but better ones
+ * may yet be found.
+ *
+ * In earlier versions of the IJG code, this module quantized in YCbCr color
+ * space, processing the raw upsampled data without a color conversion step.
+ * This allowed the color conversion math to be done only once per colormap
+ * entry, not once per pixel.  However, that optimization precluded other
+ * useful optimizations (such as merging color conversion with upsampling)
+ * and it also interfered with desired capabilities such as quantizing to an
+ * externally-supplied colormap.  We have therefore abandoned that approach.
+ * The present code works in the post-conversion color space, typically RGB.
+ *
+ * To improve the visual quality of the results, we actually work in scaled
+ * RGB space, giving G distances more weight than R, and R in turn more than
+ * B.  To do everything in integer math, we must use integer scale factors.
+ * The 2/3/1 scale factors used here correspond loosely to the relative
+ * weights of the colors in the NTSC grayscale equation.
+ * If you want to use this code to quantize a non-RGB color space, you'll
+ * probably need to change these scale factors.
+ */
+
+#define R_SCALE 2		/* scale R distances by this much */
+#define G_SCALE 3		/* scale G distances by this much */
+#define B_SCALE 1		/* and B by this much */
+
+/* Relabel R/G/B as components 0/1/2, respecting the RGB ordering defined
+ * in jmorecfg.h.  As the code stands, it will do the right thing for R,G,B
+ * and B,G,R orders.  If you define some other weird order in jmorecfg.h,
+ * you'll get compile errors until you extend this logic.  In that case
+ * you'll probably want to tweak the histogram sizes too.
+ */
+
+#if RGB_RED == 0
+#define C0_SCALE R_SCALE
+#endif
+#if RGB_BLUE == 0
+#define C0_SCALE B_SCALE
+#endif
+#if RGB_GREEN == 1
+#define C1_SCALE G_SCALE
+#endif
+#if RGB_RED == 2
+#define C2_SCALE R_SCALE
+#endif
+#if RGB_BLUE == 2
+#define C2_SCALE B_SCALE
+#endif
+
+
+/*
+ * First we have the histogram data structure and routines for creating it.
+ *
+ * The number of bits of precision can be adjusted by changing these symbols.
+ * We recommend keeping 6 bits for G and 5 each for R and B.
+ * If you have plenty of memory and cycles, 6 bits all around gives marginally
+ * better results; if you are short of memory, 5 bits all around will save
+ * some space but degrade the results.
+ * To maintain a fully accurate histogram, we'd need to allocate a "long"
+ * (preferably unsigned long) for each cell.  In practice this is overkill;
+ * we can get by with 16 bits per cell.  Few of the cell counts will overflow,
+ * and clamping those that do overflow to the maximum value will give close-
+ * enough results.  This reduces the recommended histogram size from 256Kb
+ * to 128Kb, which is a useful savings on PC-class machines.
+ * (In the second pass the histogram space is re-used for pixel mapping data;
+ * in that capacity, each cell must be able to store zero to the number of
+ * desired colors.  16 bits/cell is plenty for that too.)
+ * Since the JPEG code is intended to run in small memory model on 80x86
+ * machines, we can't just allocate the histogram in one chunk.  Instead
+ * of a true 3-D array, we use a row of pointers to 2-D arrays.  Each
+ * pointer corresponds to a C0 value (typically 2^5 = 32 pointers) and
+ * each 2-D array has 2^6*2^5 = 2048 or 2^6*2^6 = 4096 entries.  Note that
+ * on 80x86 machines, the pointer row is in near memory but the actual
+ * arrays are in far memory (same arrangement as we use for image arrays).
+ */
+
+#define MAXNUMCOLORS  (MAXJSAMPLE+1) /* maximum size of colormap */
+
+/* These will do the right thing for either R,G,B or B,G,R color order,
+ * but you may not like the results for other color orders.
+ */
+#define HIST_C0_BITS  5		/* bits of precision in R/B histogram */
+#define HIST_C1_BITS  6		/* bits of precision in G histogram */
+#define HIST_C2_BITS  5		/* bits of precision in B/R histogram */
+
+/* Number of elements along histogram axes. */
+#define HIST_C0_ELEMS  (1<<HIST_C0_BITS)
+#define HIST_C1_ELEMS  (1<<HIST_C1_BITS)
+#define HIST_C2_ELEMS  (1<<HIST_C2_BITS)
+
+/* These are the amounts to shift an input value to get a histogram index. */
+#define C0_SHIFT  (BITS_IN_JSAMPLE-HIST_C0_BITS)
+#define C1_SHIFT  (BITS_IN_JSAMPLE-HIST_C1_BITS)
+#define C2_SHIFT  (BITS_IN_JSAMPLE-HIST_C2_BITS)
+
+
+typedef UINT16 histcell;	/* histogram cell; prefer an unsigned type */
+
+typedef histcell FAR * histptr;	/* for pointers to histogram cells */
+
+typedef histcell hist1d[HIST_C2_ELEMS]; /* typedefs for the array */
+typedef hist1d FAR * hist2d;	/* type for the 2nd-level pointers */
+typedef hist2d * hist3d;	/* type for top-level pointer */
+
+
+/* Declarations for Floyd-Steinberg dithering.
+ *
+ * Errors are accumulated into the array fserrors[], at a resolution of
+ * 1/16th of a pixel count.  The error at a given pixel is propagated
+ * to its not-yet-processed neighbors using the standard F-S fractions,
+ *		...	(here)	7/16
+ *		3/16	5/16	1/16
+ * We work left-to-right on even rows, right-to-left on odd rows.
+ *
+ * We can get away with a single array (holding one row's worth of errors)
+ * by using it to store the current row's errors at pixel columns not yet
+ * processed, but the next row's errors at columns already processed.  We
+ * need only a few extra variables to hold the errors immediately around the
+ * current column.  (If we are lucky, those variables are in registers, but
+ * even if not, they're probably cheaper to access than array elements are.)
+ *
+ * The fserrors[] array has (#columns + 2) entries; the extra entry at
+ * each end saves us from special-casing the first and last pixels.
+ * Each entry is three values long, one value for each color component.
+ *
+ * Note: on a wide image, we might not have enough room in a PC's near data
+ * segment to hold the error array; so it is allocated with alloc_large.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+typedef INT16 FSERROR;		/* 16 bits should be enough */
+typedef int LOCFSERROR;		/* use 'int' for calculation temps */
+#else
+typedef INT32 FSERROR;		/* may need more than 16 bits */
+typedef INT32 LOCFSERROR;	/* be sure calculation temps are big enough */
+#endif
+
+typedef FSERROR FAR *FSERRPTR;	/* pointer to error array (in FAR storage!) */
+
+
+/* Private subobject */
+
+typedef struct {
+  struct jpeg_color_quantizer pub; /* public fields */
+
+  /* Space for the eventually created colormap is stashed here */
+  JSAMPARRAY sv_colormap;	/* colormap allocated at init time */
+  int desired;			/* desired # of colors = size of colormap */
+
+  /* Variables for accumulating image statistics */
+  hist3d histogram;		/* pointer to the histogram */
+
+  boolean needs_zeroed;		/* TRUE if next pass must zero histogram */
+
+  /* Variables for Floyd-Steinberg dithering */
+  FSERRPTR fserrors;		/* accumulated errors */
+  boolean on_odd_row;		/* flag to remember which row we are on */
+  int * error_limiter;		/* table for clamping the applied error */
+} my_cquantizer;
+
+typedef my_cquantizer * my_cquantize_ptr;
+
+
+/*
+ * Prescan some rows of pixels.
+ * In this module the prescan simply updates the histogram, which has been
+ * initialized to zeroes by start_pass.
+ * An output_buf parameter is required by the method signature, but no data
+ * is actually output (in fact the buffer controller is probably passing a
+ * NULL pointer).
+ */
+
+METHODDEF(void)
+prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
+		  JSAMPARRAY output_buf, int num_rows)
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  register JSAMPROW ptr;
+  register histptr histp;
+  register hist3d histogram = cquantize->histogram;
+  int row;
+  JDIMENSION col;
+  JDIMENSION width = cinfo->output_width;
+
+  for (row = 0; row < num_rows; row++) {
+    ptr = input_buf[row];
+    for (col = width; col > 0; col--) {
+      /* get pixel value and index into the histogram */
+      histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT]
+			 [GETJSAMPLE(ptr[1]) >> C1_SHIFT]
+			 [GETJSAMPLE(ptr[2]) >> C2_SHIFT];
+      /* increment, check for overflow and undo increment if so. */
+      if (++(*histp) <= 0)
+	(*histp)--;
+      ptr += 3;
+    }
+  }
+}
+
+
+/*
+ * Next we have the really interesting routines: selection of a colormap
+ * given the completed histogram.
+ * These routines work with a list of "boxes", each representing a rectangular
+ * subset of the input color space (to histogram precision).
+ */
+
+typedef struct {
+  /* The bounds of the box (inclusive); expressed as histogram indexes */
+  int c0min, c0max;
+  int c1min, c1max;
+  int c2min, c2max;
+  /* The volume (actually 2-norm) of the box */
+  INT32 volume;
+  /* The number of nonzero histogram cells within this box */
+  long colorcount;
+} box;
+
+typedef box * boxptr;
+
+
+LOCAL(boxptr)
+find_biggest_color_pop (boxptr boxlist, int numboxes)
+/* Find the splittable box with the largest color population */
+/* Returns NULL if no splittable boxes remain */
+{
+  register boxptr boxp;
+  register int i;
+  register long maxc = 0;
+  boxptr which = NULL;
+  
+  for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
+    if (boxp->colorcount > maxc && boxp->volume > 0) {
+      which = boxp;
+      maxc = boxp->colorcount;
+    }
+  }
+  return which;
+}
+
+
+LOCAL(boxptr)
+find_biggest_volume (boxptr boxlist, int numboxes)
+/* Find the splittable box with the largest (scaled) volume */
+/* Returns NULL if no splittable boxes remain */
+{
+  register boxptr boxp;
+  register int i;
+  register INT32 maxv = 0;
+  boxptr which = NULL;
+  
+  for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
+    if (boxp->volume > maxv) {
+      which = boxp;
+      maxv = boxp->volume;
+    }
+  }
+  return which;
+}
+
+
+LOCAL(void)
+update_box (j_decompress_ptr cinfo, boxptr boxp)
+/* Shrink the min/max bounds of a box to enclose only nonzero elements, */
+/* and recompute its volume and population */
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  hist3d histogram = cquantize->histogram;
+  histptr histp;
+  int c0,c1,c2;
+  int c0min,c0max,c1min,c1max,c2min,c2max;
+  INT32 dist0,dist1,dist2;
+  long ccount;
+  
+  c0min = boxp->c0min;  c0max = boxp->c0max;
+  c1min = boxp->c1min;  c1max = boxp->c1max;
+  c2min = boxp->c2min;  c2max = boxp->c2max;
+  
+  if (c0max > c0min)
+    for (c0 = c0min; c0 <= c0max; c0++)
+      for (c1 = c1min; c1 <= c1max; c1++) {
+	histp = & histogram[c0][c1][c2min];
+	for (c2 = c2min; c2 <= c2max; c2++)
+	  if (*histp++ != 0) {
+	    boxp->c0min = c0min = c0;
+	    goto have_c0min;
+	  }
+      }
+ have_c0min:
+  if (c0max > c0min)
+    for (c0 = c0max; c0 >= c0min; c0--)
+      for (c1 = c1min; c1 <= c1max; c1++) {
+	histp = & histogram[c0][c1][c2min];
+	for (c2 = c2min; c2 <= c2max; c2++)
+	  if (*histp++ != 0) {
+	    boxp->c0max = c0max = c0;
+	    goto have_c0max;
+	  }
+      }
+ have_c0max:
+  if (c1max > c1min)
+    for (c1 = c1min; c1 <= c1max; c1++)
+      for (c0 = c0min; c0 <= c0max; c0++) {
+	histp = & histogram[c0][c1][c2min];
+	for (c2 = c2min; c2 <= c2max; c2++)
+	  if (*histp++ != 0) {
+	    boxp->c1min = c1min = c1;
+	    goto have_c1min;
+	  }
+      }
+ have_c1min:
+  if (c1max > c1min)
+    for (c1 = c1max; c1 >= c1min; c1--)
+      for (c0 = c0min; c0 <= c0max; c0++) {
+	histp = & histogram[c0][c1][c2min];
+	for (c2 = c2min; c2 <= c2max; c2++)
+	  if (*histp++ != 0) {
+	    boxp->c1max = c1max = c1;
+	    goto have_c1max;
+	  }
+      }
+ have_c1max:
+  if (c2max > c2min)
+    for (c2 = c2min; c2 <= c2max; c2++)
+      for (c0 = c0min; c0 <= c0max; c0++) {
+	histp = & histogram[c0][c1min][c2];
+	for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS)
+	  if (*histp != 0) {
+	    boxp->c2min = c2min = c2;
+	    goto have_c2min;
+	  }
+      }
+ have_c2min:
+  if (c2max > c2min)
+    for (c2 = c2max; c2 >= c2min; c2--)
+      for (c0 = c0min; c0 <= c0max; c0++) {
+	histp = & histogram[c0][c1min][c2];
+	for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS)
+	  if (*histp != 0) {
+	    boxp->c2max = c2max = c2;
+	    goto have_c2max;
+	  }
+      }
+ have_c2max:
+
+  /* Update box volume.
+   * We use 2-norm rather than real volume here; this biases the method
+   * against making long narrow boxes, and it has the side benefit that
+   * a box is splittable iff norm > 0.
+   * Since the differences are expressed in histogram-cell units,
+   * we have to shift back to JSAMPLE units to get consistent distances;
+   * after which, we scale according to the selected distance scale factors.
+   */
+  dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE;
+  dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE;
+  dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE;
+  boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2;
+  
+  /* Now scan remaining volume of box and compute population */
+  ccount = 0;
+  for (c0 = c0min; c0 <= c0max; c0++)
+    for (c1 = c1min; c1 <= c1max; c1++) {
+      histp = & histogram[c0][c1][c2min];
+      for (c2 = c2min; c2 <= c2max; c2++, histp++)
+	if (*histp != 0) {
+	  ccount++;
+	}
+    }
+  boxp->colorcount = ccount;
+}
+
+
+LOCAL(int)
+median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes,
+	    int desired_colors)
+/* Repeatedly select and split the largest box until we have enough boxes */
+{
+  int n,lb;
+  int c0,c1,c2,cmax;
+  register boxptr b1,b2;
+
+  while (numboxes < desired_colors) {
+    /* Select box to split.
+     * Current algorithm: by population for first half, then by volume.
+     */
+    if (numboxes*2 <= desired_colors) {
+      b1 = find_biggest_color_pop(boxlist, numboxes);
+    } else {
+      b1 = find_biggest_volume(boxlist, numboxes);
+    }
+    if (b1 == NULL)		/* no splittable boxes left! */
+      break;
+    b2 = &boxlist[numboxes];	/* where new box will go */
+    /* Copy the color bounds to the new box. */
+    b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max;
+    b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min;
+    /* Choose which axis to split the box on.
+     * Current algorithm: longest scaled axis.
+     * See notes in update_box about scaling distances.
+     */
+    c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE;
+    c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE;
+    c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE;
+    /* We want to break any ties in favor of green, then red, blue last.
+     * This code does the right thing for R,G,B or B,G,R color orders only.
+     */
+#if RGB_RED == 0
+    cmax = c1; n = 1;
+    if (c0 > cmax) { cmax = c0; n = 0; }
+    if (c2 > cmax) { n = 2; }
+#else
+    cmax = c1; n = 1;
+    if (c2 > cmax) { cmax = c2; n = 2; }
+    if (c0 > cmax) { n = 0; }
+#endif
+    /* Choose split point along selected axis, and update box bounds.
+     * Current algorithm: split at halfway point.
+     * (Since the box has been shrunk to minimum volume,
+     * any split will produce two nonempty subboxes.)
+     * Note that lb value is max for lower box, so must be < old max.
+     */
+    switch (n) {
+    case 0:
+      lb = (b1->c0max + b1->c0min) / 2;
+      b1->c0max = lb;
+      b2->c0min = lb+1;
+      break;
+    case 1:
+      lb = (b1->c1max + b1->c1min) / 2;
+      b1->c1max = lb;
+      b2->c1min = lb+1;
+      break;
+    case 2:
+      lb = (b1->c2max + b1->c2min) / 2;
+      b1->c2max = lb;
+      b2->c2min = lb+1;
+      break;
+    }
+    /* Update stats for boxes */
+    update_box(cinfo, b1);
+    update_box(cinfo, b2);
+    numboxes++;
+  }
+  return numboxes;
+}
+
+
+LOCAL(void)
+compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor)
+/* Compute representative color for a box, put it in colormap[icolor] */
+{
+  /* Current algorithm: mean weighted by pixels (not colors) */
+  /* Note it is important to get the rounding correct! */
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  hist3d histogram = cquantize->histogram;
+  histptr histp;
+  int c0,c1,c2;
+  int c0min,c0max,c1min,c1max,c2min,c2max;
+  long count;
+  long total = 0;
+  long c0total = 0;
+  long c1total = 0;
+  long c2total = 0;
+  
+  c0min = boxp->c0min;  c0max = boxp->c0max;
+  c1min = boxp->c1min;  c1max = boxp->c1max;
+  c2min = boxp->c2min;  c2max = boxp->c2max;
+  
+  for (c0 = c0min; c0 <= c0max; c0++)
+    for (c1 = c1min; c1 <= c1max; c1++) {
+      histp = & histogram[c0][c1][c2min];
+      for (c2 = c2min; c2 <= c2max; c2++) {
+	if ((count = *histp++) != 0) {
+	  total += count;
+	  c0total += ((c0 << C0_SHIFT) + ((1<<C0_SHIFT)>>1)) * count;
+	  c1total += ((c1 << C1_SHIFT) + ((1<<C1_SHIFT)>>1)) * count;
+	  c2total += ((c2 << C2_SHIFT) + ((1<<C2_SHIFT)>>1)) * count;
+	}
+      }
+    }
+  
+  cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total);
+  cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total);
+  cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total);
+}
+
+
+LOCAL(void)
+select_colors (j_decompress_ptr cinfo, int desired_colors)
+/* Master routine for color selection */
+{
+  boxptr boxlist;
+  int numboxes;
+  int i;
+
+  /* Allocate workspace for box list */
+  boxlist = (boxptr) (*cinfo->mem->alloc_small)
+    ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box));
+  /* Initialize one box containing whole space */
+  numboxes = 1;
+  boxlist[0].c0min = 0;
+  boxlist[0].c0max = MAXJSAMPLE >> C0_SHIFT;
+  boxlist[0].c1min = 0;
+  boxlist[0].c1max = MAXJSAMPLE >> C1_SHIFT;
+  boxlist[0].c2min = 0;
+  boxlist[0].c2max = MAXJSAMPLE >> C2_SHIFT;
+  /* Shrink it to actually-used volume and set its statistics */
+  update_box(cinfo, & boxlist[0]);
+  /* Perform median-cut to produce final box list */
+  numboxes = median_cut(cinfo, boxlist, numboxes, desired_colors);
+  /* Compute the representative color for each box, fill colormap */
+  for (i = 0; i < numboxes; i++)
+    compute_color(cinfo, & boxlist[i], i);
+  cinfo->actual_number_of_colors = numboxes;
+  TRACEMS1(cinfo, 1, JTRC_QUANT_SELECTED, numboxes);
+}
+
+
+/*
+ * These routines are concerned with the time-critical task of mapping input
+ * colors to the nearest color in the selected colormap.
+ *
+ * We re-use the histogram space as an "inverse color map", essentially a
+ * cache for the results of nearest-color searches.  All colors within a
+ * histogram cell will be mapped to the same colormap entry, namely the one
+ * closest to the cell's center.  This may not be quite the closest entry to
+ * the actual input color, but it's almost as good.  A zero in the cache
+ * indicates we haven't found the nearest color for that cell yet; the array
+ * is cleared to zeroes before starting the mapping pass.  When we find the
+ * nearest color for a cell, its colormap index plus one is recorded in the
+ * cache for future use.  The pass2 scanning routines call fill_inverse_cmap
+ * when they need to use an unfilled entry in the cache.
+ *
+ * Our method of efficiently finding nearest colors is based on the "locally
+ * sorted search" idea described by Heckbert and on the incremental distance
+ * calculation described by Spencer W. Thomas in chapter III.1 of Graphics
+ * Gems II (James Arvo, ed.  Academic Press, 1991).  Thomas points out that
+ * the distances from a given colormap entry to each cell of the histogram can
+ * be computed quickly using an incremental method: the differences between
+ * distances to adjacent cells themselves differ by a constant.  This allows a
+ * fairly fast implementation of the "brute force" approach of computing the
+ * distance from every colormap entry to every histogram cell.  Unfortunately,
+ * it needs a work array to hold the best-distance-so-far for each histogram
+ * cell (because the inner loop has to be over cells, not colormap entries).
+ * The work array elements have to be INT32s, so the work array would need
+ * 256Kb at our recommended precision.  This is not feasible in DOS machines.
+ *
+ * To get around these problems, we apply Thomas' method to compute the
+ * nearest colors for only the cells within a small subbox of the histogram.
+ * The work array need be only as big as the subbox, so the memory usage
+ * problem is solved.  Furthermore, we need not fill subboxes that are never
+ * referenced in pass2; many images use only part of the color gamut, so a
+ * fair amount of work is saved.  An additional advantage of this
+ * approach is that we can apply Heckbert's locality criterion to quickly
+ * eliminate colormap entries that are far away from the subbox; typically
+ * three-fourths of the colormap entries are rejected by Heckbert's criterion,
+ * and we need not compute their distances to individual cells in the subbox.
+ * The speed of this approach is heavily influenced by the subbox size: too
+ * small means too much overhead, too big loses because Heckbert's criterion
+ * can't eliminate as many colormap entries.  Empirically the best subbox
+ * size seems to be about 1/512th of the histogram (1/8th in each direction).
+ *
+ * Thomas' article also describes a refined method which is asymptotically
+ * faster than the brute-force method, but it is also far more complex and
+ * cannot efficiently be applied to small subboxes.  It is therefore not
+ * useful for programs intended to be portable to DOS machines.  On machines
+ * with plenty of memory, filling the whole histogram in one shot with Thomas'
+ * refined method might be faster than the present code --- but then again,
+ * it might not be any faster, and it's certainly more complicated.
+ */
+
+
+/* log2(histogram cells in update box) for each axis; this can be adjusted */
+#define BOX_C0_LOG  (HIST_C0_BITS-3)
+#define BOX_C1_LOG  (HIST_C1_BITS-3)
+#define BOX_C2_LOG  (HIST_C2_BITS-3)
+
+#define BOX_C0_ELEMS  (1<<BOX_C0_LOG) /* # of hist cells in update box */
+#define BOX_C1_ELEMS  (1<<BOX_C1_LOG)
+#define BOX_C2_ELEMS  (1<<BOX_C2_LOG)
+
+#define BOX_C0_SHIFT  (C0_SHIFT + BOX_C0_LOG)
+#define BOX_C1_SHIFT  (C1_SHIFT + BOX_C1_LOG)
+#define BOX_C2_SHIFT  (C2_SHIFT + BOX_C2_LOG)
+
+
+/*
+ * The next three routines implement inverse colormap filling.  They could
+ * all be folded into one big routine, but splitting them up this way saves
+ * some stack space (the mindist[] and bestdist[] arrays need not coexist)
+ * and may allow some compilers to produce better code by registerizing more
+ * inner-loop variables.
+ */
+
+LOCAL(int)
+find_nearby_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,
+		    JSAMPLE colorlist[])
+/* Locate the colormap entries close enough to an update box to be candidates
+ * for the nearest entry to some cell(s) in the update box.  The update box
+ * is specified by the center coordinates of its first cell.  The number of
+ * candidate colormap entries is returned, and their colormap indexes are
+ * placed in colorlist[].
+ * This routine uses Heckbert's "locally sorted search" criterion to select
+ * the colors that need further consideration.
+ */
+{
+  int numcolors = cinfo->actual_number_of_colors;
+  int maxc0, maxc1, maxc2;
+  int centerc0, centerc1, centerc2;
+  int i, x, ncolors;
+  INT32 minmaxdist, min_dist, max_dist, tdist;
+  INT32 mindist[MAXNUMCOLORS];	/* min distance to colormap entry i */
+
+  /* Compute true coordinates of update box's upper corner and center.
+   * Actually we compute the coordinates of the center of the upper-corner
+   * histogram cell, which are the upper bounds of the volume we care about.
+   * Note that since ">>" rounds down, the "center" values may be closer to
+   * min than to max; hence comparisons to them must be "<=", not "<".
+   */
+  maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT));
+  centerc0 = (minc0 + maxc0) >> 1;
+  maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT));
+  centerc1 = (minc1 + maxc1) >> 1;
+  maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT));
+  centerc2 = (minc2 + maxc2) >> 1;
+
+  /* For each color in colormap, find:
+   *  1. its minimum squared-distance to any point in the update box
+   *     (zero if color is within update box);
+   *  2. its maximum squared-distance to any point in the update box.
+   * Both of these can be found by considering only the corners of the box.
+   * We save the minimum distance for each color in mindist[];
+   * only the smallest maximum distance is of interest.
+   */
+  minmaxdist = 0x7FFFFFFFL;
+
+  for (i = 0; i < numcolors; i++) {
+    /* We compute the squared-c0-distance term, then add in the other two. */
+    x = GETJSAMPLE(cinfo->colormap[0][i]);
+    if (x < minc0) {
+      tdist = (x - minc0) * C0_SCALE;
+      min_dist = tdist*tdist;
+      tdist = (x - maxc0) * C0_SCALE;
+      max_dist = tdist*tdist;
+    } else if (x > maxc0) {
+      tdist = (x - maxc0) * C0_SCALE;
+      min_dist = tdist*tdist;
+      tdist = (x - minc0) * C0_SCALE;
+      max_dist = tdist*tdist;
+    } else {
+      /* within cell range so no contribution to min_dist */
+      min_dist = 0;
+      if (x <= centerc0) {
+	tdist = (x - maxc0) * C0_SCALE;
+	max_dist = tdist*tdist;
+      } else {
+	tdist = (x - minc0) * C0_SCALE;
+	max_dist = tdist*tdist;
+      }
+    }
+
+    x = GETJSAMPLE(cinfo->colormap[1][i]);
+    if (x < minc1) {
+      tdist = (x - minc1) * C1_SCALE;
+      min_dist += tdist*tdist;
+      tdist = (x - maxc1) * C1_SCALE;
+      max_dist += tdist*tdist;
+    } else if (x > maxc1) {
+      tdist = (x - maxc1) * C1_SCALE;
+      min_dist += tdist*tdist;
+      tdist = (x - minc1) * C1_SCALE;
+      max_dist += tdist*tdist;
+    } else {
+      /* within cell range so no contribution to min_dist */
+      if (x <= centerc1) {
+	tdist = (x - maxc1) * C1_SCALE;
+	max_dist += tdist*tdist;
+      } else {
+	tdist = (x - minc1) * C1_SCALE;
+	max_dist += tdist*tdist;
+      }
+    }
+
+    x = GETJSAMPLE(cinfo->colormap[2][i]);
+    if (x < minc2) {
+      tdist = (x - minc2) * C2_SCALE;
+      min_dist += tdist*tdist;
+      tdist = (x - maxc2) * C2_SCALE;
+      max_dist += tdist*tdist;
+    } else if (x > maxc2) {
+      tdist = (x - maxc2) * C2_SCALE;
+      min_dist += tdist*tdist;
+      tdist = (x - minc2) * C2_SCALE;
+      max_dist += tdist*tdist;
+    } else {
+      /* within cell range so no contribution to min_dist */
+      if (x <= centerc2) {
+	tdist = (x - maxc2) * C2_SCALE;
+	max_dist += tdist*tdist;
+      } else {
+	tdist = (x - minc2) * C2_SCALE;
+	max_dist += tdist*tdist;
+      }
+    }
+
+    mindist[i] = min_dist;	/* save away the results */
+    if (max_dist < minmaxdist)
+      minmaxdist = max_dist;
+  }
+
+  /* Now we know that no cell in the update box is more than minmaxdist
+   * away from some colormap entry.  Therefore, only colors that are
+   * within minmaxdist of some part of the box need be considered.
+   */
+  ncolors = 0;
+  for (i = 0; i < numcolors; i++) {
+    if (mindist[i] <= minmaxdist)
+      colorlist[ncolors++] = (JSAMPLE) i;
+  }
+  return ncolors;
+}
+
+
+LOCAL(void)
+find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,
+		  int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[])
+/* Find the closest colormap entry for each cell in the update box,
+ * given the list of candidate colors prepared by find_nearby_colors.
+ * Return the indexes of the closest entries in the bestcolor[] array.
+ * This routine uses Thomas' incremental distance calculation method to
+ * find the distance from a colormap entry to successive cells in the box.
+ */
+{
+  int ic0, ic1, ic2;
+  int i, icolor;
+  register INT32 * bptr;	/* pointer into bestdist[] array */
+  JSAMPLE * cptr;		/* pointer into bestcolor[] array */
+  INT32 dist0, dist1;		/* initial distance values */
+  register INT32 dist2;		/* current distance in inner loop */
+  INT32 xx0, xx1;		/* distance increments */
+  register INT32 xx2;
+  INT32 inc0, inc1, inc2;	/* initial values for increments */
+  /* This array holds the distance to the nearest-so-far color for each cell */
+  INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];
+
+  /* Initialize best-distance for each cell of the update box */
+  bptr = bestdist;
+  for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--)
+    *bptr++ = 0x7FFFFFFFL;
+  
+  /* For each color selected by find_nearby_colors,
+   * compute its distance to the center of each cell in the box.
+   * If that's less than best-so-far, update best distance and color number.
+   */
+  
+  /* Nominal steps between cell centers ("x" in Thomas article) */
+#define STEP_C0  ((1 << C0_SHIFT) * C0_SCALE)
+#define STEP_C1  ((1 << C1_SHIFT) * C1_SCALE)
+#define STEP_C2  ((1 << C2_SHIFT) * C2_SCALE)
+  
+  for (i = 0; i < numcolors; i++) {
+    icolor = GETJSAMPLE(colorlist[i]);
+    /* Compute (square of) distance from minc0/c1/c2 to this color */
+    inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE;
+    dist0 = inc0*inc0;
+    inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE;
+    dist0 += inc1*inc1;
+    inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE;
+    dist0 += inc2*inc2;
+    /* Form the initial difference increments */
+    inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0;
+    inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1;
+    inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2;
+    /* Now loop over all cells in box, updating distance per Thomas method */
+    bptr = bestdist;
+    cptr = bestcolor;
+    xx0 = inc0;
+    for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) {
+      dist1 = dist0;
+      xx1 = inc1;
+      for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) {
+	dist2 = dist1;
+	xx2 = inc2;
+	for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) {
+	  if (dist2 < *bptr) {
+	    *bptr = dist2;
+	    *cptr = (JSAMPLE) icolor;
+	  }
+	  dist2 += xx2;
+	  xx2 += 2 * STEP_C2 * STEP_C2;
+	  bptr++;
+	  cptr++;
+	}
+	dist1 += xx1;
+	xx1 += 2 * STEP_C1 * STEP_C1;
+      }
+      dist0 += xx0;
+      xx0 += 2 * STEP_C0 * STEP_C0;
+    }
+  }
+}
+
+
+LOCAL(void)
+fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2)
+/* Fill the inverse-colormap entries in the update box that contains */
+/* histogram cell c0/c1/c2.  (Only that one cell MUST be filled, but */
+/* we can fill as many others as we wish.) */
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  hist3d histogram = cquantize->histogram;
+  int minc0, minc1, minc2;	/* lower left corner of update box */
+  int ic0, ic1, ic2;
+  register JSAMPLE * cptr;	/* pointer into bestcolor[] array */
+  register histptr cachep;	/* pointer into main cache array */
+  /* This array lists the candidate colormap indexes. */
+  JSAMPLE colorlist[MAXNUMCOLORS];
+  int numcolors;		/* number of candidate colors */
+  /* This array holds the actually closest colormap index for each cell. */
+  JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];
+
+  /* Convert cell coordinates to update box ID */
+  c0 >>= BOX_C0_LOG;
+  c1 >>= BOX_C1_LOG;
+  c2 >>= BOX_C2_LOG;
+
+  /* Compute true coordinates of update box's origin corner.
+   * Actually we compute the coordinates of the center of the corner
+   * histogram cell, which are the lower bounds of the volume we care about.
+   */
+  minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1);
+  minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1);
+  minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1);
+  
+  /* Determine which colormap entries are close enough to be candidates
+   * for the nearest entry to some cell in the update box.
+   */
+  numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist);
+
+  /* Determine the actually nearest colors. */
+  find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist,
+		   bestcolor);
+
+  /* Save the best color numbers (plus 1) in the main cache array */
+  c0 <<= BOX_C0_LOG;		/* convert ID back to base cell indexes */
+  c1 <<= BOX_C1_LOG;
+  c2 <<= BOX_C2_LOG;
+  cptr = bestcolor;
+  for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) {
+    for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) {
+      cachep = & histogram[c0+ic0][c1+ic1][c2];
+      for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) {
+	*cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1);
+      }
+    }
+  }
+}
+
+
+/*
+ * Map some rows of pixels to the output colormapped representation.
+ */
+
+METHODDEF(void)
+pass2_no_dither (j_decompress_ptr cinfo,
+		 JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)
+/* This version performs no dithering */
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  hist3d histogram = cquantize->histogram;
+  register JSAMPROW inptr, outptr;
+  register histptr cachep;
+  register int c0, c1, c2;
+  int row;
+  JDIMENSION col;
+  JDIMENSION width = cinfo->output_width;
+
+  for (row = 0; row < num_rows; row++) {
+    inptr = input_buf[row];
+    outptr = output_buf[row];
+    for (col = width; col > 0; col--) {
+      /* get pixel value and index into the cache */
+      c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT;
+      c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT;
+      c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT;
+      cachep = & histogram[c0][c1][c2];
+      /* If we have not seen this color before, find nearest colormap entry */
+      /* and update the cache */
+      if (*cachep == 0)
+	fill_inverse_cmap(cinfo, c0,c1,c2);
+      /* Now emit the colormap index for this cell */
+      *outptr++ = (JSAMPLE) (*cachep - 1);
+    }
+  }
+}
+
+
+METHODDEF(void)
+pass2_fs_dither (j_decompress_ptr cinfo,
+		 JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)
+/* This version performs Floyd-Steinberg dithering */
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  hist3d histogram = cquantize->histogram;
+  register LOCFSERROR cur0, cur1, cur2;	/* current error or pixel value */
+  LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */
+  LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */
+  register FSERRPTR errorptr;	/* => fserrors[] at column before current */
+  JSAMPROW inptr;		/* => current input pixel */
+  JSAMPROW outptr;		/* => current output pixel */
+  histptr cachep;
+  int dir;			/* +1 or -1 depending on direction */
+  int dir3;			/* 3*dir, for advancing inptr & errorptr */
+  int row;
+  JDIMENSION col;
+  JDIMENSION width = cinfo->output_width;
+  JSAMPLE *range_limit = cinfo->sample_range_limit;
+  int *error_limit = cquantize->error_limiter;
+  JSAMPROW colormap0 = cinfo->colormap[0];
+  JSAMPROW colormap1 = cinfo->colormap[1];
+  JSAMPROW colormap2 = cinfo->colormap[2];
+  SHIFT_TEMPS
+
+  for (row = 0; row < num_rows; row++) {
+    inptr = input_buf[row];
+    outptr = output_buf[row];
+    if (cquantize->on_odd_row) {
+      /* work right to left in this row */
+      inptr += (width-1) * 3;	/* so point to rightmost pixel */
+      outptr += width-1;
+      dir = -1;
+      dir3 = -3;
+      errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */
+      cquantize->on_odd_row = FALSE; /* flip for next time */
+    } else {
+      /* work left to right in this row */
+      dir = 1;
+      dir3 = 3;
+      errorptr = cquantize->fserrors; /* => entry before first real column */
+      cquantize->on_odd_row = TRUE; /* flip for next time */
+    }
+    /* Preset error values: no error propagated to first pixel from left */
+    cur0 = cur1 = cur2 = 0;
+    /* and no error propagated to row below yet */
+    belowerr0 = belowerr1 = belowerr2 = 0;
+    bpreverr0 = bpreverr1 = bpreverr2 = 0;
+
+    for (col = width; col > 0; col--) {
+      /* curN holds the error propagated from the previous pixel on the
+       * current line.  Add the error propagated from the previous line
+       * to form the complete error correction term for this pixel, and
+       * round the error term (which is expressed * 16) to an integer.
+       * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct
+       * for either sign of the error value.
+       * Note: errorptr points to *previous* column's array entry.
+       */
+      cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4);
+      cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4);
+      cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4);
+      /* Limit the error using transfer function set by init_error_limit.
+       * See comments with init_error_limit for rationale.
+       */
+      cur0 = error_limit[cur0];
+      cur1 = error_limit[cur1];
+      cur2 = error_limit[cur2];
+      /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE.
+       * The maximum error is +- MAXJSAMPLE (or less with error limiting);
+       * this sets the required size of the range_limit array.
+       */
+      cur0 += GETJSAMPLE(inptr[0]);
+      cur1 += GETJSAMPLE(inptr[1]);
+      cur2 += GETJSAMPLE(inptr[2]);
+      cur0 = GETJSAMPLE(range_limit[cur0]);
+      cur1 = GETJSAMPLE(range_limit[cur1]);
+      cur2 = GETJSAMPLE(range_limit[cur2]);
+      /* Index into the cache with adjusted pixel value */
+      cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT];
+      /* If we have not seen this color before, find nearest colormap */
+      /* entry and update the cache */
+      if (*cachep == 0)
+	fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT);
+      /* Now emit the colormap index for this cell */
+      { register int pixcode = *cachep - 1;
+	*outptr = (JSAMPLE) pixcode;
+	/* Compute representation error for this pixel */
+	cur0 -= GETJSAMPLE(colormap0[pixcode]);
+	cur1 -= GETJSAMPLE(colormap1[pixcode]);
+	cur2 -= GETJSAMPLE(colormap2[pixcode]);
+      }
+      /* Compute error fractions to be propagated to adjacent pixels.
+       * Add these into the running sums, and simultaneously shift the
+       * next-line error sums left by 1 column.
+       */
+      { register LOCFSERROR bnexterr, delta;
+
+	bnexterr = cur0;	/* Process component 0 */
+	delta = cur0 * 2;
+	cur0 += delta;		/* form error * 3 */
+	errorptr[0] = (FSERROR) (bpreverr0 + cur0);
+	cur0 += delta;		/* form error * 5 */
+	bpreverr0 = belowerr0 + cur0;
+	belowerr0 = bnexterr;
+	cur0 += delta;		/* form error * 7 */
+	bnexterr = cur1;	/* Process component 1 */
+	delta = cur1 * 2;
+	cur1 += delta;		/* form error * 3 */
+	errorptr[1] = (FSERROR) (bpreverr1 + cur1);
+	cur1 += delta;		/* form error * 5 */
+	bpreverr1 = belowerr1 + cur1;
+	belowerr1 = bnexterr;
+	cur1 += delta;		/* form error * 7 */
+	bnexterr = cur2;	/* Process component 2 */
+	delta = cur2 * 2;
+	cur2 += delta;		/* form error * 3 */
+	errorptr[2] = (FSERROR) (bpreverr2 + cur2);
+	cur2 += delta;		/* form error * 5 */
+	bpreverr2 = belowerr2 + cur2;
+	belowerr2 = bnexterr;
+	cur2 += delta;		/* form error * 7 */
+      }
+      /* At this point curN contains the 7/16 error value to be propagated
+       * to the next pixel on the current line, and all the errors for the
+       * next line have been shifted over.  We are therefore ready to move on.
+       */
+      inptr += dir3;		/* Advance pixel pointers to next column */
+      outptr += dir;
+      errorptr += dir3;		/* advance errorptr to current column */
+    }
+    /* Post-loop cleanup: we must unload the final error values into the
+     * final fserrors[] entry.  Note we need not unload belowerrN because
+     * it is for the dummy column before or after the actual array.
+     */
+    errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */
+    errorptr[1] = (FSERROR) bpreverr1;
+    errorptr[2] = (FSERROR) bpreverr2;
+  }
+}
+
+
+/*
+ * Initialize the error-limiting transfer function (lookup table).
+ * The raw F-S error computation can potentially compute error values of up to
+ * +- MAXJSAMPLE.  But we want the maximum correction applied to a pixel to be
+ * much less, otherwise obviously wrong pixels will be created.  (Typical
+ * effects include weird fringes at color-area boundaries, isolated bright
+ * pixels in a dark area, etc.)  The standard advice for avoiding this problem
+ * is to ensure that the "corners" of the color cube are allocated as output
+ * colors; then repeated errors in the same direction cannot cause cascading
+ * error buildup.  However, that only prevents the error from getting
+ * completely out of hand; Aaron Giles reports that error limiting improves
+ * the results even with corner colors allocated.
+ * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty
+ * well, but the smoother transfer function used below is even better.  Thanks
+ * to Aaron Giles for this idea.
+ */
+
+LOCAL(void)
+init_error_limit (j_decompress_ptr cinfo)
+/* Allocate and fill in the error_limiter table */
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  int * table;
+  int in, out;
+
+  table = (int *) (*cinfo->mem->alloc_small)
+    ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE*2+1) * SIZEOF(int));
+  table += MAXJSAMPLE;		/* so can index -MAXJSAMPLE .. +MAXJSAMPLE */
+  cquantize->error_limiter = table;
+
+#define STEPSIZE ((MAXJSAMPLE+1)/16)
+  /* Map errors 1:1 up to +- MAXJSAMPLE/16 */
+  out = 0;
+  for (in = 0; in < STEPSIZE; in++, out++) {
+    table[in] = out; table[-in] = -out;
+  }
+  /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */
+  for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) {
+    table[in] = out; table[-in] = -out;
+  }
+  /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */
+  for (; in <= MAXJSAMPLE; in++) {
+    table[in] = out; table[-in] = -out;
+  }
+#undef STEPSIZE
+}
+
+
+/*
+ * Finish up at the end of each pass.
+ */
+
+METHODDEF(void)
+finish_pass1 (j_decompress_ptr cinfo)
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+
+  /* Select the representative colors and fill in cinfo->colormap */
+  cinfo->colormap = cquantize->sv_colormap;
+  select_colors(cinfo, cquantize->desired);
+  /* Force next pass to zero the color index table */
+  cquantize->needs_zeroed = TRUE;
+}
+
+
+METHODDEF(void)
+finish_pass2 (j_decompress_ptr cinfo)
+{
+  /* no work */
+}
+
+
+/*
+ * Initialize for each processing pass.
+ */
+
+METHODDEF(void)
+start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+  hist3d histogram = cquantize->histogram;
+  int i;
+
+  /* Only F-S dithering or no dithering is supported. */
+  /* If user asks for ordered dither, give him F-S. */
+  if (cinfo->dither_mode != JDITHER_NONE)
+    cinfo->dither_mode = JDITHER_FS;
+
+  if (is_pre_scan) {
+    /* Set up method pointers */
+    cquantize->pub.color_quantize = prescan_quantize;
+    cquantize->pub.finish_pass = finish_pass1;
+    cquantize->needs_zeroed = TRUE; /* Always zero histogram */
+  } else {
+    /* Set up method pointers */
+    if (cinfo->dither_mode == JDITHER_FS)
+      cquantize->pub.color_quantize = pass2_fs_dither;
+    else
+      cquantize->pub.color_quantize = pass2_no_dither;
+    cquantize->pub.finish_pass = finish_pass2;
+
+    /* Make sure color count is acceptable */
+    i = cinfo->actual_number_of_colors;
+    if (i < 1)
+      ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 1);
+    if (i > MAXNUMCOLORS)
+      ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);
+
+    if (cinfo->dither_mode == JDITHER_FS) {
+      size_t arraysize = (size_t) ((cinfo->output_width + 2) *
+				   (3 * SIZEOF(FSERROR)));
+      /* Allocate Floyd-Steinberg workspace if we didn't already. */
+      if (cquantize->fserrors == NULL)
+	cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)
+	  ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);
+      /* Initialize the propagated errors to zero. */
+      jzero_far((void FAR *) cquantize->fserrors, arraysize);
+      /* Make the error-limit table if we didn't already. */
+      if (cquantize->error_limiter == NULL)
+	init_error_limit(cinfo);
+      cquantize->on_odd_row = FALSE;
+    }
+
+  }
+  /* Zero the histogram or inverse color map, if necessary */
+  if (cquantize->needs_zeroed) {
+    for (i = 0; i < HIST_C0_ELEMS; i++) {
+      jzero_far((void FAR *) histogram[i],
+		HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell));
+    }
+    cquantize->needs_zeroed = FALSE;
+  }
+}
+
+
+/*
+ * Switch to a new external colormap between output passes.
+ */
+
+METHODDEF(void)
+new_color_map_2_quant (j_decompress_ptr cinfo)
+{
+  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
+
+  /* Reset the inverse color map */
+  cquantize->needs_zeroed = TRUE;
+}
+
+
+/*
+ * Module initialization routine for 2-pass color quantization.
+ */
+
+GLOBAL(void)
+jinit_2pass_quantizer (j_decompress_ptr cinfo)
+{
+  my_cquantize_ptr cquantize;
+  int i;
+
+  cquantize = (my_cquantize_ptr)
+    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				SIZEOF(my_cquantizer));
+  cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
+  cquantize->pub.start_pass = start_pass_2_quant;
+  cquantize->pub.new_color_map = new_color_map_2_quant;
+  cquantize->fserrors = NULL;	/* flag optional arrays not allocated */
+  cquantize->error_limiter = NULL;
+
+  /* Make sure jdmaster didn't give me a case I can't handle */
+  if (cinfo->out_color_components != 3)
+    ERREXIT(cinfo, JERR_NOTIMPL);
+
+  /* Allocate the histogram/inverse colormap storage */
+  cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small)
+    ((j_common_ptr) cinfo, JPOOL_IMAGE, HIST_C0_ELEMS * SIZEOF(hist2d));
+  for (i = 0; i < HIST_C0_ELEMS; i++) {
+    cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large)
+      ((j_common_ptr) cinfo, JPOOL_IMAGE,
+       HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell));
+  }
+  cquantize->needs_zeroed = TRUE; /* histogram is garbage now */
+
+  /* Allocate storage for the completed colormap, if required.
+   * We do this now since it is FAR storage and may affect
+   * the memory manager's space calculations.
+   */
+  if (cinfo->enable_2pass_quant) {
+    /* Make sure color count is acceptable */
+    int desired = cinfo->desired_number_of_colors;
+    /* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */
+    if (desired < 8)
+      ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 8);
+    /* Make sure colormap indexes can be represented by JSAMPLEs */
+    if (desired > MAXNUMCOLORS)
+      ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);
+    cquantize->sv_colormap = (*cinfo->mem->alloc_sarray)
+      ((j_common_ptr) cinfo,JPOOL_IMAGE, (JDIMENSION) desired, (JDIMENSION) 3);
+    cquantize->desired = desired;
+  } else
+    cquantize->sv_colormap = NULL;
+
+  /* Only F-S dithering or no dithering is supported. */
+  /* If user asks for ordered dither, give him F-S. */
+  if (cinfo->dither_mode != JDITHER_NONE)
+    cinfo->dither_mode = JDITHER_FS;
+
+  /* Allocate Floyd-Steinberg workspace if necessary.
+   * This isn't really needed until pass 2, but again it is FAR storage.
+   * Although we will cope with a later change in dither_mode,
+   * we do not promise to honor max_memory_to_use if dither_mode changes.
+   */
+  if (cinfo->dither_mode == JDITHER_FS) {
+    cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)
+      ((j_common_ptr) cinfo, JPOOL_IMAGE,
+       (size_t) ((cinfo->output_width + 2) * (3 * SIZEOF(FSERROR))));
+    /* Might as well create the error-limiting table too. */
+    init_error_limit(cinfo);
+  }
+}
+
+#endif /* QUANT_2PASS_SUPPORTED */
diff --git a/samples/jpeglib/jutils.c b/samples/jpeglib/jutils.c
new file mode 100644
index 0000000..d18a955
--- /dev/null
+++ b/samples/jpeglib/jutils.c
@@ -0,0 +1,179 @@
+/*
+ * jutils.c
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains tables and miscellaneous utility routines needed
+ * for both compression and decompression.
+ * Note we prefix all global names with "j" to minimize conflicts with
+ * a surrounding application.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/*
+ * jpeg_zigzag_order[i] is the zigzag-order position of the i'th element
+ * of a DCT block read in natural order (left to right, top to bottom).
+ */
+
+#if 0				/* This table is not actually needed in v6a */
+
+const int jpeg_zigzag_order[DCTSIZE2] = {
+   0,  1,  5,  6, 14, 15, 27, 28,
+   2,  4,  7, 13, 16, 26, 29, 42,
+   3,  8, 12, 17, 25, 30, 41, 43,
+   9, 11, 18, 24, 31, 40, 44, 53,
+  10, 19, 23, 32, 39, 45, 52, 54,
+  20, 22, 33, 38, 46, 51, 55, 60,
+  21, 34, 37, 47, 50, 56, 59, 61,
+  35, 36, 48, 49, 57, 58, 62, 63
+};
+
+#endif
+
+/*
+ * jpeg_natural_order[i] is the natural-order position of the i'th element
+ * of zigzag order.
+ *
+ * When reading corrupted data, the Huffman decoders could attempt
+ * to reference an entry beyond the end of this array (if the decoded
+ * zero run length reaches past the end of the block).  To prevent
+ * wild stores without adding an inner-loop test, we put some extra
+ * "63"s after the real entries.  This will cause the extra coefficient
+ * to be stored in location 63 of the block, not somewhere random.
+ * The worst case would be a run-length of 15, which means we need 16
+ * fake entries.
+ */
+
+const int jpeg_natural_order[DCTSIZE2+16] = {
+  0,  1,  8, 16,  9,  2,  3, 10,
+ 17, 24, 32, 25, 18, 11,  4,  5,
+ 12, 19, 26, 33, 40, 48, 41, 34,
+ 27, 20, 13,  6,  7, 14, 21, 28,
+ 35, 42, 49, 56, 57, 50, 43, 36,
+ 29, 22, 15, 23, 30, 37, 44, 51,
+ 58, 59, 52, 45, 38, 31, 39, 46,
+ 53, 60, 61, 54, 47, 55, 62, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
+ 63, 63, 63, 63, 63, 63, 63, 63
+};
+
+
+/*
+ * Arithmetic utilities
+ */
+
+GLOBAL(long)
+jdiv_round_up (long a, long b)
+/* Compute a/b rounded up to next integer, ie, ceil(a/b) */
+/* Assumes a >= 0, b > 0 */
+{
+  return (a + b - 1L) / b;
+}
+
+
+GLOBAL(long)
+jround_up (long a, long b)
+/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */
+/* Assumes a >= 0, b > 0 */
+{
+  a += b - 1L;
+  return a - (a % b);
+}
+
+
+/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays
+ * and coefficient-block arrays.  This won't work on 80x86 because the arrays
+ * are FAR and we're assuming a small-pointer memory model.  However, some
+ * DOS compilers provide far-pointer versions of memcpy() and memset() even
+ * in the small-model libraries.  These will be used if USE_FMEM is defined.
+ * Otherwise, the routines below do it the hard way.  (The performance cost
+ * is not all that great, because these routines aren't very heavily used.)
+ */
+
+#ifndef NEED_FAR_POINTERS	/* normal case, same as regular macros */
+#define FMEMCOPY(dest,src,size)	MEMCOPY(dest,src,size)
+#define FMEMZERO(target,size)	MEMZERO(target,size)
+#else				/* 80x86 case, define if we can */
+#ifdef USE_FMEM
+#define FMEMCOPY(dest,src,size)	_fmemcpy((void FAR *)(dest), (const void FAR *)(src), (size_t)(size))
+#define FMEMZERO(target,size)	_fmemset((void FAR *)(target), 0, (size_t)(size))
+#endif
+#endif
+
+
+GLOBAL(void)
+jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
+		   JSAMPARRAY output_array, int dest_row,
+		   int num_rows, JDIMENSION num_cols)
+/* Copy some rows of samples from one place to another.
+ * num_rows rows are copied from input_array[source_row++]
+ * to output_array[dest_row++]; these areas may overlap for duplication.
+ * The source and destination arrays must be at least as wide as num_cols.
+ */
+{
+  register JSAMPROW inptr, outptr;
+#ifdef FMEMCOPY
+  register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE));
+#else
+  register JDIMENSION count;
+#endif
+  register int row;
+
+  input_array += source_row;
+  output_array += dest_row;
+
+  for (row = num_rows; row > 0; row--) {
+    inptr = *input_array++;
+    outptr = *output_array++;
+#ifdef FMEMCOPY
+    FMEMCOPY(outptr, inptr, count);
+#else
+    for (count = num_cols; count > 0; count--)
+      *outptr++ = *inptr++;	/* needn't bother with GETJSAMPLE() here */
+#endif
+  }
+}
+
+
+GLOBAL(void)
+jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,
+		 JDIMENSION num_blocks)
+/* Copy a row of coefficient blocks from one place to another. */
+{
+#ifdef FMEMCOPY
+  FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF)));
+#else
+  register JCOEFPTR inptr, outptr;
+  register long count;
+
+  inptr = (JCOEFPTR) input_row;
+  outptr = (JCOEFPTR) output_row;
+  for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) {
+    *outptr++ = *inptr++;
+  }
+#endif
+}
+
+
+GLOBAL(void)
+jzero_far (void FAR * target, size_t bytestozero)
+/* Zero out a chunk of FAR memory. */
+/* This might be sample-array data, block-array data, or alloc_large data. */
+{
+#ifdef FMEMZERO
+  FMEMZERO(target, bytestozero);
+#else
+  register char FAR * ptr = (char FAR *) target;
+  register size_t count;
+
+  for (count = bytestozero; count > 0; count--) {
+    *ptr++ = 0;
+  }
+#endif
+}
diff --git a/samples/jpeglib/jversion.h b/samples/jpeglib/jversion.h
new file mode 100644
index 0000000..6472c58
--- /dev/null
+++ b/samples/jpeglib/jversion.h
@@ -0,0 +1,14 @@
+/*
+ * jversion.h
+ *
+ * Copyright (C) 1991-1998, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains software version identification.
+ */
+
+
+#define JVERSION	"6b  27-Mar-1998"
+
+#define JCOPYRIGHT	"Copyright (C) 1998, Thomas G. Lane"
diff --git a/samples/jpeglib/rdbmp.c b/samples/jpeglib/rdbmp.c
new file mode 100644
index 0000000..b05fe2a
--- /dev/null
+++ b/samples/jpeglib/rdbmp.c
@@ -0,0 +1,439 @@
+/*
+ * rdbmp.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains routines to read input images in Microsoft "BMP"
+ * format (MS Windows 3.x, OS/2 1.x, and OS/2 2.x flavors).
+ * Currently, only 8-bit and 24-bit images are supported, not 1-bit or
+ * 4-bit (feeding such low-depth images into JPEG would be silly anyway).
+ * Also, we don't support RLE-compressed files.
+ *
+ * These routines may need modification for non-Unix environments or
+ * specialized applications.  As they stand, they assume input from
+ * an ordinary stdio stream.  They further assume that reading begins
+ * at the start of the file; start_input may need work if the
+ * user interface has already read some data (e.g., to determine that
+ * the file is indeed BMP format).
+ *
+ * This code contributed by James Arthur Boucher.
+ */
+
+#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
+
+#ifdef BMP_SUPPORTED
+
+
+/* Macros to deal with unsigned chars as efficiently as compiler allows */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char U_CHAR;
+#define UCH(x)	((int) (x))
+#else /* !HAVE_UNSIGNED_CHAR */
+#ifdef CHAR_IS_UNSIGNED
+typedef char U_CHAR;
+#define UCH(x)	((int) (x))
+#else
+typedef char U_CHAR;
+#define UCH(x)	((int) (x) & 0xFF)
+#endif
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+#define	ReadOK(file,buffer,len)	(JFREAD(file,buffer,len) == ((size_t) (len)))
+
+
+/* Private version of data source object */
+
+typedef struct _bmp_source_struct * bmp_source_ptr;
+
+typedef struct _bmp_source_struct {
+  struct cjpeg_source_struct pub; /* public fields */
+
+  j_compress_ptr cinfo;		/* back link saves passing separate parm */
+
+  JSAMPARRAY colormap;		/* BMP colormap (converted to my format) */
+
+  jvirt_sarray_ptr whole_image;	/* Needed to reverse row order */
+  JDIMENSION source_row;	/* Current source row number */
+  JDIMENSION row_width;		/* Physical width of scanlines in file */
+
+  int bits_per_pixel;		/* remembers 8- or 24-bit format */
+} bmp_source_struct;
+
+
+LOCAL(int)
+read_byte (bmp_source_ptr sinfo)
+/* Read next byte from BMP file */
+{
+  register FILE *infile = sinfo->pub.input_file;
+  register int c;
+
+  if ((c = getc(infile)) == EOF)
+    ERREXIT(sinfo->cinfo, JERR_INPUT_EOF);
+  return c;
+}
+
+
+LOCAL(void)
+read_colormap (bmp_source_ptr sinfo, int cmaplen, int mapentrysize)
+/* Read the colormap from a BMP file */
+{
+  int i;
+
+  switch (mapentrysize) {
+  case 3:
+    /* BGR format (occurs in OS/2 files) */
+    for (i = 0; i < cmaplen; i++) {
+      sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo);
+      sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo);
+      sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo);
+    }
+    break;
+  case 4:
+    /* BGR0 format (occurs in MS Windows files) */
+    for (i = 0; i < cmaplen; i++) {
+      sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo);
+      sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo);
+      sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo);
+      (void) read_byte(sinfo);
+    }
+    break;
+  default:
+    ERREXIT(sinfo->cinfo, JERR_BMP_BADCMAP);
+    break;
+  }
+}
+
+
+/*
+ * Read one row of pixels.
+ * The image has been read into the whole_image array, but is otherwise
+ * unprocessed.  We must read it out in top-to-bottom row order, and if
+ * it is an 8-bit image, we must expand colormapped pixels to 24bit format.
+ */
+
+METHODDEF(JDIMENSION)
+get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading 8-bit colormap indexes */
+{
+  bmp_source_ptr source = (bmp_source_ptr) sinfo;
+  register JSAMPARRAY colormap = source->colormap;
+  JSAMPARRAY image_ptr;
+  register int t;
+  register JSAMPROW inptr, outptr;
+  register JDIMENSION col;
+
+  /* Fetch next row from virtual array */
+  source->source_row--;
+  image_ptr = (*cinfo->mem->access_virt_sarray)
+    ((j_common_ptr) cinfo, source->whole_image,
+     source->source_row, (JDIMENSION) 1, FALSE);
+
+  /* Expand the colormap indexes to real data */
+  inptr = image_ptr[0];
+  outptr = source->pub.buffer[0];
+  for (col = cinfo->image_width; col > 0; col--) {
+    t = GETJSAMPLE(*inptr++);
+    *outptr++ = colormap[0][t];	/* can omit GETJSAMPLE() safely */
+    *outptr++ = colormap[1][t];
+    *outptr++ = colormap[2][t];
+  }
+
+  return 1;
+}
+
+
+METHODDEF(JDIMENSION)
+get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading 24-bit pixels */
+{
+  bmp_source_ptr source = (bmp_source_ptr) sinfo;
+  JSAMPARRAY image_ptr;
+  register JSAMPROW inptr, outptr;
+  register JDIMENSION col;
+
+  /* Fetch next row from virtual array */
+  source->source_row--;
+  image_ptr = (*cinfo->mem->access_virt_sarray)
+    ((j_common_ptr) cinfo, source->whole_image,
+     source->source_row, (JDIMENSION) 1, FALSE);
+
+  /* Transfer data.  Note source values are in BGR order
+   * (even though Microsoft's own documents say the opposite).
+   */
+  inptr = image_ptr[0];
+  outptr = source->pub.buffer[0];
+  for (col = cinfo->image_width; col > 0; col--) {
+    outptr[2] = *inptr++;	/* can omit GETJSAMPLE() safely */
+    outptr[1] = *inptr++;
+    outptr[0] = *inptr++;
+    outptr += 3;
+  }
+
+  return 1;
+}
+
+
+/*
+ * This method loads the image into whole_image during the first call on
+ * get_pixel_rows.  The get_pixel_rows pointer is then adjusted to call
+ * get_8bit_row or get_24bit_row on subsequent calls.
+ */
+
+METHODDEF(JDIMENSION)
+preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  bmp_source_ptr source = (bmp_source_ptr) sinfo;
+  register FILE *infile = source->pub.input_file;
+  register int c;
+  register JSAMPROW out_ptr;
+  JSAMPARRAY image_ptr;
+  JDIMENSION row, col;
+  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
+
+  /* Read the data into a virtual array in input-file row order. */
+  for (row = 0; row < cinfo->image_height; row++) {
+    if (progress != NULL) {
+      progress->pub.pass_counter = (long) row;
+      progress->pub.pass_limit = (long) cinfo->image_height;
+      (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
+    }
+    image_ptr = (*cinfo->mem->access_virt_sarray)
+      ((j_common_ptr) cinfo, source->whole_image,
+       row, (JDIMENSION) 1, TRUE);
+    out_ptr = image_ptr[0];
+    for (col = source->row_width; col > 0; col--) {
+      /* inline copy of read_byte() for speed */
+      if ((c = getc(infile)) == EOF)
+	ERREXIT(cinfo, JERR_INPUT_EOF);
+      *out_ptr++ = (JSAMPLE) c;
+    }
+  }
+  if (progress != NULL)
+    progress->completed_extra_passes++;
+
+  /* Set up to read from the virtual array in top-to-bottom order */
+  switch (source->bits_per_pixel) {
+  case 8:
+    source->pub.get_pixel_rows = get_8bit_row;
+    break;
+  case 24:
+    source->pub.get_pixel_rows = get_24bit_row;
+    break;
+  default:
+    ERREXIT(cinfo, JERR_BMP_BADDEPTH);
+  }
+  source->source_row = cinfo->image_height;
+
+  /* And read the first row */
+  return (*source->pub.get_pixel_rows) (cinfo, sinfo);
+}
+
+
+/*
+ * Read the file header; return image size and component count.
+ */
+
+METHODDEF(void)
+start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  bmp_source_ptr source = (bmp_source_ptr) sinfo;
+  U_CHAR bmpfileheader[14];
+  U_CHAR bmpinfoheader[64];
+#define GET_2B(array,offset)  ((unsigned int) UCH(array[offset]) + \
+			       (((unsigned int) UCH(array[offset+1])) << 8))
+#define GET_4B(array,offset)  ((INT32) UCH(array[offset]) + \
+			       (((INT32) UCH(array[offset+1])) << 8) + \
+			       (((INT32) UCH(array[offset+2])) << 16) + \
+			       (((INT32) UCH(array[offset+3])) << 24))
+  INT32 bfOffBits;
+  INT32 headerSize;
+  INT32 biWidth = 0;		/* initialize to avoid compiler warning */
+  INT32 biHeight = 0;
+  unsigned int biPlanes;
+  INT32 biCompression;
+  INT32 biXPelsPerMeter,biYPelsPerMeter;
+  INT32 biClrUsed = 0;
+  int mapentrysize = 0;		/* 0 indicates no colormap */
+  INT32 bPad;
+  JDIMENSION row_width;
+
+  /* Read and verify the bitmap file header */
+  if (! ReadOK(source->pub.input_file, bmpfileheader, 14))
+    ERREXIT(cinfo, JERR_INPUT_EOF);
+  if (GET_2B(bmpfileheader,0) != 0x4D42) /* 'BM' */
+    ERREXIT(cinfo, JERR_BMP_NOT);
+  bfOffBits = (INT32) GET_4B(bmpfileheader,10);
+  /* We ignore the remaining fileheader fields */
+
+  /* The infoheader might be 12 bytes (OS/2 1.x), 40 bytes (Windows),
+   * or 64 bytes (OS/2 2.x).  Check the first 4 bytes to find out which.
+   */
+  if (! ReadOK(source->pub.input_file, bmpinfoheader, 4))
+    ERREXIT(cinfo, JERR_INPUT_EOF);
+  headerSize = (INT32) GET_4B(bmpinfoheader,0);
+  if (headerSize < 12 || headerSize > 64)
+    ERREXIT(cinfo, JERR_BMP_BADHEADER);
+  if (! ReadOK(source->pub.input_file, bmpinfoheader+4, headerSize-4))
+    ERREXIT(cinfo, JERR_INPUT_EOF);
+
+  switch ((int) headerSize) {
+  case 12:
+    /* Decode OS/2 1.x header (Microsoft calls this a BITMAPCOREHEADER) */
+    biWidth = (INT32) GET_2B(bmpinfoheader,4);
+    biHeight = (INT32) GET_2B(bmpinfoheader,6);
+    biPlanes = GET_2B(bmpinfoheader,8);
+    source->bits_per_pixel = (int) GET_2B(bmpinfoheader,10);
+
+    switch (source->bits_per_pixel) {
+    case 8:			/* colormapped image */
+      mapentrysize = 3;		/* OS/2 uses RGBTRIPLE colormap */
+      TRACEMS2(cinfo, 1, JTRC_BMP_OS2_MAPPED, (int) biWidth, (int) biHeight);
+      break;
+    case 24:			/* RGB image */
+      TRACEMS2(cinfo, 1, JTRC_BMP_OS2, (int) biWidth, (int) biHeight);
+      break;
+    default:
+      ERREXIT(cinfo, JERR_BMP_BADDEPTH);
+      break;
+    }
+    if (biPlanes != 1)
+      ERREXIT(cinfo, JERR_BMP_BADPLANES);
+    break;
+  case 40:
+  case 64:
+    /* Decode Windows 3.x header (Microsoft calls this a BITMAPINFOHEADER) */
+    /* or OS/2 2.x header, which has additional fields that we ignore */
+    biWidth = GET_4B(bmpinfoheader,4);
+    biHeight = GET_4B(bmpinfoheader,8);
+    biPlanes = GET_2B(bmpinfoheader,12);
+    source->bits_per_pixel = (int) GET_2B(bmpinfoheader,14);
+    biCompression = GET_4B(bmpinfoheader,16);
+    biXPelsPerMeter = GET_4B(bmpinfoheader,24);
+    biYPelsPerMeter = GET_4B(bmpinfoheader,28);
+    biClrUsed = GET_4B(bmpinfoheader,32);
+    /* biSizeImage, biClrImportant fields are ignored */
+
+    switch (source->bits_per_pixel) {
+    case 8:			/* colormapped image */
+      mapentrysize = 4;		/* Windows uses RGBQUAD colormap */
+      TRACEMS2(cinfo, 1, JTRC_BMP_MAPPED, (int) biWidth, (int) biHeight);
+      break;
+    case 24:			/* RGB image */
+      TRACEMS2(cinfo, 1, JTRC_BMP, (int) biWidth, (int) biHeight);
+      break;
+    default:
+      ERREXIT(cinfo, JERR_BMP_BADDEPTH);
+      break;
+    }
+    if (biPlanes != 1)
+      ERREXIT(cinfo, JERR_BMP_BADPLANES);
+    if (biCompression != 0)
+      ERREXIT(cinfo, JERR_BMP_COMPRESSED);
+
+    if (biXPelsPerMeter > 0 && biYPelsPerMeter > 0) {
+      /* Set JFIF density parameters from the BMP data */
+      cinfo->X_density = (UINT16) (biXPelsPerMeter/100); /* 100 cm per meter */
+      cinfo->Y_density = (UINT16) (biYPelsPerMeter/100);
+      cinfo->density_unit = 2;	/* dots/cm */
+    }
+    break;
+  default:
+    ERREXIT(cinfo, JERR_BMP_BADHEADER);
+    break;
+  }
+
+  /* Compute distance to bitmap data --- will adjust for colormap below */
+  bPad = bfOffBits - (headerSize + 14);
+
+  /* Read the colormap, if any */
+  if (mapentrysize > 0) {
+    if (biClrUsed <= 0)
+      biClrUsed = 256;		/* assume it's 256 */
+    else if (biClrUsed > 256)
+      ERREXIT(cinfo, JERR_BMP_BADCMAP);
+    /* Allocate space to store the colormap */
+    source->colormap = (*cinfo->mem->alloc_sarray)
+      ((j_common_ptr) cinfo, JPOOL_IMAGE,
+       (JDIMENSION) biClrUsed, (JDIMENSION) 3);
+    /* and read it from the file */
+    read_colormap(source, (int) biClrUsed, mapentrysize);
+    /* account for size of colormap */
+    bPad -= biClrUsed * mapentrysize;
+  }
+
+  /* Skip any remaining pad bytes */
+  if (bPad < 0)			/* incorrect bfOffBits value? */
+    ERREXIT(cinfo, JERR_BMP_BADHEADER);
+  while (--bPad >= 0) {
+    (void) read_byte(source);
+  }
+
+  /* Compute row width in file, including padding to 4-byte boundary */
+  if (source->bits_per_pixel == 24)
+    row_width = (JDIMENSION) (biWidth * 3);
+  else
+    row_width = (JDIMENSION) biWidth;
+  while ((row_width & 3) != 0) row_width++;
+  source->row_width = row_width;
+
+  /* Allocate space for inversion array, prepare for preload pass */
+  source->whole_image = (*cinfo->mem->request_virt_sarray)
+    ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
+     row_width, (JDIMENSION) biHeight, (JDIMENSION) 1);
+  source->pub.get_pixel_rows = preload_image;
+  if (cinfo->progress != NULL) {
+    cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
+    progress->total_extra_passes++; /* count file input as separate pass */
+  }
+
+  /* Allocate one-row buffer for returned data */
+  source->pub.buffer = (*cinfo->mem->alloc_sarray)
+    ((j_common_ptr) cinfo, JPOOL_IMAGE,
+     (JDIMENSION) (biWidth * 3), (JDIMENSION) 1);
+  source->pub.buffer_height = 1;
+
+  cinfo->in_color_space = JCS_RGB;
+  cinfo->input_components = 3;
+  cinfo->data_precision = 8;
+  cinfo->image_width = (JDIMENSION) biWidth;
+  cinfo->image_height = (JDIMENSION) biHeight;
+}
+
+
+/*
+ * Finish up at the end of the file.
+ */
+
+METHODDEF(void)
+finish_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  /* no work */
+}
+
+
+/*
+ * The module selection routine for BMP format input.
+ */
+
+GLOBAL(cjpeg_source_ptr)
+jinit_read_bmp (j_compress_ptr cinfo)
+{
+  bmp_source_ptr source;
+
+  /* Create module interface object */
+  source = (bmp_source_ptr)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  SIZEOF(bmp_source_struct));
+  source->cinfo = cinfo;	/* make back link for subroutines */
+  /* Fill in method ptrs, except get_pixel_rows which start_input sets */
+  source->pub.start_input = start_input_bmp;
+  source->pub.finish_input = finish_input_bmp;
+
+  return (cjpeg_source_ptr) source;
+}
+
+#endif /* BMP_SUPPORTED */
diff --git a/samples/jpeglib/rdcolmap.c b/samples/jpeglib/rdcolmap.c
new file mode 100644
index 0000000..42b3437
--- /dev/null
+++ b/samples/jpeglib/rdcolmap.c
@@ -0,0 +1,253 @@
+/*
+ * rdcolmap.c
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file implements djpeg's "-map file" switch.  It reads a source image
+ * and constructs a colormap to be supplied to the JPEG decompressor.
+ *
+ * Currently, these file formats are supported for the map file:
+ *   GIF: the contents of the GIF's global colormap are used.
+ *   PPM (either text or raw flavor): the entire file is read and
+ *      each unique pixel value is entered in the map.
+ * Note that reading a large PPM file will be horrendously slow.
+ * Typically, a PPM-format map file should contain just one pixel
+ * of each desired color.  Such a file can be extracted from an
+ * ordinary image PPM file with ppmtomap(1).
+ *
+ * Rescaling a PPM that has a maxval unequal to MAXJSAMPLE is not
+ * currently implemented.
+ */
+
+#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
+
+#ifdef QUANT_2PASS_SUPPORTED	/* otherwise can't quantize to supplied map */
+
+/* Portions of this code are based on the PBMPLUS library, which is:
+**
+** Copyright (C) 1988 by Jef Poskanzer.
+**
+** Permission to use, copy, modify, and distribute this software and its
+** documentation for any purpose and without fee is hereby granted, provided
+** that the above copyright notice appear in all copies and that both that
+** copyright notice and this permission notice appear in supporting
+** documentation.  This software is provided "as is" without express or
+** implied warranty.
+*/
+
+
+/*
+ * Add a (potentially) new color to the color map.
+ */
+
+LOCAL(void)
+add_map_entry (j_decompress_ptr cinfo, int R, int G, int B)
+{
+  JSAMPROW colormap0 = cinfo->colormap[0];
+  JSAMPROW colormap1 = cinfo->colormap[1];
+  JSAMPROW colormap2 = cinfo->colormap[2];
+  int ncolors = cinfo->actual_number_of_colors;
+  int index;
+
+  /* Check for duplicate color. */
+  for (index = 0; index < ncolors; index++) {
+    if (GETJSAMPLE(colormap0[index]) == R &&
+	GETJSAMPLE(colormap1[index]) == G &&
+	GETJSAMPLE(colormap2[index]) == B)
+      return;			/* color is already in map */
+  }
+
+  /* Check for map overflow. */
+  if (ncolors >= (MAXJSAMPLE+1))
+    ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, (MAXJSAMPLE+1));
+
+  /* OK, add color to map. */
+  colormap0[ncolors] = (JSAMPLE) R;
+  colormap1[ncolors] = (JSAMPLE) G;
+  colormap2[ncolors] = (JSAMPLE) B;
+  cinfo->actual_number_of_colors++;
+}
+
+
+/*
+ * Extract color map from a GIF file.
+ */
+
+LOCAL(void)
+read_gif_map (j_decompress_ptr cinfo, FILE * infile)
+{
+  int header[13];
+  int i, colormaplen;
+  int R, G, B;
+
+  /* Initial 'G' has already been read by read_color_map */
+  /* Read the rest of the GIF header and logical screen descriptor */
+  for (i = 1; i < 13; i++) {
+    if ((header[i] = getc(infile)) == EOF)
+      ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+  }
+
+  /* Verify GIF Header */
+  if (header[1] != 'I' || header[2] != 'F')
+    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+
+  /* There must be a global color map. */
+  if ((header[10] & 0x80) == 0)
+    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+
+  /* OK, fetch it. */
+  colormaplen = 2 << (header[10] & 0x07);
+
+  for (i = 0; i < colormaplen; i++) {
+    R = getc(infile);
+    G = getc(infile);
+    B = getc(infile);
+    if (R == EOF || G == EOF || B == EOF)
+      ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+    add_map_entry(cinfo,
+		  R << (BITS_IN_JSAMPLE-8),
+		  G << (BITS_IN_JSAMPLE-8),
+		  B << (BITS_IN_JSAMPLE-8));
+  }
+}
+
+
+/* Support routines for reading PPM */
+
+
+LOCAL(int)
+pbm_getc (FILE * infile)
+/* Read next char, skipping over any comments */
+/* A comment/newline sequence is returned as a newline */
+{
+  register int ch;
+  
+  ch = getc(infile);
+  if (ch == '#') {
+    do {
+      ch = getc(infile);
+    } while (ch != '\n' && ch != EOF);
+  }
+  return ch;
+}
+
+
+LOCAL(unsigned int)
+read_pbm_integer (j_decompress_ptr cinfo, FILE * infile)
+/* Read an unsigned decimal integer from the PPM file */
+/* Swallows one trailing character after the integer */
+/* Note that on a 16-bit-int machine, only values up to 64k can be read. */
+/* This should not be a problem in practice. */
+{
+  register int ch;
+  register unsigned int val;
+  
+  /* Skip any leading whitespace */
+  do {
+    ch = pbm_getc(infile);
+    if (ch == EOF)
+      ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+  } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
+  
+  if (ch < '0' || ch > '9')
+    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+  
+  val = ch - '0';
+  while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') {
+    val *= 10;
+    val += ch - '0';
+  }
+  return val;
+}
+
+
+/*
+ * Extract color map from a PPM file.
+ */
+
+LOCAL(void)
+read_ppm_map (j_decompress_ptr cinfo, FILE * infile)
+{
+  int c;
+  unsigned int w, h, maxval, row, col;
+  int R, G, B;
+
+  /* Initial 'P' has already been read by read_color_map */
+  c = getc(infile);		/* save format discriminator for a sec */
+
+  /* while we fetch the remaining header info */
+  w = read_pbm_integer(cinfo, infile);
+  h = read_pbm_integer(cinfo, infile);
+  maxval = read_pbm_integer(cinfo, infile);
+
+  if (w <= 0 || h <= 0 || maxval <= 0) /* error check */
+    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+
+  /* For now, we don't support rescaling from an unusual maxval. */
+  if (maxval != (unsigned int) MAXJSAMPLE)
+    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+
+  switch (c) {
+  case '3':			/* it's a text-format PPM file */
+    for (row = 0; row < h; row++) {
+      for (col = 0; col < w; col++) {
+	R = read_pbm_integer(cinfo, infile);
+	G = read_pbm_integer(cinfo, infile);
+	B = read_pbm_integer(cinfo, infile);
+	add_map_entry(cinfo, R, G, B);
+      }
+    }
+    break;
+
+  case '6':			/* it's a raw-format PPM file */
+    for (row = 0; row < h; row++) {
+      for (col = 0; col < w; col++) {
+	R = getc(infile);
+	G = getc(infile);
+	B = getc(infile);
+	if (R == EOF || G == EOF || B == EOF)
+	  ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+	add_map_entry(cinfo, R, G, B);
+      }
+    }
+    break;
+
+  default:
+    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+    break;
+  }
+}
+
+
+/*
+ * Main entry point from djpeg.c.
+ *  Input: opened input file (from file name argument on command line).
+ *  Output: colormap and actual_number_of_colors fields are set in cinfo.
+ */
+
+GLOBAL(void)
+read_color_map (j_decompress_ptr cinfo, FILE * infile)
+{
+  /* Allocate space for a color map of maximum supported size. */
+  cinfo->colormap = (*cinfo->mem->alloc_sarray)
+    ((j_common_ptr) cinfo, JPOOL_IMAGE,
+     (JDIMENSION) (MAXJSAMPLE+1), (JDIMENSION) 3);
+  cinfo->actual_number_of_colors = 0; /* initialize map to empty */
+
+  /* Read first byte to determine file format */
+  switch (getc(infile)) {
+  case 'G':
+    read_gif_map(cinfo, infile);
+    break;
+  case 'P':
+    read_ppm_map(cinfo, infile);
+    break;
+  default:
+    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
+    break;
+  }
+}
+
+#endif /* QUANT_2PASS_SUPPORTED */
diff --git a/samples/jpeglib/rdgif.c b/samples/jpeglib/rdgif.c
new file mode 100644
index 0000000..b27c167
--- /dev/null
+++ b/samples/jpeglib/rdgif.c
@@ -0,0 +1,38 @@
+/*
+ * rdgif.c
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains routines to read input images in GIF format.
+ *
+ *****************************************************************************
+ * NOTE: to avoid entanglements with Unisys' patent on LZW compression,      *
+ * the ability to read GIF files has been removed from the IJG distribution. *
+ * Sorry about that.                                                         *
+ *****************************************************************************
+ *
+ * We are required to state that
+ *    "The Graphics Interchange Format(c) is the Copyright property of
+ *    CompuServe Incorporated. GIF(sm) is a Service Mark property of
+ *    CompuServe Incorporated."
+ */
+
+#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
+
+#ifdef GIF_SUPPORTED
+
+/*
+ * The module selection routine for GIF format input.
+ */
+
+GLOBAL(cjpeg_source_ptr)
+jinit_read_gif (j_compress_ptr cinfo)
+{
+  fprintf(stderr, "GIF input is unsupported for legal reasons.  Sorry.\n");
+  exit(EXIT_FAILURE);
+  return NULL;			/* keep compiler happy */
+}
+
+#endif /* GIF_SUPPORTED */
diff --git a/samples/jpeglib/rdppm.c b/samples/jpeglib/rdppm.c
new file mode 100644
index 0000000..1df35c1
--- /dev/null
+++ b/samples/jpeglib/rdppm.c
@@ -0,0 +1,458 @@
+/*
+ * rdppm.c
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains routines to read input images in PPM/PGM format.
+ * The extended 2-byte-per-sample raw PPM/PGM formats are supported.
+ * The PBMPLUS library is NOT required to compile this software
+ * (but it is highly useful as a set of PPM image manipulation programs).
+ *
+ * These routines may need modification for non-Unix environments or
+ * specialized applications.  As they stand, they assume input from
+ * an ordinary stdio stream.  They further assume that reading begins
+ * at the start of the file; start_input may need work if the
+ * user interface has already read some data (e.g., to determine that
+ * the file is indeed PPM format).
+ */
+
+#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
+
+#ifdef PPM_SUPPORTED
+
+
+/* Portions of this code are based on the PBMPLUS library, which is:
+**
+** Copyright (C) 1988 by Jef Poskanzer.
+**
+** Permission to use, copy, modify, and distribute this software and its
+** documentation for any purpose and without fee is hereby granted, provided
+** that the above copyright notice appear in all copies and that both that
+** copyright notice and this permission notice appear in supporting
+** documentation.  This software is provided "as is" without express or
+** implied warranty.
+*/
+
+
+/* Macros to deal with unsigned chars as efficiently as compiler allows */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char U_CHAR;
+#define UCH(x)	((int) (x))
+#else /* !HAVE_UNSIGNED_CHAR */
+#ifdef CHAR_IS_UNSIGNED
+typedef char U_CHAR;
+#define UCH(x)	((int) (x))
+#else
+typedef char U_CHAR;
+#define UCH(x)	((int) (x) & 0xFF)
+#endif
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+#define	ReadOK(file,buffer,len)	(JFREAD(file,buffer,len) == ((size_t) (len)))
+
+
+/*
+ * On most systems, reading individual bytes with getc() is drastically less
+ * efficient than buffering a row at a time with fread().  On PCs, we must
+ * allocate the buffer in near data space, because we are assuming small-data
+ * memory model, wherein fread() can't reach far memory.  If you need to
+ * process very wide images on a PC, you might have to compile in large-memory
+ * model, or else replace fread() with a getc() loop --- which will be much
+ * slower.
+ */
+
+
+/* Private version of data source object */
+
+typedef struct {
+  struct cjpeg_source_struct pub; /* public fields */
+
+  U_CHAR *iobuffer;		/* non-FAR pointer to I/O buffer */
+  JSAMPROW pixrow;		/* FAR pointer to same */
+  size_t buffer_width;		/* width of I/O buffer */
+  JSAMPLE *rescale;		/* => maxval-remapping array, or NULL */
+} ppm_source_struct;
+
+typedef ppm_source_struct * ppm_source_ptr;
+
+
+LOCAL(int)
+pbm_getc (FILE * infile)
+/* Read next char, skipping over any comments */
+/* A comment/newline sequence is returned as a newline */
+{
+  register int ch;
+
+  ch = getc(infile);
+  if (ch == '#') {
+    do {
+      ch = getc(infile);
+    } while (ch != '\n' && ch != EOF);
+  }
+  return ch;
+}
+
+
+LOCAL(unsigned int)
+read_pbm_integer (j_compress_ptr cinfo, FILE * infile)
+/* Read an unsigned decimal integer from the PPM file */
+/* Swallows one trailing character after the integer */
+/* Note that on a 16-bit-int machine, only values up to 64k can be read. */
+/* This should not be a problem in practice. */
+{
+  register int ch;
+  register unsigned int val;
+
+  /* Skip any leading whitespace */
+  do {
+    ch = pbm_getc(infile);
+    if (ch == EOF)
+      ERREXIT(cinfo, JERR_INPUT_EOF);
+  } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
+
+  if (ch < '0' || ch > '9')
+    ERREXIT(cinfo, JERR_PPM_NONNUMERIC);
+
+  val = ch - '0';
+  while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') {
+    val *= 10;
+    val += ch - '0';
+  }
+  return val;
+}
+
+
+/*
+ * Read one row of pixels.
+ *
+ * We provide several different versions depending on input file format.
+ * In all cases, input is scaled to the size of JSAMPLE.
+ *
+ * A really fast path is provided for reading byte/sample raw files with
+ * maxval = MAXJSAMPLE, which is the normal case for 8-bit data.
+ */
+
+
+METHODDEF(JDIMENSION)
+get_text_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading text-format PGM files with any maxval */
+{
+  ppm_source_ptr source = (ppm_source_ptr) sinfo;
+  FILE * infile = source->pub.input_file;
+  register JSAMPROW ptr;
+  register JSAMPLE *rescale = source->rescale;
+  JDIMENSION col;
+
+  ptr = source->pub.buffer[0];
+  for (col = cinfo->image_width; col > 0; col--) {
+    *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
+  }
+  return 1;
+}
+
+
+METHODDEF(JDIMENSION)
+get_text_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading text-format PPM files with any maxval */
+{
+  ppm_source_ptr source = (ppm_source_ptr) sinfo;
+  FILE * infile = source->pub.input_file;
+  register JSAMPROW ptr;
+  register JSAMPLE *rescale = source->rescale;
+  JDIMENSION col;
+
+  ptr = source->pub.buffer[0];
+  for (col = cinfo->image_width; col > 0; col--) {
+    *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
+    *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
+    *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
+  }
+  return 1;
+}
+
+
+METHODDEF(JDIMENSION)
+get_scaled_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading raw-byte-format PGM files with any maxval */
+{
+  ppm_source_ptr source = (ppm_source_ptr) sinfo;
+  register JSAMPROW ptr;
+  register U_CHAR * bufferptr;
+  register JSAMPLE *rescale = source->rescale;
+  JDIMENSION col;
+
+  if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
+    ERREXIT(cinfo, JERR_INPUT_EOF);
+  ptr = source->pub.buffer[0];
+  bufferptr = source->iobuffer;
+  for (col = cinfo->image_width; col > 0; col--) {
+    *ptr++ = rescale[UCH(*bufferptr++)];
+  }
+  return 1;
+}
+
+
+METHODDEF(JDIMENSION)
+get_scaled_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading raw-byte-format PPM files with any maxval */
+{
+  ppm_source_ptr source = (ppm_source_ptr) sinfo;
+  register JSAMPROW ptr;
+  register U_CHAR * bufferptr;
+  register JSAMPLE *rescale = source->rescale;
+  JDIMENSION col;
+
+  if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
+    ERREXIT(cinfo, JERR_INPUT_EOF);
+  ptr = source->pub.buffer[0];
+  bufferptr = source->iobuffer;
+  for (col = cinfo->image_width; col > 0; col--) {
+    *ptr++ = rescale[UCH(*bufferptr++)];
+    *ptr++ = rescale[UCH(*bufferptr++)];
+    *ptr++ = rescale[UCH(*bufferptr++)];
+  }
+  return 1;
+}
+
+
+METHODDEF(JDIMENSION)
+get_raw_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE.
+ * In this case we just read right into the JSAMPLE buffer!
+ * Note that same code works for PPM and PGM files.
+ */
+{
+  ppm_source_ptr source = (ppm_source_ptr) sinfo;
+
+  if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
+    ERREXIT(cinfo, JERR_INPUT_EOF);
+  return 1;
+}
+
+
+METHODDEF(JDIMENSION)
+get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading raw-word-format PGM files with any maxval */
+{
+  ppm_source_ptr source = (ppm_source_ptr) sinfo;
+  register JSAMPROW ptr;
+  register U_CHAR * bufferptr;
+  register JSAMPLE *rescale = source->rescale;
+  JDIMENSION col;
+
+  if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
+    ERREXIT(cinfo, JERR_INPUT_EOF);
+  ptr = source->pub.buffer[0];
+  bufferptr = source->iobuffer;
+  for (col = cinfo->image_width; col > 0; col--) {
+    register int temp;
+    temp  = UCH(*bufferptr++);
+    temp |= UCH(*bufferptr++) << 8;
+    *ptr++ = rescale[temp];
+  }
+  return 1;
+}
+
+
+METHODDEF(JDIMENSION)
+get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading raw-word-format PPM files with any maxval */
+{
+  ppm_source_ptr source = (ppm_source_ptr) sinfo;
+  register JSAMPROW ptr;
+  register U_CHAR * bufferptr;
+  register JSAMPLE *rescale = source->rescale;
+  JDIMENSION col;
+
+  if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
+    ERREXIT(cinfo, JERR_INPUT_EOF);
+  ptr = source->pub.buffer[0];
+  bufferptr = source->iobuffer;
+  for (col = cinfo->image_width; col > 0; col--) {
+    register int temp;
+    temp  = UCH(*bufferptr++);
+    temp |= UCH(*bufferptr++) << 8;
+    *ptr++ = rescale[temp];
+    temp  = UCH(*bufferptr++);
+    temp |= UCH(*bufferptr++) << 8;
+    *ptr++ = rescale[temp];
+    temp  = UCH(*bufferptr++);
+    temp |= UCH(*bufferptr++) << 8;
+    *ptr++ = rescale[temp];
+  }
+  return 1;
+}
+
+
+/*
+ * Read the file header; return image size and component count.
+ */
+
+METHODDEF(void)
+start_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  ppm_source_ptr source = (ppm_source_ptr) sinfo;
+  int c;
+  unsigned int w, h, maxval;
+  boolean need_iobuffer, use_raw_buffer, need_rescale;
+
+  if (getc(source->pub.input_file) != 'P')
+    ERREXIT(cinfo, JERR_PPM_NOT);
+
+  c = getc(source->pub.input_file); /* subformat discriminator character */
+
+  /* detect unsupported variants (ie, PBM) before trying to read header */
+  switch (c) {
+  case '2':			/* it's a text-format PGM file */
+  case '3':			/* it's a text-format PPM file */
+  case '5':			/* it's a raw-format PGM file */
+  case '6':			/* it's a raw-format PPM file */
+    break;
+  default:
+    ERREXIT(cinfo, JERR_PPM_NOT);
+    break;
+  }
+
+  /* fetch the remaining header info */
+  w = read_pbm_integer(cinfo, source->pub.input_file);
+  h = read_pbm_integer(cinfo, source->pub.input_file);
+  maxval = read_pbm_integer(cinfo, source->pub.input_file);
+
+  if (w <= 0 || h <= 0 || maxval <= 0) /* error check */
+    ERREXIT(cinfo, JERR_PPM_NOT);
+
+  cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */
+  cinfo->image_width = (JDIMENSION) w;
+  cinfo->image_height = (JDIMENSION) h;
+
+  /* initialize flags to most common settings */
+  need_iobuffer = TRUE;		/* do we need an I/O buffer? */
+  use_raw_buffer = FALSE;	/* do we map input buffer onto I/O buffer? */
+  need_rescale = TRUE;		/* do we need a rescale array? */
+
+  switch (c) {
+  case '2':			/* it's a text-format PGM file */
+    cinfo->input_components = 1;
+    cinfo->in_color_space = JCS_GRAYSCALE;
+    TRACEMS2(cinfo, 1, JTRC_PGM_TEXT, w, h);
+    source->pub.get_pixel_rows = get_text_gray_row;
+    need_iobuffer = FALSE;
+    break;
+
+  case '3':			/* it's a text-format PPM file */
+    cinfo->input_components = 3;
+    cinfo->in_color_space = JCS_RGB;
+    TRACEMS2(cinfo, 1, JTRC_PPM_TEXT, w, h);
+    source->pub.get_pixel_rows = get_text_rgb_row;
+    need_iobuffer = FALSE;
+    break;
+
+  case '5':			/* it's a raw-format PGM file */
+    cinfo->input_components = 1;
+    cinfo->in_color_space = JCS_GRAYSCALE;
+    TRACEMS2(cinfo, 1, JTRC_PGM, w, h);
+    if (maxval > 255) {
+      source->pub.get_pixel_rows = get_word_gray_row;
+    } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) {
+      source->pub.get_pixel_rows = get_raw_row;
+      use_raw_buffer = TRUE;
+      need_rescale = FALSE;
+    } else {
+      source->pub.get_pixel_rows = get_scaled_gray_row;
+    }
+    break;
+
+  case '6':			/* it's a raw-format PPM file */
+    cinfo->input_components = 3;
+    cinfo->in_color_space = JCS_RGB;
+    TRACEMS2(cinfo, 1, JTRC_PPM, w, h);
+    if (maxval > 255) {
+      source->pub.get_pixel_rows = get_word_rgb_row;
+    } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) {
+      source->pub.get_pixel_rows = get_raw_row;
+      use_raw_buffer = TRUE;
+      need_rescale = FALSE;
+    } else {
+      source->pub.get_pixel_rows = get_scaled_rgb_row;
+    }
+    break;
+  }
+
+  /* Allocate space for I/O buffer: 1 or 3 bytes or words/pixel. */
+  if (need_iobuffer) {
+    source->buffer_width = (size_t) w * cinfo->input_components *
+      ((maxval<=255) ? SIZEOF(U_CHAR) : (2*SIZEOF(U_CHAR)));
+    source->iobuffer = (U_CHAR *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  source->buffer_width);
+  }
+
+  /* Create compressor input buffer. */
+  if (use_raw_buffer) {
+    /* For unscaled raw-input case, we can just map it onto the I/O buffer. */
+    /* Synthesize a JSAMPARRAY pointer structure */
+    /* Cast here implies near->far pointer conversion on PCs */
+    source->pixrow = (JSAMPROW) source->iobuffer;
+    source->pub.buffer = & source->pixrow;
+    source->pub.buffer_height = 1;
+  } else {
+    /* Need to translate anyway, so make a separate sample buffer. */
+    source->pub.buffer = (*cinfo->mem->alloc_sarray)
+      ((j_common_ptr) cinfo, JPOOL_IMAGE,
+       (JDIMENSION) w * cinfo->input_components, (JDIMENSION) 1);
+    source->pub.buffer_height = 1;
+  }
+
+  /* Compute the rescaling array if required. */
+  if (need_rescale) {
+    INT32 val, half_maxval;
+
+    /* On 16-bit-int machines we have to be careful of maxval = 65535 */
+    source->rescale = (JSAMPLE *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  (size_t) (((long) maxval + 1L) * SIZEOF(JSAMPLE)));
+    half_maxval = maxval / 2;
+    for (val = 0; val <= (INT32) maxval; val++) {
+      /* The multiplication here must be done in 32 bits to avoid overflow */
+      source->rescale[val] = (JSAMPLE) ((val*MAXJSAMPLE + half_maxval)/maxval);
+    }
+  }
+}
+
+
+/*
+ * Finish up at the end of the file.
+ */
+
+METHODDEF(void)
+finish_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  /* no work */
+}
+
+
+/*
+ * The module selection routine for PPM format input.
+ */
+
+GLOBAL(cjpeg_source_ptr)
+jinit_read_ppm (j_compress_ptr cinfo)
+{
+  ppm_source_ptr source;
+
+  /* Create module interface object */
+  source = (ppm_source_ptr)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  SIZEOF(ppm_source_struct));
+  /* Fill in method ptrs, except get_pixel_rows which start_input sets */
+  source->pub.start_input = start_input_ppm;
+  source->pub.finish_input = finish_input_ppm;
+
+  return (cjpeg_source_ptr) source;
+}
+
+#endif /* PPM_SUPPORTED */
diff --git a/samples/jpeglib/rdrle.c b/samples/jpeglib/rdrle.c
new file mode 100644
index 0000000..542bc37
--- /dev/null
+++ b/samples/jpeglib/rdrle.c
@@ -0,0 +1,387 @@
+/*
+ * rdrle.c
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains routines to read input images in Utah RLE format.
+ * The Utah Raster Toolkit library is required (version 3.1 or later).
+ *
+ * These routines may need modification for non-Unix environments or
+ * specialized applications.  As they stand, they assume input from
+ * an ordinary stdio stream.  They further assume that reading begins
+ * at the start of the file; start_input may need work if the
+ * user interface has already read some data (e.g., to determine that
+ * the file is indeed RLE format).
+ *
+ * Based on code contributed by Mike Lijewski,
+ * with updates from Robert Hutchinson.
+ */
+
+#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
+
+#ifdef RLE_SUPPORTED
+
+/* rle.h is provided by the Utah Raster Toolkit. */
+
+#include <rle.h>
+
+/*
+ * We assume that JSAMPLE has the same representation as rle_pixel,
+ * to wit, "unsigned char".  Hence we can't cope with 12- or 16-bit samples.
+ */
+
+#if BITS_IN_JSAMPLE != 8
+  Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
+#endif
+
+/*
+ * We support the following types of RLE files:
+ *   
+ *   GRAYSCALE   - 8 bits, no colormap
+ *   MAPPEDGRAY  - 8 bits, 1 channel colomap
+ *   PSEUDOCOLOR - 8 bits, 3 channel colormap
+ *   TRUECOLOR   - 24 bits, 3 channel colormap
+ *   DIRECTCOLOR - 24 bits, no colormap
+ *
+ * For now, we ignore any alpha channel in the image.
+ */
+
+typedef enum
+  { GRAYSCALE, MAPPEDGRAY, PSEUDOCOLOR, TRUECOLOR, DIRECTCOLOR } rle_kind;
+
+
+/*
+ * Since RLE stores scanlines bottom-to-top, we have to invert the image
+ * to conform to JPEG's top-to-bottom order.  To do this, we read the
+ * incoming image into a virtual array on the first get_pixel_rows call,
+ * then fetch the required row from the virtual array on subsequent calls.
+ */
+
+typedef struct _rle_source_struct * rle_source_ptr;
+
+typedef struct _rle_source_struct {
+  struct cjpeg_source_struct pub; /* public fields */
+
+  rle_kind visual;              /* actual type of input file */
+  jvirt_sarray_ptr image;       /* virtual array to hold the image */
+  JDIMENSION row;		/* current row # in the virtual array */
+  rle_hdr header;               /* Input file information */
+  rle_pixel** rle_row;          /* holds a row returned by rle_getrow() */
+
+} rle_source_struct;
+
+
+/*
+ * Read the file header; return image size and component count.
+ */
+
+METHODDEF(void)
+start_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  rle_source_ptr source = (rle_source_ptr) sinfo;
+  JDIMENSION width, height;
+#ifdef PROGRESS_REPORT
+  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
+#endif
+
+  /* Use RLE library routine to get the header info */
+  source->header = *rle_hdr_init(NULL);
+  source->header.rle_file = source->pub.input_file;
+  switch (rle_get_setup(&(source->header))) {
+  case RLE_SUCCESS:
+    /* A-OK */
+    break;
+  case RLE_NOT_RLE:
+    ERREXIT(cinfo, JERR_RLE_NOT);
+    break;
+  case RLE_NO_SPACE:
+    ERREXIT(cinfo, JERR_RLE_MEM);
+    break;
+  case RLE_EMPTY:
+    ERREXIT(cinfo, JERR_RLE_EMPTY);
+    break;
+  case RLE_EOF:
+    ERREXIT(cinfo, JERR_RLE_EOF);
+    break;
+  default:
+    ERREXIT(cinfo, JERR_RLE_BADERROR);
+    break;
+  }
+
+  /* Figure out what we have, set private vars and return values accordingly */
+  
+  width  = source->header.xmax - source->header.xmin + 1;
+  height = source->header.ymax - source->header.ymin + 1;
+  source->header.xmin = 0;		/* realign horizontally */
+  source->header.xmax = width-1;
+
+  cinfo->image_width      = width;
+  cinfo->image_height     = height;
+  cinfo->data_precision   = 8;  /* we can only handle 8 bit data */
+
+  if (source->header.ncolors == 1 && source->header.ncmap == 0) {
+    source->visual     = GRAYSCALE;
+    TRACEMS2(cinfo, 1, JTRC_RLE_GRAY, width, height);
+  } else if (source->header.ncolors == 1 && source->header.ncmap == 1) {
+    source->visual     = MAPPEDGRAY;
+    TRACEMS3(cinfo, 1, JTRC_RLE_MAPGRAY, width, height,
+             1 << source->header.cmaplen);
+  } else if (source->header.ncolors == 1 && source->header.ncmap == 3) {
+    source->visual     = PSEUDOCOLOR;
+    TRACEMS3(cinfo, 1, JTRC_RLE_MAPPED, width, height,
+	     1 << source->header.cmaplen);
+  } else if (source->header.ncolors == 3 && source->header.ncmap == 3) {
+    source->visual     = TRUECOLOR;
+    TRACEMS3(cinfo, 1, JTRC_RLE_FULLMAP, width, height,
+	     1 << source->header.cmaplen);
+  } else if (source->header.ncolors == 3 && source->header.ncmap == 0) {
+    source->visual     = DIRECTCOLOR;
+    TRACEMS2(cinfo, 1, JTRC_RLE, width, height);
+  } else
+    ERREXIT(cinfo, JERR_RLE_UNSUPPORTED);
+  
+  if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) {
+    cinfo->in_color_space   = JCS_GRAYSCALE;
+    cinfo->input_components = 1;
+  } else {
+    cinfo->in_color_space   = JCS_RGB;
+    cinfo->input_components = 3;
+  }
+
+  /*
+   * A place to hold each scanline while it's converted.
+   * (GRAYSCALE scanlines don't need converting)
+   */
+  if (source->visual != GRAYSCALE) {
+    source->rle_row = (rle_pixel**) (*cinfo->mem->alloc_sarray)
+      ((j_common_ptr) cinfo, JPOOL_IMAGE,
+       (JDIMENSION) width, (JDIMENSION) cinfo->input_components);
+  }
+
+  /* request a virtual array to hold the image */
+  source->image = (*cinfo->mem->request_virt_sarray)
+    ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
+     (JDIMENSION) (width * source->header.ncolors),
+     (JDIMENSION) height, (JDIMENSION) 1);
+
+#ifdef PROGRESS_REPORT
+  if (progress != NULL) {
+    /* count file input as separate pass */
+    progress->total_extra_passes++;
+  }
+#endif
+
+  source->pub.buffer_height = 1;
+}
+
+
+/*
+ * Read one row of pixels.
+ * Called only after load_image has read the image into the virtual array.
+ * Used for GRAYSCALE, MAPPEDGRAY, TRUECOLOR, and DIRECTCOLOR images.
+ */
+
+METHODDEF(JDIMENSION)
+get_rle_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  rle_source_ptr source = (rle_source_ptr) sinfo;
+
+  source->row--;
+  source->pub.buffer = (*cinfo->mem->access_virt_sarray)
+    ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE);
+
+  return 1;
+}
+
+/*
+ * Read one row of pixels.
+ * Called only after load_image has read the image into the virtual array.
+ * Used for PSEUDOCOLOR images.
+ */
+
+METHODDEF(JDIMENSION)
+get_pseudocolor_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  rle_source_ptr source = (rle_source_ptr) sinfo;
+  JSAMPROW src_row, dest_row;
+  JDIMENSION col;
+  rle_map *colormap;
+  int val;
+
+  colormap = source->header.cmap;
+  dest_row = source->pub.buffer[0];
+  source->row--;
+  src_row = * (*cinfo->mem->access_virt_sarray)
+    ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE);
+
+  for (col = cinfo->image_width; col > 0; col--) {
+    val = GETJSAMPLE(*src_row++);
+    *dest_row++ = (JSAMPLE) (colormap[val      ] >> 8);
+    *dest_row++ = (JSAMPLE) (colormap[val + 256] >> 8);
+    *dest_row++ = (JSAMPLE) (colormap[val + 512] >> 8);
+  }
+
+  return 1;
+}
+
+
+/*
+ * Load the image into a virtual array.  We have to do this because RLE
+ * files start at the lower left while the JPEG standard has them starting
+ * in the upper left.  This is called the first time we want to get a row
+ * of input.  What we do is load the RLE data into the array and then call
+ * the appropriate routine to read one row from the array.  Before returning,
+ * we set source->pub.get_pixel_rows so that subsequent calls go straight to
+ * the appropriate row-reading routine.
+ */
+
+METHODDEF(JDIMENSION)
+load_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  rle_source_ptr source = (rle_source_ptr) sinfo;
+  JDIMENSION row, col;
+  JSAMPROW  scanline, red_ptr, green_ptr, blue_ptr;
+  rle_pixel **rle_row;
+  rle_map *colormap;
+  char channel;
+#ifdef PROGRESS_REPORT
+  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
+#endif
+
+  colormap = source->header.cmap;
+  rle_row = source->rle_row;
+
+  /* Read the RLE data into our virtual array.
+   * We assume here that (a) rle_pixel is represented the same as JSAMPLE,
+   * and (b) we are not on a machine where FAR pointers differ from regular.
+   */
+  RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */
+
+#ifdef PROGRESS_REPORT
+  if (progress != NULL) {
+    progress->pub.pass_limit = cinfo->image_height;
+    progress->pub.pass_counter = 0;
+    (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
+  }
+#endif
+
+  switch (source->visual) {
+
+  case GRAYSCALE:
+  case PSEUDOCOLOR:
+    for (row = 0; row < cinfo->image_height; row++) {
+      rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray)
+         ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
+      rle_getrow(&source->header, rle_row);
+#ifdef PROGRESS_REPORT
+      if (progress != NULL) {
+        progress->pub.pass_counter++;
+        (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
+      }
+#endif
+    }
+    break;
+
+  case MAPPEDGRAY:
+  case TRUECOLOR:
+    for (row = 0; row < cinfo->image_height; row++) {
+      scanline = * (*cinfo->mem->access_virt_sarray)
+        ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
+      rle_row = source->rle_row;
+      rle_getrow(&source->header, rle_row);
+
+      for (col = 0; col < cinfo->image_width; col++) {
+        for (channel = 0; channel < source->header.ncolors; channel++) {
+          *scanline++ = (JSAMPLE)
+            (colormap[GETJSAMPLE(rle_row[channel][col]) + 256 * channel] >> 8);
+        }
+      }
+
+#ifdef PROGRESS_REPORT
+      if (progress != NULL) {
+        progress->pub.pass_counter++;
+        (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
+      }
+#endif
+    }
+    break;
+
+  case DIRECTCOLOR:
+    for (row = 0; row < cinfo->image_height; row++) {
+      scanline = * (*cinfo->mem->access_virt_sarray)
+        ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
+      rle_getrow(&source->header, rle_row);
+
+      red_ptr   = rle_row[0];
+      green_ptr = rle_row[1];
+      blue_ptr  = rle_row[2];
+
+      for (col = cinfo->image_width; col > 0; col--) {
+        *scanline++ = *red_ptr++;
+        *scanline++ = *green_ptr++;
+        *scanline++ = *blue_ptr++;
+      }
+
+#ifdef PROGRESS_REPORT
+      if (progress != NULL) {
+        progress->pub.pass_counter++;
+        (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
+      }
+#endif
+    }
+  }
+
+#ifdef PROGRESS_REPORT
+  if (progress != NULL)
+    progress->completed_extra_passes++;
+#endif
+
+  /* Set up to call proper row-extraction routine in future */
+  if (source->visual == PSEUDOCOLOR) {
+    source->pub.buffer = source->rle_row;
+    source->pub.get_pixel_rows = get_pseudocolor_row;
+  } else {
+    source->pub.get_pixel_rows = get_rle_row;
+  }
+  source->row = cinfo->image_height;
+
+  /* And fetch the topmost (bottommost) row */
+  return (*source->pub.get_pixel_rows) (cinfo, sinfo);   
+}
+
+
+/*
+ * Finish up at the end of the file.
+ */
+
+METHODDEF(void)
+finish_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  /* no work */
+}
+
+
+/*
+ * The module selection routine for RLE format input.
+ */
+
+GLOBAL(cjpeg_source_ptr)
+jinit_read_rle (j_compress_ptr cinfo)
+{
+  rle_source_ptr source;
+
+  /* Create module interface object */
+  source = (rle_source_ptr)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+                                  SIZEOF(rle_source_struct));
+  /* Fill in method ptrs */
+  source->pub.start_input = start_input_rle;
+  source->pub.finish_input = finish_input_rle;
+  source->pub.get_pixel_rows = load_image;
+
+  return (cjpeg_source_ptr) source;
+}
+
+#endif /* RLE_SUPPORTED */
diff --git a/samples/jpeglib/rdswitch.c b/samples/jpeglib/rdswitch.c
new file mode 100644
index 0000000..4f4bb4f
--- /dev/null
+++ b/samples/jpeglib/rdswitch.c
@@ -0,0 +1,332 @@
+/*
+ * rdswitch.c
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains routines to process some of cjpeg's more complicated
+ * command-line switches.  Switches processed here are:
+ *	-qtables file		Read quantization tables from text file
+ *	-scans file		Read scan script from text file
+ *	-qslots N[,N,...]	Set component quantization table selectors
+ *	-sample HxV[,HxV,...]	Set component sampling factors
+ */
+
+#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
+#include <ctype.h>		/* to declare isdigit(), isspace() */
+
+
+LOCAL(int)
+text_getc (FILE * file)
+/* Read next char, skipping over any comments (# to end of line) */
+/* A comment/newline sequence is returned as a newline */
+{
+  register int ch;
+  
+  ch = getc(file);
+  if (ch == '#') {
+    do {
+      ch = getc(file);
+    } while (ch != '\n' && ch != EOF);
+  }
+  return ch;
+}
+
+
+LOCAL(boolean)
+read_text_integer (FILE * file, long * result, int * termchar)
+/* Read an unsigned decimal integer from a file, store it in result */
+/* Reads one trailing character after the integer; returns it in termchar */
+{
+  register int ch;
+  register long val;
+  
+  /* Skip any leading whitespace, detect EOF */
+  do {
+    ch = text_getc(file);
+    if (ch == EOF) {
+      *termchar = ch;
+      return FALSE;
+    }
+  } while (isspace(ch));
+  
+  if (! isdigit(ch)) {
+    *termchar = ch;
+    return FALSE;
+  }
+
+  val = ch - '0';
+  while ((ch = text_getc(file)) != EOF) {
+    if (! isdigit(ch))
+      break;
+    val *= 10;
+    val += ch - '0';
+  }
+  *result = val;
+  *termchar = ch;
+  return TRUE;
+}
+
+
+GLOBAL(boolean)
+read_quant_tables (j_compress_ptr cinfo, char * filename,
+		   int scale_factor, boolean force_baseline)
+/* Read a set of quantization tables from the specified file.
+ * The file is plain ASCII text: decimal numbers with whitespace between.
+ * Comments preceded by '#' may be included in the file.
+ * There may be one to NUM_QUANT_TBLS tables in the file, each of 64 values.
+ * The tables are implicitly numbered 0,1,etc.
+ * NOTE: does not affect the qslots mapping, which will default to selecting
+ * table 0 for luminance (or primary) components, 1 for chrominance components.
+ * You must use -qslots if you want a different component->table mapping.
+ */
+{
+  FILE * fp;
+  int tblno, i, termchar;
+  long val;
+  unsigned int table[DCTSIZE2];
+
+  if ((fp = fopen(filename, "r")) == NULL) {
+    fprintf(stderr, "Can't open table file %s\n", filename);
+    return FALSE;
+  }
+  tblno = 0;
+
+  while (read_text_integer(fp, &val, &termchar)) { /* read 1st element of table */
+    if (tblno >= NUM_QUANT_TBLS) {
+      fprintf(stderr, "Too many tables in file %s\n", filename);
+      fclose(fp);
+      return FALSE;
+    }
+    table[0] = (unsigned int) val;
+    for (i = 1; i < DCTSIZE2; i++) {
+      if (! read_text_integer(fp, &val, &termchar)) {
+	fprintf(stderr, "Invalid table data in file %s\n", filename);
+	fclose(fp);
+	return FALSE;
+      }
+      table[i] = (unsigned int) val;
+    }
+    jpeg_add_quant_table(cinfo, tblno, table, scale_factor, force_baseline);
+    tblno++;
+  }
+
+  if (termchar != EOF) {
+    fprintf(stderr, "Non-numeric data in file %s\n", filename);
+    fclose(fp);
+    return FALSE;
+  }
+
+  fclose(fp);
+  return TRUE;
+}
+
+
+#ifdef C_MULTISCAN_FILES_SUPPORTED
+
+LOCAL(boolean)
+read_scan_integer (FILE * file, long * result, int * termchar)
+/* Variant of read_text_integer that always looks for a non-space termchar;
+ * this simplifies parsing of punctuation in scan scripts.
+ */
+{
+  register int ch;
+
+  if (! read_text_integer(file, result, termchar))
+    return FALSE;
+  ch = *termchar;
+  while (ch != EOF && isspace(ch))
+    ch = text_getc(file);
+  if (isdigit(ch)) {		/* oops, put it back */
+    if (ungetc(ch, file) == EOF)
+      return FALSE;
+    ch = ' ';
+  } else {
+    /* Any separators other than ';' and ':' are ignored;
+     * this allows user to insert commas, etc, if desired.
+     */
+    if (ch != EOF && ch != ';' && ch != ':')
+      ch = ' ';
+  }
+  *termchar = ch;
+  return TRUE;
+}
+
+
+GLOBAL(boolean)
+read_scan_script (j_compress_ptr cinfo, char * filename)
+/* Read a scan script from the specified text file.
+ * Each entry in the file defines one scan to be emitted.
+ * Entries are separated by semicolons ';'.
+ * An entry contains one to four component indexes,
+ * optionally followed by a colon ':' and four progressive-JPEG parameters.
+ * The component indexes denote which component(s) are to be transmitted
+ * in the current scan.  The first component has index 0.
+ * Sequential JPEG is used if the progressive-JPEG parameters are omitted.
+ * The file is free format text: any whitespace may appear between numbers
+ * and the ':' and ';' punctuation marks.  Also, other punctuation (such
+ * as commas or dashes) can be placed between numbers if desired.
+ * Comments preceded by '#' may be included in the file.
+ * Note: we do very little validity checking here;
+ * jcmaster.c will validate the script parameters.
+ */
+{
+  FILE * fp;
+  int scanno, ncomps, termchar;
+  long val;
+  jpeg_scan_info * scanptr;
+#define MAX_SCANS  100		/* quite arbitrary limit */
+  jpeg_scan_info scans[MAX_SCANS];
+
+  if ((fp = fopen(filename, "r")) == NULL) {
+    fprintf(stderr, "Can't open scan definition file %s\n", filename);
+    return FALSE;
+  }
+  scanptr = scans;
+  scanno = 0;
+
+  while (read_scan_integer(fp, &val, &termchar)) {
+    if (scanno >= MAX_SCANS) {
+      fprintf(stderr, "Too many scans defined in file %s\n", filename);
+      fclose(fp);
+      return FALSE;
+    }
+    scanptr->component_index[0] = (int) val;
+    ncomps = 1;
+    while (termchar == ' ') {
+      if (ncomps >= MAX_COMPS_IN_SCAN) {
+	fprintf(stderr, "Too many components in one scan in file %s\n",
+		filename);
+	fclose(fp);
+	return FALSE;
+      }
+      if (! read_scan_integer(fp, &val, &termchar))
+	goto bogus;
+      scanptr->component_index[ncomps] = (int) val;
+      ncomps++;
+    }
+    scanptr->comps_in_scan = ncomps;
+    if (termchar == ':') {
+      if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ')
+	goto bogus;
+      scanptr->Ss = (int) val;
+      if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ')
+	goto bogus;
+      scanptr->Se = (int) val;
+      if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ')
+	goto bogus;
+      scanptr->Ah = (int) val;
+      if (! read_scan_integer(fp, &val, &termchar))
+	goto bogus;
+      scanptr->Al = (int) val;
+    } else {
+      /* set non-progressive parameters */
+      scanptr->Ss = 0;
+      scanptr->Se = DCTSIZE2-1;
+      scanptr->Ah = 0;
+      scanptr->Al = 0;
+    }
+    if (termchar != ';' && termchar != EOF) {
+bogus:
+      fprintf(stderr, "Invalid scan entry format in file %s\n", filename);
+      fclose(fp);
+      return FALSE;
+    }
+    scanptr++, scanno++;
+  }
+
+  if (termchar != EOF) {
+    fprintf(stderr, "Non-numeric data in file %s\n", filename);
+    fclose(fp);
+    return FALSE;
+  }
+
+  if (scanno > 0) {
+    /* Stash completed scan list in cinfo structure.
+     * NOTE: for cjpeg's use, JPOOL_IMAGE is the right lifetime for this data,
+     * but if you want to compress multiple images you'd want JPOOL_PERMANENT.
+     */
+    scanptr = (jpeg_scan_info *)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  scanno * SIZEOF(jpeg_scan_info));
+    MEMCOPY(scanptr, scans, scanno * SIZEOF(jpeg_scan_info));
+    cinfo->scan_info = scanptr;
+    cinfo->num_scans = scanno;
+  }
+
+  fclose(fp);
+  return TRUE;
+}
+
+#endif /* C_MULTISCAN_FILES_SUPPORTED */
+
+
+GLOBAL(boolean)
+set_quant_slots (j_compress_ptr cinfo, char *arg)
+/* Process a quantization-table-selectors parameter string, of the form
+ *     N[,N,...]
+ * If there are more components than parameters, the last value is replicated.
+ */
+{
+  int val = 0;			/* default table # */
+  int ci;
+  char ch;
+
+  for (ci = 0; ci < MAX_COMPONENTS; ci++) {
+    if (*arg) {
+      ch = ',';			/* if not set by sscanf, will be ',' */
+      if (sscanf(arg, "%d%c", &val, &ch) < 1)
+	return FALSE;
+      if (ch != ',')		/* syntax check */
+	return FALSE;
+      if (val < 0 || val >= NUM_QUANT_TBLS) {
+	fprintf(stderr, "JPEG quantization tables are numbered 0..%d\n",
+		NUM_QUANT_TBLS-1);
+	return FALSE;
+      }
+      cinfo->comp_info[ci].quant_tbl_no = val;
+      while (*arg && *arg++ != ',') /* advance to next segment of arg string */
+	;
+    } else {
+      /* reached end of parameter, set remaining components to last table */
+      cinfo->comp_info[ci].quant_tbl_no = val;
+    }
+  }
+  return TRUE;
+}
+
+
+GLOBAL(boolean)
+set_sample_factors (j_compress_ptr cinfo, char *arg)
+/* Process a sample-factors parameter string, of the form
+ *     HxV[,HxV,...]
+ * If there are more components than parameters, "1x1" is assumed for the rest.
+ */
+{
+  int ci, val1, val2;
+  char ch1, ch2;
+
+  for (ci = 0; ci < MAX_COMPONENTS; ci++) {
+    if (*arg) {
+      ch2 = ',';		/* if not set by sscanf, will be ',' */
+      if (sscanf(arg, "%d%c%d%c", &val1, &ch1, &val2, &ch2) < 3)
+	return FALSE;
+      if ((ch1 != 'x' && ch1 != 'X') || ch2 != ',') /* syntax check */
+	return FALSE;
+      if (val1 <= 0 || val1 > 4 || val2 <= 0 || val2 > 4) {
+	fprintf(stderr, "JPEG sampling factors must be 1..4\n");
+	return FALSE;
+      }
+      cinfo->comp_info[ci].h_samp_factor = val1;
+      cinfo->comp_info[ci].v_samp_factor = val2;
+      while (*arg && *arg++ != ',') /* advance to next segment of arg string */
+	;
+    } else {
+      /* reached end of parameter, set remaining components to 1x1 sampling */
+      cinfo->comp_info[ci].h_samp_factor = 1;
+      cinfo->comp_info[ci].v_samp_factor = 1;
+    }
+  }
+  return TRUE;
+}
diff --git a/samples/jpeglib/rdtarga.c b/samples/jpeglib/rdtarga.c
new file mode 100644
index 0000000..4c2cd26
--- /dev/null
+++ b/samples/jpeglib/rdtarga.c
@@ -0,0 +1,500 @@
+/*
+ * rdtarga.c
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains routines to read input images in Targa format.
+ *
+ * These routines may need modification for non-Unix environments or
+ * specialized applications.  As they stand, they assume input from
+ * an ordinary stdio stream.  They further assume that reading begins
+ * at the start of the file; start_input may need work if the
+ * user interface has already read some data (e.g., to determine that
+ * the file is indeed Targa format).
+ *
+ * Based on code contributed by Lee Daniel Crocker.
+ */
+
+#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
+
+#ifdef TARGA_SUPPORTED
+
+
+/* Macros to deal with unsigned chars as efficiently as compiler allows */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char U_CHAR;
+#define UCH(x)	((int) (x))
+#else /* !HAVE_UNSIGNED_CHAR */
+#ifdef CHAR_IS_UNSIGNED
+typedef char U_CHAR;
+#define UCH(x)	((int) (x))
+#else
+typedef char U_CHAR;
+#define UCH(x)	((int) (x) & 0xFF)
+#endif
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+#define	ReadOK(file,buffer,len)	(JFREAD(file,buffer,len) == ((size_t) (len)))
+
+
+/* Private version of data source object */
+
+typedef struct _tga_source_struct * tga_source_ptr;
+
+typedef struct _tga_source_struct {
+  struct cjpeg_source_struct pub; /* public fields */
+
+  j_compress_ptr cinfo;		/* back link saves passing separate parm */
+
+  JSAMPARRAY colormap;		/* Targa colormap (converted to my format) */
+
+  jvirt_sarray_ptr whole_image;	/* Needed if funny input row order */
+  JDIMENSION current_row;	/* Current logical row number to read */
+
+  /* Pointer to routine to extract next Targa pixel from input file */
+  JMETHOD(void, read_pixel, (tga_source_ptr sinfo));
+
+  /* Result of read_pixel is delivered here: */
+  U_CHAR tga_pixel[4];
+
+  int pixel_size;		/* Bytes per Targa pixel (1 to 4) */
+
+  /* State info for reading RLE-coded pixels; both counts must be init to 0 */
+  int block_count;		/* # of pixels remaining in RLE block */
+  int dup_pixel_count;		/* # of times to duplicate previous pixel */
+
+  /* This saves the correct pixel-row-expansion method for preload_image */
+  JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
+				       cjpeg_source_ptr sinfo));
+} tga_source_struct;
+
+
+/* For expanding 5-bit pixel values to 8-bit with best rounding */
+
+static const UINT8 c5to8bits[32] = {
+    0,   8,  16,  25,  33,  41,  49,  58,
+   66,  74,  82,  90,  99, 107, 115, 123,
+  132, 140, 148, 156, 165, 173, 181, 189,
+  197, 206, 214, 222, 230, 239, 247, 255
+};
+
+
+
+LOCAL(int)
+read_byte (tga_source_ptr sinfo)
+/* Read next byte from Targa file */
+{
+  register FILE *infile = sinfo->pub.input_file;
+  register int c;
+
+  if ((c = getc(infile)) == EOF)
+    ERREXIT(sinfo->cinfo, JERR_INPUT_EOF);
+  return c;
+}
+
+
+LOCAL(void)
+read_colormap (tga_source_ptr sinfo, int cmaplen, int mapentrysize)
+/* Read the colormap from a Targa file */
+{
+  int i;
+
+  /* Presently only handles 24-bit BGR format */
+  if (mapentrysize != 24)
+    ERREXIT(sinfo->cinfo, JERR_TGA_BADCMAP);
+
+  for (i = 0; i < cmaplen; i++) {
+    sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo);
+    sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo);
+    sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo);
+  }
+}
+
+
+/*
+ * read_pixel methods: get a single pixel from Targa file into tga_pixel[]
+ */
+
+METHODDEF(void)
+read_non_rle_pixel (tga_source_ptr sinfo)
+/* Read one Targa pixel from the input file; no RLE expansion */
+{
+  register FILE *infile = sinfo->pub.input_file;
+  register int i;
+
+  for (i = 0; i < sinfo->pixel_size; i++) {
+    sinfo->tga_pixel[i] = (U_CHAR) getc(infile);
+  }
+}
+
+
+METHODDEF(void)
+read_rle_pixel (tga_source_ptr sinfo)
+/* Read one Targa pixel from the input file, expanding RLE data as needed */
+{
+  register FILE *infile = sinfo->pub.input_file;
+  register int i;
+
+  /* Duplicate previously read pixel? */
+  if (sinfo->dup_pixel_count > 0) {
+    sinfo->dup_pixel_count--;
+    return;
+  }
+
+  /* Time to read RLE block header? */
+  if (--sinfo->block_count < 0) { /* decrement pixels remaining in block */
+    i = read_byte(sinfo);
+    if (i & 0x80) {		/* Start of duplicate-pixel block? */
+      sinfo->dup_pixel_count = i & 0x7F; /* number of dups after this one */
+      sinfo->block_count = 0;	/* then read new block header */
+    } else {
+      sinfo->block_count = i & 0x7F; /* number of pixels after this one */
+    }
+  }
+
+  /* Read next pixel */
+  for (i = 0; i < sinfo->pixel_size; i++) {
+    sinfo->tga_pixel[i] = (U_CHAR) getc(infile);
+  }
+}
+
+
+/*
+ * Read one row of pixels.
+ *
+ * We provide several different versions depending on input file format.
+ */
+
+
+METHODDEF(JDIMENSION)
+get_8bit_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading 8-bit grayscale pixels */
+{
+  tga_source_ptr source = (tga_source_ptr) sinfo;
+  register JSAMPROW ptr;
+  register JDIMENSION col;
+  
+  ptr = source->pub.buffer[0];
+  for (col = cinfo->image_width; col > 0; col--) {
+    (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
+    *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]);
+  }
+  return 1;
+}
+
+METHODDEF(JDIMENSION)
+get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading 8-bit colormap indexes */
+{
+  tga_source_ptr source = (tga_source_ptr) sinfo;
+  register int t;
+  register JSAMPROW ptr;
+  register JDIMENSION col;
+  register JSAMPARRAY colormap = source->colormap;
+
+  ptr = source->pub.buffer[0];
+  for (col = cinfo->image_width; col > 0; col--) {
+    (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
+    t = UCH(source->tga_pixel[0]);
+    *ptr++ = colormap[0][t];
+    *ptr++ = colormap[1][t];
+    *ptr++ = colormap[2][t];
+  }
+  return 1;
+}
+
+METHODDEF(JDIMENSION)
+get_16bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading 16-bit pixels */
+{
+  tga_source_ptr source = (tga_source_ptr) sinfo;
+  register int t;
+  register JSAMPROW ptr;
+  register JDIMENSION col;
+  
+  ptr = source->pub.buffer[0];
+  for (col = cinfo->image_width; col > 0; col--) {
+    (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
+    t = UCH(source->tga_pixel[0]);
+    t += UCH(source->tga_pixel[1]) << 8;
+    /* We expand 5 bit data to 8 bit sample width.
+     * The format of the 16-bit (LSB first) input word is
+     *     xRRRRRGGGGGBBBBB
+     */
+    ptr[2] = (JSAMPLE) c5to8bits[t & 0x1F];
+    t >>= 5;
+    ptr[1] = (JSAMPLE) c5to8bits[t & 0x1F];
+    t >>= 5;
+    ptr[0] = (JSAMPLE) c5to8bits[t & 0x1F];
+    ptr += 3;
+  }
+  return 1;
+}
+
+METHODDEF(JDIMENSION)
+get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+/* This version is for reading 24-bit pixels */
+{
+  tga_source_ptr source = (tga_source_ptr) sinfo;
+  register JSAMPROW ptr;
+  register JDIMENSION col;
+  
+  ptr = source->pub.buffer[0];
+  for (col = cinfo->image_width; col > 0; col--) {
+    (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
+    *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */
+    *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]);
+    *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]);
+  }
+  return 1;
+}
+
+/*
+ * Targa also defines a 32-bit pixel format with order B,G,R,A.
+ * We presently ignore the attribute byte, so the code for reading
+ * these pixels is identical to the 24-bit routine above.
+ * This works because the actual pixel length is only known to read_pixel.
+ */
+
+#define get_32bit_row  get_24bit_row
+
+
+/*
+ * This method is for re-reading the input data in standard top-down
+ * row order.  The entire image has already been read into whole_image
+ * with proper conversion of pixel format, but it's in a funny row order.
+ */
+
+METHODDEF(JDIMENSION)
+get_memory_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  tga_source_ptr source = (tga_source_ptr) sinfo;
+  JDIMENSION source_row;
+
+  /* Compute row of source that maps to current_row of normal order */
+  /* For now, assume image is bottom-up and not interlaced. */
+  /* NEEDS WORK to support interlaced images! */
+  source_row = cinfo->image_height - source->current_row - 1;
+
+  /* Fetch that row from virtual array */
+  source->pub.buffer = (*cinfo->mem->access_virt_sarray)
+    ((j_common_ptr) cinfo, source->whole_image,
+     source_row, (JDIMENSION) 1, FALSE);
+
+  source->current_row++;
+  return 1;
+}
+
+
+/*
+ * This method loads the image into whole_image during the first call on
+ * get_pixel_rows.  The get_pixel_rows pointer is then adjusted to call
+ * get_memory_row on subsequent calls.
+ */
+
+METHODDEF(JDIMENSION)
+preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  tga_source_ptr source = (tga_source_ptr) sinfo;
+  JDIMENSION row;
+  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
+
+  /* Read the data into a virtual array in input-file row order. */
+  for (row = 0; row < cinfo->image_height; row++) {
+    if (progress != NULL) {
+      progress->pub.pass_counter = (long) row;
+      progress->pub.pass_limit = (long) cinfo->image_height;
+      (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
+    }
+    source->pub.buffer = (*cinfo->mem->access_virt_sarray)
+      ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE);
+    (*source->get_pixel_rows) (cinfo, sinfo);
+  }
+  if (progress != NULL)
+    progress->completed_extra_passes++;
+
+  /* Set up to read from the virtual array in unscrambled order */
+  source->pub.get_pixel_rows = get_memory_row;
+  source->current_row = 0;
+  /* And read the first row */
+  return get_memory_row(cinfo, sinfo);
+}
+
+
+/*
+ * Read the file header; return image size and component count.
+ */
+
+METHODDEF(void)
+start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  tga_source_ptr source = (tga_source_ptr) sinfo;
+  U_CHAR targaheader[18];
+  int idlen, cmaptype, subtype, flags, interlace_type, components;
+  unsigned int width, height, maplen;
+  boolean is_bottom_up;
+
+#define GET_2B(offset)	((unsigned int) UCH(targaheader[offset]) + \
+			 (((unsigned int) UCH(targaheader[offset+1])) << 8))
+
+  if (! ReadOK(source->pub.input_file, targaheader, 18))
+    ERREXIT(cinfo, JERR_INPUT_EOF);
+
+  /* Pretend "15-bit" pixels are 16-bit --- we ignore attribute bit anyway */
+  if (targaheader[16] == 15)
+    targaheader[16] = 16;
+
+  idlen = UCH(targaheader[0]);
+  cmaptype = UCH(targaheader[1]);
+  subtype = UCH(targaheader[2]);
+  maplen = GET_2B(5);
+  width = GET_2B(12);
+  height = GET_2B(14);
+  source->pixel_size = UCH(targaheader[16]) >> 3;
+  flags = UCH(targaheader[17]);	/* Image Descriptor byte */
+
+  is_bottom_up = ((flags & 0x20) == 0);	/* bit 5 set => top-down */
+  interlace_type = flags >> 6;	/* bits 6/7 are interlace code */
+
+  if (cmaptype > 1 ||		/* cmaptype must be 0 or 1 */
+      source->pixel_size < 1 || source->pixel_size > 4 ||
+      (UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */
+      interlace_type != 0)	/* currently don't allow interlaced image */
+    ERREXIT(cinfo, JERR_TGA_BADPARMS);
+  
+  if (subtype > 8) {
+    /* It's an RLE-coded file */
+    source->read_pixel = read_rle_pixel;
+    source->block_count = source->dup_pixel_count = 0;
+    subtype -= 8;
+  } else {
+    /* Non-RLE file */
+    source->read_pixel = read_non_rle_pixel;
+  }
+
+  /* Now should have subtype 1, 2, or 3 */
+  components = 3;		/* until proven different */
+  cinfo->in_color_space = JCS_RGB;
+
+  switch (subtype) {
+  case 1:			/* Colormapped image */
+    if (source->pixel_size == 1 && cmaptype == 1)
+      source->get_pixel_rows = get_8bit_row;
+    else
+      ERREXIT(cinfo, JERR_TGA_BADPARMS);
+    TRACEMS2(cinfo, 1, JTRC_TGA_MAPPED, width, height);
+    break;
+  case 2:			/* RGB image */
+    switch (source->pixel_size) {
+    case 2:
+      source->get_pixel_rows = get_16bit_row;
+      break;
+    case 3:
+      source->get_pixel_rows = get_24bit_row;
+      break;
+    case 4:
+      source->get_pixel_rows = get_32bit_row;
+      break;
+    default:
+      ERREXIT(cinfo, JERR_TGA_BADPARMS);
+      break;
+    }
+    TRACEMS2(cinfo, 1, JTRC_TGA, width, height);
+    break;
+  case 3:			/* Grayscale image */
+    components = 1;
+    cinfo->in_color_space = JCS_GRAYSCALE;
+    if (source->pixel_size == 1)
+      source->get_pixel_rows = get_8bit_gray_row;
+    else
+      ERREXIT(cinfo, JERR_TGA_BADPARMS);
+    TRACEMS2(cinfo, 1, JTRC_TGA_GRAY, width, height);
+    break;
+  default:
+    ERREXIT(cinfo, JERR_TGA_BADPARMS);
+    break;
+  }
+
+  if (is_bottom_up) {
+    /* Create a virtual array to buffer the upside-down image. */
+    source->whole_image = (*cinfo->mem->request_virt_sarray)
+      ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
+       (JDIMENSION) width * components, (JDIMENSION) height, (JDIMENSION) 1);
+    if (cinfo->progress != NULL) {
+      cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
+      progress->total_extra_passes++; /* count file input as separate pass */
+    }
+    /* source->pub.buffer will point to the virtual array. */
+    source->pub.buffer_height = 1; /* in case anyone looks at it */
+    source->pub.get_pixel_rows = preload_image;
+  } else {
+    /* Don't need a virtual array, but do need a one-row input buffer. */
+    source->whole_image = NULL;
+    source->pub.buffer = (*cinfo->mem->alloc_sarray)
+      ((j_common_ptr) cinfo, JPOOL_IMAGE,
+       (JDIMENSION) width * components, (JDIMENSION) 1);
+    source->pub.buffer_height = 1;
+    source->pub.get_pixel_rows = source->get_pixel_rows;
+  }
+  
+  while (idlen--)		/* Throw away ID field */
+    (void) read_byte(source);
+
+  if (maplen > 0) {
+    if (maplen > 256 || GET_2B(3) != 0)
+      ERREXIT(cinfo, JERR_TGA_BADCMAP);
+    /* Allocate space to store the colormap */
+    source->colormap = (*cinfo->mem->alloc_sarray)
+      ((j_common_ptr) cinfo, JPOOL_IMAGE, (JDIMENSION) maplen, (JDIMENSION) 3);
+    /* and read it from the file */
+    read_colormap(source, (int) maplen, UCH(targaheader[7]));
+  } else {
+    if (cmaptype)		/* but you promised a cmap! */
+      ERREXIT(cinfo, JERR_TGA_BADPARMS);
+    source->colormap = NULL;
+  }
+
+  cinfo->input_components = components;
+  cinfo->data_precision = 8;
+  cinfo->image_width = width;
+  cinfo->image_height = height;
+}
+
+
+/*
+ * Finish up at the end of the file.
+ */
+
+METHODDEF(void)
+finish_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
+{
+  /* no work */
+}
+
+
+/*
+ * The module selection routine for Targa format input.
+ */
+
+GLOBAL(cjpeg_source_ptr)
+jinit_read_targa (j_compress_ptr cinfo)
+{
+  tga_source_ptr source;
+
+  /* Create module interface object */
+  source = (tga_source_ptr)
+      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+				  SIZEOF(tga_source_struct));
+  source->cinfo = cinfo;	/* make back link for subroutines */
+  /* Fill in method ptrs, except get_pixel_rows which start_input sets */
+  source->pub.start_input = start_input_tga;
+  source->pub.finish_input = finish_input_tga;
+
+  return (cjpeg_source_ptr) source;
+}
+
+#endif /* TARGA_SUPPORTED */
diff --git a/sched/Makefile.am b/sched/Makefile.am
index 6b52a50..bb73930 100644
--- a/sched/Makefile.am
+++ b/sched/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 25435 2012-03-16 17:23:55Z romw $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/sched/assimilator.cpp b/sched/assimilator.cpp
index 23ce18a..dc79d82 100644
--- a/sched/assimilator.cpp
+++ b/sched/assimilator.cpp
@@ -307,4 +307,4 @@ int main(int argc, char** argv) {
 }
 
 
-const char *BOINC_RCSID_7841370789 = "$Id: assimilator.cpp 25259 2012-02-14 18:50:47Z davea $";
+const char *BOINC_RCSID_7841370789 = "$Id$";
diff --git a/sched/db_dump.cpp b/sched/db_dump.cpp
index 6581d44..49bdba9 100644
--- a/sched/db_dump.cpp
+++ b/sched/db_dump.cpp
@@ -912,4 +912,4 @@ int main(int argc, char** argv) {
     log_messages.printf(MSG_NORMAL, "db_dump finished\n");
 }
 
-const char *BOINC_RCSID_500089bde6 = "$Id: db_dump.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_500089bde6 = "$Id$";
diff --git a/sched/db_purge.cpp b/sched/db_purge.cpp
index 3506190..a3c124a 100644
--- a/sched/db_purge.cpp
+++ b/sched/db_purge.cpp
@@ -749,4 +749,4 @@ int main(int argc, char** argv) {
     exit(0);
 }
 
-const char *BOINC_RCSID_0c1c4336f1 = "$Id: db_purge.cpp 25344 2012-02-27 11:08:14Z bema $";
+const char *BOINC_RCSID_0c1c4336f1 = "$Id$";
diff --git a/sched/delete_file.cpp b/sched/delete_file.cpp
index 1e84ea5..18048d5 100644
--- a/sched/delete_file.cpp
+++ b/sched/delete_file.cpp
@@ -114,4 +114,4 @@ int main(int argc, char** argv) {
     return retval;
 }
 
-const char *BOINC_RCSID_f6337b04b0 = "$Id: delete_file.cpp 25341 2012-02-24 22:55:11Z davea $";
+const char *BOINC_RCSID_f6337b04b0 = "$Id$";
diff --git a/sched/feeder.cpp b/sched/feeder.cpp
index fc75ef4..be1a804 100644
--- a/sched/feeder.cpp
+++ b/sched/feeder.cpp
@@ -876,4 +876,4 @@ int main(int argc, char** argv) {
     feeder_loop();
 }
 
-const char *BOINC_RCSID_57c87aa242 = "$Id: feeder.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_57c87aa242 = "$Id$";
diff --git a/sched/file_deleter.cpp b/sched/file_deleter.cpp
index 2fd2784..a5f71e8 100644
--- a/sched/file_deleter.cpp
+++ b/sched/file_deleter.cpp
@@ -560,4 +560,4 @@ int main(int argc, char** argv) {
     }
 }
 
-const char *BOINC_RCSID_bd0d4938a6 = "$Id: file_deleter.cpp 25379 2012-03-05 13:19:47Z bema $";
+const char *BOINC_RCSID_bd0d4938a6 = "$Id$";
diff --git a/sched/file_upload_handler.cpp b/sched/file_upload_handler.cpp
index 2d64ffa..e8437da 100644
--- a/sched/file_upload_handler.cpp
+++ b/sched/file_upload_handler.cpp
@@ -701,4 +701,4 @@ int main(int argc, char *argv[]) {
     return 0;
 }
 
-const char *BOINC_RCSID_470a0d4d11 = "$Id: file_upload_handler.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_470a0d4d11 = "$Id$";
diff --git a/sched/get_file.cpp b/sched/get_file.cpp
index e80b3c9..40dfd20 100644
--- a/sched/get_file.cpp
+++ b/sched/get_file.cpp
@@ -144,4 +144,4 @@ int main(int argc, char** argv) {
     boinc_db.close();
 }
 
-const char *BOINC_RCSID_37238a0141 = "$Id: get_file.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_37238a0141 = "$Id$";
diff --git a/sched/handle_request.cpp b/sched/handle_request.cpp
index 9350bbe..d015936 100644
--- a/sched/handle_request.cpp
+++ b/sched/handle_request.cpp
@@ -1402,4 +1402,4 @@ void handle_request(FILE* fin, FILE* fout, char* code_sign_key) {
     }
 }
 
-const char *BOINC_RCSID_2ac231f9de = "$Id: handle_request.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_2ac231f9de = "$Id$";
diff --git a/sched/make_work.cpp b/sched/make_work.cpp
index 5d967d0..9befb35 100644
--- a/sched/make_work.cpp
+++ b/sched/make_work.cpp
@@ -353,4 +353,4 @@ int main(int argc, char** argv) {
     make_work(wu_names);
 }
 
-const char *BOINC_RCSID_d24265dc7f = "$Id: make_work.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_d24265dc7f = "$Id$";
diff --git a/sched/message_handler.cpp b/sched/message_handler.cpp
index d56a8b7..2cd4228 100644
--- a/sched/message_handler.cpp
+++ b/sched/message_handler.cpp
@@ -185,4 +185,4 @@ int main(int argc, char** argv) {
     main_loop(one_pass);
 }
 
-const char *BOINC_RCSID_ff3b9880d4 = "$Id: message_handler.cpp 22647 2010-11-08 17:51:57Z davea $";
+const char *BOINC_RCSID_ff3b9880d4 = "$Id$";
diff --git a/sched/put_file.cpp b/sched/put_file.cpp
index d291e1b..b715292 100644
--- a/sched/put_file.cpp
+++ b/sched/put_file.cpp
@@ -137,4 +137,4 @@ int main(int argc, char** argv) {
     return retval;
 }
 
-const char *BOINC_RCSID_f3c3c4b892 = "$Id: put_file.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_f3c3c4b892 = "$Id$";
diff --git a/sched/sample_bitwise_validator.cpp b/sched/sample_bitwise_validator.cpp
index 9887295..a5f9b0c 100644
--- a/sched/sample_bitwise_validator.cpp
+++ b/sched/sample_bitwise_validator.cpp
@@ -99,4 +99,4 @@ int cleanup_result(RESULT const& /*result*/, void* data) {
     return 0;
 }
 
-const char *BOINC_RCSID_7ab2b7189c = "$Id: sample_bitwise_validator.cpp 21735 2010-06-12 22:08:15Z davea $";
+const char *BOINC_RCSID_7ab2b7189c = "$Id$";
diff --git a/sched/sample_db_dump_spec.xml b/sched/sample_db_dump_spec.xml
deleted file mode 100644
index c3daccb..0000000
--- a/sched/sample_db_dump_spec.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<boinc_db_dump_spec>
-    <output_dir>../html/stats_tmp</output_dir>
-    <final_output_dir>../html/stats</final_output_dir>
-    <enumeration>
-        <table>user</table>
-        <filename>user_id</filename>
-        <sort>id</sort>
-        <output>
-            <compression>gzip</compression>
-        </output>
-    </enumeration>
-    <enumeration>
-        <table>host</table>
-        <filename>host_id</filename>
-        <sort>id</sort>
-        <output>
-            <compression>gzip</compression>
-        </output>
-    </enumeration>
-    <enumeration>
-        <table>team</table>
-        <filename>team_id</filename>
-        <sort>id</sort>
-        <output>
-            <compression>gzip</compression>
-        </output>
-    </enumeration>
-</boinc_db_dump_spec>
diff --git a/sched/sample_dummy_assimilator.cpp b/sched/sample_dummy_assimilator.cpp
index 1925c4f..ad2b235 100644
--- a/sched/sample_dummy_assimilator.cpp
+++ b/sched/sample_dummy_assimilator.cpp
@@ -76,4 +76,4 @@ int assimilate_handler(
     return 0;
 }
 
-const char *BOINC_RCSID_8f6a5a2d27 = "$Id: sample_dummy_assimilator.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_8f6a5a2d27 = "$Id$";
diff --git a/sched/sample_trivial_validator.cpp b/sched/sample_trivial_validator.cpp
index 6175dfb..92ff335 100644
--- a/sched/sample_trivial_validator.cpp
+++ b/sched/sample_trivial_validator.cpp
@@ -36,4 +36,4 @@ int cleanup_result(RESULT const&, void*) {
     return 0;
 }
 
-const char *BOINC_RCSID_f3a7a34795 = "$Id: sample_trivial_validator.cpp 24210 2011-09-14 22:45:26Z davea $";
+const char *BOINC_RCSID_f3a7a34795 = "$Id$";
diff --git a/sched/sched_array.cpp b/sched/sched_array.cpp
index 16fce34..10ab048 100644
--- a/sched/sched_array.cpp
+++ b/sched/sched_array.cpp
@@ -451,4 +451,4 @@ void send_work_old() {
     }
 }
 
-const char *BOINC_RCSID_d9f764fd14="$Id: sched_array.cpp 25314 2012-02-22 22:13:08Z davea $";
+const char *BOINC_RCSID_d9f764fd14="$Id$";
diff --git a/sched/sched_config.cpp b/sched/sched_config.cpp
index aae48b5..ce8c3d8 100644
--- a/sched/sched_config.cpp
+++ b/sched/sched_config.cpp
@@ -418,4 +418,4 @@ const char *SCHED_CONFIG::project_path(const char *fmt, ...) {
     return (const char *)path;
 }
 
-const char *BOINC_RCSID_3704204cfd = "$Id: sched_config.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_3704204cfd = "$Id$";
diff --git a/sched/sched_driver.cpp b/sched/sched_driver.cpp
index 9dbe8c7..c960b28 100644
--- a/sched/sched_driver.cpp
+++ b/sched/sched_driver.cpp
@@ -48,9 +48,9 @@
 using std::vector;
 
 struct HOST_DESC{
-    char os_name[128];
-    char p_vendor[128];
-    char p_model[128];
+    char os_name[256];
+    char p_vendor[256];
+    char p_model[256];
 };
 
 vector<HOST_DESC> host_descs;
diff --git a/sched/sched_hr.cpp b/sched/sched_hr.cpp
index c298159..f2767ac 100644
--- a/sched/sched_hr.cpp
+++ b/sched/sched_hr.cpp
@@ -60,4 +60,4 @@ bool already_sent_to_different_hr_class(WORKUNIT& wu, APP& app) {
     return false;
 }
 
-const char *BOINC_RCSID_4196d9a5b4="$Id: sched_hr.cpp 24484 2011-10-26 07:15:22Z davea $";
+const char *BOINC_RCSID_4196d9a5b4="$Id$";
diff --git a/sched/sched_locality.cpp b/sched/sched_locality.cpp
index a8979fa..29e2be2 100644
--- a/sched/sched_locality.cpp
+++ b/sched/sched_locality.cpp
@@ -1307,4 +1307,4 @@ void send_file_deletes() {
 
 // (8) If addtional results are needed, return to step 4 above.
 
-const char *BOINC_RCSID_238cc1aec4 = "$Id: sched_locality.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_238cc1aec4 = "$Id$";
diff --git a/sched/sched_main.cpp b/sched/sched_main.cpp
index ef87f1f..77a1793 100644
--- a/sched/sched_main.cpp
+++ b/sched/sched_main.cpp
@@ -669,4 +669,4 @@ void JOB_LIMITS::print_log() {
     }
 }
 
-const char *BOINC_RCSID_0ebdf5d770 = "$Id: sched_main.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_0ebdf5d770 = "$Id$";
diff --git a/sched/sched_msgs.cpp b/sched/sched_msgs.cpp
index 0fb8ae5..00bd1fe 100644
--- a/sched/sched_msgs.cpp
+++ b/sched/sched_msgs.cpp
@@ -73,4 +73,4 @@ void SCHED_MSG_LOG::flush() {
 }
 #endif
 
-const char *BOINC_RCSID_b40ff9bb53 = "$Id: sched_msgs.cpp 22891 2011-01-07 20:23:22Z davea $";
+const char *BOINC_RCSID_b40ff9bb53 = "$Id$";
diff --git a/sched/sched_resend.cpp b/sched/sched_resend.cpp
index 8b469c4..c4257d3 100644
--- a/sched/sched_resend.cpp
+++ b/sched/sched_resend.cpp
@@ -236,4 +236,4 @@ bool resend_lost_work() {
     return did_any;
 }
 
-const char *BOINC_RCSID_3be23838b4="$Id: sched_resend.cpp 23636 2011-06-06 03:40:42Z davea $";
+const char *BOINC_RCSID_3be23838b4="$Id$";
diff --git a/sched/sched_send.cpp b/sched/sched_send.cpp
index 30d1a50..e7ab01f 100644
--- a/sched/sched_send.cpp
+++ b/sched/sched_send.cpp
@@ -1929,4 +1929,4 @@ done:
     send_user_messages();
 }
 
-const char *BOINC_RCSID_32dcd335e7 = "$Id: sched_send.cpp 25567 2012-04-16 20:36:28Z romw $";
+const char *BOINC_RCSID_32dcd335e7 = "$Id$";
diff --git a/sched/sched_shmem.cpp b/sched/sched_shmem.cpp
index 25f7e3a..12c4dea 100644
--- a/sched/sched_shmem.cpp
+++ b/sched/sched_shmem.cpp
@@ -328,4 +328,4 @@ void SCHED_SHMEM::show(FILE* f) {
     }
 }
 
-const char *BOINC_RCSID_e548c94703 = "$Id: sched_shmem.cpp 25258 2012-02-14 16:58:18Z davea $";
+const char *BOINC_RCSID_e548c94703 = "$Id$";
diff --git a/sched/sched_timezone.cpp b/sched/sched_timezone.cpp
index 74fbedc..e733645 100644
--- a/sched/sched_timezone.cpp
+++ b/sched/sched_timezone.cpp
@@ -317,5 +317,5 @@ void process_wu_timezone(
     }
 }
 
-const char *BOINC_RCSID_28b6ac7093 = "$Id: sched_timezone.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_28b6ac7093 = "$Id$";
 
diff --git a/sched/sched_types.cpp b/sched/sched_types.cpp
index 5a41c99..2c70595 100644
--- a/sched/sched_types.cpp
+++ b/sched/sched_types.cpp
@@ -1400,4 +1400,4 @@ double capped_host_fpops() {
     return x;
 }
 
-const char *BOINC_RCSID_ea659117b3 = "$Id: sched_types.cpp 25517 2012-03-30 15:42:18Z romw $";
+const char *BOINC_RCSID_ea659117b3 = "$Id$";
diff --git a/sched/sched_util.cpp b/sched/sched_util.cpp
index 86905b0..a3e2ff8 100644
--- a/sched/sched_util.cpp
+++ b/sched/sched_util.cpp
@@ -383,4 +383,4 @@ void continue_simulation(const char *daemonname){
 
 #endif
 
-const char *BOINC_RCSID_affa6ef1e4 = "$Id: sched_util.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_affa6ef1e4 = "$Id$";
diff --git a/sched/show_shmem.cpp b/sched/show_shmem.cpp
index aff0657..0d644bc 100644
--- a/sched/show_shmem.cpp
+++ b/sched/show_shmem.cpp
@@ -75,4 +75,4 @@ int main(int argc, char *argv[]) {
     ssp->show(stdout);
 }
 
-const char *BOINC_RCSID_a370415aab = "$Id: show_shmem.cpp 21181 2010-04-15 03:13:56Z davea $";
+const char *BOINC_RCSID_a370415aab = "$Id$";
diff --git a/sched/start b/sched/start
index 51ae6d0..fb01cc1 100755
--- a/sched/start
+++ b/sched/start
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- mode: python; python-indent: 4; -*-
 
-## $Id: start 22723 2010-11-19 18:42:44Z davea $
+## $Id$
 
 '''
 A program to start/stop BOINC server daemons and run periodic tasks.
diff --git a/sched/transitioner.cpp b/sched/transitioner.cpp
index 1d45728..968a3d2 100644
--- a/sched/transitioner.cpp
+++ b/sched/transitioner.cpp
@@ -819,4 +819,4 @@ int main(int argc, char** argv) {
     main_loop();
 }
 
-const char *BOINC_RCSID_be98c91511 = "$Id: transitioner.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_be98c91511 = "$Id$";
diff --git a/sched/trickle_handler.cpp b/sched/trickle_handler.cpp
index 13b17bc..b1ab2a7 100644
--- a/sched/trickle_handler.cpp
+++ b/sched/trickle_handler.cpp
@@ -177,4 +177,4 @@ int main(int argc, char** argv) {
     main_loop(one_pass);
 }
 
-const char *BOINC_RCSID_560388f67e = "$Id: trickle_handler.cpp 24227 2011-09-16 19:16:12Z davea $";
+const char *BOINC_RCSID_560388f67e = "$Id$";
diff --git a/sched/update_stats.cpp b/sched/update_stats.cpp
index 7e0db82..9b806b3 100644
--- a/sched/update_stats.cpp
+++ b/sched/update_stats.cpp
@@ -317,4 +317,4 @@ int main(int argc, char** argv) {
     return 0;
 }
 
-const char *BOINC_RCSID_6b05e9ecce = "$Id: update_stats.cpp 23509 2011-05-06 12:33:12Z davea $";
+const char *BOINC_RCSID_6b05e9ecce = "$Id$";
diff --git a/sched/validate_util.cpp b/sched/validate_util.cpp
index 2ee46ce..f3c30ec 100644
--- a/sched/validate_util.cpp
+++ b/sched/validate_util.cpp
@@ -188,4 +188,4 @@ int get_credit_from_wu(WORKUNIT& wu, vector<RESULT>&, double& credit) {
     return ERR_XML_PARSE;
 }
 
-const char *BOINC_RCSID_07049e8a0e = "$Id: validate_util.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_07049e8a0e = "$Id$";
diff --git a/sched/validator.cpp b/sched/validator.cpp
index 67f69f1..6705a1e 100644
--- a/sched/validator.cpp
+++ b/sched/validator.cpp
@@ -797,4 +797,4 @@ int main(int argc, char** argv) {
     main_loop();
 }
 
-const char *BOINC_RCSID_634dbda0b9 = "$Id: validator.cpp 25345 2012-02-27 11:54:02Z bema $";
+const char *BOINC_RCSID_634dbda0b9 = "$Id$";
diff --git a/sched/wu_check.cpp b/sched/wu_check.cpp
index 56e988f..7de20fe 100644
--- a/sched/wu_check.cpp
+++ b/sched/wu_check.cpp
@@ -167,4 +167,4 @@ int main(int argc, char** argv) {
     printf("%d out of %d errors\n", nerr, n);
 }
 
-const char *BOINC_RCSID_8f4e399992 = "$Id: wu_check.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_8f4e399992 = "$Id$";
diff --git a/set-version b/set-version
old mode 100755
new mode 100644
diff --git a/stripchart/README b/stripchart/README
deleted file mode 100644
index 75f5eb9..0000000
--- a/stripchart/README
+++ /dev/null
@@ -1,333 +0,0 @@
-Stripchart version 2.0
-----------------------
-Author: Matt Lebofsky
-        BOINC/SETI at home - University of California, Berkeley
-        mattl at ssl.berkeley.edu
-        
-Date of recent version: November 4, 2002
-
-Requirements:
-  * a gnuplot with the ability to generate gifs
-  * perl 
-  * apache or other cgi-enabled web browser
-
-Send all thoughts and queries to: mattl at ssl.berkeley.edu
-
-This software is free to edit, distribute and use by anybody, as long as
-I get credit for it in some form or another. Thanks.
-----------------------
-
-Contents:
-
-I. Some questions and answers
-II. So how does it work?
-III. Known bugs, things to do, etc.
-
-----------------------
-I. Some questions and answers
-
-Q: What is stripchart?
-
-A: Well, it's actually two relatively small perl programs:
-
-   1. stripchart
-   
-      stripchart reads in time-based user data and, depending on a flurry of
-      command line options, generates a web-friendly .gif plotting the data.
-      The user can supply the time range, the y axis range, even the color
-      scheme, and more.
-
-   2. stripchart.cgi
-
-      stripchart.cgi is a web-based GUI interface that allows users to easily
-      select multiple data sources and various parameters to plot, allowing
-      fast comparisons without having to deal with a command line interface.
-
-Q: Why do you bother writing this program?
-
-A: Working as a systems administrator (amongst other things) for SETI at home,
-   we kept finding ourselves in dire problem-solving situations, i.e. Why
-   did the database stop working? Why is load on our web server so high? 
-      
-   So we started collecting data in flat files, keeping track of server
-   loads, database checkpoint times, even CPU temperatures. When these files
-   grew too large and unwieldy, I found myself writing (and rewriting) simple
-   scripts to generate plots on this data. Sick of constant revision whenever
-   a new problem arose, I wrote stripchart version 1.0.
-
-   Its usefulness became immediately apparent when I added on stripchart.cgi.
-   I couldn't bear to teach everybody the many command line options to 
-   stripchart, so I wrote this CGI to do all the dirty work. Suddenly we were
-   able to line up several plots, look for causes and effects, or just enjoy
-   watching the counts in our database tables grow to impossibly high numbers.
-
-   The SETI at home network has proven to be a delicate system, and keeping track
-   of all the data server, user, and web statistics has proven to be quite a
-   life saver. So when BOINC came around we felt that any project aiming to
-   embark on a similar project may need this tool. So I rewrote stripchart to
-   be a bit more friendly and general. 
-
-Q: Why don't you make .pngs or .jpgs instead of .gifs? The latest gnuplot
-   doesn't support .gifs.
-
-A: Basically gnuplot support for other graphic file formats isn't as good. For
-   example, you cannot control exact window size, font size, and colors unless
-   you make .gifs. I'm not exactly sure why this is the case, but there you have it.
-   Anywho, you can find older gnuplot distributions out there - you'll need to
-   get the gd libs first, by the way.
-
-----------------------
-II. So how does it work?
-
-You can use stripchart as a stand alone command-line program to produce plots
-whenever you like, but we highly recommend using it in conjunction with the
-stripchart.cgi for ease of use. But here's how to do it both ways.
-
-stripchart (stand alone)
-
-Before anything, look at the section GLOBAL/DEFAULT VARS in the program
-stripchart and see if you need to edit anything (usually pathnames to
-executables and such).
-
-Let's just start with the usage (obtained by typing "stripchart -h"):
-
-stripchart: creates stripchart .gif graphic based on data in flat files
-options:
-  -i: input FILE      - name of input data file (mandatory)
-  -o: output FILE     - name of output .gif file (default: STDOUT)
-  -O: output FILE     - name of output .gif file and dump to STDOUT as well
-  -f: from TIME       - stripchart with data starting at TIME 
-                        (default: 24 hours ago)
-  -t: to TIME         - stripchart with data ending at TIME (default: now)
-  -r: range RANGE     - stripchart data centered around "from" time the size
-                        of RANGE (overrides -t)
-  -l: last LINES      - stripchart last number of LINES in data file
-                        (overrides -f and -t and -r)
-  -T: title TITLE     - title to put on graphic (default: FILE RANGE)
-  -x: column X        - time or "x" column (default: 2)
-  -y: column Y        - value or "y" column (default: 3)
-  -Y: column Y'       - overplot second "y" column (default: none)
-  -b: baseline VALUE  - overplot baseline of arbitrary value VALUE
-  -B: baseline-avg    - overrides -b, it plots baseline of computed average
-  -d: dump low VALUE  - ignore data less than VALUE
-  -D: dump high VALUE - ignore data higher than VALUE
-  -v: verbose         - puts verbose runtime output to STDERR
-  -L: log             - makes y axis log scale
-  -c: colors "COLORS" - set gnuplot colors for graph/axis/fonts/data (default:
-                        "xffffff x000000 xc0c0c0 x00a000 x0000a0 x2020c0"
-                        in order: bground, axis/fonts, grids, pointcolor1,2,3)
-  -C: cgi             - output CGI header to STDOUT if being called as CGI
-  -s: stats           - turn extra plot stats on (current, avg, min, max)
-  -j: julian times    - time columns is in local julian date (legacy stuff)
-
-notes:
-  * TIME either unix date, julian date, or civil date in the form:
-      YYYY:MM:DD:HH:MM (year, month, day, hour, minute)
-    If you enter something with colons, it assumes it is civil date
-    If you have a decimal point, it assumes it is julian date
-    If it is an integer, it assumes it is unix date (epoch seconds)
-    If it is a negative number, it is in decimal days from current time
-      (i.e. -2.5 = two and a half days ago)
-    * All times on command line are assumed to be "local" times
-    * All times in the data file must be in unix date (epoch seconds)
-  * RANGE is given in decimal days (i.e. 1.25 = 1 day, 6 hours)
-  * if LINES == 0, (i.e. -l 0) then the whole data file is read in
-  * columns (given with -x, -y, -Y flags) start at 1
-  * titles given with -T can contain the following key words which will
-    be converted:
-      FILE - basename of input file
-      RANGE - pretty civil date range (in local time zone)
-    the default title is: FILE RANGE
-
-...okay that's a lot to ingest, but it's really simple. Let's take a look at an
-example (you'll find in the samples directory two files get_load and crontab).
-
-You have a machine that you want to monitor it's load. Here's a script that
-will output a single line containing two fields for time and the third with the
-actual data. For example:
-
-2002:11:05:12:51 1036529480 0.25
-
-The first field is time in an arbitrary human readable format
-(year:month:day:hour:minute), the second in epoch seconds (standard
-unix time format - the number of seconds since 00:00 1/1/1970 GMT),
-and the third is the load at this time.
-
-And we'll start collecting data every five minutes on this particular machine
-by add such a line to the crontab:
-
-0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/stripchart/samples/get_load >> /disks/matt/data/machine_load
-
-So the file "machine_load" will quickly fill with lines such as the above.
-Now you may ask yourself - why two columns representing time in two different
-formats? Well sometime you just want to look at the data file itself, in which
-case the human-readable first column is quite handy to have around, but when
-making linear time plots, having time in epoch seconds is much faster to
-manipulate. So generally, we like to have at least the two time fields first,
-and the actual data in the third column. That's what stripchart expects by
-default.
-
-Note: stripchart will understand time in both epoch seconds and julian date.
-If the second time field is in julian date, you should supply the command line
-flag "-j" to warn stripchart so it knows how to handle it. 
-
-Okay. So you have this data file now. A very common thing to plot would be the
-data over the past 24 hours. Turns out that's the default! If you type on the
-command line:
-
-stripchart -i machine_load -o machine_load.gif
-
-you will quickly get a new file "machine_load.gif" with all the goods.
-
-Note: you always have to supply an input file via -i. If you don't supply
-an output file via "-o" it .gif gets dumped to stdout. If you supply an
-output file via "-O" the output is stored in both the file and to stdout.
-
-Now let's play with the time ranges. You can supply times in a variety of
-formats on the command line:
-
-   "civil date" i.e. 2002:11:05:12:51 (YYYY:MM:DD:hh:mm)
-   "epoch seconds" i.e. 1036529480
-   "julian date" i.e. 2452583.52345
-
-You can supply a date range using the -f and -t flags (from and to):
-
-stripchart -i machine_load -f 2002:11:01:00:00 -t 2002:11:04:00:00
-
-Usually the "to" time is right now, so you can quickly tell stripchart
-to plot starting at some arbitrary time "ago." This is done also via the
-"-f" flag - if it's negative it will assume you mean that many decimal
-days from now as a starting point. So "-f -3.5" will plot from 3 and a
-half days ago until now.
-
-You can also supply a "range" centered around the from time. For example,
-to plot the 24 hours centered around 2002:11:01:13:40:
-
-stripchart -i machine_load -f 2002:11:01:13:40 -r 1
-
-On some rare occasions you might want to plot the last number of lines
-in a file, regardless of what time they were. If you supply the number
-of lines via the "-l" flag, it overrides any time ranges you may have
-supplied.
-
-Moving on to some other useful flags in no particular order:
-
-To change the default title (which is the basename of the file and
-the time range being plotted), you can do so via the "-T" command.
-Make sure to put the title in quotes. Within the title string the
-all-uppercase string "FILE" will be replaced with the file basename,
-and the string "RANGE" will be replaced by the time range. So in
-essence, the default title string is "FILE RANGE".
-
-If you have data files in different formats, you can specify the data
-columns using the "-x" and "-y" flags. By default -x is 2 and -y is 3.
-Sometimes we have datafiles with many columns so we actively have to tell
-stripchart which is the correct data column.
-
-However, you might want to overplot one column on top of another. If your
-data file has a second data column, you can specify what that is via the
--Y flag, and this data will be overplotted onto the data from the first
-data column.
-
-Sometime you want to plot a horizontal rule or a "baseline". You can
-turn this feature on by specifying the value with the "-b" flag. If you
-use the "-B" flag (without any values) it automatically computes the
-average over the time range and plots that as the baseline. Simple!
-
-If you want to excise certain y values, you can do so with the dump
-flags, i.e. "-d" and "-D". In particular, any values lower than the one
-supplied with "-d" will be dumped, and any values higher supplied by
-"-D" will be dumped. 
-
-To log the y axis, use the "-L" flag. Quite straightforward.
-
-A very useful flag is "-s" which outputs a line of stats underneath
-the plot title. It shows the current value, and the minimum, maximum
-and average values during the plot range.
-
-For verbose output to stderr, use the "-v" flag. It may not make much
-sense, but it's useful for debugging.
-
-Using the "-C" flag causes stripchart to spit out the "Content-type"
-lines necessary for incorporating stripchart plots into CGIs. This
-doesn't work so well now, but there it is.
-
-Okay. That's enough about the flags, and hopefully enough to get you
-playing around with stripchart and plotting some stuff. Now onto:
-
-stripchart.cgi
-
-First and foremost, you need to do the following before running the
-CGI version of stripchart:
-
-1. Put stripchart.cgi in a cgi-enabled web-accessible directory
-2. Make a "lib" directory somewhere that the web server can read/write to
-3. Edit stripchart.cgi GLOBAL/DEFAULT VARS to point to proper paths, including
-   the files "querylist" and "datafiles" in the aforementioned "lib" directory.
-4. Edit the "lib/datafiles" file to contain entries for all your data files.
-   You can find an example datafiles in the samples directory. Follow the
-   instructions in the comment lines, adding your entries below the header.
-
-That should be it, I think. Now go to the URL wherever your stripchart.cgi
-is sitting. If all is well..
-
-You will be immediately presented with a web form. Ignore the "select query"
-pulldown menu for now. Underneath that you will see a line:
-
-Number of stripcharts: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
-
-By default stripchart.cgi presents you with the ability to plot 4 simultaneous
-stripcharts, but you can select any number 1-20 by clicking on those numbers.
-The less plots, the faster a web page gets generated.
-
-For each plot, you get a pull down menu which should contain all the entries
-you already put in "datafiles". Here you are selecting your data source.
-
-Then you can select the time of time range: last x hours, last x days, or
-an arbitrary date range. By default the last x hours radio button is selected -
-to pick another type of time range make sure you select the radio button
-before it. Then enter the range via the pull down menus.
-
-Then you get a simple list of checkbox/input options. You can check to log
-the y axis, baseline the average, baseline an arbitrary value (which you
-enter in the window, enter a y minimum, or enter a maximum. 
-
-When everything is selected, click on the "click here" button to plot.
-Depending on the speed of your machine, you should soon be presented with
-all the plots your desired, and the form underneath the plots which can
-edit to your heart's content. If you want to reset the form values, click
-on the "reset form" link.
-
-Note the "save images in /tmp" checkbox. If that is checked and you plot
-the stripcharts, numbered .gif files will be placed in /tmp on the web
-server machine so you can copy them elsewhere (files will be named:
-stripchart_plot_1.gif, etc.).
-
-On the topmost "click here" button you will note an "enter name to save
-query" balloon. If you enter a name here (any old string) this exact query
-will be saved into the "querylist" file which will then later appear in the
-pulldown menu at the top. That way if you have a favorite set of diagnostic
-plots which you check every morning, you don't have to enter the entire form
-every time.
-
-If you want to delete a query, enter the name in that same field but click
-the "delete" checkbox next to it. Next time you "click here" the query will
-be deleted.
-
-----------------------
-III. Known bugs, things to do, etc.
-
-* stripchart -C flag is kind of pointless and doesn't work in practice.
-* plots on data collected over small time ranges (points every few seconds, for
-  example) hasn't been tested.
-* plots that don't work via stripchart.cgi either show ugly broken image icons
-  or nothing at all - either way it's ungraceful.
-* pulldown menus and various plots sometimes need to be refreshed via a hard
-  refresh (i.e. shift-refresh). 
-* this readme kinda stinks.
-* and many many other issues I'm failing to detail now!
-
-If you have any problems using the product, feel free to e-mail me at:
-
-	mattl at ssl.berkeley.edu
-
diff --git a/stripchart/samples/crontab b/stripchart/samples/crontab
deleted file mode 100644
index d93cafc..0000000
--- a/stripchart/samples/crontab
+++ /dev/null
@@ -1 +0,0 @@
-0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/stripchart/samples/get_load >> /disks/matt/data/machine_load
diff --git a/stripchart/samples/datafiles b/stripchart/samples/datafiles
deleted file mode 100644
index f45dd34..0000000
--- a/stripchart/samples/datafiles
+++ /dev/null
@@ -1,15 +0,0 @@
-# This is the list of data sources for stripchart, in the colon-delimited format:
-# path to data file:title for the graph:column number in the data file:flags to stripchart
-#
-# examples:
-# /disks/matt/data_files/connections:connection drops:3
-# /disks/matt/data_files/connections:tcp rate:4:-b 100
-#
-# To put in a horizontal rule for ease of selection, use the line:
-# x:----------------------------------:x
-#
-get_load_out:machine load:3
-count_results_out:Number of results:3
-assimilated_wus_out:Number of assimilated workunits:3
-download_size_out:Bytes in download dir:3
-upload_size_out:Bytes in upload dir:3
diff --git a/stripchart/samples/db_count b/stripchart/samples/db_count
deleted file mode 100755
index 1707b2a..0000000
--- a/stripchart/samples/db_count
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /bin/csh
-
-set CIVDATE = `date "+%Y:%m:%d:%H:%M"`
-set UNIXDATE = `perl -e 'print time()'`
-set DBNAME = `./parse_config db_name`
-
-set COUNT = `echo "use $DBNAME; select count(*) from $1" | mysql | tail -1`
- 
-echo $CIVDATE $UNIXDATE $COUNT
diff --git a/stripchart/samples/db_looper b/stripchart/samples/db_looper
deleted file mode 100755
index 66d9769..0000000
--- a/stripchart/samples/db_looper
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/csh
-
-set ARG = "db_count $1"
-looper "$ARG" $2
diff --git a/stripchart/samples/db_query b/stripchart/samples/db_query
deleted file mode 100644
index 7934b7c..0000000
--- a/stripchart/samples/db_query
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/csh
-
-
-
-set CIVDATE = `date "+%Y:%m:%d:%H:%M"`
-
-set UNIXDATE = `perl -e 'print time()'`
-
-set DBNAME = `./parse_config db_name`
-
-set COUNT = `echo "use $DBNAME;$1" | mysql | tail -1`
-
-
-
-echo $CIVDATE $UNIXDATE $COUNT
diff --git a/stripchart/samples/dir_size b/stripchart/samples/dir_size
deleted file mode 100755
index d64a4bf..0000000
--- a/stripchart/samples/dir_size
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /bin/csh 
-
-set SIZE = `du -sk $1 | awk '{print $1*1024}'`
-
-set CIVDATE = `/bin/date "+%Y:%m:%d:%H:%M"`
-set UNIXDATE = `/usr/local/bin/perl -e 'print time()'`
-
-echo $CIVDATE $UNIXDATE $SIZE
diff --git a/stripchart/samples/get_load b/stripchart/samples/get_load
deleted file mode 100755
index 5dbb978..0000000
--- a/stripchart/samples/get_load
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/csh 
-
-set UPTIME = `/usr/bin/uptime | awk '{print $10}' | sed s/,//`
-if ($UPTIME == "average:") then
-  set UPTIME = `/usr/bin/uptime | awk '{print $11}' | sed s/,//`
-endif
-
-set CIVDATE = `/bin/date "+%Y:%m:%d:%H:%M"`
-set UNIXDATE = `/usr/local/bin/perl -e 'print time()'`
-
-echo $CIVDATE $UNIXDATE $UPTIME
diff --git a/stripchart/samples/looper b/stripchart/samples/looper
deleted file mode 100755
index 81c36f2..0000000
--- a/stripchart/samples/looper
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/csh 
-
-while (1) 
-    $1
-    sleep $2;
-end
diff --git a/stripchart/samples/parse_config b/stripchart/samples/parse_config
deleted file mode 100644
index 2ad9b63..0000000
--- a/stripchart/samples/parse_config
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-
-# -*- mode: python; python-indent: 4; -*-
-
-
-
-## $Id: parse_config 3581 2004-06-15 19:41:26Z rwalton $
-
-
-
-'''
-
-
-
-A program to pass config file settings to calling programs via stdout
-
-
-
-'''
-
-
-
-import boinc_path_config
-from Boinc import configxml
-
-import sys, os
-
-
-
-program_path = os.path.realpath(os.path.dirname(sys.argv[0]))
-
-config_filename = os.path.realpath(os.path.join(program_path, '../config.xml'))
-
-
-
-config = configxml.ConfigFile(config_filename).read()
-
-
-print config.config.__dict__.get(sys.argv[1])
-
diff --git a/test/1sec_correct_output b/test/1sec_correct_output
deleted file mode 100644
index 19f86f4..0000000
--- a/test/1sec_correct_output
+++ /dev/null
@@ -1 +0,0 @@
-done
diff --git a/test/1sec_result b/test/1sec_result
deleted file mode 100644
index 854f54a..0000000
--- a/test/1sec_result
+++ /dev/null
@@ -1,13 +0,0 @@
-<file_info>
-    <name><OUTFILE_0/></name>
-    <generated_locally/>
-    <upload_when_present/>
-    <url><UPLOAD_URL/></url>
-    <max_nbytes>100000</max_nbytes>
-</file_info>
-<result>
-    <file_ref>
-        <file_name><OUTFILE_0/></file_name>
-        <open_name>out</open_name>
-    </file_ref>
-</result>
diff --git a/test/1sec_wu b/test/1sec_wu
deleted file mode 100644
index da05e11..0000000
--- a/test/1sec_wu
+++ /dev/null
@@ -1,2 +0,0 @@
-<workunit>
-</workunit>
diff --git a/test/Makefile.am b/test/Makefile.am
index 3d7b865..aeb8051 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- mode: makefile; tab-width: 4 -*-
-## $Id: Makefile.am 15375 2008-06-08 22:18:52Z davea $
+## $Id$
 
 include $(top_srcdir)/Makefile.incl
 
diff --git a/test/abort_result b/test/abort_result
deleted file mode 100644
index ccbe669..0000000
--- a/test/abort_result
+++ /dev/null
@@ -1,13 +0,0 @@
-<file_info>
-    <name><OUTFILE_0/></name>
-    <generated_locally/>
-    <upload_when_present/>
-    <max_nbytes>10000</max_nbytes>
-    <url><UPLOAD_URL/></url>
-</file_info>
-<result>
-    <file_ref>
-        <file_name><OUTFILE_0/></file_name>
-        <open_name>out</open_name>
-    </file_ref>
-</result>
diff --git a/test/cgiserver.py b/test/cgiserver.py
deleted file mode 100755
index 5f7f715..0000000
--- a/test/cgiserver.py
+++ /dev/null
@@ -1,197 +0,0 @@
-#!/usr/bin/env python
-
-# $Id: cgiserver.py 2680 2003-11-25 07:40:45Z quarl $
-# cgi/php web server
-
-import BaseHTTPServer, CGIHTTPServer
-import sys, os, urllib, select
-import random, time                     # XXX
-
-php_path = None
-possible_php_paths = [ '/usr/lib/cgi-bin/php4',
-                       'PROGRAM_PATH/fake_php.py' ]
-def setup_php(program_path):
-    global php_path
-    for p in possible_php_paths:
-        p = p.replace('PROGRAM_PATH', program_path)
-        if os.path.exists(p):
-            php_path = p
-            return
-    raise Exception("No php binary found - not even fake_php.py (program_path=%s) !"%program_path)
-
-class PHPHTTPRequestHandler(CGIHTTPServer.CGIHTTPRequestHandler):
-    def is_cgi(self):
-        if os.path.split(self.path)[1] == '':
-            index_php = os.path.join(self.path, 'index.php')
-            if os.path.exists(self.translate_path(index_php)):
-                self.path = index_php
-        if self.path.find('.php') != -1:
-            self.cgi_info = os.path.split(self.path)
-            return True
-
-        for p in self.cgi_directories:
-            p = os.path.join(p,'')
-            if self.path.startswith(p):
-                self.cgi_info = os.path.split(self.path)
-                return True
-        return False
-
-    def run_cgi(self):
-        """Execute a CGI script."""
-        dir, rest = self.cgi_info
-        i = rest.rfind('?')
-        if i >= 0:
-            rest, query = rest[:i], rest[i+1:]
-        else:
-            query = ''
-        i = rest.find('/')
-        if i >= 0:
-            script, rest = rest[:i], rest[i:]
-        else:
-            script, rest = rest, ''
-        scriptname = dir + '/' + script
-        is_php = script.endswith('.php')
-        # print "#### cgi_info=%s,dir=%s,rest=%s,script=%s,scriptname=%s,is_php=%s"%(self.cgi_info,dir,rest,script,scriptname,is_php)
-        if is_php:
-            if not php_path: raise Exception('php_path not set')
-            scriptfile = php_path
-            sourcefile = self.translate_path(scriptname)
-        else:
-            scriptfile = self.translate_path(scriptname)
-        if not os.path.exists(scriptfile):
-            self.send_error(404, "No such CGI script (%s)" % `scriptname`)
-            return
-        if not os.path.isfile(scriptfile):
-            self.send_error(403, "CGI script is not a plain file (%s)" %
-                            `scriptname`)
-            return
-        ispy = self.is_python(scriptname)
-        if not ispy:
-            if not (self.have_fork or self.have_popen2 or self.have_popen3):
-                self.send_error(403, "CGI script is not a Python script (%s)" %
-                                `scriptname`)
-                return
-            if not self.is_executable(scriptfile):
-                self.send_error(403, "CGI script is not executable (%s)" %
-                                `scriptname`)
-                return
-
-        # Reference: http://hoohoo.ncsa.uiuc.edu/cgi/env.html
-        # XXX Much of the following could be prepared ahead of time!
-        env = {}
-        env['DOCUMENT_ROOT'] = os.getcwd()
-        env['SERVER_SOFTWARE'] = self.version_string()
-        env['SERVER_NAME'] = self.server.server_name
-        env['GATEWAY_INTERFACE'] = 'CGI/1.1'
-        env['SERVER_PROTOCOL'] = self.protocol_version
-        env['SERVER_PORT'] = str(self.server.server_port)
-        env['REQUEST_METHOD'] = self.command
-        uqrest = urllib.unquote(self.cgi_info[1])
-        env['REQUEST_URI'] = self.path
-        # env['PATH_INFO'] = uqrest
-        # env['PATH_TRANSLATED'] = self.translate_path(uqrest)
-        env['SCRIPT_NAME'] = scriptname
-        env['SCRIPT_FILENAME'] = self.translate_path(scriptname)
-        if query:
-            env['QUERY_STRING'] = query
-        host = self.address_string()
-        if host != self.client_address[0]:
-            env['REMOTE_HOST'] = host
-        env['REMOTE_ADDR'] = self.client_address[0]
-        env['REDIRECT_STATUS'] = '1'      # for php
-        # XXX AUTH_TYPE
-        # XXX REMOTE_USER
-        # XXX REMOTE_IDENT
-        if self.headers.typeheader is None:
-            env['CONTENT_TYPE'] = self.headers.type
-        else:
-            env['CONTENT_TYPE'] = self.headers.typeheader
-        length = self.headers.getheader('content-length')
-        if length:
-            env['CONTENT_LENGTH'] = length
-        accept = []
-        for line in self.headers.getallmatchingheaders('accept'):
-            if line[:1] in "\t\n\r ":
-                accept.append(line.strip())
-            else:
-                accept = accept + line[7:].split(',')
-        env['HTTP_ACCEPT'] = ','.join(accept)
-        ua = self.headers.getheader('user-agent')
-        if ua:
-            env['HTTP_USER_AGENT'] = ua
-        co = filter(None, self.headers.getheaders('cookie'))
-        if co:
-            env['HTTP_COOKIE'] = ', '.join(co)
-        # XXX Other HTTP_* headers
-        if not self.have_fork:
-            # Since we're setting the env in the parent, provide empty
-            # values to override previously set values
-            for k in ('QUERY_STRING', 'REMOTE_HOST', 'CONTENT_LENGTH',
-                      'HTTP_USER_AGENT', 'HTTP_COOKIE'):
-                env.setdefault(k, "")
-        os.environ.update(env)
-
-        self.send_response(200, "Script output follows")
-
-        decoded_query = query.replace('+', ' ')
-
-        if self.have_fork:
-            # Unix -- fork as we should
-            if is_php:
-                args = [php_path, sourcefile]
-            else:
-                args = [script]
-            if '=' not in decoded_query:
-                args.append(decoded_query)
-            self.wfile.flush() # Always flush before forking
-            pid = os.fork()
-            if pid != 0:
-                # Parent
-                pid, sts = os.waitpid(pid, 0)
-                # throw away additional data [see bug #427345]
-                while select.select([self.rfile], [], [], 0)[0]:
-                    try:
-                        if not self.rfile.read(1):
-                            break
-                    except:
-                        break
-                if sts:
-                    self.log_error("CGI script exit status %#x", sts)
-                return
-            # Child
-            try:
-                if 0:
-                    time.sleep(.1)
-                    fn = '/tmp/a%d'%random.randint(1000,10000)
-                    f = open(fn, 'w')
-                    s = ''
-                    while select.select([self.rfile], [], [], 0)[0]:
-                        try:
-                            c = self.rfile.read(1)
-                            if not c:
-                                break
-                            s += c
-                        except:
-                            break
-                    print '### input:', repr(s)
-                    print >>f, s
-                    f.close()
-                    self.rfile = open(fn, 'r')
-                os.dup2(self.rfile.fileno(), 0)
-                os.dup2(self.wfile.fileno(), 1)
-                os.chdir(self.translate_path(dir)) # KC
-                os.execve(scriptfile, args, os.environ)
-            except:
-                self.server.handle_error(self.request, self.client_address)
-                os._exit(127)
-
-        else:
-            raise SystemExit('need fork()')
-
-def serve(bind='localhost', port=8000, handler=PHPHTTPRequestHandler):
-    httpd = BaseHTTPServer.HTTPServer((bind,port), handler)
-    httpd.serve_forever()
-
-if __name__ == '__main__':
-    setup_php(os.path.realpath(os.path.dirname(sys.argv[0])))
-    serve()
diff --git a/test/concat_correct_output b/test/concat_correct_output
deleted file mode 100644
index 6e293ae..0000000
--- a/test/concat_correct_output
+++ /dev/null
@@ -1,2651 +0,0 @@
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <META http-equiv="Content-Type" CONTENT="text/html" CHARSET="UTF-8">
-    <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-    <STYLE TYPE="text/css" MEDIA="screen">
-            BODY, H2, H3, H4, P, UL, OL, DL
-            {
-            font-family: "Verdana", "Helvetica", "Arial", "sans-serif"
-            }
-
-            H1 {color: #0058a0; font-size: 20pt}
-	    H2 {color: #0058a0; font-size: 16pt}
-	    H3 {color: #0058a0; font-size: 14pt}
-	    H4 {color: #0058a0; font-size: 12pt}
-            
-            A:link, A:active, A:visited
-            {
-            color: #0058a0;
-            text-decoration: none
-            }
-
-            P, UL, OL, DL {margin-left: 10%; margin-right: 10%; font-size: 10pt}
-            DT {margin-bottom: 0.5em}
-            .offset {margin-left: 10%}
-            .afterskip {margin-bottom: 1em}
-            .afterhalf {margin-bottom: 0.5em}
-	    .example {margin-left: 10%; margin-right: 10%;
-	      border-color: #0058a0; border-style:solid; border-width: 1pt; padding: 1pt}
-            CODE {font-family: "Courier"}
-	    .comment {color: #0000ff}
-
-            P.offset {margin-left: 15%}
-            P.inner  {margin-left:  2%; width: 96%}
-            P.note   {margin-left: 10%; border-color: #0058a0;
-	      border-style:solid; border-width: 1pt;
-	      padding: 5pt; background-color:#e0e0e0 }
-	    
-	    PRE {font-size: 10pt; padding: 5pt}
-
-	  </STYLE>
-    <title>GAdoc - Sablotron 0.60</title>
-  </head>
-  <body bgcolor="#ffffff">
-    <h1 CLASS="afterskip">Sablotron 0.60</h1>
-    <DIV CLASS="afterskip">
-      <p>
-        <b>
-          <i>Tom Kaiser (Ginger Alliance)</i>
-        </b>
-      </p>
-      <p>
-        <i>June 17, 2001</i>
-      </p>
-    </DIV>
-    <h3>Abstract</h3>
-    <DIV CLASS="offset">This is a description of the current version of the
-  XSLT processor called Sablotron, including an overview of its
-  limitations as compared to the XSLT specification.
-  </DIV>
-    <h3>Contents</h3>
-<DIV STYLE="margin-left: 10%; margin-bottom: 2em; font-size: smaller">
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__25"></a> <a href="#i__25">
-          <b>1  This text</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__60"></a> <a href="#i__60">
-          <b>2  Changes from the last release</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__74"></a> <a href="#i__74">
-          <b>3  Introduction</b>
-        </a>
-        <DIV class="offset">  <a href="#i__81">3.1  XSLT</a>
-          <BR>  <a href="#i__154">3.2  On Sablotron</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__227"></a> <a href="#i__227">
-          <b>4  The sources</b>
-        </a>
-        <DIV class="offset">  <a href="#i__238">4.1  Getting the sources</a>
-          <BR>  <a href="#i__280">4.2  Joining the development</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__305"></a> <a href="#i__305">
-          <b>5  Implementation. Supported instructions and functions</b>
-        </a>
-        <DIV class="offset">  <a href="#i__343">5.1  Templates</a>
-          <BR>  <a href="#i__364">5.2  Conditional processing</a>
-          <BR>  <a href="#i__381">5.3  Loops</a>
-          <BR>  <a href="#i__398">5.4  Variables and parameters</a>
-          <BR>  <a href="#i__415">5.5  Element creation</a>
-          <BR>  <a href="#i__439">5.6  Global definitions</a>
-          <BR>  <a href="#i__476">5.7  Values and copying</a>
-          <BR>  <a href="#i__508">5.8  Namespace processing</a>
-          <BR>  <a href="#i__529">5.9  Sorting</a>
-          <BR> <a href="#i__577">5.10  Whitespace stripping</a>
-          <BR> <a href="#i__598">5.11  Includes</a>
-          <BR> <a href="#i__623">5.12  Other unimplemented instructions</a>
-          <BR> <a href="#i__654">5.13  Output conformance</a>
-          <BR> <a href="#i__686">5.14  XPath expressions</a>
-          <BR> <a href="#i__714">5.15  Built-in functions</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__804"></a> <a href="#i__804">
-          <b>6  Other implementation-related notes</b>
-        </a>
-        <DIV class="offset">  <a href="#i__811">6.1  Handlers</a>
-          <BR>  <a href="#i__859">6.2  Encodings</a>
-          <BR>  <a href="#i__887">6.3  Output methods</a>
-          <BR>  <a href="#i__915">6.4  URIs</a>
-          <BR>  <a href="#i__983">6.5  Named buffers</a>
-          <BR>  <a href="#i__1015">6.6  Error and log messages</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__1048"></a> <a href="#i__1048">
-          <b>7  The C interface</b>
-        </a>
-        <DIV class="offset">  <a href="#i__1065">7.1  Shortcuts</a>
-          <BR>  <a href="#i__1205">7.2  Basic functions</a>
-          <BR>  <a href="#i__1416">7.3  Generalized interface functions</a>
-          <BR>  <a href="#i__1578">7.4  The situation object</a>
-          <BR>  <a href="#i__1631">7.5  Document Object Model (DOM) functions</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__1870"></a> <a href="#i__1870">
-          <b>8  The command line interface</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__2013"></a> <a href="#i__2013">
-          <b>9  References</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__25"></a>
-      <h2>
-        <a href="#toc_i__25">1  This text</a>
-      </h2>
-      <DIV>
-        <p CLASS="">The HTML form of this description
-        was compiled by Sablotron from the XML source
-        Sablot-0-60.xml. 
-        </p>
-        <p CLASS="">
-        The material in the following sections includes:
-        </p>
-        <ul>
-          <li>some background information on XSLT and Sablotron,</li>
-          <li>a detailed comparison of the current version of
-          Sablotron to the XSLT spec,</li>
-          <li>Sablotron usage from the command line or as a
-          library.</li>
-        </ul>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__60"></a>
-      <h2>
-        <a href="#toc_i__60">2  Changes from the last release</a>
-      </h2>
-      <DIV>
-        <p CLASS="">Please see the RELEASE file.</p>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__74"></a>
-      <h2>
-        <a href="#toc_i__74">3  Introduction</a>
-      </h2>
-      <DIV>
-        <DIV class="afterskip">
-          <a name="i__81"></a>
-          <h3>
-            <a href="#toc_i__74">3.1  XSLT</a>
-          </h3>
-          <p CLASS="">XSLT is a language allowing to transform given XML data (the
-    <i>input</i>) according to a <i>stylesheet</i>. XSLT stylesheets
-    are themselves XML documents; that is, all instructions of the
-    language are expressed in the form of XML elements. The
-    <i>output</i>, i.e. the result of the processing, is typically a
-    XML document as well, although the syntactic requirements can be
-    relaxed to allow the creation of a HTML document (one that
-    contains unclosed tags and the like), or even plain text.
-    </p>
-          <p CLASS="">XSLT was designed by the World Wide Web Consortium (W3C) as
-      a part of the XSL stylesheet language, where it is complemented
-      by a powerful set of formatting instructions. The most precise
-      information about XSLT can be found in the W3C Recommendation <a href="#ref-xslt">[XSLT]</a>. In particular, Appendix B of the
-      Recommendation contains a handy syntax table. A good tutorial is
-      <a href="#ref-bible">[XMLBible14]</a>.
-    </p>
-          <p CLASS="">Other W3C Recommendations one often needs to consult are <a href="#ref-xml">[XML]</a> (for the definition of the XML
-      language) and <a href="#ref-xpath">[XPath]</a> (for details on
-      XPath, the language used to form expressions in XSLT and
-      elsewhere).
-    </p>
-          <p CLASS="">An excellent source of information about XSLT (indeed, about
-    anything related to XML and SGML) is <a href="#ref-rcover">[Cover]</a>; see also <a href="#ref-xslinfo">[XSLINFO]</a> and <a href="#ref-xmlorg">[XMLorg]</a>.
-    </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__154"></a>
-          <h3>
-            <a href="#toc_i__74">3.2  On Sablotron</a>
-          </h3>
-          <p CLASS="">Sablotron is a XSLT processor (though not quite conforming
-      yet..., see below) written in C++. Since the machines where it
-      is meant to run include various small mobile
-      clients, the main objectives of its design are the following:
-    </p>
-          <ul>
-      <li>portability,</li>
-      <li>compact code,</li>
-      <li>as much independence on other resources (Java etc.) as
-      possible.</li>
-    </ul>
-          <p CLASS="">Sablotron is a single shared library
-    (<code>sablot.dll</code> or <code>libsablot.so.0.60</code>). It can
-    also be used from the command line via the simple interface
-    called <code>sabcmd</code>. See <a href="#invocation">here</a> for
-    more information.
-    </p>
-          <p CLASS="">The only software Sablotron relies on is <b>expat</b>, the
-      XML parser by James Clark. See <a href="#expat">below</a> for
-      information on how to get expat.
-      </p>
-          <p CLASS="">For information on the available interfaces, e.g. for
-      Python, Perl and PHP, see <a href="http://www.gingerall.com">www.gingerall.com</a>. 
-      </p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__227"></a>
-      <h2>
-        <a href="#toc_i__227">4  The sources</a>
-      </h2>
-      <DIV>
-        <p CLASS="">
-      Sablotron is written in C++. The source files compile under
-      Win32 (using MS Visual C++ 6.0) and on Solaris and Linux (using
-      g++ 2.95.2) without change.</p>
-        <DIV class="afterskip">
-          <a name="i__238"></a>
-          <h3>
-            <a href="#toc_i__227">4.1  Getting the sources</a>
-          </h3>
-          <p CLASS="">The source or binary distributions of Sablotron can be downloaded
-      from <a href="http://www.gingerall.com">www.gingerall.com</a>. For
-      instructions on how to build the sources (if any), refer to the accompanying INSTALL file.
-      </p>
-          <p CLASS="">If you have access to the Ginger Alliance CVS server, you
-      can get the working version of Sablotron in the CVS module
-      <code>ga</code>. The access rights can be obtained on
-      request from <a href="mailto:cvsadmin at gingerall.com">the CVS admin</a>.
-      </p>
-          <p CLASS="">
-            <a name="expat"></a>
-      Since version 0.50, Sablotron uses expat 1.95.1, available from <a href="http://expat.sourceforge.org">SourceForge</a>.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__280"></a>
-          <h3>
-            <a href="#toc_i__227">4.2  Joining the development</a>
-          </h3>
-          <p CLASS="">
-      Sablotron is an open source project and all volunteers are most
-      welcome! The documentation of the sources is still somewhat
-      sparse but we will try to improve it. If you find the invitation
-      to work on Sablotron with us interesting, please <a href="mailto:sablotron at gingerall.com">contact us</a>. There is also
-      a mailing list available, see <a href="http://www.gingerall.com">www.gingerall.com</a>.
-      </p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__305"></a>
-      <h2>
-        <a href="#toc_i__305">5  Implementation. Supported instructions and functions</a>
-      </h2>
-      <DIV>
-        <p CLASS="">The instruction set supported by this version of Sablotron is
-    already sufficient for many transformation tasks (e.g. the task of
-    formatting this document). On the other
-    hand, a comparison of it to the XSLT specification <a href="#ref-xslt">[XSLT]</a> shows that much is still to be
-    done. The purpose of the
-    following sections is to describe the varying degree of support
-    for the elements of the XSLT language. </p>
-        <p CLASS="">It may be helpful to refer to the syntax table in Appendix B
-    of <a href="#ref-xslt">[XSLT]</a>. The instructions/attributes that
-    are not listed as unsupported should be implemented. The <a href="mailto:sablotron at gingerall.com">authors</a> will appreciate being
-    told about any omissions found in the following
-    description.</p>
-        <p CLASS="">For readability, I sometimes omit the <code>xsl:</code> prefix
-    from the instruction names.</p>
-        <DIV class="afterskip">
-          <a name="i__343"></a>
-          <h3>
-            <a href="#toc_i__305">5.1  Templates</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        template, apply-templates, call-template
-      </code>
-          </p>
-          <p CLASS="">
-        Fully implemented. <code>xsl:sort</code> is supported since release 0.50.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__364"></a>
-          <h3>
-            <a href="#toc_i__305">5.2  Conditional processing</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        if, choose, when, otherwise
-      </code>
-          </p>
-          <p CLASS="">Fully implemented.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__381"></a>
-          <h3>
-            <a href="#toc_i__305">5.3  Loops</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>for-each</code>
-          </p>
-          <p CLASS="">Fully implemented.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__398"></a>
-          <h3>
-            <a href="#toc_i__305">5.4  Variables and parameters</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>variable, param, with-param</code>
-          </p>
-          <p CLASS="">Fully implemented. Top-level variables and parameters are
-      read in the document order, so no forward references are
-      resolved. This is a minor deviation from the spec. </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__415"></a>
-          <h3>
-            <a href="#toc_i__305">5.5  Element creation</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>element, attribute, text, 
-      comment, processing-instruction, attribute-set</code>
-          </p>
-          <p CLASS="">
-            <code>xsl:attribute-set</code> is not implemented. For the
-      rest, <code>name</code> is the only recognized attribute (where
-      applicable). Literal result elements work.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__439"></a>
-          <h3>
-            <a href="#toc_i__305">5.6  Global definitions</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>stylesheet, transform, output</code>
-          </p>
-          <p CLASS="">For <code>stylesheet</code> and <code>transform</code>,
-        the only recognized attribute is
-        <code>version</code>. <code>xsl:output</code> should work
-        (see below for notes on the <code>encoding</code>
-        attribute). HTML indentation has been added in 0.60.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__476"></a>
-          <h3>
-            <a href="#toc_i__305">5.7  Values and copying</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>value-of, copy, copy-of</code>
-          </p>
-          <p CLASS="">
-            <code>copy-of</code> and <code>value-of</code> are fully
-      implemented. <code>copy</code> is implemented except for the
-      <code>use-attribute-sets</code> attribute.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__508"></a>
-          <h3>
-            <a href="#toc_i__305">5.8  Namespace processing</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>namespace-alias</code>
-          </p>
-          <p CLASS="">Namespaces should be processed correctly. The
-      <code>namespace-alias</code> instruction is now supported
-      (patch by Major).</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__529"></a>
-          <h3>
-            <a href="#toc_i__305">5.9  Sorting</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>sort</code>
-          </p>
-          <p CLASS="">
-            <code>xsl:sort</code> is implemented since 0.50. There are
-      minor limitations:
-      </p>
-          <ul>
-        <li>currently, the <code>lang</code> attribute may only
-        contain the values <code>"en"</code> or <code>"cz"</code>.</li>
-        <li>
-              <code>case-order</code> cannot be specified.</li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__577"></a>
-          <h3>
-            <a href="#toc_i__305">5.10  Whitespace stripping</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>strip-space, preserve-space</code>
-          </p>
-          <p CLASS="">Only the default whitespace stripping is done. That is,
-      all whitespace-only text nodes in any stylesheet, not appearing
-      inside a <code>xsl:text</code>, are removed. The two
-      instructions for whitespace stripping and preservation are
-      unsupported.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__598"></a>
-          <h3>
-            <a href="#toc_i__305">5.11  Includes</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>include, import, apply-imports</code>
-          </p>
-          <p CLASS="">Only <code>xsl:include</code> is implemented. Processing
-      involving multiple documents works, but has to get more testing,
-      eg. with respect to <code>generate-id()</code>.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__623"></a>
-          <h3>
-            <a href="#toc_i__305">5.12  Other unimplemented instructions</a>
-          </h3>
-          <ul>
-        <li>
-              <code>xsl:key,</code>
-            </li>
-        <li>
-              <code>xsl:number,</code>
-            </li>
-        <li>
-              <code>xsl:fallback.</code>
-            </li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__654"></a>
-          <h3>
-            <a href="#toc_i__305">5.13  Output conformance</a>
-          </h3>
-          <p CLASS="">The output mechanism is much closer to the spec than in
-      the versions prior to 0.4. The following issues remain for the
-      html method:</p>
-          <ul>
-        <li>Output the boolean attributes correctly.</li>
-        <li>Disable the escaping inside
-        <code><SCRIPT></code> and
-        <code><STYLE></code>
-            </li>.
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__686"></a>
-          <h3>
-            <a href="#toc_i__305">5.14  XPath expressions</a>
-          </h3>
-          <p CLASS="">Almost all features of XPath are fully implemented. This means
-      there should be no problems with expressions of any kind.</p>
-          <p CLASS="">One exception relates to axes. The <code>following</code> and
-      <code>preceding</code> axes haven't been implemented yet.</p>
-          <p CLASS="">Another possible exception may be numbers; we did not yet do a
-      thorough test of rounding, NaNs, infinity, etc.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__714"></a>
-          <h3>
-            <a href="#toc_i__305">5.15  Built-in functions</a>
-          </h3>
-          <p CLASS="">
-            <a name="corelib"></a>Only a few functions from the standard
-      function library remain
-      unimplemented:
-      </p>
-          <ul>
-      <li>
-              <code>id()</code>,</li>
-      <li>
-              <code>lang()</code> (accepted but always returns true),</li>
-      <li>
-              <code>key()</code>,</li>
-      <li>
-              <code>format-number()</code>,</li>
-      <li>
-              <code>unparsed-entity-uri()</code>.</li>
-      </ul>
-          <p CLASS="">As for the fuctions that <i>are</i> implemented, the
-      following is a list of differences from the spec:
-      </p>
-          <ul>
-        <li>
-              <code>document()</code> only accepts one argument, always
-        getting the base URI from the stylesheet URI.
-        </li>
-        <li>
-              <code>string-length()</code> returns the byte length of
-        the UTF-8 representation of the string. This will typically
-        differ from the actual length.
-        </li>
-        <li>
-              <code>generate-id()</code> might fail to generate unique identifiers
-        when several input documents are present (giving the same id to
-        nodes from different documents).
-        </li>
-      </ul>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__804"></a>
-      <h2>
-        <a href="#toc_i__804">6  Other implementation-related notes</a>
-      </h2>
-      <DIV>
-        <DIV class="afterskip">
-          <a name="i__811"></a>
-          <h3>
-            <a href="#toc_i__804">6.1  Handlers</a>
-          </h3>
-          <p CLASS="">It is possible for the user to supply the following
-      handlers to Sablotron:
-        <ul>
-          <li>message handler (to bypass the default way of displaying
-          error and warning messages and logging),</li>
-          <li>scheme handler (to retrieve documents whose URI use an
-          unsupported scheme),</li>
-          <li>streaming handler (an expat-like interface to the XML
-          document which is the result of the processing),</li>
-          <li>'miscellaneous' handler (which will probably server as a
-          collections of odd callbacks).</li>
-        </ul>
-      </p>
-          <p CLASS="">
-        The handlers are set using <code>SablotRegHandler()</code>
-        For details concerning the interface of these handlers,
-        consult the header files <code>sablot.h</code> and
-        <code>shandler.h</code>. 
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__859"></a>
-          <h3>
-            <a href="#toc_i__804">6.2  Encodings</a>
-          </h3>
-          <p CLASS="">
-        In version 0.52, the encoding conversion capabilities of
-        Sablotron have been much extended. The most important fact is the
-        following: if you have the iconv library installed on your system, you
-        can use any encoding it supports (that is, almost any encoding
-        whatsoever) for both the input and the output documents. Iconv
-        is available on most systems (it is a standard part of glibc2,
-        for instance). There are implementations for Win32 as well.
-      </p>
-          <p CLASS="">If iconv is not available, the encoding may still be supported internally by
-      Sablotron. At present, the list is of such encodings is rather
-      short: besides UTF-8, these are UTF-16, ASCII, iso-8859-1,
-      iso-8859-2 and windows-1250 on input, none on output. However,
-      we plan to implement a half independent light-weight
-      conversion library for use on systems without iconv,
-      extending the set of internally supported encodings
-      considerably. 
-      </p>
-          <p CLASS="">Lastly, the user has the option to implement a custom
-      encoding conversion handler, which will be asked to perform any unsupported
-      conversion. See the <code>shandler.h</code> header file for
-      details.
-      </p>
-          <p CLASS="">The default input and output encoding is in all cases UTF-8.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__887"></a>
-          <h3>
-            <a href="#toc_i__804">6.3  Output methods</a>
-          </h3>
-          <p CLASS="">In addition to the standard output methods (xml, html and
-      text), it is possible to output xhtml. Documents output using
-      this method obey the XHTML 1.0 rules (in particular, all empty
-      elements are closed). To choose the method, use
-      <code><xsl:output method='xhtml'></code>. <b>Please note</b>
-      that the name of this method will possibly be changed since the XSLT
-      spec requires any processor-specific methods to have qualified
-      names, say <code>sab:xhtml</code>. On the other hand, the name
-      <code>xhtml</code> is considered in the XSLT 2.0 working draft.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__915"></a>
-          <h3>
-            <a href="#toc_i__804">6.4  URIs</a>
-          </h3>
-          <p CLASS="">Sablotron can handle
-      two URI schemes natively: 'file' and 'arg' (see
-      below). Moreover, it is possible to use the function
-      <code>SablotRegSchemeHandler</code> to register an external scheme
-      handler which will receive requests in all other schemes. See
-      the documentation in <code>sablot.h</code> and
-      <code>shandler.h</code>.
-      </p>
-          <p CLASS="">Relative URI references are resolved in conformance to RFC
-      2396. The base URI is well defined when the relative reference appears
-      inside a XML document; when invoking sabcmd, the base URI is
-      taken to correspond to the current working directory.
-      </p>
-          <p CLASS="">
-            <a name="fname-rules"></a>When specifying filenames, the
-      following rules are in effect:
-      </p>
-          <ul>
-        <li>specify the "file:" scheme for any standard files,
-      i.e. refer to <code>stdin</code> as <code>file://stdin</code>
-      etc.</li>
-        <li>slashes and backslashes work equally fine, in Windows as
-      well as Linux.</li>
-        <li>to include a drive letter under Windows
-      (e.g. <code>C:\doc.xml</code>), it is necessary to say
-      <code>file://c:/doc.xml</code>. 
-        </li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__983"></a>
-          <h3>
-            <a href="#toc_i__804">6.5  Named buffers</a>
-          </h3>
-          <p CLASS="">
-            <a name="argscheme"></a>Sablotron introduces an URI scheme
-      'arg:' which enables one to use strings in named memory
-      buffers. The buffer names can have a tree-like structure so that
-      a relative reference from a document in a buffer can be resolved
-      as pointing to another buffer.
-      </p>
-          <p CLASS="">For instance, if we invoke Sablotron specifying that a
-      buffer named <code>/mybuf/1</code> contains the string
-      "&lt;a>contents&lt;/a>", then the expression
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-      document('arg:/mybuf/1')/a
-      </code>
-          </p>
-          <p CLASS="">has string-value "contents". If the document in arg:/mybuf/1
-      contained a relative URI reference "../theirbuf/2" then this
-      would be resolved as pointing to "arg:/theirbuf/2".</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1015"></a>
-          <h3>
-            <a href="#toc_i__804">6.6  Error and log messages</a>
-          </h3>
-          <p CLASS="">By default, Sablotron writes error and warning messages to
-      stderr, and does no logging. By a call to
-      <code>SablotSetLog()</code>, you can specify the name of the log
-      file to be used.</p>
-          <p CLASS="">Besides, you can use <code>SablotRegHandler()</code>
-      to override the default message handling. The handler you
-      register will receive all messages in a structured form that's
-      easy to process and filter. For details, see
-      the documentation in <code>sablot.h</code> and
-      <code>shandler.h</code>.</p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__1048"></a>
-      <h2>
-        <a href="#toc_i__1048">7  The C interface</a>
-      </h2>
-      <DIV>
-        <p CLASS="">
-          <a name="invocation"></a>
-        </p>
-        <p CLASS="">
-        This section describes the functions exported from the
-        Sablotron library.  All of them have a return type of 'int'
-        and return an error flag (nonzero signals an error). Errors
-        are reported to the user by Sablotron itself. 
-      </p>
-        <DIV class="afterskip">
-          <a name="i__1065"></a>
-          <h3>
-            <a href="#toc_i__1048">7.1  Shortcuts</a>
-          </h3>
-          <p CLASS="">
-        We'll first describe the 'shortcuts' that do the whole
-        processing in one call.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcess(char *sheetURI, char *inputURI, char *resultURI,
-        char **params, char **arguments, char **resultArg);
-      </code>
-          </p>
-          <p CLASS="">
-        This is the basic function. The first three of its arguments
-        are the URIs of the XSLT stylesheet, the XML source and the
-        resulting document, respectively. For some notes on specifying
-        file names, see <a href="#fname-rules">above</a>.
-      </p>
-          <p CLASS="">
-            <code>params</code> is an array of pointers to the names
-      and contents of the top-level stylesheet parameters. Thus,
-      <code>params[0]</code> is a pointer to the null-terminated name
-      of the first parameter, <code>params[1]</code> points to the
-      (null-terminated) contents of the first parameter. The following
-      two array items do the same for the second parameter, etc. The
-      whole array is terminated by a NULL pointer in place of the
-      name. If no parameters are to be passed, you can specify NULL
-      for <code>params</code> itself.
-      </p>
-          <p CLASS="">
-            <code>arguments</code> is a similar array of named buffers
-      to be passed to the stylesheet. (They can be referred to via the
-      'arg:' scheme, see <a href="#argscheme">above</a>.) Again, the
-      array is a sequence of (name, value) pairs terminated by NULL in
-      place of a name. If no named buffers are to be passed, you can
-      specify NULL for <code>arguments</code> itself.
-      </p>
-          <p CLASS="">
-            <code>resultArg</code> enables one to access the
-      resulting document in case the output went to a named buffer. In
-      that situation, <code>*resultArg</code> points to the resulting
-      null-terminated string, allocated by Sablotron. You can pass NULL
-      for <code>resultArg</code> if the output is sure to go to a
-      file. 
-      </p>
-          <p CLASS="">
-            <b>Note:</b>When you are done processing the string
-      pointed to by <code>*resultArg</code>, free it using <a href="#sablotfree">
-              <code>SablotFree()</code>
-            </a> - never use
-      <code>free()</code>. The latter is guaranteed to produce a
-      segmentation fault under Linux.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcessFiles(char *styleSheetName,
-        char *inputName,
-        char *resultName);
-      </code>
-          </p>
-          <p CLASS="">A wrapper for <code>SablotProcess()</code> working on
-      files. The parameters are the null-terminated file names of the
-      XSLT stylesheet, the XML input and the result,
-      respectively. Sablotron opens these files itself and closes them
-      after the processing is complete. Values like "file://stdin" are
-      allowed.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcessStrings(char *styleSheetStr, char *inputStr, char
-        **resultStr);
-      </code>
-          </p>
-          <p CLASS="">Another wrapper for <code>SablotProcess()</code>, this
-        time for accessing named buffers (i.e. user-allocated memory
-        blocks)only. Thus, the first parameter is a null-terminated
-        string containing the whole stylesheet; the second parameter
-        is a null-terminated string containing the XML
-        input. Sablotron allocates the buffer for the resulting string
-        and returns a pointer to it in resultStr. Hence, invoking
-        <code>puts(*resultStr)</code> after having called
-        <code>SablotProcessStrings</code> sends the result to
-        stdout. The buffer allocated <b>must</b> be freed by calling the
-        function <code>SablotFree</code> described next. 
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1205"></a>
-          <h3>
-            <a href="#toc_i__1048">7.2  Basic functions</a>
-          </h3>
-          <p CLASS="">The above shortcuts just call the basic, lower-level
-      functions described below. Note that if you need to set options
-      for logging etc., you may need to use the low-level
-      functions. </p>
-          <p CLASS="">A typical processing session may look like this:</p>
-          <p CLASS="">
-            <pre>
-          SablotHandle p;
-          char *my_buf;
-          SablotCreateProcessor(&p);
-          SablotSetLog(p, ...);
-          /* ...set other instance-specific options here... */
-          SablotRunProcessor(p, ...);
-          SablotGetResultArg(p, "arg:/somename", &my_buf)
-          /* ...do something with my_buf... */
-          /* can run the processor again if necessary */
-          SablotRunProcessor(p, ...);
-          SablotDestroyProcessor(p);
-      </pre>
-          </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotCreateProcessor(SablotHandle *processorPtr);
-      </code>
-          </p>
-          <p CLASS="">Creates an instance of Sablotron and returns a pointer to
-      it in *processorPtr. This pointer is passed on all subsequent
-      calls to this instance. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotDestroyProcessor(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Destroys an instance of the processor, deallocating all
-      the memory used up by it.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotRunProcessor(SablotHandle processor_,
-        char *sheetURI, 
-        char *inputURI, 
-        char *resultURI,
-        char **params, 
-        char **arguments);
-      </code>
-          </p>
-          <p CLASS="">Processes documents using the given processor instance and
-      given params and args definitions. See
-      <code>SablotProcess()</code>.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotGetResultArg(SablotHandle processor_,
-        char *argURI,
-        char **argValue);
-      </code>
-          </p>
-          <p CLASS="">Copies the result 'arg' buffer with the given URI,
-      returning a pointer to the newly-allocated block in
-      *argValue. If no such buffer exists, returns NULL in *argValue. 
-      </p>
-          <p CLASS="">This function is necessary, because if the result document
-      is output to memory, it would be lost when
-      <code>SablotDestroyProcessor()</code> is called. When
-      deallocating the copy obtained from
-      <code>SablotGetResultArg()</code>, use <code>SablotFree</code>
-      (never <code>free()</code>). </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotFreeResultArgs(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Removes the Sablotron-internal copies of the 'arg' buffers
-      from the last Sablotron run. Normally, there should be no reason
-      to call this function as it is called automatically on both
-      <code>SablotRunProcessor()</code> and
-      <code>SablotDestroyProcessor()</code>. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-              <a name="sablotfree"></a>
-        int SablotFree(char *resultBuf);
-      </code>
-          </p>
-          <p CLASS="">This function frees the buffer allocated on previous call
-        to <code>SablotProcessStrings</code>. Calling it with an
-        invalid pointer will cause a crash. 
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotRegHandler(
-        SablotHandle processor_, 
-        HandlerType type,   
-        void *handler, 
-        void *userData);
-      </code>
-          </p>
-          <p CLASS="">Registers an external handler. <code>type</code> can be
-        <code>HLR_MESSAGE</code>, <code>HLR_SCHEME</code>,
-        <code>HLR_SAX</code>, <code>HLR_MISC</code> or
-        <code>HLR_ENC</code>. 
-        <code>handler</code> points to the
-        callback vector of the appropriate type. <code>userData</code>
-        is a data item to passed to all callbacks of this particular
-        handler. For details, check the <code>sablot.h</code> and
-        <code>shandler.h</code> header files.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotUnregHandler(
-        SablotHandle processor_, 
-        HandlerType type,   
-        void *handler, 
-        void *userData);
-      </code>
-          </p>
-          <p CLASS="">Unregisters the given external handler. For details, check the
-      <code>sablot.h</code> and <code>shandler.h</code> header
-      files.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotSetLog(
-        SablotHandle processor_,
-        const char *logFilename, 
-        int logLevel);
-      </code>
-          </p>
-          <p CLASS="">Sets the log filename. The <code>logLevel</code> parameter
-      is currently not used. Pass NULL for <code>logFilename</code> to
-      turn logging off (default). </p>
-          <p CLASS="">The other functions published by sablot.h have been
-      included for experimental reasons or for compatibility, and it
-      is better not to use them.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotClearError(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Clears the 'pending error' flag for this instance of
-      Sablotron.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1416"></a>
-          <h3>
-            <a href="#toc_i__1048">7.3  Generalized interface functions</a>
-          </h3>
-          <p CLASS="">The implementation of the <a href="#dom">DOM interface</a>
-      brought the need to extend some of the functions described in
-      the previous section. This extension enables the user to:
-      </p>
-          <ul>
-        <li>process documents created by the DOM functions, and</li>
-        <li>process frequently used documents in pre-parsed form.</li>
-      </ul>
-          <p CLASS="">An object called <i>situation</i> is used to provide a
-persistent context for all calls to the DOM-related
-functions. Functions used to manipulate the situation are described in
-<a href="#situation">the following section</a>.</p>
-          <p CLASS="">
-            <b>Note:</b> If not specified otherwise, all these
-      functions return an error code. A positive value indicates an error.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotCreateDocument(SablotSituation S, 
-	    SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Creates an empty document. Typically followed by calls to
-      DOM functions to populate the document.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotDestroyDocument(SablotSituation S, 
-	    SDOM_Document D);
-      </code>
-          </p>
-          <p CLASS="">Destroys a document, freeing all the nodes it has created.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotParse(SablotSituation S, 
-        const char *uri, SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Reads in a document from the given URI.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotParseBuffer(SablotSituation S, 
-        const char *buffer, SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Reads in a document from the given in-memory buffer.</p>
-          <p CLASS="">These functions have variants to be used if the document
-      is to be interpreted as an XSLT stylesheet, namely
-      <code>SablotParseStylesheet</code> and
-      <code>SablotParseStylesheetBuffer</code>.</p>
-          <p CLASS="">The following functions generalize
-      <code>SablotRunProcessor</code> in that they make it possible to
-      utilize an extra kind of a source document: a DOM tree.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotRunProcessorGen(SablotSituation S,
-        void *processor_,
-        char *sheetURI, 
-        char *inputURI, 
-        char *resultURI);    
-      </code>
-          </p>
-          <p CLASS="">A key ingredient of the extended interface. Only the URIs
-      of the sources and of the result document are given to it. The
-      rest of the information passed to
-      <code>SablotRunProcessor</code> is conveyed through
-      <code>SablotAddArgBuffer,</code> <code>SablotAddArgTree</code>
-      and <code>SablotAddParam.</code> The scheme part of the
-      stylesheet URI or the input URI may be "arg:", in which
-      case they refer to a buffer or tree passed by these
-      functions. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddArgBuffer(SablotSituation S,
-        void *processor_,
-        const char *argName,
-        const char *bufferValue);
-</code>
-          </p>
-          <p CLASS="">Creates a named buffer for the next processor run. The
-      buffer's name and contents are passed as arguments. The name
-      is interpreted relative to the 'arg:/' scheme.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddArgTree(SablotSituation S,
-        void *processor_,
-        const char *argName,
-        SDOM_Document tree);
-</code>
-          </p>
-          <p CLASS="">Associates the given document with a name for the next
-      processor run. The document is <i>not</i> destroyed after the
-      run is finished. The name is interpreted relative to the 'arg:/'
-      scheme.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddParam(SablotSituation S,
-        void *processor_,
-        const char *paramName,
-        const char *paramValue);
-      </code>
-          </p>
-          <p CLASS="">Adds a global stylesheet parameter for the next processor
-      run.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1578"></a>
-          <h3>
-            <a href="#toc_i__1048">7.4  The situation object</a>
-          </h3>
-          <p CLASS="">
-            <a name="situation"></a>At present, the situation object primarily holds information on any pending errors. A
-situation is created using</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotCreateSituation(SablotSituation
-      *SP);</code>
-          </p>
-          <p CLASS="">and destroyed by</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotDestroySituation(SablotSituation
-      S);</code>
-          </p>
-          <p CLASS="">To clear the pending error flag in a situation, use</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotClearSituation(SablotSituation
-      S);</code>
-          </p>
-          <p CLASS="">The following self-explanatory functions extract parts of the error information
-      from the situation:</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        const char *SablotGetErrorURI(SablotSituation S);<br>
-        int SablotGetErrorLine(SablotSituation S);<br>
-        const char *SablotGetErrorMsg(SablotSituation S);
-     </code>
-          </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1631"></a>
-          <h3>
-            <a href="#toc_i__1048">7.5  Document Object Model (DOM) functions</a>
-          </h3>
-          <p CLASS="">
-            <a name="dom"></a>Starting with version 0.60, Sablotron implements
-      a major subset of the DOM Level 1 Core Specification <a href="#ref-dom">[DOM]</a>. A brief
-      description of the implemented interface follows; for more
-      details, please refer to the header file named
-      <code>sdom.h.</code>
-          </p>
-          <p CLASS="">All of the names related to the DOM interface start with
-      SDOM_ (for Sablot DOM).</p>
-          <p CLASS="">Major new types are <code>SDOM_Document</code> (a DOM tree) and
-      <code>SDOM_Node</code> (a node of the tree). A document can also be used in
-      place of a node. This reflects the fact in the DOM spec, 
-      Document is a subclass of Node. When used in this way, the
-      document represents its own root node (which is not the same as
-      the `root element').</p>
-          <p CLASS="">Other types include:</p>
-          <ul>
-        <li>
-              <code>SDOM_char:</code> a DOM character type. Currently, this is just
-        char. Note that the DOM spec requires that the DOM
-        implementations work with UTF-16. Sablotron deviates from this
-        by using UTF-8 instead. A separate set of functions taking
-        UTF-16 strings will be provided.</li>
-        <li>
-              <code>SDOM_NodeType:</code> a node type enum. Some of the values are
-        <code>SDOM_ELEMENT_NODE,</code> <code>SDOM_ATTRIBUTE_NODE</code> and <code>SDOM_TEXT_NODE.</code> See
-        <code>sdom.h</code> for the rest.</li>
-        <li>
-              <code>SDOM_NodeList:</code> a node list returned by some of the
-        functions.</li>
-        <li>
-              <code>SDOM_Exception:</code> DOM exception codes enum, with values such
-        as <code>SDOM_NOT_FOUND_ERR</code> or <code>SDOM_INVALID_NODE_TYPE</code>. See <code>sdom.h</code>
-        for details.</li>
-</ul>
-          <p CLASS="">The functions listed below are implemented more or less as defined in
-      the DOM Level 1 Specification, with two exceptions:
-      their names are prefixed with <code>SDOM_</code> and the first argument is
-      always a <code>SablotSituation.</code> All the functions return
-      a <code>SDOM_Exception.</code> </p>
-          <ul>
-<li>
-              <code>createElement, createAttribute, createTextNode,
-createCDATASection, createComment, createProcessingInstruction</code>
-            </li>
-<li>
-              <code>getNodeType, getNodeName, setNodeName, getNodeValue, setNodeValue</code>
-            </li>
-<li>
-              <code>getParentNode, getFirstChild, getLastChild, getPreviousSibling,
-getNextSibling, getOwnerDocument</code>
-            </li>
-<li>
-              <code>insertBefore, appendChild, removeChild, replaceChild</code>
-            </li>
-<li>
-              <code>cloneNode</code>
-            </li>
-<li>
-              <code>getAttribute, setAttribute, removeAttribute, getAttributeList</code>
-            </li>
-</ul>
-          <p CLASS="">Several functions have been added:</p>
-          <ul>
-<li>
-              <code>disposeNode</code> frees all memory used by the given node</li>
-<li>
-              <code>cloneForeignNode</code> clones a node from a different
-document</li>
-<li>
-              <code>docToString</code> serializes the document, returning the
-resulting string</li>
-<li>
-              <code>xql</code> performs an XPath query on the DOM tree,
-returning a list of the nodes satisfying it.</li>
-</ul>
-          <p CLASS="">In addition, there are some functions used to manipulate
-      the node lists returned by <code>xql</code> and
-      <code>getAttributeList</code>. These include
-      <code>getNodeListLength</code>, <code>getNodeListItem</code> and
-      <code>disposeNodeList</code>.</p>
-          <p CLASS="">Finally, there are functions to extract DOM
-      exception-related information from the situation object, namely
-      <code>getExceptionCode</code>, <code>getExceptionMessage</code>
-      and <code>getExceptionDetails</code>.</p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__1870"></a>
-      <h2>
-        <a href="#toc_i__1870">8  The command line interface</a>
-      </h2>
-      <DIV>
-        <p CLASS="">Sablotron comes with a command-line interface to the
-        shared library, which is a program named
-        <code>sabcmd</code>. At present, <code>sabcmd</code> is invoked
-        as follows:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      sabcmd [<i>options</i>] <i>stylesheet</i> [<i>input</i> [<i>result</i>]] [<i>assignments</i>]
-      </code>
-        </p>
-        <p CLASS="">The arguments are the URIs of the XSLT stylesheet, the
-      XML input document, and the resulting document, respectively. The
-      default for <code>
-            <i>input</i>
-          </code> is
-      <code>file://stdin</code> (meaning plain old stdin);
-      <code>
-            <i>result</i>
-          </code> defaults to
-      <code>file://stdout</code>. Filenames have to include the extension (if
-      any).</p>
-        <p CLASS="">You can display the list of available options by typing
-      <code>sabcmd --help</code>. Among the more useful ones are
-      <code>--log-file</code> (for setting the log file) and
-      <code>--measure</code> (measures and outputs the total
-      processing time).
-      </p>
-        <p CLASS="">
-          <a href="#fname-rules">The rules for filenames</a> are the same as
-      with <code>SablotProcess()</code>. 
-      </p>
-        <p CLASS="">
-          <code>assignments</code> is a series of definitions of the
-      form:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      name1=value1 name2=value2 ...
-      </code>
-        </p>
-        <p CLASS="">
-      assigning values to top-level stylesheet parameters and to named
-      buffers. These two cases are distinguished by a leading '$' in
-      the name of a stylesheet parameter. The names of the buffers do
-      <i>not</i> start with "arg:". They may start with a slash; if
-      they don't, the slash is prepended. 
-      </p>
-        <p CLASS="">
-          <b>Note:</b> In most cases, it will be necessary to quote
-      the individual assignments. Whether to use single or double
-      quotes may depend on the shell used (or may it?) Single quotes
-      work for bash, double quotes work in Windows.
-      </p>
-        <p CLASS="">If the result URI refers to a named buffer, the output
-      would normally remain buried in memory. Sabcmd dumps the buffer to standard
-      output instead.
-      </p>
-        <p CLASS="">To sum up and give an example, the following would be a
-      valid invocation of sabcmd:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      sabcmd sheet.xsl arg:/the_input "the_input=&lt;a/>"
-      "$use_defaults=1"
-      </code>
-        </p>
-        <p CLASS="">This processes the document passed in the buffer named
-      the_input, using a stylesheet found in file "sheet.xsl" in the
-      working directory. We assign 1 to the top-level parameter called
-      "use_defaults". The output goes to stdout by default.
-      </p>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__2013"></a>
-      <h2>
-        <a href="#toc_i__2013">9  References</a>
-      </h2>
-      <DIV>
-        <dl>
-      <dt>
-            <a name="ref-xslt"></a>[XSLT]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/1999/REC-xslt-19991116">
-          XSL Transformations (XSLT) Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-xpath"></a>[XPath]</dt>
-      <dd> 
-        <a href="http://www.w3.org/TR/1999/REC-xpath-19991116">
-          XML Path Language (XPath) Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-xml"></a>[XML]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/1998/REC-xml-19980210">
-          Extensible Markup Language (XML) 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-dom"></a>[DOM]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/REC-DOM-Level-1">
-          Document Object Model Level 1 Specification, Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-rcover"></a>[Cover]</dt>
-      <dd>
-        <a href="http://www.oasis-open.org/cover/sgml-xml.html">
-          The XML Cover Pages</a>
-      </dd>
-      
-      <dt>
-            <a name="ref-xmlorg"></a>[XMLorg]</dt>
-      <dd>
-        <a href="http://xml.org">XML.org</a>
-      </dd>
-
-      <dt>
-            <a name="ref-xslinfo"></a>[XSLINFO]</dt>
-      <dd>
-        <a href="http://www.xslinfo.com">XSLINFO.com</a>
-      </dd>
-
-      <dt>
-            <a name="ref-bible"></a>[XMLBible14]</dt>
-      <dd>
-        <a href="http://metalab.unc.edu/xml/books/bible/updates/14.html">
-          Harold, E. R.: XML Bible, Chapter 14 (online presentation)
-        </a>
-      </dd>
-    </dl>
-      </DIV>
-    </DIV>
-    <hr>
-    <p STYLE="font-style: italic; margin-left: 0">(c) 2000 Ginger Alliance s.r.o.</p>
-  </body>
-</html><html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <META http-equiv="Content-Type" CONTENT="text/html" CHARSET="UTF-8">
-    <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-    <STYLE TYPE="text/css" MEDIA="screen">
-            BODY, H2, H3, H4, P, UL, OL, DL
-            {
-            font-family: "Verdana", "Helvetica", "Arial", "sans-serif"
-            }
-
-            H1 {color: #0058a0; font-size: 20pt}
-	    H2 {color: #0058a0; font-size: 16pt}
-	    H3 {color: #0058a0; font-size: 14pt}
-	    H4 {color: #0058a0; font-size: 12pt}
-            
-            A:link, A:active, A:visited
-            {
-            color: #0058a0;
-            text-decoration: none
-            }
-
-            P, UL, OL, DL {margin-left: 10%; margin-right: 10%; font-size: 10pt}
-            DT {margin-bottom: 0.5em}
-            .offset {margin-left: 10%}
-            .afterskip {margin-bottom: 1em}
-            .afterhalf {margin-bottom: 0.5em}
-	    .example {margin-left: 10%; margin-right: 10%;
-	      border-color: #0058a0; border-style:solid; border-width: 1pt; padding: 1pt}
-            CODE {font-family: "Courier"}
-	    .comment {color: #0000ff}
-
-            P.offset {margin-left: 15%}
-            P.inner  {margin-left:  2%; width: 96%}
-            P.note   {margin-left: 10%; border-color: #0058a0;
-	      border-style:solid; border-width: 1pt;
-	      padding: 5pt; background-color:#e0e0e0 }
-	    
-	    PRE {font-size: 10pt; padding: 5pt}
-
-	  </STYLE>
-    <title>GAdoc - Sablotron 0.60</title>
-  </head>
-  <body bgcolor="#ffffff">
-    <h1 CLASS="afterskip">Sablotron 0.60</h1>
-    <DIV CLASS="afterskip">
-      <p>
-        <b>
-          <i>Tom Kaiser (Ginger Alliance)</i>
-        </b>
-      </p>
-      <p>
-        <i>June 17, 2001</i>
-      </p>
-    </DIV>
-    <h3>Abstract</h3>
-    <DIV CLASS="offset">This is a description of the current version of the
-  XSLT processor called Sablotron, including an overview of its
-  limitations as compared to the XSLT specification.
-  </DIV>
-    <h3>Contents</h3>
-<DIV STYLE="margin-left: 10%; margin-bottom: 2em; font-size: smaller">
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__25"></a> <a href="#i__25">
-          <b>1  This text</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__60"></a> <a href="#i__60">
-          <b>2  Changes from the last release</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__74"></a> <a href="#i__74">
-          <b>3  Introduction</b>
-        </a>
-        <DIV class="offset">  <a href="#i__81">3.1  XSLT</a>
-          <BR>  <a href="#i__154">3.2  On Sablotron</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__227"></a> <a href="#i__227">
-          <b>4  The sources</b>
-        </a>
-        <DIV class="offset">  <a href="#i__238">4.1  Getting the sources</a>
-          <BR>  <a href="#i__280">4.2  Joining the development</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__305"></a> <a href="#i__305">
-          <b>5  Implementation. Supported instructions and functions</b>
-        </a>
-        <DIV class="offset">  <a href="#i__343">5.1  Templates</a>
-          <BR>  <a href="#i__364">5.2  Conditional processing</a>
-          <BR>  <a href="#i__381">5.3  Loops</a>
-          <BR>  <a href="#i__398">5.4  Variables and parameters</a>
-          <BR>  <a href="#i__415">5.5  Element creation</a>
-          <BR>  <a href="#i__439">5.6  Global definitions</a>
-          <BR>  <a href="#i__476">5.7  Values and copying</a>
-          <BR>  <a href="#i__508">5.8  Namespace processing</a>
-          <BR>  <a href="#i__529">5.9  Sorting</a>
-          <BR> <a href="#i__577">5.10  Whitespace stripping</a>
-          <BR> <a href="#i__598">5.11  Includes</a>
-          <BR> <a href="#i__623">5.12  Other unimplemented instructions</a>
-          <BR> <a href="#i__654">5.13  Output conformance</a>
-          <BR> <a href="#i__686">5.14  XPath expressions</a>
-          <BR> <a href="#i__714">5.15  Built-in functions</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__804"></a> <a href="#i__804">
-          <b>6  Other implementation-related notes</b>
-        </a>
-        <DIV class="offset">  <a href="#i__811">6.1  Handlers</a>
-          <BR>  <a href="#i__859">6.2  Encodings</a>
-          <BR>  <a href="#i__887">6.3  Output methods</a>
-          <BR>  <a href="#i__915">6.4  URIs</a>
-          <BR>  <a href="#i__983">6.5  Named buffers</a>
-          <BR>  <a href="#i__1015">6.6  Error and log messages</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__1048"></a> <a href="#i__1048">
-          <b>7  The C interface</b>
-        </a>
-        <DIV class="offset">  <a href="#i__1065">7.1  Shortcuts</a>
-          <BR>  <a href="#i__1205">7.2  Basic functions</a>
-          <BR>  <a href="#i__1416">7.3  Generalized interface functions</a>
-          <BR>  <a href="#i__1578">7.4  The situation object</a>
-          <BR>  <a href="#i__1631">7.5  Document Object Model (DOM) functions</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__1870"></a> <a href="#i__1870">
-          <b>8  The command line interface</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__2013"></a> <a href="#i__2013">
-          <b>9  References</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__25"></a>
-      <h2>
-        <a href="#toc_i__25">1  This text</a>
-      </h2>
-      <DIV>
-        <p CLASS="">The HTML form of this description
-        was compiled by Sablotron from the XML source
-        Sablot-0-60.xml. 
-        </p>
-        <p CLASS="">
-        The material in the following sections includes:
-        </p>
-        <ul>
-          <li>some background information on XSLT and Sablotron,</li>
-          <li>a detailed comparison of the current version of
-          Sablotron to the XSLT spec,</li>
-          <li>Sablotron usage from the command line or as a
-          library.</li>
-        </ul>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__60"></a>
-      <h2>
-        <a href="#toc_i__60">2  Changes from the last release</a>
-      </h2>
-      <DIV>
-        <p CLASS="">Please see the RELEASE file.</p>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__74"></a>
-      <h2>
-        <a href="#toc_i__74">3  Introduction</a>
-      </h2>
-      <DIV>
-        <DIV class="afterskip">
-          <a name="i__81"></a>
-          <h3>
-            <a href="#toc_i__74">3.1  XSLT</a>
-          </h3>
-          <p CLASS="">XSLT is a language allowing to transform given XML data (the
-    <i>input</i>) according to a <i>stylesheet</i>. XSLT stylesheets
-    are themselves XML documents; that is, all instructions of the
-    language are expressed in the form of XML elements. The
-    <i>output</i>, i.e. the result of the processing, is typically a
-    XML document as well, although the syntactic requirements can be
-    relaxed to allow the creation of a HTML document (one that
-    contains unclosed tags and the like), or even plain text.
-    </p>
-          <p CLASS="">XSLT was designed by the World Wide Web Consortium (W3C) as
-      a part of the XSL stylesheet language, where it is complemented
-      by a powerful set of formatting instructions. The most precise
-      information about XSLT can be found in the W3C Recommendation <a href="#ref-xslt">[XSLT]</a>. In particular, Appendix B of the
-      Recommendation contains a handy syntax table. A good tutorial is
-      <a href="#ref-bible">[XMLBible14]</a>.
-    </p>
-          <p CLASS="">Other W3C Recommendations one often needs to consult are <a href="#ref-xml">[XML]</a> (for the definition of the XML
-      language) and <a href="#ref-xpath">[XPath]</a> (for details on
-      XPath, the language used to form expressions in XSLT and
-      elsewhere).
-    </p>
-          <p CLASS="">An excellent source of information about XSLT (indeed, about
-    anything related to XML and SGML) is <a href="#ref-rcover">[Cover]</a>; see also <a href="#ref-xslinfo">[XSLINFO]</a> and <a href="#ref-xmlorg">[XMLorg]</a>.
-    </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__154"></a>
-          <h3>
-            <a href="#toc_i__74">3.2  On Sablotron</a>
-          </h3>
-          <p CLASS="">Sablotron is a XSLT processor (though not quite conforming
-      yet..., see below) written in C++. Since the machines where it
-      is meant to run include various small mobile
-      clients, the main objectives of its design are the following:
-    </p>
-          <ul>
-      <li>portability,</li>
-      <li>compact code,</li>
-      <li>as much independence on other resources (Java etc.) as
-      possible.</li>
-    </ul>
-          <p CLASS="">Sablotron is a single shared library
-    (<code>sablot.dll</code> or <code>libsablot.so.0.60</code>). It can
-    also be used from the command line via the simple interface
-    called <code>sabcmd</code>. See <a href="#invocation">here</a> for
-    more information.
-    </p>
-          <p CLASS="">The only software Sablotron relies on is <b>expat</b>, the
-      XML parser by James Clark. See <a href="#expat">below</a> for
-      information on how to get expat.
-      </p>
-          <p CLASS="">For information on the available interfaces, e.g. for
-      Python, Perl and PHP, see <a href="http://www.gingerall.com">www.gingerall.com</a>. 
-      </p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__227"></a>
-      <h2>
-        <a href="#toc_i__227">4  The sources</a>
-      </h2>
-      <DIV>
-        <p CLASS="">
-      Sablotron is written in C++. The source files compile under
-      Win32 (using MS Visual C++ 6.0) and on Solaris and Linux (using
-      g++ 2.95.2) without change.</p>
-        <DIV class="afterskip">
-          <a name="i__238"></a>
-          <h3>
-            <a href="#toc_i__227">4.1  Getting the sources</a>
-          </h3>
-          <p CLASS="">The source or binary distributions of Sablotron can be downloaded
-      from <a href="http://www.gingerall.com">www.gingerall.com</a>. For
-      instructions on how to build the sources (if any), refer to the accompanying INSTALL file.
-      </p>
-          <p CLASS="">If you have access to the Ginger Alliance CVS server, you
-      can get the working version of Sablotron in the CVS module
-      <code>ga</code>. The access rights can be obtained on
-      request from <a href="mailto:cvsadmin at gingerall.com">the CVS admin</a>.
-      </p>
-          <p CLASS="">
-            <a name="expat"></a>
-      Since version 0.50, Sablotron uses expat 1.95.1, available from <a href="http://expat.sourceforge.org">SourceForge</a>.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__280"></a>
-          <h3>
-            <a href="#toc_i__227">4.2  Joining the development</a>
-          </h3>
-          <p CLASS="">
-      Sablotron is an open source project and all volunteers are most
-      welcome! The documentation of the sources is still somewhat
-      sparse but we will try to improve it. If you find the invitation
-      to work on Sablotron with us interesting, please <a href="mailto:sablotron at gingerall.com">contact us</a>. There is also
-      a mailing list available, see <a href="http://www.gingerall.com">www.gingerall.com</a>.
-      </p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__305"></a>
-      <h2>
-        <a href="#toc_i__305">5  Implementation. Supported instructions and functions</a>
-      </h2>
-      <DIV>
-        <p CLASS="">The instruction set supported by this version of Sablotron is
-    already sufficient for many transformation tasks (e.g. the task of
-    formatting this document). On the other
-    hand, a comparison of it to the XSLT specification <a href="#ref-xslt">[XSLT]</a> shows that much is still to be
-    done. The purpose of the
-    following sections is to describe the varying degree of support
-    for the elements of the XSLT language. </p>
-        <p CLASS="">It may be helpful to refer to the syntax table in Appendix B
-    of <a href="#ref-xslt">[XSLT]</a>. The instructions/attributes that
-    are not listed as unsupported should be implemented. The <a href="mailto:sablotron at gingerall.com">authors</a> will appreciate being
-    told about any omissions found in the following
-    description.</p>
-        <p CLASS="">For readability, I sometimes omit the <code>xsl:</code> prefix
-    from the instruction names.</p>
-        <DIV class="afterskip">
-          <a name="i__343"></a>
-          <h3>
-            <a href="#toc_i__305">5.1  Templates</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        template, apply-templates, call-template
-      </code>
-          </p>
-          <p CLASS="">
-        Fully implemented. <code>xsl:sort</code> is supported since release 0.50.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__364"></a>
-          <h3>
-            <a href="#toc_i__305">5.2  Conditional processing</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        if, choose, when, otherwise
-      </code>
-          </p>
-          <p CLASS="">Fully implemented.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__381"></a>
-          <h3>
-            <a href="#toc_i__305">5.3  Loops</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>for-each</code>
-          </p>
-          <p CLASS="">Fully implemented.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__398"></a>
-          <h3>
-            <a href="#toc_i__305">5.4  Variables and parameters</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>variable, param, with-param</code>
-          </p>
-          <p CLASS="">Fully implemented. Top-level variables and parameters are
-      read in the document order, so no forward references are
-      resolved. This is a minor deviation from the spec. </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__415"></a>
-          <h3>
-            <a href="#toc_i__305">5.5  Element creation</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>element, attribute, text, 
-      comment, processing-instruction, attribute-set</code>
-          </p>
-          <p CLASS="">
-            <code>xsl:attribute-set</code> is not implemented. For the
-      rest, <code>name</code> is the only recognized attribute (where
-      applicable). Literal result elements work.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__439"></a>
-          <h3>
-            <a href="#toc_i__305">5.6  Global definitions</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>stylesheet, transform, output</code>
-          </p>
-          <p CLASS="">For <code>stylesheet</code> and <code>transform</code>,
-        the only recognized attribute is
-        <code>version</code>. <code>xsl:output</code> should work
-        (see below for notes on the <code>encoding</code>
-        attribute). HTML indentation has been added in 0.60.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__476"></a>
-          <h3>
-            <a href="#toc_i__305">5.7  Values and copying</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>value-of, copy, copy-of</code>
-          </p>
-          <p CLASS="">
-            <code>copy-of</code> and <code>value-of</code> are fully
-      implemented. <code>copy</code> is implemented except for the
-      <code>use-attribute-sets</code> attribute.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__508"></a>
-          <h3>
-            <a href="#toc_i__305">5.8  Namespace processing</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>namespace-alias</code>
-          </p>
-          <p CLASS="">Namespaces should be processed correctly. The
-      <code>namespace-alias</code> instruction is now supported
-      (patch by Major).</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__529"></a>
-          <h3>
-            <a href="#toc_i__305">5.9  Sorting</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>sort</code>
-          </p>
-          <p CLASS="">
-            <code>xsl:sort</code> is implemented since 0.50. There are
-      minor limitations:
-      </p>
-          <ul>
-        <li>currently, the <code>lang</code> attribute may only
-        contain the values <code>"en"</code> or <code>"cz"</code>.</li>
-        <li>
-              <code>case-order</code> cannot be specified.</li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__577"></a>
-          <h3>
-            <a href="#toc_i__305">5.10  Whitespace stripping</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>strip-space, preserve-space</code>
-          </p>
-          <p CLASS="">Only the default whitespace stripping is done. That is,
-      all whitespace-only text nodes in any stylesheet, not appearing
-      inside a <code>xsl:text</code>, are removed. The two
-      instructions for whitespace stripping and preservation are
-      unsupported.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__598"></a>
-          <h3>
-            <a href="#toc_i__305">5.11  Includes</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>include, import, apply-imports</code>
-          </p>
-          <p CLASS="">Only <code>xsl:include</code> is implemented. Processing
-      involving multiple documents works, but has to get more testing,
-      eg. with respect to <code>generate-id()</code>.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__623"></a>
-          <h3>
-            <a href="#toc_i__305">5.12  Other unimplemented instructions</a>
-          </h3>
-          <ul>
-        <li>
-              <code>xsl:key,</code>
-            </li>
-        <li>
-              <code>xsl:number,</code>
-            </li>
-        <li>
-              <code>xsl:fallback.</code>
-            </li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__654"></a>
-          <h3>
-            <a href="#toc_i__305">5.13  Output conformance</a>
-          </h3>
-          <p CLASS="">The output mechanism is much closer to the spec than in
-      the versions prior to 0.4. The following issues remain for the
-      html method:</p>
-          <ul>
-        <li>Output the boolean attributes correctly.</li>
-        <li>Disable the escaping inside
-        <code><SCRIPT></code> and
-        <code><STYLE></code>
-            </li>.
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__686"></a>
-          <h3>
-            <a href="#toc_i__305">5.14  XPath expressions</a>
-          </h3>
-          <p CLASS="">Almost all features of XPath are fully implemented. This means
-      there should be no problems with expressions of any kind.</p>
-          <p CLASS="">One exception relates to axes. The <code>following</code> and
-      <code>preceding</code> axes haven't been implemented yet.</p>
-          <p CLASS="">Another possible exception may be numbers; we did not yet do a
-      thorough test of rounding, NaNs, infinity, etc.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__714"></a>
-          <h3>
-            <a href="#toc_i__305">5.15  Built-in functions</a>
-          </h3>
-          <p CLASS="">
-            <a name="corelib"></a>Only a few functions from the standard
-      function library remain
-      unimplemented:
-      </p>
-          <ul>
-      <li>
-              <code>id()</code>,</li>
-      <li>
-              <code>lang()</code> (accepted but always returns true),</li>
-      <li>
-              <code>key()</code>,</li>
-      <li>
-              <code>format-number()</code>,</li>
-      <li>
-              <code>unparsed-entity-uri()</code>.</li>
-      </ul>
-          <p CLASS="">As for the fuctions that <i>are</i> implemented, the
-      following is a list of differences from the spec:
-      </p>
-          <ul>
-        <li>
-              <code>document()</code> only accepts one argument, always
-        getting the base URI from the stylesheet URI.
-        </li>
-        <li>
-              <code>string-length()</code> returns the byte length of
-        the UTF-8 representation of the string. This will typically
-        differ from the actual length.
-        </li>
-        <li>
-              <code>generate-id()</code> might fail to generate unique identifiers
-        when several input documents are present (giving the same id to
-        nodes from different documents).
-        </li>
-      </ul>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__804"></a>
-      <h2>
-        <a href="#toc_i__804">6  Other implementation-related notes</a>
-      </h2>
-      <DIV>
-        <DIV class="afterskip">
-          <a name="i__811"></a>
-          <h3>
-            <a href="#toc_i__804">6.1  Handlers</a>
-          </h3>
-          <p CLASS="">It is possible for the user to supply the following
-      handlers to Sablotron:
-        <ul>
-          <li>message handler (to bypass the default way of displaying
-          error and warning messages and logging),</li>
-          <li>scheme handler (to retrieve documents whose URI use an
-          unsupported scheme),</li>
-          <li>streaming handler (an expat-like interface to the XML
-          document which is the result of the processing),</li>
-          <li>'miscellaneous' handler (which will probably server as a
-          collections of odd callbacks).</li>
-        </ul>
-      </p>
-          <p CLASS="">
-        The handlers are set using <code>SablotRegHandler()</code>
-        For details concerning the interface of these handlers,
-        consult the header files <code>sablot.h</code> and
-        <code>shandler.h</code>. 
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__859"></a>
-          <h3>
-            <a href="#toc_i__804">6.2  Encodings</a>
-          </h3>
-          <p CLASS="">
-        In version 0.52, the encoding conversion capabilities of
-        Sablotron have been much extended. The most important fact is the
-        following: if you have the iconv library installed on your system, you
-        can use any encoding it supports (that is, almost any encoding
-        whatsoever) for both the input and the output documents. Iconv
-        is available on most systems (it is a standard part of glibc2,
-        for instance). There are implementations for Win32 as well.
-      </p>
-          <p CLASS="">If iconv is not available, the encoding may still be supported internally by
-      Sablotron. At present, the list is of such encodings is rather
-      short: besides UTF-8, these are UTF-16, ASCII, iso-8859-1,
-      iso-8859-2 and windows-1250 on input, none on output. However,
-      we plan to implement a half independent light-weight
-      conversion library for use on systems without iconv,
-      extending the set of internally supported encodings
-      considerably. 
-      </p>
-          <p CLASS="">Lastly, the user has the option to implement a custom
-      encoding conversion handler, which will be asked to perform any unsupported
-      conversion. See the <code>shandler.h</code> header file for
-      details.
-      </p>
-          <p CLASS="">The default input and output encoding is in all cases UTF-8.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__887"></a>
-          <h3>
-            <a href="#toc_i__804">6.3  Output methods</a>
-          </h3>
-          <p CLASS="">In addition to the standard output methods (xml, html and
-      text), it is possible to output xhtml. Documents output using
-      this method obey the XHTML 1.0 rules (in particular, all empty
-      elements are closed). To choose the method, use
-      <code><xsl:output method='xhtml'></code>. <b>Please note</b>
-      that the name of this method will possibly be changed since the XSLT
-      spec requires any processor-specific methods to have qualified
-      names, say <code>sab:xhtml</code>. On the other hand, the name
-      <code>xhtml</code> is considered in the XSLT 2.0 working draft.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__915"></a>
-          <h3>
-            <a href="#toc_i__804">6.4  URIs</a>
-          </h3>
-          <p CLASS="">Sablotron can handle
-      two URI schemes natively: 'file' and 'arg' (see
-      below). Moreover, it is possible to use the function
-      <code>SablotRegSchemeHandler</code> to register an external scheme
-      handler which will receive requests in all other schemes. See
-      the documentation in <code>sablot.h</code> and
-      <code>shandler.h</code>.
-      </p>
-          <p CLASS="">Relative URI references are resolved in conformance to RFC
-      2396. The base URI is well defined when the relative reference appears
-      inside a XML document; when invoking sabcmd, the base URI is
-      taken to correspond to the current working directory.
-      </p>
-          <p CLASS="">
-            <a name="fname-rules"></a>When specifying filenames, the
-      following rules are in effect:
-      </p>
-          <ul>
-        <li>specify the "file:" scheme for any standard files,
-      i.e. refer to <code>stdin</code> as <code>file://stdin</code>
-      etc.</li>
-        <li>slashes and backslashes work equally fine, in Windows as
-      well as Linux.</li>
-        <li>to include a drive letter under Windows
-      (e.g. <code>C:\doc.xml</code>), it is necessary to say
-      <code>file://c:/doc.xml</code>. 
-        </li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__983"></a>
-          <h3>
-            <a href="#toc_i__804">6.5  Named buffers</a>
-          </h3>
-          <p CLASS="">
-            <a name="argscheme"></a>Sablotron introduces an URI scheme
-      'arg:' which enables one to use strings in named memory
-      buffers. The buffer names can have a tree-like structure so that
-      a relative reference from a document in a buffer can be resolved
-      as pointing to another buffer.
-      </p>
-          <p CLASS="">For instance, if we invoke Sablotron specifying that a
-      buffer named <code>/mybuf/1</code> contains the string
-      "&lt;a>contents&lt;/a>", then the expression
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-      document('arg:/mybuf/1')/a
-      </code>
-          </p>
-          <p CLASS="">has string-value "contents". If the document in arg:/mybuf/1
-      contained a relative URI reference "../theirbuf/2" then this
-      would be resolved as pointing to "arg:/theirbuf/2".</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1015"></a>
-          <h3>
-            <a href="#toc_i__804">6.6  Error and log messages</a>
-          </h3>
-          <p CLASS="">By default, Sablotron writes error and warning messages to
-      stderr, and does no logging. By a call to
-      <code>SablotSetLog()</code>, you can specify the name of the log
-      file to be used.</p>
-          <p CLASS="">Besides, you can use <code>SablotRegHandler()</code>
-      to override the default message handling. The handler you
-      register will receive all messages in a structured form that's
-      easy to process and filter. For details, see
-      the documentation in <code>sablot.h</code> and
-      <code>shandler.h</code>.</p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__1048"></a>
-      <h2>
-        <a href="#toc_i__1048">7  The C interface</a>
-      </h2>
-      <DIV>
-        <p CLASS="">
-          <a name="invocation"></a>
-        </p>
-        <p CLASS="">
-        This section describes the functions exported from the
-        Sablotron library.  All of them have a return type of 'int'
-        and return an error flag (nonzero signals an error). Errors
-        are reported to the user by Sablotron itself. 
-      </p>
-        <DIV class="afterskip">
-          <a name="i__1065"></a>
-          <h3>
-            <a href="#toc_i__1048">7.1  Shortcuts</a>
-          </h3>
-          <p CLASS="">
-        We'll first describe the 'shortcuts' that do the whole
-        processing in one call.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcess(char *sheetURI, char *inputURI, char *resultURI,
-        char **params, char **arguments, char **resultArg);
-      </code>
-          </p>
-          <p CLASS="">
-        This is the basic function. The first three of its arguments
-        are the URIs of the XSLT stylesheet, the XML source and the
-        resulting document, respectively. For some notes on specifying
-        file names, see <a href="#fname-rules">above</a>.
-      </p>
-          <p CLASS="">
-            <code>params</code> is an array of pointers to the names
-      and contents of the top-level stylesheet parameters. Thus,
-      <code>params[0]</code> is a pointer to the null-terminated name
-      of the first parameter, <code>params[1]</code> points to the
-      (null-terminated) contents of the first parameter. The following
-      two array items do the same for the second parameter, etc. The
-      whole array is terminated by a NULL pointer in place of the
-      name. If no parameters are to be passed, you can specify NULL
-      for <code>params</code> itself.
-      </p>
-          <p CLASS="">
-            <code>arguments</code> is a similar array of named buffers
-      to be passed to the stylesheet. (They can be referred to via the
-      'arg:' scheme, see <a href="#argscheme">above</a>.) Again, the
-      array is a sequence of (name, value) pairs terminated by NULL in
-      place of a name. If no named buffers are to be passed, you can
-      specify NULL for <code>arguments</code> itself.
-      </p>
-          <p CLASS="">
-            <code>resultArg</code> enables one to access the
-      resulting document in case the output went to a named buffer. In
-      that situation, <code>*resultArg</code> points to the resulting
-      null-terminated string, allocated by Sablotron. You can pass NULL
-      for <code>resultArg</code> if the output is sure to go to a
-      file. 
-      </p>
-          <p CLASS="">
-            <b>Note:</b>When you are done processing the string
-      pointed to by <code>*resultArg</code>, free it using <a href="#sablotfree">
-              <code>SablotFree()</code>
-            </a> - never use
-      <code>free()</code>. The latter is guaranteed to produce a
-      segmentation fault under Linux.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcessFiles(char *styleSheetName,
-        char *inputName,
-        char *resultName);
-      </code>
-          </p>
-          <p CLASS="">A wrapper for <code>SablotProcess()</code> working on
-      files. The parameters are the null-terminated file names of the
-      XSLT stylesheet, the XML input and the result,
-      respectively. Sablotron opens these files itself and closes them
-      after the processing is complete. Values like "file://stdin" are
-      allowed.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcessStrings(char *styleSheetStr, char *inputStr, char
-        **resultStr);
-      </code>
-          </p>
-          <p CLASS="">Another wrapper for <code>SablotProcess()</code>, this
-        time for accessing named buffers (i.e. user-allocated memory
-        blocks)only. Thus, the first parameter is a null-terminated
-        string containing the whole stylesheet; the second parameter
-        is a null-terminated string containing the XML
-        input. Sablotron allocates the buffer for the resulting string
-        and returns a pointer to it in resultStr. Hence, invoking
-        <code>puts(*resultStr)</code> after having called
-        <code>SablotProcessStrings</code> sends the result to
-        stdout. The buffer allocated <b>must</b> be freed by calling the
-        function <code>SablotFree</code> described next. 
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1205"></a>
-          <h3>
-            <a href="#toc_i__1048">7.2  Basic functions</a>
-          </h3>
-          <p CLASS="">The above shortcuts just call the basic, lower-level
-      functions described below. Note that if you need to set options
-      for logging etc., you may need to use the low-level
-      functions. </p>
-          <p CLASS="">A typical processing session may look like this:</p>
-          <p CLASS="">
-            <pre>
-          SablotHandle p;
-          char *my_buf;
-          SablotCreateProcessor(&p);
-          SablotSetLog(p, ...);
-          /* ...set other instance-specific options here... */
-          SablotRunProcessor(p, ...);
-          SablotGetResultArg(p, "arg:/somename", &my_buf)
-          /* ...do something with my_buf... */
-          /* can run the processor again if necessary */
-          SablotRunProcessor(p, ...);
-          SablotDestroyProcessor(p);
-      </pre>
-          </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotCreateProcessor(SablotHandle *processorPtr);
-      </code>
-          </p>
-          <p CLASS="">Creates an instance of Sablotron and returns a pointer to
-      it in *processorPtr. This pointer is passed on all subsequent
-      calls to this instance. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotDestroyProcessor(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Destroys an instance of the processor, deallocating all
-      the memory used up by it.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotRunProcessor(SablotHandle processor_,
-        char *sheetURI, 
-        char *inputURI, 
-        char *resultURI,
-        char **params, 
-        char **arguments);
-      </code>
-          </p>
-          <p CLASS="">Processes documents using the given processor instance and
-      given params and args definitions. See
-      <code>SablotProcess()</code>.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotGetResultArg(SablotHandle processor_,
-        char *argURI,
-        char **argValue);
-      </code>
-          </p>
-          <p CLASS="">Copies the result 'arg' buffer with the given URI,
-      returning a pointer to the newly-allocated block in
-      *argValue. If no such buffer exists, returns NULL in *argValue. 
-      </p>
-          <p CLASS="">This function is necessary, because if the result document
-      is output to memory, it would be lost when
-      <code>SablotDestroyProcessor()</code> is called. When
-      deallocating the copy obtained from
-      <code>SablotGetResultArg()</code>, use <code>SablotFree</code>
-      (never <code>free()</code>). </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotFreeResultArgs(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Removes the Sablotron-internal copies of the 'arg' buffers
-      from the last Sablotron run. Normally, there should be no reason
-      to call this function as it is called automatically on both
-      <code>SablotRunProcessor()</code> and
-      <code>SablotDestroyProcessor()</code>. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-              <a name="sablotfree"></a>
-        int SablotFree(char *resultBuf);
-      </code>
-          </p>
-          <p CLASS="">This function frees the buffer allocated on previous call
-        to <code>SablotProcessStrings</code>. Calling it with an
-        invalid pointer will cause a crash. 
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotRegHandler(
-        SablotHandle processor_, 
-        HandlerType type,   
-        void *handler, 
-        void *userData);
-      </code>
-          </p>
-          <p CLASS="">Registers an external handler. <code>type</code> can be
-        <code>HLR_MESSAGE</code>, <code>HLR_SCHEME</code>,
-        <code>HLR_SAX</code>, <code>HLR_MISC</code> or
-        <code>HLR_ENC</code>. 
-        <code>handler</code> points to the
-        callback vector of the appropriate type. <code>userData</code>
-        is a data item to passed to all callbacks of this particular
-        handler. For details, check the <code>sablot.h</code> and
-        <code>shandler.h</code> header files.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotUnregHandler(
-        SablotHandle processor_, 
-        HandlerType type,   
-        void *handler, 
-        void *userData);
-      </code>
-          </p>
-          <p CLASS="">Unregisters the given external handler. For details, check the
-      <code>sablot.h</code> and <code>shandler.h</code> header
-      files.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotSetLog(
-        SablotHandle processor_,
-        const char *logFilename, 
-        int logLevel);
-      </code>
-          </p>
-          <p CLASS="">Sets the log filename. The <code>logLevel</code> parameter
-      is currently not used. Pass NULL for <code>logFilename</code> to
-      turn logging off (default). </p>
-          <p CLASS="">The other functions published by sablot.h have been
-      included for experimental reasons or for compatibility, and it
-      is better not to use them.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotClearError(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Clears the 'pending error' flag for this instance of
-      Sablotron.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1416"></a>
-          <h3>
-            <a href="#toc_i__1048">7.3  Generalized interface functions</a>
-          </h3>
-          <p CLASS="">The implementation of the <a href="#dom">DOM interface</a>
-      brought the need to extend some of the functions described in
-      the previous section. This extension enables the user to:
-      </p>
-          <ul>
-        <li>process documents created by the DOM functions, and</li>
-        <li>process frequently used documents in pre-parsed form.</li>
-      </ul>
-          <p CLASS="">An object called <i>situation</i> is used to provide a
-persistent context for all calls to the DOM-related
-functions. Functions used to manipulate the situation are described in
-<a href="#situation">the following section</a>.</p>
-          <p CLASS="">
-            <b>Note:</b> If not specified otherwise, all these
-      functions return an error code. A positive value indicates an error.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotCreateDocument(SablotSituation S, 
-	    SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Creates an empty document. Typically followed by calls to
-      DOM functions to populate the document.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotDestroyDocument(SablotSituation S, 
-	    SDOM_Document D);
-      </code>
-          </p>
-          <p CLASS="">Destroys a document, freeing all the nodes it has created.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotParse(SablotSituation S, 
-        const char *uri, SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Reads in a document from the given URI.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotParseBuffer(SablotSituation S, 
-        const char *buffer, SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Reads in a document from the given in-memory buffer.</p>
-          <p CLASS="">These functions have variants to be used if the document
-      is to be interpreted as an XSLT stylesheet, namely
-      <code>SablotParseStylesheet</code> and
-      <code>SablotParseStylesheetBuffer</code>.</p>
-          <p CLASS="">The following functions generalize
-      <code>SablotRunProcessor</code> in that they make it possible to
-      utilize an extra kind of a source document: a DOM tree.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotRunProcessorGen(SablotSituation S,
-        void *processor_,
-        char *sheetURI, 
-        char *inputURI, 
-        char *resultURI);    
-      </code>
-          </p>
-          <p CLASS="">A key ingredient of the extended interface. Only the URIs
-      of the sources and of the result document are given to it. The
-      rest of the information passed to
-      <code>SablotRunProcessor</code> is conveyed through
-      <code>SablotAddArgBuffer,</code> <code>SablotAddArgTree</code>
-      and <code>SablotAddParam.</code> The scheme part of the
-      stylesheet URI or the input URI may be "arg:", in which
-      case they refer to a buffer or tree passed by these
-      functions. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddArgBuffer(SablotSituation S,
-        void *processor_,
-        const char *argName,
-        const char *bufferValue);
-</code>
-          </p>
-          <p CLASS="">Creates a named buffer for the next processor run. The
-      buffer's name and contents are passed as arguments. The name
-      is interpreted relative to the 'arg:/' scheme.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddArgTree(SablotSituation S,
-        void *processor_,
-        const char *argName,
-        SDOM_Document tree);
-</code>
-          </p>
-          <p CLASS="">Associates the given document with a name for the next
-      processor run. The document is <i>not</i> destroyed after the
-      run is finished. The name is interpreted relative to the 'arg:/'
-      scheme.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddParam(SablotSituation S,
-        void *processor_,
-        const char *paramName,
-        const char *paramValue);
-      </code>
-          </p>
-          <p CLASS="">Adds a global stylesheet parameter for the next processor
-      run.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1578"></a>
-          <h3>
-            <a href="#toc_i__1048">7.4  The situation object</a>
-          </h3>
-          <p CLASS="">
-            <a name="situation"></a>At present, the situation object primarily holds information on any pending errors. A
-situation is created using</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotCreateSituation(SablotSituation
-      *SP);</code>
-          </p>
-          <p CLASS="">and destroyed by</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotDestroySituation(SablotSituation
-      S);</code>
-          </p>
-          <p CLASS="">To clear the pending error flag in a situation, use</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotClearSituation(SablotSituation
-      S);</code>
-          </p>
-          <p CLASS="">The following self-explanatory functions extract parts of the error information
-      from the situation:</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        const char *SablotGetErrorURI(SablotSituation S);<br>
-        int SablotGetErrorLine(SablotSituation S);<br>
-        const char *SablotGetErrorMsg(SablotSituation S);
-     </code>
-          </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1631"></a>
-          <h3>
-            <a href="#toc_i__1048">7.5  Document Object Model (DOM) functions</a>
-          </h3>
-          <p CLASS="">
-            <a name="dom"></a>Starting with version 0.60, Sablotron implements
-      a major subset of the DOM Level 1 Core Specification <a href="#ref-dom">[DOM]</a>. A brief
-      description of the implemented interface follows; for more
-      details, please refer to the header file named
-      <code>sdom.h.</code>
-          </p>
-          <p CLASS="">All of the names related to the DOM interface start with
-      SDOM_ (for Sablot DOM).</p>
-          <p CLASS="">Major new types are <code>SDOM_Document</code> (a DOM tree) and
-      <code>SDOM_Node</code> (a node of the tree). A document can also be used in
-      place of a node. This reflects the fact in the DOM spec, 
-      Document is a subclass of Node. When used in this way, the
-      document represents its own root node (which is not the same as
-      the `root element').</p>
-          <p CLASS="">Other types include:</p>
-          <ul>
-        <li>
-              <code>SDOM_char:</code> a DOM character type. Currently, this is just
-        char. Note that the DOM spec requires that the DOM
-        implementations work with UTF-16. Sablotron deviates from this
-        by using UTF-8 instead. A separate set of functions taking
-        UTF-16 strings will be provided.</li>
-        <li>
-              <code>SDOM_NodeType:</code> a node type enum. Some of the values are
-        <code>SDOM_ELEMENT_NODE,</code> <code>SDOM_ATTRIBUTE_NODE</code> and <code>SDOM_TEXT_NODE.</code> See
-        <code>sdom.h</code> for the rest.</li>
-        <li>
-              <code>SDOM_NodeList:</code> a node list returned by some of the
-        functions.</li>
-        <li>
-              <code>SDOM_Exception:</code> DOM exception codes enum, with values such
-        as <code>SDOM_NOT_FOUND_ERR</code> or <code>SDOM_INVALID_NODE_TYPE</code>. See <code>sdom.h</code>
-        for details.</li>
-</ul>
-          <p CLASS="">The functions listed below are implemented more or less as defined in
-      the DOM Level 1 Specification, with two exceptions:
-      their names are prefixed with <code>SDOM_</code> and the first argument is
-      always a <code>SablotSituation.</code> All the functions return
-      a <code>SDOM_Exception.</code> </p>
-          <ul>
-<li>
-              <code>createElement, createAttribute, createTextNode,
-createCDATASection, createComment, createProcessingInstruction</code>
-            </li>
-<li>
-              <code>getNodeType, getNodeName, setNodeName, getNodeValue, setNodeValue</code>
-            </li>
-<li>
-              <code>getParentNode, getFirstChild, getLastChild, getPreviousSibling,
-getNextSibling, getOwnerDocument</code>
-            </li>
-<li>
-              <code>insertBefore, appendChild, removeChild, replaceChild</code>
-            </li>
-<li>
-              <code>cloneNode</code>
-            </li>
-<li>
-              <code>getAttribute, setAttribute, removeAttribute, getAttributeList</code>
-            </li>
-</ul>
-          <p CLASS="">Several functions have been added:</p>
-          <ul>
-<li>
-              <code>disposeNode</code> frees all memory used by the given node</li>
-<li>
-              <code>cloneForeignNode</code> clones a node from a different
-document</li>
-<li>
-              <code>docToString</code> serializes the document, returning the
-resulting string</li>
-<li>
-              <code>xql</code> performs an XPath query on the DOM tree,
-returning a list of the nodes satisfying it.</li>
-</ul>
-          <p CLASS="">In addition, there are some functions used to manipulate
-      the node lists returned by <code>xql</code> and
-      <code>getAttributeList</code>. These include
-      <code>getNodeListLength</code>, <code>getNodeListItem</code> and
-      <code>disposeNodeList</code>.</p>
-          <p CLASS="">Finally, there are functions to extract DOM
-      exception-related information from the situation object, namely
-      <code>getExceptionCode</code>, <code>getExceptionMessage</code>
-      and <code>getExceptionDetails</code>.</p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__1870"></a>
-      <h2>
-        <a href="#toc_i__1870">8  The command line interface</a>
-      </h2>
-      <DIV>
-        <p CLASS="">Sablotron comes with a command-line interface to the
-        shared library, which is a program named
-        <code>sabcmd</code>. At present, <code>sabcmd</code> is invoked
-        as follows:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      sabcmd [<i>options</i>] <i>stylesheet</i> [<i>input</i> [<i>result</i>]] [<i>assignments</i>]
-      </code>
-        </p>
-        <p CLASS="">The arguments are the URIs of the XSLT stylesheet, the
-      XML input document, and the resulting document, respectively. The
-      default for <code>
-            <i>input</i>
-          </code> is
-      <code>file://stdin</code> (meaning plain old stdin);
-      <code>
-            <i>result</i>
-          </code> defaults to
-      <code>file://stdout</code>. Filenames have to include the extension (if
-      any).</p>
-        <p CLASS="">You can display the list of available options by typing
-      <code>sabcmd --help</code>. Among the more useful ones are
-      <code>--log-file</code> (for setting the log file) and
-      <code>--measure</code> (measures and outputs the total
-      processing time).
-      </p>
-        <p CLASS="">
-          <a href="#fname-rules">The rules for filenames</a> are the same as
-      with <code>SablotProcess()</code>. 
-      </p>
-        <p CLASS="">
-          <code>assignments</code> is a series of definitions of the
-      form:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      name1=value1 name2=value2 ...
-      </code>
-        </p>
-        <p CLASS="">
-      assigning values to top-level stylesheet parameters and to named
-      buffers. These two cases are distinguished by a leading '$' in
-      the name of a stylesheet parameter. The names of the buffers do
-      <i>not</i> start with "arg:". They may start with a slash; if
-      they don't, the slash is prepended. 
-      </p>
-        <p CLASS="">
-          <b>Note:</b> In most cases, it will be necessary to quote
-      the individual assignments. Whether to use single or double
-      quotes may depend on the shell used (or may it?) Single quotes
-      work for bash, double quotes work in Windows.
-      </p>
-        <p CLASS="">If the result URI refers to a named buffer, the output
-      would normally remain buried in memory. Sabcmd dumps the buffer to standard
-      output instead.
-      </p>
-        <p CLASS="">To sum up and give an example, the following would be a
-      valid invocation of sabcmd:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      sabcmd sheet.xsl arg:/the_input "the_input=&lt;a/>"
-      "$use_defaults=1"
-      </code>
-        </p>
-        <p CLASS="">This processes the document passed in the buffer named
-      the_input, using a stylesheet found in file "sheet.xsl" in the
-      working directory. We assign 1 to the top-level parameter called
-      "use_defaults". The output goes to stdout by default.
-      </p>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__2013"></a>
-      <h2>
-        <a href="#toc_i__2013">9  References</a>
-      </h2>
-      <DIV>
-        <dl>
-      <dt>
-            <a name="ref-xslt"></a>[XSLT]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/1999/REC-xslt-19991116">
-          XSL Transformations (XSLT) Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-xpath"></a>[XPath]</dt>
-      <dd> 
-        <a href="http://www.w3.org/TR/1999/REC-xpath-19991116">
-          XML Path Language (XPath) Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-xml"></a>[XML]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/1998/REC-xml-19980210">
-          Extensible Markup Language (XML) 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-dom"></a>[DOM]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/REC-DOM-Level-1">
-          Document Object Model Level 1 Specification, Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-rcover"></a>[Cover]</dt>
-      <dd>
-        <a href="http://www.oasis-open.org/cover/sgml-xml.html">
-          The XML Cover Pages</a>
-      </dd>
-      
-      <dt>
-            <a name="ref-xmlorg"></a>[XMLorg]</dt>
-      <dd>
-        <a href="http://xml.org">XML.org</a>
-      </dd>
-
-      <dt>
-            <a name="ref-xslinfo"></a>[XSLINFO]</dt>
-      <dd>
-        <a href="http://www.xslinfo.com">XSLINFO.com</a>
-      </dd>
-
-      <dt>
-            <a name="ref-bible"></a>[XMLBible14]</dt>
-      <dd>
-        <a href="http://metalab.unc.edu/xml/books/bible/updates/14.html">
-          Harold, E. R.: XML Bible, Chapter 14 (online presentation)
-        </a>
-      </dd>
-    </dl>
-      </DIV>
-    </DIV>
-    <hr>
-    <p STYLE="font-style: italic; margin-left: 0">(c) 2000 Ginger Alliance s.r.o.</p>
-  </body>
-</html>
\ No newline at end of file
diff --git a/test/concat_result b/test/concat_result
deleted file mode 100644
index f4a2b7f..0000000
--- a/test/concat_result
+++ /dev/null
@@ -1,13 +0,0 @@
-<file_info>
-    <name><OUTFILE_0/></name>
-    <generated_locally/>
-    <upload_when_present/>
-    <url><UPLOAD_URL/></url>
-    <max_nbytes>120000</max_nbytes>
-</file_info>
-<result>
-    <file_ref>
-        <file_name><OUTFILE_0/></file_name>
-        <open_name>out</open_name>
-    </file_ref>
-</result>
diff --git a/test/concat_wu b/test/concat_wu
deleted file mode 100644
index c053e26..0000000
--- a/test/concat_wu
+++ /dev/null
@@ -1,17 +0,0 @@
-<file_info>
-    <number>0</number>
-</file_info>
-<file_info>
-    <number>1</number>
-</file_info>
-<workunit>
-    <file_ref>
-        <file_number>0</file_number>
-        <open_name>in1</open_name>
-    </file_ref>
-    <file_ref>
-        <file_number>1</file_number>
-        <open_name>in2</open_name>
-    </file_ref>
-    <command_line>in1 in2 out</command_line>
-</workunit>
diff --git a/test/db_def_to_php b/test/db_def_to_php
deleted file mode 100755
index 5a7c198..0000000
--- a/test/db_def_to_php
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env perl
-
-## $Id: db_def_to_php 2587 2003-10-28 00:41:04Z quarl $
-
-## parse the db #defines to php.
-
-## syntax: ./db_def_to_php < ../db/boinc_db.h > boinc_db.inc
-
-print "<?php\n";
-print "    // Generated by db_def_to_php\n";
-# print "    // Generated by db_def_to_php on ";
-# system('date');
-
-while (<>) {
-    if (/^\s*#define\s+([^\s]+)\s+([0-9]+)\s*$/) {
-        print qq/    define("$1", $2);\n/;
-    }
-}
-
-print "?>\n";
diff --git a/test/db_def_to_py b/test/db_def_to_py
deleted file mode 100755
index 8789966..0000000
--- a/test/db_def_to_py
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env perl
-
-## $Id: db_def_to_py 1528 2003-06-18 03:04:06Z quarl $
-
-## parse the db #defines to php.
-
-## syntax: ./db_def_to_php < ../db/boinc_db.h > boinc_db.inc
-
-print "# Generated by db_def_to_py on ";
-system('date');
-
-while (<>) {
-    if (/^\s*#define\s+([^\s]+)\s+([0-9]+)\s*$/) {
-        print qq/$1 = $2\n/;
-    }
-}
diff --git a/test/fake_php.py b/test/fake_php.py
deleted file mode 100755
index 3044625..0000000
--- a/test/fake_php.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-
-# $Id: fake_php.py 2180 2003-08-22 22:52:52Z chrisz $
-
-# fake php - all we really need is 'include schedulers.txt'
-
-import os, sys
-
-REQUEST_URI = os.environ['REQUEST_URI']
-
-print 'Content-Type: text/plain'
-print
-
-print """--- FAKE PHP ---
-
-[ REQUEST_URI=%s ]
-
-Since I can't find php4 on your system, this stub program fake_php.py just
-prints schedulers.txt as necessary.
-
-"""%REQUEST_URI
-
-if REQUEST_URI.endswith('/index.php'):
-    sys.stdout.write(open('schedulers.txt').read())
diff --git a/test/gen_keys.php b/test/gen_keys.php
deleted file mode 100644
index f242eb7..0000000
--- a/test/gen_keys.php
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /usr/local/bin/php
-<?php
-    // Generate encryption keys
-
-    include_once("test.inc");
-
-    create_keys();
-
-?>
diff --git a/test/init.inc b/test/init.inc
deleted file mode 100644
index 8f92f9f..0000000
--- a/test/init.inc
+++ /dev/null
@@ -1,310 +0,0 @@
-<?php
-
-define("VERSION", "1");
-define("CORE_CLIENT", "boinc_".VERSION."_$BOINC_PLATFORM");
-define("PROJECTS", "localhost.localdomain zoot");
-
-
-function clear_db() {
-    PassThru("cd ../db; init_db");
-}
-
-$BOINC_DOWNLOAD_DIR = null;
-$BOINC_UPLOAD_DIR = null;
-$BOINC_PLATFORM = null;
-$BOINC_EMAIL = null;
-$BOINC_DOWNLOAD_URL = null;
-$BOINC_KEY_DIR = null;
-$BOINC_MASTER_URL = null;
-$BOINC_DB_NAME = null;
-
-function open_db() {
-    global $BOINC_DB_NAME;
-
-    $retval = mysql_connect();
-    if (!$retval) {
-	echo "mysql_connect() failed\n";
-	exit();
-    }
-    $retval = mysql_select_db($BOINC_DB_NAME);
-    if (!$retval) {
-	echo "mysql_select_db() failed\n";
-	exit();
-    }
-}
-
-function check_env_vars() {
-    global $BOINC_DOWNLOAD_DIR;
-    global $BOINC_UPLOAD_DIR;
-    global $BOINC_PLATFORM;
-    global $BOINC_EMAIL;
-    global $BOINC_DOWNLOAD_URL;
-    global $BOINC_KEY_DIR;
-    global $BOINC_MASTER_URL;
-    global $BOINC_DB_NAME;
-
-    $bad = false;
-    $BOINC_DOWNLOAD_DIR = getenv("BOINC_DOWNLOAD_DIR");
-    if ($BOINC_DOWNLOAD_DIR == null) {
-        echo "Must define BOINC_DOWNLOAD_DIR\n";
-        $bad = true;
-    }
-    $BOINC_UPLOAD_DIR = getenv("BOINC_UPLOAD_DIR");
-    if ($BOINC_UPLOAD_DIR == null) {
-        echo "Must define BOINC_UPLOAD_DIR\n";
-        $bad = true;
-    }
-    $BOINC_PLATFORM = getenv("BOINC_PLATFORM");
-    if ($BOINC_PLATFORM == null) {
-        echo "Must define BOINC_PLATFORM\n";
-        $bad = true;
-    }
-    $BOINC_EMAIL = getenv("BOINC_EMAIL");
-    if ($BOINC_EMAIL == null) {
-        echo "Must define BOINC_EMAIL\n";
-        $bad = true;
-    }
-    $BOINC_DOWNLOAD_URL = getenv("BOINC_DOWNLOAD_URL");
-    if ($BOINC_DOWNLOAD_URL == null) {
-        echo "Must define BOINC_DOWNLOAD_URL\n";
-        $bad = true;
-    }
-    $BOINC_KEY_DIR = getenv("BOINC_KEY_DIR");
-    if ($BOINC_KEY_DIR == null) {
-        echo "Must define BOINC_KEY_DIR\n";
-        $bad = true;
-    }
-    $BOINC_MASTER_URL = getenv("BOINC_MASTER_URL");
-    if ($BOINC_MASTER_URL == null) {
-        echo "Must define BOINC_MASTER_URL\n";
-        $bad = true;
-    }
-    $BOINC_DB_NAME = getenv("BOINC_DB_NAME");
-    if ($BOINC_DB_NAME == null) {
-        echo "Must define BOINC_DB_NAME\n";
-        $bad = true;
-    }
-    if ($bad) exit();
-}
-
-function clear_server_dirs($clear_key_dir) {
-    global $BOINC_DOWNLOAD_DIR;
-    global $BOINC_UPLOAD_DIR;
-    global $BOINC_KEY_DIR;
-
-    $bad = false;
-    if ($BOINC_DOWNLOAD_DIR == null) {
-        echo "Must define BOINC_DOWNLOAD_DIR\n";
-        $bad = true;
-    }
-    if ($BOINC_UPLOAD_DIR == null) {
-        echo "Must define BOINC_UPLOAD_DIR\n";
-        $bad = true;
-    }
-    if ($BOINC_KEY_DIR == null) {
-        echo "Must define BOINC_KEY_DIR\n";
-        $bad = true;
-    }
-    if ($bad) exit();
- 
-    PassThru("rm -f $BOINC_DOWNLOAD_DIR/*");
-    PassThru("rm -f $BOINC_UPLOAD_DIR/*");
-    if ($clear_key_dir) {
-        PassThru("rm -f $BOINC_KEY_DIR/*");
-    }
-}
-
-function clear_client_dirs() {
-    PassThru("rm -rf projects/*" );
-}
-
-function init_client_dirs($prefs_file, $account_file) {
-    global $BOINC_MASTER_URL;
-
-    PassThru("rm -f client_state.xml");
-    PassThru("rm -rf ".PROJECTS);
-    PassThru("rm -rf slots");
-    PassThru("cp $prefs_file prefs.xml");
-    PassThru("sed -e s/BOINC_MASTER_URL/$BOINC_MASTER_URL/ $account_file > account_foo.xml");
-}
-
-function copy_to_download_dir($f) {
-    global $BOINC_DOWNLOAD_DIR;
-
-    PassThru("cp $f $BOINC_DOWNLOAD_DIR");
-}
-
-function add_user($global_prefs_file) {
-    global $BOINC_EMAIL;
-    global $BOINC_MASTER_URL;
-
-    $cmd = "../tools/add user -email_addr $BOINC_EMAIL -user_name David -web_password foobar -authenticator 3f7b90793a0175ad0bda68684e8bd136 ";
-    if ($global_prefs_file) {
-        PassThru("sed -e s/BOINC_MASTER_URL/$BOINC_MASTER_URL/ $global_prefs_file > prefs_temp.xml");
-        $cmd = $cmd." -global_prefs_file prefs_temp.xml";
-    }
-    PassThru($cmd);
-}
-
-function add_project($short_name,$long_name) {
-    PassThru("../tools/add project -project_short_name '$short_name' -project_long_name '$long_name'");
-}
-
-function add_platform($platform) {
-    global $BOINC_PLATFORM;
-
-    if( $platform ) {
-        PassThru("../tools/add platform -platform_name $platform");
-    } else {
-        PassThru("../tools/add platform -platform_name $BOINC_PLATFORM");
-    }
-}
-
-function add_core_client_message($message, $priority, $platform) {
-    global $BOINC_DOWNLOAD_DIR;
-    global $BOINC_UPLOAD_DIR;
-    global $BOINC_PLATFORM;
-    global $BOINC_KEY_DIR;
-
-    if( $platform == null ) {
-        $plat = $BOINC_PLATFORM;
-    } else {
-        $plat = $platform;
-    }
-    PassThru("../tools/add app -app_name core_client -version ".VERSION);
-    $cmd = "../tools/add app_version -app_name core_client -platform_name $plat -version ".VERSION." -download_dir $BOINC_DOWNLOAD_DIR -download_url $BOINC_DOWNLOAD_URL -message '$message' -message_priority '$priority' -code_sign_keyfile $BOINC_KEY_DIR/code_sign_private -exec_dir ../client -exec_files ".CORE_CLIENT;
-    //echo "$cmd\n";
-    PassThru($cmd);
-    PassThru("cp ../client/".CORE_CLIENT." $BOINC_DOWNLOAD_DIR");
-}
-
-function add_core_client($platform) {
-    add_core_client_message("", "", $platform);
-}
-
-function add_app($name, $platform, $exec_name) {
-    PassThru("../tools/add app -app_name $name -version ".VERSION);
-    add_app_version( $name, $platform, $exec_name );
-}
-
-function add_app_version($name, $platform, $exec_name) {
-    global $BOINC_DOWNLOAD_DIR;
-    global $BOINC_PLATFORM;
-    global $BOINC_DOWNLOAD_URL;
-    global $BOINC_KEY_DIR;
-
-    if( $exec_name == null ) {
-        $exec_name = $name;
-    }
-    if( $platform == null ) {
-        $plat = $BOINC_PLATFORM;
-    } else {
-        $plat = $platform;
-    }
-
-    $cmd = "../tools/add app_version -app_name $name -platform_name $plat -version ".VERSION." -download_dir $BOINC_DOWNLOAD_DIR -download_url $BOINC_DOWNLOAD_URL -code_sign_keyfile $BOINC_KEY_DIR/code_sign_private -exec_dir ../apps -exec_files $exec_name";
-    //echo "$cmd\n";
-    PassThru($cmd);
-    PassThru("cp ../apps/$exec_name $BOINC_DOWNLOAD_DIR");
-}
-
-function create_work($x) {
-    global $BOINC_KEY_DIR;
-    PassThru("../tools/create_work -keyfile $BOINC_KEY_DIR/upload_private $x");
-}
-
-function create_keys() {
-    global $BOINC_KEY_DIR;
-    PassThru("../lib/crypt_prog -genkey 1024 $BOINC_KEY_DIR/upload_private $BOINC_KEY_DIR/upload_public");
-    PassThru("../lib/crypt_prog -genkey 1024 $BOINC_KEY_DIR/code_sign_private $BOINC_KEY_DIR/code_sign_public");
-}
-
-function run_client($args) {
-    PassThru("../client/".CORE_CLIENT." $args");
-}
-
-function start_feeder() {
-    PassThru("cd ../sched; feeder -asynch > feeder_out");
-}
-
-function stop_feeder() {
-    $f = fopen("../sched/feeder_trigger", "w");
-    fputs($f, "<quit/>\n");
-    fclose($f);
-}
-
-function compare_file($out, $correct) {
-    global $BOINC_UPLOAD_DIR;
-
-    PassThru("diff $BOINC_UPLOAD_DIR/$out $correct", $retval);
-    if ($retval) {
-        echo "File mismatch: $out $correct\n";
-    } else {
-        echo "Files match: $out $correct\n";
-    }
-}
-
-function check_results_done() {
-    open_db();
-    $result = mysql_query("select * from result where state<>4");
-    while ($x = mysql_fetch_object($result)) {
-        echo "result $x->id is not done\n";
-    }
-}
-
-function num_wus_left() {
-    open_db();
-    $numwus = mysql_query("select count(*) as nres from result where state<>4");
-    $result = mysql_fetch_object($numwus);
-    return $result->nres;
-}
-
-function compare_files($out, $correct) {
-    PassThru("diff $out $correct", $retval);
-    if ($retval) {
-        echo "File mismatch: $out $correct\n";
-    } else {
-        echo "Files match: $out $correct\n";
-    }
-}
-
-function run_api_test() {
-    PassThru("../api/api_test");
-}
-
-function clean_api() {
-    PassThru("rm -f counter app_to_core.xml core_to_app.xml foobar");
-}
-
-function get_time($file_name) {
-    $time_file = fopen($file_name, "r");
-    if($time_file == NULL) return 0;
-    fscanf($time_file, "%f", $app_time);
-    PassThru("rm -f ".$file_name);
-    return $app_time;
-}
-
-function compare_time($app_time) {
-    $epsilon = 0.0001;
-    open_db();
-    $data = mysql_query("select cpu_time from result where name = 'uccpu_wu_0'");
-    $result = mysql_fetch_object($data);
-    $db_time = $result->cpu_time;
-    $client_time = get_time("client_time");
-    if(abs($app_time - $client_time) > $epsilon) {
-	printf("Time mismatch: app %f client %f\n", $app_time, $client_time);
-    } 
-    else {
-        printf("Client time %f matches app time %f\n", $client_time, $app_time)
-;
-    }
-    if(abs($db_time - $app_time) > $epsilon) {
-        printf("Time mismatch: client %f server %f\n", $client_time, $db_time);
-    }
-    else {
-        printf("Reported time %f matches client time %f\n", $db_time, $client_time);
-    }
-    PassThru("rm -f client_time app_time");
-}
-
-?>
diff --git a/test/input b/test/input
deleted file mode 100644
index f448d51..0000000
--- a/test/input
+++ /dev/null
@@ -1,1326 +0,0 @@
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <META http-equiv="Content-Type" CONTENT="text/html" CHARSET="UTF-8">
-    <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-    <STYLE TYPE="text/css" MEDIA="screen">
-            BODY, H2, H3, H4, P, UL, OL, DL
-            {
-            font-family: "Verdana", "Helvetica", "Arial", "sans-serif"
-            }
-
-            H1 {color: #0058a0; font-size: 20pt}
-	    H2 {color: #0058a0; font-size: 16pt}
-	    H3 {color: #0058a0; font-size: 14pt}
-	    H4 {color: #0058a0; font-size: 12pt}
-            
-            A:link, A:active, A:visited
-            {
-            color: #0058a0;
-            text-decoration: none
-            }
-
-            P, UL, OL, DL {margin-left: 10%; margin-right: 10%; font-size: 10pt}
-            DT {margin-bottom: 0.5em}
-            .offset {margin-left: 10%}
-            .afterskip {margin-bottom: 1em}
-            .afterhalf {margin-bottom: 0.5em}
-	    .example {margin-left: 10%; margin-right: 10%;
-	      border-color: #0058a0; border-style:solid; border-width: 1pt; padding: 1pt}
-            CODE {font-family: "Courier"}
-	    .comment {color: #0000ff}
-
-            P.offset {margin-left: 15%}
-            P.inner  {margin-left:  2%; width: 96%}
-            P.note   {margin-left: 10%; border-color: #0058a0;
-	      border-style:solid; border-width: 1pt;
-	      padding: 5pt; background-color:#e0e0e0 }
-	    
-	    PRE {font-size: 10pt; padding: 5pt}
-
-	  </STYLE>
-    <title>GAdoc - Sablotron 0.60</title>
-  </head>
-  <body bgcolor="#ffffff">
-    <h1 CLASS="afterskip">Sablotron 0.60</h1>
-    <DIV CLASS="afterskip">
-      <p>
-        <b>
-          <i>Tom Kaiser (Ginger Alliance)</i>
-        </b>
-      </p>
-      <p>
-        <i>June 17, 2001</i>
-      </p>
-    </DIV>
-    <h3>Abstract</h3>
-    <DIV CLASS="offset">This is a description of the current version of the
-  XSLT processor called Sablotron, including an overview of its
-  limitations as compared to the XSLT specification.
-  </DIV>
-    <h3>Contents</h3>
-<DIV STYLE="margin-left: 10%; margin-bottom: 2em; font-size: smaller">
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__25"></a> <a href="#i__25">
-          <b>1  This text</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__60"></a> <a href="#i__60">
-          <b>2  Changes from the last release</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__74"></a> <a href="#i__74">
-          <b>3  Introduction</b>
-        </a>
-        <DIV class="offset">  <a href="#i__81">3.1  XSLT</a>
-          <BR>  <a href="#i__154">3.2  On Sablotron</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__227"></a> <a href="#i__227">
-          <b>4  The sources</b>
-        </a>
-        <DIV class="offset">  <a href="#i__238">4.1  Getting the sources</a>
-          <BR>  <a href="#i__280">4.2  Joining the development</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__305"></a> <a href="#i__305">
-          <b>5  Implementation. Supported instructions and functions</b>
-        </a>
-        <DIV class="offset">  <a href="#i__343">5.1  Templates</a>
-          <BR>  <a href="#i__364">5.2  Conditional processing</a>
-          <BR>  <a href="#i__381">5.3  Loops</a>
-          <BR>  <a href="#i__398">5.4  Variables and parameters</a>
-          <BR>  <a href="#i__415">5.5  Element creation</a>
-          <BR>  <a href="#i__439">5.6  Global definitions</a>
-          <BR>  <a href="#i__476">5.7  Values and copying</a>
-          <BR>  <a href="#i__508">5.8  Namespace processing</a>
-          <BR>  <a href="#i__529">5.9  Sorting</a>
-          <BR> <a href="#i__577">5.10  Whitespace stripping</a>
-          <BR> <a href="#i__598">5.11  Includes</a>
-          <BR> <a href="#i__623">5.12  Other unimplemented instructions</a>
-          <BR> <a href="#i__654">5.13  Output conformance</a>
-          <BR> <a href="#i__686">5.14  XPath expressions</a>
-          <BR> <a href="#i__714">5.15  Built-in functions</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__804"></a> <a href="#i__804">
-          <b>6  Other implementation-related notes</b>
-        </a>
-        <DIV class="offset">  <a href="#i__811">6.1  Handlers</a>
-          <BR>  <a href="#i__859">6.2  Encodings</a>
-          <BR>  <a href="#i__887">6.3  Output methods</a>
-          <BR>  <a href="#i__915">6.4  URIs</a>
-          <BR>  <a href="#i__983">6.5  Named buffers</a>
-          <BR>  <a href="#i__1015">6.6  Error and log messages</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__1048"></a> <a href="#i__1048">
-          <b>7  The C interface</b>
-        </a>
-        <DIV class="offset">  <a href="#i__1065">7.1  Shortcuts</a>
-          <BR>  <a href="#i__1205">7.2  Basic functions</a>
-          <BR>  <a href="#i__1416">7.3  Generalized interface functions</a>
-          <BR>  <a href="#i__1578">7.4  The situation object</a>
-          <BR>  <a href="#i__1631">7.5  Document Object Model (DOM) functions</a>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__1870"></a> <a href="#i__1870">
-          <b>8  The command line interface</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-      <SPAN CLASS="afterhalf">
-        <a name="toc_i__2013"></a> <a href="#i__2013">
-          <b>9  References</b>
-        </a>
-        <DIV class="offset"></DIV>
-      </SPAN>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__25"></a>
-      <h2>
-        <a href="#toc_i__25">1  This text</a>
-      </h2>
-      <DIV>
-        <p CLASS="">The HTML form of this description
-        was compiled by Sablotron from the XML source
-        Sablot-0-60.xml. 
-        </p>
-        <p CLASS="">
-        The material in the following sections includes:
-        </p>
-        <ul>
-          <li>some background information on XSLT and Sablotron,</li>
-          <li>a detailed comparison of the current version of
-          Sablotron to the XSLT spec,</li>
-          <li>Sablotron usage from the command line or as a
-          library.</li>
-        </ul>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__60"></a>
-      <h2>
-        <a href="#toc_i__60">2  Changes from the last release</a>
-      </h2>
-      <DIV>
-        <p CLASS="">Please see the RELEASE file.</p>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__74"></a>
-      <h2>
-        <a href="#toc_i__74">3  Introduction</a>
-      </h2>
-      <DIV>
-        <DIV class="afterskip">
-          <a name="i__81"></a>
-          <h3>
-            <a href="#toc_i__74">3.1  XSLT</a>
-          </h3>
-          <p CLASS="">XSLT is a language allowing to transform given XML data (the
-    <i>input</i>) according to a <i>stylesheet</i>. XSLT stylesheets
-    are themselves XML documents; that is, all instructions of the
-    language are expressed in the form of XML elements. The
-    <i>output</i>, i.e. the result of the processing, is typically a
-    XML document as well, although the syntactic requirements can be
-    relaxed to allow the creation of a HTML document (one that
-    contains unclosed tags and the like), or even plain text.
-    </p>
-          <p CLASS="">XSLT was designed by the World Wide Web Consortium (W3C) as
-      a part of the XSL stylesheet language, where it is complemented
-      by a powerful set of formatting instructions. The most precise
-      information about XSLT can be found in the W3C Recommendation <a href="#ref-xslt">[XSLT]</a>. In particular, Appendix B of the
-      Recommendation contains a handy syntax table. A good tutorial is
-      <a href="#ref-bible">[XMLBible14]</a>.
-    </p>
-          <p CLASS="">Other W3C Recommendations one often needs to consult are <a href="#ref-xml">[XML]</a> (for the definition of the XML
-      language) and <a href="#ref-xpath">[XPath]</a> (for details on
-      XPath, the language used to form expressions in XSLT and
-      elsewhere).
-    </p>
-          <p CLASS="">An excellent source of information about XSLT (indeed, about
-    anything related to XML and SGML) is <a href="#ref-rcover">[Cover]</a>; see also <a href="#ref-xslinfo">[XSLINFO]</a> and <a href="#ref-xmlorg">[XMLorg]</a>.
-    </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__154"></a>
-          <h3>
-            <a href="#toc_i__74">3.2  On Sablotron</a>
-          </h3>
-          <p CLASS="">Sablotron is a XSLT processor (though not quite conforming
-      yet..., see below) written in C++. Since the machines where it
-      is meant to run include various small mobile
-      clients, the main objectives of its design are the following:
-    </p>
-          <ul>
-      <li>portability,</li>
-      <li>compact code,</li>
-      <li>as much independence on other resources (Java etc.) as
-      possible.</li>
-    </ul>
-          <p CLASS="">Sablotron is a single shared library
-    (<code>sablot.dll</code> or <code>libsablot.so.0.60</code>). It can
-    also be used from the command line via the simple interface
-    called <code>sabcmd</code>. See <a href="#invocation">here</a> for
-    more information.
-    </p>
-          <p CLASS="">The only software Sablotron relies on is <b>expat</b>, the
-      XML parser by James Clark. See <a href="#expat">below</a> for
-      information on how to get expat.
-      </p>
-          <p CLASS="">For information on the available interfaces, e.g. for
-      Python, Perl and PHP, see <a href="http://www.gingerall.com">www.gingerall.com</a>. 
-      </p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__227"></a>
-      <h2>
-        <a href="#toc_i__227">4  The sources</a>
-      </h2>
-      <DIV>
-        <p CLASS="">
-      Sablotron is written in C++. The source files compile under
-      Win32 (using MS Visual C++ 6.0) and on Solaris and Linux (using
-      g++ 2.95.2) without change.</p>
-        <DIV class="afterskip">
-          <a name="i__238"></a>
-          <h3>
-            <a href="#toc_i__227">4.1  Getting the sources</a>
-          </h3>
-          <p CLASS="">The source or binary distributions of Sablotron can be downloaded
-      from <a href="http://www.gingerall.com">www.gingerall.com</a>. For
-      instructions on how to build the sources (if any), refer to the accompanying INSTALL file.
-      </p>
-          <p CLASS="">If you have access to the Ginger Alliance CVS server, you
-      can get the working version of Sablotron in the CVS module
-      <code>ga</code>. The access rights can be obtained on
-      request from <a href="mailto:cvsadmin at gingerall.com">the CVS admin</a>.
-      </p>
-          <p CLASS="">
-            <a name="expat"></a>
-      Since version 0.50, Sablotron uses expat 1.95.1, available from <a href="http://expat.sourceforge.org">SourceForge</a>.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__280"></a>
-          <h3>
-            <a href="#toc_i__227">4.2  Joining the development</a>
-          </h3>
-          <p CLASS="">
-      Sablotron is an open source project and all volunteers are most
-      welcome! The documentation of the sources is still somewhat
-      sparse but we will try to improve it. If you find the invitation
-      to work on Sablotron with us interesting, please <a href="mailto:sablotron at gingerall.com">contact us</a>. There is also
-      a mailing list available, see <a href="http://www.gingerall.com">www.gingerall.com</a>.
-      </p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__305"></a>
-      <h2>
-        <a href="#toc_i__305">5  Implementation. Supported instructions and functions</a>
-      </h2>
-      <DIV>
-        <p CLASS="">The instruction set supported by this version of Sablotron is
-    already sufficient for many transformation tasks (e.g. the task of
-    formatting this document). On the other
-    hand, a comparison of it to the XSLT specification <a href="#ref-xslt">[XSLT]</a> shows that much is still to be
-    done. The purpose of the
-    following sections is to describe the varying degree of support
-    for the elements of the XSLT language. </p>
-        <p CLASS="">It may be helpful to refer to the syntax table in Appendix B
-    of <a href="#ref-xslt">[XSLT]</a>. The instructions/attributes that
-    are not listed as unsupported should be implemented. The <a href="mailto:sablotron at gingerall.com">authors</a> will appreciate being
-    told about any omissions found in the following
-    description.</p>
-        <p CLASS="">For readability, I sometimes omit the <code>xsl:</code> prefix
-    from the instruction names.</p>
-        <DIV class="afterskip">
-          <a name="i__343"></a>
-          <h3>
-            <a href="#toc_i__305">5.1  Templates</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        template, apply-templates, call-template
-      </code>
-          </p>
-          <p CLASS="">
-        Fully implemented. <code>xsl:sort</code> is supported since release 0.50.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__364"></a>
-          <h3>
-            <a href="#toc_i__305">5.2  Conditional processing</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        if, choose, when, otherwise
-      </code>
-          </p>
-          <p CLASS="">Fully implemented.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__381"></a>
-          <h3>
-            <a href="#toc_i__305">5.3  Loops</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>for-each</code>
-          </p>
-          <p CLASS="">Fully implemented.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__398"></a>
-          <h3>
-            <a href="#toc_i__305">5.4  Variables and parameters</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>variable, param, with-param</code>
-          </p>
-          <p CLASS="">Fully implemented. Top-level variables and parameters are
-      read in the document order, so no forward references are
-      resolved. This is a minor deviation from the spec. </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__415"></a>
-          <h3>
-            <a href="#toc_i__305">5.5  Element creation</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>element, attribute, text, 
-      comment, processing-instruction, attribute-set</code>
-          </p>
-          <p CLASS="">
-            <code>xsl:attribute-set</code> is not implemented. For the
-      rest, <code>name</code> is the only recognized attribute (where
-      applicable). Literal result elements work.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__439"></a>
-          <h3>
-            <a href="#toc_i__305">5.6  Global definitions</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>stylesheet, transform, output</code>
-          </p>
-          <p CLASS="">For <code>stylesheet</code> and <code>transform</code>,
-        the only recognized attribute is
-        <code>version</code>. <code>xsl:output</code> should work
-        (see below for notes on the <code>encoding</code>
-        attribute). HTML indentation has been added in 0.60.
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__476"></a>
-          <h3>
-            <a href="#toc_i__305">5.7  Values and copying</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>value-of, copy, copy-of</code>
-          </p>
-          <p CLASS="">
-            <code>copy-of</code> and <code>value-of</code> are fully
-      implemented. <code>copy</code> is implemented except for the
-      <code>use-attribute-sets</code> attribute.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__508"></a>
-          <h3>
-            <a href="#toc_i__305">5.8  Namespace processing</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>namespace-alias</code>
-          </p>
-          <p CLASS="">Namespaces should be processed correctly. The
-      <code>namespace-alias</code> instruction is now supported
-      (patch by Major).</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__529"></a>
-          <h3>
-            <a href="#toc_i__305">5.9  Sorting</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>sort</code>
-          </p>
-          <p CLASS="">
-            <code>xsl:sort</code> is implemented since 0.50. There are
-      minor limitations:
-      </p>
-          <ul>
-        <li>currently, the <code>lang</code> attribute may only
-        contain the values <code>"en"</code> or <code>"cz"</code>.</li>
-        <li>
-              <code>case-order</code> cannot be specified.</li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__577"></a>
-          <h3>
-            <a href="#toc_i__305">5.10  Whitespace stripping</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>strip-space, preserve-space</code>
-          </p>
-          <p CLASS="">Only the default whitespace stripping is done. That is,
-      all whitespace-only text nodes in any stylesheet, not appearing
-      inside a <code>xsl:text</code>, are removed. The two
-      instructions for whitespace stripping and preservation are
-      unsupported.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__598"></a>
-          <h3>
-            <a href="#toc_i__305">5.11  Includes</a>
-          </h3>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>include, import, apply-imports</code>
-          </p>
-          <p CLASS="">Only <code>xsl:include</code> is implemented. Processing
-      involving multiple documents works, but has to get more testing,
-      eg. with respect to <code>generate-id()</code>.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__623"></a>
-          <h3>
-            <a href="#toc_i__305">5.12  Other unimplemented instructions</a>
-          </h3>
-          <ul>
-        <li>
-              <code>xsl:key,</code>
-            </li>
-        <li>
-              <code>xsl:number,</code>
-            </li>
-        <li>
-              <code>xsl:fallback.</code>
-            </li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__654"></a>
-          <h3>
-            <a href="#toc_i__305">5.13  Output conformance</a>
-          </h3>
-          <p CLASS="">The output mechanism is much closer to the spec than in
-      the versions prior to 0.4. The following issues remain for the
-      html method:</p>
-          <ul>
-        <li>Output the boolean attributes correctly.</li>
-        <li>Disable the escaping inside
-        <code><SCRIPT></code> and
-        <code><STYLE></code>
-            </li>.
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__686"></a>
-          <h3>
-            <a href="#toc_i__305">5.14  XPath expressions</a>
-          </h3>
-          <p CLASS="">Almost all features of XPath are fully implemented. This means
-      there should be no problems with expressions of any kind.</p>
-          <p CLASS="">One exception relates to axes. The <code>following</code> and
-      <code>preceding</code> axes haven't been implemented yet.</p>
-          <p CLASS="">Another possible exception may be numbers; we did not yet do a
-      thorough test of rounding, NaNs, infinity, etc.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__714"></a>
-          <h3>
-            <a href="#toc_i__305">5.15  Built-in functions</a>
-          </h3>
-          <p CLASS="">
-            <a name="corelib"></a>Only a few functions from the standard
-      function library remain
-      unimplemented:
-      </p>
-          <ul>
-      <li>
-              <code>id()</code>,</li>
-      <li>
-              <code>lang()</code> (accepted but always returns true),</li>
-      <li>
-              <code>key()</code>,</li>
-      <li>
-              <code>format-number()</code>,</li>
-      <li>
-              <code>unparsed-entity-uri()</code>.</li>
-      </ul>
-          <p CLASS="">As for the fuctions that <i>are</i> implemented, the
-      following is a list of differences from the spec:
-      </p>
-          <ul>
-        <li>
-              <code>document()</code> only accepts one argument, always
-        getting the base URI from the stylesheet URI.
-        </li>
-        <li>
-              <code>string-length()</code> returns the byte length of
-        the UTF-8 representation of the string. This will typically
-        differ from the actual length.
-        </li>
-        <li>
-              <code>generate-id()</code> might fail to generate unique identifiers
-        when several input documents are present (giving the same id to
-        nodes from different documents).
-        </li>
-      </ul>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__804"></a>
-      <h2>
-        <a href="#toc_i__804">6  Other implementation-related notes</a>
-      </h2>
-      <DIV>
-        <DIV class="afterskip">
-          <a name="i__811"></a>
-          <h3>
-            <a href="#toc_i__804">6.1  Handlers</a>
-          </h3>
-          <p CLASS="">It is possible for the user to supply the following
-      handlers to Sablotron:
-        <ul>
-          <li>message handler (to bypass the default way of displaying
-          error and warning messages and logging),</li>
-          <li>scheme handler (to retrieve documents whose URI use an
-          unsupported scheme),</li>
-          <li>streaming handler (an expat-like interface to the XML
-          document which is the result of the processing),</li>
-          <li>'miscellaneous' handler (which will probably server as a
-          collections of odd callbacks).</li>
-        </ul>
-      </p>
-          <p CLASS="">
-        The handlers are set using <code>SablotRegHandler()</code>
-        For details concerning the interface of these handlers,
-        consult the header files <code>sablot.h</code> and
-        <code>shandler.h</code>. 
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__859"></a>
-          <h3>
-            <a href="#toc_i__804">6.2  Encodings</a>
-          </h3>
-          <p CLASS="">
-        In version 0.52, the encoding conversion capabilities of
-        Sablotron have been much extended. The most important fact is the
-        following: if you have the iconv library installed on your system, you
-        can use any encoding it supports (that is, almost any encoding
-        whatsoever) for both the input and the output documents. Iconv
-        is available on most systems (it is a standard part of glibc2,
-        for instance). There are implementations for Win32 as well.
-      </p>
-          <p CLASS="">If iconv is not available, the encoding may still be supported internally by
-      Sablotron. At present, the list is of such encodings is rather
-      short: besides UTF-8, these are UTF-16, ASCII, iso-8859-1,
-      iso-8859-2 and windows-1250 on input, none on output. However,
-      we plan to implement a half independent light-weight
-      conversion library for use on systems without iconv,
-      extending the set of internally supported encodings
-      considerably. 
-      </p>
-          <p CLASS="">Lastly, the user has the option to implement a custom
-      encoding conversion handler, which will be asked to perform any unsupported
-      conversion. See the <code>shandler.h</code> header file for
-      details.
-      </p>
-          <p CLASS="">The default input and output encoding is in all cases UTF-8.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__887"></a>
-          <h3>
-            <a href="#toc_i__804">6.3  Output methods</a>
-          </h3>
-          <p CLASS="">In addition to the standard output methods (xml, html and
-      text), it is possible to output xhtml. Documents output using
-      this method obey the XHTML 1.0 rules (in particular, all empty
-      elements are closed). To choose the method, use
-      <code><xsl:output method='xhtml'></code>. <b>Please note</b>
-      that the name of this method will possibly be changed since the XSLT
-      spec requires any processor-specific methods to have qualified
-      names, say <code>sab:xhtml</code>. On the other hand, the name
-      <code>xhtml</code> is considered in the XSLT 2.0 working draft.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__915"></a>
-          <h3>
-            <a href="#toc_i__804">6.4  URIs</a>
-          </h3>
-          <p CLASS="">Sablotron can handle
-      two URI schemes natively: 'file' and 'arg' (see
-      below). Moreover, it is possible to use the function
-      <code>SablotRegSchemeHandler</code> to register an external scheme
-      handler which will receive requests in all other schemes. See
-      the documentation in <code>sablot.h</code> and
-      <code>shandler.h</code>.
-      </p>
-          <p CLASS="">Relative URI references are resolved in conformance to RFC
-      2396. The base URI is well defined when the relative reference appears
-      inside a XML document; when invoking sabcmd, the base URI is
-      taken to correspond to the current working directory.
-      </p>
-          <p CLASS="">
-            <a name="fname-rules"></a>When specifying filenames, the
-      following rules are in effect:
-      </p>
-          <ul>
-        <li>specify the "file:" scheme for any standard files,
-      i.e. refer to <code>stdin</code> as <code>file://stdin</code>
-      etc.</li>
-        <li>slashes and backslashes work equally fine, in Windows as
-      well as Linux.</li>
-        <li>to include a drive letter under Windows
-      (e.g. <code>C:\doc.xml</code>), it is necessary to say
-      <code>file://c:/doc.xml</code>. 
-        </li>
-      </ul>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__983"></a>
-          <h3>
-            <a href="#toc_i__804">6.5  Named buffers</a>
-          </h3>
-          <p CLASS="">
-            <a name="argscheme"></a>Sablotron introduces an URI scheme
-      'arg:' which enables one to use strings in named memory
-      buffers. The buffer names can have a tree-like structure so that
-      a relative reference from a document in a buffer can be resolved
-      as pointing to another buffer.
-      </p>
-          <p CLASS="">For instance, if we invoke Sablotron specifying that a
-      buffer named <code>/mybuf/1</code> contains the string
-      "&lt;a>contents&lt;/a>", then the expression
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-      document('arg:/mybuf/1')/a
-      </code>
-          </p>
-          <p CLASS="">has string-value "contents". If the document in arg:/mybuf/1
-      contained a relative URI reference "../theirbuf/2" then this
-      would be resolved as pointing to "arg:/theirbuf/2".</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1015"></a>
-          <h3>
-            <a href="#toc_i__804">6.6  Error and log messages</a>
-          </h3>
-          <p CLASS="">By default, Sablotron writes error and warning messages to
-      stderr, and does no logging. By a call to
-      <code>SablotSetLog()</code>, you can specify the name of the log
-      file to be used.</p>
-          <p CLASS="">Besides, you can use <code>SablotRegHandler()</code>
-      to override the default message handling. The handler you
-      register will receive all messages in a structured form that's
-      easy to process and filter. For details, see
-      the documentation in <code>sablot.h</code> and
-      <code>shandler.h</code>.</p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__1048"></a>
-      <h2>
-        <a href="#toc_i__1048">7  The C interface</a>
-      </h2>
-      <DIV>
-        <p CLASS="">
-          <a name="invocation"></a>
-        </p>
-        <p CLASS="">
-        This section describes the functions exported from the
-        Sablotron library.  All of them have a return type of 'int'
-        and return an error flag (nonzero signals an error). Errors
-        are reported to the user by Sablotron itself. 
-      </p>
-        <DIV class="afterskip">
-          <a name="i__1065"></a>
-          <h3>
-            <a href="#toc_i__1048">7.1  Shortcuts</a>
-          </h3>
-          <p CLASS="">
-        We'll first describe the 'shortcuts' that do the whole
-        processing in one call.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcess(char *sheetURI, char *inputURI, char *resultURI,
-        char **params, char **arguments, char **resultArg);
-      </code>
-          </p>
-          <p CLASS="">
-        This is the basic function. The first three of its arguments
-        are the URIs of the XSLT stylesheet, the XML source and the
-        resulting document, respectively. For some notes on specifying
-        file names, see <a href="#fname-rules">above</a>.
-      </p>
-          <p CLASS="">
-            <code>params</code> is an array of pointers to the names
-      and contents of the top-level stylesheet parameters. Thus,
-      <code>params[0]</code> is a pointer to the null-terminated name
-      of the first parameter, <code>params[1]</code> points to the
-      (null-terminated) contents of the first parameter. The following
-      two array items do the same for the second parameter, etc. The
-      whole array is terminated by a NULL pointer in place of the
-      name. If no parameters are to be passed, you can specify NULL
-      for <code>params</code> itself.
-      </p>
-          <p CLASS="">
-            <code>arguments</code> is a similar array of named buffers
-      to be passed to the stylesheet. (They can be referred to via the
-      'arg:' scheme, see <a href="#argscheme">above</a>.) Again, the
-      array is a sequence of (name, value) pairs terminated by NULL in
-      place of a name. If no named buffers are to be passed, you can
-      specify NULL for <code>arguments</code> itself.
-      </p>
-          <p CLASS="">
-            <code>resultArg</code> enables one to access the
-      resulting document in case the output went to a named buffer. In
-      that situation, <code>*resultArg</code> points to the resulting
-      null-terminated string, allocated by Sablotron. You can pass NULL
-      for <code>resultArg</code> if the output is sure to go to a
-      file. 
-      </p>
-          <p CLASS="">
-            <b>Note:</b>When you are done processing the string
-      pointed to by <code>*resultArg</code>, free it using <a href="#sablotfree">
-              <code>SablotFree()</code>
-            </a> - never use
-      <code>free()</code>. The latter is guaranteed to produce a
-      segmentation fault under Linux.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcessFiles(char *styleSheetName,
-        char *inputName,
-        char *resultName);
-      </code>
-          </p>
-          <p CLASS="">A wrapper for <code>SablotProcess()</code> working on
-      files. The parameters are the null-terminated file names of the
-      XSLT stylesheet, the XML input and the result,
-      respectively. Sablotron opens these files itself and closes them
-      after the processing is complete. Values like "file://stdin" are
-      allowed.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotProcessStrings(char *styleSheetStr, char *inputStr, char
-        **resultStr);
-      </code>
-          </p>
-          <p CLASS="">Another wrapper for <code>SablotProcess()</code>, this
-        time for accessing named buffers (i.e. user-allocated memory
-        blocks)only. Thus, the first parameter is a null-terminated
-        string containing the whole stylesheet; the second parameter
-        is a null-terminated string containing the XML
-        input. Sablotron allocates the buffer for the resulting string
-        and returns a pointer to it in resultStr. Hence, invoking
-        <code>puts(*resultStr)</code> after having called
-        <code>SablotProcessStrings</code> sends the result to
-        stdout. The buffer allocated <b>must</b> be freed by calling the
-        function <code>SablotFree</code> described next. 
-      </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1205"></a>
-          <h3>
-            <a href="#toc_i__1048">7.2  Basic functions</a>
-          </h3>
-          <p CLASS="">The above shortcuts just call the basic, lower-level
-      functions described below. Note that if you need to set options
-      for logging etc., you may need to use the low-level
-      functions. </p>
-          <p CLASS="">A typical processing session may look like this:</p>
-          <p CLASS="">
-            <pre>
-          SablotHandle p;
-          char *my_buf;
-          SablotCreateProcessor(&p);
-          SablotSetLog(p, ...);
-          /* ...set other instance-specific options here... */
-          SablotRunProcessor(p, ...);
-          SablotGetResultArg(p, "arg:/somename", &my_buf)
-          /* ...do something with my_buf... */
-          /* can run the processor again if necessary */
-          SablotRunProcessor(p, ...);
-          SablotDestroyProcessor(p);
-      </pre>
-          </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotCreateProcessor(SablotHandle *processorPtr);
-      </code>
-          </p>
-          <p CLASS="">Creates an instance of Sablotron and returns a pointer to
-      it in *processorPtr. This pointer is passed on all subsequent
-      calls to this instance. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotDestroyProcessor(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Destroys an instance of the processor, deallocating all
-      the memory used up by it.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotRunProcessor(SablotHandle processor_,
-        char *sheetURI, 
-        char *inputURI, 
-        char *resultURI,
-        char **params, 
-        char **arguments);
-      </code>
-          </p>
-          <p CLASS="">Processes documents using the given processor instance and
-      given params and args definitions. See
-      <code>SablotProcess()</code>.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotGetResultArg(SablotHandle processor_,
-        char *argURI,
-        char **argValue);
-      </code>
-          </p>
-          <p CLASS="">Copies the result 'arg' buffer with the given URI,
-      returning a pointer to the newly-allocated block in
-      *argValue. If no such buffer exists, returns NULL in *argValue. 
-      </p>
-          <p CLASS="">This function is necessary, because if the result document
-      is output to memory, it would be lost when
-      <code>SablotDestroyProcessor()</code> is called. When
-      deallocating the copy obtained from
-      <code>SablotGetResultArg()</code>, use <code>SablotFree</code>
-      (never <code>free()</code>). </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotFreeResultArgs(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Removes the Sablotron-internal copies of the 'arg' buffers
-      from the last Sablotron run. Normally, there should be no reason
-      to call this function as it is called automatically on both
-      <code>SablotRunProcessor()</code> and
-      <code>SablotDestroyProcessor()</code>. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-              <a name="sablotfree"></a>
-        int SablotFree(char *resultBuf);
-      </code>
-          </p>
-          <p CLASS="">This function frees the buffer allocated on previous call
-        to <code>SablotProcessStrings</code>. Calling it with an
-        invalid pointer will cause a crash. 
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotRegHandler(
-        SablotHandle processor_, 
-        HandlerType type,   
-        void *handler, 
-        void *userData);
-      </code>
-          </p>
-          <p CLASS="">Registers an external handler. <code>type</code> can be
-        <code>HLR_MESSAGE</code>, <code>HLR_SCHEME</code>,
-        <code>HLR_SAX</code>, <code>HLR_MISC</code> or
-        <code>HLR_ENC</code>. 
-        <code>handler</code> points to the
-        callback vector of the appropriate type. <code>userData</code>
-        is a data item to passed to all callbacks of this particular
-        handler. For details, check the <code>sablot.h</code> and
-        <code>shandler.h</code> header files.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotUnregHandler(
-        SablotHandle processor_, 
-        HandlerType type,   
-        void *handler, 
-        void *userData);
-      </code>
-          </p>
-          <p CLASS="">Unregisters the given external handler. For details, check the
-      <code>sablot.h</code> and <code>shandler.h</code> header
-      files.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotSetLog(
-        SablotHandle processor_,
-        const char *logFilename, 
-        int logLevel);
-      </code>
-          </p>
-          <p CLASS="">Sets the log filename. The <code>logLevel</code> parameter
-      is currently not used. Pass NULL for <code>logFilename</code> to
-      turn logging off (default). </p>
-          <p CLASS="">The other functions published by sablot.h have been
-      included for experimental reasons or for compatibility, and it
-      is better not to use them.
-      </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        int SablotClearError(SablotHandle processor_);
-      </code>
-          </p>
-          <p CLASS="">Clears the 'pending error' flag for this instance of
-      Sablotron.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1416"></a>
-          <h3>
-            <a href="#toc_i__1048">7.3  Generalized interface functions</a>
-          </h3>
-          <p CLASS="">The implementation of the <a href="#dom">DOM interface</a>
-      brought the need to extend some of the functions described in
-      the previous section. This extension enables the user to:
-      </p>
-          <ul>
-        <li>process documents created by the DOM functions, and</li>
-        <li>process frequently used documents in pre-parsed form.</li>
-      </ul>
-          <p CLASS="">An object called <i>situation</i> is used to provide a
-persistent context for all calls to the DOM-related
-functions. Functions used to manipulate the situation are described in
-<a href="#situation">the following section</a>.</p>
-          <p CLASS="">
-            <b>Note:</b> If not specified otherwise, all these
-      functions return an error code. A positive value indicates an error.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotCreateDocument(SablotSituation S, 
-	    SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Creates an empty document. Typically followed by calls to
-      DOM functions to populate the document.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotDestroyDocument(SablotSituation S, 
-	    SDOM_Document D);
-      </code>
-          </p>
-          <p CLASS="">Destroys a document, freeing all the nodes it has created.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotParse(SablotSituation S, 
-        const char *uri, SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Reads in a document from the given URI.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotParseBuffer(SablotSituation S, 
-        const char *buffer, SDOM_Document *D);
-      </code>
-          </p>
-          <p CLASS="">Reads in a document from the given in-memory buffer.</p>
-          <p CLASS="">These functions have variants to be used if the document
-      is to be interpreted as an XSLT stylesheet, namely
-      <code>SablotParseStylesheet</code> and
-      <code>SablotParseStylesheetBuffer</code>.</p>
-          <p CLASS="">The following functions generalize
-      <code>SablotRunProcessor</code> in that they make it possible to
-      utilize an extra kind of a source document: a DOM tree.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotRunProcessorGen(SablotSituation S,
-        void *processor_,
-        char *sheetURI, 
-        char *inputURI, 
-        char *resultURI);    
-      </code>
-          </p>
-          <p CLASS="">A key ingredient of the extended interface. Only the URIs
-      of the sources and of the result document are given to it. The
-      rest of the information passed to
-      <code>SablotRunProcessor</code> is conveyed through
-      <code>SablotAddArgBuffer,</code> <code>SablotAddArgTree</code>
-      and <code>SablotAddParam.</code> The scheme part of the
-      stylesheet URI or the input URI may be "arg:", in which
-      case they refer to a buffer or tree passed by these
-      functions. </p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddArgBuffer(SablotSituation S,
-        void *processor_,
-        const char *argName,
-        const char *bufferValue);
-</code>
-          </p>
-          <p CLASS="">Creates a named buffer for the next processor run. The
-      buffer's name and contents are passed as arguments. The name
-      is interpreted relative to the 'arg:/' scheme.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddArgTree(SablotSituation S,
-        void *processor_,
-        const char *argName,
-        SDOM_Document tree);
-</code>
-          </p>
-          <p CLASS="">Associates the given document with a name for the next
-      processor run. The document is <i>not</i> destroyed after the
-      run is finished. The name is interpreted relative to the 'arg:/'
-      scheme.</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotAddParam(SablotSituation S,
-        void *processor_,
-        const char *paramName,
-        const char *paramValue);
-      </code>
-          </p>
-          <p CLASS="">Adds a global stylesheet parameter for the next processor
-      run.</p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1578"></a>
-          <h3>
-            <a href="#toc_i__1048">7.4  The situation object</a>
-          </h3>
-          <p CLASS="">
-            <a name="situation"></a>At present, the situation object primarily holds information on any pending errors. A
-situation is created using</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotCreateSituation(SablotSituation
-      *SP);</code>
-          </p>
-          <p CLASS="">and destroyed by</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotDestroySituation(SablotSituation
-      S);</code>
-          </p>
-          <p CLASS="">To clear the pending error flag in a situation, use</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>int SablotClearSituation(SablotSituation
-      S);</code>
-          </p>
-          <p CLASS="">The following self-explanatory functions extract parts of the error information
-      from the situation:</p>
-          <p CLASS="" STYLE="background-color: #ffffee">
-            <code>
-        const char *SablotGetErrorURI(SablotSituation S);<br>
-        int SablotGetErrorLine(SablotSituation S);<br>
-        const char *SablotGetErrorMsg(SablotSituation S);
-     </code>
-          </p>
-        </DIV>
-        <DIV class="afterskip">
-          <a name="i__1631"></a>
-          <h3>
-            <a href="#toc_i__1048">7.5  Document Object Model (DOM) functions</a>
-          </h3>
-          <p CLASS="">
-            <a name="dom"></a>Starting with version 0.60, Sablotron implements
-      a major subset of the DOM Level 1 Core Specification <a href="#ref-dom">[DOM]</a>. A brief
-      description of the implemented interface follows; for more
-      details, please refer to the header file named
-      <code>sdom.h.</code>
-          </p>
-          <p CLASS="">All of the names related to the DOM interface start with
-      SDOM_ (for Sablot DOM).</p>
-          <p CLASS="">Major new types are <code>SDOM_Document</code> (a DOM tree) and
-      <code>SDOM_Node</code> (a node of the tree). A document can also be used in
-      place of a node. This reflects the fact in the DOM spec, 
-      Document is a subclass of Node. When used in this way, the
-      document represents its own root node (which is not the same as
-      the `root element').</p>
-          <p CLASS="">Other types include:</p>
-          <ul>
-        <li>
-              <code>SDOM_char:</code> a DOM character type. Currently, this is just
-        char. Note that the DOM spec requires that the DOM
-        implementations work with UTF-16. Sablotron deviates from this
-        by using UTF-8 instead. A separate set of functions taking
-        UTF-16 strings will be provided.</li>
-        <li>
-              <code>SDOM_NodeType:</code> a node type enum. Some of the values are
-        <code>SDOM_ELEMENT_NODE,</code> <code>SDOM_ATTRIBUTE_NODE</code> and <code>SDOM_TEXT_NODE.</code> See
-        <code>sdom.h</code> for the rest.</li>
-        <li>
-              <code>SDOM_NodeList:</code> a node list returned by some of the
-        functions.</li>
-        <li>
-              <code>SDOM_Exception:</code> DOM exception codes enum, with values such
-        as <code>SDOM_NOT_FOUND_ERR</code> or <code>SDOM_INVALID_NODE_TYPE</code>. See <code>sdom.h</code>
-        for details.</li>
-</ul>
-          <p CLASS="">The functions listed below are implemented more or less as defined in
-      the DOM Level 1 Specification, with two exceptions:
-      their names are prefixed with <code>SDOM_</code> and the first argument is
-      always a <code>SablotSituation.</code> All the functions return
-      a <code>SDOM_Exception.</code> </p>
-          <ul>
-<li>
-              <code>createElement, createAttribute, createTextNode,
-createCDATASection, createComment, createProcessingInstruction</code>
-            </li>
-<li>
-              <code>getNodeType, getNodeName, setNodeName, getNodeValue, setNodeValue</code>
-            </li>
-<li>
-              <code>getParentNode, getFirstChild, getLastChild, getPreviousSibling,
-getNextSibling, getOwnerDocument</code>
-            </li>
-<li>
-              <code>insertBefore, appendChild, removeChild, replaceChild</code>
-            </li>
-<li>
-              <code>cloneNode</code>
-            </li>
-<li>
-              <code>getAttribute, setAttribute, removeAttribute, getAttributeList</code>
-            </li>
-</ul>
-          <p CLASS="">Several functions have been added:</p>
-          <ul>
-<li>
-              <code>disposeNode</code> frees all memory used by the given node</li>
-<li>
-              <code>cloneForeignNode</code> clones a node from a different
-document</li>
-<li>
-              <code>docToString</code> serializes the document, returning the
-resulting string</li>
-<li>
-              <code>xql</code> performs an XPath query on the DOM tree,
-returning a list of the nodes satisfying it.</li>
-</ul>
-          <p CLASS="">In addition, there are some functions used to manipulate
-      the node lists returned by <code>xql</code> and
-      <code>getAttributeList</code>. These include
-      <code>getNodeListLength</code>, <code>getNodeListItem</code> and
-      <code>disposeNodeList</code>.</p>
-          <p CLASS="">Finally, there are functions to extract DOM
-      exception-related information from the situation object, namely
-      <code>getExceptionCode</code>, <code>getExceptionMessage</code>
-      and <code>getExceptionDetails</code>.</p>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__1870"></a>
-      <h2>
-        <a href="#toc_i__1870">8  The command line interface</a>
-      </h2>
-      <DIV>
-        <p CLASS="">Sablotron comes with a command-line interface to the
-        shared library, which is a program named
-        <code>sabcmd</code>. At present, <code>sabcmd</code> is invoked
-        as follows:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      sabcmd [<i>options</i>] <i>stylesheet</i> [<i>input</i> [<i>result</i>]] [<i>assignments</i>]
-      </code>
-        </p>
-        <p CLASS="">The arguments are the URIs of the XSLT stylesheet, the
-      XML input document, and the resulting document, respectively. The
-      default for <code>
-            <i>input</i>
-          </code> is
-      <code>file://stdin</code> (meaning plain old stdin);
-      <code>
-            <i>result</i>
-          </code> defaults to
-      <code>file://stdout</code>. Filenames have to include the extension (if
-      any).</p>
-        <p CLASS="">You can display the list of available options by typing
-      <code>sabcmd --help</code>. Among the more useful ones are
-      <code>--log-file</code> (for setting the log file) and
-      <code>--measure</code> (measures and outputs the total
-      processing time).
-      </p>
-        <p CLASS="">
-          <a href="#fname-rules">The rules for filenames</a> are the same as
-      with <code>SablotProcess()</code>. 
-      </p>
-        <p CLASS="">
-          <code>assignments</code> is a series of definitions of the
-      form:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      name1=value1 name2=value2 ...
-      </code>
-        </p>
-        <p CLASS="">
-      assigning values to top-level stylesheet parameters and to named
-      buffers. These two cases are distinguished by a leading '$' in
-      the name of a stylesheet parameter. The names of the buffers do
-      <i>not</i> start with "arg:". They may start with a slash; if
-      they don't, the slash is prepended. 
-      </p>
-        <p CLASS="">
-          <b>Note:</b> In most cases, it will be necessary to quote
-      the individual assignments. Whether to use single or double
-      quotes may depend on the shell used (or may it?) Single quotes
-      work for bash, double quotes work in Windows.
-      </p>
-        <p CLASS="">If the result URI refers to a named buffer, the output
-      would normally remain buried in memory. Sabcmd dumps the buffer to standard
-      output instead.
-      </p>
-        <p CLASS="">To sum up and give an example, the following would be a
-      valid invocation of sabcmd:</p>
-        <p CLASS="" STYLE="background-color: #ffffee">
-          <code>
-      sabcmd sheet.xsl arg:/the_input "the_input=&lt;a/>"
-      "$use_defaults=1"
-      </code>
-        </p>
-        <p CLASS="">This processes the document passed in the buffer named
-      the_input, using a stylesheet found in file "sheet.xsl" in the
-      working directory. We assign 1 to the top-level parameter called
-      "use_defaults". The output goes to stdout by default.
-      </p>
-      </DIV>
-    </DIV>
-    <DIV class="afterskip">
-      <a name="i__2013"></a>
-      <h2>
-        <a href="#toc_i__2013">9  References</a>
-      </h2>
-      <DIV>
-        <dl>
-      <dt>
-            <a name="ref-xslt"></a>[XSLT]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/1999/REC-xslt-19991116">
-          XSL Transformations (XSLT) Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-xpath"></a>[XPath]</dt>
-      <dd> 
-        <a href="http://www.w3.org/TR/1999/REC-xpath-19991116">
-          XML Path Language (XPath) Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-xml"></a>[XML]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/1998/REC-xml-19980210">
-          Extensible Markup Language (XML) 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-dom"></a>[DOM]</dt>
-      <dd>
-        <a href="http://www.w3.org/TR/REC-DOM-Level-1">
-          Document Object Model Level 1 Specification, Version 1.0
-        </a>
-      </dd>
-
-      <dt>
-            <a name="ref-rcover"></a>[Cover]</dt>
-      <dd>
-        <a href="http://www.oasis-open.org/cover/sgml-xml.html">
-          The XML Cover Pages</a>
-      </dd>
-      
-      <dt>
-            <a name="ref-xmlorg"></a>[XMLorg]</dt>
-      <dd>
-        <a href="http://xml.org">XML.org</a>
-      </dd>
-
-      <dt>
-            <a name="ref-xslinfo"></a>[XSLINFO]</dt>
-      <dd>
-        <a href="http://www.xslinfo.com">XSLINFO.com</a>
-      </dd>
-
-      <dt>
-            <a name="ref-bible"></a>[XMLBible14]</dt>
-      <dd>
-        <a href="http://metalab.unc.edu/xml/books/bible/updates/14.html">
-          Harold, E. R.: XML Bible, Chapter 14 (online presentation)
-        </a>
-      </dd>
-    </dl>
-      </DIV>
-    </DIV>
-    <hr>
-    <p STYLE="font-style: italic; margin-left: 0">(c) 2000 Ginger Alliance s.r.o.</p>
-  </body>
-</html>
\ No newline at end of file
diff --git a/test/make_project.php b/test/make_project.php
deleted file mode 100644
index 63ea626..0000000
--- a/test/make_project.php
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-echo "this file is obsolete! cvs remove when ready"
-exit 1
-
-
-#! /usr/local/bin/php
-<?php
-    // This script creates a BOINC project.
-    // You just need to plug in an application,
-    // and back-end systems for creating work and validating results
-
-    include_once("test.inc");
-
-    $project = new Project;
-    $project->short_name = "project_name";
-    $project->long_name = "Your Project";
-
-    $platform = new Platform("windows_intelx86", "Windows");
-
-    $app = new App("Astropulse");
-    $app_version = new App_Version($app);
-    $app_version->platform = $platform;
-    $app_version->exec_dir = "../apps";
-    $app_version->exec_name = "ap_win_0.02.exe";
-
-    $core_app = new App("core client");
-    $core_app_version = new App_Version($core_app);
-    $core_app_version->platform = $platform;
-    $core_app_version->exec_dir = "../apps";
-    $core_app_version->exec_name = "BOINC_0.10.exe";
-
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-    $project->add_app($core_app);
-    $project->add_app_version($core_app_version);
-    $project->start_assimilator = true;
-    $project->start_feeder = true;
-    $project->start_file_deleter = true;
-    $project->start_make_work = true;
-    $project->start_timeout_check = true;
-    $project->start_validate = true;
-    $project->shmem_key = 0x31415926;
-
-    $project->install();
-    $project->start_feeder();
-?>
diff --git a/test/make_project_sah.php b/test/make_project_sah.php
deleted file mode 100644
index d5affd9..0000000
--- a/test/make_project_sah.php
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-
-echo "this file is obsolete! cvs remove when ready"
-exit 1
-
-
-#! /usr/local/bin/php
-<?php
-    // This script creates a BOINC project.
-    // You just need to plug in an application,
-    // and back-end systems for creating work and validating results
-
-    include_once("test.inc");
-
-    $project = new Project;
-    $project->short_name = "sah";
-    $project->long_name = "SETI at home II";
-
-    $platform = new Platform("windows_intelx86", "Windows");
-
-    $app = new App("Astropulse");
-    $app_version = new App_Version($app);
-    $app_version->platform = $platform;
-    $app_version->exec_dir = "../apps";
-    $app_version->version = 5;
-    $app_version->exec_name = "ap_win_0.05.exe";
-
-    $core_app = new App("core client");
-    $core_app_version = new App_Version($core_app);
-    $core_app_version->platform = $platform;
-    $core_app_version->exec_dir = "../apps";
-    $core_app_version->version = 13;
-    $core_app_version->exec_name = "BOINC_0.13a.exe";
-
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-    $project->add_app($core_app);
-    $project->add_app_version($core_app_version);
-    $project->start_assimilator = false;
-    $project->start_feeder = true;
-    $project->start_file_deleter = false;
-    $project->start_make_work = true;
-    $project->make_work_wu_template = "pulse_wu";
-    $project->make_work_result_template = "pulse_result";
-    $project->start_timeout_check = false;
-    $project->start_validate = false;
-    $project->shmem_key = 0x31415928;
-    $project->project_php_file = "project_sah.inc";
-
-    $project->install();
-
-    $work = new Work($app);
-    $work->wu_template = "pulse_wu";
-    $work->result_template = "pulse_result";
-    $work->redundancy = 5;
-    array_push($work->input_files, "03au00ab_20575_00000.wu");
-    $work->install($project);
-    $project->http_password("admin","mypass");
-
-    $project->start_servers();
-?>
diff --git a/test/small_input b/test/small_input
deleted file mode 100644
index 323831e..0000000
--- a/test/small_input
+++ /dev/null
@@ -1 +0,0 @@
-fjfiwfwnfwieowefnkj
diff --git a/test/ta_correct_atc b/test/ta_correct_atc
deleted file mode 100644
index d2d2b12..0000000
--- a/test/ta_correct_atc
+++ /dev/null
@@ -1,2 +0,0 @@
-<percent_done>0.000000</percent_done>
-<cpu_time_at_checkpoint>5.000000</cpu_time_at_checkpoint>
diff --git a/test/ta_correct_f b/test/ta_correct_f
deleted file mode 100644
index 678cd69..0000000
--- a/test/ta_correct_f
+++ /dev/null
@@ -1,2 +0,0 @@
-blah 17 34.500000
-foo
diff --git a/test/test.inc b/test/test.inc
index 46ee665..ad8a36d 100644
--- a/test/test.inc
+++ b/test/test.inc
@@ -348,9 +348,9 @@ class Project {
     function mkdir($dir, $chmod=0)
     {
         $d = "$this->project_dir/$dir";
-        mkdir($d,0777);
+        mkdir($d,0775);
         if ($chmod) {
-            chmod($d, 0777);
+            chmod($d, 0775);
         }
     }
 
diff --git a/test/test_1sec.php b/test/test_1sec.php
deleted file mode 100644
index 4a34525..0000000
--- a/test/test_1sec.php
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_1sec.php 1383 2003-06-11 23:09:11Z quarl $
-
-    // This tests whether the client handles multiple projects,
-    // and whether CPU time is divided correctly between projects
-    // The client should do work for project 2 5 times faster
-    // than for project 1
-
-    include_once("test.inc");
-
-    test_msg("multiple projects with resource share");
-
-    $project1 = new Project;
-    $project2 = new Project;
-    $user = new User();
-    $host = new Host($user);
-
-    $project1->add_core_and_version();
-    $project1->add_app_and_version("upper_case");
-    $project2->add_core_and_version();
-    $project2->add_app_and_version("upper_case");
-
-    $work = new Work();
-    $work->wu_template = "uc_wu";
-    $work->result_template = "uc_result";
-    $work->redundancy = 5;
-    $work->delay_bound = 60;
-    array_push($work->input_files, "input");
-
-    $project1->resource_share = 1;
-    $project1->shmem_key = "0x12344321";
-    $project1->short_name = "Project1";
-    $project1->long_name = "Project1";
-    $project1->add_user($user);
-    $project1->install();      // must install projects before adding to hosts
-    $project1->install_feeder();
-
-    $project2->resource_share = 5;
-    $project2->shmem_key = "0x12345678";
-    $project2->short_name = "Project2";
-    $project2->long_name = "Project2";
-    $project2->add_user($user);
-    $project2->install();      // must install projects before adding to hosts
-    $project2->install_feeder();
-
-    $host->add_user($user,$project1);
-    $host->add_user($user,$project2);
-    $host->install();
-
-    $work->install($project1);
-    $work->install($project2);
-
-    $project1->start_servers();
-    $project2->start_servers();
-    $host->run("-exit_when_idle -skip_cpu_benchmarks");
-    $project1->stop(1);
-    $project2->stop();
-
-    $result->server_state = RESULT_SERVER_STATE_OVER;
-    $project1->check_results(5, $result);
-    $project1->compare_file("uc_wu_0_0", "uc_correct_output");
-    $project1->compare_file("uc_wu_1_0", "uc_correct_output");
-    $project1->compare_file("uc_wu_2_0", "uc_correct_output");
-    $project1->compare_file("uc_wu_3_0", "uc_correct_output");
-    $project1->compare_file("uc_wu_4_0", "uc_correct_output");
-    $project2->check_results(5, $result);
-    $project2->compare_file("uc_wu_0_0", "uc_correct_output");
-    $project2->compare_file("uc_wu_1_0", "uc_correct_output");
-    $project2->compare_file("uc_wu_2_0", "uc_correct_output");
-    $project2->compare_file("uc_wu_3_0", "uc_correct_output");
-    $project2->compare_file("uc_wu_4_0", "uc_correct_output");
-
-    test_done();
-} ?>
diff --git a/test/test_1sec.py b/test/test_1sec.py
deleted file mode 100755
index 57b4928..0000000
--- a/test/test_1sec.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-
-## $Id: test_1sec.py 1734 2003-07-18 21:43:12Z quarl $
-
-# This tests whether the client handles multiple projects, and whether CPU
-# time is divided correctly between projects The client should do work for
-# project 2 5 times faster than for project 1
-
-from test_uc import *
-
-if __name__ == '__main__':
-    test_msg("multiple projects with resource share");
-    # create two projects with the same host/user
-    host = Host()
-    user = UserUC()
-    for i in range(2):
-        ProjectUC(users=[user], hosts=[host], redundancy=5,
-                  short_name="test_1sec_%d"%i, resource_share=[1, 5][i])
-    run_check_all()
diff --git a/test/test_abort.php b/test/test_abort.php
deleted file mode 100644
index 7b12d8e..0000000
--- a/test/test_abort.php
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // This tests whether the result abort mechanism is working
-
-    include_once("test.inc");
-
-    test_msg("result abort mechanism (disk space limit)");
-
-    $project = new Project;
-    $project->add_app_and_version("upper_case");
-
-    $user = new User();
-
-    $project->add_user($user);
-    $project->install();      // must install projects before adding to hosts
-    $project->install_feeder();
-
-    $host = new Host();
-    $host->add_user($user, $project);
-    $host->install();
-
-    $work = new Work();
-    $work->wu_template = "uc_wu";
-    $work->result_template = "abort_result";
-    $work->redundancy = 2;
-    array_push($work->input_files, "input");
-    $work->install($project);
-
-    $project->start_servers();
-    $host->run("-exit_when_idle -skip_cpu_benchmarks -sched_retry_delay_min 1 >& /dev/null");
-
-    $project->validate(2);
-    $result->server_state = RESULT_SERVER_STATE_OVER;
-    $project->check_results(2, $result);
-
-    $project->assimilate();
-    $project->file_delete();
-
-    $project->stop();
-
-    test_done();
-} ?>
diff --git a/test/test_abort.py b/test/test_abort.py
deleted file mode 100755
index 7a192f0..0000000
--- a/test/test_abort.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-
-## $Id: test_abort.py 2114 2003-08-15 20:27:21Z quarl $
-
-# Makes sure that the client aborts when the output file size limit is
-# exceeded, and that the server knows it.
-
-from test_uc import *
-
-class WorkAbort(WorkUC):
-    def __init__(self):
-        WorkUC.__init__(self)
-        self.result_template = "abort_result"
-
-class ResultAbort(ResultUCError):
-    def __init__(self):
-        ResultUCError.__init__(self)
-        self.stderr_out.append('<message>Output file exceeded size limit')
-
-class ProjectAbort(ProjectUC):
-    def __init__(self):
-        ProjectUC.__init__(self, short_name='test_abort', works=[WorkAbort()])
-    def check(self):
-        self.check_client_error(ResultAbort())
-
-if __name__ == '__main__':
-    test_msg("result abort mechanism (disk space limit)")
-    ProjectAbort()
-    run_check_all()
diff --git a/test/test_api.php b/test/test_api.php
deleted file mode 100644
index a897237..0000000
--- a/test/test_api.php
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /usr/local/bin/php
-<?php
-    include_once("init.inc");
-
-    clean_api();
-    run_api_test();
-    compare_files("foobar", "ta_correct_f");
-    clean_api();
-?>
-
diff --git a/test/test_backend.php b/test/test_backend.php
deleted file mode 100644
index 9d9f37d..0000000
--- a/test/test_backend.php
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_backend.php 1412 2003-06-11 23:47:36Z quarl $
-
-    // End to end test.  Tests make_work, feeder, scheduling server, client,
-    // file_upload_handler, validator, assimilator, timeout_check, and
-    // file_deleter on a large batch of workunits.  Confirms that credit
-    // is correctly granted and that unneeded files are deleted
-
-    include_once("test.inc");
-
-    test_msg("backend");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host($user);
-    $app = new App("upper_case");
-    $app_version = new App_Version($app);
-
-    $work = new Work($app);
-    $work->wu_template = "uc_wu";
-    $work->result_template = "uc_result";
-    $work->redundancy = 5;
-    $work->delay_bound = 70;
-    array_push($work->input_files, "input");
-
-    $project->add_user($user);
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-    $project->install();      // must install projects before adding to hosts
-    $project->install_make_work($work, 499, 5);
-
-    $host->log_flags = "log_flags.xml";
-    $host->add_user($user,$project);
-    $host->install();
-
-    $work->install($project);
-
-    $project->start_servers();
-
-    // Start by generating a batch of 500 results
-    $n = 0;
-    while($n < 500 ) {
-        $n = $project->num_wus_left();
-        verbose_echo(1, "Generating results [$n/500]");
-        sleep(1);
-    }
-    verbose_echo(1, "Generating results... 500 done");
-
-    // Stop the project, deinstall make_work, and install the normal backend components
-    $project->stop();
-    $project->deinstall_make_work();
-    $project->install_assimilator($app);
-    $project->install_file_delete();
-    $project->install_validate($app, 5);
-    $project->install_feeder();
-    $project->install_timeout_check($app, 5, 5, 0);
-
-    while (($pid=exec("pgrep -n make_work")) != null) sleep(1);
-
-    // Restart the server
-    $project->restart();
-    $project->start_servers();
-
-    // Run the client until there's no more work
-    $host->run("-exit_when_idle -skip_cpu_benchmarks");
-
-    // Give the server 30 seconds to finish assimilating/deleting
-    sleep(30);
-
-    // *** DO CHECKS HERE
-    $result->server_state = RESULT_SERVER_STATE_OVER;
-    $result->exit_status = 0;
-    $project->check_results(500, $result);
-
-    // Stop the server
-    $project->stop();
-
-    test_done();
-} ?>
diff --git a/test/test_concat.php b/test/test_concat.php
deleted file mode 100644
index dd7a53e..0000000
--- a/test/test_concat.php
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_concat.php 1383 2003-06-11 23:09:11Z quarl $
-    // tests whether command-line arg passing works
-
-    include_once("test.inc");
-
-    test_msg("standard concat application");
-
-    $project = new Project;
-    $project->add_core_and_version();
-    $project->add_app_and_version("concat");
-
-    $user = new User();
-    $host = new Host($user);
-
-    $project->add_user($user);
-    $project->install();      // must install projects before adding to hosts
-    $project->install_feeder();
-
-    $host->add_user($user,$project);
-    $host->install();
-
-    $work = new Work($app);
-    $work->wu_template = "concat_wu";
-    $work->result_template = "concat_result";
-    $work->redundancy = 2;
-    array_push($work->input_files, "input");
-    array_push($work->input_files, "input");
-    $work->install($project);
-
-    $project->start_servers();
-    $host->run("-exit_when_idle -skip_cpu_benchmarks");
-    $project->stop();
-
-    $result->server_state = RESULT_SERVER_STATE_OVER;
-    $project->check_results(2, $result);
-    $project->compare_file("concat_wu_0_0", "concat_correct_output");
-    $project->compare_file("concat_wu_1_0", "concat_correct_output");
-
-    test_done();
-} ?>
diff --git a/test/test_concat.py b/test/test_concat.py
deleted file mode 100755
index 18d674e..0000000
--- a/test/test_concat.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-
-## $Id: test_concat.py 2144 2003-08-18 23:51:46Z quarl $
-
-# tests whether command-line arg passing works
-
-from testbase import *
-
-class WorkConcat(Work):
-    def __init__(self, redundancy, **kwargs):
-        Work.__init__(self, redundancy=redundancy)
-        self.wu_template = "concat_wu"
-        self.result_template = "concat_result"
-        self.input_files = ['input']*2
-        self.__dict__.update(kwargs)
-
-class ProjectConcat(TestProject):
-    def __init__(self, works=None, users=None, hosts=None):
-        (num_wu, redundancy) = get_redundancy_args()
-        TestProject.__init__(self,
-                             appname = 'concat',
-                             num_wu=num_wu, redundancy=redundancy,
-                             expected_result = Result(),
-                             works = works or [WorkConcat(redundancy=redundancy)],
-                             users = users,
-                             hosts = hosts)
-
-    # def check(self):
-    #     self.sched_run('validate_test')
-    #     result = {}
-    #     result['server_state'] = RESULT_SERVER_STATE_OVER
-    #     self.check_results(result)
-    #     self.check_files_match("upload/concat_wu_%d_0", "concat_correct_output", count=self.redundancy)
-    #     self.sched_run('assimilator')
-    #     self.sched_run('file_deleter')
-    #     self.check_deleted("download/input")
-    #     self.check_deleted("upload/concat_wu_%d_0", count=self.redundancy)
-
-    # def run(self):
-    #     self.install()
-    #     self.sched_install('feeder')
-    #     self.start_servers()
-
-if __name__ == '__main__':
-    test_msg("standard concat application");
-    ProjectConcat()
-    run_check_all()
diff --git a/test/test_download_backoff.php b/test/test_download_backoff.php
deleted file mode 100644
index e9d205e..0000000
--- a/test/test_download_backoff.php
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /usr/local/bin/php
-<?php
-// Tests the exponential backoff mechanism on the client for failed downloads
-// This test is not automated. It has to be run, and then client.out (in the host directory) must be looked at to examine wether everything is working correctly.    
-    include_once("test.inc");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host($user);
-
-    $app = new App("upper_case");
-    $app_version = new App_Version($app);
-
-    $project->add_user($user);
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-
-    $project->install();      // must install projects before adding to hosts
-    $project->install_feeder();
-
-    $host->log_flags = "log_flags.xml";
-    $host->add_user($user, $project);
-    $host->install();
-
-    echo "adding work\n";
-
-    $work = new Work($app);
-    $work->wu_template = "uc_wu";
-    $work->result_template = "uc_result";
-    $work->redundancy = 2;
-    array_push($work->input_files, "input");
-    $work->install($project);
-
-    //delete the download_dir immediately 
-    $project->delete_downloaddir();
-
-    $project->start_servers();
-    $pid = $host->run_asynch("-exit_when_idle");
-    echo "sleeping 100 secs\n";
-    sleep(100);
-    $project->reinstall_downloaddir(null);
-    $status = 0;
-    //wait until the host has stopped running
-    pcntl_waitpid($pid, $status, 0);
-    $project->stop();
-
-    $result->server_state = RESULT_SERVER_STATE_OVER;
-    $result->stderr_out = "APP: upper_case: starting, argc 1";
-    $result->exit_status = 0;
-    $project->check_results(2, $result);
-    $project->compare_file("uc_wu_0_0", "uc_correct_output");
-    $project->compare_file("uc_wu_1_0", "uc_correct_output");
-?>
diff --git a/test/test_exit.py b/test/test_exit.py
deleted file mode 100755
index e117a69..0000000
--- a/test/test_exit.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-
-## $Id: test_exit.py 2114 2003-08-15 20:27:21Z quarl $
-
-# Make sure server hears that client exited with nonzero status.
-
-from test_uc import *
-
-class WorkExit(WorkUC):
-    def __init__(self):
-        WorkUC.__init__(self)
-        self.wu_template = "uc_exit_wu"
-
-class ResultExit(ResultUCError):
-    def __init__(self):
-        ResultUCError.__init__(self)
-        self.stderr_out.append('<message>process exited with a non-zero exit code')
-
-class ProjectExit(ProjectUC):
-    def __init__(self):
-        ProjectUC.__init__(self, short_name='test_exit', works=[WorkExit()])
-    def check(self):
-        self.check_client_error(ResultExit())
-
-if __name__ == '__main__':
-    test_msg("application exit report mechanism")
-    ProjectExit()
-    run_check_all()
diff --git a/test/test_limit.php b/test/test_limit.php
deleted file mode 100644
index 9160ee3..0000000
--- a/test/test_limit.php
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /usr/local/bin/php
-<?php
-    // This tests whether the most basic mechanisms are working
-    // Also whether stderr output is reported correctly
-    // Also tests if water levels are working correctly
-
-    include_once("test.inc");
-
-    $retval = 0;
-
-    $project = new Project;
-
-    $app = new App("upper_case");
-    $app_version = new App_Version($app);
-
-    // the following is optional (makes client web download possible)
-    $core_app = new App("core client");
-    $core_app_version = new App_Version($core_app);
-    $project->add_app($core_app);
-    $project->add_app_version($core_app_version);
-
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-
-    $user = new User();
-    $user->project_prefs = "<project_specific>\nfoobar\n</project_specific>\n";
-    $user->global_prefs = "<venue name=\"home\">\n".
-    "<work_buf_min_days>0</work_buf_min_days>\n".
-    "<work_buf_max_days>2</work_buf_max_days>\n".
-    "<run_on_batteries/>\n".
-    "<max_bytes_sec_down>400000</max_bytes_sec_down>\n".
-    "</venue>\n";
-
-    $project->add_user($user);
-    $project->install();      // must install projects before adding to hosts
-    $project->install_feeder();
-
-    $host = new Host();
-    $host->log_flags = "log_flags.xml";
-    $host->add_user($user, $project);
-    $host->install();
-
-    echo "adding work\n";
-
-    $work = new Work($app);
-    $work->wu_template = "ucs_wu";
-    $work->result_template = "uc_result";
-    $work->redundancy = 1;
-    $work->delay_bound = 2;
-    // Say that 1 WU takes 1 day on a ref comp
-    $work->rsc_fpops = 86400*1e9/2;
-    $work->rsc_iops = 86400*1e9/2;
-    $work->rsc_memory = 1024*1024;
-    $work->rsc_disk = 1;
-    array_push($work->input_files, "input");
-    $work->install($project);
-
-    $project->start_servers();
-    sleep(1);       // make sure feeder has a chance to run
-    $host->run("-exit_when_idle -skip_cpu_benchmarks");
-
-    $result->server_state = RESULT_SERVER_STATE_OVER;
-    $result->stderr_out = "APP: upper_case: starting, argc 1";
-    $result->exit_status = 0;
-    $project->check_results(1, $result);
-
-    $project->stop();
-
-    exit($retval);
-?>
diff --git a/test/test_loop.php b/test/test_loop.php
deleted file mode 100644
index 02e9c34..0000000
--- a/test/test_loop.php
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /usr/local/bin/php
-<?php
-    // This tests whether the most basic mechanisms are working
-    // Also whether stderr output is reported correctly
-
-    include_once("test.inc");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host($user);
-    $app = new App("upper_case");
-    $app_version = new App_Version($app);
-
-    $project->add_user($user);
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-    $project->start_feeder = true;
-    $project->start_make_work = true;
-    $project->start_validate = true;
-    $project->start_file_delete = true;
-    $project->start_assimilator = true;
-    $project->install();      // must install projects before adding to hosts
-
-    $host->log_flags = "log_flags.xml";
-    $host->add_user($user,$project);
-    $host->install();
-
-    echo "adding work\n";
-
-    $work = new Work($app);
-    $work->wu_template = "uc_wu";
-    $work->result_template = "uc_result";
-    $work->redundancy = 3;
-  
-    array_push($work->input_files, "input");
-    $work->install($project);
-
-    $project->start_feeder();
-    $project->start_make_work($work);
-    $project->start_validate($app, 3);
-    $project->start_file_delete();
-    $project->start_assimilator($app);
-    $project->start_stripchart();
-    //$project->start_servers();
-    $host->run();
-    $project->stop();
-?>
diff --git a/test/test_masterurl_failure.php b/test/test_masterurl_failure.php
deleted file mode 100644
index e504bbd..0000000
--- a/test/test_masterurl_failure.php
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_masterurl_failure.php 1510 2003-06-17 01:36:47Z quarl $
-
-    $use_proxy_html = 1;
-
-    include_once("test_uc.inc");
-    test_msg("master url failure");
-
-    $project = new ProjectUC;
-
-    start_proxy('exit 1 if $nconnections < 4; if_done_kill(); if_done_ping();');
-
-    // TODO: verify it took ??? seconds
-
-    // TODO: time out after ??? seconds and fail this test
-
-    $project->start_servers_and_host();
-    $project->validate_all_and_stop();
-
-    test_done();
-} ?>
diff --git a/test/test_masterurl_failure.py b/test/test_masterurl_failure.py
deleted file mode 100755
index 8eac987..0000000
--- a/test/test_masterurl_failure.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-
-## $Id: test_masterurl_failure.py 1655 2003-07-10 00:35:51Z quarl $
-
-from test_uc import *
-
-if __name__ == '__main__':
-    test_msg("scheduler exponential backoff (master url failure)")
-    Proxy('close_connection if $nconnections < 2; ', html=1)
-    # Proxy(('print "hi nc=$nconnections start=$start nchars=$nchars url=$url\n"; ' +
-    #        'close_connection if $nconnections < 2; '),
-    #       html=1)
-    # Proxy(( 'print "hi nc=$nconnections start=$start nchars=$nchars url=$url\n"; ' +
-    #        ''),
-    #       html=1)
-    ProjectUC(short_name='test_masterurl_failure')
-    run_check_all()
-
-    ## TODO: verify it took ??? seconds
diff --git a/test/test_mdownload_backoff.php b/test/test_mdownload_backoff.php
deleted file mode 100644
index 33ca7f0..0000000
--- a/test/test_mdownload_backoff.php
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /usr/local/bin/php
-<?php
-//This tests the exponential backoff mechanism on the client in case of downloadURLs going down. in this case multiple URLS stay up while one goes down. 
-//This test is not automated. It has to be run, and then client.out (in the host directory) must be looked at to examine wether everything is working correctly.    
-    include_once("test.inc");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host($user);
-
-    $app = new App("upper_case");
-    $app_version = new App_Version($app);
-
-    // the following is optional (makes client web download possible)
-    $core_app = new App("core client");
-    $core_app_version = new App_Version($core_app);
-    $project->add_app($core_app);
-    $project->add_app_version($core_app_version);
-
-    $project->add_user($user);
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-
-    $project->install();      // must install projects before adding to hosts
-
-    $host->log_flags = "log_flags.xml";
-    $host->add_project($project);
-    $host->install();
-
-    echo "adding work\n";
-
-    $work = new Work($app);
-    $work->wu_template = "uc_multiple_download_wu";
-    $work->result_template = "uc_result";
-    $work->redundancy = 2;
-    $work->delay_bound = 10;
-    array_push($work->input_files, "input");
-    $work->install($project);
-
-    $project->start_feeder();
-    //delete the download_dir0 immediately 
-    $project->delete_downloaddir(null, 0);
-    $project->delete_downloaddir(null, 1);
-    $project->delete_downloaddir(null, 2);
-  
-    $pid = $host->run_asynch("-exit_when_idle");
-    $status = 0;
-    //wait until the host has stopped running
-    pcntl_waitpid($pid,$status,0);
-    $project->stop();
-
-    $result->server_state = RESULT_SERVER_STATE_OVER;
-    $result->stderr_out = "APP: upper_case: starting, argc 1";
-    $result->exit_status = 0;
-    $project->check_results(2, $result);
-    $project->compare_file("uc_multiple_download_wu_0_0", "uc_correct_output");
-    $project->compare_file("uc_multiple_download_wu_1_0", "uc_correct_output");
-?>
diff --git a/test/test_pers.php b/test/test_pers.php
deleted file mode 100644
index 992ba91..0000000
--- a/test/test_pers.php
+++ /dev/null
@@ -1,149 +0,0 @@
-#! /usr/local/bin/php
-<?php
-
-//This tests the persistent file transfers for download and upload. It interrupts them in the middle and makes sure that the filesize never decreases along interrupted transfers.
-
-include_once("test.inc");
-set_time_limit(10000000000);
-
-$project = new Project;
-$user = new User();
-$host = new Host($user);
-$app = new App("upper_case");
-$app_version = new App_Version($app);
-
-$project->add_user($user);
-$project->add_app($app);
-$project->add_app_version($app_version);
-$project->install();      // must install projects before adding to hosts
-
-$host->log_flags = "log_flags.xml";
-$host->add_project($project);
-$host->install();
-
-echo "adding work\n";
-
-$work = new Work($app);
-$work->wu_template = "uc_wu";
-$work->result_template = "uc_result";
-$work->redundancy = 2;
-array_push($work->input_files, "input");
-$work->install($project);
-$project->start_feeder();
-
-//get the path for checking download
-$source_dir = SRC_DIR;
-$enc_url = strtr($project->master_url, "/", "_");
-$enc_url = substr($enc_url,7,strlen($enc_url));
-$path= "$host->host_dir/projects/$enc_url/upper_case";
-print "\n the path for checking download is :".$path;
-
-$pid = $host->run_asynch("-exit_when_idle -limit_transfer_rate 2048");
-$client_pid = $host->get_new_client_pid(null);
-assert($pid != -1);
-$first = 0;
-$file_size = 0;
-//Check download
-
-while(1)
-{
-
-  if(file_exists($path))
-    {
-      $temp = filesize($path);
-      if($temp < $file_size)
-	{
-	  echo "\nfilesize dropped, problem downloading\n";
-	  echo "temp is $temp, file_size is  $file_size\n";
-      	  break;
-	}
-
-      else if($temp > $file_size)
-	{
-	  print "\n filesize increased, it is : ".$temp;
-	  if(($temp  > 40000) && ($first ==0))
-	    {
-	      print "\n stopping and rerunning the client";
-	      echo "\n now killing client_pid : $client_pid";
-	      $host->kill($client_pid, null);
-	      $host->run_asynch("-exit_when_idle -limit_transfer_rate 2048");
-	      $client_pid = $host->get_new_client_pid($client_pid);
-              echo "\nNow executing : $client_pid";
-	      $first++;
-	    }
-
-	}
-
-      $file_size = $temp;
-
-      if($file_size == filesize("$source_dir/apps/upper_case"))
-	{
-	  echo "\n download test succeeded";
-	  break;
-	}
-
-    }
-}
-
-
-$file_size = 0;
-$path= "$project->project_dir/upload/uc_wu_0_0";
-$first =0;
-print "\nupload path is: ".$path;
-echo "\n Now checking upload";
-
-
-while(1)
-{
-  //  echo "\n checking upload";
-
-
-  if(file_exists($path))
-    {
-
-      //  echo "\nfile exists is download";
-      $temp = filesize($path);
-      if($temp < $file_size)
-	{
-	  echo "\nfilesize dropped,  problem uploading\n";
-	  echo "temp is $temp, file_size if $file_size\n";
-	  break;
-	}
-      if($temp > $file_size)
-	{
-	  print "\n filesize increased, it is : ".$temp;
-	  if(($temp  > 20000) && ($first ==0))
-	    {
-	      print "\n stopping and rerunning the client";
-	      print "\nkilling $client_pid";
-	      $host->kill($client_pid,null);
-	      $host->run_asynch("-exit_when_idle -limit_transfer_rate 2048");
-	      $client_pid = $host->get_new_client_pid($client_pid);
-	      echo "\nnew client_pid is $client_pid";
-	      $first++;
-	    }
-
-	}
-      $file_size = $temp;
-      if($file_size == filesize("$source_dir/test/uc_correct_output"))
-	{
-	  print "\n all of the files has been uploaded";
-	  print "\n stopping and rerunning the client";
-	  $host->kill($client_pid, null);
-	  $host->run("-exit_when_idle");
-	  break;
-	}
-    }
-}
-
-
-$project->stop();
-
-$result->server_state = RESULT_SERVER_STATE_OVER;
-$result->stderr_out = "APP: upper_case: starting, argc 1";
-$result->exit_status = 0;
-$project->check_results(2, $result);
-$project->compare_file("uc_wu_0_0", "uc_correct_output");
-$project->compare_file("uc_wu_1_0", "uc_correct_output");
-
-?>
diff --git a/test/test_prefs.php b/test/test_prefs.php
deleted file mode 100644
index 5583318..0000000
--- a/test/test_prefs.php
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /usr/local/bin/php
-<?php
-    // test global preferences
-
-    include_once("test.inc");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host($user);
-    $app = new App("uc_slow");
-    $app_version = new App_Version($app);
-
-    $project->add_user($user);
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-    $project->install();      // must install projects before adding to hosts
-
-    $host->log_flags = "log_flags.xml";
-    $host->add_project($project);
-    $host->global_prefs = "laptop_prefs";
-    $host->install();
-
-    echo "adding work\n";
-
-    $work = new Work($app);
-    $work->wu_template = "ucs_wu";
-    $work->result_template = "uc_result";
-    array_push($work->input_files, "small_input");
-    $work->install($project);
-
-    $project->start_feeder();
-
-    echo "Now run the client manually; start and stop it a few times.\n";
-
-    //$project->check_results(1, $result);
-    //$project->compare_file("ucs_wu_0_0", "uc_small_correct_output");
-?>
diff --git a/test/test_rsc.php b/test/test_rsc.php
deleted file mode 100644
index 8f743a7..0000000
--- a/test/test_rsc.php
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_rsc.php 1383 2003-06-11 23:09:11Z quarl $
-
-    // test whether the scheduling server filters out work units too big for
-    // client
-
-    include_once("test.inc");
-
-    test_msg("resource filtering for large work units");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host($user);
-    $project->add_app_and_version("upper_case");
-
-    $project->add_user($user);
-    $project->install();      // must install projects before adding to hosts
-    $project->install_feeder();
-
-    $host->add_user($user,$project);
-    $host->install();
-
-    $work = new Work($app);
-    $work->wu_template = "uc_wu";
-    $work->result_template = "uc_result";
-    $work->redundancy = 1;
-    $work->rsc_disk = 1000000000000;    // 1 TB
-    $work->rsc_fpops = 0;
-    array_push($work->input_files, "input");
-    $work->install($project);
-
-    $project->start_servers();
-    $host->run("-exit_when_idle -skip_cpu_benchmarks");
-    $project->stop();
-
-    $result->server_state = RESULT_SERVER_STATE_UNSENT;
-    $project->check_results(1, $result);
-
-    test_done();
-} ?>
diff --git a/test/test_rsc.py b/test/test_rsc.py
deleted file mode 100755
index bbf1c65..0000000
--- a/test/test_rsc.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-
-## $Id: test_rsc.py 2243 2003-09-04 00:41:51Z davea $
-
-# Test whether the scheduling server filters out work units too big for client
-
-from test_uc import *
-
-class WorkTooBig(WorkUC):
-    def __init__(self):
-        WorkUC.__init__(self)
-        self.rsc_disk_bound = 1000000000000   # 1 TB
-
-class ResultUnsent:
-    def __init__(self):
-        self.server_state = RESULT_SERVER_STATE_UNSENT
-
-class ProjectRsc(ProjectUC):
-    def __init__(self):
-        ProjectUC.__init__(self, short_name='test_rsc', works=[WorkTooBig()])
-    def check(self):
-        self.check_results(ResultUnsent())
-
-if __name__ == '__main__':
-    test_msg("resource filtering for large work units")
-    ProjectRsc()
-    run_check_all()
diff --git a/test/test_sanity.php b/test/test_sanity.php
deleted file mode 100644
index 8f6a927..0000000
--- a/test/test_sanity.php
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_sanity.php 1357 2003-06-11 22:11:32Z quarl $
-
-    // tests makes sure that testing framework is sane
-
-    include_once("test.inc");
-
-    // make sure applications executable
-
-    check_core_client_executable();
-    check_app_executable("upper_case");
-    check_app_executable("concat");
-    check_app_executable("1sec");
-
-    if (!is_dir(KEY_DIR)) {
-        error("Keydir doesn't exist: ".KEY_DIR);
-    }
-    if (!is_dir(PROJECTS_DIR)) {
-        error("Projects dir doesn't exist: ".PROJECTS_DIR);
-    }
-    if (!is_dir(HOSTS_DIR)) {
-        error("Hosts dir doesn't exist: ".HOSTS_DIR);
-    }
-    if (!is_dir(CGI_DIR)) {
-        error("CGI dir doesn't exist: ".CGI_DIR);
-    }
-    if (!is_dir(HTML_DIR)) {
-        error("HTML dir doesn't exist: ".HTML_DIR);
-    }
-    if (!fopen(HTML_URL, 'r')) {
-        error("Couldn't open html url: ".HTML_URL);
-    }
-
-    test_done();
-} ?>
diff --git a/test/test_sanity.py b/test/test_sanity.py
deleted file mode 100755
index 01a6704..0000000
--- a/test/test_sanity.py
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/env python
-
-## $Id: test_sanity.py 2246 2003-09-04 05:07:17Z quarl $
-
-from testbase import *
-import urllib, random
-
-# Test makes sure that testing framework is sane:
-#
-# - executables compiled
-# - cgi server works
-# - test proxy works
-# - mysql permissions and command-line client works
-
-def read_url(url, quiet=False):
-    '''return 1 line from url'''
-    verbose_echo(2, "   reading url: "+url)
-    err = ''
-    try:
-        return urllib.URLopener().open(url).readline().strip()
-    except IOError, e:
-        err = e
-    except AttributeError:
-        # Python urllib is buggy if connection is closed (by our proxy
-        # intentionally) right after opened
-        pass
-    if not quiet:
-        error("couldn't access url: %s %s" % (url, err))
-    else:
-        verbose_echo(2, "couldn't access url: %s %s" % (url, err))
-    return ''
-
-if __name__ == '__main__':
-    test_msg("framework sanity")
-
-    # verbose_echo(1, "Checking executables")
-    # check_core_client_executable()
-    # check_app_executable("upper_case")
-    # check_app_executable("concat")
-    # check_app_executable("1sec")
-
-    verbose_echo(1, "Checking directories")
-    for d in ['projects_dir',
-              'cgi_dir', 'html_dir', 'hosts_dir']:
-        dir = options.__dict__[d]
-        if not os.path.isdir(dir):
-            error("%s doesn't exist: %s" % (d, dir))
-
-    magic = "Foo %x Bar" % random.randint(0,2**16)
-
-    html_path = os.path.join(options.html_dir, 'test_sanity.txt')
-    html_url  = os.path.join(options.html_url, 'test_sanity.txt')
-    html_proxy_url = proxerize(html_url)
-    cgi_path  = os.path.join(options.cgi_dir,  'test_sanity_cgi')
-    cgi_url   = os.path.join(options.cgi_url,  'test_sanity_cgi')
-
-    verbose_echo(1, "Checking webserver setup: non-cgi")
-    print >>open(html_path,'w'), magic
-    if read_url(html_url) != magic:
-        error("couldn't access a file I just wrote: "+html_path+"\n  using url: "+html_url)
-
-    verbose_echo(1, "Checking proxy setup")
-    if read_url(html_proxy_url, quiet=True):
-        error("Another proxy already running")
-    else:
-        proxy = Proxy('')
-        if read_url(html_proxy_url) != magic:
-            error("couldn't access file using proxy url: "+html_proxy_url)
-        else:
-            proxy.stop()
-
-            proxy = Proxy('close_connection if $nconnections < 2')
-            if read_url(html_proxy_url, quiet=True):
-                error("Proxy should have closed connection #1")
-                if read_url(html_proxy_url) != magic:
-                    error("Proxy should have allowed connection #2")
-        proxy.stop()
-
-    os.unlink(html_path)
-
-    verbose_echo(1, "Checking webserver setup: cgi")
-    print >>open(cgi_path,'w'), '''#!/bin/sh
-echo "Content-Type: text/plain"
-echo ""
-echo "%s"
-''' % magic
-    os.chmod(cgi_path, 0755)
-
-    if read_url(cgi_url) != magic:
-        error("couldn't access a cgi file I just wrote: "+cgi_path+"\n  using url: "+cgi_url)
-
-    os.unlink(cgi_path)
-
-
-    database_name = 'boinc_test_sanity_mysql_%s_%d'%(
-        os.environ['USER'], random.randint(0,2**16))
-
-    # create and drop a database
-    verbose_echo(1, "Checking mysql commandline and permissions")
-    shell_call('echo "create database %s" | mysql' % database_name)
-    shell_call('echo "drop database %s" | mysql' % database_name)
diff --git a/test/test_sched_failure.php b/test/test_sched_failure.php
deleted file mode 100644
index bec5b6e..0000000
--- a/test/test_sched_failure.php
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /usr/local/bin/php
-<?php
-//This tests the exponential backoff mechanism on the client in case of scheduling server failures.
-//This test is not automated. It has to be run, and then client.out (in the host directory) must be looked at to examine wether everything is working correctly.    
-    include_once("test.inc");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host($user);
-
-    $app = new App("upper_case");
-    $app_version = new App_Version($app);
-
-    // the following is optional (makes client web download possible)
-    $core_app = new App("core client");
-    $core_app_version = new App_Version($core_app);
-    $project->add_app($core_app);
-    $project->add_app_version($core_app_version);
-
-    $project->add_user($user);
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-
-    $project->install();      // must install projects before adding to hosts
-
-    $host->log_flags = "log_flags.xml";
-    $host->add_project($project);
-    $host->install();
-
-    echo "adding work\n";
-
-    $work = new Work($app);
-    $work->wu_template = "uc_wu";
-    $work->result_template = "uc_result";
-    $work->redundancy = 2;
-    $work->delay_bound = 10;
-    array_push($work->input_files, "input");
-    $work->install($project);
-
-    $project->start_feeder();
-    $project->delete_scheduler();
-    $pid = $host->run_asynch("-exit_when_idle");
-    echo "sleeping for 100 seconds\n";
-    sleep(100);
-    $project->reinstall_scheduler();
-    $status = 0;
-    //wait until the host has stopped running
-    pcntl_waitpid($pid,$status,0);
-    $project->stop();
-
-    $result->server_state = RESULT_SERVER_STATE_OVER;
-    $result->stderr_out = "APP: upper_case: starting, argc 1";
-    $result->exit_status = 0;
-    $project->check_results(2, $result);
-    $project->compare_file("uc_wu_0_0", "uc_correct_output");
-    $project->compare_file("uc_wu_1_0", "uc_correct_output");
-?>
diff --git a/test/test_sched_moved.py b/test/test_sched_moved.py
deleted file mode 100755
index 1ee5530..0000000
--- a/test/test_sched_moved.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-
-## $Id: test_sched_moved.py 1656 2003-07-10 00:59:56Z quarl $
-
-# DOESN"T WORK YET
-
-from test_uc import *
-
-class ProjectSchedMove(ProjectUC):
-    def run(self):
-        self.sched_install('feeder')
-        self.start_servers()
-
-
-if __name__ == '__main__':
-    test_msg("backing off and finding new scheduler URL from master URL")
-    verbose_echo(0, "BEFORE SCHEDULER MOVE")
-    proj = ProjectSchedMove(short_name='test_sched_moved')
-    proj.install()
-    run_check_all()
-
-    verbose_echo(0, "AFTER SCHEDULER MOVE")
-    # TODO: change scheduler url
-    proj.install_project()
-    proj.install_works()
-    run_check_all()
-
diff --git a/test/test_signal.py b/test/test_signal.py
deleted file mode 100755
index 78d7303..0000000
--- a/test/test_signal.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-
-## $Id: test_signal.py 2114 2003-08-15 20:27:21Z quarl $
-
-# Make sure server hears that client died by a signal.
-
-from test_uc import *
-
-class WorkSignal(WorkUC):
-    def __init__(self):
-        WorkUC.__init__(self)
-        self.wu_template = "uc_sig_wu"
-
-class ResultSignal(ResultUCError):
-    def __init__(self):
-        ResultUCError.__init__(self)
-        self.stderr_out.append('SIGHUP: terminal line hangup')
-        self.stderr_out.append('<message>process exited with a non-zero exit code')
-
-class ProjectSignal(ProjectUC):
-    def __init__(self):
-        ProjectUC.__init__(self, short_name='test_signal', works=[WorkSignal()])
-    def check(self):
-        self.check_client_error(ResultSignal())
-
-if __name__ == '__main__':
-    test_msg("application signal report mechanism")
-    ProjectSignal()
-    run_check_all()
diff --git a/test/test_sticky.php b/test/test_sticky.php
deleted file mode 100644
index d945efa..0000000
--- a/test/test_sticky.php
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_sticky.php 1412 2003-06-11 23:47:36Z quarl $
-
-    include_once("test.inc");
-
-    test_msg("sticky file mechanism");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host($user);
-
-    $project->add_user($user);
-    $project->add_app_and_version("upper_case");
-    $project->install();      // must install projects before adding to hosts
-    $project->install_feeder();
-
-    $host->add_user($user,$project);
-    $host->install();
-
-    $work = new Work($app);
-    $work->wu_template = "uc_wu_sticky";
-    $work->result_template = "uc_result_sticky";
-    $work->redundancy = 2;
-    array_push($work->input_files, "input");
-    $work->install($project);
-
-    $project->start_servers();
-    $host->run("-exit_when_idle -skip_cpu_benchmarks");
-    $project->stop();
-
-    $result->server_state = RESULT_SERVER_STATE_OVER;
-    $project->check_results(2, $result);
-    $project->compare_file("uc_wu_sticky_0_0", "uc_correct_output");
-    $project->compare_file("uc_wu_sticky_1_0", "uc_correct_output");
-
-    // make sure result files are still there
-    $host->check_file_present($project, "uc_wu_sticky_0_0");
-    $host->check_file_present($project, "uc_wu_sticky_1_0");
-
-    test_done();
-} ?>
diff --git a/test/test_suite.php b/test/test_suite.php
deleted file mode 100644
index 41f026c..0000000
--- a/test/test_suite.php
+++ /dev/null
@@ -1,28 +0,0 @@
-#! /usr/local/bin/php
-<?php
-    //Run the comprehensive suite of tests
-    //
-
-    passthru("./test_1sec.php", $retval);
-    if($retval) printf("./test_1sec.php did not run correctly\n");
-    sleep(3);
-
-    PassThru("./test_backend.php", $retval);
-    if($retval) printf("./test_backend.php did not run correctly\n");
-    sleep(3);
-
-    PassThru("./test_concat.php", $retval);
-    if($retval) printf("./test_concat.php did not run correctly\n");
-    sleep(3);
-
-    PassThru("./test_rsc.php", $retval);
-    if($retval) printf("./test_rsc.php did not run correctly\n");
-    sleep(3);
-
-    PassThru("./test_sticky.php", $retval);
-    if($retval) printf("./test_sticky.php did not run correctly\n");
-    sleep(3);
-
-    passthru("./test_uc.php", $retval);
-    if($retval) printf("./test_uc.php did not run correctly\n");
-?>
diff --git a/test/test_time.php b/test/test_time.php
deleted file mode 100644
index 83146e3..0000000
--- a/test/test_time.php
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /usr/local/bin/php
-<?php
-    // test whether CPU time is computed correctly across restarts
-
-    include_once("test.inc");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host($user);
-    $app = new App("uc_cpu");
-    $app_version = new App_Version($app);
-
-    $project->add_user($user);
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-    $project->install();      // must install projects before adding to hosts
-
-    $host->log_flags = "log_flags.xml";
-    $host->add_project($project);
-    $host->install();
-
-    echo "adding work\n";
-
-    $work = new Work($app);
-    $work->wu_template = "uccpu_wu";
-    $work->result_template = "uccpu_result";
-    $work->redundancy = 1;
-    array_push($work->input_files, "small_input");
-    $work->install($project);
-
-    $project->start_feeder();
-    $app_time = 0;
-    $host->run("-exit_after_app_start 400");
-    $app_time += $host->read_cpu_time_file("app.time");
-    $host->run("-exit_when_idle");
-    $project->stop();
-
-    $result->server_state = RESULT_SERVER_STATE_OVER;
-    $project->check_results(1, $result);
-    $project->compare_file("uccpu_wu_0_0", "uc_small_correct_output");
-    $client_time = $host->read_cpu_time_file("client_time");
-    $x = mysql_query("select cpu_time from result where name='uccpu_wu_0'");
-    $result = mysql_fetch_object($x);
-    $db_time = $result->cpu_time;
-
-    if (abs($app_time-$client_time) > .01) echo "time mismatch\n";
-    if (abs($app_time-$db_time) > .01) echo "time mismatch\n";
-
-?>
diff --git a/test/test_uc.inc b/test/test_uc.inc
deleted file mode 100644
index 2b354a6..0000000
--- a/test/test_uc.inc
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php {
-    // $Id: test_uc.inc 1510 2003-06-17 01:36:47Z quarl $
-
-    include_once("test.inc");
-
-    class ProjectUC extends Project
-    {
-        var $work;
-        var $host;
-        var $user;
-
-        function ProjectUC() {
-            $this->Project();
-            $this->add_core_and_version();
-            $this->add_app_and_version("upper_case");
-
-            $this->user = new User();
-            $this->user->project_prefs = "<project_specific>\nfoobar\n</project_specific>\n";
-            $this->user->global_prefs = "<venue name=\"home\">\n".
-                "<work_buf_min_days>0</work_buf_min_days>\n".
-                "<work_buf_max_days>2</work_buf_max_days>\n".
-                "<disk_interval>1</disk_interval>\n".
-                "<run_on_batteries/>\n".
-                "<max_bytes_sec_down>400000</max_bytes_sec_down>\n".
-                "</venue>\n";
-
-            $this->add_user($this->user);
-            $this->install();      // must install projects before adding to hosts
-            $this->install_feeder();
-
-            $this->host = new Host();
-            $this->host->add_user($this->user, $this);
-            $this->host->install();
-
-            $this->work = new Work();
-            $this->work->wu_template = "uc_wu";
-            $this->work->result_template = "uc_result";
-            $this->work->redundancy = 2;
-            $this->work->delay_bound = 10;
-            // Say that 1 WU takes 1 day on a ref comp
-            $this->work->rsc_fpops = 86400*1e9/2;
-            $this->work->rsc_iops = 86400*1e9/2;
-            $this->work->rsc_disk = 10e8;
-            array_push($this->work->input_files, "input");
-            $this->work->install($this);
-        }
-
-        function start_servers_and_host()
-        {
-            $this->start_servers();
-            $this->host->run("-exit_when_idle -skip_cpu_benchmarks");
-        }
-
-        function validate_all_and_stop()
-        {
-            $this->validate($this->work->redundancy);
-            $result->server_state = RESULT_SERVER_STATE_OVER;
-            $result->stderr_out = "APP: upper_case: starting, argc 1
-APP: upper_case: argv[0] is upper_case
-APP: upper_case ending, wrote ";
-            $result->exit_status = 0;
-            $this->check_results(2, $result);
-            $this->compare_file("uc_wu_0_0", "uc_correct_output");
-            $this->compare_file("uc_wu_1_0", "uc_correct_output");
-
-            $this->assimilate();
-            $this->file_delete();
-
-            $this->check_server_deleted("download/input");
-            $this->check_server_deleted("upload/uc_wu_0_0");
-            $this->check_server_deleted("upload/uc_wu_1_0");
-            $this->stop();
-        }
-    }
-} ?>
diff --git a/test/test_uc.php b/test/test_uc.php
deleted file mode 100644
index f7fc74d..0000000
--- a/test/test_uc.php
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_uc.php 1510 2003-06-17 01:36:47Z quarl $
-
-    // This tests whether the most basic mechanisms are working
-    // Also whether stderr output is reported correctly
-    // Also tests if water levels are working correctly
-
-    include_once("test_uc.inc");
-    test_msg("standard upper_case application");
-
-    $project = new ProjectUC;
-    $project->start_servers_and_host();
-    $project->validate_all_and_stop();
-
-    test_done();
-} ?>
diff --git a/test/test_uc.py b/test/test_uc.py
deleted file mode 100755
index 27e2dcb..0000000
--- a/test/test_uc.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/usr/bin/env python
-
-## $Id: test_uc.py 5506 2005-02-23 19:44:59Z boincadm $
-
-# This tests whether the most basic mechanisms are working
-# Also whether stderr output is reported correctly
-# Also tests if work buffer limits are working correctly
-
-from testbase import *
-
-class UserUC(User):
-    def init(self):
-        self.User.__init__()
-        self.project_prefs = """<project_preferences>
-<project_specific>
-foobar
-</project_specific>
-</project_preferences>
-"""
-        self.global_prefs  = """<global_preferences>
-<venue name=\"home\">
-<work_buf_min_days>0</work_buf_min_days>
-<work_buf_max_days>2</work_buf_max_days>
-<disk_interval>1</disk_interval>
-<run_on_batteries/>
-<max_bytes_sec_down>400000</max_bytes_sec_down>
-</venue>
-</global_preferences>
-"""
-
-class WorkUC(Work):
-    def __init__(self, redundancy, **kwargs):
-        Work.__init__(self, redundancy=redundancy)
-        self.wu_template = "uc_wu_nodelete"
-        self.result_template = "uc_result"
-        self.input_files = ['input']
-        self.__dict__.update(kwargs)
-
-class ResultUC(ExpectedResult):
-    def __init__(self):
-        ExpectedResult.__init__(self)
-        self.stderr_out   = MATCH_REGEXPS([
-        "<stderr_txt>",
-        "APP: upper_case: starting, argc \\d+",
-        "APP: upper_case: argv[[]0[]] is upper_case",
-        "APP: upper_case ending, wrote \\d+ chars"])
-
-class ResultComputeErrorUC(ExpectedResultComputeError):
-    def __init__(self):
-        ExpectedResultComputeError.__init__(self)
-        self.stderr_out   = MATCH_REGEXPS([ """<stderr_txt>
-APP: upper_case: starting, argc \\d+"""])
-
-## TODO: check that uc_wu_%d_0 matches uc_correct_output BEFORE deleted by
-## file deleter!
-
-class ProjectUC(TestProject):
-    def __init__(self,
-                 num_wu=None, redundancy=None,
-                 expect_success=True,
-                 works=None, users=None, hosts=None,
-                 short_name=None, long_name=None,
-                 resource_share=1):
-        (num_wu, redundancy) = get_redundancy_args(num_wu, redundancy)
-        TestProject.__init__(self,
-                             appname = 'upper_case',
-                             num_wu=num_wu, redundancy=redundancy,
-                             expected_result = (expect_success and ResultUC() or ResultComputeErrorUC()),
-                             works = works or [WorkUC(redundancy=redundancy)],
-                             users = users or [UserUC()],
-                             hosts = hosts,
-                             short_name=short_name, long_name=long_name,
-                             resource_share=resource_share
-                             )
-
-if __name__ == '__main__':
-    test_msg("standard upper_case application");
-    ProjectUC()
-    run_check_all()
diff --git a/test/test_uc_slow.php b/test/test_uc_slow.php
deleted file mode 100644
index 3527593..0000000
--- a/test/test_uc_slow.php
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_uc_slow.php 1496 2003-06-16 17:59:38Z eheien $
-
-    include_once("test.inc");
-
-    test_msg("client checkpoint/restart mechanism");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host();
-
-    $project->add_user($user);
-    $project->add_app_and_version("upper_case");
-    $project->install();      // must install projects before adding to hosts
-
-    $host->add_user($user, $project);
-    $host->install();
-
-    $work = new Work();
-    $work->wu_template = "ucs_wu";
-    $work->result_template = "uc_result";
-    array_push($work->input_files, "small_input");
-    $work->install($project);
-
-    $project->install_feeder();
-    $project->start_servers();
-
-    verbose_echo(0, "Now run the client manually; start and stop it a few times");
-    //compare_file("ucs_wu_0_0", "uc_small_correct_output");
-} ?>
diff --git a/test/test_uc_win.php b/test/test_uc_win.php
deleted file mode 100644
index d05e37d..0000000
--- a/test/test_uc_win.php
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /usr/local/bin/php
-<?php
-    // set up a test for the windows client
-    // set BOINC_PLATFORM to "windows_intelx86"
-
-    include_once("test.inc");
-
-    $project = new Project;
-    $user = new User();
-    $host = new Host($user);
-    $app = new App("upper_case");
-    $app_version = new App_Version($app);
-    $platform->name = "windows_intelx86";
-    $platform->user_friendly_name = "Windows";
-    $app_version->platform = $platform;
-    array_push($app_version->exec_names, "upper_case.exe");
-
-    $work = new Work($app);
-    $work->wu_template = "uc_wu";
-    $work->result_template = "uc_result";
-    $work->redundancy = 2;
-    array_push($work->input_files, "input");
-
-    $project->add_user($user);
-    $project->add_app($app);
-    $project->add_app_version($app_version);
-    $project->add_platform($platform);
-    $project->install();
-    $project->install_feeder();
-    $project->install_make_work($work,20,5);
-
-    echo "adding work\n";
-    $work->install($project);
-
-    $project->start_servers();
-
-    echo "Go run the client\n";
-    /*echo "Hit any key to stop the server\n";
-
-    $project->stop();
-
-    $project->check_results(2, $result);
-    $project->compare_file("uc_wu_0_0", "uc_correct_output");
-    $project->compare_file("uc_wu_1_0", "uc_correct_output");
-    */
-?>
diff --git a/test/test_upload_backoff.php b/test/test_upload_backoff.php
deleted file mode 100644
index ed62335..0000000
--- a/test/test_upload_backoff.php
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_upload_backoff.php 1526 2003-06-18 02:59:57Z quarl $
-
-    $use_proxy_cgi = 1;
-
-    include_once("test_uc.inc");
-    test_msg("upload backoff");
-
-    start_proxy('print "#$nconnections url=$url time=$time\n"; exit 1 if ($nconnections < 4); if_done_kill(); if_done_ping();');
-
-    $project = new ProjectUC;
-
-    // $pid = $host->run_asynch("-exit_when_idle");
-
-    $project->start_servers_and_host();
-    $project->validate_all_and_stop();
-
-    test_done();
-} ?>
diff --git a/test/test_upload_resume.php b/test/test_upload_resume.php
deleted file mode 100644
index 3292b8f..0000000
--- a/test/test_upload_resume.php
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/local/bin/php -q
-<?php {
-    // $Id: test_upload_resume.php 1510 2003-06-17 01:36:47Z quarl $
-
-    // This tests whether upload resuming works correctly.
-
-    $use_proxy_cgi = 1;
-
-    include_once("test_uc.inc");
-    test_msg("upload resumes");
-
-    $project = new ProjectUC;
-
-    // TODO
-    // start_proxy('exit 1 if ($nconnections ==1 && $bytes_transferred==ZZZ); if_done_kill(); if_done_ping();');
-
-    $project->start_servers_and_host();
-    $project->validate_all_and_stop();
-
-    test_done();
-} ?>
diff --git a/test/test_water.php b/test/test_water.php
deleted file mode 100644
index 122aa2c..0000000
--- a/test/test_water.php
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /usr/local/bin/php
-<?php
-    //make sure that the scheduler sends the correct number of wu's in test_uc
-
-    PassThru("test_uc.php | grep -c '<scheduler_request>' > tw_results", 
-        $retval
-    );
-    if($retval) {
-        echo "test_uc.php did not run correctly\n";
-    }
-    $f = fopen("tw_results", "r");
-    fscanf($f, "%d", $val);
-    if($val > 2) {
-        echo "Water marks are working\n";
-    } else {
-        echo "Water marks are not working\n";
-    }
-    PassThru("rm -f tw_results");
-?>
diff --git a/test/testbase.py b/test/testbase.py
index fa4cfcf..8d12e5b 100644
--- a/test/testbase.py
+++ b/test/testbase.py
@@ -1,4 +1,4 @@
-## $Id: testbase.py 18356 2009-06-10 22:38:33Z davea $
+## $Id$
 
 # testbase.py
 #
diff --git a/test/testproxy b/test/testproxy
deleted file mode 100755
index d3f3adf..0000000
--- a/test/testproxy
+++ /dev/null
@@ -1,245 +0,0 @@
-#!/usr/bin/env perl
-
-# -T
-
-# $Id: testproxy 1676 2003-07-15 18:19:29Z davea $
-
-# testproxy - proxy a TCP/IP connection with configurable mid-way
-#             disconnections, for simulating internet transfer failures
-
-use strict;
-use warnings;
-use Carp;
-use IO::Socket::INET;
-
-my $listen_port = shift;
-my $target_server = shift;
-my $testcode = join(' ', @ARGV);
-
-if (!$listen_port || !$target_server) {
-    print STDERR <<HELP;
-syntax: $0 <listen_port> <target_server:port> CODE...
-
-CODE is evaluated every 128 bytes transferred from server to client.
-  Some variables you can access/modify:
-      \$target, \$client  : perl IO::Handle::INET objects
-      \$nconnections      : number of connections so far
-      \$url               : url of request (if applicable)
-      \$time              : seconds since server started
-      \$chars, \$nchars   : characters & length about to send to client.
-      \$bytes_transferred : characters already sent to client
-      \$start             : beginning of connection
-      \$done, \$success   : finished transfer; successful transfer
-      \$n, \$m            : unused variables initialized to 0
-
-      For more, view the code.
-
-  Functions:
-      close_connection, kill_server, if_done_kill, if_done_ping, logmsg
-
-  You can also call standard perl functions such as print, sleep, exit.
-
-Examples:
-  # fail connections for first 3 connections
-  $0 8080 localhost:80 'close_connection if \$nconnections < 4'
-
-  # sleep 5 seconds in the middle of transfer, and print "success" if
-  # transfer succeeds; kill the server after the first connection
-  $0 8080 localhost:80 'sleep 5 if \$bytes_transferred == 256;
-       if (\$done) { print "success\\n" if \$success; kill_server; \$success }'
-
-  # equivalent to above:
-  $0 8080 localhost:80 'sleep 5 if \$bytes_transferred == 256;
-       if_done_kill(); if_done_ping();'
-
-HELP
-    ;
-    exit(1);
-}
-
-if ($target_server !~ /:/) {
-    $target_server .= ':http';
-}
-
-my $N = "\015\012";
-
-sub proxy;
-sub spawn;
-use POSIX qw/strftime/;
-sub logmsg { print STDERR "$0 $$ ", strftime("%Y/%m/%d %H:%M:%S", localtime), ": @_\n" }
-
-my $server = IO::Socket::INET->new(Listen    => 5,
-                                   LocalAddr => inet_ntoa(INADDR_ANY),
-                                   LocalPort => $listen_port,
-                                   Proto     => 'tcp',
-                                   ReuseAddr => 1)
-  or die "$0: creating socket on port $listen_port: $!";
-
-logmsg "server started on port $listen_port proxy to $target_server";
-
-my $waitedpid = 0;
-my $paddr;
-my $server_pid = $$;
-
-use POSIX ":sys_wait_h";
-sub REAPER {
-    while (($waitedpid = waitpid(-1,WNOHANG)) > 0) {
-        logmsg "reaped $waitedpid" . ($? ? " with exit $?" : '');
-    }
-    # $SIG{CHLD} = \&REAPER;      # loathe sysV
-}
-
-# $SIG{CHLD} = \&REAPER;
-
-my $time_started = time();
-my $nconnections = 0;
-my $cclient;
-
-# for ( $waitedpid = 0;
-#       ($cclient = $server->accept()) || $waitedpid;
-#       $waitedpid = 0)
-while (($cclient = $server->accept()))
-{
-    # next if $waitedpid and not $cclient;
-    die unless $cclient;
-    REAPER();
-    my $paddr = $cclient->peername();
-    my($port,$iaddr) = sockaddr_in($paddr);
-    my $name = gethostbyaddr($iaddr,AF_INET);
-
-    logmsg "connection from $name:$port"; # [", inet_ntoa($iaddr), "]"
-
-    ++$nconnections;
-
-    spawn \&proxy, $cclient;
-}
-
-sub spawn {
-    my $coderef = shift;
-
-    unless ($coderef && ref($coderef) eq 'CODE') {
-        confess "usage: spawn CODEREF";
-    }
-
-    my $pid;
-    if (!defined($pid = fork)) {
-        logmsg "cannot fork: $!";
-        return;
-    } elsif ($pid) {
-        logmsg "begat $pid";
-        return;                 # I'm the parent
-    }
-    # else I'm the child -- go spawn
-
-    exit &$coderef(@_);
-}
-
-sub kill_server()
-{
-    kill "INT", $server_pid;
-}
-
-my $start = 0;
-my $done = 0;
-my $success = 0;
-my $url;
-my $n = 0;
-my $m = 0;
-my $bytes_transferred = 0;
-my $chars;
-my $nchars;
-
-sub if_done_ping()
-{
-    if ($done) {
-        if ($success) {
-            print "success\n";
-        } else {
-            print "failed\n";
-            return 0;
-        }
-    }
-}
-
-sub if_done_kill()
-{
-    if ($done) {
-        kill_server();
-    }
-}
-
-sub eval_test_code()
-{
-    return unless $testcode;
-    my $time = time() - $time_started;
-    warn "test code failed: $!" unless defined eval $testcode;
-}
-
-my ($client, $target);
-
-sub close_connection {
-    my $ok = (shift) ? 1 : 0;
-    logmsg "closing connection ok=$ok";
-    # $client->close(), $target->close() doesn't always work for some reason
-    # (maybe to do with forked processes)
-    $client->shutdown(2);
-    $target->shutdown(2);
-    logmsg "exiting";
-    exit !$ok;
-}
-
-sub proxy {
-    $client = shift or die;
-
-    $target = IO::Socket::INET->new(PeerAddr => $target_server)
-      or die "$0: couldn't connect to $target_server: $!";
-
-    $client->autoflush(1);
-    $target->autoflush(1);
-
-    {
-        $bytes_transferred = 0;
-        $chars = undef; $nchars = 0;
-        $done = 0;
-        $success = 0;
-        $start = 1;
-        $url = '';
-        eval_test_code();
-        $start = 0;
-    }
-
-    # transfer lines from client -> server until we get an empty line
-
-    while (my $line = $client->getline()) {
-        if ($. == 1 && $line =~ /^(GET|PUT|POST) ([^\s]+)/) {
-            $url = $2;
-            logmsg "url = $url";
-        }
-        $target->print($line);
-        $line =~ s/[\015\012]+$//;
-        last unless $line;
-    }
-
-    # indicate we have stopped reading data from client and stopped writing
-    # data to server (not sure if this helps)
-    $client->shutdown(0);
-    $target->shutdown(1);
-
-    # transfer from server->client
-
-    while ($nchars = $target->read($chars, 128)) {
-        eval_test_code();
-        $bytes_transferred += $nchars;
-        $client->write($chars, $nchars);
-    }
-
-    {
-        $chars = undef; $nchars = 0;
-        $done = 1;
-        $success = $client->connected() && 1;
-        eval_test_code();
-    }
-
-    close_connection(1);
-    return 0;
-}
diff --git a/test/uc_correct_output b/test/uc_correct_output
deleted file mode 100644
index 7df6319..0000000
--- a/test/uc_correct_output
+++ /dev/null
@@ -1,1326 +0,0 @@
-<HTML>
-  <HEAD>
-    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=UTF-8">
-    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML" CHARSET="UTF-8">
-    <META HTTP-EQUIV="CONTENT-STYLE-TYPE" CONTENT="TEXT/CSS">
-    <STYLE TYPE="TEXT/CSS" MEDIA="SCREEN">
-            BODY, H2, H3, H4, P, UL, OL, DL
-            {
-            FONT-FAMILY: "VERDANA", "HELVETICA", "ARIAL", "SANS-SERIF"
-            }
-
-            H1 {COLOR: #0058A0; FONT-SIZE: 20PT}
-	    H2 {COLOR: #0058A0; FONT-SIZE: 16PT}
-	    H3 {COLOR: #0058A0; FONT-SIZE: 14PT}
-	    H4 {COLOR: #0058A0; FONT-SIZE: 12PT}
-            
-            A:LINK, A:ACTIVE, A:VISITED
-            {
-            COLOR: #0058A0;
-            TEXT-DECORATION: NONE
-            }
-
-            P, UL, OL, DL {MARGIN-LEFT: 10%; MARGIN-RIGHT: 10%; FONT-SIZE: 10PT}
-            DT {MARGIN-BOTTOM: 0.5EM}
-            .OFFSET {MARGIN-LEFT: 10%}
-            .AFTERSKIP {MARGIN-BOTTOM: 1EM}
-            .AFTERHALF {MARGIN-BOTTOM: 0.5EM}
-	    .EXAMPLE {MARGIN-LEFT: 10%; MARGIN-RIGHT: 10%;
-	      BORDER-COLOR: #0058A0; BORDER-STYLE:SOLID; BORDER-WIDTH: 1PT; PADDING: 1PT}
-            CODE {FONT-FAMILY: "COURIER"}
-	    .COMMENT {COLOR: #0000FF}
-
-            P.OFFSET {MARGIN-LEFT: 15%}
-            P.INNER  {MARGIN-LEFT:  2%; WIDTH: 96%}
-            P.NOTE   {MARGIN-LEFT: 10%; BORDER-COLOR: #0058A0;
-	      BORDER-STYLE:SOLID; BORDER-WIDTH: 1PT;
-	      PADDING: 5PT; BACKGROUND-COLOR:#E0E0E0 }
-	    
-	    PRE {FONT-SIZE: 10PT; PADDING: 5PT}
-
-	  </STYLE>
-    <TITLE>GADOC - SABLOTRON 0.60</TITLE>
-  </HEAD>
-  <BODY BGCOLOR="#FFFFFF">
-    <H1 CLASS="AFTERSKIP">SABLOTRON 0.60</H1>
-    <DIV CLASS="AFTERSKIP">
-      <P>
-        <B>
-          <I>TOM KAISER (GINGER ALLIANCE)</I>
-        </B>
-      </P>
-      <P>
-        <I>JUNE 17, 2001</I>
-      </P>
-    </DIV>
-    <H3>ABSTRACT</H3>
-    <DIV CLASS="OFFSET">THIS IS A DESCRIPTION OF THE CURRENT VERSION OF THE
-  XSLT PROCESSOR CALLED SABLOTRON, INCLUDING AN OVERVIEW OF ITS
-  LIMITATIONS AS COMPARED TO THE XSLT SPECIFICATION.
-  </DIV>
-    <H3>CONTENTS</H3>
-<DIV STYLE="MARGIN-LEFT: 10%; MARGIN-BOTTOM: 2EM; FONT-SIZE: SMALLER">
-      <SPAN CLASS="AFTERHALF">
-        <A NAME="TOC_I__25"></A>&NBSP;<A HREF="#I__25">
-          <B>1&NBSP;&NBSP;THIS TEXT</B>
-        </A>
-        <DIV CLASS="OFFSET"></DIV>
-      </SPAN>
-      <SPAN CLASS="AFTERHALF">
-        <A NAME="TOC_I__60"></A>&NBSP;<A HREF="#I__60">
-          <B>2&NBSP;&NBSP;CHANGES FROM THE LAST RELEASE</B>
-        </A>
-        <DIV CLASS="OFFSET"></DIV>
-      </SPAN>
-      <SPAN CLASS="AFTERHALF">
-        <A NAME="TOC_I__74"></A>&NBSP;<A HREF="#I__74">
-          <B>3&NBSP;&NBSP;INTRODUCTION</B>
-        </A>
-        <DIV CLASS="OFFSET">&NBSP;&NBSP;<A HREF="#I__81">3.1&NBSP;&NBSP;XSLT</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__154">3.2&NBSP;&NBSP;ON SABLOTRON</A>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="AFTERHALF">
-        <A NAME="TOC_I__227"></A>&NBSP;<A HREF="#I__227">
-          <B>4&NBSP;&NBSP;THE SOURCES</B>
-        </A>
-        <DIV CLASS="OFFSET">&NBSP;&NBSP;<A HREF="#I__238">4.1&NBSP;&NBSP;GETTING THE SOURCES</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__280">4.2&NBSP;&NBSP;JOINING THE DEVELOPMENT</A>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="AFTERHALF">
-        <A NAME="TOC_I__305"></A>&NBSP;<A HREF="#I__305">
-          <B>5&NBSP;&NBSP;IMPLEMENTATION. SUPPORTED INSTRUCTIONS AND FUNCTIONS</B>
-        </A>
-        <DIV CLASS="OFFSET">&NBSP;&NBSP;<A HREF="#I__343">5.1&NBSP;&NBSP;TEMPLATES</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__364">5.2&NBSP;&NBSP;CONDITIONAL PROCESSING</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__381">5.3&NBSP;&NBSP;LOOPS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__398">5.4&NBSP;&NBSP;VARIABLES AND PARAMETERS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__415">5.5&NBSP;&NBSP;ELEMENT CREATION</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__439">5.6&NBSP;&NBSP;GLOBAL DEFINITIONS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__476">5.7&NBSP;&NBSP;VALUES AND COPYING</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__508">5.8&NBSP;&NBSP;NAMESPACE PROCESSING</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__529">5.9&NBSP;&NBSP;SORTING</A>
-          <BR>&NBSP;<A HREF="#I__577">5.10&NBSP;&NBSP;WHITESPACE STRIPPING</A>
-          <BR>&NBSP;<A HREF="#I__598">5.11&NBSP;&NBSP;INCLUDES</A>
-          <BR>&NBSP;<A HREF="#I__623">5.12&NBSP;&NBSP;OTHER UNIMPLEMENTED INSTRUCTIONS</A>
-          <BR>&NBSP;<A HREF="#I__654">5.13&NBSP;&NBSP;OUTPUT CONFORMANCE</A>
-          <BR>&NBSP;<A HREF="#I__686">5.14&NBSP;&NBSP;XPATH EXPRESSIONS</A>
-          <BR>&NBSP;<A HREF="#I__714">5.15&NBSP;&NBSP;BUILT-IN FUNCTIONS</A>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="AFTERHALF">
-        <A NAME="TOC_I__804"></A>&NBSP;<A HREF="#I__804">
-          <B>6&NBSP;&NBSP;OTHER IMPLEMENTATION-RELATED NOTES</B>
-        </A>
-        <DIV CLASS="OFFSET">&NBSP;&NBSP;<A HREF="#I__811">6.1&NBSP;&NBSP;HANDLERS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__859">6.2&NBSP;&NBSP;ENCODINGS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__887">6.3&NBSP;&NBSP;OUTPUT METHODS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__915">6.4&NBSP;&NBSP;URIS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__983">6.5&NBSP;&NBSP;NAMED BUFFERS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__1015">6.6&NBSP;&NBSP;ERROR AND LOG MESSAGES</A>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="AFTERHALF">
-        <A NAME="TOC_I__1048"></A>&NBSP;<A HREF="#I__1048">
-          <B>7&NBSP;&NBSP;THE C INTERFACE</B>
-        </A>
-        <DIV CLASS="OFFSET">&NBSP;&NBSP;<A HREF="#I__1065">7.1&NBSP;&NBSP;SHORTCUTS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__1205">7.2&NBSP;&NBSP;BASIC FUNCTIONS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__1416">7.3&NBSP;&NBSP;GENERALIZED INTERFACE FUNCTIONS</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__1578">7.4&NBSP;&NBSP;THE SITUATION OBJECT</A>
-          <BR>&NBSP;&NBSP;<A HREF="#I__1631">7.5&NBSP;&NBSP;DOCUMENT OBJECT MODEL (DOM) FUNCTIONS</A>
-          <BR>
-        </DIV>
-      </SPAN>
-      <SPAN CLASS="AFTERHALF">
-        <A NAME="TOC_I__1870"></A>&NBSP;<A HREF="#I__1870">
-          <B>8&NBSP;&NBSP;THE COMMAND LINE INTERFACE</B>
-        </A>
-        <DIV CLASS="OFFSET"></DIV>
-      </SPAN>
-      <SPAN CLASS="AFTERHALF">
-        <A NAME="TOC_I__2013"></A>&NBSP;<A HREF="#I__2013">
-          <B>9&NBSP;&NBSP;REFERENCES</B>
-        </A>
-        <DIV CLASS="OFFSET"></DIV>
-      </SPAN>
-    </DIV>
-    <DIV CLASS="AFTERSKIP">
-      <A NAME="I__25"></A>
-      <H2>
-        <A HREF="#TOC_I__25">1&NBSP;&NBSP;THIS TEXT</A>
-      </H2>
-      <DIV>
-        <P CLASS="">THE HTML FORM OF THIS DESCRIPTION
-        WAS COMPILED BY SABLOTRON FROM THE XML SOURCE
-        SABLOT-0-60.XML. 
-        </P>
-        <P CLASS="">
-        THE MATERIAL IN THE FOLLOWING SECTIONS INCLUDES:
-        </P>
-        <UL>
-          <LI>SOME BACKGROUND INFORMATION ON XSLT AND SABLOTRON,</LI>
-          <LI>A DETAILED COMPARISON OF THE CURRENT VERSION OF
-          SABLOTRON TO THE XSLT SPEC,</LI>
-          <LI>SABLOTRON USAGE FROM THE COMMAND LINE OR AS A
-          LIBRARY.</LI>
-        </UL>
-      </DIV>
-    </DIV>
-    <DIV CLASS="AFTERSKIP">
-      <A NAME="I__60"></A>
-      <H2>
-        <A HREF="#TOC_I__60">2&NBSP;&NBSP;CHANGES FROM THE LAST RELEASE</A>
-      </H2>
-      <DIV>
-        <P CLASS="">PLEASE SEE THE RELEASE FILE.</P>
-      </DIV>
-    </DIV>
-    <DIV CLASS="AFTERSKIP">
-      <A NAME="I__74"></A>
-      <H2>
-        <A HREF="#TOC_I__74">3&NBSP;&NBSP;INTRODUCTION</A>
-      </H2>
-      <DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__81"></A>
-          <H3>
-            <A HREF="#TOC_I__74">3.1&NBSP;&NBSP;XSLT</A>
-          </H3>
-          <P CLASS="">XSLT IS A LANGUAGE ALLOWING TO TRANSFORM GIVEN XML DATA (THE
-    <I>INPUT</I>) ACCORDING TO A <I>STYLESHEET</I>. XSLT STYLESHEETS
-    ARE THEMSELVES XML DOCUMENTS; THAT IS, ALL INSTRUCTIONS OF THE
-    LANGUAGE ARE EXPRESSED IN THE FORM OF XML ELEMENTS. THE
-    <I>OUTPUT</I>, I.E. THE RESULT OF THE PROCESSING, IS TYPICALLY A
-    XML DOCUMENT AS WELL, ALTHOUGH THE SYNTACTIC REQUIREMENTS CAN BE
-    RELAXED TO ALLOW THE CREATION OF A HTML DOCUMENT (ONE THAT
-    CONTAINS UNCLOSED TAGS AND THE LIKE), OR EVEN PLAIN TEXT.
-    </P>
-          <P CLASS="">XSLT WAS DESIGNED BY THE WORLD WIDE WEB CONSORTIUM (W3C) AS
-      A PART OF THE XSL STYLESHEET LANGUAGE, WHERE IT IS COMPLEMENTED
-      BY A POWERFUL SET OF FORMATTING INSTRUCTIONS. THE MOST PRECISE
-      INFORMATION ABOUT XSLT CAN BE FOUND IN THE W3C RECOMMENDATION <A HREF="#REF-XSLT">[XSLT]</A>. IN PARTICULAR, APPENDIX B OF THE
-      RECOMMENDATION CONTAINS A HANDY SYNTAX TABLE. A GOOD TUTORIAL IS
-      <A HREF="#REF-BIBLE">[XMLBIBLE14]</A>.
-    </P>
-          <P CLASS="">OTHER W3C RECOMMENDATIONS ONE OFTEN NEEDS TO CONSULT ARE <A HREF="#REF-XML">[XML]</A> (FOR THE DEFINITION OF THE XML
-      LANGUAGE) AND <A HREF="#REF-XPATH">[XPATH]</A> (FOR DETAILS ON
-      XPATH, THE LANGUAGE USED TO FORM EXPRESSIONS IN XSLT AND
-      ELSEWHERE).
-    </P>
-          <P CLASS="">AN EXCELLENT SOURCE OF INFORMATION ABOUT XSLT (INDEED, ABOUT
-    ANYTHING RELATED TO XML AND SGML) IS <A HREF="#REF-RCOVER">[COVER]</A>; SEE ALSO <A HREF="#REF-XSLINFO">[XSLINFO]</A> AND <A HREF="#REF-XMLORG">[XMLORG]</A>.
-    </P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__154"></A>
-          <H3>
-            <A HREF="#TOC_I__74">3.2&NBSP;&NBSP;ON SABLOTRON</A>
-          </H3>
-          <P CLASS="">SABLOTRON IS A XSLT PROCESSOR (THOUGH NOT QUITE CONFORMING
-      YET..., SEE BELOW) WRITTEN IN C++. SINCE THE MACHINES WHERE IT
-      IS MEANT TO RUN INCLUDE VARIOUS SMALL MOBILE
-      CLIENTS, THE MAIN OBJECTIVES OF ITS DESIGN ARE THE FOLLOWING:
-    </P>
-          <UL>
-      <LI>PORTABILITY,</LI>
-      <LI>COMPACT CODE,</LI>
-      <LI>AS MUCH INDEPENDENCE ON OTHER RESOURCES (JAVA ETC.) AS
-      POSSIBLE.</LI>
-    </UL>
-          <P CLASS="">SABLOTRON IS A SINGLE SHARED LIBRARY
-    (<CODE>SABLOT.DLL</CODE> OR <CODE>LIBSABLOT.SO.0.60</CODE>). IT CAN
-    ALSO BE USED FROM THE COMMAND LINE VIA THE SIMPLE INTERFACE
-    CALLED <CODE>SABCMD</CODE>. SEE <A HREF="#INVOCATION">HERE</A> FOR
-    MORE INFORMATION.
-    </P>
-          <P CLASS="">THE ONLY SOFTWARE SABLOTRON RELIES ON IS <B>EXPAT</B>, THE
-      XML PARSER BY JAMES CLARK. SEE <A HREF="#EXPAT">BELOW</A> FOR
-      INFORMATION ON HOW TO GET EXPAT.
-      </P>
-          <P CLASS="">FOR INFORMATION ON THE AVAILABLE INTERFACES, E.G. FOR
-      PYTHON, PERL AND PHP, SEE <A HREF="HTTP://WWW.GINGERALL.COM">WWW.GINGERALL.COM</A>. 
-      </P>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV CLASS="AFTERSKIP">
-      <A NAME="I__227"></A>
-      <H2>
-        <A HREF="#TOC_I__227">4&NBSP;&NBSP;THE SOURCES</A>
-      </H2>
-      <DIV>
-        <P CLASS="">
-      SABLOTRON IS WRITTEN IN C++. THE SOURCE FILES COMPILE UNDER
-      WIN32 (USING MS VISUAL C++ 6.0) AND ON SOLARIS AND LINUX (USING
-      G++ 2.95.2) WITHOUT CHANGE.</P>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__238"></A>
-          <H3>
-            <A HREF="#TOC_I__227">4.1&NBSP;&NBSP;GETTING THE SOURCES</A>
-          </H3>
-          <P CLASS="">THE SOURCE OR BINARY DISTRIBUTIONS OF SABLOTRON CAN BE DOWNLOADED
-      FROM <A HREF="HTTP://WWW.GINGERALL.COM">WWW.GINGERALL.COM</A>. FOR
-      INSTRUCTIONS ON HOW TO BUILD THE SOURCES (IF ANY), REFER TO THE ACCOMPANYING INSTALL FILE.
-      </P>
-          <P CLASS="">IF YOU HAVE ACCESS TO THE GINGER ALLIANCE CVS SERVER, YOU
-      CAN GET THE WORKING VERSION OF SABLOTRON IN THE CVS MODULE
-      <CODE>GA</CODE>. THE ACCESS RIGHTS CAN BE OBTAINED ON
-      REQUEST FROM <A HREF="MAILTO:CVSADMIN at GINGERALL.COM">THE CVS ADMIN</A>.
-      </P>
-          <P CLASS="">
-            <A NAME="EXPAT"></A>
-      SINCE VERSION 0.50, SABLOTRON USES EXPAT 1.95.1, AVAILABLE FROM <A HREF="HTTP://EXPAT.SOURCEFORGE.ORG">SOURCEFORGE</A>.
-      </P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__280"></A>
-          <H3>
-            <A HREF="#TOC_I__227">4.2&NBSP;&NBSP;JOINING THE DEVELOPMENT</A>
-          </H3>
-          <P CLASS="">
-      SABLOTRON IS AN OPEN SOURCE PROJECT AND ALL VOLUNTEERS ARE MOST
-      WELCOME! THE DOCUMENTATION OF THE SOURCES IS STILL SOMEWHAT
-      SPARSE BUT WE WILL TRY TO IMPROVE IT. IF YOU FIND THE INVITATION
-      TO WORK ON SABLOTRON WITH US INTERESTING, PLEASE <A HREF="MAILTO:SABLOTRON at GINGERALL.COM">CONTACT US</A>. THERE IS ALSO
-      A MAILING LIST AVAILABLE, SEE <A HREF="HTTP://WWW.GINGERALL.COM">WWW.GINGERALL.COM</A>.
-      </P>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV CLASS="AFTERSKIP">
-      <A NAME="I__305"></A>
-      <H2>
-        <A HREF="#TOC_I__305">5&NBSP;&NBSP;IMPLEMENTATION. SUPPORTED INSTRUCTIONS AND FUNCTIONS</A>
-      </H2>
-      <DIV>
-        <P CLASS="">THE INSTRUCTION SET SUPPORTED BY THIS VERSION OF SABLOTRON IS
-    ALREADY SUFFICIENT FOR MANY TRANSFORMATION TASKS (E.G. THE TASK OF
-    FORMATTING THIS DOCUMENT). ON THE OTHER
-    HAND, A COMPARISON OF IT TO THE XSLT SPECIFICATION <A HREF="#REF-XSLT">[XSLT]</A> SHOWS THAT MUCH IS STILL TO BE
-    DONE. THE PURPOSE OF THE
-    FOLLOWING SECTIONS IS TO DESCRIBE THE VARYING DEGREE OF SUPPORT
-    FOR THE ELEMENTS OF THE XSLT LANGUAGE. </P>
-        <P CLASS="">IT MAY BE HELPFUL TO REFER TO THE SYNTAX TABLE IN APPENDIX B
-    OF <A HREF="#REF-XSLT">[XSLT]</A>. THE INSTRUCTIONS/ATTRIBUTES THAT
-    ARE NOT LISTED AS UNSUPPORTED SHOULD BE IMPLEMENTED. THE <A HREF="MAILTO:SABLOTRON at GINGERALL.COM">AUTHORS</A> WILL APPRECIATE BEING
-    TOLD ABOUT ANY OMISSIONS FOUND IN THE FOLLOWING
-    DESCRIPTION.</P>
-        <P CLASS="">FOR READABILITY, I SOMETIMES OMIT THE <CODE>XSL:</CODE> PREFIX
-    FROM THE INSTRUCTION NAMES.</P>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__343"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.1&NBSP;&NBSP;TEMPLATES</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        TEMPLATE, APPLY-TEMPLATES, CALL-TEMPLATE
-      </CODE>
-          </P>
-          <P CLASS="">
-        FULLY IMPLEMENTED. <CODE>XSL:SORT</CODE> IS SUPPORTED SINCE RELEASE 0.50.
-      </P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__364"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.2&NBSP;&NBSP;CONDITIONAL PROCESSING</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        IF, CHOOSE, WHEN, OTHERWISE
-      </CODE>
-          </P>
-          <P CLASS="">FULLY IMPLEMENTED.
-      </P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__381"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.3&NBSP;&NBSP;LOOPS</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>FOR-EACH</CODE>
-          </P>
-          <P CLASS="">FULLY IMPLEMENTED.
-      </P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__398"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.4&NBSP;&NBSP;VARIABLES AND PARAMETERS</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>VARIABLE, PARAM, WITH-PARAM</CODE>
-          </P>
-          <P CLASS="">FULLY IMPLEMENTED. TOP-LEVEL VARIABLES AND PARAMETERS ARE
-      READ IN THE DOCUMENT ORDER, SO NO FORWARD REFERENCES ARE
-      RESOLVED. THIS IS A MINOR DEVIATION FROM THE SPEC. </P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__415"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.5&NBSP;&NBSP;ELEMENT CREATION</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>ELEMENT, ATTRIBUTE, TEXT, 
-      COMMENT, PROCESSING-INSTRUCTION, ATTRIBUTE-SET</CODE>
-          </P>
-          <P CLASS="">
-            <CODE>XSL:ATTRIBUTE-SET</CODE> IS NOT IMPLEMENTED. FOR THE
-      REST, <CODE>NAME</CODE> IS THE ONLY RECOGNIZED ATTRIBUTE (WHERE
-      APPLICABLE). LITERAL RESULT ELEMENTS WORK.</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__439"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.6&NBSP;&NBSP;GLOBAL DEFINITIONS</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>STYLESHEET, TRANSFORM, OUTPUT</CODE>
-          </P>
-          <P CLASS="">FOR <CODE>STYLESHEET</CODE> AND <CODE>TRANSFORM</CODE>,
-        THE ONLY RECOGNIZED ATTRIBUTE IS
-        <CODE>VERSION</CODE>. <CODE>XSL:OUTPUT</CODE> SHOULD WORK
-        (SEE BELOW FOR NOTES ON THE <CODE>ENCODING</CODE>
-        ATTRIBUTE). HTML INDENTATION HAS BEEN ADDED IN 0.60.
-      </P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__476"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.7&NBSP;&NBSP;VALUES AND COPYING</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>VALUE-OF, COPY, COPY-OF</CODE>
-          </P>
-          <P CLASS="">
-            <CODE>COPY-OF</CODE> AND <CODE>VALUE-OF</CODE> ARE FULLY
-      IMPLEMENTED. <CODE>COPY</CODE> IS IMPLEMENTED EXCEPT FOR THE
-      <CODE>USE-ATTRIBUTE-SETS</CODE> ATTRIBUTE.</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__508"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.8&NBSP;&NBSP;NAMESPACE PROCESSING</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>NAMESPACE-ALIAS</CODE>
-          </P>
-          <P CLASS="">NAMESPACES SHOULD BE PROCESSED CORRECTLY. THE
-      <CODE>NAMESPACE-ALIAS</CODE> INSTRUCTION IS NOW SUPPORTED
-      (PATCH BY MAJOR).</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__529"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.9&NBSP;&NBSP;SORTING</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>SORT</CODE>
-          </P>
-          <P CLASS="">
-            <CODE>XSL:SORT</CODE> IS IMPLEMENTED SINCE 0.50. THERE ARE
-      MINOR LIMITATIONS:
-      </P>
-          <UL>
-        <LI>CURRENTLY, THE <CODE>LANG</CODE> ATTRIBUTE MAY ONLY
-        CONTAIN THE VALUES <CODE>"EN"</CODE> OR <CODE>"CZ"</CODE>.</LI>
-        <LI>
-              <CODE>CASE-ORDER</CODE> CANNOT BE SPECIFIED.</LI>
-      </UL>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__577"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.10&NBSP;&NBSP;WHITESPACE STRIPPING</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>STRIP-SPACE, PRESERVE-SPACE</CODE>
-          </P>
-          <P CLASS="">ONLY THE DEFAULT WHITESPACE STRIPPING IS DONE. THAT IS,
-      ALL WHITESPACE-ONLY TEXT NODES IN ANY STYLESHEET, NOT APPEARING
-      INSIDE A <CODE>XSL:TEXT</CODE>, ARE REMOVED. THE TWO
-      INSTRUCTIONS FOR WHITESPACE STRIPPING AND PRESERVATION ARE
-      UNSUPPORTED.</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__598"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.11&NBSP;&NBSP;INCLUDES</A>
-          </H3>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INCLUDE, IMPORT, APPLY-IMPORTS</CODE>
-          </P>
-          <P CLASS="">ONLY <CODE>XSL:INCLUDE</CODE> IS IMPLEMENTED. PROCESSING
-      INVOLVING MULTIPLE DOCUMENTS WORKS, BUT HAS TO GET MORE TESTING,
-      EG. WITH RESPECT TO <CODE>GENERATE-ID()</CODE>.</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__623"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.12&NBSP;&NBSP;OTHER UNIMPLEMENTED INSTRUCTIONS</A>
-          </H3>
-          <UL>
-        <LI>
-              <CODE>XSL:KEY,</CODE>
-            </LI>
-        <LI>
-              <CODE>XSL:NUMBER,</CODE>
-            </LI>
-        <LI>
-              <CODE>XSL:FALLBACK.</CODE>
-            </LI>
-      </UL>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__654"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.13&NBSP;&NBSP;OUTPUT CONFORMANCE</A>
-          </H3>
-          <P CLASS="">THE OUTPUT MECHANISM IS MUCH CLOSER TO THE SPEC THAN IN
-      THE VERSIONS PRIOR TO 0.4. THE FOLLOWING ISSUES REMAIN FOR THE
-      HTML METHOD:</P>
-          <UL>
-        <LI>OUTPUT THE BOOLEAN ATTRIBUTES CORRECTLY.</LI>
-        <LI>DISABLE THE ESCAPING INSIDE
-        <CODE><SCRIPT></CODE> AND
-        <CODE><STYLE></CODE>
-            </LI>.
-      </UL>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__686"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.14&NBSP;&NBSP;XPATH EXPRESSIONS</A>
-          </H3>
-          <P CLASS="">ALMOST ALL FEATURES OF XPATH ARE FULLY IMPLEMENTED. THIS MEANS
-      THERE SHOULD BE NO PROBLEMS WITH EXPRESSIONS OF ANY KIND.</P>
-          <P CLASS="">ONE EXCEPTION RELATES TO AXES. THE <CODE>FOLLOWING</CODE> AND
-      <CODE>PRECEDING</CODE> AXES HAVEN'T BEEN IMPLEMENTED YET.</P>
-          <P CLASS="">ANOTHER POSSIBLE EXCEPTION MAY BE NUMBERS; WE DID NOT YET DO A
-      THOROUGH TEST OF ROUNDING, NANS, INFINITY, ETC.</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__714"></A>
-          <H3>
-            <A HREF="#TOC_I__305">5.15&NBSP;&NBSP;BUILT-IN FUNCTIONS</A>
-          </H3>
-          <P CLASS="">
-            <A NAME="CORELIB"></A>ONLY A FEW FUNCTIONS FROM THE STANDARD
-      FUNCTION LIBRARY REMAIN
-      UNIMPLEMENTED:
-      </P>
-          <UL>
-      <LI>
-              <CODE>ID()</CODE>,</LI>
-      <LI>
-              <CODE>LANG()</CODE> (ACCEPTED BUT ALWAYS RETURNS TRUE),</LI>
-      <LI>
-              <CODE>KEY()</CODE>,</LI>
-      <LI>
-              <CODE>FORMAT-NUMBER()</CODE>,</LI>
-      <LI>
-              <CODE>UNPARSED-ENTITY-URI()</CODE>.</LI>
-      </UL>
-          <P CLASS="">AS FOR THE FUCTIONS THAT <I>ARE</I> IMPLEMENTED, THE
-      FOLLOWING IS A LIST OF DIFFERENCES FROM THE SPEC:
-      </P>
-          <UL>
-        <LI>
-              <CODE>DOCUMENT()</CODE> ONLY ACCEPTS ONE ARGUMENT, ALWAYS
-        GETTING THE BASE URI FROM THE STYLESHEET URI.
-        </LI>
-        <LI>
-              <CODE>STRING-LENGTH()</CODE> RETURNS THE BYTE LENGTH OF
-        THE UTF-8 REPRESENTATION OF THE STRING. THIS WILL TYPICALLY
-        DIFFER FROM THE ACTUAL LENGTH.
-        </LI>
-        <LI>
-              <CODE>GENERATE-ID()</CODE> MIGHT FAIL TO GENERATE UNIQUE IDENTIFIERS
-        WHEN SEVERAL INPUT DOCUMENTS ARE PRESENT (GIVING THE SAME ID TO
-        NODES FROM DIFFERENT DOCUMENTS).
-        </LI>
-      </UL>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV CLASS="AFTERSKIP">
-      <A NAME="I__804"></A>
-      <H2>
-        <A HREF="#TOC_I__804">6&NBSP;&NBSP;OTHER IMPLEMENTATION-RELATED NOTES</A>
-      </H2>
-      <DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__811"></A>
-          <H3>
-            <A HREF="#TOC_I__804">6.1&NBSP;&NBSP;HANDLERS</A>
-          </H3>
-          <P CLASS="">IT IS POSSIBLE FOR THE USER TO SUPPLY THE FOLLOWING
-      HANDLERS TO SABLOTRON:
-        <UL>
-          <LI>MESSAGE HANDLER (TO BYPASS THE DEFAULT WAY OF DISPLAYING
-          ERROR AND WARNING MESSAGES AND LOGGING),</LI>
-          <LI>SCHEME HANDLER (TO RETRIEVE DOCUMENTS WHOSE URI USE AN
-          UNSUPPORTED SCHEME),</LI>
-          <LI>STREAMING HANDLER (AN EXPAT-LIKE INTERFACE TO THE XML
-          DOCUMENT WHICH IS THE RESULT OF THE PROCESSING),</LI>
-          <LI>'MISCELLANEOUS' HANDLER (WHICH WILL PROBABLY SERVER AS A
-          COLLECTIONS OF ODD CALLBACKS).</LI>
-        </UL>
-      </P>
-          <P CLASS="">
-        THE HANDLERS ARE SET USING <CODE>SABLOTREGHANDLER()</CODE>
-        FOR DETAILS CONCERNING THE INTERFACE OF THESE HANDLERS,
-        CONSULT THE HEADER FILES <CODE>SABLOT.H</CODE> AND
-        <CODE>SHANDLER.H</CODE>. 
-      </P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__859"></A>
-          <H3>
-            <A HREF="#TOC_I__804">6.2&NBSP;&NBSP;ENCODINGS</A>
-          </H3>
-          <P CLASS="">
-        IN VERSION 0.52, THE ENCODING CONVERSION CAPABILITIES OF
-        SABLOTRON HAVE BEEN MUCH EXTENDED. THE MOST IMPORTANT FACT IS THE
-        FOLLOWING: IF YOU HAVE THE ICONV LIBRARY INSTALLED ON YOUR SYSTEM, YOU
-        CAN USE ANY ENCODING IT SUPPORTS (THAT IS, ALMOST ANY ENCODING
-        WHATSOEVER) FOR BOTH THE INPUT AND THE OUTPUT DOCUMENTS. ICONV
-        IS AVAILABLE ON MOST SYSTEMS (IT IS A STANDARD PART OF GLIBC2,
-        FOR INSTANCE). THERE ARE IMPLEMENTATIONS FOR WIN32 AS WELL.
-      </P>
-          <P CLASS="">IF ICONV IS NOT AVAILABLE, THE ENCODING MAY STILL BE SUPPORTED INTERNALLY BY
-      SABLOTRON. AT PRESENT, THE LIST IS OF SUCH ENCODINGS IS RATHER
-      SHORT: BESIDES UTF-8, THESE ARE UTF-16, ASCII, ISO-8859-1,
-      ISO-8859-2 AND WINDOWS-1250 ON INPUT, NONE ON OUTPUT. HOWEVER,
-      WE PLAN TO IMPLEMENT A HALF INDEPENDENT LIGHT-WEIGHT
-      CONVERSION LIBRARY FOR USE ON SYSTEMS WITHOUT ICONV,
-      EXTENDING THE SET OF INTERNALLY SUPPORTED ENCODINGS
-      CONSIDERABLY. 
-      </P>
-          <P CLASS="">LASTLY, THE USER HAS THE OPTION TO IMPLEMENT A CUSTOM
-      ENCODING CONVERSION HANDLER, WHICH WILL BE ASKED TO PERFORM ANY UNSUPPORTED
-      CONVERSION. SEE THE <CODE>SHANDLER.H</CODE> HEADER FILE FOR
-      DETAILS.
-      </P>
-          <P CLASS="">THE DEFAULT INPUT AND OUTPUT ENCODING IS IN ALL CASES UTF-8.</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__887"></A>
-          <H3>
-            <A HREF="#TOC_I__804">6.3&NBSP;&NBSP;OUTPUT METHODS</A>
-          </H3>
-          <P CLASS="">IN ADDITION TO THE STANDARD OUTPUT METHODS (XML, HTML AND
-      TEXT), IT IS POSSIBLE TO OUTPUT XHTML. DOCUMENTS OUTPUT USING
-      THIS METHOD OBEY THE XHTML 1.0 RULES (IN PARTICULAR, ALL EMPTY
-      ELEMENTS ARE CLOSED). TO CHOOSE THE METHOD, USE
-      <CODE><XSL:OUTPUT METHOD='XHTML'></CODE>. <B>PLEASE NOTE</B>
-      THAT THE NAME OF THIS METHOD WILL POSSIBLY BE CHANGED SINCE THE XSLT
-      SPEC REQUIRES ANY PROCESSOR-SPECIFIC METHODS TO HAVE QUALIFIED
-      NAMES, SAY <CODE>SAB:XHTML</CODE>. ON THE OTHER HAND, THE NAME
-      <CODE>XHTML</CODE> IS CONSIDERED IN THE XSLT 2.0 WORKING DRAFT.</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__915"></A>
-          <H3>
-            <A HREF="#TOC_I__804">6.4&NBSP;&NBSP;URIS</A>
-          </H3>
-          <P CLASS="">SABLOTRON CAN HANDLE
-      TWO URI SCHEMES NATIVELY: 'FILE' AND 'ARG' (SEE
-      BELOW). MOREOVER, IT IS POSSIBLE TO USE THE FUNCTION
-      <CODE>SABLOTREGSCHEMEHANDLER</CODE> TO REGISTER AN EXTERNAL SCHEME
-      HANDLER WHICH WILL RECEIVE REQUESTS IN ALL OTHER SCHEMES. SEE
-      THE DOCUMENTATION IN <CODE>SABLOT.H</CODE> AND
-      <CODE>SHANDLER.H</CODE>.
-      </P>
-          <P CLASS="">RELATIVE URI REFERENCES ARE RESOLVED IN CONFORMANCE TO RFC
-      2396. THE BASE URI IS WELL DEFINED WHEN THE RELATIVE REFERENCE APPEARS
-      INSIDE A XML DOCUMENT; WHEN INVOKING SABCMD, THE BASE URI IS
-      TAKEN TO CORRESPOND TO THE CURRENT WORKING DIRECTORY.
-      </P>
-          <P CLASS="">
-            <A NAME="FNAME-RULES"></A>WHEN SPECIFYING FILENAMES, THE
-      FOLLOWING RULES ARE IN EFFECT:
-      </P>
-          <UL>
-        <LI>SPECIFY THE "FILE:" SCHEME FOR ANY STANDARD FILES,
-      I.E. REFER TO <CODE>STDIN</CODE> AS <CODE>FILE://STDIN</CODE>
-      ETC.</LI>
-        <LI>SLASHES AND BACKSLASHES WORK EQUALLY FINE, IN WINDOWS AS
-      WELL AS LINUX.</LI>
-        <LI>TO INCLUDE A DRIVE LETTER UNDER WINDOWS
-      (E.G. <CODE>C:\DOC.XML</CODE>), IT IS NECESSARY TO SAY
-      <CODE>FILE://C:/DOC.XML</CODE>. 
-        </LI>
-      </UL>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__983"></A>
-          <H3>
-            <A HREF="#TOC_I__804">6.5&NBSP;&NBSP;NAMED BUFFERS</A>
-          </H3>
-          <P CLASS="">
-            <A NAME="ARGSCHEME"></A>SABLOTRON INTRODUCES AN URI SCHEME
-      'ARG:' WHICH ENABLES ONE TO USE STRINGS IN NAMED MEMORY
-      BUFFERS. THE BUFFER NAMES CAN HAVE A TREE-LIKE STRUCTURE SO THAT
-      A RELATIVE REFERENCE FROM A DOCUMENT IN A BUFFER CAN BE RESOLVED
-      AS POINTING TO ANOTHER BUFFER.
-      </P>
-          <P CLASS="">FOR INSTANCE, IF WE INVOKE SABLOTRON SPECIFYING THAT A
-      BUFFER NAMED <CODE>/MYBUF/1</CODE> CONTAINS THE STRING
-      "&LT;A>CONTENTS&LT;/A>", THEN THE EXPRESSION
-      </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-      DOCUMENT('ARG:/MYBUF/1')/A
-      </CODE>
-          </P>
-          <P CLASS="">HAS STRING-VALUE "CONTENTS". IF THE DOCUMENT IN ARG:/MYBUF/1
-      CONTAINED A RELATIVE URI REFERENCE "../THEIRBUF/2" THEN THIS
-      WOULD BE RESOLVED AS POINTING TO "ARG:/THEIRBUF/2".</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__1015"></A>
-          <H3>
-            <A HREF="#TOC_I__804">6.6&NBSP;&NBSP;ERROR AND LOG MESSAGES</A>
-          </H3>
-          <P CLASS="">BY DEFAULT, SABLOTRON WRITES ERROR AND WARNING MESSAGES TO
-      STDERR, AND DOES NO LOGGING. BY A CALL TO
-      <CODE>SABLOTSETLOG()</CODE>, YOU CAN SPECIFY THE NAME OF THE LOG
-      FILE TO BE USED.</P>
-          <P CLASS="">BESIDES, YOU CAN USE <CODE>SABLOTREGHANDLER()</CODE>
-      TO OVERRIDE THE DEFAULT MESSAGE HANDLING. THE HANDLER YOU
-      REGISTER WILL RECEIVE ALL MESSAGES IN A STRUCTURED FORM THAT'S
-      EASY TO PROCESS AND FILTER. FOR DETAILS, SEE
-      THE DOCUMENTATION IN <CODE>SABLOT.H</CODE> AND
-      <CODE>SHANDLER.H</CODE>.</P>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV CLASS="AFTERSKIP">
-      <A NAME="I__1048"></A>
-      <H2>
-        <A HREF="#TOC_I__1048">7&NBSP;&NBSP;THE C INTERFACE</A>
-      </H2>
-      <DIV>
-        <P CLASS="">
-          <A NAME="INVOCATION"></A>
-        </P>
-        <P CLASS="">
-        THIS SECTION DESCRIBES THE FUNCTIONS EXPORTED FROM THE
-        SABLOTRON LIBRARY.  ALL OF THEM HAVE A RETURN TYPE OF 'INT'
-        AND RETURN AN ERROR FLAG (NONZERO SIGNALS AN ERROR). ERRORS
-        ARE REPORTED TO THE USER BY SABLOTRON ITSELF. 
-      </P>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__1065"></A>
-          <H3>
-            <A HREF="#TOC_I__1048">7.1&NBSP;&NBSP;SHORTCUTS</A>
-          </H3>
-          <P CLASS="">
-        WE'LL FIRST DESCRIBE THE 'SHORTCUTS' THAT DO THE WHOLE
-        PROCESSING IN ONE CALL.
-      </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTPROCESS(CHAR *SHEETURI, CHAR *INPUTURI, CHAR *RESULTURI,
-        CHAR **PARAMS, CHAR **ARGUMENTS, CHAR **RESULTARG);
-      </CODE>
-          </P>
-          <P CLASS="">
-        THIS IS THE BASIC FUNCTION. THE FIRST THREE OF ITS ARGUMENTS
-        ARE THE URIS OF THE XSLT STYLESHEET, THE XML SOURCE AND THE
-        RESULTING DOCUMENT, RESPECTIVELY. FOR SOME NOTES ON SPECIFYING
-        FILE NAMES, SEE <A HREF="#FNAME-RULES">ABOVE</A>.
-      </P>
-          <P CLASS="">
-            <CODE>PARAMS</CODE> IS AN ARRAY OF POINTERS TO THE NAMES
-      AND CONTENTS OF THE TOP-LEVEL STYLESHEET PARAMETERS. THUS,
-      <CODE>PARAMS[0]</CODE> IS A POINTER TO THE NULL-TERMINATED NAME
-      OF THE FIRST PARAMETER, <CODE>PARAMS[1]</CODE> POINTS TO THE
-      (NULL-TERMINATED) CONTENTS OF THE FIRST PARAMETER. THE FOLLOWING
-      TWO ARRAY ITEMS DO THE SAME FOR THE SECOND PARAMETER, ETC. THE
-      WHOLE ARRAY IS TERMINATED BY A NULL POINTER IN PLACE OF THE
-      NAME. IF NO PARAMETERS ARE TO BE PASSED, YOU CAN SPECIFY NULL
-      FOR <CODE>PARAMS</CODE> ITSELF.
-      </P>
-          <P CLASS="">
-            <CODE>ARGUMENTS</CODE> IS A SIMILAR ARRAY OF NAMED BUFFERS
-      TO BE PASSED TO THE STYLESHEET. (THEY CAN BE REFERRED TO VIA THE
-      'ARG:' SCHEME, SEE <A HREF="#ARGSCHEME">ABOVE</A>.) AGAIN, THE
-      ARRAY IS A SEQUENCE OF (NAME, VALUE) PAIRS TERMINATED BY NULL IN
-      PLACE OF A NAME. IF NO NAMED BUFFERS ARE TO BE PASSED, YOU CAN
-      SPECIFY NULL FOR <CODE>ARGUMENTS</CODE> ITSELF.
-      </P>
-          <P CLASS="">
-            <CODE>RESULTARG</CODE> ENABLES ONE TO ACCESS THE
-      RESULTING DOCUMENT IN CASE THE OUTPUT WENT TO A NAMED BUFFER. IN
-      THAT SITUATION, <CODE>*RESULTARG</CODE> POINTS TO THE RESULTING
-      NULL-TERMINATED STRING, ALLOCATED BY SABLOTRON. YOU CAN PASS NULL
-      FOR <CODE>RESULTARG</CODE> IF THE OUTPUT IS SURE TO GO TO A
-      FILE. 
-      </P>
-          <P CLASS="">
-            <B>NOTE:</B>WHEN YOU ARE DONE PROCESSING THE STRING
-      POINTED TO BY <CODE>*RESULTARG</CODE>, FREE IT USING <A HREF="#SABLOTFREE">
-              <CODE>SABLOTFREE()</CODE>
-            </A> - NEVER USE
-      <CODE>FREE()</CODE>. THE LATTER IS GUARANTEED TO PRODUCE A
-      SEGMENTATION FAULT UNDER LINUX.
-      </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTPROCESSFILES(CHAR *STYLESHEETNAME,
-        CHAR *INPUTNAME,
-        CHAR *RESULTNAME);
-      </CODE>
-          </P>
-          <P CLASS="">A WRAPPER FOR <CODE>SABLOTPROCESS()</CODE> WORKING ON
-      FILES. THE PARAMETERS ARE THE NULL-TERMINATED FILE NAMES OF THE
-      XSLT STYLESHEET, THE XML INPUT AND THE RESULT,
-      RESPECTIVELY. SABLOTRON OPENS THESE FILES ITSELF AND CLOSES THEM
-      AFTER THE PROCESSING IS COMPLETE. VALUES LIKE "FILE://STDIN" ARE
-      ALLOWED.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTPROCESSSTRINGS(CHAR *STYLESHEETSTR, CHAR *INPUTSTR, CHAR
-        **RESULTSTR);
-      </CODE>
-          </P>
-          <P CLASS="">ANOTHER WRAPPER FOR <CODE>SABLOTPROCESS()</CODE>, THIS
-        TIME FOR ACCESSING NAMED BUFFERS (I.E. USER-ALLOCATED MEMORY
-        BLOCKS)ONLY. THUS, THE FIRST PARAMETER IS A NULL-TERMINATED
-        STRING CONTAINING THE WHOLE STYLESHEET; THE SECOND PARAMETER
-        IS A NULL-TERMINATED STRING CONTAINING THE XML
-        INPUT. SABLOTRON ALLOCATES THE BUFFER FOR THE RESULTING STRING
-        AND RETURNS A POINTER TO IT IN RESULTSTR. HENCE, INVOKING
-        <CODE>PUTS(*RESULTSTR)</CODE> AFTER HAVING CALLED
-        <CODE>SABLOTPROCESSSTRINGS</CODE> SENDS THE RESULT TO
-        STDOUT. THE BUFFER ALLOCATED <B>MUST</B> BE FREED BY CALLING THE
-        FUNCTION <CODE>SABLOTFREE</CODE> DESCRIBED NEXT. 
-      </P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__1205"></A>
-          <H3>
-            <A HREF="#TOC_I__1048">7.2&NBSP;&NBSP;BASIC FUNCTIONS</A>
-          </H3>
-          <P CLASS="">THE ABOVE SHORTCUTS JUST CALL THE BASIC, LOWER-LEVEL
-      FUNCTIONS DESCRIBED BELOW. NOTE THAT IF YOU NEED TO SET OPTIONS
-      FOR LOGGING ETC., YOU MAY NEED TO USE THE LOW-LEVEL
-      FUNCTIONS. </P>
-          <P CLASS="">A TYPICAL PROCESSING SESSION MAY LOOK LIKE THIS:</P>
-          <P CLASS="">
-            <PRE>
-          SABLOTHANDLE P;
-          CHAR *MY_BUF;
-          SABLOTCREATEPROCESSOR(&P);
-          SABLOTSETLOG(P, ...);
-          /* ...SET OTHER INSTANCE-SPECIFIC OPTIONS HERE... */
-          SABLOTRUNPROCESSOR(P, ...);
-          SABLOTGETRESULTARG(P, "ARG:/SOMENAME", &MY_BUF)
-          /* ...DO SOMETHING WITH MY_BUF... */
-          /* CAN RUN THE PROCESSOR AGAIN IF NECESSARY */
-          SABLOTRUNPROCESSOR(P, ...);
-          SABLOTDESTROYPROCESSOR(P);
-      </PRE>
-          </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTCREATEPROCESSOR(SABLOTHANDLE *PROCESSORPTR);
-      </CODE>
-          </P>
-          <P CLASS="">CREATES AN INSTANCE OF SABLOTRON AND RETURNS A POINTER TO
-      IT IN *PROCESSORPTR. THIS POINTER IS PASSED ON ALL SUBSEQUENT
-      CALLS TO THIS INSTANCE. </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTDESTROYPROCESSOR(SABLOTHANDLE PROCESSOR_);
-      </CODE>
-          </P>
-          <P CLASS="">DESTROYS AN INSTANCE OF THE PROCESSOR, DEALLOCATING ALL
-      THE MEMORY USED UP BY IT.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTRUNPROCESSOR(SABLOTHANDLE PROCESSOR_,
-        CHAR *SHEETURI, 
-        CHAR *INPUTURI, 
-        CHAR *RESULTURI,
-        CHAR **PARAMS, 
-        CHAR **ARGUMENTS);
-      </CODE>
-          </P>
-          <P CLASS="">PROCESSES DOCUMENTS USING THE GIVEN PROCESSOR INSTANCE AND
-      GIVEN PARAMS AND ARGS DEFINITIONS. SEE
-      <CODE>SABLOTPROCESS()</CODE>.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTGETRESULTARG(SABLOTHANDLE PROCESSOR_,
-        CHAR *ARGURI,
-        CHAR **ARGVALUE);
-      </CODE>
-          </P>
-          <P CLASS="">COPIES THE RESULT 'ARG' BUFFER WITH THE GIVEN URI,
-      RETURNING A POINTER TO THE NEWLY-ALLOCATED BLOCK IN
-      *ARGVALUE. IF NO SUCH BUFFER EXISTS, RETURNS NULL IN *ARGVALUE. 
-      </P>
-          <P CLASS="">THIS FUNCTION IS NECESSARY, BECAUSE IF THE RESULT DOCUMENT
-      IS OUTPUT TO MEMORY, IT WOULD BE LOST WHEN
-      <CODE>SABLOTDESTROYPROCESSOR()</CODE> IS CALLED. WHEN
-      DEALLOCATING THE COPY OBTAINED FROM
-      <CODE>SABLOTGETRESULTARG()</CODE>, USE <CODE>SABLOTFREE</CODE>
-      (NEVER <CODE>FREE()</CODE>). </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTFREERESULTARGS(SABLOTHANDLE PROCESSOR_);
-      </CODE>
-          </P>
-          <P CLASS="">REMOVES THE SABLOTRON-INTERNAL COPIES OF THE 'ARG' BUFFERS
-      FROM THE LAST SABLOTRON RUN. NORMALLY, THERE SHOULD BE NO REASON
-      TO CALL THIS FUNCTION AS IT IS CALLED AUTOMATICALLY ON BOTH
-      <CODE>SABLOTRUNPROCESSOR()</CODE> AND
-      <CODE>SABLOTDESTROYPROCESSOR()</CODE>. </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-              <A NAME="SABLOTFREE"></A>
-        INT SABLOTFREE(CHAR *RESULTBUF);
-      </CODE>
-          </P>
-          <P CLASS="">THIS FUNCTION FREES THE BUFFER ALLOCATED ON PREVIOUS CALL
-        TO <CODE>SABLOTPROCESSSTRINGS</CODE>. CALLING IT WITH AN
-        INVALID POINTER WILL CAUSE A CRASH. 
-      </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTREGHANDLER(
-        SABLOTHANDLE PROCESSOR_, 
-        HANDLERTYPE TYPE,   
-        VOID *HANDLER, 
-        VOID *USERDATA);
-      </CODE>
-          </P>
-          <P CLASS="">REGISTERS AN EXTERNAL HANDLER. <CODE>TYPE</CODE> CAN BE
-        <CODE>HLR_MESSAGE</CODE>, <CODE>HLR_SCHEME</CODE>,
-        <CODE>HLR_SAX</CODE>, <CODE>HLR_MISC</CODE> OR
-        <CODE>HLR_ENC</CODE>. 
-        <CODE>HANDLER</CODE> POINTS TO THE
-        CALLBACK VECTOR OF THE APPROPRIATE TYPE. <CODE>USERDATA</CODE>
-        IS A DATA ITEM TO PASSED TO ALL CALLBACKS OF THIS PARTICULAR
-        HANDLER. FOR DETAILS, CHECK THE <CODE>SABLOT.H</CODE> AND
-        <CODE>SHANDLER.H</CODE> HEADER FILES.
-      </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTUNREGHANDLER(
-        SABLOTHANDLE PROCESSOR_, 
-        HANDLERTYPE TYPE,   
-        VOID *HANDLER, 
-        VOID *USERDATA);
-      </CODE>
-          </P>
-          <P CLASS="">UNREGISTERS THE GIVEN EXTERNAL HANDLER. FOR DETAILS, CHECK THE
-      <CODE>SABLOT.H</CODE> AND <CODE>SHANDLER.H</CODE> HEADER
-      FILES.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTSETLOG(
-        SABLOTHANDLE PROCESSOR_,
-        CONST CHAR *LOGFILENAME, 
-        INT LOGLEVEL);
-      </CODE>
-          </P>
-          <P CLASS="">SETS THE LOG FILENAME. THE <CODE>LOGLEVEL</CODE> PARAMETER
-      IS CURRENTLY NOT USED. PASS NULL FOR <CODE>LOGFILENAME</CODE> TO
-      TURN LOGGING OFF (DEFAULT). </P>
-          <P CLASS="">THE OTHER FUNCTIONS PUBLISHED BY SABLOT.H HAVE BEEN
-      INCLUDED FOR EXPERIMENTAL REASONS OR FOR COMPATIBILITY, AND IT
-      IS BETTER NOT TO USE THEM.
-      </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        INT SABLOTCLEARERROR(SABLOTHANDLE PROCESSOR_);
-      </CODE>
-          </P>
-          <P CLASS="">CLEARS THE 'PENDING ERROR' FLAG FOR THIS INSTANCE OF
-      SABLOTRON.</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__1416"></A>
-          <H3>
-            <A HREF="#TOC_I__1048">7.3&NBSP;&NBSP;GENERALIZED INTERFACE FUNCTIONS</A>
-          </H3>
-          <P CLASS="">THE IMPLEMENTATION OF THE <A HREF="#DOM">DOM INTERFACE</A>
-      BROUGHT THE NEED TO EXTEND SOME OF THE FUNCTIONS DESCRIBED IN
-      THE PREVIOUS SECTION. THIS EXTENSION ENABLES THE USER TO:
-      </P>
-          <UL>
-        <LI>PROCESS DOCUMENTS CREATED BY THE DOM FUNCTIONS, AND</LI>
-        <LI>PROCESS FREQUENTLY USED DOCUMENTS IN PRE-PARSED FORM.</LI>
-      </UL>
-          <P CLASS="">AN OBJECT CALLED <I>SITUATION</I> IS USED TO PROVIDE A
-PERSISTENT CONTEXT FOR ALL CALLS TO THE DOM-RELATED
-FUNCTIONS. FUNCTIONS USED TO MANIPULATE THE SITUATION ARE DESCRIBED IN
-<A HREF="#SITUATION">THE FOLLOWING SECTION</A>.</P>
-          <P CLASS="">
-            <B>NOTE:</B> IF NOT SPECIFIED OTHERWISE, ALL THESE
-      FUNCTIONS RETURN AN ERROR CODE. A POSITIVE VALUE INDICATES AN ERROR.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTCREATEDOCUMENT(SABLOTSITUATION S, 
-	    SDOM_DOCUMENT *D);
-      </CODE>
-          </P>
-          <P CLASS="">CREATES AN EMPTY DOCUMENT. TYPICALLY FOLLOWED BY CALLS TO
-      DOM FUNCTIONS TO POPULATE THE DOCUMENT.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTDESTROYDOCUMENT(SABLOTSITUATION S, 
-	    SDOM_DOCUMENT D);
-      </CODE>
-          </P>
-          <P CLASS="">DESTROYS A DOCUMENT, FREEING ALL THE NODES IT HAS CREATED.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTPARSE(SABLOTSITUATION S, 
-        CONST CHAR *URI, SDOM_DOCUMENT *D);
-      </CODE>
-          </P>
-          <P CLASS="">READS IN A DOCUMENT FROM THE GIVEN URI.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTPARSEBUFFER(SABLOTSITUATION S, 
-        CONST CHAR *BUFFER, SDOM_DOCUMENT *D);
-      </CODE>
-          </P>
-          <P CLASS="">READS IN A DOCUMENT FROM THE GIVEN IN-MEMORY BUFFER.</P>
-          <P CLASS="">THESE FUNCTIONS HAVE VARIANTS TO BE USED IF THE DOCUMENT
-      IS TO BE INTERPRETED AS AN XSLT STYLESHEET, NAMELY
-      <CODE>SABLOTPARSESTYLESHEET</CODE> AND
-      <CODE>SABLOTPARSESTYLESHEETBUFFER</CODE>.</P>
-          <P CLASS="">THE FOLLOWING FUNCTIONS GENERALIZE
-      <CODE>SABLOTRUNPROCESSOR</CODE> IN THAT THEY MAKE IT POSSIBLE TO
-      UTILIZE AN EXTRA KIND OF A SOURCE DOCUMENT: A DOM TREE.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTRUNPROCESSORGEN(SABLOTSITUATION S,
-        VOID *PROCESSOR_,
-        CHAR *SHEETURI, 
-        CHAR *INPUTURI, 
-        CHAR *RESULTURI);    
-      </CODE>
-          </P>
-          <P CLASS="">A KEY INGREDIENT OF THE EXTENDED INTERFACE. ONLY THE URIS
-      OF THE SOURCES AND OF THE RESULT DOCUMENT ARE GIVEN TO IT. THE
-      REST OF THE INFORMATION PASSED TO
-      <CODE>SABLOTRUNPROCESSOR</CODE> IS CONVEYED THROUGH
-      <CODE>SABLOTADDARGBUFFER,</CODE> <CODE>SABLOTADDARGTREE</CODE>
-      AND <CODE>SABLOTADDPARAM.</CODE> THE SCHEME PART OF THE
-      STYLESHEET URI OR THE INPUT URI MAY BE "ARG:", IN WHICH
-      CASE THEY REFER TO A BUFFER OR TREE PASSED BY THESE
-      FUNCTIONS. </P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTADDARGBUFFER(SABLOTSITUATION S,
-        VOID *PROCESSOR_,
-        CONST CHAR *ARGNAME,
-        CONST CHAR *BUFFERVALUE);
-</CODE>
-          </P>
-          <P CLASS="">CREATES A NAMED BUFFER FOR THE NEXT PROCESSOR RUN. THE
-      BUFFER'S NAME AND CONTENTS ARE PASSED AS ARGUMENTS. THE NAME
-      IS INTERPRETED RELATIVE TO THE 'ARG:/' SCHEME.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTADDARGTREE(SABLOTSITUATION S,
-        VOID *PROCESSOR_,
-        CONST CHAR *ARGNAME,
-        SDOM_DOCUMENT TREE);
-</CODE>
-          </P>
-          <P CLASS="">ASSOCIATES THE GIVEN DOCUMENT WITH A NAME FOR THE NEXT
-      PROCESSOR RUN. THE DOCUMENT IS <I>NOT</I> DESTROYED AFTER THE
-      RUN IS FINISHED. THE NAME IS INTERPRETED RELATIVE TO THE 'ARG:/'
-      SCHEME.</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTADDPARAM(SABLOTSITUATION S,
-        VOID *PROCESSOR_,
-        CONST CHAR *PARAMNAME,
-        CONST CHAR *PARAMVALUE);
-      </CODE>
-          </P>
-          <P CLASS="">ADDS A GLOBAL STYLESHEET PARAMETER FOR THE NEXT PROCESSOR
-      RUN.</P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__1578"></A>
-          <H3>
-            <A HREF="#TOC_I__1048">7.4&NBSP;&NBSP;THE SITUATION OBJECT</A>
-          </H3>
-          <P CLASS="">
-            <A NAME="SITUATION"></A>AT PRESENT, THE SITUATION OBJECT PRIMARILY HOLDS INFORMATION ON ANY PENDING ERRORS. A
-SITUATION IS CREATED USING</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTCREATESITUATION(SABLOTSITUATION
-      *SP);</CODE>
-          </P>
-          <P CLASS="">AND DESTROYED BY</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTDESTROYSITUATION(SABLOTSITUATION
-      S);</CODE>
-          </P>
-          <P CLASS="">TO CLEAR THE PENDING ERROR FLAG IN A SITUATION, USE</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>INT SABLOTCLEARSITUATION(SABLOTSITUATION
-      S);</CODE>
-          </P>
-          <P CLASS="">THE FOLLOWING SELF-EXPLANATORY FUNCTIONS EXTRACT PARTS OF THE ERROR INFORMATION
-      FROM THE SITUATION:</P>
-          <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-            <CODE>
-        CONST CHAR *SABLOTGETERRORURI(SABLOTSITUATION S);<BR>
-        INT SABLOTGETERRORLINE(SABLOTSITUATION S);<BR>
-        CONST CHAR *SABLOTGETERRORMSG(SABLOTSITUATION S);
-     </CODE>
-          </P>
-        </DIV>
-        <DIV CLASS="AFTERSKIP">
-          <A NAME="I__1631"></A>
-          <H3>
-            <A HREF="#TOC_I__1048">7.5&NBSP;&NBSP;DOCUMENT OBJECT MODEL (DOM) FUNCTIONS</A>
-          </H3>
-          <P CLASS="">
-            <A NAME="DOM"></A>STARTING WITH VERSION 0.60, SABLOTRON IMPLEMENTS
-      A MAJOR SUBSET OF THE DOM LEVEL 1 CORE SPECIFICATION <A HREF="#REF-DOM">[DOM]</A>. A BRIEF
-      DESCRIPTION OF THE IMPLEMENTED INTERFACE FOLLOWS; FOR MORE
-      DETAILS, PLEASE REFER TO THE HEADER FILE NAMED
-      <CODE>SDOM.H.</CODE>
-          </P>
-          <P CLASS="">ALL OF THE NAMES RELATED TO THE DOM INTERFACE START WITH
-      SDOM_ (FOR SABLOT DOM).</P>
-          <P CLASS="">MAJOR NEW TYPES ARE <CODE>SDOM_DOCUMENT</CODE> (A DOM TREE) AND
-      <CODE>SDOM_NODE</CODE> (A NODE OF THE TREE). A DOCUMENT CAN ALSO BE USED IN
-      PLACE OF A NODE. THIS REFLECTS THE FACT IN THE DOM SPEC, 
-      DOCUMENT IS A SUBCLASS OF NODE. WHEN USED IN THIS WAY, THE
-      DOCUMENT REPRESENTS ITS OWN ROOT NODE (WHICH IS NOT THE SAME AS
-      THE `ROOT ELEMENT').</P>
-          <P CLASS="">OTHER TYPES INCLUDE:</P>
-          <UL>
-        <LI>
-              <CODE>SDOM_CHAR:</CODE> A DOM CHARACTER TYPE. CURRENTLY, THIS IS JUST
-        CHAR. NOTE THAT THE DOM SPEC REQUIRES THAT THE DOM
-        IMPLEMENTATIONS WORK WITH UTF-16. SABLOTRON DEVIATES FROM THIS
-        BY USING UTF-8 INSTEAD. A SEPARATE SET OF FUNCTIONS TAKING
-        UTF-16 STRINGS WILL BE PROVIDED.</LI>
-        <LI>
-              <CODE>SDOM_NODETYPE:</CODE> A NODE TYPE ENUM. SOME OF THE VALUES ARE
-        <CODE>SDOM_ELEMENT_NODE,</CODE> <CODE>SDOM_ATTRIBUTE_NODE</CODE> AND <CODE>SDOM_TEXT_NODE.</CODE> SEE
-        <CODE>SDOM.H</CODE> FOR THE REST.</LI>
-        <LI>
-              <CODE>SDOM_NODELIST:</CODE> A NODE LIST RETURNED BY SOME OF THE
-        FUNCTIONS.</LI>
-        <LI>
-              <CODE>SDOM_EXCEPTION:</CODE> DOM EXCEPTION CODES ENUM, WITH VALUES SUCH
-        AS <CODE>SDOM_NOT_FOUND_ERR</CODE> OR <CODE>SDOM_INVALID_NODE_TYPE</CODE>. SEE <CODE>SDOM.H</CODE>
-        FOR DETAILS.</LI>
-</UL>
-          <P CLASS="">THE FUNCTIONS LISTED BELOW ARE IMPLEMENTED MORE OR LESS AS DEFINED IN
-      THE DOM LEVEL 1 SPECIFICATION, WITH TWO EXCEPTIONS:
-      THEIR NAMES ARE PREFIXED WITH <CODE>SDOM_</CODE> AND THE FIRST ARGUMENT IS
-      ALWAYS A <CODE>SABLOTSITUATION.</CODE> ALL THE FUNCTIONS RETURN
-      A <CODE>SDOM_EXCEPTION.</CODE> </P>
-          <UL>
-<LI>
-              <CODE>CREATEELEMENT, CREATEATTRIBUTE, CREATETEXTNODE,
-CREATECDATASECTION, CREATECOMMENT, CREATEPROCESSINGINSTRUCTION</CODE>
-            </LI>
-<LI>
-              <CODE>GETNODETYPE, GETNODENAME, SETNODENAME, GETNODEVALUE, SETNODEVALUE</CODE>
-            </LI>
-<LI>
-              <CODE>GETPARENTNODE, GETFIRSTCHILD, GETLASTCHILD, GETPREVIOUSSIBLING,
-GETNEXTSIBLING, GETOWNERDOCUMENT</CODE>
-            </LI>
-<LI>
-              <CODE>INSERTBEFORE, APPENDCHILD, REMOVECHILD, REPLACECHILD</CODE>
-            </LI>
-<LI>
-              <CODE>CLONENODE</CODE>
-            </LI>
-<LI>
-              <CODE>GETATTRIBUTE, SETATTRIBUTE, REMOVEATTRIBUTE, GETATTRIBUTELIST</CODE>
-            </LI>
-</UL>
-          <P CLASS="">SEVERAL FUNCTIONS HAVE BEEN ADDED:</P>
-          <UL>
-<LI>
-              <CODE>DISPOSENODE</CODE> FREES ALL MEMORY USED BY THE GIVEN NODE</LI>
-<LI>
-              <CODE>CLONEFOREIGNNODE</CODE> CLONES A NODE FROM A DIFFERENT
-DOCUMENT</LI>
-<LI>
-              <CODE>DOCTOSTRING</CODE> SERIALIZES THE DOCUMENT, RETURNING THE
-RESULTING STRING</LI>
-<LI>
-              <CODE>XQL</CODE> PERFORMS AN XPATH QUERY ON THE DOM TREE,
-RETURNING A LIST OF THE NODES SATISFYING IT.</LI>
-</UL>
-          <P CLASS="">IN ADDITION, THERE ARE SOME FUNCTIONS USED TO MANIPULATE
-      THE NODE LISTS RETURNED BY <CODE>XQL</CODE> AND
-      <CODE>GETATTRIBUTELIST</CODE>. THESE INCLUDE
-      <CODE>GETNODELISTLENGTH</CODE>, <CODE>GETNODELISTITEM</CODE> AND
-      <CODE>DISPOSENODELIST</CODE>.</P>
-          <P CLASS="">FINALLY, THERE ARE FUNCTIONS TO EXTRACT DOM
-      EXCEPTION-RELATED INFORMATION FROM THE SITUATION OBJECT, NAMELY
-      <CODE>GETEXCEPTIONCODE</CODE>, <CODE>GETEXCEPTIONMESSAGE</CODE>
-      AND <CODE>GETEXCEPTIONDETAILS</CODE>.</P>
-        </DIV>
-      </DIV>
-    </DIV>
-    <DIV CLASS="AFTERSKIP">
-      <A NAME="I__1870"></A>
-      <H2>
-        <A HREF="#TOC_I__1870">8&NBSP;&NBSP;THE COMMAND LINE INTERFACE</A>
-      </H2>
-      <DIV>
-        <P CLASS="">SABLOTRON COMES WITH A COMMAND-LINE INTERFACE TO THE
-        SHARED LIBRARY, WHICH IS A PROGRAM NAMED
-        <CODE>SABCMD</CODE>. AT PRESENT, <CODE>SABCMD</CODE> IS INVOKED
-        AS FOLLOWS:</P>
-        <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-          <CODE>
-      SABCMD [<I>OPTIONS</I>] <I>STYLESHEET</I> [<I>INPUT</I> [<I>RESULT</I>]] [<I>ASSIGNMENTS</I>]
-      </CODE>
-        </P>
-        <P CLASS="">THE ARGUMENTS ARE THE URIS OF THE XSLT STYLESHEET, THE
-      XML INPUT DOCUMENT, AND THE RESULTING DOCUMENT, RESPECTIVELY. THE
-      DEFAULT FOR <CODE>
-            <I>INPUT</I>
-          </CODE> IS
-      <CODE>FILE://STDIN</CODE> (MEANING PLAIN OLD STDIN);
-      <CODE>
-            <I>RESULT</I>
-          </CODE> DEFAULTS TO
-      <CODE>FILE://STDOUT</CODE>. FILENAMES HAVE TO INCLUDE THE EXTENSION (IF
-      ANY).</P>
-        <P CLASS="">YOU CAN DISPLAY THE LIST OF AVAILABLE OPTIONS BY TYPING
-      <CODE>SABCMD --HELP</CODE>. AMONG THE MORE USEFUL ONES ARE
-      <CODE>--LOG-FILE</CODE> (FOR SETTING THE LOG FILE) AND
-      <CODE>--MEASURE</CODE> (MEASURES AND OUTPUTS THE TOTAL
-      PROCESSING TIME).
-      </P>
-        <P CLASS="">
-          <A HREF="#FNAME-RULES">THE RULES FOR FILENAMES</A> ARE THE SAME AS
-      WITH <CODE>SABLOTPROCESS()</CODE>. 
-      </P>
-        <P CLASS="">
-          <CODE>ASSIGNMENTS</CODE> IS A SERIES OF DEFINITIONS OF THE
-      FORM:</P>
-        <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-          <CODE>
-      NAME1=VALUE1 NAME2=VALUE2 ...
-      </CODE>
-        </P>
-        <P CLASS="">
-      ASSIGNING VALUES TO TOP-LEVEL STYLESHEET PARAMETERS AND TO NAMED
-      BUFFERS. THESE TWO CASES ARE DISTINGUISHED BY A LEADING '$' IN
-      THE NAME OF A STYLESHEET PARAMETER. THE NAMES OF THE BUFFERS DO
-      <I>NOT</I> START WITH "ARG:". THEY MAY START WITH A SLASH; IF
-      THEY DON'T, THE SLASH IS PREPENDED. 
-      </P>
-        <P CLASS="">
-          <B>NOTE:</B> IN MOST CASES, IT WILL BE NECESSARY TO QUOTE
-      THE INDIVIDUAL ASSIGNMENTS. WHETHER TO USE SINGLE OR DOUBLE
-      QUOTES MAY DEPEND ON THE SHELL USED (OR MAY IT?) SINGLE QUOTES
-      WORK FOR BASH, DOUBLE QUOTES WORK IN WINDOWS.
-      </P>
-        <P CLASS="">IF THE RESULT URI REFERS TO A NAMED BUFFER, THE OUTPUT
-      WOULD NORMALLY REMAIN BURIED IN MEMORY. SABCMD DUMPS THE BUFFER TO STANDARD
-      OUTPUT INSTEAD.
-      </P>
-        <P CLASS="">TO SUM UP AND GIVE AN EXAMPLE, THE FOLLOWING WOULD BE A
-      VALID INVOCATION OF SABCMD:</P>
-        <P CLASS="" STYLE="BACKGROUND-COLOR: #FFFFEE">
-          <CODE>
-      SABCMD SHEET.XSL ARG:/THE_INPUT "THE_INPUT=&LT;A/>"
-      "$USE_DEFAULTS=1"
-      </CODE>
-        </P>
-        <P CLASS="">THIS PROCESSES THE DOCUMENT PASSED IN THE BUFFER NAMED
-      THE_INPUT, USING A STYLESHEET FOUND IN FILE "SHEET.XSL" IN THE
-      WORKING DIRECTORY. WE ASSIGN 1 TO THE TOP-LEVEL PARAMETER CALLED
-      "USE_DEFAULTS". THE OUTPUT GOES TO STDOUT BY DEFAULT.
-      </P>
-      </DIV>
-    </DIV>
-    <DIV CLASS="AFTERSKIP">
-      <A NAME="I__2013"></A>
-      <H2>
-        <A HREF="#TOC_I__2013">9&NBSP;&NBSP;REFERENCES</A>
-      </H2>
-      <DIV>
-        <DL>
-      <DT>
-            <A NAME="REF-XSLT"></A>[XSLT]</DT>
-      <DD>
-        <A HREF="HTTP://WWW.W3.ORG/TR/1999/REC-XSLT-19991116">
-          XSL TRANSFORMATIONS (XSLT) VERSION 1.0
-        </A>
-      </DD>
-
-      <DT>
-            <A NAME="REF-XPATH"></A>[XPATH]</DT>
-      <DD> 
-        <A HREF="HTTP://WWW.W3.ORG/TR/1999/REC-XPATH-19991116">
-          XML PATH LANGUAGE (XPATH) VERSION 1.0
-        </A>
-      </DD>
-
-      <DT>
-            <A NAME="REF-XML"></A>[XML]</DT>
-      <DD>
-        <A HREF="HTTP://WWW.W3.ORG/TR/1998/REC-XML-19980210">
-          EXTENSIBLE MARKUP LANGUAGE (XML) 1.0
-        </A>
-      </DD>
-
-      <DT>
-            <A NAME="REF-DOM"></A>[DOM]</DT>
-      <DD>
-        <A HREF="HTTP://WWW.W3.ORG/TR/REC-DOM-LEVEL-1">
-          DOCUMENT OBJECT MODEL LEVEL 1 SPECIFICATION, VERSION 1.0
-        </A>
-      </DD>
-
-      <DT>
-            <A NAME="REF-RCOVER"></A>[COVER]</DT>
-      <DD>
-        <A HREF="HTTP://WWW.OASIS-OPEN.ORG/COVER/SGML-XML.HTML">
-          THE XML COVER PAGES</A>
-      </DD>
-      
-      <DT>
-            <A NAME="REF-XMLORG"></A>[XMLORG]</DT>
-      <DD>
-        <A HREF="HTTP://XML.ORG">XML.ORG</A>
-      </DD>
-
-      <DT>
-            <A NAME="REF-XSLINFO"></A>[XSLINFO]</DT>
-      <DD>
-        <A HREF="HTTP://WWW.XSLINFO.COM">XSLINFO.COM</A>
-      </DD>
-
-      <DT>
-            <A NAME="REF-BIBLE"></A>[XMLBIBLE14]</DT>
-      <DD>
-        <A HREF="HTTP://METALAB.UNC.EDU/XML/BOOKS/BIBLE/UPDATES/14.HTML">
-          HAROLD, E. R.: XML BIBLE, CHAPTER 14 (ONLINE PRESENTATION)
-        </A>
-      </DD>
-    </DL>
-      </DIV>
-    </DIV>
-    <HR>
-    <P STYLE="FONT-STYLE: ITALIC; MARGIN-LEFT: 0">(C) 2000 GINGER ALLIANCE S.R.O.</P>
-  </BODY>
-</HTML>
\ No newline at end of file
diff --git a/test/uc_exit_wu b/test/uc_exit_wu
deleted file mode 100644
index 242e4ff..0000000
--- a/test/uc_exit_wu
+++ /dev/null
@@ -1,10 +0,0 @@
-<file_info>
-    <number>0</number>
-</file_info>
-<workunit>
-    <file_ref>
-        <file_number>0</file_number>
-        <open_name>in</open_name>
-    </file_ref>
-    <command_line>-exit</command_line>
-</workunit>
diff --git a/test/uc_multiple_download_wu b/test/uc_multiple_download_wu
deleted file mode 100644
index dd67573..0000000
--- a/test/uc_multiple_download_wu
+++ /dev/null
@@ -1,14 +0,0 @@
-<file_info>
-    <name><INFILE_0/></name>
-    <url><DOWNLOAD_URL/>/<INFILE_0/></url>
-    <url><DOWNLOAD_URL/>0/<INFILE_0/></url>
-    <url><DOWNLOAD_URL/>1/<INFILE_0/></url>	
-    <url><DOWNLOAD_URL/>2/<INFILE_0/></url>
-    <md5_cksum><MD5_0/></md5_cksum>
-</file_info>
-<workunit>
-    <file_ref>
-        <file_name><INFILE_0/></file_name>
-        <open_name>in</open_name>
-    </file_ref>
-</workunit>
diff --git a/test/uc_multiple_uploads_result b/test/uc_multiple_uploads_result
deleted file mode 100644
index 6078c6f..0000000
--- a/test/uc_multiple_uploads_result
+++ /dev/null
@@ -1,16 +0,0 @@
-<file_info>
-    <name><OUTFILE_0/></name>
-    <generated_locally/>
-    <upload_when_present/>
-    <max_nbytes>100000</max_nbytes>
-    <url><UPLOAD_URL/></url>
-    <url><UPLOAD_URL/>0</url>
-    <url><UPLOAD_URL/>1</url>
-    <url><UPLOAD_URL/>2</url>
-</file_info>
-<result>
-    <file_ref>
-        <file_name><OUTFILE_0/></file_name>
-        <open_name>out</open_name>
-    </file_ref>
-</result>
diff --git a/test/uc_result_sticky b/test/uc_result_sticky
deleted file mode 100644
index 7c03092..0000000
--- a/test/uc_result_sticky
+++ /dev/null
@@ -1,14 +0,0 @@
-<file_info>
-    <name><OUTFILE_0/></name>
-    <generated_locally/>
-    <upload_when_present/>
-    <max_nbytes>100000</max_nbytes>
-    <url><UPLOAD_URL/></url>
-    <sticky/>
-</file_info>
-<result>
-    <file_ref>
-        <file_name><OUTFILE_0/></file_name>
-        <open_name>out</open_name>
-    </file_ref>
-</result>
diff --git a/test/uc_sig_wu b/test/uc_sig_wu
deleted file mode 100644
index 96a1c3d..0000000
--- a/test/uc_sig_wu
+++ /dev/null
@@ -1,10 +0,0 @@
-<file_info>
-    <number>0</number>
-</file_info>
-<workunit>
-    <file_ref>
-        <file_number>0</file_number>
-        <open_name>in</open_name>
-    </file_ref>
-    <command_line>-signal</command_line>
-</workunit>
diff --git a/test/uc_small_correct_output b/test/uc_small_correct_output
deleted file mode 100644
index 26f7a5f..0000000
--- a/test/uc_small_correct_output
+++ /dev/null
@@ -1 +0,0 @@
-FJFIWFWNFWIEOWEFNKJ
diff --git a/test/uc_wu_nodelete b/test/uc_wu_nodelete
deleted file mode 100644
index f92f1d5..0000000
--- a/test/uc_wu_nodelete
+++ /dev/null
@@ -1,9 +0,0 @@
-<file_info>
-    <number>0</number>
-</file_info>
-<workunit>
-    <file_ref>
-        <file_number>0</file_number>
-        <open_name>in</open_name>
-    </file_ref>
-</workunit>
diff --git a/test/uc_wu_sticky b/test/uc_wu_sticky
deleted file mode 100644
index 4b0b2ba..0000000
--- a/test/uc_wu_sticky
+++ /dev/null
@@ -1,10 +0,0 @@
-<file_info>
-    <number>0</number>
-    <sticky/>
-</file_info>
-<workunit>
-    <file_ref>
-        <file_number>0</file_number>
-        <open_name>in</open_name>
-    </file_ref>
-</workunit>
diff --git a/test/ucs_wu b/test/ucs_wu
deleted file mode 100644
index 165e9f5..0000000
--- a/test/ucs_wu
+++ /dev/null
@@ -1,10 +0,0 @@
-<file_info>
-    <number>0</number>
-</file_info>
-<workunit>
-    <file_ref>
-        <file_number>0</file_number>
-        <open_name>in</open_name>
-    </file_ref>
-    <command_line>-run_slow</command_line>
-</workunit>
diff --git a/test/version.inc.in b/test/version.inc.in
deleted file mode 100644
index c2ab89f..0000000
--- a/test/version.inc.in
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-// version.inc.in
-
-// defines version numbers using autoconf
-define("MAJOR_VERSION", @MAJOR_VERSION@);
-define("MINOR_VERSION", @MINOR_VERSION@);
-define("CLIENT_BIN_FILENAME", "@CLIENT_BIN_FILENAME@");
-define("PLATFORM", "@host@");
-define("SRC_DIR", "@SOURCE_TOP_DIR@");
-
-?>
diff --git a/test/version.py.in b/test/version.py.in
deleted file mode 100644
index 114eb90..0000000
--- a/test/version.py.in
+++ /dev/null
@@ -1,11 +0,0 @@
-## $Id: version.py.in 3856 2004-07-13 10:36:18Z quarl $
-
-# define version numbers using autoconf
-BOINC_MAJOR_VERSION = @BOINC_MAJOR_VERSION@
-BOINC_MINOR_VERSION = @BOINC_MINOR_VERSION@
-CLIENT_BIN_FILENAME = "@CLIENT_BIN_FILENAME@"
-PLATFORM = "@host@"
-SRC_DIR = "@SOURCE_TOP_DIR@"
-
-# todo: use TOP_SRC_DIR, SRC_DIR, BUILD_DIR from autoconf; can remove AC_SUBST
-# for SOURCE_TOP_DIR
diff --git a/testbase b/testbase
old mode 100755
new mode 100644
diff --git a/tools/backend_lib.cpp b/tools/backend_lib.cpp
index e4c3c40..d90abfb 100644
--- a/tools/backend_lib.cpp
+++ b/tools/backend_lib.cpp
@@ -535,4 +535,4 @@ int cancel_jobs(int min_id, int max_id) {
     return 0;
 }
 
-const char *BOINC_RCSID_b5f8b10eb5 = "$Id: backend_lib.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_b5f8b10eb5 = "$Id$";
diff --git a/tools/create_work.cpp b/tools/create_work.cpp
index df8dd2f..eafb66a 100644
--- a/tools/create_work.cpp
+++ b/tools/create_work.cpp
@@ -306,4 +306,4 @@ int main(int argc, const char** argv) {
     boinc_db.close();
 }
 
-const char *BOINC_RCSID_3865dbbf46 = "$Id: create_work.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_3865dbbf46 = "$Id$";
diff --git a/tools/db_query b/tools/db_query
index f5649da..4852cfa 100755
--- a/tools/db_query
+++ b/tools/db_query
@@ -1,4 +1,4 @@
-#! /bin/csh
+#! /bin/tcsh
 
 set CIVDATE = `date "+%Y:%m:%d:%H:%M"`
 set UNIXDATE = `perl -e 'print time()'`
diff --git a/tools/dbcheck_files_exist b/tools/dbcheck_files_exist
deleted file mode 100755
index 7e6767a..0000000
--- a/tools/dbcheck_files_exist
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-
-import os, re, boinc_path_config
-from Boinc import database, db_mid, boinc_db, configxml
-
-database.connect()
-config = configxml.default_config().config
-
-def get_file_path(wu):
-    return os.path.join(config.download_dir,
-                        re.search('<name>(.*)</name>',wu.xml_doc).group(1))
-
-print "Checking for missing input files ...\n"
-
-for (ss_name,server_state) in [
-    ("UNSENT",boinc_db.RESULT_SERVER_STATE_UNSENT),
-    ("IN_PROGRESS",boinc_db.RESULT_SERVER_STATE_IN_PROGRESS)]:
-    print "=== %s ===" %ss_name
-    count_total = 0
-    count_errors = 0
-    for result in database.Results.iterate(server_state=server_state):
-        file = get_file_path(result.workunit)
-        if not os.path.exists(file):
-            print result, " file %s doesn't exist"%file
-            count_errors += 1
-        count_total += 1
-    print "Total: %d/%d errors/results\n" %(count_errors,count_total)
diff --git a/tools/dir_hier_move.cpp b/tools/dir_hier_move.cpp
index 91480fc..9e3a871 100644
--- a/tools/dir_hier_move.cpp
+++ b/tools/dir_hier_move.cpp
@@ -42,15 +42,15 @@ int main(int argc, char** argv) {
     int retval;
     
     if ( (argc == 1) || !strcmp(argv[1], "-h")  || !strcmp(argv[1],"--help") || (argc != 4) ) {
-      printf (usage);
-      exit(1);
+        fprintf(stderr, usage);
+        exit(1);
     }
     src_dir = argv[1];
     dst_dir = argv[2];
     fanout = atoi(argv[3]);
     if (!fanout) {
-      printf ( usage );
-      exit(1);
+        fprintf(stderr, usage);
+        exit(1);
     }
 
     DirScanner scanner(src_dir);
@@ -69,4 +69,4 @@ int main(int argc, char** argv) {
     }
 }
 
-const char *BOINC_RCSID_d6492ba662 = "$Id: dir_hier_move.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_d6492ba662 = "$Id$";
diff --git a/tools/dir_hier_path.cpp b/tools/dir_hier_path.cpp
index 9c938d4..e8b952a 100644
--- a/tools/dir_hier_path.cpp
+++ b/tools/dir_hier_path.cpp
@@ -42,8 +42,8 @@ int main(int argc, char** argv) {
     int retval;
 
     if ( (argc == 1) ||  !strcmp(argv[1], "-h")  || !strcmp(argv[1],"--help") || (argc != 2) ) {
-      printf (usage);
-      exit(1);
+        fprintf(stderr, usage);
+        exit(1);
     }
 
     retval = config.parse_file();
@@ -62,4 +62,4 @@ int main(int argc, char** argv) {
     printf("%s\n", path);
 }
 
-const char *BOINC_RCSID_c683969ea8 = "$Id: dir_hier_path.cpp 25682 2012-05-15 19:07:12Z romw $";
+const char *BOINC_RCSID_c683969ea8 = "$Id$";
diff --git a/tools/grep_logs b/tools/grep_logs
deleted file mode 100755
index 559721a..0000000
--- a/tools/grep_logs
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/env perl
-
-# $Id: grep_logs 4120 2004-08-27 22:31:02Z boincadm $
-# greplogs - grep logs for a string.
-
-use strict;
-use warnings;
-use bytes;
-
-my $html = 0;
-my $lines = 0;
-die unless @ARGV;
-if ($ARGV[0] eq '-html') {
-    shift;
-    $html = 1;
-}
-if ($ARGV[0] eq '-l') {
-    shift;
-    $lines = shift;
-}
-
-my $s = shift; die unless defined $s;
-
-# if the string to grep for ends with a digit, add a zero-width negative
-# look-ahead assertion against another digit.  e.g., if we are searching for
-# "wu_12" do not match "wu_125".
-if ($s =~ /\d$/) {
-    $s .= "(?!\\d)";
-}
-
-my $prev_file = '';
-
-my $nlines = 0;
-my @slines = ();
-
-sub printline($)
-{
-  ++$nlines;
-  if ($lines < 0) {
-     # tail - need to store all lines first
-     push(@slines, $_[0]);
-  } else {
-     return     if ($lines > 0 && $nlines > $lines) ;
-     print $_[0];
-  }
-};
-sub finish_printlines()
-{
-  if ($lines < 0) {
-       if (scalar(@slines) > -$lines) {
-          @slines = @slines[$#slines+$lines+1..$#slines]; 
-       }
-       print @slines;
-  }
-  $nlines = 0;
-  @slines = ();
-}
-
-if ($html) { print "<pre>"; }
-while (<ARGV>) {
-    chomp;
-    if (/$s/) {
-        if ($ARGV ne $prev_file) {
-            finish_printlines();
-            $prev_file = $ARGV;
-            if ($html) {
-                print "</pre><h2>$ARGV</h2><pre>";
-            } else {
-                print "\n\n$ARGV:\n";
-            }
-            $nlines = 0;
-            $. = 0;
-        }
-        my $n = sprintf("%05d", $.);
-                
-        if ($html) {
-            s%.*debug.*%<font color=grey>$&</font>%i;
-            s%.*(critical|error).*%<font color=red>$&</font>%i;
-            s%$s%<b>$&</b>%g if $s;
-            printline "<font size=-1><a name=$. href=show_log.php?f=$ARGV#$.>$n</a></font>  $_\n";
-        } else {
-            printline "  $n: $_\n";
-        }
-    }
-}
-finish_printlines();
-if ($html) { print "</pre>"; }
diff --git a/tools/hr_db_convert.cpp b/tools/hr_db_convert.cpp
index d09620b..7c20744 100644
--- a/tools/hr_db_convert.cpp
+++ b/tools/hr_db_convert.cpp
@@ -58,4 +58,4 @@ int main() {
   }
 
 };
-const char *BOINC_RCSID_b8522ef5bd = "$Id: hr_db_convert.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_b8522ef5bd = "$Id$";
diff --git a/tools/kill_wu.cpp b/tools/kill_wu.cpp
index 8f68076..bc6e3ad 100644
--- a/tools/kill_wu.cpp
+++ b/tools/kill_wu.cpp
@@ -98,4 +98,4 @@ int main(int argc, char** argv){
     boinc_db.close();
     return final;
 }
-const char *BOINC_RCSID_a63ea0ae5e="$Id: kill_wu.cpp 18042 2009-05-07 13:54:51Z davea $";
+const char *BOINC_RCSID_a63ea0ae5e="$Id$";
diff --git a/tools/make_project b/tools/make_project
index 5b65438..0ade4c7 100755
--- a/tools/make_project
+++ b/tools/make_project
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# $Id: make_project 25322 2012-02-24 03:26:30Z davea $
+# $Id$
 # Creates a new BOINC project.
 
 import boinc_path_config
diff --git a/tools/parse_config b/tools/parse_config
index 1ce1aed..7c7952d 100755
--- a/tools/parse_config
+++ b/tools/parse_config
@@ -2,7 +2,7 @@
 
 # -*- mode: python; python-indent: 4; -*-
 
-## $Id: parse_config 18376 2009-06-11 16:06:25Z davea $
+## $Id$
 
 '''
 A program to pass config file settings to calling programs via stdout
diff --git a/tools/poll_wu.cpp b/tools/poll_wu.cpp
index cd25cfb..2be64f9 100644
--- a/tools/poll_wu.cpp
+++ b/tools/poll_wu.cpp
@@ -136,4 +136,4 @@ int main(int argc, char** argv){
     boinc_db.close();
     return final;
 }
-const char *BOINC_RCSID_6d019426c9="$Id: poll_wu.cpp 24413 2011-10-18 07:15:04Z davea $";
+const char *BOINC_RCSID_6d019426c9="$Id$";
diff --git a/tools/process_result_template.cpp b/tools/process_result_template.cpp
index af9d73d..b292b7d 100644
--- a/tools/process_result_template.cpp
+++ b/tools/process_result_template.cpp
@@ -164,4 +164,4 @@ int process_result_template(
     return 0;
 }
 
-const char *BOINC_RCSID_e5e1e879f3 = "$Id: process_result_template.cpp 24057 2011-08-27 16:52:04Z davea $";
+const char *BOINC_RCSID_e5e1e879f3 = "$Id$";
diff --git a/tools/sign_executable.cpp b/tools/sign_executable.cpp
index 587a3b9..3c10c2d 100644
--- a/tools/sign_executable.cpp
+++ b/tools/sign_executable.cpp
@@ -59,4 +59,4 @@ int main(int argc, char** argv) {
     return 0;
 }
 
-const char *BOINC_RCSID_1a27b0b4b8 = "$Id: sign_executable.cpp 16069 2008-09-26 18:20:24Z davea $";
+const char *BOINC_RCSID_1a27b0b4b8 = "$Id$";
diff --git a/tools/upgrade b/tools/upgrade
index 57071ac..467370a 100755
--- a/tools/upgrade
+++ b/tools/upgrade
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# $Id: upgrade 23358 2011-04-09 03:10:29Z davea $
+# $Id$
 
 '''
 Usage: upgrade [options] project_root
diff --git a/tools/xadd b/tools/xadd
index 2d2831d..5a6d3c2 100755
--- a/tools/xadd
+++ b/tools/xadd
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# $Id: xadd 18374 2009-06-11 15:38:48Z davea $
+# $Id$
 
 '''
 Add platform and application records to the BOINC database.
diff --git a/version.h b/version.h
new file mode 100644
index 0000000..db9c6cf
--- /dev/null
+++ b/version.h
@@ -0,0 +1,43 @@
+/* Platform independent version definitions... */
+
+#ifndef BOINC_VERSION_H
+#define BOINC_VERSION_H
+
+/* Major part of BOINC version number */
+#define BOINC_MAJOR_VERSION 7
+
+/* Minor part of BOINC version number */
+#define BOINC_MINOR_VERSION 0
+
+/* Release part of BOINC version number */
+#define BOINC_RELEASE 38
+
+/* String representation of BOINC version number */
+#define BOINC_VERSION_STRING "7.0.38"
+
+/* Package is a pre-release (Alpha/Beta) package */
+/* #define BOINC_PRERELEASE 1 */
+
+#if (defined(_WIN32) || defined(__APPLE__))
+/* Name of package */
+#define PACKAGE "boinc"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "BOINC"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "BOINC 7.0.38"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "boinc"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "7.0.38"
+
+#endif /* #if (defined(_WIN32) || defined(__APPLE__)) */
+
+#endif /* #ifndef BOINC_VERSION_H */
+
diff --git a/win_build/CharityEngine.sln b/win_build/CharityEngine.sln
new file mode 100644
index 0000000..ad87346
--- /dev/null
+++ b/win_build/CharityEngine.sln
@@ -0,0 +1,307 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc", "ce_boinc_cli.vcproj", "{C04F0FCC-BB5D-4627-8656-6173B28BD69E}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc_dll", "ce_boinc_dll.vcproj", "{B06280CB-82A4-46DE-8956-602643078BDF}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc_ss", "ce_boinc_ss.vcproj", "{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinccmd", "ce_boinccmd.vcproj", "{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E} = {C04F0FCC-BB5D-4627-8656-6173B28BD69E}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincmgr", "ce_boincmgr.vcproj", "{06113715-AC51-4E91-8B9D-C987CABE0920}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E} = {C04F0FCC-BB5D-4627-8656-6173B28BD69E}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboinc", "libboinc.vcproj", "{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinctray", "ce_boinctray.vcproj", "{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincsvcctrl", "ce_boincsvcctrl.vcproj", "{9FC47E90-4E0D-4383-B446-A84314B00764}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ss_app", "ce_ss_app.vcproj", "{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF} = {D3D21F11-A7E7-4EA2-8518-E24695133BFF}
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4} = {814EBFD3-3CE6-4933-A580-C1FE3147ACB4}
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98} = {5F065EAC-B881-4E9A-9E34-7A21D7A01D98}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgraphics2", "libgraphics2.vcproj", "{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeglib", "jpeglib.vcproj", "{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "image_libs", "image_libs.vcproj", "{D3D21F11-A7E7-4EA2-8518-E24695133BFF}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		Samples - Debug|Win32 = Samples - Debug|Win32
+		Samples - Debug|x64 = Samples - Debug|x64
+		Samples - Release|Win32 = Samples - Release|Win32
+		Samples - Release|x64 = Samples - Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|Win32.Build.0 = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|x64.ActiveCfg = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|x64.Build.0 = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|Win32.ActiveCfg = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|Win32.Build.0 = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|x64.ActiveCfg = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|x64.Build.0 = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|Win32.ActiveCfg = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|Win32.Build.0 = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|x64.ActiveCfg = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|x64.Build.0 = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|Win32.ActiveCfg = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|Win32.Build.0 = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|x64.ActiveCfg = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|x64.Build.0 = Release|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|Win32.Build.0 = Debug|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|x64.ActiveCfg = Debug|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|x64.Build.0 = Debug|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|Win32.ActiveCfg = Release|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|Win32.Build.0 = Release|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|x64.ActiveCfg = Release|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|x64.Build.0 = Release|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Debug|Win32.ActiveCfg = Debug|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Debug|Win32.Build.0 = Debug|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Debug|x64.ActiveCfg = Debug|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Debug|x64.Build.0 = Debug|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Release|Win32.ActiveCfg = Release|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Release|Win32.Build.0 = Release|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Release|x64.ActiveCfg = Release|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Release|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|x64.Build.0 = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|Win32.Build.0 = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|x64.ActiveCfg = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|x64.Build.0 = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|Win32.ActiveCfg = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|Win32.Build.0 = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|x64.ActiveCfg = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|x64.Build.0 = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|Win32.ActiveCfg = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|Win32.Build.0 = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|x64.ActiveCfg = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|x64.Build.0 = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|Win32.ActiveCfg = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|Win32.Build.0 = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|x64.ActiveCfg = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|x64.Build.0 = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|Win32.ActiveCfg = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|Win32.Build.0 = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|x64.ActiveCfg = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|x64.Build.0 = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|Win32.ActiveCfg = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|Win32.Build.0 = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|x64.ActiveCfg = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|x64.Build.0 = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|Win32.ActiveCfg = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|Win32.Build.0 = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|x64.ActiveCfg = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|x64.Build.0 = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|Win32.ActiveCfg = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|Win32.Build.0 = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|x64.ActiveCfg = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|x64.Build.0 = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.Build.0 = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.ActiveCfg = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.Build.0 = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.ActiveCfg = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.Build.0 = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.ActiveCfg = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.Build.0 = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|x64.Build.0 = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|Win32.Build.0 = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|x64.ActiveCfg = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|x64.Build.0 = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|Win32.ActiveCfg = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|Win32.Build.0 = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|x64.ActiveCfg = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|x64.Build.0 = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|Win32.ActiveCfg = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|Win32.Build.0 = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|x64.ActiveCfg = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|x64.Build.0 = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|Win32.ActiveCfg = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|Win32.Build.0 = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|x64.ActiveCfg = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|x64.Build.0 = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|Win32.Build.0 = Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|x64.ActiveCfg = Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|x64.Build.0 = Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|Win32.ActiveCfg = Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|Win32.Build.0 = Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|x64.ActiveCfg = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|x64.Build.0 = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|Win32.Build.0 = Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|x64.ActiveCfg = Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|x64.Build.0 = Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|Win32.ActiveCfg = Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|Win32.Build.0 = Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|x64.ActiveCfg = Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|x64.Build.0 = Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|Win32.Build.0 = Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|x64.ActiveCfg = Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|x64.Build.0 = Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|Win32.ActiveCfg = Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|Win32.Build.0 = Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|x64.ActiveCfg = Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|x64.Build.0 = Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|Win32.Build.0 = Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|x64.ActiveCfg = Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|x64.Build.0 = Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|Win32.ActiveCfg = Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|Win32.Build.0 = Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|x64.ActiveCfg = Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|x64.Build.0 = Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|x64.Build.0 = Samples - Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/win_build/Progress.sln b/win_build/Progress.sln
new file mode 100644
index 0000000..fcf7572
--- /dev/null
+++ b/win_build/Progress.sln
@@ -0,0 +1,145 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc", "ptp_boinc_cli.vcproj", "{C04F0FCC-BB5D-4627-8656-6173B28BD69E}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc_dll", "ptp_boinc_dll.vcproj", "{B06280CB-82A4-46DE-8956-602643078BDF}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc_ss", "ptp_boinc_ss.vcproj", "{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinccmd", "ptp_boinccmd.vcproj", "{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E} = {C04F0FCC-BB5D-4627-8656-6173B28BD69E}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincmgr", "ptp_boincmgr.vcproj", "{06113715-AC51-4E91-8B9D-C987CABE0920}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E} = {C04F0FCC-BB5D-4627-8656-6173B28BD69E}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboinc", "libboinc.vcproj", "{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinctray", "ptp_boinctray.vcproj", "{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincsvcctrl", "ptp_boincsvcctrl.vcproj", "{9FC47E90-4E0D-4383-B446-A84314B00764}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|Win32.Build.0 = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|x64.ActiveCfg = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|x64.Build.0 = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|Win32.ActiveCfg = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|Win32.Build.0 = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|x64.ActiveCfg = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|x64.Build.0 = Release|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|Win32.Build.0 = Debug|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|x64.ActiveCfg = Debug|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|x64.Build.0 = Debug|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|Win32.ActiveCfg = Release|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|Win32.Build.0 = Release|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|x64.ActiveCfg = Release|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|x64.Build.0 = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|Win32.Build.0 = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|x64.ActiveCfg = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|x64.Build.0 = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|Win32.ActiveCfg = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|Win32.Build.0 = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|x64.ActiveCfg = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|x64.Build.0 = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|Win32.ActiveCfg = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|Win32.Build.0 = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|x64.ActiveCfg = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|x64.Build.0 = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|Win32.ActiveCfg = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|Win32.Build.0 = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|x64.ActiveCfg = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|x64.Build.0 = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.Build.0 = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.ActiveCfg = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.Build.0 = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.ActiveCfg = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.Build.0 = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.ActiveCfg = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|x64.Build.0 = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|Win32.Build.0 = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|x64.ActiveCfg = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|x64.Build.0 = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|Win32.ActiveCfg = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|Win32.Build.0 = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|x64.ActiveCfg = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/win_build/boinc.sln b/win_build/boinc.sln
new file mode 100644
index 0000000..06aa3b5
--- /dev/null
+++ b/win_build/boinc.sln
@@ -0,0 +1,692 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc", "boinc_cli.vcproj", "{C04F0FCC-BB5D-4627-8656-6173B28BD69E}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc_os_ss", "boinc_os_ss.vcproj", "{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinccmd", "boinccmd.vcproj", "{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E} = {C04F0FCC-BB5D-4627-8656-6173B28BD69E}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincmgr", "boincmgr.vcproj", "{06113715-AC51-4E91-8B9D-C987CABE0920}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboinc", "libboinc.vcproj", "{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincsim", "sim.vcproj", "{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinctray", "boinctray.vcproj", "{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "image_libs", "image_libs.vcproj", "{D3D21F11-A7E7-4EA2-8518-E24695133BFF}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeglib", "jpeglib.vcproj", "{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glut", "glut.vcproj", "{C4165626-F68F-4F66-A126-3B82DDBB7480}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wrapper", "wrapper.vcproj", "{F243B93C-73CB-44E7-9BDC-847BB95A27CA}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sleeper", "sleeper.vcproj", "{A9647CEA-644D-4C0A-8733-D916CD344859}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "worker", "worker.vcproj", "{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_app", "uc2.vcproj", "{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_app_graphics", "uc2_graphics.vcproj", "{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4} = {814EBFD3-3CE6-4933-A580-C1FE3147ACB4}
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98} = {5F065EAC-B881-4E9A-9E34-7A21D7A01D98}
+		{C4165626-F68F-4F66-A126-3B82DDBB7480} = {C4165626-F68F-4F66-A126-3B82DDBB7480}
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF} = {D3D21F11-A7E7-4EA2-8518-E24695133BFF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgraphics2", "libgraphics2.vcproj", "{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboinc_staticcrt", "libboinc_staticcrt.vcproj", "{B00664BD-71EB-46C1-957E-CD851418D395}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboincapi_staticcrt", "libboincapi_staticcrt.vcproj", "{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincsvcctrl", "boincsvcctrl.vcproj", "{9FC47E90-4E0D-4383-B446-A84314B00764}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc_ss", "boinc_ss.vcproj", "{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4} = {814EBFD3-3CE6-4933-A580-C1FE3147ACB4}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98} = {5F065EAC-B881-4E9A-9E34-7A21D7A01D98}
+		{C4165626-F68F-4F66-A126-3B82DDBB7480} = {C4165626-F68F-4F66-A126-3B82DDBB7480}
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF} = {D3D21F11-A7E7-4EA2-8518-E24695133BFF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinclog", "boinclog.vcproj", "{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E} = {C04F0FCC-BB5D-4627-8656-6173B28BD69E}
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_app_atiopencl", "example_app_atiopencl.vcproj", "{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D} = {C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4} = {814EBFD3-3CE6-4933-A580-C1FE3147ACB4}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_app_nvcuda", "example_app_nvcuda.vcproj", "{55F71337-32A6-4C26-8CBA-A06A9183D6F2}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4} = {814EBFD3-3CE6-4933-A580-C1FE3147ACB4}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_app_nvopencl", "example_app_nvopencl.vcproj", "{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4} = {814EBFD3-3CE6-4933-A580-C1FE3147ACB4}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D} = {C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_app_multi_thread", "example_app_multi_thread.vcproj", "{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4} = {814EBFD3-3CE6-4933-A580-C1FE3147ACB4}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vboxwrapper", "vboxwrapper.vcproj", "{F243B93C-73CB-44E7-9BDC-847BB95C27CA}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wrappture_example", "wrappture_example.vcproj", "{D9AF7F68-B881-45B1-A41C-B10E61D764EF}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboincopencl_staticcrt", "libboinopencl_staticcrt.vcproj", "{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		EmuDebug|Win32 = EmuDebug|Win32
+		EmuDebug|x64 = EmuDebug|x64
+		EmuRelease|Win32 = EmuRelease|Win32
+		EmuRelease|x64 = EmuRelease|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|Win32.Build.0 = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|x64.ActiveCfg = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|x64.Build.0 = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.EmuDebug|x64.Build.0 = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.EmuRelease|Win32.Build.0 = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.EmuRelease|x64.ActiveCfg = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.EmuRelease|x64.Build.0 = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|Win32.ActiveCfg = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|Win32.Build.0 = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|x64.ActiveCfg = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.EmuDebug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.EmuRelease|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.EmuRelease|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.EmuRelease|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|x64.Build.0 = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|Win32.Build.0 = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|x64.ActiveCfg = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|x64.Build.0 = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.EmuDebug|x64.Build.0 = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.EmuRelease|Win32.Build.0 = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.EmuRelease|x64.ActiveCfg = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.EmuRelease|x64.Build.0 = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|Win32.ActiveCfg = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|Win32.Build.0 = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|x64.ActiveCfg = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|x64.Build.0 = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|Win32.ActiveCfg = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|Win32.Build.0 = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|x64.ActiveCfg = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|x64.Build.0 = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.EmuDebug|x64.Build.0 = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.EmuRelease|Win32.Build.0 = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.EmuRelease|x64.ActiveCfg = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.EmuRelease|x64.Build.0 = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|Win32.ActiveCfg = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|Win32.Build.0 = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|x64.ActiveCfg = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|x64.Build.0 = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.Build.0 = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.ActiveCfg = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.Build.0 = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.EmuDebug|x64.Build.0 = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.EmuRelease|Win32.Build.0 = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.EmuRelease|x64.ActiveCfg = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.EmuRelease|x64.Build.0 = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.ActiveCfg = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.Build.0 = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.ActiveCfg = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.Build.0 = Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Debug|x64.ActiveCfg = Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.EmuDebug|x64.Build.0 = Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.EmuRelease|Win32.Build.0 = Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.EmuRelease|x64.ActiveCfg = Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.EmuRelease|x64.Build.0 = Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Release|Win32.ActiveCfg = Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.EmuDebug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.EmuRelease|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.EmuRelease|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.EmuRelease|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|x64.Build.0 = Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|Win32.Build.0 = Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|x64.ActiveCfg = Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|x64.Build.0 = Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.EmuDebug|x64.Build.0 = Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.EmuRelease|Win32.Build.0 = Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.EmuRelease|x64.ActiveCfg = Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.EmuRelease|x64.Build.0 = Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|Win32.ActiveCfg = Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|Win32.Build.0 = Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|x64.ActiveCfg = Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|x64.Build.0 = Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|Win32.Build.0 = Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|x64.ActiveCfg = Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|x64.Build.0 = Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.EmuDebug|x64.Build.0 = Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.EmuRelease|Win32.Build.0 = Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.EmuRelease|x64.ActiveCfg = Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.EmuRelease|x64.Build.0 = Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|Win32.ActiveCfg = Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|Win32.Build.0 = Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|x64.ActiveCfg = Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|x64.Build.0 = Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|Win32.Build.0 = Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|x64.ActiveCfg = Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|x64.Build.0 = Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.EmuDebug|x64.Build.0 = Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.EmuRelease|Win32.Build.0 = Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.EmuRelease|x64.ActiveCfg = Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.EmuRelease|x64.Build.0 = Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|Win32.ActiveCfg = Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|Win32.Build.0 = Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|x64.ActiveCfg = Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|x64.Build.0 = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|Win32.Build.0 = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|x64.ActiveCfg = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|x64.Build.0 = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.EmuDebug|x64.Build.0 = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.EmuRelease|Win32.Build.0 = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.EmuRelease|x64.ActiveCfg = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.EmuRelease|x64.Build.0 = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|Win32.ActiveCfg = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|Win32.Build.0 = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|x64.ActiveCfg = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|x64.Build.0 = Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|Win32.ActiveCfg = Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|Win32.Build.0 = Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|x64.ActiveCfg = Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|x64.Build.0 = Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.EmuDebug|x64.Build.0 = Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.EmuRelease|Win32.Build.0 = Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.EmuRelease|x64.ActiveCfg = Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.EmuRelease|x64.Build.0 = Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|Win32.ActiveCfg = Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|Win32.Build.0 = Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|x64.ActiveCfg = Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|x64.Build.0 = Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|Win32.Build.0 = Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|x64.ActiveCfg = Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|x64.Build.0 = Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.EmuDebug|x64.Build.0 = Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.EmuRelease|Win32.Build.0 = Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.EmuRelease|x64.ActiveCfg = Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.EmuRelease|x64.Build.0 = Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|Win32.ActiveCfg = Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|Win32.Build.0 = Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|x64.ActiveCfg = Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|x64.Build.0 = Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|Win32.ActiveCfg = Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|Win32.Build.0 = Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|x64.ActiveCfg = Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|x64.Build.0 = Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.EmuDebug|x64.Build.0 = Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.EmuRelease|Win32.Build.0 = Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.EmuRelease|x64.ActiveCfg = Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.EmuRelease|x64.Build.0 = Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|Win32.ActiveCfg = Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|Win32.Build.0 = Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|x64.ActiveCfg = Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|x64.Build.0 = Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|Win32.ActiveCfg = Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|Win32.Build.0 = Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|x64.ActiveCfg = Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|x64.Build.0 = Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.EmuDebug|x64.Build.0 = Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.EmuRelease|Win32.Build.0 = Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.EmuRelease|x64.ActiveCfg = Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.EmuRelease|x64.Build.0 = Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|Win32.ActiveCfg = Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|Win32.Build.0 = Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|x64.ActiveCfg = Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|x64.Build.0 = Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|Win32.Build.0 = Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|x64.ActiveCfg = Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|x64.Build.0 = Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.EmuDebug|x64.Build.0 = Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.EmuRelease|Win32.Build.0 = Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.EmuRelease|x64.ActiveCfg = Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.EmuRelease|x64.Build.0 = Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|Win32.ActiveCfg = Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|Win32.Build.0 = Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|x64.ActiveCfg = Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|x64.Build.0 = Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|Win32.Build.0 = Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|x64.ActiveCfg = Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|x64.Build.0 = Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.EmuDebug|x64.Build.0 = Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.EmuRelease|Win32.Build.0 = Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.EmuRelease|x64.ActiveCfg = Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.EmuRelease|x64.Build.0 = Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|Win32.ActiveCfg = Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|Win32.Build.0 = Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|x64.ActiveCfg = Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|x64.Build.0 = Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|Win32.ActiveCfg = Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|Win32.Build.0 = Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|x64.ActiveCfg = Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|x64.Build.0 = Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.EmuDebug|x64.Build.0 = Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.EmuRelease|Win32.Build.0 = Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.EmuRelease|x64.ActiveCfg = Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.EmuRelease|x64.Build.0 = Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|Win32.ActiveCfg = Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|Win32.Build.0 = Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|x64.ActiveCfg = Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|x64.Build.0 = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|Win32.Build.0 = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|x64.ActiveCfg = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|x64.Build.0 = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.EmuDebug|x64.Build.0 = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.EmuRelease|Win32.Build.0 = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.EmuRelease|x64.ActiveCfg = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.EmuRelease|x64.Build.0 = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|Win32.ActiveCfg = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|Win32.Build.0 = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|x64.ActiveCfg = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|x64.Build.0 = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|Win32.Build.0 = Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|x64.ActiveCfg = Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|x64.Build.0 = Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.EmuDebug|x64.Build.0 = Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.EmuRelease|Win32.Build.0 = Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.EmuRelease|x64.ActiveCfg = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.EmuRelease|x64.Build.0 = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|Win32.ActiveCfg = Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|Win32.Build.0 = Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|x64.ActiveCfg = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|x64.Build.0 = Release|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Debug|Win32.ActiveCfg = Debug|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Debug|Win32.Build.0 = Debug|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Debug|x64.ActiveCfg = Debug|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Debug|x64.Build.0 = Debug|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.EmuDebug|x64.Build.0 = Debug|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.EmuRelease|Win32.Build.0 = Release|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.EmuRelease|x64.ActiveCfg = Release|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.EmuRelease|x64.Build.0 = Release|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Release|Win32.ActiveCfg = Release|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Release|Win32.Build.0 = Release|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Release|x64.ActiveCfg = Release|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Release|x64.Build.0 = Release|x64
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.Debug|x64.ActiveCfg = Debug|x64
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.EmuDebug|x64.Build.0 = Debug|x64
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.EmuRelease|Win32.Build.0 = Release|Win32
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.EmuRelease|x64.ActiveCfg = Release|x64
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.EmuRelease|x64.Build.0 = Release|x64
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.Release|Win32.ActiveCfg = Release|Win32
+		{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}.Release|x64.ActiveCfg = Release|x64
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.Debug|x64.ActiveCfg = Debug|x64
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.EmuDebug|Win32.ActiveCfg = EmuDebug|Win32
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.EmuDebug|Win32.Build.0 = EmuDebug|Win32
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.EmuDebug|x64.ActiveCfg = EmuDebug|x64
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.EmuDebug|x64.Build.0 = EmuDebug|x64
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.EmuRelease|Win32.ActiveCfg = EmuRelease|Win32
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.EmuRelease|Win32.Build.0 = EmuRelease|Win32
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.EmuRelease|x64.ActiveCfg = EmuRelease|x64
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.EmuRelease|x64.Build.0 = EmuRelease|x64
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.Release|Win32.ActiveCfg = Release|Win32
+		{55F71337-32A6-4C26-8CBA-A06A9183D6F2}.Release|x64.ActiveCfg = Release|x64
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.Debug|x64.ActiveCfg = Debug|x64
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.EmuDebug|x64.Build.0 = Debug|x64
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.EmuRelease|Win32.Build.0 = Release|Win32
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.EmuRelease|x64.ActiveCfg = Release|x64
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.EmuRelease|x64.Build.0 = Release|x64
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.Release|Win32.ActiveCfg = Release|Win32
+		{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}.Release|x64.ActiveCfg = Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|Win32.Build.0 = Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|x64.ActiveCfg = Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|x64.Build.0 = Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.EmuDebug|x64.Build.0 = Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.EmuRelease|Win32.Build.0 = Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.EmuRelease|x64.ActiveCfg = Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.EmuRelease|x64.Build.0 = Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|Win32.ActiveCfg = Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|Win32.Build.0 = Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|x64.ActiveCfg = Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|x64.Build.0 = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.Debug|Win32.Build.0 = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.Debug|x64.ActiveCfg = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.Debug|x64.Build.0 = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.EmuDebug|x64.Build.0 = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.EmuRelease|Win32.Build.0 = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.EmuRelease|x64.ActiveCfg = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.EmuRelease|x64.Build.0 = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.Release|Win32.ActiveCfg = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.Release|Win32.Build.0 = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.Release|x64.ActiveCfg = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95C27CA}.Release|x64.Build.0 = Release|x64
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.Debug|x64.ActiveCfg = Debug|x64
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.EmuDebug|x64.Build.0 = Debug|x64
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.EmuRelease|Win32.Build.0 = Release|Win32
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.EmuRelease|x64.ActiveCfg = Release|x64
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.EmuRelease|x64.Build.0 = Release|x64
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.Release|Win32.ActiveCfg = Release|Win32
+		{D9AF7F68-B881-45B1-A41C-B10E61D764EF}.Release|x64.ActiveCfg = Release|x64
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.Debug|Win32.Build.0 = Debug|Win32
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.Debug|x64.ActiveCfg = Debug|x64
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.Debug|x64.Build.0 = Debug|x64
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.EmuDebug|Win32.ActiveCfg = Debug|Win32
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.EmuDebug|Win32.Build.0 = Debug|Win32
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.EmuDebug|x64.ActiveCfg = Debug|x64
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.EmuDebug|x64.Build.0 = Debug|x64
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.EmuRelease|Win32.ActiveCfg = Release|Win32
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.EmuRelease|Win32.Build.0 = Release|Win32
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.EmuRelease|x64.ActiveCfg = Release|x64
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.EmuRelease|x64.Build.0 = Release|x64
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.Release|Win32.ActiveCfg = Release|Win32
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.Release|Win32.Build.0 = Release|Win32
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.Release|x64.ActiveCfg = Release|x64
+		{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/win_build/boinc_cli.vcproj b/win_build/boinc_cli.vcproj
new file mode 100644
index 0000000..6635175
--- /dev/null
+++ b/win_build/boinc_cli.vcproj
@@ -0,0 +1,980 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc"
+	ProjectGUID="{C04F0FCC-BB5D-4627-8656-6173B28BD69E}"
+	RootNamespace="boinc_cli"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include;../coprocs/NVIDIA/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1d.lib ssleay32.lib libeay32.lib libcurld_imp.lib nvapi.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib userenv.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/NVIDIA/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine=""$(ProjectDir)\buildenv.cmd" devenvdir "$(DevEnvDir)" type "$(ConfigurationName)" platform "$(PlatformName)" exec updatedepends.cmd"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include;../coprocs/NVIDIA/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1d.lib ssleay32.lib libeay32.lib libcurld_imp.lib nvapi.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib userenv.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/NVIDIA/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine=""$(ProjectDir)\buildenv.cmd" devenvdir "$(DevEnvDir)" type "$(ConfigurationName)" platform "$(PlatformName)" exec updatedepends.cmd"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include;../coprocs/NVIDIA/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				StringPooling="true"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib ssleay32.lib libeay32.lib libcurl_imp.lib nvapi.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib userenv.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/NVIDIA/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine=""$(ProjectDir)\buildenv.cmd" devenvdir "$(DevEnvDir)" type "$(ConfigurationName)" platform "$(PlatformName)" exec updatedepends.cmd"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include;../coprocs/NVIDIA/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				StringPooling="false"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib ssleay32.lib libeay32.lib libcurl_imp.lib nvapi.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib userenv.lib iphlpapi.lib kernel32.lib user32.lib advapi32.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/NVIDIA/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine=""$(ProjectDir)\buildenv.cmd" devenvdir "$(DevEnvDir)" type "$(ConfigurationName)" platform "$(PlatformName)" exec updatedepends.cmd"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\client\acct_mgr.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\acct_setup.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\app.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_control.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_start.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\async_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\client\check_state.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_msgs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\client_state.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\client_types.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpu_sched.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_account.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_apps.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_benchmark.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_cmdline.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_files.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_notice.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_platforms.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_proxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_scheduler.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_statefile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_trickle.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\current_version.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone2.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\file_names.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\file_xfer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gpu_amd.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gpu_detect.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gpu_nvidia.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gpu_opencl.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_http.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\http_curl.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\log_flags.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\main.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\msg_log.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\net_stats.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\pers_file_xfer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\project.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\result.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\rr_sim.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\run_app_windows.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sandbox.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\scheduler_op.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sysmon_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\time_stats.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\whetstone.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\work_fetch.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\client\acct_mgr.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\acct_setup.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\async_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\boinc_cli.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_msgs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_state.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpp.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpu_benchmark.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_notice.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_proxy.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_trickle.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\current_version.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\error_numbers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\file_names.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\file_xfer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gpu_detect.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_http.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\http_curl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\http_curl_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\log_flags.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\main.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\msg_log.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\net_stats.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\pers_file_xfer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\project.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\result.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\rr_sim.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\run_app_windows.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sandbox.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\scheduler_op.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sysmon_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\time_stats.h"
+				>
+			</File>
+			<File
+				RelativePath="..\version.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\work_fetch.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cli.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/boinc_os_ss.vcproj b/win_build/boinc_os_ss.vcproj
new file mode 100644
index 0000000..085c467
--- /dev/null
+++ b/win_build/boinc_os_ss.vcproj
@@ -0,0 +1,807 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc_os_ss"
+	ProjectGUID="{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}"
+	RootNamespace="boinc_ss"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../;../api/;../lib;../client/;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib opengl32.lib glu32.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib comctl32.lib msimg32.lib userenv.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../;../api/;../lib;../client/;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib opengl32.lib glu32.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib comctl32.lib msimg32.lib userenv.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/;../lib/;../client;..;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE"
+				StringPooling="false"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib opengl32.lib glu32.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib comctl32.lib msimg32.lib userenv.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/;../lib/;../client;..;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE"
+				StringPooling="false"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib opengl32.lib glu32.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib comctl32.lib msimg32.lib userenv.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\base64.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\cc_config.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\coproc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.c"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\notice.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\url.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\boinc_ss.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\cc_config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\notice.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_imports.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.h"
+				>
+			</File>
+			<File
+				RelativePath=".\stdafx.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\url.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clientscr\res\boinc.bmp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\boinc_ss.rc"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\gridrepublic.bmp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\gridrepublic.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\res\icon.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\Scricon3.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\seed.bmp"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+		<Global
+			Name="RESOURCE_FILE"
+			Value="\Src\BOINCSVN\trunk\boinc\clientscr\boinc_ss.rc"
+		/>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/boinc_samples.sln b/win_build/boinc_samples.sln
new file mode 100644
index 0000000..648c735
--- /dev/null
+++ b/win_build/boinc_samples.sln
@@ -0,0 +1,492 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboinc", "libboinc.vcproj", "{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "image_libs", "image_libs.vcproj", "{D3D21F11-A7E7-4EA2-8518-E24695133BFF}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeglib", "jpeglib.vcproj", "{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glut", "glut.vcproj", "{C4165626-F68F-4F66-A126-3B82DDBB7480}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wrapper", "wrapper.vcproj", "{F243B93C-73CB-44E7-9BDC-847BB95A27CA}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sleeper", "sleeper.vcproj", "{A9647CEA-644D-4C0A-8733-D916CD344859}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "worker", "worker.vcproj", "{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_app", "uc2.vcproj", "{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_app_graphics", "uc2_graphics.vcproj", "{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF} = {D3D21F11-A7E7-4EA2-8518-E24695133BFF}
+		{C4165626-F68F-4F66-A126-3B82DDBB7480} = {C4165626-F68F-4F66-A126-3B82DDBB7480}
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98} = {5F065EAC-B881-4E9A-9E34-7A21D7A01D98}
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4} = {814EBFD3-3CE6-4933-A580-C1FE3147ACB4}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgraphics2", "libgraphics2.vcproj", "{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multi_thread", "multi_thread.vcproj", "{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboinc_staticcrt", "libboinc_staticcrt.vcproj", "{B00664BD-71EB-46C1-957E-CD851418D395}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboincapi_staticcrt", "libboincapi_staticcrt.vcproj", "{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		Samples - Debug|Win32 = Samples - Debug|Win32
+		Samples - Debug|x64 = Samples - Debug|x64
+		Samples - Release|Win32 = Samples - Release|Win32
+		Samples - Release|x64 = Samples - Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|Win32.Build.0 = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|x64.ActiveCfg = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|x64.Build.0 = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|Win32.ActiveCfg = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|Win32.Build.0 = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|x64.ActiveCfg = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|x64.Build.0 = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|Win32.Build.0 = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|x64.ActiveCfg = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|x64.Build.0 = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|Win32.ActiveCfg = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|Win32.Build.0 = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|x64.ActiveCfg = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|x64.Build.0 = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|Win32.ActiveCfg = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|Win32.Build.0 = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|x64.ActiveCfg = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|x64.Build.0 = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|Win32.ActiveCfg = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|Win32.Build.0 = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|x64.ActiveCfg = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|x64.Build.0 = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.Build.0 = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.ActiveCfg = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.Build.0 = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.ActiveCfg = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.Build.0 = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.ActiveCfg = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.Build.0 = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Debug|Win32.Build.0 = Debug|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Debug|x64.ActiveCfg = Debug|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Debug|x64.Build.0 = Debug|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Release|Win32.ActiveCfg = Release|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Release|Win32.Build.0 = Release|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Release|x64.ActiveCfg = Release|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Release|x64.Build.0 = Release|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Debug|Win32.Build.0 = Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Debug|x64.ActiveCfg = Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Debug|x64.Build.0 = Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Release|Win32.ActiveCfg = Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Release|Win32.Build.0 = Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Release|x64.ActiveCfg = Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Release|x64.Build.0 = Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|Win32.Build.0 = Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|x64.ActiveCfg = Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|x64.Build.0 = Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|Win32.ActiveCfg = Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|Win32.Build.0 = Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|x64.ActiveCfg = Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|x64.Build.0 = Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|Win32.Build.0 = Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|x64.ActiveCfg = Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|x64.Build.0 = Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|Win32.ActiveCfg = Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|Win32.Build.0 = Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|x64.ActiveCfg = Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|x64.Build.0 = Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|Win32.Build.0 = Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|x64.ActiveCfg = Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|x64.Build.0 = Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|Win32.ActiveCfg = Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|Win32.Build.0 = Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|x64.ActiveCfg = Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|x64.Build.0 = Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|Win32.Build.0 = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|x64.ActiveCfg = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|x64.Build.0 = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|Win32.ActiveCfg = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|Win32.Build.0 = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|x64.ActiveCfg = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|x64.Build.0 = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|Win32.ActiveCfg = Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|Win32.Build.0 = Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|x64.ActiveCfg = Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|x64.Build.0 = Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|Win32.ActiveCfg = Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|Win32.Build.0 = Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|x64.ActiveCfg = Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|x64.Build.0 = Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|Win32.Build.0 = Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|x64.ActiveCfg = Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|x64.Build.0 = Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|Win32.ActiveCfg = Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|Win32.Build.0 = Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|x64.ActiveCfg = Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|x64.Build.0 = Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|Win32.ActiveCfg = Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|Win32.Build.0 = Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|x64.ActiveCfg = Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|x64.Build.0 = Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|Win32.ActiveCfg = Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|Win32.Build.0 = Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|x64.ActiveCfg = Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|x64.Build.0 = Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|Win32.ActiveCfg = Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|Win32.Build.0 = Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|x64.ActiveCfg = Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|x64.Build.0 = Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|Win32.ActiveCfg = Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|Win32.Build.0 = Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|x64.ActiveCfg = Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|x64.Build.0 = Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|Win32.Build.0 = Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|x64.ActiveCfg = Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|x64.Build.0 = Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|Win32.ActiveCfg = Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|Win32.Build.0 = Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|x64.ActiveCfg = Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|x64.Build.0 = Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|Win32.Build.0 = Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|x64.ActiveCfg = Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|x64.Build.0 = Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|Win32.ActiveCfg = Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|Win32.Build.0 = Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|x64.ActiveCfg = Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|x64.Build.0 = Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|Win32.Build.0 = Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|x64.ActiveCfg = Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|x64.Build.0 = Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|Win32.ActiveCfg = Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|Win32.Build.0 = Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|x64.ActiveCfg = Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|x64.Build.0 = Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|Win32.ActiveCfg = Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|Win32.Build.0 = Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|x64.ActiveCfg = Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|x64.Build.0 = Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|Win32.ActiveCfg = Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|Win32.Build.0 = Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|x64.ActiveCfg = Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|x64.Build.0 = Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|Win32.Build.0 = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|x64.ActiveCfg = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|x64.Build.0 = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|Win32.ActiveCfg = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|Win32.Build.0 = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|x64.ActiveCfg = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|x64.Build.0 = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|Win32.Build.0 = Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|x64.ActiveCfg = Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|x64.Build.0 = Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|Win32.ActiveCfg = Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|Win32.Build.0 = Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|x64.ActiveCfg = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|x64.Build.0 = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Debug|Win32.ActiveCfg = Debug|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Debug|Win32.Build.0 = Debug|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Debug|x64.ActiveCfg = Debug|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Debug|x64.Build.0 = Debug|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Release|Win32.ActiveCfg = Release|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Release|Win32.Build.0 = Release|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Release|x64.ActiveCfg = Release|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Release|x64.Build.0 = Release|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}.Samples - Release|x64.Build.0 = Samples - Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/win_build/boinc_ss.vcproj b/win_build/boinc_ss.vcproj
new file mode 100644
index 0000000..e25a2b2
--- /dev/null
+++ b/win_build/boinc_ss.vcproj
@@ -0,0 +1,489 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc_ss"
+	ProjectGUID="{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}"
+	RootNamespace="boinc_ss"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include;../../boinc_depends_win_vs2005/freetype/include;../../boinc_depends_win_vs2005/ftgl/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS;FTGL_LIBRARY_STATIC"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244;4305"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib odbc32.lib odbccp32.lib wsock32.lib psapi.lib libcmt.lib libcpmt.lib freetype2410.lib ftgl_static.lib "
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/freetype/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/ftgl/mswin/$(PlatformName)/$(ConfigurationName)/lib""
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include;../../boinc_depends_win_vs2005/freetype/include;../../boinc_depends_win_vs2005/ftgl/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS;FTGL_LIBRARY_STATIC"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244;4305"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib odbc32.lib odbccp32.lib wsock32.lib psapi.lib libcmt.lib libcpmt.lib freetype2410.lib ftgl_static.lib "
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/freetype/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/ftgl/mswin/$(PlatformName)/$(ConfigurationName)/lib""
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include;../../boinc_depends_win_vs2005/freetype/include;../../boinc_depends_win_vs2005/ftgl/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS;FTGL_LIBRARY_STATIC"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244;4305"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib ole32.lib psapi.lib delayimp.lib wsock32.lib advapi32.lib freetype2410_D.lib ftgl_static_D.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/freetype/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/ftgl/mswin/$(PlatformName)/$(ConfigurationName)/lib""
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include;../../boinc_depends_win_vs2005/freetype/include;../../boinc_depends_win_vs2005/ftgl/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS;FTGL_LIBRARY_STATIC"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244;4305"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib ole32.lib psapi.lib delayimp.lib wsock32.lib advapi32.lib freetype2410_D.lib ftgl_static_D.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/freetype/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/ftgl/mswin/$(PlatformName)/$(ConfigurationName)/lib""
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\cc_config.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\cc_config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\ss_app.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\api\ttfont.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clientscr\boinc_ss_opengl.rc"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\clientscr\boinc_ss_opengl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\ss_app.h"
+				>
+			</File>
+			<File
+				RelativePath="..\api\ttfont.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/boinccmd.vcproj b/win_build/boinccmd.vcproj
new file mode 100644
index 0000000..f49b31e
--- /dev/null
+++ b/win_build/boinccmd.vcproj
@@ -0,0 +1,614 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinccmd"
+	ProjectGUID="{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}"
+	RootNamespace="boinc_guirpctest"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/;../api/;../RSAEuro/source/;../client/win/;../client;..;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib userenv.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/;../api/;../RSAEuro/source/;../client/win/;../client;..;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/;../api/;../RSAEuro/source/;../client/win/;../client;..;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				StringPooling="true"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib userenv.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/;../api/;../RSAEuro/source/;../client/win/;../client;..;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				StringPooling="true"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\client\boinc_cmd.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_print.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cmd.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cmd.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/boinclog.vcproj b/win_build/boinclog.vcproj
new file mode 100644
index 0000000..71c8cb5
--- /dev/null
+++ b/win_build/boinclog.vcproj
@@ -0,0 +1,614 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinclog"
+	ProjectGUID="{3A8DFC5C-D169-4BB6-8282-EBD3D1318140}"
+	RootNamespace="boinc_guirpctest"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/;../api/;../RSAEuro/source/;../client/win/;../client;..;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib userenv.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/;../api/;../RSAEuro/source/;../client/win/;../client;..;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/;../api/;../RSAEuro/source/;../client/win/;../client;..;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				StringPooling="true"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib userenv.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/;../api/;../RSAEuro/source/;../client/win/;../client;..;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				StringPooling="true"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\client\boinc_log.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_print.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\client\win\boinc_log.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\client\win\boinc_log.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/boincmgr.vcproj b/win_build/boincmgr.vcproj
new file mode 100644
index 0000000..ae21a02
--- /dev/null
+++ b/win_build/boincmgr.vcproj
@@ -0,0 +1,1724 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boincmgr"
+	ProjectGUID="{06113715-AC51-4E91-8B9D-C987CABE0920}"
+	RootNamespace="boincmgr"
+	Keyword="MFCProj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005\wxwidgets\include;"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;../coprocs/OpenCL/include;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;__WXNDEBUG__;WXNDEBUG;_UNICODE;UNICODE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="true"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib userenv.lib wxbase28u.lib wxbase28u_net.lib wxbase28u_xml.lib wxmsw28u_adv.lib wxmsw28u_core.lib wxmsw28u_html.lib wxregexu.lib wxexpat.lib wxpng.lib wxjpeg.lib wxtiff.lib wxzlib.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine=""$(ProjectDir)\buildenv.cmd" devenvdir "$(DevEnvDir)" type "$(ConfigurationName)" platform "$(PlatformName)" exec updatedepends.cmd"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005\wxwidgets\include;"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;../coprocs/OpenCL/include;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;__WXNDEBUG__;WXNDEBUG;_UNICODE;UNICODE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="true"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleacc.lib oleaut32.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib userenv.lib wxbase28u.lib wxbase28u_net.lib wxbase28u_xml.lib wxmsw28u_adv.lib wxmsw28u_core.lib wxmsw28u_html.lib wxregexu.lib wxexpat.lib wxpng.lib wxtiff.lib wxjpeg.lib wxzlib.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine=""$(ProjectDir)\buildenv.cmd" devenvdir "$(DevEnvDir)" type "$(ConfigurationName)" platform "$(PlatformName)" exec updatedepends.cmd"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005\wxwidgets\include;"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswud";..\..\boinc_depends_win_vs2005\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;../coprocs/OpenCL/include;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_WINDOWS;_MT;__WXDEBUG__;WXDEBUG;_UNICODE;UNICODE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="false"
+				MinimalRebuild="false"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				EnableEnhancedInstructionSet="0"
+				FloatingPointModel="2"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleacc.lib oleaut32.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib userenv.lib wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxmsw28ud_adv.lib wxmsw28ud_core.lib wxmsw28ud_html.lib wxregexud.lib wxexpatd.lib wxjpegd.lib wxtiffd.lib wxpngd.lib wxzlibd.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine=""$(ProjectDir)\buildenv.cmd" devenvdir "$(DevEnvDir)" type "$(ConfigurationName)" platform "$(PlatformName)" exec updatedepends.cmd"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005\wxwidgets\include;"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswud";..\..\boinc_depends_win_vs2005\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;../coprocs/OpenCL/include;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_WINDOWS;_MT;__WXDEBUG__;WXDEBUG;_UNICODE;UNICODE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="false"
+				MinimalRebuild="false"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				EnableEnhancedInstructionSet="0"
+				FloatingPointModel="2"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib userenv.lib wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxmsw28ud_adv.lib wxmsw28ud_core.lib wxmsw28ud_html.lib wxregexud.lib wxexpatd.lib wxpngd.lib wxtiffd.lib wxjpegd.lib wxzlibd.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine=""$(ProjectDir)\buildenv.cmd" devenvdir "$(DevEnvDir)" type "$(ConfigurationName)" platform "$(PlatformName)" exec updatedepends.cmd"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;xrc"
+			UniqueIdentifier="{08DB1F42-8D4B-491a-870C-2A991D5ED0DB}"
+			>
+			<File
+				RelativePath="..\clientgui\res\atiicon.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boinc.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boinc32.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boinc_logo.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boincdisconnect.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\BOINCGUIApp.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCGUIApp.rc"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boincsnooze.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\externalweblink.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\gridrepublic.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\gridrepublicamwizard.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\mess.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\multicore.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\nvidiaicon.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\proj.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\result.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\stats.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\usage.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizard_bitmap.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress01.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress02.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress03.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress04.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress05.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress06.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress07.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress08.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress09.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress10.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress11.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress12.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\xfer.xpm"
+				>
+			</File>
+			<Filter
+				Name="Skins"
+				>
+				<Filter
+					Name="Default"
+					>
+					<Filter
+						Name="Graphic"
+						>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\advanced_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\attach_project_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\attach_project_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\cancel_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\cancel_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\close_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\close_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\connecting_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\copy_all_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\copy_all_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\copy_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\copy_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\dialog_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\error_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\help_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\help_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\left_arrow_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\left_arrow_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_alert_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\preferences_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\project_area_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\project_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\resume_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\right_arrow_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\right_arrow_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\save_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\save_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\spacer_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\state_indicator_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\suspend_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\synchronize_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\synchronize_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_active_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_animation_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_animation_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_area_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_gauge_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_gauge_progress_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_suspended_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_tab_area_background_image.xpm"
+							>
+						</File>
+					</Filter>
+				</Filter>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Simple"
+			>
+			<File
+				RelativePath="..\clientgui\BOINCBitmapComboBox.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCBitmapComboBox.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_BoincSimpleFrame.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_BoincSimpleFrame.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_CustomControls.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_CustomControls.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_DlgMessages.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_DlgMessages.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_DlgPreferences.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_DlgPreferences.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_PanelBase.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_PanelBase.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_ProjectCommandPopup.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_ProjectCommandPopup.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_ProjectPanel.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_ProjectPanel.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_ProjectWebSitesPopup.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_ProjectWebSitesPopup.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_TaskCommandPopup.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_TaskCommandPopup.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_TaskPanel.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\sg_TaskPanel.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="libboinc"
+			>
+			<File
+				RelativePath="..\lib\app_ipc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\app_ipc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\cc_config.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\cc_config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\common_defs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\coproc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\daemonmgt.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\daemonmgt_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\error_numbers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\idlemon.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\idlemon_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\notice.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\notice.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_imports.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\std_fixes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\url.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\url.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Wizards"
+			>
+			<File
+				RelativePath="..\clientgui\AccountInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerProcessingPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerProcessingPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerPropertiesPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerPropertiesPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AlreadyExistsPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AlreadyExistsPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionErrorPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionErrorPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NoInternetConnectionPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NoInternetConnectionPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotDetectedPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotDetectedPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotFoundPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotFoundPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectProcessingPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectProcessingPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectPropertiesPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectPropertiesPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\TermsOfUsePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\TermsOfUsePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\UnavailablePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\UnavailablePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WelcomePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WelcomePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WizardAttach.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WizardAttach.h"
+				>
+			</File>
+			<Filter
+				Name="Infrastructure"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCBaseWizard.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCBaseWizard.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ProjectListCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ProjectListCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\wizardex.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\wizardex.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Infrastructure"
+			>
+			<File
+				RelativePath="..\clientgui\BOINCBaseFrame.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCBaseFrame.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCClientManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCClientManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCDialupManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCDialupManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCInternetFSHandler.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCInternetFSHandler.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\browser.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\browser.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\LogBOINC.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\LogBOINC.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\SkinManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\SkinManager.h"
+				>
+			</File>
+			<Filter
+				Name="Validators"
+				>
+				<File
+					RelativePath="..\clientgui\ValidateAccountKey.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateAccountKey.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateEmailAddress.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateEmailAddress.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateURL.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateURL.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Dialogs"
+				>
+				<File
+					RelativePath="..\clientgui\DlgAbout.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAbout.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgEventLog.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgEventLog.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgEventLogListCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgEventLogListCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgExitMessage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgExitMessage.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgGenericMessage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgGenericMessage.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Advanced"
+			>
+			<File
+				RelativePath="..\clientgui\AdvancedFrame.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AdvancedFrame.h"
+				>
+			</File>
+			<Filter
+				Name="Views"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCBaseView.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCBaseView.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCListCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCListCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCTaskCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCTaskCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewNotices.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewNotices.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewProjects.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewProjects.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewResources.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewResources.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewStatistics.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewStatistics.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewTransfers.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewTransfers.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewWork.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewWork.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCHtmlLBox.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCHtmlLBox.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCVListBox.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCVListBox.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferences.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferences.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferencesBase.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferencesBase.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgItemProperties.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgItemProperties.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgOptions.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgOptions.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgSelectComputer.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgSelectComputer.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\NoticeListCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\NoticeListCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxPieCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxPieCtrl.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Taskbar"
+			>
+			<File
+				RelativePath="..\clientgui\BOINCTaskBar.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCTaskBar.h"
+				>
+			</File>
+			<Filter
+				Name="Infrastructure"
+				>
+				<File
+					RelativePath="..\clientgui\msw\taskbarex.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\msw\taskbarex.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Document"
+			>
+			<File
+				RelativePath="..\clientgui\MainDocument.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\MainDocument.h"
+				>
+			</File>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\AsyncRPC.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\AsyncRPC.h"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client.h"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client_ops.cpp"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<File
+			RelativePath="..\clientgui\_wx_intellisense.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\BOINCGUIApp.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\BOINCGUIApp.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\Events.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\resource.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\stdwx.cpp"
+			>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Release|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Unicode - Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Unicode - Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\clientgui\stdwx.h"
+			>
+		</File>
+	</Files>
+	<Globals>
+		<Global
+			Name="RESOURCE_FILE"
+			Value="..\clientgui\BOINCGUIApp.rc"
+		/>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/boincsvcctrl.vcproj b/win_build/boincsvcctrl.vcproj
new file mode 100644
index 0000000..d97849d
--- /dev/null
+++ b/win_build/boincsvcctrl.vcproj
@@ -0,0 +1,608 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boincsvcctrl"
+	ProjectGUID="{9FC47E90-4E0D-4383-B446-A84314B00764}"
+	RootNamespace="boincsvcctrl"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;"
+				MinimalRebuild="false"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;"
+				MinimalRebuild="false"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="0"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;"
+				StringPooling="true"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				StringPooling="false"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\clientctrl\boincsvcctrl.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientctrl\boincsvcctrl.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clientctrl\boincsvcctrl.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/boinctray.vcproj b/win_build/boinctray.vcproj
new file mode 100644
index 0000000..3804919
--- /dev/null
+++ b/win_build/boinctray.vcproj
@@ -0,0 +1,602 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinctray"
+	ProjectGUID="{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}"
+	RootNamespace="boinc_ss"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE"
+				StringPooling="false"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE"
+				StringPooling="false"
+				ExceptionHandling="2"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\clienttray\tray_win.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\clienttray\boinc_tray.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clienttray\tray_win.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clienttray\boinc_tray.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/buildenv.cmd b/win_build/buildenv.cmd
new file mode 100644
index 0000000..393aa86
--- /dev/null
+++ b/win_build/buildenv.cmd
@@ -0,0 +1,316 @@
+ at IF "%BUILDDBG%"=="TRUE" ( ECHO ON ) ELSE ( ECHO OFF )
+rem Berkeley Open Infrastructure for Network Computing
+rem http://boinc.berkeley.edu
+rem Copyright (C) 2009 University of California
+rem 
+rem This is free software; you can redistribute it and/or
+rem modify it under the terms of the GNU Lesser General Public
+rem License as published by the Free Software Foundation;
+rem either version 3 of the License, or (at your option) any later version.
+rem 
+rem This software is distributed in the hope that it will be useful,
+rem but WITHOUT ANY WARRANTY; without even the implied warranty of
+rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+rem See the GNU Lesser General Public License for more details.
+rem 
+rem You should have received a copy of the GNU Lesser General Public License
+rem along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+rem
+
+rem Provide the groundwork for an automated build environment.
+
+ECHO Initializing BOINC Build Environment for Windows
+
+rem ***** Construct Build Environment Root Paths *****
+rem
+SET BUILDDRIVE=%~d0
+SET BUILDROOT=%~dps0
+SET BUILDROOT=%BUILDROOT:\win_bu~1\=%
+
+rem Detect Branch Name
+PUSHD %~dp0\..\..
+FOR /F %%I IN ("%~dp0\..") DO SET _ArgBUILDROOTLFNSUPPORT=%%~fI
+FOR /D %%I IN (*.*) DO (
+    IF /I "%CD%\%%I" == "%_ArgBUILDROOTLFNSUPPORT%" SET BUILDBRANCHNAME=%%I
+)
+POPD
+
+
+rem ***** Verify Parameters *****
+rem
+:VERIFYNEXTPARAM
+IF /I  "%1"=="/?"                   GOTO :USAGE
+IF /I  "%1"=="-?"                   GOTO :USAGE
+IF /I  "%1"=="/HELP"                GOTO :USAGE
+IF /I  "%1"=="-HELP"                GOTO :USAGE
+IF /I  "%1"=="DEVENVDIR"            GOTO :PARSEPARAM
+IF /I  "%1"=="TYPE"                 GOTO :PARSEPARAM
+IF /I  "%1"=="PLATFORM"             GOTO :PARSEPARAM
+IF /I  "%1"=="EXEC"                 GOTO :PARSEPARAM
+IF NOT "%1"==""                     GOTO :USAGE
+IF     "%1"==""                     GOTO :VALIDATEPARAMS
+
+rem ***** Parse Parameters *****
+rem
+:PARSEPARAM
+IF /I "%1"=="DEVENVDIR"             SET _ArgBuildDevEnvDir=%2
+IF /I "%1"=="TYPE"                  SET _ArgBuildType=%2
+IF /I "%1"=="PLATFORM"              SET _ArgBuildPlatform=%2
+IF /I "%1"=="EXEC" (
+    rem The exec command has to be the last of the build arguments
+    rem   everything after it should be parameters for the command.
+    SET _ArgExec=%2
+    SET _ArgExecParam=%~3
+    GOTO :VALIDATEPARAMS
+)
+SHIFT
+SHIFT
+GOTO :VERIFYNEXTPARAM
+
+rem ***** Validate Parameters *****
+rem
+:VALIDATEPARAMS
+rem A little bit of batchfile magic to remove double quotes
+rem   which would be sent from the automated build tools.
+FOR /F "usebackq delims=" %%I IN ('%_ArgBuildDevEnvDir%') DO (
+    SET _ArgBuildDevEnvDir=%%~I
+)
+FOR /F "usebackq delims=" %%I IN ('%_ArgBuildType%')      DO (
+    SET _ArgBuildType=%%~I
+)
+FOR /F "usebackq delims=" %%I IN ('%_ArgBuildPlatform%')  DO (
+    SET _ArgBuildPlatform=%%~I
+)
+
+IF /I "%_ArgBuildType%"==""            GOTO :USAGE
+IF /I "%_ArgBuildPlatform%"==""        GOTO :USAGE
+IF /I "%_ArgBuildPlatform%" == "x64"   SET _ArgBuildPlatform=amd64
+IF /I "%_ArgBuildPlatform%" == "Win32" SET _ArgBuildPlatform=x86
+
+SET BUILDTYPE=%_ArgBuildType%
+SET BUILDPLATFORM=%_ArgBuildPlatform%
+
+rem ***** Visual Studio Hint Detection *****
+rem
+SET _ArgBuildDevEnvDir=%_ArgBuildDevEnvDir:IDE\=%
+SET _ArgVS80COMNTOOLS=%VS80COMNTOOLS:Tools\=%
+SET _ArgVS90COMNTOOLS=%VS90COMNTOOLS:Tools\=%
+SET _ArgVS100COMNTOOLS=%VS100COMNTOOLS:Tools\=%
+
+IF /I "%_ArgVS80COMNTOOLS%" == "%_ArgBuildDevEnvDir%"  GOTO :DETECTVS2005
+IF /I "%_ArgVS90COMNTOOLS%" == "%_ArgBuildDevEnvDir%"  GOTO :DETECTVS2008
+IF /I "%_ArgVS100COMNTOOLS%" == "%_ArgBuildDevEnvDir%" GOTO :DETECTVS2010
+
+rem ***** Software Detection *****
+rem
+:DETECTVS2005
+IF EXIST "%VS80COMNTOOLS%\vsvars32.bat" (
+    ECHO Software Platform Detected: Visual Studio 2005
+    CALL "%VS80COMNTOOLS%\vsvars32.bat" > NUL: 2> NUL:
+    SET BUILDCOMPILERDETECTED=vs2005
+	GOTO :SOFTDETECTIONCOMPLETE
+)
+
+:DETECTVS2008
+IF EXIST "%VS90COMNTOOLS%\vsvars32.bat" (
+    ECHO Software Platform Detected: Visual Studio 2008
+    CALL "%VS90COMNTOOLS%\vsvars32.bat" > NUL: 2> NUL:
+    SET BUILDCOMPILERDETECTED=vs2008
+	GOTO :SOFTDETECTIONCOMPLETE
+)
+
+:DETECTVS2010
+IF EXIST "%VS100COMNTOOLS%\vsvars32.bat" (
+    ECHO Software Platform Detected: Visual Studio 2010
+    CALL "%VS100COMNTOOLS%\vsvars32.bat" > NUL: 2> NUL:
+    SET BUILDCOMPILERDETECTED=vs2010
+	GOTO :SOFTDETECTIONCOMPLETE
+)
+
+:SOFTDETECTIONCOMPLETE
+IF "%VCINSTALLDIR%"=="" (
+	ECHO Software Platform NOT Detected: Microsoft Visual Studio 2005/2008/2010...
+    EXIT /B 1
+)
+
+
+rem ***** Build Tools Detection *****
+rem
+SET BUILDTOOLSNAME=boinc_depends_win_%BUILDCOMPILERDETECTED%
+SET BUILDTOOLSROOT=%BUILDROOT%\..\%BUILDTOOLSNAME%
+IF EXIST %BUILDTOOLSROOT%\win_build\subversion GOTO :BUILDTOOLSROOTVALIDATED
+
+rem We must be in a branch and we can't currently use subversion commands
+rem to determine where we are to find our build tools.  Use some batch
+rem file magic to parse the branch name from the name of the directory
+rem hosting the build tree. This can be different than just the version
+rem number, we have had to rev the branch name for certain releases due 
+rem to late changing features. 6.6 vs 6.6a
+FOR /F "usebackq tokens=3,* delims=_" %%I IN ('%BUILDBRANCHNAME%') DO (
+    SET BUILDTOOLSNAME=boinc_depends_win_%BUILDCOMPILERDETECTED%_%%J
+)
+SET BUILDTOOLSROOT=%BUILDROOT%\..\%BUILDTOOLSNAME%
+
+IF NOT EXIST %BUILDTOOLSROOT%\win_build\subversion (
+    ECHO Software NOT Detected: Build Tools...
+    EXIT /B 2
+)
+
+:BUILDTOOLSROOTVALIDATED
+FOR /F %%I IN ("%BUILDTOOLSROOT%") DO SET BUILDTOOLSROOT=%%~fI
+
+
+rem ***** Reset Variables to start out with a clean environment *****
+rem 
+SET PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
+SET INCLUDE=
+SET LIB=
+SET LIBPATH=
+
+rem Which build environment should we use?
+IF /I NOT "%PROCESSOR_ARCHITECTURE%"=="%BUILDPLATFORM%" GOTO :BUILDENVCROSS
+
+rem Building a native binary for the current platform.
+:BUILDENVNATIVE
+
+IF /I NOT "%BUILDPLATFORM%"=="x86" (
+    CALL "%VCINSTALLDIR%\bin\%PROCESSOR_ARCHITECTURE%\vcvars%PROCESSOR_ARCHITECTURE%.bat" > NUL: 2> NUL:
+    IF ERRORLEVEL 1 GOTO :BUILDENVFAILURE
+) ELSE (
+    CALL "%VCINSTALLDIR%\bin\vcvars32.bat" > NUL: 2> NUL:
+    IF ERRORLEVEL 1 GOTO :BUILDENVFAILURE
+)
+
+GOTO :BUILDENVDONE
+
+rem Building a binary for another platform.
+:BUILDENVCROSS
+
+IF /I NOT "%BUILDPLATFORM%"=="x86" (
+    CALL "%VCINSTALLDIR%\bin\%PROCESSOR_ARCHITECTURE%_%BUILDPLATFORM%\vcvars%PROCESSOR_ARCHITECTURE%_%BUILDPLATFORM%.bat" > NUL: 2> NUL:
+    IF ERRORLEVEL 1 GOTO :BUILDENVFAILURE
+) ELSE (
+    CALL "%VCINSTALLDIR%\bin\vcvars32.bat" > NUL: 2> NUL:
+    IF ERRORLEVEL 1 GOTO :BUILDENVFAILURE
+)
+
+:BUILDENVDONE
+
+rem Convert the OS Platform into a Visual Studio compatible platform
+IF /I "%BUILDPLATFORM%"=="x86"   SET VSPLATFORM=Win32
+IF /I "%BUILDPLATFORM%"=="amd64" SET VSPLATFORM=x64
+IF /I "%BUILDPLATFORM%"=="ia64"  SET VSPLATFORM=Itanium
+
+
+rem ***** Standard Developer Environment *****
+rem
+
+rem Add standard shell scripts executables to the path
+SET PATH=%BUILDROOT%\win_build;%BUILDROOT%\win_build\%PROCESSOR_ARCHITECTURE%;%PATH%
+SET PATH=%BUILDTOOLSROOT%\win_build;%BUILDTOOLSROOT%\win_build\%PROCESSOR_ARCHITECTURE%;%PATH%
+
+rem Add Perl to the path
+SET PATH=%BUILDTOOLSROOT%\win_build\perl;%BUILDTOOLSROOT%\win_build\perl\%PROCESSOR_ARCHITECTURE%\bin;%PATH%
+
+rem Add subversion source control to the path
+SET SVN_EDITOR=notepad.exe
+SET PATH=%BUILDTOOLSROOT%\win_build\subversion;%BUILDTOOLSROOT%\win_build\subversion\%PROCESSOR_ARCHITECTURE%\bin;%PATH%
+
+rem Specify build output directory
+SET BUILDOUTPUT=%BUILDROOT%\win_build\build\%VSPLATFORM%\%BUILDTYPE%
+
+rem Add source server environment variables
+SET SRCSRV_SYSTEM=svn
+SET SRCSRV_INI=%BUILDTOOLSROOT%\win_build\srcsrv.ini
+SET SRCSRV_SYMBOLS=%BUILDROOT%\win_build\build\%VSPLATFORM%\%BUILDTYPE%
+SET SRCSRV_SOURCE=%BUILDROOT%
+
+rem Add deployable symbol store environment variables
+SET BUILDSYMBOLSTORE=%BUILDTOOLSROOT%\Developr\%USERNAME%\symstore
+
+rem Add _NT_SYMBOL_PATH to the environment
+SET _NT_SYMBOL_PATH=%BUILDSYMBOLSTORE%
+SET _NT_SYMBOL_PATH=%_NT_SYMBOL_PATH%;srv*%BUILDTOOLSROOT%\Developr\%USERNAME%\symbols*http://msdl.microsoft.com/download/symbols
+SET _NT_SYMBOL_PATH=%_NT_SYMBOL_PATH%;srv*%BUILDTOOLSROOT%\Developr\%USERNAME%\symbols*http://boinc.berkeley.edu/symstore/
+
+rem Add standard macros to the environment
+DOSKEY /MACROFILE="%BUILDTOOLSROOT%\developr\generic.mac"
+
+rem Add directory traversal macros to the environment
+DOSKEY /MACROFILE="%BUILDTOOLSROOT%\developr\tree.mac"
+
+rem Populate environmental version information
+FOR /F "usebackq tokens=1,2,3 delims=." %%I IN (`TYPE "%BUILDROOT%\version.log"`) DO (
+    SET BUILDVERSIONMAJOR=%%I
+    SET BUILDVERSIONMINOR=%%J
+    SET BUILDVERSIONREVISION=%%K
+)
+
+rem Adjust command processor window title
+TITLE BOINC Build Environment for Windows %BUILDVERSIONMAJOR%.%BUILDVERSIONMINOR% (%BUILDTYPE%/%BUILDPLATFORM%)
+
+rem ***** Customized Developer Environment *****
+rem
+SET BUILDHOMEDIR=%BUILDTOOLSROOT%\Developr\%USERNAME%
+IF NOT EXIST %BUILDHOMEDIR% MKDIR %BUILDHOMEDIR%
+
+rem Create a default directory layout
+IF NOT EXIST %BUILDHOMEDIR%\bin mkdir %BUILDHOMEDIR%\bin
+IF NOT EXIST %BUILDHOMEDIR%\bin\%PROCESSOR_ARCHITECTURE% mkdir %BUILDHOMEDIR%\bin\%PROCESSOR_ARCHITECTURE%
+IF NOT EXIST %BUILDHOMEDIR%\temp mkdir %BUILDHOMEDIR%\temp
+IF NOT EXIST %BUILDHOMEDIR%\symbols mkdir %BUILDHOMEDIR%\symbols
+IF NOT EXIST %BUILDHOMEDIR%\symstore mkdir %BUILDHOMEDIR%\symstore
+
+rem Add custom shell scripts to the path
+SET PATH=%BUILDHOMEDIR%\bin;%BUILDHOMEDIR%\bin\%PROCESSOR_ARCHITECTURE%;%PATH%
+
+rem Add custom macros to the environment
+IF EXIST %BUILDHOMEDIR%\custom.mac (
+	DOSKEY /MACROFILE=%BUILDHOMEDIR%\custom.mac
+)
+
+rem Execute a custom shell script as defined by the developer
+IF EXIST %BUILDHOMEDIR%\customenv.cmd (
+	CALL %BUILDHOMEDIR%\customenv.cmd
+)
+
+
+rem ***** Execute Command Line Script *****
+rem
+IF /I NOT "%_ArgExec%"=="" (
+    ECHO Executing: %_ArgExec% %_ArgExecParam%
+    ECHO.
+    CALL %_ArgExec% %_ArgExecParam%
+    IF ERRORLEVEL 1 EXIT /B 10
+)
+
+
+rem ***** Cleanup all the temporary variables *****
+rem 
+FOR /F "delims==" %%I IN ('SET _Arg') DO SET %%I=
+
+
+rem ***** All Done *****
+rem
+
+GOTO :EOF
+
+:BUILDENVFAILURE
+
+ECHO Failed to setup the requested build environment.
+ECHO   Commandline: %*
+ECHO.
+
+:USAGE
+
+ECHO Usage: buildenv.cmd TYPE ^<type^> PLATFORM ^<platform^> [Optional Commands]
+ECHO.
+ECHO   Commands:
+ECHO     DEVENVDIR:  Which build environment executed this batch file.
+ECHO     TYPE:  Which build environment are you building executables for.
+ECHO       Current Values: Release/Debug
+ECHO     PLATFORM: Which platform are you building for.
+ECHO       Current Values: x86/amd64/ia64
+ECHO.
+
+GOTO :EOF
diff --git a/win_build/ce_boinc_cli.vcproj b/win_build/ce_boinc_cli.vcproj
new file mode 100644
index 0000000..58cde8e
--- /dev/null
+++ b/win_build/ce_boinc_cli.vcproj
@@ -0,0 +1,900 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc"
+	ProjectGUID="{C04F0FCC-BB5D-4627-8656-6173B28BD69E}"
+	RootNamespace="boinc_cli"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_8/openssl/include;../../boinc_depends_win_vs2005_6_8/curl/include;../../boinc_depends_win_vs2005_6_8/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE;USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1d.lib ssleay32.lib libeay32.lib libcurld_imp.lib nvapi.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_8/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_8/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_8/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_8/openssl/include;../../boinc_depends_win_vs2005_6_8/curl/include;../../boinc_depends_win_vs2005_6_8/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE;USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1d.lib ssleay32.lib libeay32.lib libcurld_imp.lib nvapi.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib userenv.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_8/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_8/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_8/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_8/openssl/include;../../boinc_depends_win_vs2005_6_8/curl/include;../../boinc_depends_win_vs2005_6_8/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE;USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib ssleay32.lib libeay32.lib libcurl_imp.lib nvapi.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_8/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_8/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_8/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_8/openssl/include;../../boinc_depends_win_vs2005_6_8/curl/include;../../boinc_depends_win_vs2005_6_8/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE;USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				StringPooling="false"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib ssleay32.lib libeay32.lib libcurl_imp.lib nvapi.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib userenv.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_8/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_8/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_8/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\client\acct_mgr.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\acct_setup.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\app.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_control.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_graphics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_start.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\auto_update.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\client\check_state.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_msgs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\client_state.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\client_types.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpu_sched.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_account.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_apps.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_benchmark.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_cmdline.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_files.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_platforms.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_scheduler.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_statefile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_trickle.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone2.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\file_names.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\file_xfer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_http.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\http_curl.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\log_flags.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\main.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\msg_log.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\net_stats.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\pers_file_xfer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\rr_sim.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sandbox.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\scheduler_op.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sysmon_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\time_stats.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\whetstone.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\work_fetch.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\client\acct_mgr.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\acct_setup.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\auto_update.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\boinc_cli.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_msgs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_state.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpp.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpu_benchmark.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\error_numbers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\file_names.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\file_xfer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_http.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\http_curl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\log_flags.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\main.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\msg_log.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\net_stats.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\pers_file_xfer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\rr_sim.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sandbox.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\scheduler_op.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sysmon_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\time_stats.h"
+				>
+			</File>
+			<File
+				RelativePath="..\version.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\work_fetch.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cli.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ce_boinc_dll.vcproj b/win_build/ce_boinc_dll.vcproj
new file mode 100644
index 0000000..458b1b0
--- /dev/null
+++ b/win_build/ce_boinc_dll.vcproj
@@ -0,0 +1,698 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc_dll"
+	ProjectGUID="{B06280CB-82A4-46DE-8956-602643078BDF}"
+	RootNamespace="boinc"
+	Keyword="AtlProj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="false"
+				TargetEnvironment="1"
+				GenerateStublessProxies="true"
+				TypeLibraryName="$(IntDir)/boinc_dll.tlb"
+				HeaderFileName="boinc_dll.h"
+				DLLDataFileName=""
+				InterfaceIdentifierFileName="boinc_dll_i.c"
+				ProxyFileName="boinc_dll_p.c"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;_CHARITYENGINE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdafx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=""$(IntDir)";../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="true"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB wininet.lib kernel32.lib user32.lib advapi32.lib shell32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.dll"
+				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="true"
+				MergedIDLBaseFileName="_boinc_dll.idl"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_dll.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/boinc_dll.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="false"
+				TargetEnvironment="3"
+				GenerateStublessProxies="true"
+				TypeLibraryName="$(IntDir)/boinc_dll.tlb"
+				HeaderFileName="boinc_dll.h"
+				DLLDataFileName=""
+				InterfaceIdentifierFileName="boinc_dll_i.c"
+				ProxyFileName="boinc_dll_p.c"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;_CHARITYENGINE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdafx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=""$(IntDir)";../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="true"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB wininet.lib kernel32.lib user32.lib advapi32.lib shell32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.dll"
+				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="true"
+				MergedIDLBaseFileName="_boinc_dll.idl"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_dll.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/boinc_dll.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="false"
+				TargetEnvironment="1"
+				GenerateStublessProxies="true"
+				TypeLibraryName="$(IntDir)/boinc_dll.tlb"
+				HeaderFileName="boinc_dll.h"
+				DLLDataFileName=""
+				InterfaceIdentifierFileName="boinc_dll_i.c"
+				ProxyFileName="boinc_dll_p.c"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../lib"
+				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_CHARITYENGINE"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdafx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=""$(IntDir)";../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="true"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB wininet.lib kernel32.lib user32.lib advapi32.lib shell32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.dll"
+				LinkIncremental="1"
+				IgnoreAllDefaultLibraries="true"
+				MergedIDLBaseFileName="_boinc_dll.idl"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_dll.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				ImportLibrary="$(OutDir)/boinc_dll.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="false"
+				TargetEnvironment="3"
+				GenerateStublessProxies="true"
+				TypeLibraryName="$(IntDir)/boinc_dll.tlb"
+				HeaderFileName="boinc_dll.h"
+				DLLDataFileName=""
+				InterfaceIdentifierFileName="boinc_dll_i.c"
+				ProxyFileName="boinc_dll_p.c"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../lib"
+				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_CHARITYENGINE"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdafx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=""$(IntDir)";../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="true"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB wininet.lib kernel32.lib user32.lib advapi32.lib shell32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.dll"
+				LinkIncremental="1"
+				IgnoreAllDefaultLibraries="true"
+				MergedIDLBaseFileName="_boinc_dll.idl"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_dll.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				ImportLibrary="$(OutDir)/boinc_dll.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\clientlib\win\boinc_dll.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\IdleTracker.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\Service.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\stdafx.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\clientlib\win\boinc_dll.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\IdleTracker.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\Resource.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\stdafx.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+			<File
+				RelativePath="..\clientlib\win\boinc_dll.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ce_boinc_ss.vcproj b/win_build/ce_boinc_ss.vcproj
new file mode 100644
index 0000000..37d75a3
--- /dev/null
+++ b/win_build/ce_boinc_ss.vcproj
@@ -0,0 +1,763 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc_ss"
+	ProjectGUID="{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}"
+	RootNamespace="boinc_ss"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib userenv.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib userenv.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\base64.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.c"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\boinc_ss.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_imports.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clientscr\res\boinc.bmp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\boinc_ss.rc"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\gridrepublic.bmp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\gridrepublic.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\res\icon.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\Scricon3.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\seed.bmp"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ce_boinccmd.vcproj b/win_build/ce_boinccmd.vcproj
new file mode 100644
index 0000000..da7b972
--- /dev/null
+++ b/win_build/ce_boinccmd.vcproj
@@ -0,0 +1,610 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinccmd"
+	ProjectGUID="{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}"
+	RootNamespace="boinc_guirpctest"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client;.."
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib userenv.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client;.."
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib userenv.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\client\boinc_cmd.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_print.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cmd.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cmd.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ce_boincmgr.vcproj b/win_build/ce_boincmgr.vcproj
new file mode 100644
index 0000000..7903e5d
--- /dev/null
+++ b/win_build/ce_boincmgr.vcproj
@@ -0,0 +1,1660 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boincmgr"
+	ProjectGUID="{06113715-AC51-4E91-8B9D-C987CABE0920}"
+	RootNamespace="boincmgr"
+	Keyword="MFCProj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_8\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_8\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005_6_8\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;__WXNDEBUG__;WXNDEBUG;_UNICODE;UNICODE;_CHARITYENGINE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_8\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28u.lib wxbase28u_net.lib wxbase28u_xml.lib wxmsw28u_adv.lib wxmsw28u_core.lib wxmsw28u_html.lib wxregexu.lib wxexpat.lib wxpng.lib wxjpeg.lib wxtiff.lib wxzlib.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\charityengine.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_8\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_8\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\charityengine.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_8\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_8\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005_6_8\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;__WXNDEBUG__;WXNDEBUG;_UNICODE;UNICODE;_CHARITYENGINE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_8\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleacc.lib oleaut32.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28u.lib wxbase28u_net.lib wxbase28u_xml.lib wxmsw28u_adv.lib wxmsw28u_core.lib wxmsw28u_html.lib wxregexu.lib wxexpat.lib wxpng.lib wxtiff.lib wxjpeg.lib wxzlib.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\charityengine.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_8\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_8\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\charityengine.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_8\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_8\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswud";..\..\boinc_depends_win_vs2005_6_8\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_WINDOWS;_MT;__WXDEBUG__;WXDEBUG;_UNICODE;UNICODE;_CHARITYENGINE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="false"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				EnableEnhancedInstructionSet="0"
+				FloatingPointModel="2"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_8\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleacc.lib oleaut32.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxmsw28ud_adv.lib wxmsw28ud_core.lib wxmsw28ud_html.lib wxregexud.lib wxexpatd.lib wxjpegd.lib wxtiffd.lib wxpngd.lib wxzlibd.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\charityengine.exe"
+				LinkIncremental="0"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_8\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_8\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\charityengine.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_8\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_8\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswud";..\..\boinc_depends_win_vs2005_6_8\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_WINDOWS;_MT;__WXDEBUG__;WXDEBUG;_UNICODE;UNICODE;_CHARITYENGINE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="false"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				EnableEnhancedInstructionSet="0"
+				FloatingPointModel="2"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_8\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxmsw28ud_adv.lib wxmsw28ud_core.lib wxmsw28ud_html.lib wxregexud.lib wxexpatd.lib wxpngd.lib wxtiffd.lib wxjpegd.lib wxzlibd.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\charityengine.exe"
+				LinkIncremental="0"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_8\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_8\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\charityengine.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;xrc"
+			UniqueIdentifier="{08DB1F42-8D4B-491a-870C-2A991D5ED0DB}"
+			>
+			<File
+				RelativePath="..\clientgui\res\boinc.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boinc32.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boinc_logo.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boincdisconnect.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\BOINCGUIApp.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCGUIApp.rc"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boincsnooze.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\externalweblink.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\gridrepublic.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\gridrepublicamwizard.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\mess.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\proj.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\result.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\stats.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\usage.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizard_bitmap.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress01.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress02.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress03.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress04.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress05.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress06.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress07.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress08.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress09.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress10.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress11.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress12.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\xfer.xpm"
+				>
+			</File>
+			<Filter
+				Name="Skins"
+				>
+				<Filter
+					Name="Default"
+					>
+					<Filter
+						Name="Graphic"
+						>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\advanced_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\attach_project_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\attach_project_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\cancel_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\cancel_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\change_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\change_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\clear_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\clear_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\close_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\close_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\connecting_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\error_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\left_arrow_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\left_arrow_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_alert_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_dialog_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\preferences_dialog_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\preferences_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\project_area_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\project_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\resume_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\right_arrow_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\right_arrow_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\save_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\save_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\spacer_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\state_indicator_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\suspend_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\synchronize_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\synchronize_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_active_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_animation_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_animation_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_area_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_gauge_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_gauge_progress_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_suspended_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_tab_area_background_image.xpm"
+							>
+						</File>
+					</Filter>
+				</Filter>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Simple"
+			>
+			<Filter
+				Name="Prototype"
+				>
+				<File
+					RelativePath="..\clientgui\sg_BoincSimpleGUI.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_BoincSimpleGUI.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ClientStateIndicator.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ClientStateIndicator.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_CustomControls.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgMessages.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgMessages.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgPreferences.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgPreferences.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageButton.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageButton.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageLoader.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageLoader.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProgressBar.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProgressBar.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProjectsComponent.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProjectsComponent.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_SGUIListControl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_SGUIListControl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_StatImageLoader.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_StatImageLoader.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ViewTabPage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ViewTabPage.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="libboinc"
+			>
+			<File
+				RelativePath="..\lib\app_ipc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\app_ipc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\common_defs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\error_numbers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_imports.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\std_fixes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Wizards"
+			>
+			<File
+				RelativePath="..\clientgui\AccountInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerProcessingPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerProcessingPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerPropertiesPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerPropertiesPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AlreadyExistsPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AlreadyExistsPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionErrorPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionErrorPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NoInternetConnectionPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NoInternetConnectionPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotDetectedPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotDetectedPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotFoundPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotFoundPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectProcessingPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectProcessingPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectPropertiesPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectPropertiesPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\TermsOfUsePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\TermsOfUsePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\UnavailablePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\UnavailablePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WelcomePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WelcomePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WizardAttachProject.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WizardAttachProject.h"
+				>
+			</File>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\ProjectListCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ProjectListCtrl.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Infrastructure"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCBaseWizard.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCBaseWizard.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCWizards.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\wizardex.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\wizardex.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Infrastructure"
+			>
+			<File
+				RelativePath="..\clientgui\BOINCBaseFrame.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCBaseFrame.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCClientManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCClientManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCDialupManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCDialupManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\browser.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\browser.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\hyperlink.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\hyperlink.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\Localization.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\Localization.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\LogBOINC.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\LogBOINC.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\SkinManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\SkinManager.h"
+				>
+			</File>
+			<Filter
+				Name="FlatNotebook"
+				>
+				<File
+					RelativePath="..\clientgui\common\wxFlatNotebook.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxFlatNotebook.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxFlatNotebookImages.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxFNBDropTarget.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Validators"
+				>
+				<File
+					RelativePath="..\clientgui\ValidateAccountKey.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateAccountKey.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateEmailAddress.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateEmailAddress.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateURL.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateURL.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Dialogs"
+				>
+				<File
+					RelativePath="..\clientgui\DlgExitMessage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgExitMessage.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgGenericMessage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgGenericMessage.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Advanced"
+			>
+			<File
+				RelativePath="..\clientgui\AdvancedFrame.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AdvancedFrame.h"
+				>
+			</File>
+			<Filter
+				Name="Views"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCListCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCListCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCTaskCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCTaskCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewMessages.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewMessages.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewNews.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewNews.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewProjects.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewProjects.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewResources.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewResources.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewStatistics.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewStatistics.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewTransfers.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewTransfers.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewWork.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewWork.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCBaseView.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCBaseView.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAbout.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAbout.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferences.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferences.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferencesBase.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferencesBase.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgItemProperties.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgItemProperties.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgOptions.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgOptions.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgSelectComputer.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgSelectComputer.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxPieCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxPieCtrl.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Taskbar"
+			>
+			<File
+				RelativePath="..\clientgui\BOINCTaskBar.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCTaskBar.h"
+				>
+			</File>
+			<Filter
+				Name="Infrastructure"
+				>
+				<File
+					RelativePath="..\clientgui\msw\taskbarex.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\msw\taskbarex.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Document"
+			>
+			<File
+				RelativePath="..\clientgui\MainDocument.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\MainDocument.h"
+				>
+			</File>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\AsyncRPC.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\AsyncRPC.h"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client.h"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client_ops.cpp"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<File
+			RelativePath="..\clientgui\_wx_intellisense.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\BOINCGUIApp.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\BOINCGUIApp.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\Events.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\resource.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\stdwx.cpp"
+			>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Release|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Unicode - Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Unicode - Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\clientgui\stdwx.h"
+			>
+		</File>
+	</Files>
+	<Globals>
+		<Global
+			Name="RESOURCE_FILE"
+			Value="..\clientgui\BOINCGUIApp.rc"
+		/>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ce_boincsvcctrl.vcproj b/win_build/ce_boincsvcctrl.vcproj
new file mode 100644
index 0000000..cfc3065
--- /dev/null
+++ b/win_build/ce_boincsvcctrl.vcproj
@@ -0,0 +1,604 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boincsvcctrl"
+	ProjectGUID="{9FC47E90-4E0D-4383-B446-A84314B00764}"
+	RootNamespace="boincsvcctrl"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB boinc_dll.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB boinc_dll.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="0"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB boinc_dll.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				StringPooling="false"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB boinc_dll.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\clientctrl\boincsvcctrl.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientctrl\boincsvcctrl.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clientctrl\boincsvcctrl.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ce_boinctray.vcproj b/win_build/ce_boinctray.vcproj
new file mode 100644
index 0000000..301ec90
--- /dev/null
+++ b/win_build/ce_boinctray.vcproj
@@ -0,0 +1,598 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinctray"
+	ProjectGUID="{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}"
+	RootNamespace="boinc_ss"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib boinc_dll.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib boinc_dll.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib boinc_dll.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE;_CHARITYENGINE"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib boinc_dll.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\clienttray\tray_win.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\clienttray\boinc_tray.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clienttray\tray_win.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clienttray\boinc_tray.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ce_ss_app.vcproj b/win_build/ce_ss_app.vcproj
new file mode 100644
index 0000000..38a82fd
--- /dev/null
+++ b/win_build/ce_ss_app.vcproj
@@ -0,0 +1,503 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="ss_app"
+	ProjectGUID="{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_CONSOLE;_CHARITYENGINE"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib glaux.lib odbc32.lib odbccp32.lib wsock32.lib MSVCRT.LIB MSVCPRT.LIB"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_CONSOLE;_CHARITYENGINE"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib glaux.lib odbc32.lib odbccp32.lib wsock32.lib MSVCRT.LIB MSVCPRT.LIB"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CHARITYENGINE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib delayimp.lib wsock32.lib wininet.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CHARITYENGINE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_CHARITYENGINE"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib delayimp.lib wsock32.lib advapi32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\ss_app.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clientscr\boinc_ss_opengl.rc"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\clientscr\boinc_ss_opengl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\ss_app.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/api/Makefile.mingw b/win_build/config.h
similarity index 100%
copy from api/Makefile.mingw
copy to win_build/config.h
diff --git a/win_build/crypt_prog.vcproj b/win_build/crypt_prog.vcproj
new file mode 100644
index 0000000..d59b22d
--- /dev/null
+++ b/win_build/crypt_prog.vcproj
@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="crypt_prog"
+	ProjectGUID="{C04F0F2C-B75D-4628-8656-6163B28BD69E}"
+	RootNamespace="crypt_prog"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\Debug"
+			IntermediateDirectory=".\Build\Debug\crypt_prog\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/crypt_prog.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../openssl/include;../curl/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough=""
+				PrecompiledHeaderFile="$(IntDir)/crypt_prog.pch"
+				AssemblerListingLocation=".\Build\Debug\crypt_prog\obj/"
+				ObjectFile=".\Build\Debug\crypt_prog\obj/"
+				ProgramDataBaseFileName=".\Build\Debug\crypt_prog\obj/"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="ssleay32.lib libeay32.lib libcurl.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib libboincd.lib"
+				OutputFile=".\Build\Debug/crypt_prog.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../openssl/mswin/$(PROCESSOR_ARCHITECTURE)/lib";"../curl/mswin/$(PROCESSOR_ARCHITECTURE)/lib";../../;Build/Debug"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\Debug/crypt_prog_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking crypt_prog.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\Release"
+			IntermediateDirectory=".\Build\Release\crypt_prog\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/crypt_prog.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../openssl/include;../curl/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				StringPooling="false"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough=""
+				PrecompiledHeaderFile="$(IntDir)/crypt_prog.pch"
+				AssemblerListingLocation=".\Build\Release\crypt_prog\obj/"
+				ObjectFile=".\Build\Release\crypt_prog\obj/"
+				ProgramDataBaseFileName=".\Build\Release\crypt_prog\obj/"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="ssleay32.lib libeay32.lib libcurl.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib libboinc.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\Release/crypt_prog.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../openssl/mswin/$(PROCESSOR_ARCHITECTURE)/lib";"../curl/mswin/$(PROCESSOR_ARCHITECTURE)/lib";../../;Build/Release"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\Release/crypt_prog_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking crypt_prog.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\crypt_prog.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\lib\crypt.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/example_app_atiopencl.vcproj b/win_build/example_app_atiopencl.vcproj
new file mode 100644
index 0000000..2d40e4d
--- /dev/null
+++ b/win_build/example_app_atiopencl.vcproj
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="example_app_atiopencl"
+	ProjectGUID="{C41F5C14-772D-4B56-BAF3-0FE8BF6807D5}"
+	RootNamespace="atiopencl"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(ATISTREAMSDKROOT)\include"
+				PreprocessorDefinitions="ATI_OS_WIN"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opencl.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				AdditionalLibraryDirectories="$(ATISTREAMSDKROOT)\lib\x86"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy ..\samples\atiopencl\*.cl "$(OUTDIR)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(ATISTREAMSDKROOT)\include"
+				PreprocessorDefinitions="ATI_OS_WIN"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opencl.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				AdditionalLibraryDirectories="$(ATISTREAMSDKROOT)\lib\x86_64"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy ..\samples\atiopencl\*.cl "$(OUTDIR)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(ATISTREAMSDKROOT)\include"
+				PreprocessorDefinitions="ATI_OS_WIN"
+				RuntimeLibrary="1"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opencl.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				AdditionalLibraryDirectories="$(ATISTREAMSDKROOT)\lib\x86"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy ..\samples\atiopencl\*.cl "$(OUTDIR)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(ATISTREAMSDKROOT)\include"
+				PreprocessorDefinitions="ATI_OS_WIN"
+				RuntimeLibrary="0"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opencl.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				AdditionalLibraryDirectories="$(ATISTREAMSDKROOT)\lib\x86_64"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy ..\samples\atiopencl\*.cl "$(OUTDIR)""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\samples\atiopencl\atiopencl.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\atiopencl\atiopencl_kernels.cl"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\samples\atiopencl\atiopencl.hpp"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/example_app_multi_thread.vcproj b/win_build/example_app_multi_thread.vcproj
new file mode 100644
index 0000000..41db70b
--- /dev/null
+++ b/win_build/example_app_multi_thread.vcproj
@@ -0,0 +1,441 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="example_app_multi_thread"
+	ProjectGUID="{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}"
+	RootNamespace="example_app_multi_thread"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib opengl32.lib glu32.lib odbc32.lib odbccp32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\multi_thread_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\multi_thread_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib opengl32.lib glu32.lib odbc32.lib odbccp32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\multi_thread_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\multi_thread_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib ole32.lib delayimp.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\multi_thread_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\multi_thread_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib ole32.lib psapi.lib delayimp.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\multi_thread_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\multi_thread_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\samples\multi_thread\multi_thread.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/example_app_nvcuda.vcproj b/win_build/example_app_nvcuda.vcproj
new file mode 100644
index 0000000..d541b0a
--- /dev/null
+++ b/win_build/example_app_nvcuda.vcproj
@@ -0,0 +1,840 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="example_app_nvcuda"
+	ProjectGUID="{55F71337-32A6-4C26-8CBA-A06A9183D6F2}"
+	RootNamespace="nvcuda"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+		<ToolFile
+			RelativePath=".\nvcuda.rules"
+		/>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="CUDA Build Rule"
+				Include=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				Runtime="1"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH);"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="cudart.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(CUDA_LIB_PATH)/../lib""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				EnableCOMDATFolding="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="CUDA Build Rule"
+				Include=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				Runtime="1"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH);"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="cudart.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(CUDA_LIB_PATH)/../lib64""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				EnableCOMDATFolding="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="CUDA Build Rule"
+				Include=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH);"
+				PreprocessorDefinitions="WIN32;_NDEBUG;_CONSOLE"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="cudart.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(CUDA_LIB_PATH)/../lib""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="CUDA Build Rule"
+				Include=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH);"
+				PreprocessorDefinitions="WIN32;_NDEBUG;_CONSOLE"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="cudart.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(CUDA_LIB_PATH)/../lib64""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="EmuDebug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="CUDA Build Rule"
+				Include=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				Runtime="1"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH);"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="cudartemu.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(CUDA_LIB_PATH)/../lib""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				EnableCOMDATFolding="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="EmuDebug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="CUDA Build Rule"
+				Include=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH);"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="cudartemu.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(CUDA_LIB_PATH)/../lib64""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				EnableCOMDATFolding="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="EmuRelease|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="CUDA Build Rule"
+				Include=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH);"
+				PreprocessorDefinitions="WIN32;_NDEBUG;_CONSOLE"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="cudartemu.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(CUDA_LIB_PATH)/../lib""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="EmuRelease|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="CUDA Build Rule"
+				Include=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH);"
+				PreprocessorDefinitions="WIN32;_NDEBUG;_CONSOLE"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="cudartemu.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(CUDA_LIB_PATH)/../lib64""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cu;cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\samples\nvcuda\cuda.cpp"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						RuntimeLibrary="0"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="EmuRelease|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						RuntimeLibrary="0"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\samples\nvcuda\cuda_kernel.cu"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="CUDA Build Rule"
+						Debug="true"
+						ExtraNvccOptions="-m32"
+						Optimization="0"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="CUDA Build Rule"
+						Debug="true"
+						ExtraNvccOptions="-m64"
+						Optimization="0"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="CUDA Build Rule"
+						ExtraNvccOptions="-m32"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="CUDA Build Rule"
+						ExtraNvccOptions="-m64"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="EmuDebug|Win32"
+					>
+					<Tool
+						Name="CUDA Build Rule"
+						Debug="true"
+						Emulation="true"
+						ExtraNvccOptions="-m32"
+						Optimization="0"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="EmuDebug|x64"
+					>
+					<Tool
+						Name="CUDA Build Rule"
+						Debug="true"
+						Emulation="true"
+						ExtraNvccOptions="-m64"
+						Optimization="0"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="EmuRelease|Win32"
+					>
+					<Tool
+						Name="CUDA Build Rule"
+						Emulation="true"
+						ExtraNvccOptions="-m32"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="EmuRelease|x64"
+					>
+					<Tool
+						Name="CUDA Build Rule"
+						Emulation="true"
+						ExtraNvccOptions="-m64"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			>
+			<File
+				RelativePath="..\samples\nvcuda\cuda.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\nvcuda\cuda_config.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/example_app_nvopencl.vcproj b/win_build/example_app_nvopencl.vcproj
new file mode 100644
index 0000000..4fef0d4
--- /dev/null
+++ b/win_build/example_app_nvopencl.vcproj
@@ -0,0 +1,345 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="example_app_nvopencl"
+	ProjectGUID="{BDC69EE0-033E-4AE1-B6AD-670E26FC117B}"
+	RootNamespace="nvopencl"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH);/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/OpenCL/common/inc/;C:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/shared/inc/"
+				PreprocessorDefinitions="NV_OS_WIN"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="oclUtils32D.lib OpenCL.lib shrUtils32D.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				AdditionalLibraryDirectories="$(CUDA_LIB_PATH)\..\lib;/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/OpenCL/common/lib/;/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/shared/lib;/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/OpenCL/OpenCL/common/lib/$(PlatformName)/"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy ..\samples\nvopencl\*.cl "$(OUTDIR)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH)"
+				PreprocessorDefinitions="NV_OS_WIN"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opencl.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				AdditionalLibraryDirectories="$(CUDA_LIB_PATH)\..\lib64"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy ..\samples\nvopencl\*.cl "$(OUTDIR)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH);/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/OpenCL/common/inc/;C:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/shared/inc/"
+				PreprocessorDefinitions="NV_OS_WIN"
+				RuntimeLibrary="1"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="oclUtils32D.lib OpenCL.lib shrUtils32D.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				AdditionalLibraryDirectories="$(CUDA_LIB_PATH)\..\lib;/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/OpenCL/common/lib/;/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/shared/lib;/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/OpenCL/OpenCL/common/lib/$(PlatformName)/"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy ..\samples\nvopencl\*.cl "$(OUTDIR)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;$(CUDA_INC_PATH)"
+				PreprocessorDefinitions="NV_OS_WIN"
+				RuntimeLibrary="0"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opencl.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				AdditionalLibraryDirectories="$(CUDA_LIB_PATH)\..\lib64"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy ..\samples\nvopencl\*.cl "$(OUTDIR)""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\samples\nvopencl\nvopencl.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\nvopencl\nvopencl_kernels.cl"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\samples\nvopencl\nvopencl.hpp"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/glut.vcproj b/win_build/glut.vcproj
new file mode 100644
index 0000000..2e6c209
--- /dev/null
+++ b/win_build/glut.vcproj
@@ -0,0 +1,647 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="glut"
+	ProjectGUID="{C4165626-F68F-4F66-A126-3B82DDBB7480}"
+	RootNamespace="glut"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;CLIENT;BOINC_APP_GRAPHICS;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\glut32.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;CLIENT;BOINC_APP_GRAPHICS;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\glut32.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;HAVE_STD_TRANSFORM;CLIENT;BOINC_APP_GRAPHICS"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="0"
+				CompileAs="2"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\glut32.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;HAVE_STD_TRANSFORM;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="0"
+				CompileAs="2"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\glut32.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\samples\glut\glut_roman.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\samples\glut\glut_stroke.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\samples\glut\glut_swidth.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\samples\glut\win32_glx.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\samples\glut\win32_util.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\samples\glut\win32_x11.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\samples\glut\glut.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\glut\glutbitmap.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\glut\glutint.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\glut\glutstroke.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\glut\glutwin32.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\glut\stroke.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\glut\win32_glx.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\glut\win32_x11.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/image_libs.vcproj b/win_build/image_libs.vcproj
new file mode 100644
index 0000000..2cb1010
--- /dev/null
+++ b/win_build/image_libs.vcproj
@@ -0,0 +1,317 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="image_libs"
+	ProjectGUID="{D3D21F11-A7E7-4EA2-8518-E24695133BFF}"
+	RootNamespace="image_libs"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;CLIENT;BOINC_APP_GRAPHICS;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\image_libs.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;CLIENT;BOINC_APP_GRAPHICS;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\image_libs.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;HAVE_STD_TRANSFORM;CLIENT;BOINC_APP_GRAPHICS"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\image_libs.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;HAVE_STD_TRANSFORM;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\image_libs.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\samples\image_libs\bmplib.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\image_libs\tgalib.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\samples\image_libs\bmplib.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\image_libs\tgalib.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/installerv2/BOINC.ism b/win_build/installerv2/BOINC.ism
new file mode 100644
index 0000000..6c26d4e
Binary files /dev/null and b/win_build/installerv2/BOINC.ism differ
diff --git a/win_build/installerv2/BOINC_vbox.ism b/win_build/installerv2/BOINC_vbox.ism
new file mode 100644
index 0000000..d92788a
Binary files /dev/null and b/win_build/installerv2/BOINC_vbox.ism differ
diff --git a/win_build/installerv2/BOINCx64.ism b/win_build/installerv2/BOINCx64.ism
new file mode 100644
index 0000000..6e50b7e
Binary files /dev/null and b/win_build/installerv2/BOINCx64.ism differ
diff --git a/win_build/installerv2/BOINCx64_vbox.ism b/win_build/installerv2/BOINCx64_vbox.ism
new file mode 100644
index 0000000..4fb4cb5
Binary files /dev/null and b/win_build/installerv2/BOINCx64_vbox.ism differ
diff --git a/win_build/installerv2/CharityEngine.ism b/win_build/installerv2/CharityEngine.ism
new file mode 100644
index 0000000..beb9166
Binary files /dev/null and b/win_build/installerv2/CharityEngine.ism differ
diff --git a/win_build/installerv2/GridRepublic.ism b/win_build/installerv2/GridRepublic.ism
new file mode 100644
index 0000000..fe230b7
Binary files /dev/null and b/win_build/installerv2/GridRepublic.ism differ
diff --git a/win_build/installerv2/GridRepublicx64.ism b/win_build/installerv2/GridRepublicx64.ism
new file mode 100644
index 0000000..7fd3124
Binary files /dev/null and b/win_build/installerv2/GridRepublicx64.ism differ
diff --git a/win_build/installerv2/Progress.ism b/win_build/installerv2/Progress.ism
new file mode 100644
index 0000000..2c5156d
Binary files /dev/null and b/win_build/installerv2/Progress.ism differ
diff --git a/win_build/installerv2/Progressx64.ism b/win_build/installerv2/Progressx64.ism
new file mode 100644
index 0000000..605e3f0
Binary files /dev/null and b/win_build/installerv2/Progressx64.ism differ
diff --git a/win_build/installerv2/Seed.ism b/win_build/installerv2/Seed.ism
new file mode 100644
index 0000000..8c40284
Binary files /dev/null and b/win_build/installerv2/Seed.ism differ
diff --git a/win_build/installerv2/WCG.ism b/win_build/installerv2/WCG.ism
new file mode 100644
index 0000000..d4cccf1
Binary files /dev/null and b/win_build/installerv2/WCG.ism differ
diff --git a/win_build/installerv2/redist/0409/ce-eula.rtf b/win_build/installerv2/redist/0409/ce-eula.rtf
new file mode 100644
index 0000000..858b180
--- /dev/null
+++ b/win_build/installerv2/redist/0409/ce-eula.rtf
@@ -0,0 +1,26 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
+{\fonttbl\f0\fmodern\fcharset0 CourierNewPSMT;}
+{\colortbl;\red255\green255\blue255;}
+\vieww12000\viewh15840\viewkind0
+\deftab720
+\pard\pardeftab720\ql\qnatural
+
+\f0\fs20 \cf0 Charity Engine\
+\
+License Agreement\
+\
+Please carefully read the following terms and conditions before using this software. Your use of this software indicates your acceptance of this license agreement and warranty.\
+\
+Restrictions\
+\
+You may use this software on a computer system only if you own the system or have the permission of the owner.\
+\
+Disclaimer of Warranty\
+\
+THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, AND THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. ANY STATUTORY WARRANTY OF NON-INFRINGEMENT IS ALSO DISCLAIMED.\
+\
+Distribution\
+\
+This is free software. It is distributed under the terms of the GNU Lesser General Public License as published by the Free Software Foundation (http://www.fsf.org/). The source code may be obtained from the BOINC web site (http://boinc.berkeley.edu/).\
+\
+}
\ No newline at end of file
diff --git a/win_build/installerv2/redist/0409/cpdn-eula.rtf b/win_build/installerv2/redist/0409/cpdn-eula.rtf
new file mode 100644
index 0000000..6d67101
--- /dev/null
+++ b/win_build/installerv2/redist/0409/cpdn-eula.rtf
@@ -0,0 +1,103 @@
+{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;}{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}
+{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f57\fmodern\fcharset238\fprq1 Courier New CE;}{\f58\fmodern\fcharset204\fprq1 Courier New Cyr;}{\f60\fmodern\fcharset161\fprq1 Courier New Greek;}
+{\f61\fmodern\fcharset162\fprq1 Courier New Tur;}{\f62\fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f63\fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f64\fmodern\fcharset186\fprq1 Courier New Baltic;}
+{\f65\fmodern\fcharset163\fprq1 Courier New (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
+\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv 
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid6964488\rsid13650427
+\rsid16453123}{\*\generator Microsoft Word 11.0.6568;}{\info{\author Rom Walton}{\operator Rom Walton}{\creatim\yr2005\mo12\dy19\hr14\min29}{\revtim\yr2006\mo2\dy8\hr11\min26}{\version4}{\edmins1}{\nofpages3}{\nofwords1085}{\nofchars6185}{\nofcharsws7256}
+{\vern24579}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind4\viewscale100\nolnhtadjtbl\rsidroot6964488 \fet0
+\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}
+{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0\pararsid16453123 
+\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f2\fs20\insrsid16453123\charrsid16453123 
+The BBC Climate Change Experiment requires two pieces of software, the BOINC Manager for the BBC Climate Change Experiment, developed by the University of California, Berkeley, and the climate
+prediction.net / BBC Climate Change Experiment, developed by the climateprediction.net consortium led by the University of Oxford. In agreeing to participate in this experiment, you accept the terms of both the following licensing agreements. 
+\par 
+\par --------
+\par 
+\par Berkeley Open Infrastructure for Network Computing (BOINC) Manager for the BBC Climate Change Experiment
+\par 
+\par License Agreement
+\par 
+\par Please carefully read the following terms and conditions before using this software.  Your use of this software indicates your acceptance of this license agreement and warranty.
+\par 
+\par Disclaimer of Warranty
+\par 
+\par THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.  NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
+\par 
+\par Restrictions
+\par 
+\par You may use this software on a computer system only if you own the system or have the permission of the owner.
+\par 
+\par Distribution
+\par 
+\par This is free software. It is distributed under the terms of the GNU Lesser General Public Licenseas published by the Free Software Foundation (http://www.fsf.org/). The source code may be obtained from the BOINC web site (http://boinc.berkeley.edu).
+
+\par 
+\par --------
+\par 
+\par Climateprediction.net / BBC Climate Change Experiment
+\par 
+\par License Agreement
+\par 
+\par This agreement is between The Chancellor, Masters an
+d Scholars of the University of Oxford ("the University") whose administrative offices are at Wellington Square, Oxford OX1 2JD, and any participant in the BBC Climate Change Experiment or any other experiment in the "climateprediction.net" project (you, 
+The Licensee). For the purposes of this license the University is acting on behalf of the climateprediction.net project ("The Project") whose aims and work are described below in Note 4.
+\par 
+\par The University wishes to sincerely acknowledge the valuable work of t
+he partners who have contributed  to this software and to the climateprediction.net project. Core contributors include: The Met Office; The Open University; The University of Reading; The Rutherford Appleton Laboratory.
+\par 
+\par The University grants you a non-exclusive License to install and run the following for a period of up to three years following the date of acceptance of this agreement:
+\par 
+\par A precompiled executable version of the HadSM3, HadCM3L or HadCM3 climate models (see Note 1), with associated forcing datasets, for bona fide research in connection with the Project on condition you accept the following conditions:
+\par 
+\par 1) You accept that your name, e-mail address and machine details will be stored on a database by The Project but will not be passed on to any third party.
+\par 
+\par 2) You will either return the results of your experiment to The Project unaltered or notify The Project that your experiment has been prematurely terminated (see note 2).
+\par 
+\par 3) You will connect to the internet sufficiently frequently and for sufficient time for the client software to notify the server of your progress and return results. 
+\par 
+\par 4) You will not use this software or data for commercial exploitation, business use, resale or transfer to any third party.
+\par 
+\par 5) You accept that the data and software have been developed for the purposes of The Met Office and The Project, that no warranty is given as to its suitability for use on the Licensee's equipment and that no liability 
+is accepted by The Met Office or The Project for any errors or omissions in the data, software or associated information and/or documentation.
+\par 
+\par 6) You accept that the Met Office retains the intellectual property rights on the climate models HadSM3, HadCM3L
+, HadCM3 and developments therefrom, and The Project retains intellectual property rights on software developed to allow these models to be run securely on personal computers in a distributed environment, and reserve the right to require acknowledgements 
+and/or co-authorship in any publication arising out of their use.  
+\par 
+\par 7) You accept that you will not add to, modify or transfer to any third party any part of the software, data files or documentation provided by the Project (unless instructed to by a representative of the Project).
+\par 
+\par 8) You accept that your participation in the experiment is given without restrictions. The Project is under no requirement to acknowledge any individual participant in published papers or elsewhere (see Note 3).
+\par 
+\par 9) You will only use this software and data on a computer system for which you have permission to do so.
+\par 
+\par 10) If any of the above clauses are deemed invalid, this does not invalidate any other clause.
+\par 
+\par 11) You accept that this License may be terminated without notice if you are in breach of any of these conditions.
+\par 
+\par Disclaimer
+\par 
+\par The University, the Met Office or any of the participants in the Project are not liable for any damages, being direct, indirect, special or incidental or loss of profits arising from the use of sof
+tware or other material supplied as part of the "climateprediction.net" project. There is no obligation to supply maintenance, support, updates, enhancements or modifications for software or other material supplied.
+\par 
+\par Note 1: Source code. To ensure the inte
+grity of the climateprediction.net experiment, this license applies only to precompiled executable versions of the relevant climate models. The Met Office has a policy of allowing access to the entire model source code for specific bona fide research purp
+oses. Any person or persons wishing to access the model source code can make a written application to The Met Office stating the purpose and likely duration of their research. Please see www.metoffice.gov.uk for more details.
+\par 
+\par Note 2: If you do wish to terminate your experiment, please do so using the "Abort" command in the BOINC Manager. This will notify us of your decision automatically and we will send your work-unit to someone else.
+\par 
+\par Note 3: We will sincerely acknowledge participants collectively in any 
+publications arising from this project.  If and only if you give us permission to do so, your participant name and the processing resources you have successfully contributed will be made available electronically through the project web site. 
+\par 
+\par Note 4: The aim of the climateprediction.net project is to quantify the uncertainties in climate forecasts. This is to be achieved by creating a massive ensemble of many forecasts made with slightly differing models which, together, provide a more compreh
+e
+nsive estimate of future climate than could any single simulation. This approach is known as ensemble forecasting and requires an enormous amount of computing power. The only feasible solution is to combine the power of a very large number of ordinary des
+k
+top personal computers, each PC undertaking one member of the ensemble. The list of contributors to the climateprediction.net project can be found by looking at the website of the same name. Major contributors are listed in the acknowledgement above. In d
+istributing and supporting the software covered in this license the University is acting on behalf of these contributors to further the work of the climateprediction.net project.}{\f2\fs20\insrsid6964488\charrsid16453123 
+\par }}
\ No newline at end of file
diff --git a/win_build/installerv2/redist/0409/eula.rtf b/win_build/installerv2/redist/0409/eula.rtf
new file mode 100644
index 0000000..35a209d
Binary files /dev/null and b/win_build/installerv2/redist/0409/eula.rtf differ
diff --git a/win_build/installerv2/redist/0409/gr-eula.rtf b/win_build/installerv2/redist/0409/gr-eula.rtf
new file mode 100644
index 0000000..b8b95c1
--- /dev/null
+++ b/win_build/installerv2/redist/0409/gr-eula.rtf
@@ -0,0 +1,36 @@
+{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f185\froman\fcharset238\fprq2 Times New Roman CE;}{\f186\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f188\froman\fcharset161\fprq2 Times New Roman Greek;}
+{\f189\froman\fcharset162\fprq2 Times New Roman Tur;}{\f190\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f191\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f192\froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\f193\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f205\fmodern\fcharset238\fprq1 Courier New CE;}{\f206\fmodern\fcharset204\fprq1 Courier New Cyr;}{\f208\fmodern\fcharset161\fprq1 Courier New Greek;}
+{\f209\fmodern\fcharset162\fprq1 Courier New Tur;}{\f210\fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f211\fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f212\fmodern\fcharset186\fprq1 Courier New Baltic;}
+{\f213\fmodern\fcharset163\fprq1 Courier New (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
+\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv 
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid6964488\rsid13650427}
+{\*\generator Microsoft Word 11.0.6568;}{\info{\author Rom Walton}{\operator Rom Walton}{\creatim\yr2005\mo12\dy19\hr14\min29}{\revtim\yr2006\mo1\dy31\hr22\min7}{\version3}{\edmins1}{\nofpages1}{\nofwords140}{\nofchars802}{\nofcharsws941}{\vern24579}}
+\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind4\viewscale100\nolnhtadjtbl\rsidroot6964488 \fet0\sectd 
+\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}
+{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain 
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6964488 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f2\fs20\insrsid6964488\charrsid6964488 GridRepublic Client Software}{\f2\fs20\insrsid13650427 :}{
+\f2\fs20\insrsid6964488\charrsid6964488  
+\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f2\fs20\insrsid6964488 Berkeley Open Infrastructure for Network Computing (BOINC)
+\par 
+\par License Agreement
+\par 
+\par Please carefully read the following terms and conditions before using this software.  Your use of this software indicates your acceptance of this license agreement and warranty.
+\par 
+\par Disclaimer of Warranty
+\par 
+\par THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.  NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
+\par 
+\par Restrictions
+\par 
+\par You may use this software on a computer system only if you own the system or have the permission of the owner.
+\par 
+\par Distribution
+\par 
+\par This is free software.It is distributed under the terms of the GNU Lesser General Public Licenseas published by the Free Software Foundation (http://www.fsf.org/).The source code may be obtainedfrom the BOINC web site (http://boinc.berkeley.edu).
+\par 
+\par }}
\ No newline at end of file
diff --git a/win_build/installerv2/redist/0409/ptp-eula.rtf b/win_build/installerv2/redist/0409/ptp-eula.rtf
new file mode 100644
index 0000000..032951e
--- /dev/null
+++ b/win_build/installerv2/redist/0409/ptp-eula.rtf
@@ -0,0 +1,22 @@
+{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}}
+{\colortbl ;\red0\green0\blue255;}
+{\*\generator Msftedit 5.41.21.2506;}\viewkind4\uc1\pard\nowidctlpar\f0\fs20 Progress Thru Processors\par
+\par
+License Agreement\par
+\par
+Please carefully read the following terms and conditions before using this software. Your use of this software indicates your acceptance of this license agreement and warranty.\par
+\par
+Disclaimer of Warranty\par
+\par
+THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, AND THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. ANY STATUTORY WARRANTY OF NON-INFRINGEMENT IS ALSO DISCLAIMED.\par
+\par
+Restrictions\par
+\par
+You may use this software on a computer system only if you own the system or have the permission of the owner.\par
+\par
+Distribution\par
+\par
+\pard This is free software. It is distributed under the terms of the GNU Lesser General Public License as published by the Free Software Foundation (http://www.fsf.org/). The source code may be obtained from the BOINC web site (http://boinc.berkeley.edu/).\par
+\par
+}
+ 
\ No newline at end of file
diff --git a/win_build/installerv2/redist/CampusParty/project_init.xml b/win_build/installerv2/redist/CampusParty/project_init.xml
new file mode 100644
index 0000000..a173c67
--- /dev/null
+++ b/win_build/installerv2/redist/CampusParty/project_init.xml
@@ -0,0 +1,6 @@
+<project_init>
+    <name>http://boinc.bakerlab.org/rosetta/</name>
+    <url>http://boinc.bakerlab.org/rosetta/</url>
+    <account_key></account_key>
+    <team_name>CampusParty</team_name>
+</project_init>
diff --git a/win_build/installerv2/redist/CharityEngine/CE_IsDialogBanner.bmp b/win_build/installerv2/redist/CharityEngine/CE_IsDialogBanner.bmp
new file mode 100644
index 0000000..f271c9d
Binary files /dev/null and b/win_build/installerv2/redist/CharityEngine/CE_IsDialogBanner.bmp differ
diff --git a/win_build/installerv2/redist/CharityEngine/CE_IsDialogBitmap.bmp b/win_build/installerv2/redist/CharityEngine/CE_IsDialogBitmap.bmp
new file mode 100644
index 0000000..212e873
Binary files /dev/null and b/win_build/installerv2/redist/CharityEngine/CE_IsDialogBitmap.bmp differ
diff --git a/win_build/installerv2/redist/CharityEngine/CE_Splash.bmp b/win_build/installerv2/redist/CharityEngine/CE_Splash.bmp
new file mode 100644
index 0000000..3eea1f3
Binary files /dev/null and b/win_build/installerv2/redist/CharityEngine/CE_Splash.bmp differ
diff --git a/win_build/installerv2/redist/CharityEngine/acct_mgr_url.xml b/win_build/installerv2/redist/CharityEngine/acct_mgr_url.xml
new file mode 100644
index 0000000..81d0243
--- /dev/null
+++ b/win_build/installerv2/redist/CharityEngine/acct_mgr_url.xml
@@ -0,0 +1,18 @@
+<acct_mgr>
+    <name>Charity Engine</name>
+    <url>http://www.charityengine.com/</url>
+    <cookie_required/>
+    <cookie_failure_url>http://www.charityengine.com/forgot</cookie_failure_url>
+<signing_key>
+1024
+9c3af22a230f1eb122b8eab256e5e46b49f6d357e65d00e414cf6af105aef217
+1de0793353097bbbb918413f79cb5bfaa4532daf061ece07b63f209690a3e1b1
+8906a9ae4f521ec25e6fb79b8679dd4c18c0f022dcb95baefeca091d572c7738
+e1b1d542bbec94552e0e37c698427f4538b947b79072d112ebcf4d9c509b16d9
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010001
+.
+</signing_key>
+</acct_mgr>
diff --git a/client/win/res/ce.ico b/win_build/installerv2/redist/CharityEngine/ce.ico
similarity index 100%
copy from client/win/res/ce.ico
copy to win_build/installerv2/redist/CharityEngine/ce.ico
diff --git a/win_build/installerv2/redist/GridRepublic/GR_IsDialogBanner.bmp b/win_build/installerv2/redist/GridRepublic/GR_IsDialogBanner.bmp
new file mode 100644
index 0000000..515a872
Binary files /dev/null and b/win_build/installerv2/redist/GridRepublic/GR_IsDialogBanner.bmp differ
diff --git a/win_build/installerv2/redist/GridRepublic/GR_IsDialogBitmap.bmp b/win_build/installerv2/redist/GridRepublic/GR_IsDialogBitmap.bmp
new file mode 100644
index 0000000..24fd6bf
Binary files /dev/null and b/win_build/installerv2/redist/GridRepublic/GR_IsDialogBitmap.bmp differ
diff --git a/client/win/res/gridrepublic.ico b/win_build/installerv2/redist/GridRepublic/GR_setup.ico
similarity index 100%
copy from client/win/res/gridrepublic.ico
copy to win_build/installerv2/redist/GridRepublic/GR_setup.ico
diff --git a/win_build/installerv2/redist/GridRepublic/GR_splash.bmp b/win_build/installerv2/redist/GridRepublic/GR_splash.bmp
new file mode 100644
index 0000000..8ee9eec
Binary files /dev/null and b/win_build/installerv2/redist/GridRepublic/GR_splash.bmp differ
diff --git a/clientgui/res/templates/gridrepublicamwizard.bmp b/win_build/installerv2/redist/GridRepublic/GR_wizard.bmp
similarity index 100%
copy from clientgui/res/templates/gridrepublicamwizard.bmp
copy to win_build/installerv2/redist/GridRepublic/GR_wizard.bmp
diff --git a/win_build/installerv2/redist/GridRepublic/GridRepublic.url b/win_build/installerv2/redist/GridRepublic/GridRepublic.url
new file mode 100644
index 0000000..ffbadf3
--- /dev/null
+++ b/win_build/installerv2/redist/GridRepublic/GridRepublic.url
@@ -0,0 +1,5 @@
+[InternetShortcut]
+URL=http://www.gridrepublic.com/
+Modified=80A89BD62711C60198
+IconIndex=0
+IconFile=C:\Program Files\GridRepublic\GridRepublic.ico
diff --git a/win_build/installerv2/redist/GridRepublic/acct_mgr_url.xml b/win_build/installerv2/redist/GridRepublic/acct_mgr_url.xml
new file mode 100644
index 0000000..a30cb56
--- /dev/null
+++ b/win_build/installerv2/redist/GridRepublic/acct_mgr_url.xml
@@ -0,0 +1,16 @@
+<acct_mgr>
+     <name>GridRepublic</name>
+     <url>http://www.gridrepublic.org/</url>
+     <signing_key>
+1024
+9c3af22a230f1eb122b8eab256e5e46b49f6d357e65d00e414cf6af105aef217
+1de0793353097bbbb918413f79cb5bfaa4532daf061ece07b63f209690a3e1b1
+8906a9ae4f521ec25e6fb79b8679dd4c18c0f022dcb95baefeca091d572c7738
+e1b1d542bbec94552e0e37c698427f4538b947b79072d112ebcf4d9c509b16d9
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010001
+.
+     </signing_key>
+</acct_mgr> 
\ No newline at end of file
diff --git a/win_build/installerv2/redist/GridRepublic/templates/GR_IsDialogBanner.bmp b/win_build/installerv2/redist/GridRepublic/templates/GR_IsDialogBanner.bmp
new file mode 100644
index 0000000..515a872
Binary files /dev/null and b/win_build/installerv2/redist/GridRepublic/templates/GR_IsDialogBanner.bmp differ
diff --git a/win_build/installerv2/redist/GridRepublic/templates/GR_IsDialogBitmap.bmp b/win_build/installerv2/redist/GridRepublic/templates/GR_IsDialogBitmap.bmp
new file mode 100644
index 0000000..24fd6bf
Binary files /dev/null and b/win_build/installerv2/redist/GridRepublic/templates/GR_IsDialogBitmap.bmp differ
diff --git a/client/win/res/gridrepublic.ico b/win_build/installerv2/redist/GridRepublic/templates/GR_setup.ico
similarity index 100%
copy from client/win/res/gridrepublic.ico
copy to win_build/installerv2/redist/GridRepublic/templates/GR_setup.ico
diff --git a/win_build/installerv2/redist/GridRepublic/templates/GR_splash.bmp b/win_build/installerv2/redist/GridRepublic/templates/GR_splash.bmp
new file mode 100644
index 0000000..fbd04dc
Binary files /dev/null and b/win_build/installerv2/redist/GridRepublic/templates/GR_splash.bmp differ
diff --git a/win_build/installerv2/redist/GridRepublic/templates/GR_splash.png b/win_build/installerv2/redist/GridRepublic/templates/GR_splash.png
new file mode 100644
index 0000000..33a169a
Binary files /dev/null and b/win_build/installerv2/redist/GridRepublic/templates/GR_splash.png differ
diff --git a/clientgui/res/templates/gridrepublicamwizard.bmp b/win_build/installerv2/redist/GridRepublic/templates/GR_wizard.bmp
similarity index 100%
copy from clientgui/res/templates/gridrepublicamwizard.bmp
copy to win_build/installerv2/redist/GridRepublic/templates/GR_wizard.bmp
diff --git a/win_build/installerv2/redist/GridRepublic/templates/GR_wizard.png b/win_build/installerv2/redist/GridRepublic/templates/GR_wizard.png
new file mode 100644
index 0000000..66baf4e
Binary files /dev/null and b/win_build/installerv2/redist/GridRepublic/templates/GR_wizard.png differ
diff --git a/win_build/installerv2/redist/Progress/PTP_IsDialogBitmap.bmp b/win_build/installerv2/redist/Progress/PTP_IsDialogBitmap.bmp
new file mode 100644
index 0000000..a52208b
Binary files /dev/null and b/win_build/installerv2/redist/Progress/PTP_IsDialogBitmap.bmp differ
diff --git a/win_build/installerv2/redist/Progress/PTP_Wizard.bmp b/win_build/installerv2/redist/Progress/PTP_Wizard.bmp
new file mode 100644
index 0000000..5021010
Binary files /dev/null and b/win_build/installerv2/redist/Progress/PTP_Wizard.bmp differ
diff --git a/win_build/installerv2/redist/Progress/acct_mgr_url.xml b/win_build/installerv2/redist/Progress/acct_mgr_url.xml
new file mode 100644
index 0000000..9d79a4f
--- /dev/null
+++ b/win_build/installerv2/redist/Progress/acct_mgr_url.xml
@@ -0,0 +1,18 @@
+<acct_mgr>
+    <name>GridRepublic</name>
+    <url>http://www.gridrepublic.org/</url>
+    <cookie_required/>
+    <cookie_failure_url>http://apps.facebook.com/processors/credentials.php</cookie_failure_url>
+<signing_key>
+1024
+9c3af22a230f1eb122b8eab256e5e46b49f6d357e65d00e414cf6af105aef217
+1de0793353097bbbb918413f79cb5bfaa4532daf061ece07b63f209690a3e1b1
+8906a9ae4f521ec25e6fb79b8679dd4c18c0f022dcb95baefeca091d572c7738
+e1b1d542bbec94552e0e37c698427f4538b947b79072d112ebcf4d9c509b16d9
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010001
+.
+</signing_key>
+</acct_mgr>
diff --git a/client/win/res/progress.ico b/win_build/installerv2/redist/Progress/progress.ico
similarity index 100%
copy from client/win/res/progress.ico
copy to win_build/installerv2/redist/Progress/progress.ico
diff --git a/win_build/installerv2/redist/Progress/ptp_IsDialogBanner.bmp b/win_build/installerv2/redist/Progress/ptp_IsDialogBanner.bmp
new file mode 100644
index 0000000..c674bd3
Binary files /dev/null and b/win_build/installerv2/redist/Progress/ptp_IsDialogBanner.bmp differ
diff --git a/win_build/installerv2/redist/Progress/ptp_splash.bmp b/win_build/installerv2/redist/Progress/ptp_splash.bmp
new file mode 100644
index 0000000..725a071
Binary files /dev/null and b/win_build/installerv2/redist/Progress/ptp_splash.bmp differ
diff --git a/win_build/installerv2/redist/Progress/ss_config.xml b/win_build/installerv2/redist/Progress/ss_config.xml
new file mode 100644
index 0000000..276811b
--- /dev/null
+++ b/win_build/installerv2/redist/Progress/ss_config.xml
@@ -0,0 +1,3 @@
+<ss_config>
+    <default_ss_first>1</default_ss_first>
+</ss_config>
diff --git a/client/win/res/wcg.ico b/win_build/installerv2/redist/WCG/BOINCGUIApp.ico
similarity index 100%
copy from client/win/res/wcg.ico
copy to win_build/installerv2/redist/WCG/BOINCGUIApp.ico
diff --git a/win_build/installerv2/redist/WCG/DeletesUnitedDevice.isd b/win_build/installerv2/redist/WCG/DeletesUnitedDevice.isd
new file mode 100644
index 0000000..ff53835
Binary files /dev/null and b/win_build/installerv2/redist/WCG/DeletesUnitedDevice.isd differ
diff --git a/win_build/installerv2/redist/WCG/account_www.worldcommunitygrid.org.xml b/win_build/installerv2/redist/WCG/account_www.worldcommunitygrid.org.xml
new file mode 100644
index 0000000..d9c4f10
--- /dev/null
+++ b/win_build/installerv2/redist/WCG/account_www.worldcommunitygrid.org.xml
@@ -0,0 +1,5 @@
+<account>
+    <master_url>http://www.worldcommunitygrid.org/</master_url>
+    <authenticator></authenticator>
+    <project_name>World Community Grid</project_name>
+</account>
diff --git a/win_build/installerv2/redist/WCG/cc_config.xml b/win_build/installerv2/redist/WCG/cc_config.xml
new file mode 100644
index 0000000..b472590
--- /dev/null
+++ b/win_build/installerv2/redist/WCG/cc_config.xml
@@ -0,0 +1,9 @@
+<cc_config>
+    <log_flags>
+    </log_flags>
+    <options>
+        <version_check_server>www.worldcommunitygrid.org</version_check_server>
+        <proxy_test_server>www.ibm.com</proxy_test_server>
+        <start_delay>120</start_delay>
+    </options>
+</cc_config>
\ No newline at end of file
diff --git a/win_build/installerv2/redist/WCG/mass_install/account_www.worldcommunitygrid.org.xml b/win_build/installerv2/redist/WCG/mass_install/account_www.worldcommunitygrid.org.xml
new file mode 100644
index 0000000..c6d3d4a
--- /dev/null
+++ b/win_build/installerv2/redist/WCG/mass_install/account_www.worldcommunitygrid.org.xml
@@ -0,0 +1,4 @@
+<account>
+    <master_url>http://www.worldcommunitygrid.org/</master_url>
+    <authenticator></authenticator>
+</account>
diff --git a/win_build/installerv2/redist/WCG/mass_install/cc_config.xml b/win_build/installerv2/redist/WCG/mass_install/cc_config.xml
new file mode 100644
index 0000000..72fe173
--- /dev/null
+++ b/win_build/installerv2/redist/WCG/mass_install/cc_config.xml
@@ -0,0 +1,12 @@
+<cc_config>
+    <log_flags>
+    </log_flags>
+    <options>
+        <disallow_attach>0</disallow_attach>
+        <dont_contact_ref_site>1</dont_contact_ref_site>
+        <simple_gui_only>0</simple_gui_only>
+        <report_results_immediately>1</report_results_immediately>
+    </options>
+</cc_config>
+<!-- View http://boinc.berkeley.edu/trac/wiki/ClientMessages for more options 
+   and information about this file -->
\ No newline at end of file
diff --git a/win_build/installerv2/redist/WCG/project_init.xml b/win_build/installerv2/redist/WCG/project_init.xml
new file mode 100644
index 0000000..7fa6fc9
--- /dev/null
+++ b/win_build/installerv2/redist/WCG/project_init.xml
@@ -0,0 +1,4 @@
+<project_init>
+    <url>http://www.worldcommunitygrid.org/</url>
+    <name>World Community Grid</name>
+</project_init>
diff --git a/win_build/installerv2/redist/WCG/scripts/Setup.rul b/win_build/installerv2/redist/WCG/scripts/Setup.rul
new file mode 100644
index 0000000..b454b7f
--- /dev/null
+++ b/win_build/installerv2/redist/WCG/scripts/Setup.rul
@@ -0,0 +1,152 @@
+//                                                                            
+//  IIIIIII SSSSSS                                                            
+//    II    SS                          InstallShield (R)                     
+//    II    SSSSSS      (c) 1996-2002, InstallShield Software Corporation     
+//    II        SS                     All rights reserved.             
+//  IIIIIII SSSSSS                  
+//                                                                            
+//                                                                            
+//  This template script provides the code necessary to build an entry-point 
+//  function to be called in an InstallScript custom action.   
+//  Two major functions: 
+//  CheckUnitedDevices: Check whether there is a previous World Community Agent ( United Devices)
+//  DeleteUnitedDevices: Delete United Devices 
+//                                                                            
+//                                                                            
+//    File Name:  Setup.rul                                                   
+//                                                                            
+//  Description:  InstallShield script                                        
+//
+////////////////////////////////////////////////////////////////////////////////
+  
+
+// Include Ifx.h for built-in InstallScript function prototypes, for Windows 
+// Installer API function prototypes and constants, and to declare code for 
+// the OnBegin and OnEnd events.
+#include "ifx.h"
+ 
+//including constants
+#include "constants.rul"     
+
+// Include header file for built-in functions
+#include "isrt.h"
+// Include header file for MSI API functions and constants
+#include "iswi.h"               
+
+
+    // The keyword export identifies the function as an entry-point function.
+    // The argument it accepts must be a handle to the Installer database.
+    export prototype DeleteUnitedDevices(HWND);  
+    export prototype CheckUnitedDevices(HWND);
+    // To Do:  Declare global variables, define constants, and prototype user-
+    //         defined and DLL functions here.
+      
+      
+// To Do:  Create a custom action for this entry-point function:
+// 1.  Right-click on "Custom Actions" in the Sequences/Actions view.
+// 2.  Select "Custom Action Wizard" from the context menu.
+// 3.  Proceed through the wizard and give the custom action a unique name.
+// 4.  Select "Run InstallScript code" for the custom action type, and in
+//     the next panel select "DeleteUnitedDevices" (or the new name of the entry-
+//     point function) for the source. 
+// 5.  Click Next, accepting the default selections until the wizard 
+//     creates the custom action.
+//
+// Once you have made a custom action, you must execute it in your setup by 
+// inserting it into a sequence or making it the result of a dialog's 
+// control event.
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           
+// Function:  DeleteUnitedDevices
+//                                                                           
+//  Purpose:  This function will be called by the script engine when 
+//            Windows(TM) Installer executes your custom action (see the "To 
+//            Do," above).
+//			  This Script is used to delete United Devices
+//                                                                           
+///////////////////////////////////////////////////////////////////////////////
+function DeleteUnitedDevices(hMSI)   
+    // To Do:  Declare local variables.    
+ 	   STRING svName;
+       NUMBER nvSize;   
+       
+begin
+  //   MsiSetProperty(hMSI, "UDProcess", "NotDoneUD");         
+     RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );    
+    
+    // Script that will be executed when DeleteUnitedDevices is called.
+    ////////////////////////////////////////////////////////////////////////////////
+      nvSize = 256;
+              
+//    if (RegDBKeyExist (WCG_UD_KEY) < 0) then
+//        MessageBox (NO_UD_MSG+"ininstallscriptsetup", SEVERE);
+//    else
+  
+     //	  LaunchApp(KILL_UD_PROCESS, KILL_UD_PROCESS_PARAM);
+          if (LaunchAppAndWait ("MsiExec.exe ", UD_UNINSTALL_PARAM,LAAW_OPTION_WAIT) < 0) then
+          	  MessageBox (UD_UNABLE_UNINSTALL_MSG, SEVERE);  
+          else 
+              MsiSetProperty(hMSI, "UDAVAILABLE", "No");
+          endif;
+     	       
+//    endif; 
+
+ //  	  MsiSetProperty(hMSI, "UDProcess", "DoneUD"); 
+// 	  MsiGetProperty(hMSI, "UDProcess",svName, nvSize);
+//    MessageBox ("the value of the UDPRocess in checkud function is "+svName+" for testing", INFORMATION);  
+      
+      
+end;
+
+
+      
+// To Do:  Create a custom action for this entry-point function:
+// 1.  Right-click on "Custom Actions" in the Sequences/Actions view.
+// 2.  Select "Custom Action Wizard" from the context menu.
+// 3.  Proceed through the wizard and give the custom action a unique name.
+// 4.  Select "Run InstallScript code" for the custom action type, and in
+//     the next panel select "checkUnitedDevices" (or the new name of the entry-
+//     point function) for the source. 
+// 5.  Click Next, accepting the default selections until the wizard 
+//     creates the custom action.
+//
+// Once you have made a custom action, you must execute it in your setup by 
+// inserting it into a sequence or making it the result of a dialog's 
+// control event.
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           
+// Function:  CheckUnitedDevices
+//                                                                           
+//  Purpose:  This function will be called by the script engine when 
+//            Windows(TM) Installer executes your custom action (see the "To 
+//            Do," above).
+//			  This Script is used to check whether United Devices is present
+//                                                                           
+//////////////////////////////////////////////////////////////////////////////
+function CheckUnitedDevices(hMSI)   
+    // To Do:  Declare local variables.    
+ 	   STRING svName1;       
+       NUMBER nvSize;
+
+begin  
+           
+     RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );    
+     nvSize = 256;
+    // Script that will be executed when CheckUnitedDevices is called.
+    ////////////////////////////////////////////////////////////////////////////////
+       MsiSetProperty(hMSI, "UDAVAILABLE", "dontknow"); 
+     if (RegDBKeyExist (WCG_UD_KEY) < 0) then
+ //       MessageBox (NO_UD_MSG, SEVERE);
+        MsiSetProperty(hMSI, "UDAVAILABLE", "No"); 
+     else 
+        MsiSetProperty(hMSI, "UDAVAILABLE", "Yes"); 
+     endif;   
+     MsiGetProperty(hMSI, "UDAVAILABLE",svName1, nvSize);
+     //MessageBox ("the value of the CheckedUD is "+svName1+" for testing", INFORMATION);
+ //    MsiSetProperty(hMSI, "UDProcess", "DoneUD");     
+  //   MsiGetProperty(hMSI, "UDProcess",svName1, nvSize);
+     // MessageBox ("the value of the UDPRocess in checkud function is "+svName1+" for testing", INFORMATION);  
+end;  
+   
\ No newline at end of file
diff --git a/win_build/installerv2/redist/WCG/scripts/constants.rul b/win_build/installerv2/redist/WCG/scripts/constants.rul
new file mode 100644
index 0000000..6d9a3f9
--- /dev/null
+++ b/win_build/installerv2/redist/WCG/scripts/constants.rul
@@ -0,0 +1,17 @@
+   
+   #define TITLE_TEXT "RegDBKeyExist"
+   #define NO_UD_MSG "cool UD Doesn't exist"   
+  // #define UD_ASK_UNISTALL "There is Previous World Community Group Agent(United Devices) on your pc , it is highly recommended to delete it before installing the Latest BOINC Client, click on yes if you want to remove it" 
+   #define UD_UNABLE_UNINSTALL_MSG "Unable to unistall UD"  
+   
+   #define KILL_UD_PROCESS "taskkill"
+   #define KILL_UD_PROCESS_PARAM  "/t /f /im UD.exe"
+   
+   #define WCG_UD_GID  "{3CEA3FEC-1AF5-4818-89D5-406F627E7337}"
+   // The SUB KEY PATH OF UD SOFTWARE
+   #define WCG_UD_KEY_PATH "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"
+    // The SUB KEY PATH INCLUDING THE GID OF UD SOFTWARE
+   #define WCG_UD_KEY  WCG_UD_KEY_PATH+WCG_UD_GID
+      
+   //THE CMD LINE PARAM FOR UNINSTALLING UD
+   #define UD_UNINSTALL_PARAM "/quiet /X"+WCG_UD_GID
\ No newline at end of file
diff --git a/client/win/res/wcg.ico b/win_build/installerv2/redist/WCG/setup.ico
similarity index 100%
copy from client/win/res/wcg.ico
copy to win_build/installerv2/redist/WCG/setup.ico
diff --git a/win_build/installerv2/redist/WCG/wcg_IsDialogBanner.bmp b/win_build/installerv2/redist/WCG/wcg_IsDialogBanner.bmp
new file mode 100644
index 0000000..d3d842d
Binary files /dev/null and b/win_build/installerv2/redist/WCG/wcg_IsDialogBanner.bmp differ
diff --git a/win_build/installerv2/redist/WCG/wcg_IsDialogBitmap.bmp b/win_build/installerv2/redist/WCG/wcg_IsDialogBitmap.bmp
new file mode 100644
index 0000000..1b34873
Binary files /dev/null and b/win_build/installerv2/redist/WCG/wcg_IsDialogBitmap.bmp differ
diff --git a/win_build/installerv2/redist/WCG/wcg_setup.bmp b/win_build/installerv2/redist/WCG/wcg_setup.bmp
new file mode 100644
index 0000000..8d6370f
Binary files /dev/null and b/win_build/installerv2/redist/WCG/wcg_setup.bmp differ
diff --git a/win_build/installerv2/redist/WCG/wcg_setup.ico b/win_build/installerv2/redist/WCG/wcg_setup.ico
new file mode 100644
index 0000000..e1e0870
Binary files /dev/null and b/win_build/installerv2/redist/WCG/wcg_setup.ico differ
diff --git a/win_build/installerv2/redist/WCG/wcg_splash.bmp b/win_build/installerv2/redist/WCG/wcg_splash.bmp
new file mode 100644
index 0000000..772d600
Binary files /dev/null and b/win_build/installerv2/redist/WCG/wcg_splash.bmp differ
diff --git a/win_build/installerv2/redist/WCG/wcg_wizard.bmp b/win_build/installerv2/redist/WCG/wcg_wizard.bmp
new file mode 100644
index 0000000..922bbb7
Binary files /dev/null and b/win_build/installerv2/redist/WCG/wcg_wizard.bmp differ
diff --git a/win_build/installerv2/redist/Windows/Win32/boinccas.dll b/win_build/installerv2/redist/Windows/Win32/boinccas.dll
new file mode 100644
index 0000000..70762c7
Binary files /dev/null and b/win_build/installerv2/redist/Windows/Win32/boinccas.dll differ
diff --git a/win_build/installerv2/redist/Windows/Win32/boinccas95.dll b/win_build/installerv2/redist/Windows/Win32/boinccas95.dll
new file mode 100644
index 0000000..bd62937
Binary files /dev/null and b/win_build/installerv2/redist/Windows/Win32/boinccas95.dll differ
diff --git a/win_build/installerv2/redist/Windows/Win32/dbghelp.dll b/win_build/installerv2/redist/Windows/Win32/dbghelp.dll
new file mode 100644
index 0000000..660d920
Binary files /dev/null and b/win_build/installerv2/redist/Windows/Win32/dbghelp.dll differ
diff --git a/win_build/installerv2/redist/Windows/Win32/dbghelp95.dll b/win_build/installerv2/redist/Windows/Win32/dbghelp95.dll
new file mode 100644
index 0000000..2ce5f01
Binary files /dev/null and b/win_build/installerv2/redist/Windows/Win32/dbghelp95.dll differ
diff --git a/win_build/installerv2/redist/Windows/Win32/srcsrv.dll b/win_build/installerv2/redist/Windows/Win32/srcsrv.dll
new file mode 100644
index 0000000..3907413
Binary files /dev/null and b/win_build/installerv2/redist/Windows/Win32/srcsrv.dll differ
diff --git a/win_build/installerv2/redist/Windows/Win32/symsrv.dll b/win_build/installerv2/redist/Windows/Win32/symsrv.dll
new file mode 100644
index 0000000..e611414
Binary files /dev/null and b/win_build/installerv2/redist/Windows/Win32/symsrv.dll differ
diff --git a/win_build/installerv2/redist/Windows/Win32/symsrv.yes b/win_build/installerv2/redist/Windows/Win32/symsrv.yes
new file mode 100644
index 0000000..0519ecb
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/Win32/symsrv.yes
@@ -0,0 +1 @@
+ 
\ No newline at end of file
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACCConfigMd5sum.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CACCConfigMd5sum.cpp
new file mode 100644
index 0000000..7dad9cc
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACCConfigMd5sum.cpp
@@ -0,0 +1,186 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CACCConfigMd5sum.h"
+#include <stdio.h>
+#include <ctype.h>
+
+#define CUSTOMACTION_NAME               _T("CACCConfigMd5sum")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Obtain the md5sum of the current cc_config.xml file.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACCConfigMd5sum::CACCConfigMd5sum(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACCConfigMd5sum::~CACCConfigMd5sum()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+void remove_white(char *contents) {
+	int i=0,j=0;
+	while ( contents[j] != '\0' ) {
+		if ( isspace(contents[j]) ) {
+			j++;
+			continue;
+		}
+		contents[i++]=contents[j++];
+	}
+	contents[i]='\0';
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CACCConfigMd5sum::OnExecution()
+{
+	std::string strDataDirectory;
+	std::string strInstallDirectory;
+	std::string strLocation;
+	char contents[8196];
+    UINT    uiReturnValue = 0;
+    TCHAR   szMessage[16392];
+	FILE *file;
+	memset(&contents,'\0',sizeof(contents));
+
+	SetProperty(_T("KEEPEXISTINGCONFIG"), _T("0"));
+    uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+	if (strInstallDirectory.rfind('\\') != strInstallDirectory.size() - 1 ) {
+		strInstallDirectory = strInstallDirectory + "\\";
+		_sntprintf(szMessage,sizeof(szMessage),_T("Added trailing slash to install dir"),strLocation.c_str());
+		LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+	}
+
+    uiReturnValue = GetProperty( _T("DATADIR"), strDataDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+	if (strDataDirectory.rfind('\\') != strDataDirectory.size() - 1 ) {
+		strDataDirectory = strDataDirectory + "\\";
+		_sntprintf(szMessage,sizeof(szMessage),_T("Added trailing slash to data dir"),strLocation.c_str());
+		LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+	}
+
+	// Figure out of the file is in the data directory or the install directory
+	// it should be in the data directory, but if it isn't we will check the install directory
+    strLocation = strDataDirectory + _T("cc_config.xml");
+	file = fopen(strLocation.c_str(),"r");
+	if ( file == NULL ) {
+		_sntprintf(szMessage,sizeof(szMessage),_T("fopen: Error Message '%s': '%s'"),strerror(errno),strLocation.c_str());
+		LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+		strLocation = strInstallDirectory + _T("cc_config.xml");
+		file = fopen(strLocation.c_str(),"r");
+		if ( file == NULL ) {
+			_sntprintf(szMessage,sizeof(szMessage),_T("fopen: Error Message '%s': '%s'"),strerror(errno),strLocation.c_str());
+			LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+			return ERROR_SUCCESS;
+		} else {
+			_sntprintf(szMessage,sizeof(szMessage),_T("fopen: File found at: '%s'"),strLocation.c_str());
+			LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+		}
+	} else {
+		_sntprintf(szMessage,sizeof(szMessage),_T("fopen: File found at: '%s'"),strLocation.c_str());
+		LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+	}
+
+	int bytesread = (int) fread(&contents, sizeof(char), sizeof(contents), file);
+	if ( bytesread > 0 && bytesread < sizeof(char) ) {
+		contents[bytesread]='\0';
+	}
+
+	if ( !feof(file) ) {
+		_sntprintf(szMessage,sizeof(szMessage),_T("File is more than 8kb: '%s'"),strLocation);
+		LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+		fclose(file);
+		return ERROR_SUCCESS;
+	}
+
+	if ( ferror(file) ) {
+		_sntprintf(szMessage,sizeof(szMessage),_T("Error reading file at: '%s'"),strLocation);
+		LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+		return ERROR_FILE_INVALID;
+	}
+
+	fclose(file);
+
+	remove_white(contents);
+
+	_sntprintf(szMessage,sizeof(szMessage),_T("File contents: '%s'"),contents);
+	LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+
+	if ( CheckFile(contents) ) {
+		if ( remove(strLocation.c_str()) ) {
+			_sntprintf(szMessage,sizeof(szMessage),_T("Failed to delete CCConfig version from previous install.  Error Message '%s'"),strerror(errno));
+			LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+			return ERROR_FAIL_I24;
+		}
+		_sntprintf(szMessage,sizeof(szMessage),_T("CCConfig was a version from previous install.  Deleted"));
+		LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+		return ERROR_SUCCESS;
+	}
+
+	_sntprintf(szMessage,sizeof(szMessage),_T("CCConfig was not a version from previous install"));
+	SetProperty(_T("KEEPEXISTINGCONFIG"), _T("1"));
+	LogMessage(INSTALLMESSAGE_INFO,NULL, NULL,NULL,NULL,szMessage);
+    return ERROR_SUCCESS;
+}
+
+bool CACCConfigMd5sum::CheckFile(char *contents)
+{
+	bool match = false;
+	char *cc510="<cc_config><log_flags></log_flags><options><dont_contact_ref_site>1</dont_contact_ref_site></options></cc_config>";
+	if ( strstr(contents, cc510) ) match = true;
+	char *cc602="<cc_config><log_flags></log_flags><options><version_check_server>www.worldcommunitygrid.org</version_check_server><proxy_test_server>www.ibm.com</proxy_test_server><start_delay>120</start_delay></options></cc_config>";
+	if ( strstr(contents, cc602) ) match = true;
+    return match; 
+}
+
+UINT __stdcall CCConfigMd5sum(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CACCConfigMd5sum* pCA = new CACCConfigMd5sum(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACCConfigMd5sum.h b/win_build/installerv2/redist/Windows/src/boinccas/CACCConfigMd5sum.h
new file mode 100644
index 0000000..ac465d1
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACCConfigMd5sum.h
@@ -0,0 +1,39 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CACCCONFIGMD5SUM_H_
+#define _CACCCONFIGMD5SUM_H_
+
+
+class CACCConfigMd5sum : public BOINCCABase
+{
+public:
+
+    CACCConfigMd5sum(MSIHANDLE hMSIHandle);
+    ~CACCConfigMd5sum();
+    virtual UINT OnExecution();
+
+private:
+	bool CheckFile(char *);
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACleanupOldBinaries.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CACleanupOldBinaries.cpp
new file mode 100644
index 0000000..9ce6e8d
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACleanupOldBinaries.cpp
@@ -0,0 +1,106 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CACleanupOldBinaries.h"
+
+#define CUSTOMACTION_NAME               _T("CACleanupOldBinaries")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Cleanup any old binaries that were left lying around from some other install.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACleanupOldBinaries::CACleanupOldBinaries(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACleanupOldBinaries::~CACleanupOldBinaries()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CACleanupOldBinaries::OnExecution()
+{
+    tstring     strInstallDirectory;
+    UINT        uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    DeleteFile(tstring(strInstallDirectory + _T("\\boinc.exe")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\boincmgr.exe")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\boinccmd.exe")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\boinc.dll")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\libcurl.dll")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\libeay32.dll")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\ssleay32.dll")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\zlib1.dll")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\dbghelp.dll")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\dbghelp95.dll")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\srcsrv.dll")).c_str());
+    DeleteFile(tstring(strInstallDirectory + _T("\\symsrv.dll")).c_str());
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    CleanupOldBinaries
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall CleanupOldBinaries(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CACleanupOldBinaries* pCA = new CACleanupOldBinaries(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+const char *BOINC_RCSID_7bcd879ada="$Id: CAMigrateX86X64.cpp 11773 2007-01-05 08:49:02Z rwalton $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACleanupOldBinaries.h b/win_build/installerv2/redist/Windows/src/boinccas/CACleanupOldBinaries.h
new file mode 100644
index 0000000..fac4ba9
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACleanupOldBinaries.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CACLEANUPOLDBINARIES_H_
+#define _CACLEANUPOLDBINARIES_H_
+
+
+class CACleanupOldBinaries : public BOINCCABase
+{
+public:
+
+    CACleanupOldBinaries(MSIHANDLE hMSIHandle);
+    ~CACleanupOldBinaries();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateAcctMgrLoginFile.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CACreateAcctMgrLoginFile.cpp
new file mode 100644
index 0000000..bfd589e
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateAcctMgrLoginFile.cpp
@@ -0,0 +1,124 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CACreateAcctMgrLoginFile.h"
+
+
+#define CUSTOMACTION_NAME               _T("CACreateAcctMgrLoginFile")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Store account manager initialization data")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACreateAcctMgrLoginFile::CACreateAcctMgrLoginFile(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACreateAcctMgrLoginFile::~CACreateAcctMgrLoginFile()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CACreateAcctMgrLoginFile::OnExecution()
+{
+    tstring          strDataDirectory;
+    tstring          strAcctMgrLogin;
+    tstring          strAcctMgrPasswordHash;
+    tstring          strAcctMgrLoginFile;
+    UINT             uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("DATADIR"), strDataDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ACCTMGR_LOGIN"), strAcctMgrLogin );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ACCTMGR_PASSWORDHASH"), strAcctMgrPasswordHash );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    if (!strAcctMgrLogin.empty()) {
+
+        // The project_init.xml file is stored in the data directory.
+        //
+        strAcctMgrLoginFile = strDataDirectory + _T("\\acct_mgr_login.xml");
+
+        FILE* fAcctMgrLoginFile = _tfopen(strAcctMgrLoginFile.c_str(), _T("w"));
+        
+        _ftprintf(
+            fAcctMgrLoginFile,
+            _T("<acct_mgr_login>\n")
+            _T("    <login>%s</login>\n")
+            _T("    <password_hash>%s</password_hash>\n")
+            _T("</acct_mgr_login>\n"),
+            strAcctMgrLogin.c_str(),
+            !strAcctMgrPasswordHash.empty() ? strAcctMgrPasswordHash.c_str() : _T("")
+        );
+
+        fclose(fAcctMgrLoginFile);
+    }
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    CreateAcctMgrLoginFile
+//
+// Description: This custom action stores the account manager login data 
+//                specified on the commandline in a file in the data
+//                directory.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall CreateAcctMgrLoginFile(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CACreateAcctMgrLoginFile* pCA = new CACreateAcctMgrLoginFile(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateAcctMgrLoginFile.h b/win_build/installerv2/redist/Windows/src/boinccas/CACreateAcctMgrLoginFile.h
new file mode 100644
index 0000000..434042b
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateAcctMgrLoginFile.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+
+#ifndef _CACREATEPACCTMGRLOGINFILE_H_
+#define _CACREATEPACCTMGRLOGINFILE_H_
+
+
+class CACreateAcctMgrLoginFile : public BOINCCABase
+{
+public:
+
+    CACreateAcctMgrLoginFile(MSIHANDLE hMSIHandle);
+    ~CACreateAcctMgrLoginFile();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCAccounts.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCAccounts.cpp
new file mode 100644
index 0000000..4d96cc2
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCAccounts.cpp
@@ -0,0 +1,465 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CACreateBOINCAccounts.h"
+#include "lsaprivs.h"
+#include "password.h"
+
+
+#define CUSTOMACTION_NAME               _T("CACreateBOINCAccounts")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating user accounts used by BOINC for secure sandboxes")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACreateBOINCAccounts::CACreateBOINCAccounts(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACreateBOINCAccounts::~CACreateBOINCAccounts()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CACreateBOINCAccounts::OnExecution()
+{
+    tstring          strBOINCMasterAccountUsername;
+    tstring          strBOINCMasterAccountPassword;
+    tstring          strBOINCProjectAccountUsername;
+    tstring          strBOINCProjectAccountPassword;
+    tstring          strComputerName;
+    tstring          strProductType;
+    tstring          strDataDirectory;
+    tstring          strEnableProtectedApplicationExecution;
+    PSID             pSid;
+    NET_API_STATUS   nasReturnValue;
+    BOOL             bBOINCMasterAccountCreated = FALSE;
+    BOOL             bBOINCProjectAccountCreated = FALSE;
+    BOOL             bBOINCMasterAccountModified = FALSE;
+    BOOL             bBOINCProjectAccountModified = FALSE;
+    UINT             uiReturnValue = -1;
+
+    uiReturnValue = GetProperty( _T("BOINC_MASTER_USERNAME"), strBOINCMasterAccountUsername );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_MASTER_PASSWORD"), strBOINCMasterAccountPassword );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_PROJECT_USERNAME"), strBOINCProjectAccountUsername );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_PROJECT_PASSWORD"), strBOINCProjectAccountPassword );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ComputerName"), strComputerName );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("MsiNTProductType"), strProductType );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strEnableProtectedApplicationExecution );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    // Only create a new account or change the password on an existing account
+    //   if the user hasn't explicitly defined an account
+    if (strBOINCMasterAccountUsername.empty() && strBOINCMasterAccountPassword.empty()) {
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("Using automatic account creation and management of 'boinc_master' account")
+        );
+
+        // Determine what the real values of the usernames should be based off
+        //   of the inputs
+        //
+        if (strBOINCMasterAccountUsername.empty()) {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Generating 'boinc_master' account name")
+            );
+            if (strProductType == tstring(_T("2"))) {                    // Domain Controller
+                strBOINCMasterAccountUsername = _T("boinc_master_") + strComputerName;
+            } else {
+                strBOINCMasterAccountUsername = _T("boinc_master");
+            }
+        }
+
+
+        // Generate random passwords if needed
+        //
+        if (strBOINCMasterAccountPassword.empty()) {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Generating 'boinc_master' password")
+            );
+            GenerateRandomPassword(strBOINCMasterAccountPassword, 12);
+            strBOINCMasterAccountPassword = _T("!") + strBOINCMasterAccountPassword;
+        }
+
+
+        // Create the 'boinc_master' account if needed, otherwise just update the password.
+        //
+        if(GetAccountSid(NULL, strBOINCMasterAccountUsername.c_str(), &pSid)) {   // Check if user exists
+
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Resetting 'boinc_master' password")
+            );
+
+            // Account already exists, just change the password
+            //
+            USER_INFO_1003 ui;
+            DWORD          dwParameterError;
+
+            ui.usri1003_password = (LPWSTR)strBOINCMasterAccountPassword.c_str();
+
+            nasReturnValue = NetUserSetInfo(
+                NULL,
+                strBOINCMasterAccountUsername.c_str(),
+                1003,
+                (LPBYTE)&ui,
+                &dwParameterError
+            );
+
+            if (NERR_Success != nasReturnValue) {
+                LogMessage(
+                    INSTALLMESSAGE_ERROR,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    nasReturnValue,
+                    _T("Failed to reset password on the 'boinc_master' account.")
+                );
+                return ERROR_INSTALL_FAILURE;
+            }
+        } else {
+
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Creating 'boinc_master' account")
+            );
+
+            // Account does not exist, create it
+            //
+            USER_INFO_1 ui;
+            DWORD       dwParameterError;
+
+            ui.usri1_name = (LPWSTR)strBOINCMasterAccountUsername.c_str();
+            ui.usri1_password = (LPWSTR)strBOINCMasterAccountPassword.c_str();
+            ui.usri1_comment = _T("Account used to execute BOINC as a system service");
+            ui.usri1_priv = USER_PRIV_USER;
+            ui.usri1_home_dir = NULL;
+            ui.usri1_comment = NULL;
+            ui.usri1_flags = UF_SCRIPT | UF_PASSWD_CANT_CHANGE | UF_DONT_EXPIRE_PASSWD;
+            ui.usri1_script_path = NULL;
+
+            nasReturnValue = NetUserAdd(
+                NULL,
+                1,
+                (LPBYTE)&ui,
+                &dwParameterError
+            );
+
+            if (NERR_Success != nasReturnValue) {
+                LogMessage(
+                    INSTALLMESSAGE_INFO,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    nasReturnValue,
+                    _T("NetUserAdd retval")
+                );
+                LogMessage(
+                    INSTALLMESSAGE_INFO,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    dwParameterError,
+                    _T("NetUserAdd dwParameterError")
+                );
+                LogMessage(
+                    INSTALLMESSAGE_ERROR,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    nasReturnValue,
+                    _T("Failed to create the 'boinc_master' account.")
+                );
+                return ERROR_INSTALL_FAILURE;
+            }
+
+            bBOINCMasterAccountCreated = TRUE;
+        }
+        if(pSid != NULL) {
+            HeapFree(GetProcessHeap(), 0, pSid);
+            pSid = NULL;
+        }
+
+        bBOINCMasterAccountModified = TRUE;
+    }
+
+    // Only create a new account or change the password on an existing account
+    //   if the user hasn't explicitly defined an account
+    if (strBOINCProjectAccountUsername.empty() && strBOINCProjectAccountPassword.empty()) {
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("Using automatic account creation and management of 'boinc_project' account")
+        );
+
+        // Determine what the real values of the usernames should be based off
+        //   of the inputs
+        //
+        if (strBOINCProjectAccountUsername.empty()) {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Generating 'boinc_project' account name")
+            );
+            if (strProductType == tstring(_T("2"))) {                    // Domain Controller
+                strBOINCProjectAccountUsername = _T("boinc_project_") + strComputerName;
+            } else {
+                strBOINCProjectAccountUsername = _T("boinc_project");
+            }
+        }
+
+
+        // Generate random passwords if needed
+        //
+        if (strBOINCProjectAccountPassword.empty()) {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Generating 'boinc_project' password")
+            );
+            GenerateRandomPassword(strBOINCProjectAccountPassword, 12);
+            strBOINCProjectAccountPassword = _T("!") + strBOINCProjectAccountPassword;
+        }
+
+
+        // Create the 'boinc_project' account if needed, otherwise just update the password.
+        //
+        if(GetAccountSid(NULL, strBOINCProjectAccountUsername.c_str(), &pSid)) {   // Check if user exists
+
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Resetting 'boinc_project' password")
+            );
+
+            // Account already exists, just change the password
+            //
+            USER_INFO_1003 ui;
+            DWORD          dwParameterError;
+
+            ui.usri1003_password = (LPWSTR)strBOINCProjectAccountPassword.c_str();
+
+            nasReturnValue = NetUserSetInfo(
+                NULL,
+                strBOINCProjectAccountUsername.c_str(),
+                1003,
+                (LPBYTE)&ui,
+                &dwParameterError
+            );
+
+            if (NERR_Success != nasReturnValue) {
+                LogMessage(
+                    INSTALLMESSAGE_ERROR,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    nasReturnValue,
+                    _T("Failed to reset password on the 'boinc_project' account.")
+                );
+                return ERROR_INSTALL_FAILURE;
+            }
+        } else {
+
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Creating 'boinc_project' account")
+            );
+
+            // Account does not exist, create it
+            //
+            USER_INFO_1 ui;
+            DWORD       dwParameterError;
+
+            ui.usri1_name = (LPWSTR)strBOINCProjectAccountUsername.c_str();
+            ui.usri1_password = (LPWSTR)strBOINCProjectAccountPassword.c_str();
+            ui.usri1_comment = _T("Account used to execute BOINC applications");
+            ui.usri1_priv = USER_PRIV_USER;
+            ui.usri1_home_dir = NULL;
+            ui.usri1_comment = NULL;
+            ui.usri1_flags = UF_SCRIPT | UF_PASSWD_CANT_CHANGE | UF_DONT_EXPIRE_PASSWD;
+            ui.usri1_script_path = NULL;
+
+            nasReturnValue = NetUserAdd(
+                NULL,
+                1,
+                (LPBYTE)&ui,
+                &dwParameterError
+            );
+
+            if (NERR_Success != nasReturnValue) {
+                LogMessage(
+                    INSTALLMESSAGE_INFO,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    nasReturnValue,
+                    _T("NetUserAdd retval")
+                );
+                LogMessage(
+                    INSTALLMESSAGE_INFO,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    dwParameterError,
+                    _T("NetUserAdd dwParameterError")
+                );
+                LogMessage(
+                    INSTALLMESSAGE_ERROR,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    nasReturnValue,
+                    _T("Failed to create the 'boinc_project' account.")
+                );
+                return ERROR_INSTALL_FAILURE;
+            }
+
+            bBOINCProjectAccountCreated = TRUE;
+        }
+        if(pSid != NULL) {
+            HeapFree(GetProcessHeap(), 0, pSid);
+            pSid = NULL;
+        }
+
+        bBOINCProjectAccountModified = TRUE;
+    }
+
+
+    SetProperty( _T("BOINC_MASTER_USERNAME"), strBOINCMasterAccountUsername );
+    if (bBOINCMasterAccountModified) {
+        SetProperty( _T("BOINC_MASTER_ISUSERNAME"), tstring(_T(".\\") + strBOINCMasterAccountUsername) );
+    } else {
+        SetProperty( _T("BOINC_MASTER_ISUSERNAME"), strBOINCMasterAccountUsername );
+    }
+    SetProperty( _T("BOINC_MASTER_PASSWORD"), strBOINCMasterAccountPassword, false );
+
+    SetProperty( _T("BOINC_PROJECT_USERNAME"), strBOINCProjectAccountUsername );
+    if (bBOINCProjectAccountModified) {
+        SetProperty( _T("BOINC_PROJECT_ISUSERNAME"), tstring(_T(".\\") + strBOINCProjectAccountUsername) );
+    } else {
+        SetProperty( _T("BOINC_PROJECT_ISUSERNAME"), strBOINCProjectAccountUsername );
+    }
+    SetProperty( _T("BOINC_PROJECT_PASSWORD"), strBOINCProjectAccountPassword, false );
+
+    if (bBOINCMasterAccountCreated || bBOINCProjectAccountCreated) {
+        RebootWhenFinished();
+    }
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    CreateBOINCAccounts
+//
+// Description: This custom action creates the two user accounts that'll
+//              be used to enfore the account based sandboxing scheme
+//              on Windows.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall CreateBOINCAccounts(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CACreateBOINCAccounts* pCA = new CACreateBOINCAccounts(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+const char *BOINC_RCSID_00ed9686df="$Id: CACreateBOINCAccounts.cpp 11804 2007-01-08 18:42:48Z rwalton $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCAccounts.h b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCAccounts.h
new file mode 100644
index 0000000..0f789b5
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCAccounts.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CACREATEBOINCACCOUNTS_H_
+#define _CACREATEBOINCACCOUNTS_H_
+
+
+class CACreateBOINCAccounts : public BOINCCABase
+{
+public:
+
+    CACreateBOINCAccounts(MSIHANDLE hMSIHandle);
+    ~CACreateBOINCAccounts();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCGroups.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCGroups.cpp
new file mode 100644
index 0000000..320ea30
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCGroups.cpp
@@ -0,0 +1,503 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CACreateBOINCGroups.h"
+#include "lsaprivs.h"
+
+
+#define CUSTOMACTION_NAME               _T("CACreateBOINCGroups")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating user groups used by BOINC for secure sandboxes")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACreateBOINCGroups::CACreateBOINCGroups(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACreateBOINCGroups::~CACreateBOINCGroups()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CACreateBOINCGroups::OnExecution()
+{
+    NET_API_STATUS   nasReturnValue;
+    DWORD            dwParameterError;
+    UINT             uiReturnValue = -1;
+    BOOL             bBOINCAdminsCreated = FALSE;
+    BOOL             bBOINCUsersCreated = FALSE;
+    BOOL             bBOINCProjectsCreated = FALSE;
+    tstring          strUserSID;
+    tstring          strUsersGroupName;
+    tstring          strBOINCMasterAccountUsername;
+    tstring          strBOINCProjectAccountUsername;
+    tstring          strEnableProtectedApplicationExecution;
+    PSID             pAdminSID = NULL;
+    PSID             pInstallingUserSID = NULL;
+    PSID             pBOINCMasterSID = NULL;
+    PSID             pBOINCProjectSID = NULL;
+    SID_IDENTIFIER_AUTHORITY SIDAuthNT = SECURITY_NT_AUTHORITY;
+
+
+    uiReturnValue = GetProperty( _T("UserSID"), strUserSID );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("GROUPALIAS_USERS"), strUsersGroupName );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_MASTER_USERNAME"), strBOINCMasterAccountUsername );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_PROJECT_USERNAME"), strBOINCProjectAccountUsername );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strEnableProtectedApplicationExecution );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    // Create a SID for the BUILTIN\Administrators group.
+    if(!AllocateAndInitializeSid(
+                     &SIDAuthNT, 2,
+                     SECURITY_BUILTIN_DOMAIN_RID,
+                     DOMAIN_ALIAS_RID_ADMINS,
+                     0, 0, 0, 0, 0, 0,
+                     &pAdminSID)) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("AllocateAndInitializeSid Error for BUILTIN\\Administrators")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Create a SID for the current logged in user.
+    if(!ConvertStringSidToSid(strUserSID.c_str(), &pInstallingUserSID)) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("ConvertStringSidToSid Error for installing user")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Create a SID for the 'boinc_master' user account.
+    if(!GetAccountSid(NULL, strBOINCMasterAccountUsername.c_str(), &pBOINCMasterSID))
+    {
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("GetAccountSid Error for 'boinc_master' user account")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Create a SID for the 'boinc_project' user account.
+    if(!GetAccountSid(NULL, strBOINCProjectAccountUsername.c_str(), &pBOINCProjectSID))
+    {
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("GetAccountSid Error for 'boinc_master' user account")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+
+    // Create the 'boinc_admins' group if needed
+    //
+    LOCALGROUP_INFO_1 lgrpiAdmins;
+
+    lgrpiAdmins.lgrpi1_name = _T("boinc_admins");
+    lgrpiAdmins.lgrpi1_comment = _T("Accounts in this group can control the BOINC client.");
+
+    nasReturnValue = NetLocalGroupAdd(
+        NULL,
+        1,
+        (LPBYTE)&lgrpiAdmins,
+        &dwParameterError
+    );
+
+    if ((NERR_Success != nasReturnValue) && (ERROR_ALIAS_EXISTS != nasReturnValue)) {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("NetLocalGroupAdd retval")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("Failed to create the 'boinc_admins' group.")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    if (NERR_Success == nasReturnValue) {
+        bBOINCAdminsCreated = TRUE;
+    }
+
+    // If we just created the 'boinc_admins' local group then we need to populate
+    //   it with the default accounts.
+    LOCALGROUP_MEMBERS_INFO_0    lgrmiAdmins;
+    lgrmiAdmins.lgrmi0_sid = pAdminSID;
+
+    nasReturnValue = NetLocalGroupAddMembers(
+        NULL,
+        _T("boinc_admins"),
+        0,
+        (LPBYTE)&lgrmiAdmins,
+        1
+    );
+
+    if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("NetLocalGroupAddMembers retval")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("Failed to add user to the 'boinc_admins' group (Administrator).")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    lgrmiAdmins.lgrmi0_sid = pInstallingUserSID;
+
+    nasReturnValue = NetLocalGroupAddMembers(
+        NULL,
+        _T("boinc_admins"),
+        0,
+        (LPBYTE)&lgrmiAdmins,
+        1
+    );
+
+    if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("NetLocalGroupAddMembers retval")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("Failed to add user to the 'boinc_admins' group (Installing User).")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    lgrmiAdmins.lgrmi0_sid = pBOINCMasterSID;
+
+    nasReturnValue = NetLocalGroupAddMembers(
+        NULL,
+        _T("boinc_admins"),
+        0,
+        (LPBYTE)&lgrmiAdmins,
+        1
+    );
+
+    if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("NetLocalGroupAddMembers retval")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("Failed to add user to the 'boinc_admins' group (BOINC Master).")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+
+    // Create the 'boinc_users' group if needed
+    //
+    LOCALGROUP_INFO_1 lgrpiUsers;
+
+    lgrpiUsers.lgrpi1_name = _T("boinc_users");
+    lgrpiUsers.lgrpi1_comment = _T("Accounts in this group can monitor the BOINC client.");
+
+    nasReturnValue = NetLocalGroupAdd(
+        NULL,
+        1,
+        (LPBYTE)&lgrpiUsers,
+        &dwParameterError
+    );
+
+    if ((NERR_Success != nasReturnValue) && (ERROR_ALIAS_EXISTS != nasReturnValue)) {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("NetLocalGroupAdd retval")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("Failed to create the 'boinc_users' group.")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    if (NERR_Success == nasReturnValue) {
+        bBOINCUsersCreated = TRUE;
+    }
+
+
+    // Create the 'boinc_project' group if needed
+    //
+    LOCALGROUP_INFO_1 lgrpiProjects;
+
+    lgrpiProjects.lgrpi1_name = _T("boinc_projects");
+    lgrpiProjects.lgrpi1_comment = _T("Accounts in this group are used to execute boinc applications.");
+
+    nasReturnValue = NetLocalGroupAdd(
+        NULL,
+        1,
+        (LPBYTE)&lgrpiProjects,
+        &dwParameterError
+    );
+
+    if ((NERR_Success != nasReturnValue) && (ERROR_ALIAS_EXISTS != nasReturnValue)) {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("NetLocalGroupAdd retval")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            nasReturnValue,
+            _T("Failed to create the 'boinc_projects' group.")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    if (NERR_Success == nasReturnValue) {
+        bBOINCProjectsCreated = TRUE;
+    }
+
+    // If the user has enabled protected application execution then we need to add the 'boinc_project'
+    //   account to the local group and the 'Users' local group.  As an aside 'boinc_master' is also added
+    //   to the 'Users' group.
+    if (_T("1") == strEnableProtectedApplicationExecution) {
+
+        LOCALGROUP_MEMBERS_INFO_0    lgrmiMembers;
+
+        lgrmiMembers.lgrmi0_sid = pBOINCProjectSID;
+
+        nasReturnValue = NetLocalGroupAddMembers(
+            NULL,
+            _T("boinc_projects"),
+            0,
+            (LPBYTE)&lgrmiMembers,
+            1
+        );
+
+        if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                nasReturnValue,
+                _T("NetLocalGroupAddMembers retval")
+            );
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                nasReturnValue,
+                _T("Failed to add user to the 'boinc_projects' group (boinc_project).")
+            );
+            return ERROR_INSTALL_FAILURE;
+        }
+
+        nasReturnValue = NetLocalGroupAddMembers(
+            NULL,
+            strUsersGroupName.c_str(),
+            0,
+            (LPBYTE)&lgrmiMembers,
+            1
+        );
+
+        if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                nasReturnValue,
+                _T("NetLocalGroupAddMembers retval")
+            );
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                nasReturnValue,
+                _T("Failed to add user to the 'Users' group (boinc_project).")
+            );
+            return ERROR_INSTALL_FAILURE;
+        }
+
+        lgrmiMembers.lgrmi0_sid = pBOINCMasterSID;
+
+        nasReturnValue = NetLocalGroupAddMembers(
+            NULL,
+            strUsersGroupName.c_str(),
+            0,
+            (LPBYTE)&lgrmiMembers,
+            1
+        );
+
+        if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                nasReturnValue,
+                _T("NetLocalGroupAddMembers retval")
+            );
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                nasReturnValue,
+                _T("Failed to add user to the 'Users' group (boinc_master).")
+            );
+            return ERROR_INSTALL_FAILURE;
+        }
+    }
+
+    SetProperty( _T("BOINC_ADMINS_GROUPNAME"), _T("boinc_admins") );
+    SetProperty( _T("BOINC_USERS_GROUPNAME"), _T("boinc_users") );
+    SetProperty( _T("BOINC_PROJECTS_GROUPNAME"), _T("boinc_projects") );
+
+    if (bBOINCAdminsCreated || bBOINCUsersCreated || bBOINCProjectsCreated) {
+        RebootWhenFinished();
+    }
+
+    if(pAdminSID != NULL) FreeSid(pAdminSID);
+    if(pInstallingUserSID != NULL) FreeSid(pInstallingUserSID);
+    if(pBOINCMasterSID != NULL) FreeSid(pBOINCMasterSID);
+    if(pBOINCProjectSID != NULL) FreeSid(pBOINCProjectSID);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    CreateBOINCGroups
+//
+// Description: This custom action creates the three user groups that'll
+//              be used to enfore the account based sandboxing scheme
+//              on Windows.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall CreateBOINCGroups(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CACreateBOINCGroups* pCA = new CACreateBOINCGroups(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+const char *BOINC_RCSID_00ed9786df="$Id: CACreateBOINCGroups.cpp 11804 2007-01-08 18:42:48Z rwalton $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCGroups.h b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCGroups.h
new file mode 100644
index 0000000..848bf0b
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCGroups.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+
+#ifndef _CACREATEBOINCGROUPS_H_
+#define _CACREATEBOINCGROUPS_H_
+
+
+class CACreateBOINCGroups : public BOINCCABase
+{
+public:
+
+    CACreateBOINCGroups(MSIHANDLE hMSIHandle);
+    ~CACreateBOINCGroups();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateClientAuthFile.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CACreateClientAuthFile.cpp
new file mode 100644
index 0000000..cd7370e
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateClientAuthFile.cpp
@@ -0,0 +1,237 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CACreateClientAuthFile.h"
+
+
+#define CUSTOMACTION_NAME               _T("CACreateClientAuthFile")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Store client authorization data")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACreateClientAuthFile::CACreateClientAuthFile(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACreateClientAuthFile::~CACreateClientAuthFile()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CACreateClientAuthFile::OnExecution()
+{
+    tstring          strDataDirectory;
+    tstring          strEnableProtectedApplicationExecution;
+    tstring          strBOINCProjectAccountUsername;
+    tstring          strBOINCProjectAccountPassword;
+    tstring          strClientAuthFile;
+    tstring          strVersionNT;
+    struct _stat     buf;
+    TCHAR                   szMessage[2048];
+    UINT             uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("DATADIR"), strDataDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strEnableProtectedApplicationExecution );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_PROJECT_ISUSERNAME"), strBOINCProjectAccountUsername );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_PROJECT_PASSWORD"), strBOINCProjectAccountPassword );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("VersionNT"), strVersionNT );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    // The client_auth.xml file is stored in the data directory.
+    //
+    strClientAuthFile = strDataDirectory + _T("\\client_auth.xml");
+
+    // If we are not installing in protected mode, there may not
+    //   be a valid 'boinc_project' account, so delete the
+    //   client_auth.xml file if it exists.
+    //
+    // NOTE: Windows 2000 or older requires the SeTcbPrivilege
+    //   user right, which makes the account the equiv of an
+    //   administrator on the system. Disable the use of
+    //   'boinc_project' on Windows 2000 or older
+    //
+    if ((_T("1") != strEnableProtectedApplicationExecution) || _T("500") >= strVersionNT)
+    {
+        if (0 == _tstat(strClientAuthFile.c_str(), &buf))
+        {
+            if (DeleteFile(strClientAuthFile.c_str()))
+            {
+                LogMessage(
+                    INSTALLMESSAGE_INFO,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    NULL,
+                    _T("The client_auth.xml file was successfully deleted.")
+                );
+            }
+            else
+            {
+                LogMessage(
+                    INSTALLMESSAGE_FATALEXIT,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    NULL,
+                    _T("The client_auth.xml could not be deleted from the data direvtory. ")
+                    _T("Please delete the file and rerun setup.")
+                );
+                return ERROR_INSTALL_FAILURE;
+            }
+        }
+    }
+    else
+    {
+        // We are installing in protected mode, which means the 'boinc_project'
+        //   account password has been changed, so we need to write out the new
+        //   username and password to the client_auth.xml file.
+        DWORD dwSize = Base64EncodeGetRequiredLength((int)strBOINCProjectAccountPassword.length());
+        LPSTR szBuffer = (LPSTR)malloc(dwSize*sizeof(TCHAR));
+        if (!szBuffer)
+        {
+            LogMessage(
+                INSTALLMESSAGE_FATALEXIT,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Not enough memory could be allocated to complete the requested action. ")
+                _T("Please shutdown any running applications or reboot the computer and rerun ")
+                _T("setup to complete installation.")
+            );
+            return ERROR_INSTALL_FAILURE;
+        }
+        memset(szBuffer, '\0', (dwSize*sizeof(TCHAR)));
+
+        // Base 64 encode the 'boinc_project' account password
+        //
+        CW2A pszASCIIDecodedPassword( strBOINCProjectAccountPassword.c_str() );
+        if (!Base64Encode(
+                (const BYTE*)((LPSTR)pszASCIIDecodedPassword),
+                (int)strlen(pszASCIIDecodedPassword),
+                szBuffer,
+                (int*)&dwSize,
+                0)
+            )
+		{
+            LogMessage(
+                INSTALLMESSAGE_FATALEXIT,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("The 'boinc_project' account password failed to be encoded.")
+            );
+            return ERROR_INSTALL_FAILURE;
+		}
+        CA2W pszUnicodeEncodedPassword( szBuffer );
+
+        _sntprintf(
+            szMessage, 
+            sizeof(szMessage),
+            _T("(Unicode) Base64 Encoded String: '%s'"),
+            pszUnicodeEncodedPassword.m_psz
+        );
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            szMessage
+        );
+
+        FILE* fClientAuthFile = NULL;
+        fClientAuthFile = _tfopen(strClientAuthFile.c_str(), _T("w"));
+        
+        _ftprintf(
+            fClientAuthFile,
+            _T("<client_authorization>\n")
+            _T("    <boinc_project>\n")
+            _T("        <username>%s</username>\n")
+            _T("        <password>%s</password>\n")
+            _T("    </boinc_project>\n")
+            _T("</client_authorization>\n"),
+            strBOINCProjectAccountUsername.c_str(),
+            pszUnicodeEncodedPassword.m_psz
+        );
+
+        fclose(fClientAuthFile);
+        free(szBuffer);
+    }
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    CreateClientAuthFile
+//
+// Description: This custom action stores the 'boinc_project' account
+//                information in the client_auth.xml file.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall CreateClientAuthFile(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CACreateClientAuthFile* pCA = new CACreateClientAuthFile(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+const char *BOINC_RCSID_01ed9786df="$Id: CACreateClientAuthFile.cpp 11804 2007-01-08 18:42:48Z rwalton $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateClientAuthFile.h b/win_build/installerv2/redist/Windows/src/boinccas/CACreateClientAuthFile.h
new file mode 100644
index 0000000..b8a1cb9
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateClientAuthFile.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+
+#ifndef _CACREATECLIENTAUTHFILE_H_
+#define _CACREATECLIENTAUTHFILE_H_
+
+
+class CACreateClientAuthFile : public BOINCCABase
+{
+public:
+
+    CACreateClientAuthFile(MSIHANDLE hMSIHandle);
+    ~CACreateClientAuthFile();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateProjectInitFile.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CACreateProjectInitFile.cpp
new file mode 100644
index 0000000..bb9942f
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateProjectInitFile.cpp
@@ -0,0 +1,135 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CACreateProjectInitFile.h"
+
+
+#define CUSTOMACTION_NAME               _T("CACreateProjectInitFile")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Store project initialization data")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACreateProjectInitFile::CACreateProjectInitFile(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CACreateProjectInitFile::~CACreateProjectInitFile()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CACreateProjectInitFile::OnExecution()
+{
+    tstring          strDataDirectory;
+    tstring          strProjectInitUrl;
+    tstring          strProjectInitAuthenticator;
+    tstring          strProjectInitTeamName;
+    tstring          strProjectInitFile;
+    UINT             uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("DATADIR"), strDataDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("PROJINIT_URL"), strProjectInitUrl );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("PROJINIT_AUTH"), strProjectInitAuthenticator );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("PROJINIT_TEAMNAME"), strProjectInitTeamName );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    if (!strProjectInitUrl.empty()) {
+
+        // The project_init.xml file is stored in the data directory.
+        //
+        strProjectInitFile = strDataDirectory + _T("\\project_init.xml");
+
+        FILE* fProjectInitFile = _tfopen(strProjectInitFile.c_str(), _T("w"));
+        
+        _ftprintf(
+            fProjectInitFile,
+            _T("<project_init>\n")
+            _T("    <name>%s</name>\n")
+            _T("    <url>%s</url>\n")
+            _T("    <account_key>%s</account_key>\n")
+            _T("    <team_name>%s</team_name>\n")
+            _T("</project_init>\n"),
+            strProjectInitUrl.c_str(),
+            strProjectInitUrl.c_str(),
+            !strProjectInitAuthenticator.empty() ? strProjectInitAuthenticator.c_str() : _T(""),
+            !strProjectInitTeamName.empty() ? strProjectInitTeamName.c_str() : _T("")
+        );
+
+        fclose(fProjectInitFile);
+
+    }
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    CreateProjectInitFile
+//
+// Description: This custom action stores the project init data 
+//                specified on the commandline in a file in the data
+//                directory.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall CreateProjectInitFile(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CACreateProjectInitFile* pCA = new CACreateProjectInitFile(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+const char *BOINC_RCSID_01ed9786df="$Id: CACreateProjectInitFile.cpp 11804 2007-01-08 18:42:48Z rwalton $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateProjectInitFile.h b/win_build/installerv2/redist/Windows/src/boinccas/CACreateProjectInitFile.h
new file mode 100644
index 0000000..01eb884
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateProjectInitFile.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+
+#ifndef _CACREATEPROJECTINITFILE_H_
+#define _CACREATEPROJECTINITFILE_H_
+
+
+class CACreateProjectInitFile : public BOINCCABase
+{
+public:
+
+    CACreateProjectInitFile(MSIHANDLE hMSIHandle);
+    ~CACreateProjectInitFile();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGetAdministratorsGroupName.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAGetAdministratorsGroupName.cpp
new file mode 100644
index 0000000..6d90da5
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGetAdministratorsGroupName.cpp
@@ -0,0 +1,118 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAGetAdministratorsGroupName.h"
+#include "lkuprid.h"
+
+#define CUSTOMACTION_NAME               _T("CAGetAdministratorsGroupName")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Retrieving the Administrators group name")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGetAdministratorsGroupName::CAGetAdministratorsGroupName(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGetAdministratorsGroupName::~CAGetAdministratorsGroupName()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAGetAdministratorsGroupName::OnExecution()
+{
+    tstring     strGroupAlias;
+    WCHAR       szName[UNLEN+1];
+    DWORD       cchName = UNLEN;
+    UINT        uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("GROUPALIAS_ADMINISTRATORS"), strGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    // If something is already defined then don't override it.
+    if( strGroupAlias.empty() )
+    {
+        if( !LookupAliasFromRid( NULL, DOMAIN_ALIAS_RID_ADMINS, szName, &cchName) )
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                GetLastError(),
+                _T("Setup was unable to determine the Administrators group name.")
+            );
+            return ERROR_INSTALL_FAILURE;
+        }
+
+        uiReturnValue = SetProperty( _T("GROUPALIAS_ADMINISTRATORS"), szName);
+        if ( uiReturnValue ) return uiReturnValue;
+    }
+
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GetAdministratorsGroupName
+//
+// Description: This custom action looks up the administrators group
+//                name.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall GetAdministratorsGroupName(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAGetAdministratorsGroupName* pCA = new CAGetAdministratorsGroupName(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+const char *BOINC_RCSID_1a1bfeb1f8="$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGetAdministratorsGroupName.h b/win_build/installerv2/redist/Windows/src/boinccas/CAGetAdministratorsGroupName.h
new file mode 100644
index 0000000..abf26ea
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGetAdministratorsGroupName.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAGETADMINISTRATORSGROUPNAME_H_
+#define _CAGETADMINISTRATORSGROUPNAME_H_
+
+
+class CAGetAdministratorsGroupName : public BOINCCABase
+{
+public:
+
+    CAGetAdministratorsGroupName(MSIHANDLE hMSIHandle);
+    ~CAGetAdministratorsGroupName();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGetUsersGroupName.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAGetUsersGroupName.cpp
new file mode 100644
index 0000000..06caa76
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGetUsersGroupName.cpp
@@ -0,0 +1,119 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAGetUsersGroupName.h"
+#include "lkuprid.h"
+
+
+#define CUSTOMACTION_NAME               _T("CAGetUsersGroupName")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Retrieving the Users group name")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGetUsersGroupName::CAGetUsersGroupName(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGetUsersGroupName::~CAGetUsersGroupName()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAGetUsersGroupName::OnExecution()
+{
+    tstring     strGroupAlias;
+    WCHAR       szName[UNLEN+1];
+    DWORD       cchName = UNLEN;
+    UINT        uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("GROUPALIAS_USERS"), strGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    // If something is already defined then don't override it.
+    if( strGroupAlias.empty() )
+    {
+        if( !LookupAliasFromRid( NULL, DOMAIN_ALIAS_RID_USERS, szName, &cchName) )
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                GetLastError(),
+                _T("Setup was unable to determine the Users group name.")
+            );
+            return ERROR_INSTALL_FAILURE;
+        }
+
+        uiReturnValue = SetProperty( _T("GROUPALIAS_USERS"), szName);
+        if ( uiReturnValue ) return uiReturnValue;
+    }
+
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GetUsersGroupName
+//
+// Description: This custom action looks up the users group
+//                name.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall GetUsersGroupName(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAGetUsersGroupName* pCA = new CAGetUsersGroupName(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+const char *BOINC_RCSID_75eacc2220="$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGetUsersGroupName.h b/win_build/installerv2/redist/Windows/src/boinccas/CAGetUsersGroupName.h
new file mode 100644
index 0000000..7ef07ae
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGetUsersGroupName.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAGETUSERSGROUPNAME_H_
+#define _CAGETUSERSGROUPNAME_H_
+
+
+class CAGetUsersGroupName : public BOINCCABase
+{
+public:
+
+    CAGetUsersGroupName(MSIHANDLE hMSIHandle);
+    ~CAGetUsersGroupName();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsRights.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsRights.cpp
new file mode 100644
index 0000000..aa8514d
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsRights.cpp
@@ -0,0 +1,335 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAGrantBOINCAdminsRights.h"
+#include "lsaprivs.h"
+
+
+#define CUSTOMACTION_NAME               _T("CAGrantBOINCAdminsRights")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating the BOINC Administrators group privilege levels")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCAdminsRights::CAGrantBOINCAdminsRights(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCAdminsRights::~CAGrantBOINCAdminsRights()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAGrantBOINCAdminsRights::OnExecution()
+{
+    PSID        pSid;
+    tstring     strOSVersion;
+    UINT        uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("VersionNT"), strOSVersion );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    //
+    // Obtain the SID of the user/group.
+    // Note that we could target a specific machine, but we don't.
+    // Specifying NULL for target machine searches for the SID in the
+    // following order: well-known, Built-in and local, primary domain,
+    // trusted domains.
+    //
+    if(
+        GetAccountSid(
+            NULL,                                    // default lookup logic
+            tstring(L"boinc_admins").c_str(),        // account to obtain SID
+            &pSid                                    // buffer to allocate to contain resultant SID
+            )
+    ) 
+    {
+
+        //
+        // We only grant the privilege if we succeeded in obtaining the
+        // SID. We can actually add SIDs which cannot be looked up, but
+        // looking up the SID is a good sanity check which is suitable for
+        // most cases.
+
+        // User Rights
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeNetworkLogonRight' right."));
+        GrantUserRight(pSid, L"SeNetworkLogonRight", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeRemoteInteractiveLogonRight' right."));
+        GrantUserRight(pSid, L"SeRemoteInteractiveLogonRight", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeBatchLogonRight' right."));
+        GrantUserRight(pSid, L"SeBatchLogonRight", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeInteractiveLogonRight' right."));
+        GrantUserRight(pSid, L"SeInteractiveLogonRight", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeServiceLogonRight' right."));
+        GrantUserRight(pSid, L"SeServiceLogonRight", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeDenyNetworkLogonRight' right."));
+        GrantUserRight(pSid, L"SeDenyNetworkLogonRight", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeDenyInteractiveLogonRight' right."));
+        GrantUserRight(pSid, L"SeDenyInteractiveLogonRight", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeDenyBatchLogonRight' right."));
+        GrantUserRight(pSid, L"SeDenyBatchLogonRight", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeDenyServiceLogonRight' right."));
+        GrantUserRight(pSid, L"SeDenyServiceLogonRight", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        // Windows 2000 and older does not have the SeDenyRemoteInteractiveLogonRight user right
+        //
+        if (strOSVersion > _T("500")) {
+            LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeDenyRemoteInteractiveLogonRight' right."));
+            GrantUserRight(pSid, L"SeDenyRemoteInteractiveLogonRight", FALSE);
+            LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+        }
+
+        // Privileges
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeTcbPrivilege' right."));
+        GrantUserRight(pSid, L"SeTcbPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeMachineAccountPrivilege' right."));
+        GrantUserRight(pSid, L"SeMachineAccountPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeIncreaseQuotaPrivilege' right."));
+        if (!GrantUserRight(pSid, L"SeIncreaseQuotaPrivilege", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeIncreaseQuotaPrivilege")
+            );
+        }
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeBackupPrivilege' right."));
+        GrantUserRight(pSid, L"SeBackupPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeChangeNotifyPrivilege' right."));
+        if (!GrantUserRight(pSid, L"SeChangeNotifyPrivilege", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeChangeNotifyPrivilege")
+            );
+        }
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeSystemTimePrivilege' right."));
+        GrantUserRight(pSid, L"SeSystemTimePrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeCreateTokenPrivilege' right."));
+        GrantUserRight(pSid, L"SeCreateTokenPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeCreatePagefilePrivilege' right."));
+        GrantUserRight(pSid, L"SeCreatePagefilePrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeCreateGlobalPrivilege' right."));
+        if (!GrantUserRight(pSid, L"SeCreateGlobalPrivilege", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeCreateGlobalPrivilege")
+            );
+        }
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeDebugPrivilege' right."));
+        GrantUserRight(pSid, L"SeDebugPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeEnableDelegationPrivilege' right."));
+        GrantUserRight(pSid, L"SeEnableDelegationPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeRemoteShutdownPrivilege' right."));
+        GrantUserRight(pSid, L"SeRemoteShutdownPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeAuditPrivilege' right."));
+        GrantUserRight(pSid, L"SeAuditPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeImpersonatePrivilege' right."));
+        GrantUserRight(pSid, L"SeImpersonatePrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeIncreaseBasePriorityPrivilege' right."));
+        GrantUserRight(pSid, L"SeIncreaseBasePriorityPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeLoadDriverPrivilege' right."));
+        GrantUserRight(pSid, L"SeLoadDriverPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeLockMemoryPrivilege' right."));
+        GrantUserRight(pSid, L"SeLockMemoryPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeSecurityPrivilege' right."));
+        GrantUserRight(pSid, L"SeSecurityPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeSystemEnvironmentPrivilege' right."));
+        GrantUserRight(pSid, L"SeSystemEnvironmentPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeManageVolumePrivilege' right."));
+        GrantUserRight(pSid, L"SeManageVolumePrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeProfileSingleProcessPrivilege' right."));
+        GrantUserRight(pSid, L"SeProfileSingleProcessPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeSystemProfilePrivilege' right."));
+        GrantUserRight(pSid, L"SeSystemProfilePrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeUndockPrivilege' right."));
+        GrantUserRight(pSid, L"SeUndockPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeAssignPrimaryTokenPrivilege' right."));
+        if (!GrantUserRight(pSid, L"SeAssignPrimaryTokenPrivilege", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeAssignPrimaryTokenPrivilege")
+            );
+        }
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeRestorePrivilege' right."));
+        GrantUserRight(pSid, L"SeRestorePrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeShutdownPrivilege' right."));
+        GrantUserRight(pSid, L"SeShutdownPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeSynchAgentPrivilege' right."));
+        GrantUserRight(pSid, L"SeSynchAgentPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Checking the 'SeTakeOwnershipPrivilege' right."));
+        GrantUserRight(pSid, L"SeTakeOwnershipPrivilege", FALSE);
+        LogMessage(INSTALLMESSAGE_INFO, NULL, NULL, NULL, NULL, _T("Check completed."));
+
+    }
+    else
+    {
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("Failed to be able to obtain the SID for the selected user on the localhost")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+
+    //
+    // Cleanup any handles and memory allocated during the custom action
+    //
+    if(pSid != NULL) HeapFree(GetProcessHeap(), 0, pSid);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GrantBOINCAdminsRights
+//
+// Description: This custom action grants the 'boinc_admins' group the
+//              required rights.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall GrantBOINCAdminsRights(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAGrantBOINCAdminsRights* pCA = new CAGrantBOINCAdminsRights(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsRights.h b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsRights.h
new file mode 100644
index 0000000..bba91e9
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsRights.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAGRANTBOINCADMINSRIGHTS_H_
+#define _CAGRANTBOINCADMINSRIGHTS_H_
+
+
+class CAGrantBOINCAdminsRights : public BOINCCABase
+{
+public:
+
+    CAGrantBOINCAdminsRights(MSIHANDLE hMSIHandle);
+    ~CAGrantBOINCAdminsRights();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsVirtualBoxRights.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsVirtualBoxRights.cpp
new file mode 100644
index 0000000..2208797
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsVirtualBoxRights.cpp
@@ -0,0 +1,100 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAGrantBOINCAdminsVirtualBoxRights.h"
+#include "dcomperm.h"
+
+
+#define CUSTOMACTION_NAME               _T("CAGrantBOINCAdminsVirtualBoxRights")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating the BOINC Administrators VirtualBox access rights")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCAdminsVirtualBoxRights::CAGrantBOINCAdminsVirtualBoxRights(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCAdminsVirtualBoxRights::~CAGrantBOINCAdminsVirtualBoxRights()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAGrantBOINCAdminsVirtualBoxRights::OnExecution()
+{
+    ChangeAppIDAccessACL(
+        _T("{819B4D85-9CEE-493C-B6FC-64FFE759B3C9}"),
+        _T("boinc_admins"),
+        TRUE,
+        TRUE
+    );
+
+    ChangeAppIDLaunchACL(
+        _T("{819B4D85-9CEE-493C-B6FC-64FFE759B3C9}"),
+        _T("boinc_admins"),
+        TRUE,
+        TRUE
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GrantBOINCAdminsVirtualBoxRights
+//
+// Description: This custom action grants the 'boinc_admins' group the
+//              required rights to launch and access VirtualBox.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall GrantBOINCAdminsVirtualBoxRights(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAGrantBOINCAdminsVirtualBoxRights* pCA = new CAGrantBOINCAdminsVirtualBoxRights(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsVirtualBoxRights.h b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsVirtualBoxRights.h
new file mode 100644
index 0000000..fd0cbee
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCAdminsVirtualBoxRights.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAGRANTBOINCADMINSVIRTUALBOXRIGHTS_H_
+#define _CAGRANTBOINCADMINSVIRTUALBOXRIGHTS_H_
+
+
+class CAGrantBOINCAdminsVirtualBoxRights : public BOINCCABase
+{
+public:
+
+    CAGrantBOINCAdminsVirtualBoxRights(MSIHANDLE hMSIHandle);
+    ~CAGrantBOINCAdminsVirtualBoxRights();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCMasterRights.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCMasterRights.cpp
new file mode 100644
index 0000000..2d20a48
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCMasterRights.cpp
@@ -0,0 +1,225 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAGrantBOINCMasterRights.h"
+#include "lsaprivs.h"
+
+
+#define CUSTOMACTION_NAME               _T("CAGrantBOINCMasterRights")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating BOINC Master's privileges")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCMasterRights::CAGrantBOINCMasterRights(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCMasterRights::~CAGrantBOINCMasterRights()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAGrantBOINCMasterRights::OnExecution()
+{
+    PSID        pSid;
+    tstring     strBOINCMasterAccountUsername;
+    tstring     strOSVersion;
+    UINT        uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("BOINC_MASTER_USERNAME"), strBOINCMasterAccountUsername );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("VersionNT"), strOSVersion );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    //
+    // Obtain the SID of the user/group.
+    // Note that we could target a specific machine, but we don't.
+    // Specifying NULL for target machine searches for the SID in the
+    // following order: well-known, Built-in and local, primary domain,
+    // trusted domains.
+    //
+    if(
+        GetAccountSid(
+            NULL,                                    // default lookup logic
+            strBOINCMasterAccountUsername.c_str(),   // account to obtain SID
+            &pSid                                    // buffer to allocate to contain resultant SID
+            )
+    ) 
+    {
+
+        //
+        // We only grant the privilege if we succeeded in obtaining the
+        // SID. We can actually add SIDs which cannot be looked up, but
+        // looking up the SID is a good sanity check which is suitable for
+        // most cases.
+
+        // User Rights
+        GrantUserRight(pSid, L"SeNetworkLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeRemoteInteractiveLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeBatchLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeInteractiveLogonRight", FALSE);
+
+        if (!GrantUserRight(pSid, L"SeServiceLogonRight", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeServiceLogonRight")
+            );
+        }
+
+        GrantUserRight(pSid, L"SeDenyNetworkLogonRight", FALSE);
+
+        if (!GrantUserRight(pSid, L"SeDenyInteractiveLogonRight", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeDenyInteractiveLogonRight")
+            );
+        }
+
+        GrantUserRight(pSid, L"SeDenyBatchLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeDenyServiceLogonRight", FALSE);
+
+        // Windows 2000 and older does not have the SeDenyRemoteInteractiveLogonRight user right
+        //
+        if (strOSVersion > _T("500")) {
+            if (!GrantUserRight(pSid, L"SeDenyRemoteInteractiveLogonRight", TRUE))
+            {
+                LogMessage(
+                    INSTALLMESSAGE_ERROR,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    NULL,
+                    _T("Failed call to GrantUserRight - SeDenyRemoteInteractiveLogonRight")
+                );
+            }
+        }
+
+
+        // Privileges
+        GrantUserRight(pSid, L"SeTcbPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeMachineAccountPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeIncreaseQuotaPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeBackupPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeChangeNotifyPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSystemTimePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreateTokenPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreatePagefilePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreateGlobalPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeDebugPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeEnableDelegationPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeRemoteShutdownPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeAuditPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeImpersonatePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeIncreaseBasePriorityPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeLoadDriverPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeLockMemoryPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSecurityPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSystemEnvironmentPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeManageVolumePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeProfileSingleProcessPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSystemProfilePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeUndockPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeAssignPrimaryTokenPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeRestorePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeShutdownPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSynchAgentPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeTakeOwnershipPrivilege", FALSE);
+    }
+    else
+    {
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("Failed to be able to obtain the SID for the selected user on the localhost")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+
+    //
+    // Cleanup any handles and memory allocated during the custom action
+    //
+    if(pSid != NULL) HeapFree(GetProcessHeap(), 0, pSid);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GrantBOINCMasterRights
+//
+// Description: This custom action reads the BOINC_MASTER_USERNAME
+//              public property and grants that user the
+//              required rights.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall GrantBOINCMasterRights(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAGrantBOINCMasterRights* pCA = new CAGrantBOINCMasterRights(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+const char *BOINC_RCSID_00ed9586df="$Id: CAGrantBOINCMasterRights.cpp 13804 2007-10-09 11:35:47Z fthomas $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCMasterRights.h b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCMasterRights.h
new file mode 100644
index 0000000..5bbddc2
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCMasterRights.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAGRANTBOINCMASTERRIGHTS_H_
+#define _CAGRANTBOINCMASTERRIGHTS_H_
+
+
+class CAGrantBOINCMasterRights : public BOINCCABase
+{
+public:
+
+    CAGrantBOINCMasterRights(MSIHANDLE hMSIHandle);
+    ~CAGrantBOINCMasterRights();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectRights.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectRights.cpp
new file mode 100644
index 0000000..33cf181
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectRights.cpp
@@ -0,0 +1,234 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAGrantBOINCProjectRights.h"
+#include "lsaprivs.h"
+
+
+#define CUSTOMACTION_NAME               _T("CAGrantBOINCProjectRights")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating BOINC Project's privileges")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCProjectRights::CAGrantBOINCProjectRights(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCProjectRights::~CAGrantBOINCProjectRights()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAGrantBOINCProjectRights::OnExecution()
+{
+    PSID        pSid;
+    tstring     strBOINCProjectAccountUsername;
+    tstring     strOSVersion;
+    UINT        uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("BOINC_PROJECT_USERNAME"), strBOINCProjectAccountUsername );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("VersionNT"), strOSVersion );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    //
+    // Obtain the SID of the user/group.
+    // Note that we could target a specific machine, but we don't.
+    // Specifying NULL for target machine searches for the SID in the
+    // following order: well-known, Built-in and local, primary domain,
+    // trusted domains.
+    //
+    if(
+        GetAccountSid(
+            NULL,                                     // default lookup logic
+            strBOINCProjectAccountUsername.c_str(),   // account to obtain SID
+            &pSid                                     // buffer to allocate to contain resultant SID
+            )
+    ) 
+    {
+
+        //
+        // We only grant the privilege if we succeeded in obtaining the
+        // SID. We can actually add SIDs which cannot be looked up, but
+        // looking up the SID is a good sanity check which is suitable for
+        // most cases.
+
+        // User Rights
+        GrantUserRight(pSid, L"SeNetworkLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeRemoteInteractiveLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeBatchLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeInteractiveLogonRight", FALSE);
+
+        if (!GrantUserRight(pSid, L"SeServiceLogonRight", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeServiceLogonRight")
+            );
+        }
+
+        if (!GrantUserRight(pSid, L"SeDenyNetworkLogonRight", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeDenyNetworkLogonRight")
+            );
+        }
+
+        if (!GrantUserRight(pSid, L"SeDenyInteractiveLogonRight", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeDenyInteractiveLogonRight")
+            );
+        }
+
+        GrantUserRight(pSid, L"SeDenyBatchLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeDenyServiceLogonRight", FALSE);
+
+        // Windows 2000 and older does not have the SeDenyRemoteInteractiveLogonRight user right
+        //
+        if (strOSVersion > _T("500")) {
+            if (!GrantUserRight(pSid, L"SeDenyRemoteInteractiveLogonRight", TRUE))
+            {
+                LogMessage(
+                    INSTALLMESSAGE_ERROR,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    NULL,
+                    _T("Failed call to GrantUserRight - SeDenyRemoteInteractiveLogonRight")
+                );
+            }
+        }
+
+        // Privileges
+        GrantUserRight(pSid, L"SeTcbPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeMachineAccountPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeIncreaseQuotaPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeBackupPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeChangeNotifyPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSystemTimePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreateTokenPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreatePagefilePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreateGlobalPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeDebugPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeEnableDelegationPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeRemoteShutdownPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeAuditPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeImpersonatePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeIncreaseBasePriorityPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeLoadDriverPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeLockMemoryPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSecurityPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSystemEnvironmentPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeManageVolumePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeProfileSingleProcessPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSystemProfilePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeUndockPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeAssignPrimaryTokenPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeRestorePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeShutdownPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSynchAgentPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeTakeOwnershipPrivilege", FALSE);
+    }
+    else
+    {
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("Failed to be able to obtain the SID for the selected user on the localhost")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+
+    //
+    // Cleanup any handles and memory allocated during the custom action
+    //
+    if(pSid != NULL) HeapFree(GetProcessHeap(), 0, pSid);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GrantBOINCProjectRights
+//
+// Description: This custom action reads the BOINC_PROJECT_USERNAME
+//              public property and grants that user the
+//              required rights.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall GrantBOINCProjectRights(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAGrantBOINCProjectRights* pCA = new CAGrantBOINCProjectRights(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+const char *BOINC_RCSID_00ed9696df="$Id: CAGrantBOINCProjectRights.cpp 13804 2007-10-09 11:35:47Z fthomas $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectRights.h b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectRights.h
new file mode 100644
index 0000000..76966c3
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectRights.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAGRANTBOINCPROJECTRIGHTS_H_
+#define _CAGRANTBOINCPROJECTRIGHTS_H_
+
+
+class CAGrantBOINCProjectRights : public BOINCCABase
+{
+public:
+
+    CAGrantBOINCProjectRights(MSIHANDLE hMSIHandle);
+    ~CAGrantBOINCProjectRights();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsRights.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsRights.cpp
new file mode 100644
index 0000000..4a2f3a1
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsRights.cpp
@@ -0,0 +1,197 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAGrantBOINCProjectsRights.h"
+#include "lsaprivs.h"
+
+
+#define CUSTOMACTION_NAME               _T("CAGrantBOINCProjectsRights")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating the BOINC Projects group privilege levels")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCProjectsRights::CAGrantBOINCProjectsRights(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCProjectsRights::~CAGrantBOINCProjectsRights()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAGrantBOINCProjectsRights::OnExecution()
+{
+    PSID        pSid;
+    tstring     strOSVersion;
+    UINT        uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("VersionNT"), strOSVersion );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    //
+    // Obtain the SID of the user/group.
+    // Note that we could target a specific machine, but we don't.
+    // Specifying NULL for target machine searches for the SID in the
+    // following order: well-known, Built-in and local, primary domain,
+    // trusted domains.
+    //
+    if(
+        GetAccountSid(
+            NULL,                                    // default lookup logic
+            tstring(L"boinc_projects").c_str(),      // account to obtain SID
+            &pSid                                    // buffer to allocate to contain resultant SID
+            )
+    ) 
+    {
+
+        //
+        // We only grant the privilege if we succeeded in obtaining the
+        // SID. We can actually add SIDs which cannot be looked up, but
+        // looking up the SID is a good sanity check which is suitable for
+        // most cases.
+
+        // User Rights
+        GrantUserRight(pSid, L"SeNetworkLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeRemoteInteractiveLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeBatchLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeInteractiveLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeServiceLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeDenyNetworkLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeDenyInteractiveLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeDenyBatchLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeDenyServiceLogonRight", FALSE);
+
+        // Windows 2000 and older does not have the SeDenyRemoteInteractiveLogonRight user right
+        //
+        if (strOSVersion > _T("500")) {
+            GrantUserRight(pSid, L"SeDenyRemoteInteractiveLogonRight", FALSE);
+        }
+
+
+        // Privileges
+        GrantUserRight(pSid, L"SeTcbPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeMachineAccountPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeIncreaseQuotaPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeBackupPrivilege", FALSE);
+
+        if (!GrantUserRight(pSid, L"SeChangeNotifyPrivilege", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeChangeNotifyPrivilege")
+            );
+        }
+
+        GrantUserRight(pSid, L"SeSystemTimePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreateTokenPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreatePagefilePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreateGlobalPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeDebugPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeEnableDelegationPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeRemoteShutdownPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeAuditPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeImpersonatePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeIncreaseBasePriorityPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeLoadDriverPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeLockMemoryPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSecurityPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSystemEnvironmentPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeManageVolumePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeProfileSingleProcessPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSystemProfilePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeUndockPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeAssignPrimaryTokenPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeRestorePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeShutdownPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSynchAgentPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeTakeOwnershipPrivilege", FALSE);
+
+    }
+    else
+    {
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("Failed to be able to obtain the SID for the selected user on the localhost")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+
+    //
+    // Cleanup any handles and memory allocated during the custom action
+    //
+    if(pSid != NULL) HeapFree(GetProcessHeap(), 0, pSid);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GrantBOINCProjectsRights
+//
+// Description: This custom action grants the 'boinc_projects' group the
+//              required rights.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall GrantBOINCProjectsRights(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAGrantBOINCProjectsRights* pCA = new CAGrantBOINCProjectsRights(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsRights.h b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsRights.h
new file mode 100644
index 0000000..43097b9
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsRights.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAGRANTBOINCPROJECTSRIGHTS_H_
+#define _CAGRANTBOINCPROJECTSRIGHTS_H_
+
+
+class CAGrantBOINCProjectsRights : public BOINCCABase
+{
+public:
+
+    CAGrantBOINCProjectsRights(MSIHANDLE hMSIHandle);
+    ~CAGrantBOINCProjectsRights();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsVirtualBoxRights.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsVirtualBoxRights.cpp
new file mode 100644
index 0000000..ccc1262
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsVirtualBoxRights.cpp
@@ -0,0 +1,100 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAGrantBOINCProjectsVirtualBoxRights.h"
+#include "dcomperm.h"
+
+
+#define CUSTOMACTION_NAME               _T("CAGrantBOINCProjectsVirtualBoxRights")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating the BOINC Projects VirtualBox access rights")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCProjectsVirtualBoxRights::CAGrantBOINCProjectsVirtualBoxRights(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCProjectsVirtualBoxRights::~CAGrantBOINCProjectsVirtualBoxRights()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAGrantBOINCProjectsVirtualBoxRights::OnExecution()
+{
+    ChangeAppIDAccessACL(
+        _T("{819B4D85-9CEE-493C-B6FC-64FFE759B3C9}"),
+        _T("boinc_projects"),
+        TRUE,
+        TRUE
+    );
+
+    ChangeAppIDLaunchACL(
+        _T("{819B4D85-9CEE-493C-B6FC-64FFE759B3C9}"),
+        _T("boinc_projects"),
+        TRUE,
+        TRUE
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GrantBOINCProjectsVirtualBoxRights
+//
+// Description: This custom action grants the 'boinc_projects' group the
+//              required rights to launch and access VirtualBox.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall GrantBOINCProjectsVirtualBoxRights(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAGrantBOINCProjectsVirtualBoxRights* pCA = new CAGrantBOINCProjectsVirtualBoxRights(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsVirtualBoxRights.h b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsVirtualBoxRights.h
new file mode 100644
index 0000000..2bf079a
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCProjectsVirtualBoxRights.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAGRANTBOINCPROJECTSSVIRTUALBOXRIGHTS_H_
+#define _CAGRANTBOINCPROJECTSSVIRTUALBOXRIGHTS_H_
+
+
+class CAGrantBOINCProjectsVirtualBoxRights : public BOINCCABase
+{
+public:
+
+    CAGrantBOINCProjectsVirtualBoxRights(MSIHANDLE hMSIHandle);
+    ~CAGrantBOINCProjectsVirtualBoxRights();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCUsersRights.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCUsersRights.cpp
new file mode 100644
index 0000000..c13fdaa
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCUsersRights.cpp
@@ -0,0 +1,233 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAGrantBOINCUsersRights.h"
+#include "lsaprivs.h"
+
+
+#define CUSTOMACTION_NAME               _T("CAGrantBOINCUsersRights")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating the BOINC Users group privilege levels")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCUsersRights::CAGrantBOINCUsersRights(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAGrantBOINCUsersRights::~CAGrantBOINCUsersRights()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAGrantBOINCUsersRights::OnExecution()
+{
+    PSID        pSid;
+    tstring     strOSVersion;
+    UINT        uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("VersionNT"), strOSVersion );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    //
+    // Obtain the SID of the user/group.
+    // Note that we could target a specific machine, but we don't.
+    // Specifying NULL for target machine searches for the SID in the
+    // following order: well-known, Built-in and local, primary domain,
+    // trusted domains.
+    //
+    if(
+        GetAccountSid(
+            NULL,                                    // default lookup logic
+            tstring(L"boinc_users").c_str(),         // account to obtain SID
+            &pSid                                    // buffer to allocate to contain resultant SID
+            )
+    ) 
+    {
+
+        //
+        // We only grant the privilege if we succeeded in obtaining the
+        // SID. We can actually add SIDs which cannot be looked up, but
+        // looking up the SID is a good sanity check which is suitable for
+        // most cases.
+
+        // User Rights
+        GrantUserRight(pSid, L"SeNetworkLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeRemoteInteractiveLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeBatchLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeInteractiveLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeServiceLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeDenyNetworkLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeDenyInteractiveLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeDenyBatchLogonRight", FALSE);
+        GrantUserRight(pSid, L"SeDenyServiceLogonRight", FALSE);
+
+        // Windows 2000 and older does not have the SeDenyRemoteInteractiveLogonRight user right
+        //
+        if (strOSVersion > _T("500")) {
+            GrantUserRight(pSid, L"SeDenyRemoteInteractiveLogonRight", FALSE);
+        }
+
+
+        // Privileges
+        GrantUserRight(pSid, L"SeTcbPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeMachineAccountPrivilege", FALSE);
+
+        if (!GrantUserRight(pSid, L"SeIncreaseQuotaPrivilege", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeIncreaseQuotaPrivilege")
+            );
+        }
+
+        GrantUserRight(pSid, L"SeBackupPrivilege", FALSE);
+
+        if (!GrantUserRight(pSid, L"SeChangeNotifyPrivilege", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeChangeNotifyPrivilege")
+            );
+        }
+
+        GrantUserRight(pSid, L"SeSystemTimePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreateTokenPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeCreatePagefilePrivilege", FALSE);
+
+        if (!GrantUserRight(pSid, L"SeCreateGlobalPrivilege", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeCreateGlobalPrivilege")
+            );
+        }
+
+        GrantUserRight(pSid, L"SeDebugPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeEnableDelegationPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeRemoteShutdownPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeAuditPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeImpersonatePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeIncreaseBasePriorityPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeLoadDriverPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeLockMemoryPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSecurityPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSystemEnvironmentPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeManageVolumePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeProfileSingleProcessPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSystemProfilePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeUndockPrivilege", FALSE);
+
+        if (!GrantUserRight(pSid, L"SeAssignPrimaryTokenPrivilege", TRUE))
+        {
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed call to GrantUserRight - SeAssignPrimaryTokenPrivilege")
+            );
+        }
+
+        GrantUserRight(pSid, L"SeRestorePrivilege", FALSE);
+        GrantUserRight(pSid, L"SeShutdownPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeSynchAgentPrivilege", FALSE);
+        GrantUserRight(pSid, L"SeTakeOwnershipPrivilege", FALSE);
+
+    }
+    else
+    {
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("Failed to be able to obtain the SID for the selected user on the localhost")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+
+    //
+    // Cleanup any handles and memory allocated during the custom action
+    //
+    if(pSid != NULL) HeapFree(GetProcessHeap(), 0, pSid);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GrantBOINCUsersRights
+//
+// Description: This custom action grants the 'boinc_users' group the
+//              required rights.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall GrantBOINCUsersRights(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAGrantBOINCUsersRights* pCA = new CAGrantBOINCUsersRights(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCUsersRights.h b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCUsersRights.h
new file mode 100644
index 0000000..1b5b686
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAGrantBOINCUsersRights.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAGRANTBOINCUSERSRIGHTS_H_
+#define _CAGRANTBOINCUSERSRIGHTS_H_
+
+
+class CAGrantBOINCUsersRights : public BOINCCABase
+{
+public:
+
+    CAGrantBOINCUsersRights(MSIHANDLE hMSIHandle);
+    ~CAGrantBOINCUsersRights();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCMasterProfile.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCMasterProfile.cpp
new file mode 100644
index 0000000..114224f
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCMasterProfile.cpp
@@ -0,0 +1,95 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAHideBOINCMasterProfile.h"
+#include "lsaprivs.h"
+
+
+#define CUSTOMACTION_NAME               _T("CAHideBOINCMasterProfile")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Hide the BOINC Master user profile.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAHideBOINCMasterProfile::CAHideBOINCMasterProfile(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAHideBOINCMasterProfile::~CAHideBOINCMasterProfile()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAHideBOINCMasterProfile::OnExecution()
+{
+    tstring     strBOINCMasterAccountUsername;
+    UINT        uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("BOINC_MASTER_USERNAME"), strBOINCMasterAccountUsername );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    HideBOINCMasterProfile
+//
+// Description: This custom action reads the BOINC_PROJECT_USERNAME
+//              public property and grants that user the
+//              required rights.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall HideBOINCMasterProfile(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAHideBOINCMasterProfile* pCA = new CAHideBOINCMasterProfile(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCMasterProfile.h b/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCMasterProfile.h
new file mode 100644
index 0000000..25031cc
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCMasterProfile.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAHIDEBOINCMASTERPROFILE_H_
+#define _CAHIDEBOINCMASTERPROFILE_H_
+
+
+class CAHideBOINCMasterProfile : public BOINCCABase
+{
+public:
+
+    CAHideBOINCMasterProfile(MSIHANDLE hMSIHandle);
+    ~CAHideBOINCMasterProfile();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCProjectProfile.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCProjectProfile.cpp
new file mode 100644
index 0000000..e202d7a
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCProjectProfile.cpp
@@ -0,0 +1,96 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAHideBOINCProjectProfile.h"
+#include "lsaprivs.h"
+
+
+#define CUSTOMACTION_NAME               _T("CAHideBOINCProjectProfile")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Hide the BOINC Profile user profile.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAHideBOINCProjectProfile::CAHideBOINCProjectProfile(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAHideBOINCProjectProfile::~CAHideBOINCProjectProfile()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAHideBOINCProjectProfile::OnExecution()
+{
+    tstring     strBOINCProjectAccountUsername;
+    UINT        uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("BOINC_PROJECT_USERNAME"), strBOINCProjectAccountUsername );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    HideBOINCProjectProfile
+//
+// Description: This custom action reads the BOINC_PROJECT_USERNAME
+//              public property and grants that user the
+//              required rights.
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall HideBOINCProjectProfile(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAHideBOINCProjectProfile* pCA = new CAHideBOINCProjectProfile(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCProjectProfile.h b/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCProjectProfile.h
new file mode 100644
index 0000000..bc98891
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAHideBOINCProjectProfile.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAHIDEBOINCPROJECTPROFILE_H_
+#define _CAHIDEBOINCPROJECTPROFILE_H_
+
+
+class CAHideBOINCProjectProfile : public BOINCCABase
+{
+public:
+
+    CAHideBOINCProjectProfile(MSIHANDLE hMSIHandle);
+    ~CAHideBOINCProjectProfile();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCManager.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCManager.cpp
new file mode 100644
index 0000000..156bef5
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCManager.cpp
@@ -0,0 +1,108 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "launcher.h"
+#include "CALaunchBOINCManager.h"
+
+#define CUSTOMACTION_NAME               _T("CALaunchBOINCManager")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Launching BOINC Manager")
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CALaunchBOINCManager::CALaunchBOINCManager(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CALaunchBOINCManager::~CALaunchBOINCManager()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+
+UINT CALaunchBOINCManager::OnExecution()
+{
+    tstring strInstallDirectory;
+    tstring strBuffer;
+    UINT uiReturnValue = -1;
+
+    uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    strBuffer = tstring(_T("\"")) + strInstallDirectory + tstring(_T("boincmgr.exe\""));
+    CreateProcessWithExplorerIL( NULL, (LPWSTR)strBuffer.c_str() );
+
+    strBuffer = tstring(_T("\"")) + strInstallDirectory + tstring(_T("gridrepublic.exe\""));
+    CreateProcessWithExplorerIL( NULL, (LPWSTR)strBuffer.c_str() );
+
+    strBuffer = tstring(_T("\"")) + strInstallDirectory + tstring(_T("charityengine.exe\""));
+    CreateProcessWithExplorerIL( NULL, (LPWSTR)strBuffer.c_str() );
+
+    strBuffer = tstring(_T("\"")) + strInstallDirectory + tstring(_T("progressthruprocessors.exe\""));
+    CreateProcessWithExplorerIL( NULL, (LPWSTR)strBuffer.c_str() );
+
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    LaunchBOINCManager
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall LaunchBOINCManager(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CALaunchBOINCManager* pCA = new CALaunchBOINCManager(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+const char *BOINC_RCSID_7bca979acf="$Id: CAShutdownBOINC.cpp 14659 2008-02-01 22:08:48Z romw $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCManager.h b/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCManager.h
new file mode 100644
index 0000000..1580e9f
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCManager.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CALAUNCHBOINCMANAGER_H_
+#define _CALAUNCHBOINCMANAGER_H_
+
+
+class CALaunchBOINCManager : public BOINCCABase
+{
+public:
+
+    CALaunchBOINCManager(MSIHANDLE hMSIHandle);
+    ~CALaunchBOINCManager();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCTray.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCTray.cpp
new file mode 100644
index 0000000..cc01fdf
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCTray.cpp
@@ -0,0 +1,97 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "launcher.h"
+#include "CALaunchBOINCTray.h"
+
+#define CUSTOMACTION_NAME               _T("CALaunchBOINCTray")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Launching BOINC Tray")
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CALaunchBOINCTray::CALaunchBOINCTray(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CALaunchBOINCTray::~CALaunchBOINCTray()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+
+UINT CALaunchBOINCTray::OnExecution()
+{
+    tstring strInstallDirectory;
+    tstring strBuffer;
+    UINT uiReturnValue = -1;
+
+    uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    strBuffer = tstring(_T("\"")) + strInstallDirectory + tstring(_T("boinctray.exe\""));
+    CreateProcessWithExplorerIL( NULL, (LPWSTR)strBuffer.c_str() );
+
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    LaunchBOINCTray
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall LaunchBOINCTray(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CALaunchBOINCTray* pCA = new CALaunchBOINCTray(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCTray.h b/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCTray.h
new file mode 100644
index 0000000..7277506
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CALaunchBOINCTray.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CALAUNCHBOINCTRAY_H_
+#define _CALAUNCHBOINCTRAY_H_
+
+
+class CALaunchBOINCTray : public BOINCCABase
+{
+public:
+
+    CALaunchBOINCTray(MSIHANDLE hMSIHandle);
+    ~CALaunchBOINCTray();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCData.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCData.cpp
new file mode 100644
index 0000000..51c1952
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCData.cpp
@@ -0,0 +1,1124 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAMigrateBOINCData.h"
+#include "dirops.h"
+
+#define CUSTOMACTION_NAME               _T("CAMigrateBOINCData")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Migrate application data to the data directory.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAMigrateBOINCData::CAMigrateBOINCData(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAMigrateBOINCData::~CAMigrateBOINCData()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAMigrateBOINCData::OnInstall()
+{
+    tstring     strCustomActionData;
+    tstring     strMigratingDirectory;
+    tstring     strInstallDirectory;
+    tstring     strDataDirectory;
+    tstring     strMessage;
+    ULONGLONG   ullFileSize = 0;
+    ULONGLONG   ullDirectorySize = 0;
+    ULONGLONG   ullBytesTransfered = 0;
+    UINT        uiReturnValue = -1;
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("CAMigrateBOINCData::OnInstall -- Function Begin")
+    );
+
+    // CustomActionData is a pipe seperated string which contains whether
+    //   this interation of the installer is migrating the BOINC data, the
+    //   installer directory, and the data directory.
+    //
+    // Ex: <MigrationStatus>|<InstallDirectory>|<DataDrectory>
+    //
+    uiReturnValue = GetProperty( _T("CustomActionData"), strCustomActionData );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    strMigratingDirectory = 
+        strCustomActionData.substr(0, strCustomActionData.find(_T("|")));
+
+    strMessage = _T("CAMigrateBOINCData::OnInstall -- strMigratingDirectory: '");
+    strMessage += strMigratingDirectory;
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+    strInstallDirectory = 
+        strCustomActionData.substr(
+            strCustomActionData.find(_T("|")) + 1,
+            strCustomActionData.find(_T("|"), (strCustomActionData.find(_T("|")) + 1)) - 5
+        );
+
+    strMessage = _T("CAMigrateBOINCData::OnInstall -- strInstallDirectory: '");
+    strMessage += strInstallDirectory;
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+    strDataDirectory = 
+        strCustomActionData.substr(strCustomActionData.rfind(_T("|")) + 1, strCustomActionData.length() - strCustomActionData.rfind(_T("|")) - 1);
+
+    strMessage = _T("CAMigrateBOINCData::OnInstall -- strDataDirectory: '");
+    strMessage += strDataDirectory;
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+
+    // Are we migrating data?
+    if ( _T("TRUE") == strMigratingDirectory )
+    {
+        // Determine how we should setup the progress bar.
+        GetFileDirectorySizes( strInstallDirectory, ullFileSize, ullDirectorySize );
+
+        // Reset the progress bar
+        MsiRecordSetInteger(m_phProgressRec, 1, 0);
+        MsiRecordSetInteger(m_phProgressRec, 2, (INT)((ullDirectorySize/1024)/1024));
+        MsiRecordSetInteger(m_phProgressRec, 3, 0);
+        MsiProcessMessage(m_hMSIHandle, INSTALLMESSAGE_PROGRESS, m_phProgressRec);
+
+        // Tell the installer to use explicit progress messages.
+        MsiRecordSetInteger(m_phProgressRec, 1, 1);
+        MsiRecordSetInteger(m_phProgressRec, 2, 1);
+        MsiRecordSetInteger(m_phProgressRec, 3, 0);
+        MsiProcessMessage(m_hMSIHandle, INSTALLMESSAGE_PROGRESS, m_phProgressRec);
+
+        // Migrate the data files
+        if (!MoveFiles( strInstallDirectory, strDataDirectory, ullBytesTransfered ))
+        {
+            LogMessage(
+                INSTALLMESSAGE_FATALEXIT,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Failed to migrate BOINC data files to the data directory.")
+                );
+            return ERROR_INSTALL_FAILURE;
+        }
+    }
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("CAMigrateBOINCData::OnInstall -- Function End")
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAMigrateBOINCData::OnRollback()
+{
+    tstring     strCustomActionData;
+    tstring     strMigratingDirectory;
+    tstring     strInstallDirectory;
+    tstring     strDataDirectory;
+    tstring     strMessage;
+    ULONGLONG   ullFileSize = 0;
+    ULONGLONG   ullDirectorySize = 0;
+    ULONGLONG   ullBytesTransfered = 0;
+    UINT        uiReturnValue = -1;
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("CAMigrateBOINCData::OnRollback -- Function Begin")
+    );
+
+    // CustomActionData is a pipe seperated string which contains whether
+    //   this interation of the installer is migrating the BOINC data, the
+    //   installer directory, and the data directory.
+    //
+    // Ex: <MigrationStatus>|<InstallDirectory>|<DataDrectory>
+    //
+    uiReturnValue = GetProperty( _T("CustomActionData"), strCustomActionData );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    strMigratingDirectory = 
+        strCustomActionData.substr(0, strCustomActionData.find(_T("|")));
+
+    strMessage = _T("CAMigrateBOINCData::OnRollback -- strMigratingDirectory: '");
+    strMessage += strMigratingDirectory;
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+    strInstallDirectory = 
+        strCustomActionData.substr(
+            strCustomActionData.find(_T("|")) + 1,
+            strCustomActionData.find(_T("|"), (strCustomActionData.find(_T("|")) + 1)) - 5
+        );
+
+    strMessage = _T("CAMigrateBOINCData::OnRollback -- strInstallDirectory: '");
+    strMessage += strInstallDirectory;
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+    strDataDirectory = 
+        strCustomActionData.substr(strCustomActionData.rfind(_T("|")) + 1, strCustomActionData.length() - strCustomActionData.rfind(_T("|")) - 1);
+
+    strMessage = _T("CAMigrateBOINCData::OnRollback -- strDataDirectory: '");
+    strMessage += strDataDirectory;
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+
+    // Are we migrating data?
+    if ( _T("TRUE") == strMigratingDirectory )
+    {
+        // Determine how we should setup the progress bar.
+        GetFileDirectorySizes( strInstallDirectory, ullFileSize, ullDirectorySize );
+
+        // Reset the progress bar
+        MsiRecordSetInteger(m_phProgressRec, 1, 0);
+        MsiRecordSetInteger(m_phProgressRec, 2, (INT)((ullDirectorySize/1024)/1024));
+        MsiRecordSetInteger(m_phProgressRec, 3, 0);
+        MsiProcessMessage(m_hMSIHandle, INSTALLMESSAGE_PROGRESS, m_phProgressRec);
+
+        // Tell the installer to use explicit progress messages.
+        MsiRecordSetInteger(m_phProgressRec, 1, 1);
+        MsiRecordSetInteger(m_phProgressRec, 2, 1);
+        MsiRecordSetInteger(m_phProgressRec, 3, 0);
+        MsiProcessMessage(m_hMSIHandle, INSTALLMESSAGE_PROGRESS, m_phProgressRec);
+
+        // Migrate the data files back to the original location
+        MoveFiles( strDataDirectory, strInstallDirectory, ullBytesTransfered );
+    }
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("CAMigrateBOINCData::OnRollback -- Function End")
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAMigrateBOINCData::OnExecution()
+{
+    tstring      strCustomActionData;
+    tstring      strCurrentInstallDirectory;
+    tstring      strFutureInstallDirectory;
+    tstring      strCurrentDataDirectory;
+    tstring      strFutureDataDirectory;
+    tstring      strMigration;
+    tstring      strMigrationVersion;
+    tstring      strMigrationDirectory;
+    tstring      strDestinationClientStateFile;
+    tstring      strRemove;
+    tstring      strProductVersion;
+    tstring      strWindowsDirectory;
+    tstring      strWindowsSystemDirectory;
+    tstring      strProgramFilesDirectory;
+    tstring      strSystemDrive;
+    tstring      strVersionWindows64;
+    struct _stat buf;
+    ULONGLONG    ullFileSize = 0;
+    ULONGLONG    ullDirectorySize = 0;
+    ULONGLONG    ullFreeDiskSpace = 0;
+    UINT         uiReturnValue = -1;
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("CAMigrateBOINCData::OnExecution -- Function Begin")
+    );
+
+
+    GetRegistryValue( _T("INSTALLDIR"), strCurrentInstallDirectory );
+
+    uiReturnValue = GetProperty( _T("INSTALLDIR"), strFutureInstallDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("DATADIR"), strFutureDataDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetRegistryValue( _T("MIGRATION"), strMigration );
+    uiReturnValue = GetRegistryValue( _T("MIGRATIONVERSION"), strMigrationVersion );
+    uiReturnValue = GetRegistryValue( _T("MIGRATIONDIR"), strMigrationDirectory );
+
+    uiReturnValue = GetProperty( _T("REMOVE"), strRemove );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ProductVersion"), strProductVersion );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("VersionNT64"), strVersionWindows64 );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("WindowsFolder"), strWindowsDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("WindowsVolume"), strSystemDrive );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    if (strVersionWindows64.length() > 0)
+    {
+        uiReturnValue = GetProperty( _T("System64Folder"), strWindowsSystemDirectory );
+        if ( uiReturnValue ) return uiReturnValue;
+
+        uiReturnValue = GetProperty( _T("ProgramFiles64Folder"), strProgramFilesDirectory );
+        if ( uiReturnValue ) return uiReturnValue;
+    }
+    else
+    {
+        uiReturnValue = GetProperty( _T("SystemFolder"), strWindowsSystemDirectory );
+        if ( uiReturnValue ) return uiReturnValue;
+
+        uiReturnValue = GetProperty( _T("ProgramFilesFolder"), strProgramFilesDirectory );
+        if ( uiReturnValue ) return uiReturnValue;
+    }
+
+
+    // If the REMOVE property is specified, then we are uninstalling BOINC
+    if (strRemove.length())
+    {
+        // If we successfully migrated, and the user is now uninstalling, they
+        //   are probably going back to a 6.x client, so don't migrate the
+        //   data back to the 5.x location.
+        //
+        strMigration = _T("FALSE");
+        strCustomActionData += strMigration + _T("|");
+        strCustomActionData += strMigrationDirectory + _T("|");
+        strCustomActionData += strFutureDataDirectory;
+    }
+    else
+    {
+        strDestinationClientStateFile = strFutureDataDirectory + _T("\\client_state.xml");
+
+        // Perform some basic sanity tests to see if we need to migrate
+        //   anything.
+        BOOL bClientStateExists =
+            (BOOL)(0 == _stat(strDestinationClientStateFile.c_str(), &buf));
+        BOOL bInstallDataSameDirectory = 
+            (BOOL)(strFutureInstallDirectory == strFutureDataDirectory);
+        BOOL bDataDirExistsWithinInstallDir = 
+            (BOOL)(tstring::npos != strFutureDataDirectory.find(strFutureInstallDirectory));
+        BOOL bInstallDirWindowsDirSame = 
+            (BOOL)(strFutureInstallDirectory == strWindowsDirectory);
+        BOOL bDataDirWindowsDirSame = 
+            (BOOL)(strFutureDataDirectory == strWindowsDirectory);
+        BOOL bInstallDirSystemDriveSame = 
+            (BOOL)(strFutureInstallDirectory == strSystemDrive);
+        BOOL bDataDirSystemDriveSame = 
+            (BOOL)(strFutureDataDirectory == strSystemDrive);
+        BOOL bInstallDirWindowsSystemDirSame = 
+            (BOOL)(strFutureInstallDirectory == strWindowsSystemDirectory);
+        BOOL bDataDirWindowsSystemDirSame = 
+            (BOOL)(strFutureDataDirectory == strWindowsSystemDirectory);
+        BOOL bInstallDirProgramFilesDirSame = 
+            (BOOL)(strFutureInstallDirectory == strProgramFilesDirectory);
+        BOOL bDataDirProgramFilesDirSame = 
+            (BOOL)(strFutureDataDirectory == strProgramFilesDirectory);
+
+        if      ( bClientStateExists )
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Data files already exists, skipping migration.")
+            );
+        }
+        else if ( bInstallDataSameDirectory ) 
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Install directory and data directory are the same, skipping migration.")
+            );
+        }
+        else if ( bDataDirExistsWithinInstallDir )
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Data drectory exists within the install directory, skipping migration.")
+            );
+        }
+        else if ( bInstallDirWindowsDirSame )
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Install directory is the same as the Windows directory, skipping migration.")
+            );
+        }
+        else if ( bDataDirWindowsDirSame )
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Data directory is the same as the Windows directory, skipping migration.")
+            );
+        }
+        else if ( bInstallDirSystemDriveSame )
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Install directory is the same as the system drive, skipping migration.")
+            );
+        }
+        else if ( bDataDirSystemDriveSame )
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Data directory is the same as the system drive, skipping migration.")
+            );
+        }
+        else if ( bInstallDirWindowsSystemDirSame )
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Install directory is the same as the Windows system directory, skipping migration.")
+            );
+        }
+        else if ( bDataDirWindowsSystemDirSame )
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Data directory is the same as the Windows system directory, skipping migration.")
+            );
+        }
+        else if ( bInstallDirProgramFilesDirSame )
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Install directory is the same as the program files directory, skipping migration.")
+            );
+        }
+        else if ( bDataDirProgramFilesDirSame )
+        {
+            strMigration = _T("FALSE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Data directory is the same as the program files directory, skipping migration.")
+            );
+        }
+        else
+        {
+            strMigration = _T("TRUE");
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Data files do NOT exist, performing migration.")
+            );
+
+            strMigrationDirectory = strCurrentInstallDirectory + _T("\\client_state.xml");
+            if (0 == _stat(strMigrationDirectory.c_str(), &buf)) {
+                strMigrationDirectory = strCurrentInstallDirectory;
+            } else {
+                strMigrationDirectory = strFutureInstallDirectory;
+            }
+
+            if ( GetFileDirectorySizes( strMigrationDirectory, ullFileSize, ullDirectorySize ) )
+            {
+                // The total amount of disk space required depends on whether or not
+                //   the files in the original location are on the same volume as the
+                //   destination. So do a quick check to see if we have enough disk
+                //   space.
+                if (!GetFreeDiskSpace(strFutureDataDirectory, ullFreeDiskSpace))
+                {
+                    // If the destination directory doesn't exist, try the parent
+                    //   directory
+                    tstring strBuffer = tstring(strFutureDataDirectory + _T("..\\"));
+                    if (!GetFreeDiskSpace(strBuffer, ullFreeDiskSpace))
+                    {
+                        // If the parent directory doesn't exist, just choose
+                        //   the default volume. Something is better than nothing
+                        GetFreeDiskSpace(tstring(""), ullFreeDiskSpace);
+                    }
+                }
+
+
+                // Are we on the same volume?
+                if (strMigrationDirectory.substr(0, 2) == strFutureDataDirectory.substr(0, 2))
+                {
+                    // We only need the amount of free space as the largest file
+                    //   that is going to be transfered.
+                    if (ullFileSize > ullFreeDiskSpace)
+                    {
+                        LogMessage(
+                            INSTALLMESSAGE_INFO,
+                            NULL, 
+                            NULL,
+                            NULL,
+                            NULL,
+                            _T("Not enough free disk space is available to migrate BOINC's data files to\n"
+                               "the new data directory. Please free up some disk space or migrate the files\n"
+                               "manually. (ullFileSize > ullFreeDiskSpace)")
+                        );
+                        return ERROR_INSTALL_FAILURE;
+                    }
+                }
+                else
+                {
+                    // We only need the amount of free space of the directory
+                    //   that is going to be transfered.
+                    if (ullDirectorySize > ullFreeDiskSpace)
+                    {
+                        LogMessage(
+                            INSTALLMESSAGE_INFO,
+                            NULL, 
+                            NULL,
+                            NULL,
+                            NULL,
+                            _T("Not enough free disk space is available to migrate BOINC's data files to\n"
+                               "the new data directory. Please free up some disk space or migrate the files\n"
+                               "manually. (ullDirectorySize > ullFreeDiskSpace)")
+                        );
+                        return ERROR_INSTALL_FAILURE;
+                    }
+                }
+            }
+        }
+
+        // Contruct a '|' delimited string to pass along to the install script
+        //   and rollback script parts of this custom action.
+        strCustomActionData += strMigration + _T("|");
+        strCustomActionData += strMigrationDirectory + _T("|");
+        strCustomActionData += strFutureDataDirectory;
+    }
+
+    SetRegistryValue( _T("MIGRATION"), strMigration );
+    SetRegistryValue( _T("MIGRATIONDIR"), strMigrationDirectory );
+    SetProperty( _T("CAMigrateBOINCDataInstall"), strCustomActionData );
+    SetProperty( _T("CAMigrateBOINCDataRollback"), strCustomActionData );
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("CAMigrateBOINCData::OnExecution -- Function End")
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+BOOL CAMigrateBOINCData::GetFileDirectorySizes( tstring strDirectory, ULONGLONG& ullFileSize, ULONGLONG& ullDirectorySize )
+{
+    WIN32_FIND_DATA ffData;
+    HANDLE          hFind;
+    tstring         csPathMask;
+    tstring         csFullPath;
+    tstring         csNewFullPath;
+    
+    if ( _T("\\") != strDirectory.substr(strDirectory.length() - 1, 1) )
+    {
+        strDirectory += _T("\\");
+    }
+    csPathMask = strDirectory + _T("*.*");
+
+    hFind = FindFirstFile(csPathMask.c_str(), &ffData);
+
+    if (hFind == INVALID_HANDLE_VALUE){
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("CAMigrateBOINCData::GetFileDirectorySizes -- Invalid handle")
+        );
+        return FALSE;
+    }
+    
+    // Calculating Sizes
+    while (hFind && FindNextFile(hFind, &ffData)) 
+    {
+        if( !(ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) 
+        {
+            csFullPath  = strDirectory;
+            csFullPath += ffData.cFileName;
+
+            // Add current file size to the overall directory size
+            ullDirectorySize += ((ffData.nFileSizeHigh * MAXDWORD) + ffData.nFileSizeLow);
+
+            // If this file size is bigger than the one we know about, store it
+            //   for later use.
+            if (ullFileSize < ((ffData.nFileSizeHigh * MAXDWORD) + ffData.nFileSizeLow)) {
+                ullFileSize = ((ffData.nFileSizeHigh * MAXDWORD) + ffData.nFileSizeLow);
+            }
+        }
+        else // it is a directory
+        { 
+            csNewFullPath  = strDirectory;
+            csNewFullPath += ffData.cFileName;
+            csNewFullPath += _T("\\");
+
+            if( (_tcscmp(ffData.cFileName, _T(".")) != 0) &&
+                (_tcscmp(ffData.cFileName, _T("..")) != 0) ) 
+            {
+                GetFileDirectorySizes(csNewFullPath, ullFileSize, ullDirectorySize);
+            }
+        }
+    }
+
+    FindClose(hFind);
+    return TRUE;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+typedef BOOL (CALLBACK* MyGetDiskFreeSpaceEx)(LPCTSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER);
+BOOL CAMigrateBOINCData::GetFreeDiskSpace( tstring strDirectory, ULONGLONG& ullFreeSpace )
+{
+    ULARGE_INTEGER          TotalNumberOfFreeBytes;
+    ULARGE_INTEGER          TotalNumberOfBytes;
+    ULARGE_INTEGER          TotalNumberOfBytesFreeToCaller;
+    DWORD                   dwSectPerClust = NULL;
+    DWORD                   dwBytesPerSect = NULL;
+    DWORD                   dwFreeClusters = NULL;
+    DWORD                   dwTotalClusters = NULL;
+    BOOL                    bReturnValue = FALSE;
+    MyGetDiskFreeSpaceEx    pGetDiskFreeSpaceEx = NULL;
+    TCHAR                   szMessage[2048];
+
+#ifdef _UNICODE
+    pGetDiskFreeSpaceEx = (MyGetDiskFreeSpaceEx)GetProcAddress(
+        GetModuleHandle("kernel32.dll"), "GetDiskFreeSpaceExW"
+    );
+#else
+    pGetDiskFreeSpaceEx = (MyGetDiskFreeSpaceEx)GetProcAddress(
+        GetModuleHandle("kernel32.dll"), "GetDiskFreeSpaceExA"
+    );
+#endif
+
+    _sntprintf(
+        szMessage, 
+        sizeof(szMessage),
+        _T("GetFreeDiskSpace Directory Location: '%s'"),
+        strDirectory.c_str()
+    );
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        szMessage
+    );
+
+    if (pGetDiskFreeSpaceEx) {
+
+        if (0 == strDirectory.length())
+        {
+            bReturnValue = pGetDiskFreeSpaceEx(
+                NULL,
+                &TotalNumberOfBytesFreeToCaller,
+                &TotalNumberOfBytes,
+                &TotalNumberOfFreeBytes
+            );
+        }
+        else
+        {
+            bReturnValue = pGetDiskFreeSpaceEx(
+                strDirectory.c_str(),
+                &TotalNumberOfBytesFreeToCaller,
+                &TotalNumberOfBytes,
+                &TotalNumberOfFreeBytes
+            );
+        }
+
+        _sntprintf(
+            szMessage, 
+            sizeof(szMessage),
+            _T("GetDiskFreeSpaceEx Return Value: '%d'"),
+            bReturnValue
+        );
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            szMessage
+        );
+
+        _sntprintf(
+            szMessage, 
+            sizeof(szMessage),
+            _T("GetDiskFreeSpaceEx GetLastError: '%d'"),
+            GetLastError()
+        );
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            szMessage
+        );
+
+        _sntprintf(
+            szMessage, 
+            sizeof(szMessage),
+            _T("TotalNumberOfFreeBytes: '%I64u'"),
+            TotalNumberOfFreeBytes.QuadPart
+        );
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            szMessage
+        );
+
+        ullFreeSpace = TotalNumberOfFreeBytes.QuadPart;
+
+    }
+    else
+    {
+
+        if (0 == strDirectory.length())
+        {
+            bReturnValue = GetDiskFreeSpace(
+                NULL,
+                &dwSectPerClust,
+                &dwBytesPerSect,
+                &dwFreeClusters,
+                &dwTotalClusters
+            );
+        }
+        else
+        {
+            bReturnValue = GetDiskFreeSpace(
+                strDirectory.c_str(),
+                &dwSectPerClust,
+                &dwBytesPerSect,
+                &dwFreeClusters,
+                &dwTotalClusters
+            );
+        }
+
+        _sntprintf(
+            szMessage, 
+            sizeof(szMessage),
+            _T("GetDiskFreeSpace Return Value: '%d'"),
+            bReturnValue
+        );
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            szMessage
+        );
+
+        _sntprintf(
+            szMessage, 
+            sizeof(szMessage),
+            _T("GetDiskFreeSpace GetLastError: '%d'"),
+            GetLastError()
+        );
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            szMessage
+        );
+
+        ullFreeSpace = dwFreeClusters * dwSectPerClust * dwBytesPerSect;
+    }
+
+    return bReturnValue;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+BOOL CAMigrateBOINCData::MoveFiles( tstring strSourceDirectory, tstring strDestinationDirectory, ULONGLONG& ullBytesTransfered )
+{
+    BOOL bRet = TRUE;
+    WIN32_FIND_DATA ffData;
+    HANDLE hFind;
+    tstring csPathMask;
+    tstring csFullPath;
+    tstring csNewFullPath;
+    tstring strMessage;
+
+    strMessage  = _T("CAMigrateBOINCData::MoveFiles -- Directory: '");
+    strMessage += strSourceDirectory;
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+    // Create the destination cirectory if needed.
+    //
+    CreateDirectory(strDestinationDirectory.c_str(), NULL);
+    
+    if ( _T("\\") != strSourceDirectory.substr(strSourceDirectory.length() - 1, 1) )
+    {
+        strSourceDirectory       += _T("\\");
+    }
+    if ( _T("\\") != strDestinationDirectory.substr(strDestinationDirectory.length() - 1, 1) )
+    {
+        strDestinationDirectory  += _T("\\");
+    }
+    csPathMask                = strSourceDirectory + _T("*.*");
+        
+    hFind = FindFirstFile(csPathMask.c_str(), &ffData);
+
+    if (hFind == INVALID_HANDLE_VALUE){
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("CAMigrateBOINCData::MoveFiles -- Invalid handle")
+        );
+        return FALSE;
+    }
+    
+
+    // Copying all the files
+    while (hFind && FindNextFile(hFind, &ffData)) 
+    {
+        csFullPath    = strSourceDirectory      + ffData.cFileName;
+        csNewFullPath = strDestinationDirectory + ffData.cFileName;
+
+        RemoveReadOnly(csFullPath);
+        RemoveReadOnly(csNewFullPath);
+
+        if( !(ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) 
+        {
+            strMessage  = _T("CAMigrateBOINCData::MoveFiles -- Copy File: '");
+            strMessage += csFullPath.c_str();
+            strMessage += _T("' to '");
+            strMessage += csNewFullPath.c_str();
+            strMessage += _T("'");
+
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                strMessage.c_str()
+            );
+
+            if( !CopyFile(csFullPath.c_str(), csNewFullPath.c_str(), FALSE) ) 
+            {
+                LogMessage(
+                    INSTALLMESSAGE_INFO,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    GetLastError(),
+                    _T("CAMigrateBOINCData::MoveFiles -- Failed to copy original file")
+                );
+                bRet = FALSE;
+            }
+            else
+            {
+                ullBytesTransfered += ((ffData.nFileSizeHigh * MAXDWORD) + ffData.nFileSizeLow);
+
+                // Specify that an update of the progress bar's position in
+                //   this case means to move it forward by one increment.
+                MsiRecordSetInteger(m_phProgressRec, 1, 2);
+                MsiRecordSetInteger(m_phProgressRec, 2, (INT)((ullBytesTransfered/1024)/1024));
+                MsiRecordSetInteger(m_phProgressRec, 3, 0);
+                MsiProcessMessage(m_hMSIHandle, INSTALLMESSAGE_PROGRESS, m_phProgressRec);
+                Sleep(0);
+
+                // Delete the original file when it has been successfully
+                //   copied
+                if( !DeleteFile(csFullPath.c_str()) ) 
+                {
+                    LogMessage(
+                        INSTALLMESSAGE_INFO,
+                        NULL, 
+                        NULL,
+                        NULL,
+                        GetLastError(),
+                        _T("CAMigrateBOINCData::MoveFiles -- Failed to delete original file")
+                    );
+                }
+            }
+        }
+        else // it is a directory -> Copying recursivly
+        { 
+            if( (_tcscmp(ffData.cFileName, _T(".")) != 0) &&
+                (_tcscmp(ffData.cFileName, _T("..")) != 0) && 
+                (!IsDirectoryExcluded(tstring(ffData.cFileName)))) 
+            {
+                if( !MoveFiles(csFullPath, csNewFullPath, ullBytesTransfered) )
+                {
+                    LogMessage(
+                        INSTALLMESSAGE_INFO,
+                        NULL, 
+                        NULL,
+                        NULL,
+                        NULL,
+                        _T("CAMigrateBOINCData::MoveFiles -- Failed to copy drectory")
+                    );
+                    LogMessage(
+                        INSTALLMESSAGE_INFO,
+                        NULL, 
+                        NULL,
+                        NULL,
+                        NULL,
+                        csNewFullPath.c_str()
+                    );
+                    bRet = FALSE;
+                }
+            }
+        }
+    }
+
+    FindClose(hFind);
+
+    RemoveReadOnly(strSourceDirectory);
+	RemoveDirectory(strSourceDirectory.c_str());
+
+    return bRet;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+BOOL CAMigrateBOINCData::IsDirectoryExcluded( tstring strTargetDirectory )
+{
+    DowncaseString(strTargetDirectory);
+    if (StartsWith(strTargetDirectory, tstring("locale"))) return TRUE;
+    if (StartsWith(strTargetDirectory, tstring("skins"))) return TRUE;
+    return FALSE;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    MigrateBOINCData
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall MigrateBOINCData(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAMigrateBOINCData* pCA = new CAMigrateBOINCData(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+const char *BOINC_RCSID_8dca879ada="$Id: CAMigrateBOINCData.cpp 11773 2007-01-05 08:49:02Z rwalton $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCData.h b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCData.h
new file mode 100644
index 0000000..32fb04f
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCData.h
@@ -0,0 +1,53 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAMIGRATEBOINCDATA_H_
+#define _CAMIGRATEBOINCDATA_H_
+
+
+class CAMigrateBOINCData : public BOINCCABase
+{
+public:
+
+    CAMigrateBOINCData(MSIHANDLE hMSIHandle);
+    ~CAMigrateBOINCData();
+
+    virtual UINT OnInstall();
+    virtual UINT OnRollback();
+    virtual UINT OnExecution();
+
+    BOOL GetFileDirectorySizes( tstring strDirectory, ULONGLONG& ullFileSize, ULONGLONG& ullDirectorySize );
+    BOOL GetFreeDiskSpace( tstring strDirectory, ULONGLONG& ullFreeSpace );
+    BOOL MoveFiles( tstring strSourceDirectory, tstring strDestinationDirectory, ULONGLONG& ullBytesTransfered );
+    BOOL IsDirectoryExcluded( tstring strTargetDirectory );
+    inline bool StartsWith( tstring const& s, tstring const& prefix )
+    {
+        return s.substr(0, prefix.size()) == prefix;
+    }
+    inline void DowncaseString(tstring& w) {
+        for (tstring::iterator p = w.begin(); p != w.end(); ++p) {
+            *p = tolower(*p);
+        }
+    }
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataCleanup.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataCleanup.cpp
new file mode 100644
index 0000000..b71a84c
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataCleanup.cpp
@@ -0,0 +1,111 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAMigrateBOINCDataCleanup.h"
+#include "dirops.h"
+
+#define CUSTOMACTION_NAME               _T("CAMigrateBOINCDataCleanup")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Cleanup current installer's version.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAMigrateBOINCDataCleanup::CAMigrateBOINCDataCleanup(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAMigrateBOINCDataCleanup::~CAMigrateBOINCDataCleanup()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAMigrateBOINCDataCleanup::OnExecution()
+{
+    tstring      strMigrationVersion;
+    UINT         uiReturnValue = -1;
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("CAMigrateBOINCDataCleanup::OnExecution -- Function Begin")
+    );
+
+
+    uiReturnValue = SetRegistryValue( _T("MIGRATIONVERSION"), _T("") );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("CAMigrateBOINCDataCleanup::OnExecution -- Function End")
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    MigrateBOINCDataCleanup
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall MigrateBOINCDataCleanup(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAMigrateBOINCDataCleanup* pCA = new CAMigrateBOINCDataCleanup(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataCleanup.h b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataCleanup.h
new file mode 100644
index 0000000..e16a6a7
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataCleanup.h
@@ -0,0 +1,38 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAMIGRATEBOINCDATACLEANUP_H_
+#define _CAMIGRATEBOINCDATACLEANUP_H_
+
+
+class CAMigrateBOINCDataCleanup : public BOINCCABase
+{
+public:
+
+    CAMigrateBOINCDataCleanup(MSIHANDLE hMSIHandle);
+    ~CAMigrateBOINCDataCleanup();
+
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataVersion.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataVersion.cpp
new file mode 100644
index 0000000..544a245
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataVersion.cpp
@@ -0,0 +1,114 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAMigrateBOINCDataVersion.h"
+#include "dirops.h"
+
+#define CUSTOMACTION_NAME               _T("CAMigrateBOINCDataVersion")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Store current installer's version.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAMigrateBOINCDataVersion::CAMigrateBOINCDataVersion(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAMigrateBOINCDataVersion::~CAMigrateBOINCDataVersion()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAMigrateBOINCDataVersion::OnExecution()
+{
+    tstring      strMigrationVersion;
+    UINT         uiReturnValue = -1;
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("CAMigrateBOINCDataVersion::OnExecution -- Function Begin")
+    );
+
+
+    uiReturnValue = GetProperty( _T("ProductVersion"), strMigrationVersion );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = SetRegistryValue( _T("MIGRATIONVERSION"), strMigrationVersion );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("CAMigrateBOINCDataVersion::OnExecution -- Function End")
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    MigrateBOINCDataVersion
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall MigrateBOINCDataVersion(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAMigrateBOINCDataVersion* pCA = new CAMigrateBOINCDataVersion(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataVersion.h b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataVersion.h
new file mode 100644
index 0000000..41e4c54
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAMigrateBOINCDataVersion.h
@@ -0,0 +1,38 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAMIGRATEBOINCDATAVERSION_H_
+#define _CAMIGRATEBOINCDATAVERSION_H_
+
+
+class CAMigrateBOINCDataVersion : public BOINCCABase
+{
+public:
+
+    CAMigrateBOINCDataVersion(MSIHANDLE hMSIHandle);
+    ~CAMigrateBOINCDataVersion();
+
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAMigratex86x64.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAMigratex86x64.cpp
new file mode 100644
index 0000000..be96320
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAMigratex86x64.cpp
@@ -0,0 +1,124 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAMigratex86x64.h"
+
+#define CUSTOMACTION_NAME               _T("CAMigratex86x64")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Move application data from the 32-bit software location to the 64-bit software location.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAMigrateX86X64::CAMigrateX86X64(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAMigrateX86X64::~CAMigrateX86X64()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAMigrateX86X64::OnExecution()
+{
+    typedef BOOL (WINAPI *tMFE)( LPCTSTR lpExistingFileName, LPCTSTR lpNewFileName, DWORD dwFlags );
+
+    tstring     strInstallDirectory;
+    UINT        uiReturnValue = -1;
+    BOOL        bReturnValue = FALSE;
+    HMODULE     hKernel32Lib = NULL;
+    tMFE        pMFE = NULL;
+
+
+    // Dynamically link to the proper function pointers.
+    hKernel32Lib = GetModuleHandle("kernel32.dll");
+#ifdef _UNICODE
+    pMFE = (tMFE) GetProcAddress( hKernel32Lib, "MoveFileExW" );
+#else
+    pMFE = (tMFE) GetProcAddress( hKernel32Lib, "MoveFileExA" );
+#endif
+
+    if (pMFE) {
+        uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory );
+        if ( uiReturnValue ) return uiReturnValue;
+
+        bReturnValue = pMFE(
+            _T("C:\\Program Files (x86)\\BOINC"),
+            strInstallDirectory.c_str(),
+            MOVEFILE_COPY_ALLOWED|MOVEFILE_WRITE_THROUGH 
+        );
+        if ( bReturnValue )
+        {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("BOINC files have been migrated to the 64-bit installation directory.")
+            );
+        }
+    }
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    MigrateX86X64
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall MigrateX86X64(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAMigrateX86X64* pCA = new CAMigrateX86X64(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+const char *BOINC_RCSID_7dca879ada="$Id: CAMigrateX86X64.cpp 11773 2007-01-05 08:49:02Z rwalton $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAMigratex86x64.h b/win_build/installerv2/redist/Windows/src/boinccas/CAMigratex86x64.h
new file mode 100644
index 0000000..41235b6
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAMigratex86x64.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAMIGRATEX86X64_H_
+#define _CAMIGRATEX86X64_H_
+
+
+class CAMigrateX86X64 : public BOINCCABase
+{
+public:
+
+    CAMigrateX86X64(MSIHANDLE hMSIHandle);
+    ~CAMigrateX86X64();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CARestoreExecutionState.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CARestoreExecutionState.cpp
new file mode 100644
index 0000000..af1cda1
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CARestoreExecutionState.cpp
@@ -0,0 +1,99 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CARestoreExecutionState.h"
+
+#define CUSTOMACTION_NAME               _T("CARestoreExecutionState")
+#define CUSTOMACTION_PROGRESSTITLE      _T("")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CARestoreExecutionState::CARestoreExecutionState(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CARestoreExecutionState::~CARestoreExecutionState()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CARestoreExecutionState::OnExecution()
+{
+    tstring     strLaunchProgram;
+    tstring     strReturnRebootRequested;
+    tstring     strReturnValidateInstall;
+    tstring     strRebootPrompt;
+
+    GetRegistryValue( _T("LAUNCHPROGRAM"), strLaunchProgram );
+    GetRegistryValue( _T("RETURN_REBOOTREQUESTED"), strReturnRebootRequested );
+    GetRegistryValue( _T("REBOOTPROMPT"), strRebootPrompt );
+    GetRegistryValue( _T("RETURN_VALIDATEINSTALL"), strReturnValidateInstall );
+
+    SetProperty( _T("LAUNCHPROGRAM"), strLaunchProgram );
+    SetProperty( _T("RETURN_REBOOTREQUESTED"), strReturnRebootRequested );
+    SetProperty( _T("REBOOTPROMPT"), strRebootPrompt );
+    SetProperty( _T("RETURN_VALIDATEINSTALL"), strReturnValidateInstall );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    RestoreExecutionState
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall RestoreExecutionState(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CARestoreExecutionState* pCA = new CARestoreExecutionState(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CARestoreExecutionState.h b/win_build/installerv2/redist/Windows/src/boinccas/CARestoreExecutionState.h
new file mode 100644
index 0000000..f0eae35
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CARestoreExecutionState.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CARESTOREEXECUTIONSTATE_H_
+#define _CARESTOREEXECUTIONSTATE_H_
+
+
+class CARestoreExecutionState : public BOINCCABase
+{
+public:
+
+    CARestoreExecutionState(MSIHANDLE hMSIHandle);
+    ~CARestoreExecutionState();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CARestoreSetupState.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CARestoreSetupState.cpp
new file mode 100644
index 0000000..fa853b5
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CARestoreSetupState.cpp
@@ -0,0 +1,180 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CARestoreSetupState.h"
+
+#define CUSTOMACTION_NAME               _T("CARestoreSetupState")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Restore the previous setups saved parameters.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CARestoreSetupState::CARestoreSetupState(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CARestoreSetupState::~CARestoreSetupState()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CARestoreSetupState::OnExecution()
+{
+    tstring     strInstallDirectory;
+    tstring     strDataDirectory;
+    tstring     strLaunchProgram;
+    tstring     strEnableLaunchAtLogon;
+    tstring     strEnableScreensaver;
+    tstring     strEnableProtectedApplicationExecution;
+    tstring     strEnableUseByAllUsers;
+    tstring     strOverrideInstallDirectory;
+    tstring     strOverrideDataDirectory;
+    tstring     strOverrideLaunchProgram;
+    tstring     strOverrideEnableLaunchAtLogon;
+    tstring     strOverrideEnableScreensaver;
+    tstring     strOverrideEnableProtectedApplicationExecution;
+    tstring     strOverrideEnableUseByAllUsers;
+
+    tstring     strSetupStateStored;
+
+    GetRegistryValue( _T("SETUPSTATESTORED"), strSetupStateStored );
+    if (strSetupStateStored == _T("TRUE")) {
+
+        GetProperty( _T("OVERRIDE_INSTALLDIR"), strOverrideInstallDirectory );
+        GetProperty( _T("OVERRIDE_DATADIR"), strOverrideDataDirectory );
+        GetProperty( _T("OVERRIDE_LAUNCHPROGRAM"), strOverrideLaunchProgram );
+        GetProperty( _T("OVERRIDE_ENABLELAUNCHATLOGON"), strOverrideEnableLaunchAtLogon );
+        GetProperty( _T("OVERRIDE_ENABLESCREENSAVER"), strOverrideEnableScreensaver );
+        GetProperty( _T("OVERRIDE_ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strOverrideEnableProtectedApplicationExecution );
+        GetProperty( _T("OVERRIDE_ENABLEUSEBYALLUSERS"), strOverrideEnableUseByAllUsers );
+
+        GetRegistryValue( _T("INSTALLDIR"), strInstallDirectory );
+        GetRegistryValue( _T("DATADIR"), strDataDirectory );
+        GetRegistryValue( _T("LAUNCHPROGRAM"), strLaunchProgram );
+        GetRegistryValue( _T("ENABLELAUNCHATLOGON"), strEnableLaunchAtLogon );
+        GetRegistryValue( _T("ENABLESCREENSAVER"), strEnableScreensaver );
+        GetRegistryValue( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strEnableProtectedApplicationExecution );
+        GetRegistryValue( _T("ENABLEUSEBYALLUSERS"), strEnableUseByAllUsers );
+
+        if (strOverrideInstallDirectory.empty()) {
+            SetProperty( _T("INSTALLDIR"), strInstallDirectory );
+        } else {
+            SetProperty( _T("INSTALLDIR"), strOverrideInstallDirectory );
+        }
+
+        if (strOverrideDataDirectory.empty()) {
+            SetProperty( _T("DATADIR"), strDataDirectory );
+        } else {
+            SetProperty( _T("DATADIR"), strOverrideDataDirectory );
+        }
+
+        if (strOverrideLaunchProgram.empty()) {
+            SetProperty( _T("LAUNCHPROGRAM"), strLaunchProgram );
+        } else {
+            SetProperty( _T("LAUNCHPROGRAM"), strOverrideLaunchProgram );
+        }
+
+        if (strOverrideEnableLaunchAtLogon.empty()) {
+            SetProperty( _T("ENABLELAUNCHATLOGON"), strEnableLaunchAtLogon );
+        } else {
+            SetProperty( _T("ENABLELAUNCHATLOGON"), strOverrideEnableLaunchAtLogon );
+        }
+
+        if (strOverrideEnableScreensaver.empty()) {
+            SetProperty( _T("ENABLESCREENSAVER"), strEnableScreensaver );
+        } else {
+            SetProperty( _T("ENABLESCREENSAVER"), strOverrideEnableScreensaver );
+        }
+
+        if (strOverrideEnableProtectedApplicationExecution.empty()) {
+            SetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strEnableProtectedApplicationExecution );
+        } else {
+            SetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strOverrideEnableProtectedApplicationExecution );
+        }
+
+        if (strEnableUseByAllUsers.empty()) {
+            SetProperty( _T("ENABLEUSEBYALLUSERS"), strEnableUseByAllUsers );
+        } else {
+            SetProperty( _T("ENABLEUSEBYALLUSERS"), strOverrideEnableUseByAllUsers );
+        }
+    }
+
+    // If the Data Directory entry is empty then that means we need
+    //   to populate it with the default value.
+    GetProperty( _T("DATADIR"), strDataDirectory );
+    if (strDataDirectory.empty()) {
+        tstring strCommonApplicationDataFolder;
+
+        // MSI already has this figured out, so lets get it.
+        GetProperty( _T("CommonAppDataFolder"), strCommonApplicationDataFolder );
+
+        // Construct the default value
+        strDataDirectory = strCommonApplicationDataFolder + _T("BOINC\\");
+
+        SetProperty( _T("DATADIR"), strDataDirectory );
+    }
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    RestoreSetupState
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall RestoreSetupState(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CARestoreSetupState* pCA = new CARestoreSetupState(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+const char *BOINC_RCSID_7bca879adb="$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CARestoreSetupState.h b/win_build/installerv2/redist/Windows/src/boinccas/CARestoreSetupState.h
new file mode 100644
index 0000000..b8372fb
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CARestoreSetupState.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CARESTORESETUPSTATE_H_
+#define _CARESTORESETUPSTATE_H_
+
+
+class CARestoreSetupState : public BOINCCABase
+{
+public:
+
+    CARestoreSetupState(MSIHANDLE hMSIHandle);
+    ~CARestoreSetupState();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASaveExecutionState.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CASaveExecutionState.cpp
new file mode 100644
index 0000000..9d2acf2
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASaveExecutionState.cpp
@@ -0,0 +1,106 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CASaveExecutionState.h"
+
+#define CUSTOMACTION_NAME               _T("CASaveExecutionState")
+#define CUSTOMACTION_PROGRESSTITLE      _T("")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASaveExecutionState::CASaveExecutionState(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASaveExecutionState::~CASaveExecutionState()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CASaveExecutionState::OnExecution()
+{
+    tstring     strLaunchProgram;
+    tstring     strReturnRebootRequested;
+    tstring     strReturnValidateInstall;
+    tstring     strRebootPrompt;
+
+    GetProperty( _T("LAUNCHPROGRAM"), strLaunchProgram );
+    GetProperty( _T("RETURN_REBOOTREQUESTED"), strReturnRebootRequested );
+    GetProperty( _T("REBOOTPROMPT"), strRebootPrompt );
+    GetProperty( _T("RETURN_VALIDATEINSTALL"), strReturnValidateInstall );
+
+    SetRegistryValue( _T("LAUNCHPROGRAM"), strLaunchProgram );
+    SetRegistryValue( _T("RETURN_REBOOTREQUESTED"), strReturnRebootRequested );
+    SetRegistryValue( _T("REBOOTPROMPT"), strRebootPrompt );
+    SetRegistryValue( _T("RETURN_VALIDATEINSTALL"), strReturnValidateInstall );
+
+    // Disable the ability to launch BOINC Manager if either a reboot is
+    //   requested or validation of the installation executables fails.
+    if ((strReturnRebootRequested == _T("1")) || (strReturnValidateInstall == _T("0")))
+    {
+        SetRegistryValue( _T("LAUNCHPROGRAM"), _T("") );
+    }
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    SaveExecutionState
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall SaveExecutionState(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CASaveExecutionState* pCA = new CASaveExecutionState(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASaveExecutionState.h b/win_build/installerv2/redist/Windows/src/boinccas/CASaveExecutionState.h
new file mode 100644
index 0000000..48b5e38
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASaveExecutionState.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CASAVEEXECUTIONSTATE_H_
+#define _CASAVEEXECUTIONSTATE_H_
+
+
+class CASaveExecutionState : public BOINCCABase
+{
+public:
+
+    CASaveExecutionState(MSIHANDLE hMSIHandle);
+    ~CASaveExecutionState();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASaveSetupState.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CASaveSetupState.cpp
new file mode 100644
index 0000000..6976f45
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASaveSetupState.cpp
@@ -0,0 +1,114 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CASaveSetupState.h"
+
+#define CUSTOMACTION_NAME               _T("CASaveSetupState")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Attempt to rename CPDNBBC installation directory to the default BOINC directory.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASaveSetupState::CASaveSetupState(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASaveSetupState::~CASaveSetupState()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CASaveSetupState::OnExecution()
+{
+    tstring     strInstallDirectory;
+    tstring     strDataDirectory;
+    tstring     strLaunchProgram;
+    tstring     strEnableLaunchAtLogon;
+    tstring     strEnableScreensaver;
+    tstring     strEnableProtectedApplicationExecution;
+    tstring     strEnableUseByAllUsers;
+    tstring     strSetupStateStored;
+
+    strSetupStateStored = _T("TRUE");
+
+    GetProperty( _T("INSTALLDIR"), strInstallDirectory );
+    GetProperty( _T("DATADIR"), strDataDirectory );
+    GetProperty( _T("LAUNCHPROGRAM"), strLaunchProgram );
+    GetProperty( _T("ENABLELAUNCHATLOGON"), strEnableLaunchAtLogon );
+    GetProperty( _T("ENABLESCREENSAVER"), strEnableScreensaver );
+    GetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strEnableProtectedApplicationExecution );
+    GetProperty( _T("ENABLEUSEBYALLUSERS"), strEnableUseByAllUsers );
+
+    SetRegistryValue( _T("INSTALLDIR"), strInstallDirectory );
+    SetRegistryValue( _T("DATADIR"), strDataDirectory );
+    SetRegistryValue( _T("LAUNCHPROGRAM"), strLaunchProgram );
+    SetRegistryValue( _T("ENABLELAUNCHATLOGON"), strEnableLaunchAtLogon );
+    SetRegistryValue( _T("ENABLESCREENSAVER"), strEnableScreensaver );
+    SetRegistryValue( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strEnableProtectedApplicationExecution );
+    SetRegistryValue( _T("ENABLEUSEBYALLUSERS"), strEnableUseByAllUsers );
+    SetRegistryValue( _T("SETUPSTATESTORED"), strSetupStateStored );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    SaveSetupState
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall SaveSetupState(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CASaveSetupState* pCA = new CASaveSetupState(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+const char *BOINC_RCSID_7bca879adc="$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASaveSetupState.h b/win_build/installerv2/redist/Windows/src/boinccas/CASaveSetupState.h
new file mode 100644
index 0000000..8da1add
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASaveSetupState.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CASAVESETUPSTATE_H_
+#define _CASAVESETUPSTATE_H_
+
+
+class CASaveSetupState : public BOINCCABase
+{
+public:
+
+    CASaveSetupState(MSIHANDLE hMSIHandle);
+    ~CASaveSetupState();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINC.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINC.cpp
new file mode 100644
index 0000000..eef0fee
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINC.cpp
@@ -0,0 +1,270 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CASetPermissionBOINC.h"
+#include "dirops.h"
+
+#define CUSTOMACTION_NAME               _T("CASetPermissionBOINC")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Setting permissions on the BOINC Executable directory.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASetPermissionBOINC::CASetPermissionBOINC(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASetPermissionBOINC::~CASetPermissionBOINC()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CASetPermissionBOINC::OnExecution()
+{
+    DWORD                   dwRes = 0;
+    PACL                    pACL = NULL;
+    PACL                    pOldACL = NULL;
+    PSID                    psidEveryone = NULL;
+    PSECURITY_DESCRIPTOR    pSD = NULL;
+    EXPLICIT_ACCESS         ea[3];
+    ULONG                   ulEntries = 2;
+    tstring                 strBOINCAdminsGroupAlias;
+    tstring                 strBOINCUsersGroupAlias;
+    tstring                 strBOINCInstallDirectory;
+    tstring                 strEnableUseByAllUsers;
+    UINT                    uiReturnValue = -1;
+
+    SID_IDENTIFIER_AUTHORITY SIDAuthNT = SECURITY_NT_AUTHORITY;
+    SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
+
+    uiReturnValue = GetProperty( _T("BOINC_ADMINS_GROUPNAME"), strBOINCAdminsGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_USERS_GROUPNAME"), strBOINCUsersGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("INSTALLDIR"), strBOINCInstallDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ENABLEUSEBYALLUSERS"), strEnableUseByAllUsers );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    // Initialize an EXPLICIT_ACCESS structure for all ACEs.
+    ZeroMemory(&ea, 3 * sizeof(EXPLICIT_ACCESS));
+
+    // boinc_admins
+    ea[0].grfAccessPermissions = GENERIC_ALL;
+    ea[0].grfAccessMode = SET_ACCESS;
+    ea[0].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[0].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[0].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[0].Trustee.ptstrName  = (LPTSTR)strBOINCAdminsGroupAlias.c_str();
+
+    // boinc_users
+    ea[1].grfAccessPermissions = GENERIC_READ|GENERIC_EXECUTE;
+    ea[1].grfAccessMode = SET_ACCESS;
+    ea[1].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[1].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[1].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[1].Trustee.ptstrName  = (LPTSTR)strBOINCUsersGroupAlias.c_str();
+
+    // Everyone
+    if (_T("1") == strEnableUseByAllUsers) {
+
+        // Create a well-known SID for the Everyone group.
+        if(!AllocateAndInitializeSid(
+                         &SIDAuthWorld,
+                         1,
+                         SECURITY_WORLD_RID,
+                         0, 0, 0, 0, 0, 0, 0,
+                         &psidEveryone
+          ))
+        {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                GetLastError(),
+                _T("AllocateAndInitializeSid Error for Everyone group")
+            );
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                GetLastError(),
+                _T("AllocateAndInitializeSid Error for Everyone group")
+            );
+        }
+
+        ulEntries = 3;
+
+        ea[2].grfAccessPermissions = GENERIC_READ|GENERIC_EXECUTE;
+        ea[2].grfAccessMode = SET_ACCESS;
+        ea[2].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+        ea[2].Trustee.TrusteeForm = TRUSTEE_IS_SID;
+        ea[2].Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP;
+        ea[2].Trustee.ptstrName  = (LPTSTR)psidEveryone;
+    }
+
+    // Get the old ACL for the directory
+    dwRes = GetNamedSecurityInfo(
+        (LPWSTR)strBOINCInstallDirectory.c_str(),
+        SE_FILE_OBJECT,
+        DACL_SECURITY_INFORMATION,
+        NULL,
+        NULL,
+        &pOldACL,
+        NULL,
+        &pSD
+    );
+    if (ERROR_SUCCESS != dwRes) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("GetNamedSecurityInfo Error")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("GetNamedSecurityInfo Error")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Create a new ACL that contains the new ACEs and merges the old.
+    dwRes = SetEntriesInAcl(ulEntries, &ea[0], pOldACL, &pACL);
+    if (ERROR_SUCCESS != dwRes) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetEntriesInAcl Error")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetEntriesInAcl Error")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Set the ACL on the Data Directory itself.
+    dwRes = SetNamedSecurityInfo( 
+        (LPWSTR)strBOINCInstallDirectory.c_str(),
+        SE_FILE_OBJECT,
+        DACL_SECURITY_INFORMATION,
+        NULL,
+        NULL,
+        pACL,
+        NULL
+    );
+    if (ERROR_SUCCESS != dwRes) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetNamedSecurityInfo Error")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetNamedSecurityInfo Error")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Set ACLs on all files and sub folders.
+    RecursiveSetPermissions(strBOINCInstallDirectory, pACL);
+
+
+    if (pACL) 
+        LocalFree(pACL);
+    if (pSD)
+        LocalFree(pSD);
+    if (psidEveryone)
+        FreeSid(psidEveryone);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    SetPermissionBOINC
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall SetPermissionBOINC(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CASetPermissionBOINC* pCA = new CASetPermissionBOINC(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINC.h b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINC.h
new file mode 100644
index 0000000..9243a40
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINC.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CASETPERMISSIONBOINC_H_
+#define _CASETPERMISSIONBOINC_H_
+
+
+class CASetPermissionBOINC : public BOINCCABase
+{
+public:
+
+    CASetPermissionBOINC(MSIHANDLE hMSIHandle);
+    ~CASetPermissionBOINC();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCData.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCData.cpp
new file mode 100644
index 0000000..b850290
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCData.cpp
@@ -0,0 +1,282 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CASetPermissionBOINCData.h"
+#include "dirops.h"
+
+#define CUSTOMACTION_NAME               _T("CASetPermissionBOINCData")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Setting permissions on the BOINC Data directory.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASetPermissionBOINCData::CASetPermissionBOINCData(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASetPermissionBOINCData::~CASetPermissionBOINCData()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CASetPermissionBOINCData::OnExecution()
+{
+    DWORD               dwRes = 0;
+    PACL                pACL = NULL;
+    PSID                psidAdministrators = NULL;
+    PSID                psidEveryone = NULL;
+    EXPLICIT_ACCESS     ea[5];
+    ULONG               ulEntries = 4;
+    tstring             strBOINCAdminsGroupAlias;
+    tstring             strBOINCUsersGroupAlias;
+    tstring             strBOINCProjectsGroupAlias;
+    tstring             strBOINCDataDirectory;
+    tstring             strEnableUseByAllUsers;
+    UINT                uiReturnValue = -1;
+
+    SID_IDENTIFIER_AUTHORITY SIDAuthNT = SECURITY_NT_AUTHORITY;
+    SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
+
+    uiReturnValue = GetProperty( _T("BOINC_ADMINS_GROUPNAME"), strBOINCAdminsGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_USERS_GROUPNAME"), strBOINCUsersGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_PROJECTS_GROUPNAME"), strBOINCProjectsGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("DATADIR"), strBOINCDataDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ENABLEUSEBYALLUSERS"), strEnableUseByAllUsers );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    // Initialize an EXPLICIT_ACCESS structure for all ACEs.
+    ZeroMemory(&ea, 5 * sizeof(EXPLICIT_ACCESS));
+
+    // Administrators
+    if(!AllocateAndInitializeSid(
+        &SIDAuthNT,
+        2,
+        SECURITY_BUILTIN_DOMAIN_RID,
+        DOMAIN_ALIAS_RID_ADMINS,
+        0, 0, 0, 0, 0, 0,
+        &psidAdministrators))
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("AllocateAndInitializeSid Error for Administrators group")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("AllocateAndInitializeSid Error for Administrators group")
+        );
+    }
+
+    ea[0].grfAccessPermissions = GENERIC_ALL;
+    ea[0].grfAccessMode = SET_ACCESS;
+    ea[0].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[0].Trustee.TrusteeForm = TRUSTEE_IS_SID;
+    ea[0].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[0].Trustee.ptstrName  = (LPTSTR)psidAdministrators;
+
+    // boinc_admins
+    ea[1].grfAccessPermissions = GENERIC_ALL;
+    ea[1].grfAccessMode = SET_ACCESS;
+    ea[1].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[1].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[1].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[1].Trustee.ptstrName  = (LPTSTR)strBOINCAdminsGroupAlias.c_str();
+
+    // boinc_users
+    ea[2].grfAccessPermissions = GENERIC_READ|GENERIC_EXECUTE;
+    ea[2].grfAccessMode = SET_ACCESS;
+    ea[2].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[2].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[2].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[2].Trustee.ptstrName  = (LPTSTR)strBOINCUsersGroupAlias.c_str();
+
+    // boinc_projects
+    ea[3].grfAccessPermissions = FILE_TRAVERSE;
+    ea[3].grfAccessMode = SET_ACCESS;
+    ea[3].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[3].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[3].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[3].Trustee.ptstrName  = (LPTSTR)strBOINCProjectsGroupAlias.c_str();
+
+    // Everyone
+    if (_T("1") == strEnableUseByAllUsers) {
+
+        // Create a well-known SID for the Everyone group.
+        if(!AllocateAndInitializeSid(
+                         &SIDAuthWorld, 1,
+                         SECURITY_WORLD_RID,
+                         0, 0, 0, 0, 0, 0, 0,
+                         &psidEveryone
+          ))
+        {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                GetLastError(),
+                _T("AllocateAndInitializeSid Error for Everyone group")
+            );
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                GetLastError(),
+                _T("AllocateAndInitializeSid Error for Everyone group")
+            );
+        }
+
+        ulEntries = 5;
+
+        ea[4].grfAccessPermissions = GENERIC_READ|GENERIC_EXECUTE;
+        ea[4].grfAccessMode = SET_ACCESS;
+        ea[4].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+        ea[4].Trustee.TrusteeForm = TRUSTEE_IS_SID;
+        ea[4].Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP;
+        ea[4].Trustee.ptstrName  = (LPTSTR)psidEveryone;
+    }
+
+    // Create a new ACL that contains the new ACEs.
+    dwRes = SetEntriesInAcl(ulEntries, &ea[0], NULL, &pACL);
+    if (ERROR_SUCCESS != dwRes) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetEntriesInAcl Error")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetEntriesInAcl Error")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Set the ACL on the Data Directory itself.
+    dwRes = SetNamedSecurityInfo( 
+        (LPWSTR)strBOINCDataDirectory.c_str(),
+        SE_FILE_OBJECT,
+        DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
+        NULL,
+        NULL,
+        pACL,
+        NULL
+    );
+    if (ERROR_SUCCESS != dwRes) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetNamedSecurityInfo Error")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetNamedSecurityInfo Error")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Set ACLs on all files and sub folders.
+    RecursiveSetPermissions(strBOINCDataDirectory, pACL);
+
+
+    if (pACL) 
+        LocalFree(pACL);
+    if (psidAdministrators)
+        FreeSid(psidAdministrators);
+    if (psidEveryone)
+        FreeSid(psidEveryone);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    SetPermissionBOINCData
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall SetPermissionBOINCData(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CASetPermissionBOINCData* pCA = new CASetPermissionBOINCData(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCData.h b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCData.h
new file mode 100644
index 0000000..af93b04
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCData.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CASETPERMISSIONBOINCDATA_H_
+#define _CASETPERMISSIONBOINCDATA_H_
+
+
+class CASetPermissionBOINCData : public BOINCCABase
+{
+public:
+
+    CASetPermissionBOINCData(MSIHANDLE hMSIHandle);
+    ~CASetPermissionBOINCData();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataProjects.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataProjects.cpp
new file mode 100644
index 0000000..5bff818
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataProjects.cpp
@@ -0,0 +1,287 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CASetPermissionBOINCDataProjects.h"
+#include "dirops.h"
+
+#define CUSTOMACTION_NAME               _T("CASetPermissionBOINCDataProjects")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Setting permissions on the BOINC Projects directory.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASetPermissionBOINCDataProjects::CASetPermissionBOINCDataProjects(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASetPermissionBOINCDataProjects::~CASetPermissionBOINCDataProjects()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CASetPermissionBOINCDataProjects::OnExecution()
+{
+    DWORD               dwRes = 0;
+    PACL                pACL = NULL;
+    PSID                psidAdministrators = NULL;
+    PSID                psidEveryone = NULL;
+    EXPLICIT_ACCESS     ea[5];
+    ULONG               ulEntries = 4;
+    tstring             strBOINCAdminsGroupAlias;
+    tstring             strBOINCUsersGroupAlias;
+    tstring             strBOINCProjectsGroupAlias;
+    tstring             strBOINCDataDirectory;
+    tstring             strBOINCDataProjectsDirectory;
+    tstring             strEnableUseByAllUsers;
+    UINT                uiReturnValue = -1;
+
+    SID_IDENTIFIER_AUTHORITY SIDAuthNT = SECURITY_NT_AUTHORITY;
+    SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
+
+    uiReturnValue = GetProperty( _T("BOINC_ADMINS_GROUPNAME"), strBOINCAdminsGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_USERS_GROUPNAME"), strBOINCUsersGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_PROJECTS_GROUPNAME"), strBOINCProjectsGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("DATADIR"), strBOINCDataDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ENABLEUSEBYALLUSERS"), strEnableUseByAllUsers );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    strBOINCDataProjectsDirectory = strBOINCDataDirectory + _T("\\projects");
+
+
+    // Initialize an EXPLICIT_ACCESS structure for all ACEs.
+    ZeroMemory(&ea, 5 * sizeof(EXPLICIT_ACCESS));
+
+    // Administrators
+    if(!AllocateAndInitializeSid(
+        &SIDAuthNT,
+        2,
+        SECURITY_BUILTIN_DOMAIN_RID,
+        DOMAIN_ALIAS_RID_ADMINS,
+        0, 0, 0, 0, 0, 0,
+        &psidAdministrators))
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("AllocateAndInitializeSid Error for Administrators group")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("AllocateAndInitializeSid Error for Administrators group")
+        );
+    }
+
+    ea[0].grfAccessPermissions = GENERIC_ALL;
+    ea[0].grfAccessMode = SET_ACCESS;
+    ea[0].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[0].Trustee.TrusteeForm = TRUSTEE_IS_SID;
+    ea[0].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[0].Trustee.ptstrName  = (LPTSTR)psidAdministrators;
+
+    // boinc_admins
+    ea[1].grfAccessPermissions = GENERIC_ALL;
+    ea[1].grfAccessMode = SET_ACCESS;
+    ea[1].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[1].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[1].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[1].Trustee.ptstrName  = (LPTSTR)strBOINCAdminsGroupAlias.c_str();
+
+    // boinc_users
+    ea[2].grfAccessPermissions = GENERIC_READ|GENERIC_EXECUTE;
+    ea[2].grfAccessMode = SET_ACCESS;
+    ea[2].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[2].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[2].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[2].Trustee.ptstrName  = (LPTSTR)strBOINCUsersGroupAlias.c_str();
+
+    // boinc_projects
+    ea[3].grfAccessPermissions = GENERIC_ALL;
+    ea[3].grfAccessMode = SET_ACCESS;
+    ea[3].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[3].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[3].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[3].Trustee.ptstrName  = (LPTSTR)strBOINCProjectsGroupAlias.c_str();
+
+    // Everyone
+    if (_T("1") == strEnableUseByAllUsers) {
+
+        // Create a well-known SID for the Everyone group.
+        if(!AllocateAndInitializeSid(
+                         &SIDAuthWorld, 1,
+                         SECURITY_WORLD_RID,
+                         0, 0, 0, 0, 0, 0, 0,
+                         &psidEveryone
+          ))
+        {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                GetLastError(),
+                _T("AllocateAndInitializeSid Error for Everyone group")
+            );
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                GetLastError(),
+                _T("AllocateAndInitializeSid Error for Everyone group")
+            );
+        }
+
+        ulEntries = 5;
+
+        ea[4].grfAccessPermissions = GENERIC_READ|GENERIC_EXECUTE;
+        ea[4].grfAccessMode = SET_ACCESS;
+        ea[4].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+        ea[4].Trustee.TrusteeForm = TRUSTEE_IS_SID;
+        ea[4].Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP;
+        ea[4].Trustee.ptstrName  = (LPTSTR)psidEveryone;
+    }
+
+
+    // Create a new ACL that contains the new ACEs.
+    dwRes = SetEntriesInAcl(ulEntries, &ea[0], NULL, &pACL);
+    if (ERROR_SUCCESS != dwRes) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetEntriesInAcl Error")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetEntriesInAcl Error")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Set the ACL on the Data Directory itself.
+    dwRes = SetNamedSecurityInfo( 
+        (LPWSTR)strBOINCDataProjectsDirectory.c_str(),
+        SE_FILE_OBJECT,
+        DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
+        NULL,
+        NULL,
+        pACL,
+        NULL
+    );
+    if (ERROR_SUCCESS != dwRes) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetNamedSecurityInfo Error")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetNamedSecurityInfo Error")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Set ACLs on all files and sub folders.
+    RecursiveSetPermissions(strBOINCDataProjectsDirectory, pACL);
+
+
+    if (pACL) 
+        LocalFree(pACL);
+    if (psidAdministrators)
+        FreeSid(psidAdministrators);
+    if (psidEveryone)
+        FreeSid(psidEveryone);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    SetPermissionBOINCDataProjects
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall SetPermissionBOINCDataProjects(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CASetPermissionBOINCDataProjects* pCA = new CASetPermissionBOINCDataProjects(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataProjects.h b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataProjects.h
new file mode 100644
index 0000000..7d5f8a3
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataProjects.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CASETPERMISSIONBOINCDATAPROJECTS_H_
+#define _CASETPERMISSIONBOINCDATAPROJECTS_H_
+
+
+class CASetPermissionBOINCDataProjects : public BOINCCABase
+{
+public:
+
+    CASetPermissionBOINCDataProjects(MSIHANDLE hMSIHandle);
+    ~CASetPermissionBOINCDataProjects();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataSlots.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataSlots.cpp
new file mode 100644
index 0000000..1709939
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataSlots.cpp
@@ -0,0 +1,287 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CASetPermissionBOINCDataSlots.h"
+#include "dirops.h"
+
+#define CUSTOMACTION_NAME               _T("CASetPermissionBOINCDataSlots")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Setting permissions on the BOINC Slots directory.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASetPermissionBOINCDataSlots::CASetPermissionBOINCDataSlots(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CASetPermissionBOINCDataSlots::~CASetPermissionBOINCDataSlots()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CASetPermissionBOINCDataSlots::OnExecution()
+{
+    DWORD               dwRes = 0;
+    PACL                pACL = NULL;
+    PSID                psidAdministrators = NULL;
+    PSID                psidEveryone = NULL;
+    EXPLICIT_ACCESS     ea[5];
+    ULONG               ulEntries = 4;
+    tstring             strBOINCAdminsGroupAlias;
+    tstring             strBOINCUsersGroupAlias;
+    tstring             strBOINCProjectsGroupAlias;
+    tstring             strBOINCDataDirectory;
+    tstring             strBOINCDataSlotsDirectory;
+    tstring             strEnableUseByAllUsers;
+    UINT                uiReturnValue = -1;
+
+    SID_IDENTIFIER_AUTHORITY SIDAuthNT = SECURITY_NT_AUTHORITY;
+    SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
+
+    uiReturnValue = GetProperty( _T("BOINC_ADMINS_GROUPNAME"), strBOINCAdminsGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_USERS_GROUPNAME"), strBOINCUsersGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("BOINC_PROJECTS_GROUPNAME"), strBOINCProjectsGroupAlias );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("DATADIR"), strBOINCDataDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ENABLEUSEBYALLUSERS"), strEnableUseByAllUsers );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    strBOINCDataSlotsDirectory = strBOINCDataDirectory + _T("\\slots");
+
+
+    // Initialize an EXPLICIT_ACCESS structure for all ACEs.
+    ZeroMemory(&ea, 5 * sizeof(EXPLICIT_ACCESS));
+
+    // Administrators
+    if(!AllocateAndInitializeSid(
+        &SIDAuthNT,
+        2,
+        SECURITY_BUILTIN_DOMAIN_RID,
+        DOMAIN_ALIAS_RID_ADMINS,
+        0, 0, 0, 0, 0, 0,
+        &psidAdministrators))
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("AllocateAndInitializeSid Error for Administrators group")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("AllocateAndInitializeSid Error for Administrators group")
+        );
+    }
+
+    ea[0].grfAccessPermissions = GENERIC_ALL;
+    ea[0].grfAccessMode = SET_ACCESS;
+    ea[0].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[0].Trustee.TrusteeForm = TRUSTEE_IS_SID;
+    ea[0].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[0].Trustee.ptstrName  = (LPTSTR)psidAdministrators;
+
+    // boinc_admins
+    ea[1].grfAccessPermissions = GENERIC_ALL;
+    ea[1].grfAccessMode = SET_ACCESS;
+    ea[1].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[1].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[1].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[1].Trustee.ptstrName  = (LPTSTR)strBOINCAdminsGroupAlias.c_str();
+
+    // boinc_users
+    ea[2].grfAccessPermissions = GENERIC_READ|GENERIC_EXECUTE;
+    ea[2].grfAccessMode = SET_ACCESS;
+    ea[2].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[2].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[2].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[2].Trustee.ptstrName  = (LPTSTR)strBOINCUsersGroupAlias.c_str();
+
+    // boinc_projects
+    ea[3].grfAccessPermissions = GENERIC_ALL;
+    ea[3].grfAccessMode = SET_ACCESS;
+    ea[3].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+    ea[3].Trustee.TrusteeForm = TRUSTEE_IS_NAME;
+    ea[3].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
+    ea[3].Trustee.ptstrName  = (LPTSTR)strBOINCProjectsGroupAlias.c_str();
+
+    // Everyone
+    if (_T("1") == strEnableUseByAllUsers) {
+
+        // Create a well-known SID for the Everyone group.
+        if(!AllocateAndInitializeSid(
+                         &SIDAuthWorld, 1,
+                         SECURITY_WORLD_RID,
+                         0, 0, 0, 0, 0, 0, 0,
+                         &psidEveryone
+          ))
+        {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                GetLastError(),
+                _T("AllocateAndInitializeSid Error for Everyone group")
+            );
+            LogMessage(
+                INSTALLMESSAGE_ERROR,
+                NULL, 
+                NULL,
+                NULL,
+                GetLastError(),
+                _T("AllocateAndInitializeSid Error for Everyone group")
+            );
+        }
+
+        ulEntries = 5;
+
+        ea[4].grfAccessPermissions = GENERIC_READ|GENERIC_EXECUTE;
+        ea[4].grfAccessMode = SET_ACCESS;
+        ea[4].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
+        ea[4].Trustee.TrusteeForm = TRUSTEE_IS_SID;
+        ea[4].Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP;
+        ea[4].Trustee.ptstrName  = (LPTSTR)psidEveryone;
+    }
+
+
+    // Create a new ACL that contains the new ACEs.
+    dwRes = SetEntriesInAcl(ulEntries, &ea[0], NULL, &pACL);
+    if (ERROR_SUCCESS != dwRes) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetEntriesInAcl Error")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetEntriesInAcl Error")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Set the ACL on the Data Directory itself.
+    dwRes = SetNamedSecurityInfo( 
+        (LPWSTR)strBOINCDataSlotsDirectory.c_str(),
+        SE_FILE_OBJECT,
+        DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
+        NULL,
+        NULL,
+        pACL,
+        NULL
+    );
+    if (ERROR_SUCCESS != dwRes) 
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetNamedSecurityInfo Error")
+        );
+        LogMessage(
+            INSTALLMESSAGE_ERROR,
+            NULL, 
+            NULL,
+            NULL,
+            GetLastError(),
+            _T("SetNamedSecurityInfo Error")
+        );
+        return ERROR_INSTALL_FAILURE;
+    }
+
+    // Set ACLs on all files and sub folders.
+    RecursiveSetPermissions(strBOINCDataSlotsDirectory, pACL);
+
+
+    if (pACL) 
+        LocalFree(pACL);
+    if (psidAdministrators)
+        FreeSid(psidAdministrators);
+    if (psidEveryone)
+        FreeSid(psidEveryone);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    SetPermissionBOINCDataSlots
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall SetPermissionBOINCDataSlots(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CASetPermissionBOINCDataSlots* pCA = new CASetPermissionBOINCDataSlots(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataSlots.h b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataSlots.h
new file mode 100644
index 0000000..a4856e2
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CASetPermissionBOINCDataSlots.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CASETPERMISSIONBOINCDATASLOTS_H_
+#define _CASETPERMISSIONBOINCDATASLOTS_H_
+
+
+class CASetPermissionBOINCDataSlots : public BOINCCABase
+{
+public:
+
+    CASetPermissionBOINCDataSlots(MSIHANDLE hMSIHandle);
+    ~CASetPermissionBOINCDataSlots();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp
new file mode 100644
index 0000000..137f70c
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp
@@ -0,0 +1,152 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "terminate.h"
+#include "CAShutdownBOINC.h"
+
+#define CUSTOMACTION_NAME               _T("CAShutdownBOINC")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Shutting down running instances of BOINC")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAShutdownBOINC::CAShutdownBOINC(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAShutdownBOINC::~CAShutdownBOINC()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+
+// OpenSCManager()
+typedef SC_HANDLE (WINAPI *tOSCM)(
+    LPCWSTR lpMachineName,
+    LPCWSTR lpDatabaseName,
+    DWORD   dwDesiredAccess
+);
+
+// OpenService()
+typedef SC_HANDLE (WINAPI *tOS)(
+    SC_HANDLE hSCManager,
+    LPCWSTR   lpServiceName,
+    DWORD     dwDesiredAccess
+);
+
+// ControlService()
+typedef SC_HANDLE (WINAPI *tCS)(
+    SC_HANDLE           hService,
+    DWORD               dwControl,
+    LPSERVICE_STATUS    lpServiceStatus
+);
+
+// QueryServiceStatus()
+typedef BOOL (WINAPI *tQSS)(
+    SC_HANDLE           hService,
+    LPSERVICE_STATUS    lpServiceStatus
+);
+
+UINT CAShutdownBOINC::OnExecution()
+{
+    SC_HANDLE schSCManager = NULL;
+    SC_HANDLE schService = NULL;
+    SERVICE_STATUS ssStatus;
+
+    schSCManager = OpenSCManager( 
+        NULL,                    // local machine 
+        NULL,                    // ServicesActive database 
+        GENERIC_READ);           // full access rights 
+
+    if (schSCManager)
+    {
+        schService = OpenService( 
+            schSCManager,            // SCM database 
+            _T("BOINC"),             // service name
+            GENERIC_READ | GENERIC_EXECUTE); 
+     
+        if (schService) 
+        {
+            if (QueryServiceStatus(schService, &ssStatus))
+            {
+                if (!((SERVICE_STOPPED == ssStatus.dwCurrentState) && 
+                      (SERVICE_STOP_PENDING == ssStatus.dwCurrentState)))
+                {
+                    ControlService(schService, SERVICE_CONTROL_STOP, &ssStatus);
+                }
+            }
+        }
+
+        if (schSCManager)
+            CloseServiceHandle(schSCManager);
+
+        if (schService)
+            CloseServiceHandle(schService);
+    }
+
+    TerminateProcessEx( tstring(_T("boinc.exe")) );
+    TerminateProcessEx( tstring(_T("boinctray.exe")) );
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    ShutdownBOINCManager
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall ShutdownBOINC(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAShutdownBOINC* pCA = new CAShutdownBOINC(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+const char *BOINC_RCSID_7bca879acf="$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.h b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.h
new file mode 100644
index 0000000..23a36d5
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CASHUTDOWNBOINC_H_
+#define _CASHUTDOWNBOINC_H_
+
+
+class CAShutdownBOINC : public BOINCCABase
+{
+public:
+
+    CAShutdownBOINC(MSIHANDLE hMSIHandle);
+    ~CAShutdownBOINC();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCManager.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCManager.cpp
new file mode 100644
index 0000000..4909072
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCManager.cpp
@@ -0,0 +1,144 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#ifdef _UNICODE
+#include "terminate.h"
+#endif
+#include "CAShutdownBOINCManager.h"
+
+#define CUSTOMACTION_NAME               _T("CAShutdownBOINCManager")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Shutting down running instances of BOINC Manager")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAShutdownBOINCManager::CAShutdownBOINCManager(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAShutdownBOINCManager::~CAShutdownBOINCManager()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAShutdownBOINCManager::OnExecution()
+{
+    HWND        hWndBOINCManagerSystray = NULL;
+    TCHAR       szWindowTitle[256];
+    LRESULT     lrReturnValue = NULL;
+    UINT        uiLoopCounter = 0;
+    UINT        uiReturn = -1;
+
+    const UINT WM_TASKBARSHUTDOWN = ::RegisterWindowMessage(_T("TaskbarShutdown"));
+
+#ifdef _UNICODE
+    TerminateProcessEx( tstring(_T("boincmgr.exe")) );
+    TerminateProcessEx( tstring(_T("gridrepublic.exe")) );
+    TerminateProcessEx( tstring(_T("progressthruprocessors.exe")) );
+#endif
+
+    do
+    {
+        hWndBOINCManagerSystray = FindWindow( _T("wxTaskBarExWindowClass"), _T("BOINCManagerSystray") );
+        if ( NULL != hWndBOINCManagerSystray )
+        {
+            GetWindowText( hWndBOINCManagerSystray, szWindowTitle, (sizeof(szWindowTitle) * sizeof(TCHAR)));
+            LogProgress( szWindowTitle );
+
+            lrReturnValue = SendMessage( hWndBOINCManagerSystray, WM_TASKBARSHUTDOWN, NULL, NULL );
+            if ( 0 != lrReturnValue )
+            {
+                LogMessage(
+                    INSTALLMESSAGE_INFO,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    (int)lrReturnValue,
+                    _T("Setup was unable to shutdown the BOINC Manager Systray window.")
+                );
+                return ERROR_INSTALL_FAILURE;
+            }
+            Sleep(1000);
+        }
+        uiLoopCounter++;
+    }
+    while ( (NULL != hWndBOINCManagerSystray) && ( 5 >= uiLoopCounter ) );
+
+    if ( NULL != hWndBOINCManagerSystray )
+    {
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            uiLoopCounter,
+            _T("One or more BOINC Manager applications could not be closed, terminating process(s).")
+        );
+
+    }
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    ShutdownBOINCManager
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall ShutdownBOINCManager(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAShutdownBOINCManager* pCA = new CAShutdownBOINCManager(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+
+const char *BOINC_RCSID_7bca879ace="$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCManager.h b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCManager.h
new file mode 100644
index 0000000..129cbe2
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCManager.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CASHUTDOWNBOINCMANAGER_H_
+#define _CASHUTDOWNBOINCMANAGER_H_
+
+
+class CAShutdownBOINCManager : public BOINCCABase
+{
+public:
+
+    CAShutdownBOINCManager(MSIHANDLE hMSIHandle);
+    ~CAShutdownBOINCManager();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCScreensaver.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCScreensaver.cpp
new file mode 100644
index 0000000..ad56914
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCScreensaver.cpp
@@ -0,0 +1,89 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "terminate.h"
+#include "CAShutdownBOINCScreensaver.h"
+
+#define CUSTOMACTION_NAME               _T("CAShutdownBOINCScreensaver")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Shutting down running instances of BOINC Screensaver")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAShutdownBOINCScreensaver::CAShutdownBOINCScreensaver(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAShutdownBOINCScreensaver::~CAShutdownBOINCScreensaver()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAShutdownBOINCScreensaver::OnExecution()
+{
+    TerminateProcessEx( tstring(_T("boinc.scr")) );
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    ShutdownBOINCScreensaver
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall ShutdownBOINCScreensaver(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAShutdownBOINCScreensaver* pCA = new CAShutdownBOINCScreensaver(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+
+const char *BOINC_RCSID_7bca879acb="$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCScreensaver.h b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCScreensaver.h
new file mode 100644
index 0000000..fb32c71
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINCScreensaver.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CASHUTDOWNBOINCSCREENSAVER_H_
+#define _CASHUTDOWNBOINCSCREENSAVER_H_
+
+
+class CAShutdownBOINCScreensaver : public BOINCCABase
+{
+public:
+
+    CAShutdownBOINCScreensaver(MSIHANDLE hMSIHandle);
+    ~CAShutdownBOINCScreensaver();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownUD.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownUD.cpp
new file mode 100644
index 0000000..a448a76
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownUD.cpp
@@ -0,0 +1,89 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "terminate.h"
+#include "CAShutdownUD.h"
+
+#define CUSTOMACTION_NAME               _T("CAShutdownUD")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Shutting down running instances of United Devices agent")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAShutdownUD::CAShutdownUD(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAShutdownUD::~CAShutdownUD()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+
+UINT CAShutdownUD::OnExecution()
+{
+    TerminateProcessEx( tstring(_T("ud.exe")) );
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    ShutdownUD
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall ShutdownUD(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAShutdownUD* pCA = new CAShutdownUD(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+const char *BOINC_RCSID_7bcb879acf="$Id: CAShutdownUD.cpp 12091 2007-02-15 07:41:13Z rwalton $";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownUD.h b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownUD.h
new file mode 100644
index 0000000..ea081db
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownUD.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CASHUTDOWNUD_H_
+#define _CASHUTDOWNUD_H_
+
+
+class CAShutdownUD : public BOINCCABase
+{
+public:
+
+    CAShutdownUD(MSIHANDLE hMSIHandle);
+    ~CAShutdownUD();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAValidateInstall.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateInstall.cpp
new file mode 100644
index 0000000..f371337
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateInstall.cpp
@@ -0,0 +1,245 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAValidateInstall.h"
+
+#define CUSTOMACTION_NAME               _T("CAValidateInstall")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating the install by checking all executables.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAValidateInstall::CAValidateInstall(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAValidateInstall::~CAValidateInstall()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAValidateInstall::OnExecution()
+{
+    tstring strInstallDirectory;
+    tstring strProductVersion;
+    tstring strFilename;
+    tstring strTemp;
+    UINT    uiReturnValue = 0;
+
+    uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ProductVersion"), strProductVersion );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    // Default to success
+    SetProperty(_T("RETURN_VALIDATEINSTALL"), _T("1"));
+
+    uiReturnValue = GetComponentKeyFilename( _T("_BOINC"), strFilename );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    strTemp = strInstallDirectory + _T("\\") + strFilename;
+    if (!ValidateExecutable( strTemp, strProductVersion ))
+    {
+        SetProperty(_T("RETURN_VALIDATEINSTALL"), _T("0"));
+    }
+
+    uiReturnValue = GetComponentKeyFilename( _T("_BOINCManager"), strFilename );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    strTemp = strInstallDirectory + _T("\\") + strFilename;
+    if (!ValidateExecutable( strTemp, strProductVersion ))
+    {
+        SetProperty(_T("RETURN_VALIDATEINSTALL"), _T("0"));
+    }
+    
+    uiReturnValue = GetComponentKeyFilename( _T("_BOINCCMD"), strFilename );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    strTemp = strInstallDirectory + _T("\\") + strFilename;
+    if (!ValidateExecutable( strTemp, strProductVersion ))
+    {
+        SetProperty(_T("RETURN_VALIDATEINSTALL"), _T("0"));
+    }
+    
+    uiReturnValue = GetComponentKeyFilename( _T("_BOINCTray"), strFilename );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    strTemp = strInstallDirectory + _T("\\") + strFilename;
+    if (!ValidateExecutable( strTemp, strProductVersion ))
+    {
+        SetProperty(_T("RETURN_VALIDATEINSTALL"), _T("0"));
+    }
+
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+BOOL CAValidateInstall::ValidateExecutable( tstring strExecutable, tstring strDesiredVersion )
+{
+    DWORD               dwHandle;
+    LPVOID              lpData;
+    DWORD               dwSize;
+    TCHAR               szQuery[256];
+    LPVOID              lpVar;
+    UINT                uiVarSize;
+    VS_FIXEDFILEINFO*   pFileInfo;
+    TCHAR               szVersionInfo[24];
+    TCHAR               szProductVersion[256];
+    TCHAR               szMessage[2048];
+
+    struct LANGANDCODEPAGE {
+        WORD wLanguage;
+        WORD wCodePage;
+    } *lpTranslate;
+
+
+    _sntprintf(
+        szMessage, 
+        sizeof(szMessage),
+        _T("Validating Executable: '%s' Version: '%s'"),
+        strExecutable.c_str(),
+        strDesiredVersion.c_str()
+    );
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        szMessage
+    );
+
+
+    // Get File Version Information
+    //
+    dwSize = GetFileVersionInfoSize(strExecutable.c_str(), &dwHandle);
+    if (dwSize) {
+        lpData = (LPVOID)malloc(dwSize);
+        if(GetFileVersionInfo(strExecutable.c_str(), dwHandle, dwSize, lpData)) {
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                _T("Executable Found")
+            );
+
+            // Which language should be used to lookup the structure?
+            strcpy(szQuery, _T("\\VarFileInfo\\Translation"));
+            VerQueryValue(lpData, szQuery, (LPVOID*)&lpTranslate, &uiVarSize);
+
+            // Version specified as part of the root record.
+            if (VerQueryValue(lpData, _T("\\"), (LPVOID*)&pFileInfo, &uiVarSize)) {
+                _sntprintf(szVersionInfo, sizeof(szVersionInfo), _T("%d.%d.%d.%d"), 
+                    HIWORD(pFileInfo->dwFileVersionMS),
+                    LOWORD(pFileInfo->dwFileVersionMS),
+                    HIWORD(pFileInfo->dwFileVersionLS),
+                    LOWORD(pFileInfo->dwFileVersionLS)
+                );
+            }
+
+            // Product Version.
+            _stprintf(szQuery, _T("\\StringFileInfo\\%04x%04x\\ProductVersion"),
+                lpTranslate[0].wLanguage,
+                lpTranslate[0].wCodePage
+            );
+            if (VerQueryValue(lpData, szQuery, &lpVar, &uiVarSize)) {
+                uiVarSize = _sntprintf(szProductVersion, sizeof(szProductVersion), _T("%s"), lpVar);
+                if ((sizeof(szProductVersion) == uiVarSize) || (-1 == uiVarSize)) {
+                    szProductVersion[255] = '\0';
+                }
+            }
+
+            _sntprintf(
+                szMessage, 
+                sizeof(szMessage),
+                _T("Product Version: '%s'"),
+                szProductVersion
+            );
+            LogMessage(
+                INSTALLMESSAGE_INFO,
+                NULL, 
+                NULL,
+                NULL,
+                NULL,
+                szMessage
+            );
+            free(lpData);
+        }
+    }
+
+    if (strDesiredVersion != szProductVersion) {
+        return FALSE;
+    }
+    return TRUE;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    ValidateInstall
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall ValidateInstall(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAValidateInstall* pCA = new CAValidateInstall(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAValidateInstall.h b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateInstall.h
new file mode 100644
index 0000000..e66e532
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateInstall.h
@@ -0,0 +1,38 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAVALIDATEINSTALL_H_
+#define _CAVALIDATEINSTALL_H_
+
+
+class CAValidateInstall : public BOINCCABase
+{
+public:
+
+    CAValidateInstall(MSIHANDLE hMSIHandle);
+    ~CAValidateInstall();
+    virtual UINT OnExecution();
+
+    BOOL ValidateExecutable( tstring strExecutable, tstring strDesiredVersion );
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAValidateRebootRequest.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateRebootRequest.cpp
new file mode 100644
index 0000000..78ed957
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateRebootRequest.cpp
@@ -0,0 +1,108 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAValidateRebootRequest.h"
+
+#define CUSTOMACTION_NAME               _T("CAValidateRebootRequest")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating any reboot requests.")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAValidateRebootRequest::CAValidateRebootRequest(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAValidateRebootRequest::~CAValidateRebootRequest()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAValidateRebootRequest::OnExecution()
+{
+    tstring strInstallDirectory;
+    tstring strRebootRequested;
+    tstring strRebootPendingFilename;
+    FILE*   fRebootPending;
+    UINT    uiReturnValue = -1;
+
+
+    uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+
+    // Create reboot pending file
+    //
+    strRebootPendingFilename = strInstallDirectory + _T("\\RebootPending.txt");
+
+    fRebootPending = _tfopen(strRebootPendingFilename.c_str(), _T("wb"));
+    if (fRebootPending) fclose(fRebootPending);
+
+
+    // Schedule the file for deletion after a reboot.
+    //
+    MoveFileEx(strRebootPendingFilename.c_str(), NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
+
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    ValidateRebootRequest
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall ValidateRebootRequest(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAValidateRebootRequest* pCA = new CAValidateRebootRequest(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAValidateRebootRequest.h b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateRebootRequest.h
new file mode 100644
index 0000000..7fd3eef
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateRebootRequest.h
@@ -0,0 +1,36 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAVALIDATEREBOOTREQUEST_H_
+#define _CAVALIDATEREBOOTREQUEST_H_
+
+
+class CAValidateRebootRequest : public BOINCCABase
+{
+public:
+
+    CAValidateRebootRequest(MSIHANDLE hMSIHandle);
+    ~CAValidateRebootRequest();
+    virtual UINT OnExecution();
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAValidateSetupType.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateSetupType.cpp
new file mode 100644
index 0000000..c7db4be
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateSetupType.cpp
@@ -0,0 +1,180 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAValidateSetupType.h"
+
+#define CUSTOMACTION_NAME               _T("CAValidateSetupType")
+#define CUSTOMACTION_PROGRESSTITLE      _T("Validating setup type parameters")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAValidateSetupType::CAValidateSetupType(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAValidateSetupType::~CAValidateSetupType()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAValidateSetupType::OnExecution()
+{
+    tstring strSetupType;
+    tstring strAllUsers;
+    tstring strIsAdminPackage;
+    tstring strInstallDirectory;
+    tstring strDataDirectory;
+    UINT    uiReturnValue = 0;
+
+    uiReturnValue = GetProperty( _T("SETUPTYPE"), strSetupType );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("ALLUSERS"), strAllUsers );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    // When applications are assign to the computer, they are installed at boot
+    //   time.  In this environment ALLUSERS is always set to 1.
+    uiReturnValue = GetProperty( _T("IsAdminPackage"), strIsAdminPackage );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    if ( !strSetupType.empty() )
+    {
+        if ( ( _T("Single") == strSetupType ) )
+        {
+            if ( ( !strAllUsers.empty() ) && ( _T("1") != strIsAdminPackage ) )
+            {
+                LogMessage(
+                    INSTALLMESSAGE_FATALEXIT,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    NULL,
+                    _T("An invalid SETUPTYPE combination has been detected, If SETUPTYPE is 'Single' then ALLUSERS has to be empty.")
+                    );
+                return ERROR_INSTALL_FAILURE;
+            }
+        }
+        else
+        {
+            if ( _T("1") != strAllUsers )
+            {
+                LogMessage(
+                    INSTALLMESSAGE_FATALEXIT,
+                    NULL, 
+                    NULL,
+                    NULL,
+                    NULL,
+                    _T("An invalid SETUPTYPE combination has been detected, If SETUPTYPE is not 'Shared' or 'Service' then ALLUSERS has to equal '1'.")
+                    );
+                return ERROR_INSTALL_FAILURE;
+            }
+        }
+    }
+
+
+    // If the Install Directory entry is empty then that means we need
+    //   to populate it with the default value.
+    GetProperty( _T("INSTALLDIR"), strInstallDirectory );
+    if (strInstallDirectory.empty()) {
+        tstring strVersionNT64;
+        tstring strProgramFilesFolder;
+        tstring strProgramFiles64Folder;
+
+        // MSI already has this figured out, so lets get it.
+        GetProperty( _T("VersionNT64"), strVersionNT64 );
+        GetProperty( _T("ProgramFilesFolder"), strProgramFilesFolder );
+        GetProperty( _T("ProgramFiles64Folder"), strProgramFiles64Folder );
+
+        // Construct the default value
+        if (strVersionNT64.empty()) {
+            strInstallDirectory = strProgramFilesFolder + _T("BOINC\\");
+        } else {
+            strInstallDirectory = strProgramFiles64Folder + _T("BOINC\\");
+        }
+
+        SetProperty( _T("INSTALLDIR"), strInstallDirectory );
+    }
+
+
+    // If the Data Directory entry is empty then that means we need
+    //   to populate it with the default value.
+    GetProperty( _T("DATADIR"), strDataDirectory );
+    if (strDataDirectory.empty()) {
+        tstring strCommonApplicationDataFolder;
+
+        // MSI already has this figured out, so lets get it.
+        GetProperty( _T("CommonAppDataFolder"), strCommonApplicationDataFolder );
+
+        // Construct the default value
+        strDataDirectory = strCommonApplicationDataFolder + _T("BOINC\\");
+
+        SetProperty( _T("DATADIR"), strDataDirectory );
+    }
+
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    ValidateSetupType
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall ValidateSetupType(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAValidateSetupType* pCA = new CAValidateSetupType(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
+
+
+const char *BOINC_RCSID_d533f80c53="$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAValidateSetupType.h b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateSetupType.h
new file mode 100644
index 0000000..5368910
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAValidateSetupType.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _CAVALIDATESETUPTYPE_H_
+#define _CAVALIDATESETUPTYPE_H_
+
+
+class CAValidateSetupType : public BOINCCABase
+{
+public:
+
+    CAValidateSetupType(MSIHANDLE hMSIHandle);
+    ~CAValidateSetupType();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAVerifyInstallDirectories.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAVerifyInstallDirectories.cpp
new file mode 100644
index 0000000..68e0926
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAVerifyInstallDirectories.cpp
@@ -0,0 +1,234 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "CAVerifyInstallDirectories.h"
+
+#define CUSTOMACTION_NAME               _T("CAVerifyInstallDirectories")
+#define CUSTOMACTION_PROGRESSTITLE      _T("")
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAVerifyInstallDirectories::CAVerifyInstallDirectories(MSIHANDLE hMSIHandle) :
+    BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE)
+{}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+CAVerifyInstallDirectories::~CAVerifyInstallDirectories()
+{
+    BOINCCABase::~BOINCCABase();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT CAVerifyInstallDirectories::OnExecution()
+{
+    tstring strInstallDirectory;
+    tstring strDataDirectory;
+    tstring strWindowsDirectory;
+    tstring strWindowsSystemDirectory;
+    tstring strProgramFilesDirectory;
+    tstring strSystemDrive;
+    tstring strVersionWindows64;
+    UINT    uiReturnValue = 0;
+
+
+    uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("DATADIR"), strDataDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("VersionNT64"), strVersionWindows64 );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("WindowsFolder"), strWindowsDirectory );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    uiReturnValue = GetProperty( _T("WindowsVolume"), strSystemDrive );
+    if ( uiReturnValue ) return uiReturnValue;
+
+    if (strVersionWindows64.length() > 0)
+    {
+        uiReturnValue = GetProperty( _T("System64Folder"), strWindowsSystemDirectory );
+        if ( uiReturnValue ) return uiReturnValue;
+
+        uiReturnValue = GetProperty( _T("ProgramFiles64Folder"), strProgramFilesDirectory );
+        if ( uiReturnValue ) return uiReturnValue;
+    }
+    else
+    {
+        uiReturnValue = GetProperty( _T("SystemFolder"), strWindowsSystemDirectory );
+        if ( uiReturnValue ) return uiReturnValue;
+
+        uiReturnValue = GetProperty( _T("ProgramFilesFolder"), strProgramFilesDirectory );
+        if ( uiReturnValue ) return uiReturnValue;
+    }
+
+
+    // Perform some basic sanity tests to see if we need to migrate
+    //   anything.
+    BOOL bInstallDataSameDirectory = 
+        (BOOL)(strInstallDirectory == strDataDirectory);
+    BOOL bInstallDirWindowsDirSame = 
+        (BOOL)(strInstallDirectory == strWindowsDirectory);
+    BOOL bDataDirWindowsDirSame = 
+        (BOOL)(strDataDirectory == strWindowsDirectory);
+    BOOL bInstallDirSystemDriveSame = 
+        (BOOL)(strInstallDirectory == strSystemDrive);
+    BOOL bDataDirSystemDriveSame = 
+        (BOOL)(strDataDirectory == strSystemDrive);
+    BOOL bInstallDirWindowsSystemDirSame = 
+        (BOOL)(strInstallDirectory == strWindowsSystemDirectory);
+    BOOL bDataDirWindowsSystemDirSame = 
+        (BOOL)(strDataDirectory == strWindowsSystemDirectory);
+    BOOL bInstallDirProgramFilesDirSame = 
+        (BOOL)(strInstallDirectory == strProgramFilesDirectory);
+    BOOL bDataDirProgramFilesDirSame = 
+        (BOOL)(strDataDirectory == strProgramFilesDirectory);
+
+
+    if ( bInstallDataSameDirectory ) {
+        DisplayMessage(
+            MB_OK, 
+            MB_ICONERROR,
+            _T("The program directory and data directory must be different. Please select a different data directory.")
+        );
+
+        SetProperty(_T("RETURN_VERIFYINSTALLDIRECTORIES"), _T("0"));
+        uiReturnValue = ERROR_INSTALL_USEREXIT;
+    } else if ( bInstallDirWindowsDirSame ) {
+        DisplayMessage(
+            MB_OK, 
+            MB_ICONERROR,
+            _T("The program directory may not be the Windows directory. Please select a different program directory.")
+        );
+
+        SetProperty(_T("RETURN_VERIFYINSTALLDIRECTORIES"), _T("0"));
+        uiReturnValue = ERROR_INSTALL_USEREXIT;
+    } else if ( bDataDirWindowsDirSame ) {
+        DisplayMessage(
+            MB_OK, 
+            MB_ICONERROR,
+            _T("The data directory may not be the Windows directory. Please select a different data directory.")
+        );
+
+        SetProperty(_T("RETURN_VERIFYINSTALLDIRECTORIES"), _T("0"));
+        uiReturnValue = ERROR_INSTALL_USEREXIT;
+    } else if ( bInstallDirSystemDriveSame ) {
+        DisplayMessage(
+            MB_OK, 
+            MB_ICONERROR,
+            _T("The program directory may not be the system drive. Please select a different program directory.")
+        );
+
+        SetProperty(_T("RETURN_VERIFYINSTALLDIRECTORIES"), _T("0"));
+        uiReturnValue = ERROR_INSTALL_USEREXIT;
+    } else if ( bDataDirSystemDriveSame ) {
+        DisplayMessage(
+            MB_OK, 
+            MB_ICONERROR,
+            _T("The data directory may not be the system drive. Please select a different data directory.")
+        );
+
+        SetProperty(_T("RETURN_VERIFYINSTALLDIRECTORIES"), _T("0"));
+        uiReturnValue = ERROR_INSTALL_USEREXIT;
+    } else if ( bInstallDirWindowsSystemDirSame ) {
+        DisplayMessage(
+            MB_OK, 
+            MB_ICONERROR,
+            _T("The program directory may not be the Windows system directory. Please select a different program directory.")
+        );
+
+        SetProperty(_T("RETURN_VERIFYINSTALLDIRECTORIES"), _T("0"));
+        uiReturnValue = ERROR_INSTALL_USEREXIT;
+    } else if ( bDataDirWindowsSystemDirSame ) {
+        DisplayMessage(
+            MB_OK, 
+            MB_ICONERROR,
+            _T("The data directory may not be the Windows system directory. Please select a different data directory.")
+        );
+
+        SetProperty(_T("RETURN_VERIFYINSTALLDIRECTORIES"), _T("0"));
+        uiReturnValue = ERROR_INSTALL_USEREXIT;
+    } else if ( bInstallDirProgramFilesDirSame ) {
+        DisplayMessage(
+            MB_OK, 
+            MB_ICONERROR,
+            _T("The program directory may not be the program files directory. Please select a different program directory.")
+        );
+
+        SetProperty(_T("RETURN_VERIFYINSTALLDIRECTORIES"), _T("0"));
+        uiReturnValue = ERROR_INSTALL_USEREXIT;
+    } else if ( bDataDirProgramFilesDirSame ) {
+        DisplayMessage(
+            MB_OK, 
+            MB_ICONERROR,
+            _T("The data directory may not be the program files directory. Please select a different data directory.")
+        );
+        SetProperty(_T("RETURN_VERIFYINSTALLDIRECTORIES"), _T("0"));
+        uiReturnValue = ERROR_INSTALL_USEREXIT;
+    } else {
+        SetProperty(_T("RETURN_VERIFYINSTALLDIRECTORIES"), _T("1"));
+        uiReturnValue = ERROR_SUCCESS;
+    }
+
+    return uiReturnValue;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    VerifyInstallDirectories
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT __stdcall VerifyInstallDirectories(MSIHANDLE hInstall)
+{
+    UINT uiReturnValue = 0;
+
+    CAVerifyInstallDirectories* pCA = new CAVerifyInstallDirectories(hInstall);
+    uiReturnValue = pCA->Execute();
+    delete pCA;
+
+    return uiReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAVerifyInstallDirectories.h b/win_build/installerv2/redist/Windows/src/boinccas/CAVerifyInstallDirectories.h
new file mode 100644
index 0000000..6011895
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/CAVerifyInstallDirectories.h
@@ -0,0 +1,37 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+
+#ifndef _CAVERIFYINSTALLDIRECTORIES_H_
+#define _CAVERIFYINSTALLDIRECTORIES_H_
+
+
+class CAVerifyInstallDirectories : public BOINCCABase
+{
+public:
+
+    CAVerifyInstallDirectories(MSIHANDLE hMSIHandle);
+    ~CAVerifyInstallDirectories();
+    virtual UINT OnExecution();
+
+};
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/aclmgmt.cpp b/win_build/installerv2/redist/Windows/src/boinccas/aclmgmt.cpp
new file mode 100644
index 0000000..c65809b
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/aclmgmt.cpp
@@ -0,0 +1,247 @@
+/*++
+
+DCOM Permission Configuration Sample
+Copyright (c) 1996, Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+    aclmgmt.cpp
+
+Abstract:
+
+    Routines to manage access control lists
+
+Author:
+
+    Michael Nelson
+
+Environment:
+
+    Windows NT
+
+--*/
+
+#include "stdafx.h"
+#include "lsaprivs.h"
+#include "ntsecapi.h"
+#include "dcomperm.h"
+
+DWORD
+CopyACL (
+    PACL OldACL,
+    PACL NewACL
+    )
+{
+    ACL_SIZE_INFORMATION  aclSizeInfo;
+    LPVOID                ace = NULL;
+    ACE_HEADER            *aceHeader = NULL;
+    ULONG                 i = 0;
+
+    GetAclInformation (OldACL, (LPVOID) &aclSizeInfo, (DWORD) sizeof (aclSizeInfo), AclSizeInformation);
+
+    //
+    // Copy all of the ACEs to the new ACL
+    //
+
+    for (i = 0; i < aclSizeInfo.AceCount; i++)
+    {
+        //
+        // Get the ACE and header info
+        //
+
+        if (!GetAce (OldACL, i, &ace))
+            return GetLastError();
+
+        aceHeader = (ACE_HEADER *) ace;
+
+        //
+        // Add the ACE to the new list
+        //
+
+        if (!AddAce (NewACL, ACL_REVISION, 0xffffffff, ace, aceHeader->AceSize))
+            return GetLastError();
+    }
+
+    return ERROR_SUCCESS;
+}
+
+DWORD
+AddAccessDeniedACEToACL (
+    PACL *Acl,
+    DWORD PermissionMask,
+    LPTSTR Principal
+    )
+{
+    ACL_SIZE_INFORMATION  aclSizeInfo;
+    int                   aclSize = 0;
+    DWORD                 returnValue = 0;
+    PSID                  principalSID = 0;
+    PACL                  oldACL = NULL, newACL = NULL;
+
+    oldACL = *Acl;
+
+    if (!GetAccountSid(NULL, Principal, &principalSID))
+    {
+        return GetLastError();
+    }
+
+    GetAclInformation (oldACL, (LPVOID) &aclSizeInfo, (DWORD) sizeof (ACL_SIZE_INFORMATION), AclSizeInformation);
+
+    aclSize = aclSizeInfo.AclBytesInUse +
+              sizeof (ACL) + sizeof (ACCESS_DENIED_ACE) +
+              GetLengthSid (principalSID) - sizeof (DWORD);
+
+    newACL = (PACL) new BYTE [aclSize];
+
+    if (!InitializeAcl (newACL, aclSize, ACL_REVISION))
+    {
+        HeapFree(GetProcessHeap(), 0, principalSID);
+        return GetLastError();
+    }
+
+    if (!AddAccessDeniedAce (newACL, ACL_REVISION2, PermissionMask, principalSID))
+    {
+        HeapFree(GetProcessHeap(), 0, principalSID);
+        return GetLastError();
+    }
+
+    returnValue = CopyACL (oldACL, newACL);
+    if (returnValue != ERROR_SUCCESS)
+    {
+        HeapFree(GetProcessHeap(), 0, principalSID);
+        return returnValue;
+    }
+
+    *Acl = newACL;
+
+    if(principalSID != NULL) HeapFree(GetProcessHeap(), 0, principalSID);
+    return ERROR_SUCCESS;
+}
+
+DWORD
+AddAccessAllowedACEToACL (
+    PACL *Acl,
+    DWORD PermissionMask,
+    LPTSTR Principal
+    )
+{
+    ACL_SIZE_INFORMATION  aclSizeInfo;
+    int                   aclSize = 0;
+    DWORD                 returnValue = 0;
+    PSID                  principalSID = NULL;
+    PACL                  oldACL = NULL, newACL = NULL;
+
+    oldACL = *Acl;
+
+    if (!GetAccountSid(NULL, Principal, &principalSID))
+    {
+        return GetLastError();
+    }
+
+    GetAclInformation (oldACL, (LPVOID) &aclSizeInfo, (DWORD) sizeof (ACL_SIZE_INFORMATION), AclSizeInformation);
+
+    aclSize = aclSizeInfo.AclBytesInUse +
+              sizeof (ACL) + sizeof (ACCESS_ALLOWED_ACE) +
+              GetLengthSid (principalSID) - sizeof (DWORD);
+
+    newACL = (PACL) new BYTE [aclSize];
+
+    if (!InitializeAcl (newACL, aclSize, ACL_REVISION))
+    {
+        HeapFree(GetProcessHeap(), 0, principalSID);
+        return GetLastError();
+    }
+
+    returnValue = CopyACL (oldACL, newACL);
+    if (returnValue != ERROR_SUCCESS)
+    {
+        HeapFree(GetProcessHeap(), 0, principalSID);
+        return returnValue;
+    }
+
+    if (!AddAccessAllowedAce (newACL, ACL_REVISION2, PermissionMask, principalSID))
+    {
+        HeapFree(GetProcessHeap(), 0, principalSID);
+        return GetLastError();
+    }
+
+    *Acl = newACL;
+
+    if(principalSID != NULL) HeapFree(GetProcessHeap(), 0, principalSID);
+    return ERROR_SUCCESS;
+}
+
+DWORD
+RemovePrincipalFromACL (
+    PACL Acl,
+    LPTSTR Principal
+    )
+{
+    ACL_SIZE_INFORMATION    aclSizeInfo;
+    ULONG                   i = 0;
+    LPVOID                  ace = NULL;
+    ACCESS_ALLOWED_ACE      *accessAllowedAce = NULL;
+    ACCESS_DENIED_ACE       *accessDeniedAce = NULL;
+    SYSTEM_AUDIT_ACE        *systemAuditAce = NULL;
+    PSID                    principalSID = NULL;
+    DWORD                   returnValue = 0;
+    ACE_HEADER              *aceHeader = NULL;
+
+    if (!GetAccountSid(NULL, Principal, &principalSID))
+    {
+        return GetLastError();
+    }
+
+    GetAclInformation (Acl, (LPVOID) &aclSizeInfo, (DWORD) sizeof (ACL_SIZE_INFORMATION), AclSizeInformation);
+
+    for (i = 0; i < aclSizeInfo.AceCount; i++)
+    {
+        if (!GetAce (Acl, i, &ace))
+        {
+            HeapFree(GetProcessHeap(), 0, principalSID);
+            return GetLastError();
+        }
+
+        aceHeader = (ACE_HEADER *) ace;
+
+        if (aceHeader->AceType == ACCESS_ALLOWED_ACE_TYPE)
+        {
+            accessAllowedAce = (ACCESS_ALLOWED_ACE *) ace;
+
+            if (EqualSid (principalSID, (PSID) &accessAllowedAce->SidStart))
+            {
+                DeleteAce (Acl, i);
+                HeapFree(GetProcessHeap(), 0, principalSID);
+                return ERROR_SUCCESS;
+            }
+        } else
+
+        if (aceHeader->AceType == ACCESS_DENIED_ACE_TYPE)
+        {
+            accessDeniedAce = (ACCESS_DENIED_ACE *) ace;
+
+            if (EqualSid (principalSID, (PSID) &accessDeniedAce->SidStart))
+            {
+                DeleteAce (Acl, i);
+                HeapFree(GetProcessHeap(), 0, principalSID);
+                return ERROR_SUCCESS;
+            }
+        } else
+
+        if (aceHeader->AceType == SYSTEM_AUDIT_ACE_TYPE)
+        {
+            systemAuditAce = (SYSTEM_AUDIT_ACE *) ace;
+
+            if (EqualSid (principalSID, (PSID) &systemAuditAce->SidStart))
+            {
+                DeleteAce (Acl, i);
+                HeapFree(GetProcessHeap(), 0, principalSID);
+                return ERROR_SUCCESS;
+            }
+        }
+    }
+
+    if(principalSID != NULL) HeapFree(GetProcessHeap(), 0, principalSID);
+    return ERROR_SUCCESS;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/boinccas.cpp b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.cpp
new file mode 100644
index 0000000..3554eda
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.cpp
@@ -0,0 +1,928 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "boinccas.h"
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    BOINCCABase::BOINCCABase
+//
+// Description: Initialize the Custom Action infrastructure.
+//
+/////////////////////////////////////////////////////////////////////
+
+BOINCCABase::BOINCCABase(
+    MSIHANDLE hMSIHandle, 
+    const tstring strActionName, 
+    const tstring strProgressTitle
+    )
+{
+
+    // Store the parameters for later use
+    m_hMSIHandle = hMSIHandle;
+    m_strActionName = strActionName;
+    m_strProgressTitle = strProgressTitle;
+
+    // Initialize all other values to zero or null
+	m_phActionStartRec = NULL;
+	m_phActionDataRec = NULL;
+    m_phProgressRec = NULL;
+    m_phLogInfoRec = NULL;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    BOINCCABase::~BOINCCABase
+//
+// Description: Cleanup up allocation resources.
+//
+/////////////////////////////////////////////////////////////////////
+BOINCCABase::~BOINCCABase()
+{
+
+    if (m_phActionStartRec)
+    {
+        MsiCloseHandle(m_phActionStartRec);
+        m_phActionStartRec = NULL;
+    }
+
+    if (m_phActionDataRec)
+    {
+        MsiCloseHandle(m_phActionDataRec);
+        m_phActionDataRec = NULL;
+    }
+
+    if (m_phProgressRec)
+    {
+        MsiCloseHandle(m_phProgressRec);
+        m_phProgressRec = NULL;
+    }
+
+    if (m_phLogInfoRec)
+    {
+        MsiCloseHandle(m_phLogInfoRec);
+        m_phLogInfoRec = NULL;
+    }
+
+    m_strActionName.clear();
+    m_strProgressTitle.clear();
+
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    Execute
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::Execute()
+{
+    UINT    uiReturnValue = 0;
+
+    OnInitialize();
+
+    if      ( TRUE == MsiGetMode( m_hMSIHandle, MSIRUNMODE_SCHEDULED ) )
+    {
+        uiReturnValue = OnInstall();
+    }
+    else if ( TRUE == MsiGetMode( m_hMSIHandle, MSIRUNMODE_COMMIT ) )
+    {
+        uiReturnValue = OnCommit();
+    }
+    else if ( TRUE == MsiGetMode( m_hMSIHandle, MSIRUNMODE_ROLLBACK ) )
+    {
+        uiReturnValue = OnRollback();
+    }
+    else
+    {
+        uiReturnValue = OnExecution();
+    }
+
+    OnCleanup();
+
+    return uiReturnValue;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    OnInitialize
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::OnInitialize()
+{
+    UINT uiReturnValue = 0;
+
+	m_phActionStartRec = MsiCreateRecord(3);
+    assert(NULL != m_phActionStartRec);
+
+    MsiRecordSetString(m_phActionStartRec, 1, m_strActionName.c_str());
+    MsiRecordSetString(m_phActionStartRec, 2, m_strProgressTitle.c_str());
+    MsiRecordSetString(m_phActionStartRec, 3, _T("[1]"));
+    uiReturnValue = MsiProcessMessage(m_hMSIHandle, INSTALLMESSAGE_ACTIONSTART, m_phActionStartRec);
+	if ((uiReturnValue == IDCANCEL))
+		return ERROR_INSTALL_USEREXIT;
+
+    // Give the UI a chance to refresh.
+    Sleep(0);
+
+	m_phActionDataRec = MsiCreateRecord(3);
+    assert(NULL != m_phActionDataRec);
+
+
+    m_phProgressRec = MsiCreateRecord(3);
+    assert(NULL != m_phProgressRec);
+
+    MsiRecordSetInteger(m_phProgressRec, 1, 1);
+    MsiRecordSetInteger(m_phProgressRec, 2, 1);
+    MsiRecordSetInteger(m_phProgressRec, 3, 0);
+    uiReturnValue = MsiProcessMessage(m_hMSIHandle, INSTALLMESSAGE_PROGRESS, m_phProgressRec);
+	if ((uiReturnValue == IDCANCEL))
+		return ERROR_INSTALL_USEREXIT;
+
+
+    m_phLogInfoRec = MsiCreateRecord(3);
+    assert(NULL != m_phLogInfoRec);
+
+    MsiRecordSetString (m_phLogInfoRec, 0, _T("Custom Message : Action Name: [1] Description: [2] Error Code: [3] "));
+    MsiRecordSetString (m_phLogInfoRec, 1, m_strActionName.c_str());
+
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        _T("Starting Custom Action")
+        );
+        
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    OnCleanup
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::OnCleanup()
+{
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    OnInstall
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::OnInstall()
+{
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    OnRollback
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::OnRollback()
+{
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    OnCommit
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::OnCommit()
+{
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    OnExecution
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::OnExecution()
+{
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GetRegistryValue
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::GetRegistryValue( 
+    const tstring strName, 
+    tstring&      strValue,
+    bool          bDisplayValue
+    )
+{
+	LONG lReturnValue;
+	HKEY hkSetupHive;
+	DWORD dwSize = 0;
+    LPTSTR lpszRegistryValue = NULL;
+    tstring strMessage;
+
+	lReturnValue = RegOpenKeyEx(
+        HKEY_LOCAL_MACHINE, 
+        _T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Setup"),  
+		0, 
+        KEY_READ,
+        &hkSetupHive
+    );
+	if (lReturnValue != ERROR_SUCCESS) return ERROR_INSTALL_FAILURE;
+
+    // How large does our buffer need to be?
+    RegQueryValueEx(
+        hkSetupHive,
+        strName.c_str(),
+        NULL,
+        NULL,
+        NULL,
+        &dwSize
+    );
+
+    // Allocate the buffer space.
+    lpszRegistryValue = (LPTSTR) malloc(dwSize);
+    (*lpszRegistryValue) = NULL;
+
+    // Now get the data
+    lReturnValue = RegQueryValueEx( 
+        hkSetupHive,
+        strName.c_str(),
+        NULL,
+        NULL,
+        (LPBYTE)lpszRegistryValue,
+        &dwSize
+    );
+
+    // Send up the returned value.
+    if (lReturnValue == ERROR_SUCCESS) strValue = lpszRegistryValue;
+
+    // Cleanup
+	RegCloseKey(hkSetupHive);
+    free(lpszRegistryValue);
+
+    // One last check to make sure everything is on the up and up.
+    if (lReturnValue != ERROR_SUCCESS) return ERROR_INSTALL_FAILURE;
+
+
+    strMessage  = _T("Successfully retrieved registry value '") + strName;
+    strMessage += _T("' with a value of '");
+    if (bDisplayValue)
+        strMessage += strValue;
+    else
+        strMessage += _T("<Value Hidden>");
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    SetRegistryValue
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::SetRegistryValue( 
+    const tstring strName, 
+    const tstring strValue,
+    bool          bDisplayValue
+    )
+{
+	LONG lReturnValue;
+	HKEY hkSetupHive;
+    tstring strMessage;
+
+	lReturnValue = RegCreateKeyEx(
+        HKEY_LOCAL_MACHINE, 
+        _T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Setup"),  
+		0,
+        NULL,
+        REG_OPTION_NON_VOLATILE,
+        KEY_READ | KEY_WRITE,
+        NULL,
+        &hkSetupHive,
+        NULL
+    );
+	if (lReturnValue != ERROR_SUCCESS) return ERROR_INSTALL_FAILURE;
+
+    lReturnValue = RegSetValueEx(
+        hkSetupHive, 
+        strName.c_str(),
+        0,
+        REG_SZ,
+        (CONST BYTE *)strValue.c_str(),
+        (DWORD)(strValue.size()*sizeof(TCHAR))
+    );
+
+	RegCloseKey(hkSetupHive);
+	if (lReturnValue != ERROR_SUCCESS) return ERROR_INSTALL_FAILURE;
+
+    strMessage  = _T("Successfully set registry value '") + strName;
+    strMessage += _T("' to a value of '");
+    if (bDisplayValue)
+        strMessage += strValue;
+    else
+        strMessage += _T("<Value Hidden>");
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GetProperty
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::GetProperty( 
+    const tstring strPropertyName, 
+    tstring&      strPropertyValue,
+    bool          bDisplayValue
+    )
+{
+    LPTSTR  lpszBuffer = NULL;
+    DWORD   dwCharacterCount = 0;
+    tstring strMessage;
+    UINT    uiReturnValue = 0;
+
+    uiReturnValue = MsiGetProperty(m_hMSIHandle, strPropertyName.c_str(), _T(""), &dwCharacterCount);
+    switch(uiReturnValue)
+    {
+    case ERROR_INVALID_HANDLE:
+    case ERROR_INVALID_PARAMETER:
+        strMessage  = _T("Failed to get '") + strPropertyName;
+        strMessage += _T("'");
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            strMessage.c_str()
+        );
+        return ERROR_INSTALL_FAILURE;
+        break;
+    }
+
+    // Allocate memory for the property value return buffer
+    lpszBuffer = (LPTSTR) malloc( ((++dwCharacterCount)*sizeof(LPTSTR)) );
+    uiReturnValue = MsiGetProperty(m_hMSIHandle, strPropertyName.c_str(), lpszBuffer, &dwCharacterCount);
+    switch(uiReturnValue)
+    {
+    case ERROR_INVALID_HANDLE:
+    case ERROR_INVALID_PARAMETER:
+        strMessage  = _T("Failed to get '") + strPropertyName;
+        strMessage += _T("' after allocating the buffer");
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            strMessage.c_str()
+        );
+        if ( lpszBuffer ) free( lpszBuffer );
+        return ERROR_INSTALL_FAILURE;
+        break;
+    }
+
+    strPropertyValue = lpszBuffer;
+    free( lpszBuffer );
+
+    strMessage  = _T("Successfully retrieved '") + strPropertyName;
+    strMessage += _T("' with a value of '");
+    if (bDisplayValue)
+        strMessage += strPropertyValue;
+    else
+        strMessage += _T("<Value Hidden>");
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    SetProperty
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::SetProperty( 
+    const tstring strPropertyName, 
+    const tstring strPropertyValue,
+    bool          bDisplayValue
+    )
+{
+    tstring strMessage;
+    UINT uiReturnValue = 0;
+
+    uiReturnValue = MsiSetProperty(
+        m_hMSIHandle,
+        strPropertyName.c_str(),
+        strPropertyValue.c_str()
+        );
+    switch(uiReturnValue)
+    {
+    case ERROR_FUNCTION_FAILED:
+    case ERROR_INVALID_HANDLE:
+    case ERROR_INVALID_PARAMETER:
+        strMessage  = _T("Failed to set '") + strPropertyName;
+        strMessage += _T("' to a value of '");
+        if (bDisplayValue)
+            strMessage += strPropertyValue;
+        else
+            strMessage += _T("<Value Hidden>");
+        strMessage += _T("'");
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            strMessage.c_str()
+        );
+        return ERROR_INSTALL_FAILURE;
+        break;
+    }
+
+    strMessage  = _T("Successfully set '") + strPropertyName;
+    strMessage += _T("' to a value of '");
+    if (bDisplayValue)
+        strMessage += strPropertyValue;
+    else
+        strMessage += _T("<Value Hidden>");
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    GetComponentKeyFilename
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::GetComponentKeyFilename( 
+    const tstring strComponentName, 
+    tstring&      strComponentKeyFilename
+    )
+{
+    UINT        uiReturnValue = 0;
+    tstring     strMessage;
+    tstring     strQuery;
+    TCHAR       szBuffer[256];
+    DWORD       dwBufferSize = sizeof(szBuffer);
+    MSIHANDLE   hDatabase;
+    MSIHANDLE   hView;
+    MSIHANDLE   hRecComponentName;
+    MSIHANDLE   hRec;
+
+
+	// Get the handle to the MSI package we are executing for.
+	hDatabase = MsiGetActiveDatabase(m_hMSIHandle);
+	if (!hDatabase) return ERROR_INSTALL_FAILURE;
+
+	// Construct the query that is going to give us the result we need.
+    strQuery  = _T("SELECT `KeyPath` FROM `Component` WHERE `Component`= ?");
+
+	// Create the view
+    uiReturnValue = MsiDatabaseOpenView(hDatabase, strQuery.c_str(), &hView);
+    switch(uiReturnValue)
+    {
+    case ERROR_BAD_QUERY_SYNTAX:
+        MsiCloseHandle(hDatabase);
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiDatabaseOpenView reports an invalid query was issued")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    case ERROR_INVALID_HANDLE:
+        MsiCloseHandle(hDatabase);
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiDatabaseOpenView reports an invalid handle was used")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    }
+
+    // Create query parameter
+    hRecComponentName = MsiCreateRecord(1);
+    uiReturnValue = MsiRecordSetString(hRecComponentName, 1, strComponentName.c_str());
+    switch(uiReturnValue)
+    {
+    case ERROR_INVALID_HANDLE:
+        MsiCloseHandle(hRecComponentName);
+        MsiCloseHandle(hDatabase);
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiRecordSetString reports an invalid handle was used")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    case ERROR_INVALID_PARAMETER:
+        MsiCloseHandle(hRecComponentName);
+        MsiCloseHandle(hDatabase);
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiRecordSetString reports an invalid parameter was used")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    }
+
+
+    // Execute the query
+    uiReturnValue = MsiViewExecute(hView, hRecComponentName);
+    switch(uiReturnValue)
+    {
+    case ERROR_FUNCTION_FAILED:
+        MsiViewClose(hView);
+        MsiCloseHandle(hDatabase);
+        
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiViewExecute failed to execute the view")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    case ERROR_INVALID_HANDLE:
+        MsiViewClose(hView);
+        MsiCloseHandle(hDatabase);
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiViewExecute reports an invalid handle was used")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    }
+
+    // Only one row should be returned by the resultset, so there is no need
+    //   to execute MsiViewFetch more than once.
+    uiReturnValue = MsiViewFetch(hView, &hRec);
+    switch(uiReturnValue)
+    {
+    case ERROR_FUNCTION_FAILED:
+        MsiViewClose(hView);
+        MsiCloseHandle(hDatabase);
+        
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiViewFetch: An error occurred during fetching")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    case ERROR_INVALID_HANDLE:
+        MsiViewClose(hView);
+        MsiCloseHandle(hDatabase);
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiViewFetch reports an invalid handle was used")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    case ERROR_INVALID_HANDLE_STATE:
+        MsiViewClose(hView);
+        MsiCloseHandle(hDatabase);
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiViewFetch reports the handle was in an invalid state")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    }
+
+    // Okay, now it is time to parse the string that was returned.
+    uiReturnValue = MsiRecordGetString(hRec, 1, (LPTSTR)&szBuffer, &dwBufferSize);
+    switch(uiReturnValue)
+    {
+    case ERROR_INVALID_HANDLE:
+        MsiCloseHandle(hRec);
+        MsiViewClose(hView);
+        MsiCloseHandle(hDatabase);
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiRecordGetString reports an invalid handle was used")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    case ERROR_INVALID_PARAMETER:
+        MsiCloseHandle(hRec);
+        MsiViewClose(hView);
+        MsiCloseHandle(hDatabase);
+
+        LogMessage(
+            INSTALLMESSAGE_INFO,
+            NULL, 
+            NULL,
+            NULL,
+            NULL,
+            _T("MsiRecordGetString reports an invalid parameter was used")
+        );
+
+        return ERROR_INSTALL_FAILURE;
+        break;
+    }
+
+    // Save the string
+    strComponentKeyFilename = szBuffer;
+
+    strMessage  = _T("The key filename for component '");
+    strMessage += strComponentName;
+    strMessage += _T("' is '");
+    strMessage += strComponentKeyFilename;
+    strMessage += _T("'");
+
+    LogMessage(
+        INSTALLMESSAGE_INFO,
+        NULL, 
+        NULL,
+        NULL,
+        NULL,
+        strMessage.c_str()
+    );
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    DisplayMessage
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::DisplayMessage(
+    const UINT         uiPushButtonStyle,       // push button sstyle to use in message box
+    const UINT         uiIconStyle,             // icon style to use in message box
+    const tstring      strMessage               // message
+    )
+{
+    UINT        uiReturnValue = 0;
+
+    uiReturnValue = ::MessageBox(
+        NULL, 
+        strMessage.c_str(), 
+        _T("Installer Message"),
+        uiPushButtonStyle | uiIconStyle | MB_SETFOREGROUND | MB_SERVICE_NOTIFICATION
+        );
+
+    return uiReturnValue;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    LogProgress
+//
+// Description: 
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::LogProgress( 
+    const tstring strProgress
+    )
+{
+    UINT uiReturnValue = 0;
+
+    MsiRecordSetString(m_phActionDataRec, 2, strProgress.c_str());
+
+    // returns IDOK if successful
+    uiReturnValue = MsiProcessMessage( m_hMSIHandle, INSTALLMESSAGE_ACTIONDATA, m_phActionDataRec );
+	if ((uiReturnValue == IDCANCEL))
+		return ERROR_INSTALL_USEREXIT;
+
+    // Give the UI a chance to refresh.
+    Sleep(0);
+
+    return ERROR_SUCCESS;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    LogMessage
+//
+// Description: This function writes to the MSI log file and displays
+//              the SetupError dialog box as appropriate.
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::LogMessage(
+    const UINT    uiInstallMessageType,    // message type to send to Windows Installer
+    const UINT    uiPushButtonStyle,       // push button sstyle to use in message box
+    const UINT    uiIconStyle,             // icon style to use in message box
+    const UINT    uiErrorNumber,           // number of error in Error table
+    const UINT    uiErrorCode,             // the return value from an api
+    const tstring strMessage               // message
+    )
+{
+    UINT        uiReturnValue = 0;
+
+    switch(uiInstallMessageType)
+    {
+
+    // Send informational message to the log file
+    case INSTALLMESSAGE_INFO:
+
+        MsiRecordSetString (m_phLogInfoRec, 2, strMessage.c_str());
+        MsiRecordSetInteger(m_phLogInfoRec, 3, uiErrorCode);
+
+        // returns IDOK if successful
+        uiReturnValue = MsiProcessMessage(
+            m_hMSIHandle, 
+            INSTALLMESSAGE(uiInstallMessageType),
+            m_phLogInfoRec
+            );
+        break;
+
+    // Display a dialog and send error message to log file
+    case INSTALLMESSAGE_ERROR:
+    case INSTALLMESSAGE_WARNING:
+    case INSTALLMESSAGE_USER:
+
+        PMSIHANDLE phLogErrorRec = MsiCreateRecord(2);
+
+        MsiRecordSetString (phLogErrorRec, 0, _T("[1]"));
+        MsiRecordSetString (phLogErrorRec, 1, strMessage.c_str());
+
+        // Return value to indicate which button is 
+        // pushed on message box
+        uiReturnValue = MsiProcessMessage(
+            m_hMSIHandle,
+            INSTALLMESSAGE(uiInstallMessageType|uiPushButtonStyle|uiIconStyle),
+            phLogErrorRec
+            );
+        break;
+
+    }
+    return uiReturnValue;
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// 
+// Function:    RebootWhenFinished
+//
+// Description: Reboot computer when setup completes installation.
+//
+/////////////////////////////////////////////////////////////////////
+UINT BOINCCABase::RebootWhenFinished()
+{
+    SetProperty(_T("RETURN_REBOOTREQUESTED"), _T("1"));
+    return MsiSetMode(m_hMSIHandle, MSIRUNMODE_REBOOTATEND, TRUE);
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/boinccas.def b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.def
new file mode 100644
index 0000000..3624a90
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.def
@@ -0,0 +1,32 @@
+;
+; Module definition file for the boinccas.dll
+;
+
+LIBRARY    boinccas
+
+EXPORTS
+	DllMain
+	CreateBOINCAccounts
+	CreateBOINCGroups
+	CreateClientAuthFile
+	GetAdministratorsGroupName
+	GetUsersGroupName
+	GrantBOINCMasterRights
+	GrantBOINCProjectRights
+	ShutdownBOINC
+	ShutdownBOINCManager
+	ShutdownBOINCScreensaver
+	ShutdownUD
+	GrantBOINCAdminsRights
+	GrantBOINCAdminsVirtualBoxRights
+	GrantBOINCUsersRights
+	GrantBOINCProjectsRights
+	GrantBOINCProjectsVirtualBoxRights
+	HideBOINCMasterProfile
+	HideBOINCProjectProfile
+	SetPermissionBOINC
+	SetPermissionBOINCData
+	SetPermissionBOINCDataProjects
+	SetPermissionBOINCDataSlots
+	LaunchBOINCManager
+	LaunchBOINCTray
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/boinccas.h b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.h
new file mode 100644
index 0000000..9462bc8
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.h
@@ -0,0 +1,120 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _BOINCCAS_H_
+#define _BOINCCAS_H_
+
+class BOINCCABase
+{
+public:
+
+    BOINCCABase(
+        MSIHANDLE          hMSIHandle, 
+        const tstring      strActionName,
+        const tstring      strProgressTitle
+        );
+
+    ~BOINCCABase();
+
+
+    // Main Custom Action Execution Routine
+    UINT Execute();
+
+
+    // Overrides
+    virtual UINT OnInitialize();
+    virtual UINT OnCleanup();
+    // Called when we are being executed from the InstallExecutionSequence
+    virtual UINT OnInstall();
+    virtual UINT OnRollback();
+    virtual UINT OnCommit();
+    // Called when we are being executed from the InstallUISequence
+    virtual UINT OnExecution();
+
+
+    // Registry Property Management
+    UINT GetRegistryValue( 
+        const tstring      strName, 
+        tstring&           strValue,
+        bool               bDisplayValue = true
+        );
+
+    UINT SetRegistryValue( 
+        const tstring      strName, 
+        const tstring      strValue,
+        bool               bDisplayValue = true
+        );
+
+    // MSI Property Management
+    UINT GetProperty( 
+        const tstring      strPropertyName, 
+        tstring&           strPropertyValue,
+        bool               bDisplayValue = true
+        );
+
+    UINT SetProperty( 
+        const tstring      strPropertyName, 
+        const tstring      strPropertyValue,
+        bool               bDisplayValue = true
+        );
+
+	// MSI Database Management
+    UINT GetComponentKeyFilename(
+        const tstring      strComponentName, 
+        tstring&           strComponentKeyFilename
+		);
+
+    // MSI UI Dialog Management
+    UINT DisplayMessage(
+        const UINT         uiPushButtonStyle,       // push button style to use in message box
+        const UINT         uiIconStyle,             // icon style to use in message box
+        const tstring      strMessage               // message
+        );
+
+    // MSI Logging Management
+    UINT LogProgress(
+        const tstring      strProgress              // message to display
+        );
+
+    UINT LogMessage(
+        const UINT         uiInstallMessageType,    // message type to send to Windows Installer
+        const UINT         uiPushButtonStyle,       // push button sstyle to use in message box
+        const UINT         uiIconStyle,             // icon style to use in message box
+        const UINT         uiErrorNumber,           // number of error in Error table
+        const UINT         uiErrorCode,             // the return value from an api
+        const tstring      strMessage               // message
+        );
+
+    // Reboot machine when setup has completed.
+    UINT RebootWhenFinished();
+
+protected:
+    MSIHANDLE   m_hMSIHandle;
+	PMSIHANDLE  m_phActionStartRec;
+	PMSIHANDLE  m_phActionDataRec;
+    PMSIHANDLE  m_phProgressRec;
+    PMSIHANDLE  m_phLogInfoRec;
+
+    tstring     m_strActionName;
+    tstring     m_strProgressTitle;
+};
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/boinccas.rc b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.rc
new file mode 100644
index 0000000..dfbb5b3
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.rc
@@ -0,0 +1,101 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,165
+ PRODUCTVERSION 1,0,0,165
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "FileDescription", "BOINC Dynamic Link Library"
+            VALUE "FileVersion", "1.0.0.165"
+            VALUE "InternalName", "BOINC"
+            VALUE "LegalCopyright", "Copyright (C) 2005-2011"
+            VALUE "OriginalFilename", "BOINC.dll"
+            VALUE "ProductName", " BOINC Dynamic Link Library"
+            VALUE "ProductVersion", "1.0.0.165"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/boinccas.sln b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.sln
new file mode 100644
index 0000000..f7039c8
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.sln
@@ -0,0 +1,35 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BOINCCAS", "boinccas.vcproj", "{49723CA5-DA05-43C0-93AB-6FD30D046919}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BOINCCAS95", "boinccas95.vcproj", "{49723CA5-DA05-43C0-93AB-6FD30D046910}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{49723CA5-DA05-43C0-93AB-6FD30D046919}.Debug|Win32.ActiveCfg = Debug|Win32
+		{49723CA5-DA05-43C0-93AB-6FD30D046919}.Debug|Win32.Build.0 = Debug|Win32
+		{49723CA5-DA05-43C0-93AB-6FD30D046919}.Debug|x64.ActiveCfg = Debug|x64
+		{49723CA5-DA05-43C0-93AB-6FD30D046919}.Debug|x64.Build.0 = Debug|x64
+		{49723CA5-DA05-43C0-93AB-6FD30D046919}.Release|Win32.ActiveCfg = Release|Win32
+		{49723CA5-DA05-43C0-93AB-6FD30D046919}.Release|Win32.Build.0 = Release|Win32
+		{49723CA5-DA05-43C0-93AB-6FD30D046919}.Release|x64.ActiveCfg = Release|x64
+		{49723CA5-DA05-43C0-93AB-6FD30D046919}.Release|x64.Build.0 = Release|x64
+		{49723CA5-DA05-43C0-93AB-6FD30D046910}.Debug|Win32.ActiveCfg = Debug|Win32
+		{49723CA5-DA05-43C0-93AB-6FD30D046910}.Debug|Win32.Build.0 = Debug|Win32
+		{49723CA5-DA05-43C0-93AB-6FD30D046910}.Debug|x64.ActiveCfg = Debug|x64
+		{49723CA5-DA05-43C0-93AB-6FD30D046910}.Debug|x64.Build.0 = Debug|x64
+		{49723CA5-DA05-43C0-93AB-6FD30D046910}.Release|Win32.ActiveCfg = Release|Win32
+		{49723CA5-DA05-43C0-93AB-6FD30D046910}.Release|Win32.Build.0 = Release|Win32
+		{49723CA5-DA05-43C0-93AB-6FD30D046910}.Release|x64.ActiveCfg = Release|x64
+		{49723CA5-DA05-43C0-93AB-6FD30D046910}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/boinccas.vcproj b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.vcproj
new file mode 100644
index 0000000..ef77957
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.vcproj
@@ -0,0 +1,722 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BOINCCAS"
+	ProjectGUID="{49723CA5-DA05-43C0-93AB-6FD30D046919}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;BOINCCAS_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="atls.lib msi.lib libcmtd.lib libcpmtd.lib delayimp.lib netapi32.lib advapi32.lib kernel32.lib user32.lib version.lib"
+				OutputFile="$(OutDir)/boinccas.dll"
+				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="true"
+				ModuleDefinitionFile="boinccas.def"
+				DelayLoadDLLs="netapi32.dll;advapi32.dll"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/boinccas.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/boinccas.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;BOINCCAS_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="atls.lib msi.lib libcmtd.lib libcpmtd.lib delayimp.lib netapi32.lib advapi32.lib kernel32.lib user32.lib version.lib"
+				OutputFile="$(OutDir)/boinccas.dll"
+				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="true"
+				ModuleDefinitionFile="boinccas.def"
+				DelayLoadDLLs="netapi32.dll;advapi32.dll"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/boinccas.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/boinccas.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="1"
+			ATLMinimizesCRunTimeLibraryUsage="true"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BOINCCAS_EXPORTS"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="atls.lib msi.lib libcmt.lib libcpmt.lib delayimp.lib netapi32.lib advapi32.lib kernel32.lib user32.lib"
+				OutputFile="$(OutDir)/boinccas.dll"
+				LinkIncremental="1"
+				IgnoreAllDefaultLibraries="true"
+				ModuleDefinitionFile="boinccas.def"
+				DelayLoadDLLs="netapi32.dll;advapi32.dll"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/boinccas.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/boinccas.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BOINCCAS_EXPORTS"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="atls.lib msi.lib libcmt.lib libcpmt.lib delayimp.lib netapi32.lib advapi32.lib kernel32.lib user32.lib version.lib"
+				OutputFile="$(OutDir)/boinccas.dll"
+				LinkIncremental="1"
+				IgnoreAllDefaultLibraries="true"
+				ModuleDefinitionFile="boinccas.def"
+				DelayLoadDLLs="netapi32.dll;advapi32.dll"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/boinccas.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/boinccas.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+			>
+			<File
+				RelativePath=".\aclmgmt.cpp"
+				>
+			</File>
+			<File
+				RelativePath="boinccas.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CACreateBOINCAccounts.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CACreateBOINCGroups.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CACreateClientAuthFile.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGetAdministratorsGroupName.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGetUsersGroupName.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCAdminsRights.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCAdminsVirtualBoxRights.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCMasterRights.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCProjectRights.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCProjectsRights.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCProjectsVirtualBoxRights.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCUsersRights.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAHideBOINCMasterProfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAHideBOINCProjectProfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CALaunchBOINCManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CALaunchBOINCTray.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CASetPermissionBOINC.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CASetPermissionBOINCData.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CASetPermissionBOINCDataProjects.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CASetPermissionBOINCDataSlots.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAShutdownBOINC.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAShutdownBOINCManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAShutdownBOINCScreensaver.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAShutdownUD.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dirops.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\launcher.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\listacl.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\lkuprid.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\lsaprivs.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\main.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\password.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\sdmgmt.cpp"
+				>
+			</File>
+			<File
+				RelativePath="stdafx.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\terminate.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\utils.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\wrappers.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc"
+			>
+			<File
+				RelativePath=".\boinccas.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CACreateBOINCAccounts.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CACreateBOINCGroups.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CACreateClientAuthFile.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGetAdministratorsGroupName.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGetUsersGroupName.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCAdminsRights.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCAdminsVirtualBoxRights.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCMasterRights.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCProjectRights.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCProjectsRights.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCProjectsVirtualBoxRights.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAGrantBOINCUsersRights.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAHideBOINCMasterProfile.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAHideBOINCProjectProfile.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CALaunchBOINCManager.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CALaunchBOINCTray.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CASetPermissionBOINC.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CASetPermissionBOINCData.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CASetPermissionBOINCDataProjects.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CASetPermissionBOINCDataSlots.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAShutdownBOINC.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAShutdownBOINCManager.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAShutdownBOINCScreensaver.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAShutdownUD.h"
+				>
+			</File>
+			<File
+				RelativePath=".\dcomperm.h"
+				>
+			</File>
+			<File
+				RelativePath=".\dirops.h"
+				>
+			</File>
+			<File
+				RelativePath=".\launcher.h"
+				>
+			</File>
+			<File
+				RelativePath=".\lkuprid.h"
+				>
+			</File>
+			<File
+				RelativePath=".\lsaprivs.h"
+				>
+			</File>
+			<File
+				RelativePath=".\main.h"
+				>
+			</File>
+			<File
+				RelativePath=".\password.h"
+				>
+			</File>
+			<File
+				RelativePath=".\resource.h"
+				>
+			</File>
+			<File
+				RelativePath="stdafx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\terminate.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="boinccas.def"
+				>
+			</File>
+			<File
+				RelativePath=".\boinccas.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/boinccas95.def b/win_build/installerv2/redist/Windows/src/boinccas/boinccas95.def
new file mode 100644
index 0000000..9474c46
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/boinccas95.def
@@ -0,0 +1,26 @@
+;
+; Module definition file for the boinccas95.dll
+;
+
+LIBRARY    boinccas95
+
+EXPORTS
+	DllMain
+	ValidateSetupType
+	MigrateBOINCData
+	MigrateBOINCDataVersion
+	MigrateBOINCDataCleanup
+	MigrateX86X64
+	RestoreSetupState
+	SaveSetupState
+	ShutdownBOINCManager
+	CleanupOldBinaries
+	VerifyInstallDirectories
+    ValidateInstall
+    ValidateRebootRequest
+    SaveExecutionState
+    RestoreExecutionState
+    CCConfigMd5sum
+    CreateProjectInitFile
+    CreateAcctMgrLoginFile
+    
\ No newline at end of file
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/boinccas95.vcproj b/win_build/installerv2/redist/Windows/src/boinccas/boinccas95.vcproj
new file mode 100644
index 0000000..7d48c9f
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/boinccas95.vcproj
@@ -0,0 +1,602 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BOINCCAS95"
+	ProjectGUID="{49723CA5-DA05-43C0-93AB-6FD30D046910}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug95"
+			IntermediateDirectory="Debug95"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;BOINCCAS_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="msi.lib libcmtd.lib libcpmtd.lib delayimp.lib netapi32.lib advapi32.lib kernel32.lib user32.lib shfolder.lib shell32.lib version.lib"
+				OutputFile="$(OutDir)/boinccas95.dll"
+				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="true"
+				ModuleDefinitionFile="boinccas95.def"
+				DelayLoadDLLs="advapi32.dll"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/boinccas95.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/boinccas95.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;BOINCCAS_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="msi.lib libcmtd.lib libcpmtd.lib delayimp.lib netapi32.lib advapi32.lib kernel32.lib user32.lib shfolder.lib shell32.lib version.lib"
+				OutputFile="$(OutDir)/boinccas95.dll"
+				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="true"
+				ModuleDefinitionFile="boinccas95.def"
+				DelayLoadDLLs="advapi32.dll"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/boinccas95.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/boinccas95.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release95"
+			IntermediateDirectory="Release95"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="1"
+			ATLMinimizesCRunTimeLibraryUsage="true"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BOINCCAS_EXPORTS"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="msi.lib libcmt.lib libcpmt.lib delayimp.lib netapi32.lib advapi32.lib kernel32.lib user32.lib shfolder.lib shell32.lib version.lib"
+				OutputFile="$(OutDir)/boinccas95.dll"
+				LinkIncremental="1"
+				IgnoreAllDefaultLibraries="true"
+				ModuleDefinitionFile="boinccas95.def"
+				DelayLoadDLLs="advapi32.dll"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/boinccas95.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/boinccas95.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BOINCCAS_EXPORTS"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="msi.lib libcmt.lib libcpmt.lib delayimp.lib netapi32.lib advapi32.lib kernel32.lib user32.lib shfolder.lib shell32.lib version.lib"
+				OutputFile="$(OutDir)/boinccas95.dll"
+				LinkIncremental="1"
+				IgnoreAllDefaultLibraries="true"
+				ModuleDefinitionFile="boinccas95.def"
+				DelayLoadDLLs="advapi32.dll"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/boinccas95.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/boinccas95.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+			>
+			<File
+				RelativePath="boinccas.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CACCConfigMd5sum.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CACleanupOldBinaries.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CACreateAcctMgrLoginFile.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CACreateProjectInitFile.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAMigrateBOINCData.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAMigrateBOINCDataCleanup.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAMigrateBOINCDataVersion.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAMigratex86x64.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CARestoreExecutionState.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CARestoreSetupState.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CASaveExecutionState.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CASaveSetupState.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAShutdownBOINCManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAValidateInstall.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAValidateRebootRequest.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAValidateSetupType.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\CAVerifyInstallDirectories.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dirops.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\main.cpp"
+				>
+			</File>
+			<File
+				RelativePath="stdafx.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc"
+			>
+			<File
+				RelativePath=".\boinccas.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CACCConfigMd5sum.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CACleanupOldBinaries.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CACreateAcctMgrLoginFile.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CACreateProjectInitFile.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAMigrateBOINCData.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAMigrateBOINCDataCleanup.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAMigrateBOINCDataVersion.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAMigratex86x64.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CARestoreExecutionState.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CARestoreSetupState.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CASaveExecutionState.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CASaveSetupState.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAShutdownBOINCManager.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAValidateInstall.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAValidateRebootRequest.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAValidateSetupType.h"
+				>
+			</File>
+			<File
+				RelativePath=".\CAVerifyInstallDirectories.h"
+				>
+			</File>
+			<File
+				RelativePath=".\dirops.h"
+				>
+			</File>
+			<File
+				RelativePath=".\main.h"
+				>
+			</File>
+			<File
+				RelativePath=".\resource.h"
+				>
+			</File>
+			<File
+				RelativePath="stdafx.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath=".\boinccas.rc"
+				>
+			</File>
+			<File
+				RelativePath="boinccas95.def"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/dcomperm.h b/win_build/installerv2/redist/Windows/src/boinccas/dcomperm.h
new file mode 100644
index 0000000..856e8cf
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/dcomperm.h
@@ -0,0 +1,198 @@
+/*++
+
+DCOM Permission Configuration Sample
+Copyright (c) 1996, Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+    dcomperm.h
+
+Abstract:
+
+    Include file for DCOM Permission Configuration sample
+
+Author:
+
+    Michael Nelson
+
+Environment:
+
+    Windows NT
+
+--*/
+
+#define GUIDSTR_MAX 38
+
+#ifndef STR2UNI
+
+#define STR2UNI(unistr, regstr) \
+        mbstowcs (unistr, regstr, strlen (regstr)+1);
+
+#define UNI2STR(regstr, unistr) \
+        wcstombs (regstr, unistr, wcslen (unistr)+1);
+
+#endif
+
+
+//
+// Wrappers
+//
+
+DWORD
+ListDefaultAccessACL();
+
+DWORD
+ListDefaultLaunchACL();
+
+DWORD
+ListAppIDAccessACL (
+    LPTSTR AppID
+    );
+
+DWORD
+ListAppIDLaunchACL (
+    LPTSTR AppID
+    );
+
+DWORD
+ChangeDefaultAccessACL (
+    LPTSTR Principal,
+    BOOL SetPrincipal,
+    BOOL Permit
+    );
+
+DWORD
+ChangeDefaultLaunchACL (
+    LPTSTR Principal,
+    BOOL SetPrincipal,
+    BOOL Permit
+    );
+
+DWORD
+ChangeAppIDAccessACL (
+    LPTSTR AppID,
+    LPTSTR Principal,
+    BOOL SetPrincipal,
+    BOOL Permit
+    );
+
+DWORD
+ChangeAppIDLaunchACL (
+    LPTSTR AppID,
+    LPTSTR Principal,
+    BOOL SetPrincipal,
+    BOOL Permit
+    );
+
+DWORD GetRunAsPassword (
+    LPTSTR AppID,
+    LPTSTR Password
+    );
+
+DWORD SetRunAsPassword (
+    LPTSTR AppID,
+    LPTSTR Principal,
+    LPTSTR Password
+    );
+
+DWORD GetRunAsPassword (
+    LPTSTR AppID,
+    LPTSTR Password
+    );
+
+DWORD SetRunAsPassword (
+    LPTSTR AppID,
+    LPTSTR Password
+    );
+
+//
+// Internal functions
+//
+
+DWORD
+CreateNewSD (
+    SECURITY_DESCRIPTOR **SD
+    );
+
+DWORD
+MakeSDAbsolute (
+    PSECURITY_DESCRIPTOR OldSD,
+    PSECURITY_DESCRIPTOR *NewSD
+    );
+
+DWORD
+SetNamedValueSD (
+    HKEY RootKey,
+    LPTSTR KeyName,
+    LPTSTR ValueName,
+    SECURITY_DESCRIPTOR *SD
+    );
+
+DWORD
+GetNamedValueSD (
+    HKEY RootKey,
+    LPTSTR KeyName,
+    LPTSTR ValueName,
+    SECURITY_DESCRIPTOR **SD,
+    BOOL *NewSD
+    );
+
+DWORD
+ListNamedValueSD (
+    HKEY RootKey,
+    LPTSTR KeyName,
+    LPTSTR ValueName
+    );
+
+DWORD
+AddPrincipalToNamedValueSD (
+    HKEY RootKey,
+    LPTSTR KeyName,
+    LPTSTR ValueName,
+    LPTSTR Principal,
+    BOOL Permit
+    );
+
+DWORD
+RemovePrincipalFromNamedValueSD (
+    HKEY RootKey,
+    LPTSTR KeyName,
+    LPTSTR ValueName,
+    LPTSTR Principal
+    );
+
+DWORD
+GetCurrentUserSID (
+    PSID *Sid
+    );
+
+DWORD
+CopyACL (
+    PACL OldACL,
+    PACL NewACL
+    );
+
+DWORD
+AddAccessDeniedACEToACL (
+    PACL *Acl,
+    DWORD PermissionMask,
+    LPTSTR Principal
+    );
+
+DWORD
+AddAccessAllowedACEToACL (
+    PACL *Acl,
+    DWORD PermissionMask,
+    LPTSTR Principal
+    );
+
+DWORD
+RemovePrincipalFromACL (
+    PACL Acl,
+    LPTSTR Principal
+    );
+
+void
+ListACL (
+    PACL Acl
+    );
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/dirops.cpp b/win_build/installerv2/redist/Windows/src/boinccas/dirops.cpp
new file mode 100644
index 0000000..39a29bb
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/dirops.cpp
@@ -0,0 +1,243 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+//
+// Source Code Originally from:
+// http://support.microsoft.com/kb/814463
+//
+
+#include "stdafx.h"
+#include "dirops.h"
+
+/////////////////////////////////////////////////////////////////////////////////////
+//    FUNCTION:    RemoveReadOnly
+//    DESCRIPTION:  Removes the write protection of a specific file (including full path), 
+//                if case the file exists.
+//
+//    RETURN:          TRUE for success, FALSE for failure
+//
+/////////////////////////////////////////////////////////////////////////////////////
+BOOL RemoveReadOnly(tstring& csFileName)
+{
+        DWORD dwFileAttributes =  GetFileAttributes(csFileName.c_str());
+        
+        // In case the file does not exist
+        if (dwFileAttributes == -1)
+            return FALSE;
+
+        dwFileAttributes &= ~FILE_ATTRIBUTE_READONLY;
+        if (SetFileAttributes(csFileName.c_str(), dwFileAttributes) != 0)
+            return TRUE;
+        return FALSE;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////
+//    FUNCTION:    CopyFolder
+//    DESCRIPTION: Copies a directory to a new location
+//
+//    RETURN:         TRUE for success, FALSE for failure
+//
+/////////////////////////////////////////////////////////////////////////////////////
+BOOL RecursiveCopyFolder(tstring& csPath, tstring& csNewPath)
+{
+    BOOL bRet = TRUE;
+
+    if( !CreateDirectory(csNewPath.c_str(), NULL))
+        bRet = FALSE;
+    
+    tstring csPathMask;
+    tstring csFullPath;
+    tstring csNewFullPath;
+    
+    csPath     += _T("\\");
+    csNewPath  += _T("\\");
+    
+    csPathMask = csPath + _T("*.*");
+        
+    WIN32_FIND_DATA ffData;
+    HANDLE hFind;
+    hFind = FindFirstFile(csPathMask.c_str(), &ffData);
+
+    if (hFind == INVALID_HANDLE_VALUE){
+        return FALSE;
+    }
+    
+
+    // Copying all the files
+    while (hFind && FindNextFile(hFind, &ffData)) 
+    {
+        csFullPath    = csPath    + ffData.cFileName;
+        csNewFullPath = csNewPath + ffData.cFileName;
+
+        RemoveReadOnly(csNewFullPath);
+
+        if( !(ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) 
+        {
+            if( !CopyFile(csFullPath.c_str(), csNewFullPath.c_str(), FALSE) ) 
+            {
+                // Not stopping here, trying to copy the rest of the files
+                bRet = FALSE;
+            }
+        }
+        else // it is a directory -> Copying recursivly
+        { 
+            if( (_tcscmp(ffData.cFileName, _T(".")) != 0) &&
+                (_tcscmp(ffData.cFileName, _T("..")) != 0) ) 
+            {
+                if( !RecursiveCopyFolder(csFullPath, csNewFullPath) )
+                {
+                    // Not stopping here, trying to copy the rest of the files
+                    bRet = FALSE;
+                }
+            }
+        }
+    }
+
+    FindClose(hFind);
+    return bRet;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////
+//	FUNCTION:    RecursiveDeleteFolder
+//	DESCRIPTION: Deletes a directory, even if not empty
+//
+//	RETURN:		 TRUE for success, FALSE for failure
+//
+/////////////////////////////////////////////////////////////////////////////////////
+BOOL RecursiveDeleteFolder(tstring& csPath)
+{
+	BOOL bRet = TRUE;
+
+	tstring csPathMask;
+	tstring csFullPath;
+	
+	csPath     += _T("\\");
+	csPathMask = csPath + _T("*.*");
+		
+	WIN32_FIND_DATA ffData;
+	HANDLE hFind;
+	hFind = FindFirstFile(csPathMask.c_str(), &ffData);
+
+	if (hFind == INVALID_HANDLE_VALUE){
+		return FALSE;
+	}
+	
+
+	// Delete all the files
+	while (hFind && FindNextFile(hFind, &ffData)) 
+	{
+		csFullPath    = csPath    + ffData.cFileName;
+
+		RemoveReadOnly(csFullPath);
+
+		if( !(ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) 
+		{
+			if( !DeleteFile(csFullPath.c_str()) ) 
+			{
+				// Not stopping here, trying to copy the rest of the files
+				bRet = FALSE;
+			}
+		}
+		else // it is a directory -> Copying recursivly
+		{ 
+			if( (_tcscmp(ffData.cFileName, _T(".")) != 0) &&
+				(_tcscmp(ffData.cFileName, _T("..")) != 0) ) 
+			{
+				if( !RecursiveDeleteFolder(csFullPath) )
+				{
+					// Not stopping here, trying to copy the rest of the files
+					bRet = FALSE;
+				}
+			}
+		}
+	}
+
+    FindClose(hFind);
+	
+	RemoveReadOnly(csPath);
+	if( !RemoveDirectory(csPath.c_str()))
+		bRet = FALSE;
+
+	return bRet;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////
+//	FUNCTION:    MoveFolder
+//	DESCRIPTION: Moves a directory to a new location
+//
+//	RETURN:		 TRUE for success, FALSE for failure
+//
+/////////////////////////////////////////////////////////////////////////////////////
+BOOL MoveFolder(tstring& csPath, tstring& csNewPath)
+{
+	BOOL bRet = TRUE;
+	
+	if(!RecursiveCopyFolder(csPath, csNewPath))
+		bRet = FALSE;
+
+	if(!RecursiveDeleteFolder(csPath))
+		bRet = FALSE;
+
+	return bRet;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+//    FUNCTION:    RecursiveSetPermissions
+//    DESCRIPTION: Copies a directory to a new location
+//
+//    RETURN:         TRUE for success, FALSE for failure
+//
+/////////////////////////////////////////////////////////////////////////////////////
+BOOL RecursiveSetPermissions(tstring& csPath, PACL pACL)
+{
+    BOOL bRet = TRUE;
+
+    tstring csPathMask;
+    tstring csFullPath;
+    
+    csPath     += _T("\\");
+    csPathMask = csPath + _T("*.*");
+        
+    WIN32_FIND_DATA ffData;
+    HANDLE hFind;
+    hFind = FindFirstFile(csPathMask.c_str(), &ffData);
+
+    if (hFind == INVALID_HANDLE_VALUE){
+        return FALSE;
+    }
+    
+
+    // Copying all the files
+    while (hFind && FindNextFile(hFind, &ffData)) 
+    {
+        if( (_tcscmp(ffData.cFileName, _T(".")) != 0) &&
+            (_tcscmp(ffData.cFileName, _T("..")) != 0) ) 
+        {
+            csFullPath = csPath + ffData.cFileName;
+
+            // Set the ACL on the file.
+            SetNamedSecurityInfo( 
+#ifdef _UNICODE
+                (LPWSTR)csFullPath.c_str(),
+#else
+                (LPSTR)csFullPath.c_str(),
+#endif
+                SE_FILE_OBJECT,
+                DACL_SECURITY_INFORMATION,
+                NULL,
+                NULL,
+                pACL,
+                NULL
+            );
+
+            if( ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) 
+            {
+                    RecursiveSetPermissions(csFullPath, pACL);
+            }
+        }
+    }
+
+    FindClose(hFind);
+    return bRet;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/dirops.h b/win_build/installerv2/redist/Windows/src/boinccas/dirops.h
new file mode 100644
index 0000000..ec72350
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/dirops.h
@@ -0,0 +1,19 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+//
+// Source Code Originally from:
+// http://www.codeguru.com/cpp/w-p/files/comments.php/c4479/?thread=52622
+//
+
+#ifndef _BOINC_DIROPS_
+#define _BOINC_DIROPS_
+
+// Prototypes
+BOOL RemoveReadOnly(tstring& csFileName);
+BOOL RecursiveDeleteFolder(tstring& csPath);
+BOOL RecursiveCopyFolder(tstring& csFromPath, tstring& csToPath);
+BOOL MoveFolder(tstring& csPath, tstring& csNewPath);
+BOOL RecursiveSetPermissions(tstring& csPath, PACL pACL);
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/launcher.cpp b/win_build/installerv2/redist/Windows/src/boinccas/launcher.cpp
new file mode 100644
index 0000000..07d84c4
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/launcher.cpp
@@ -0,0 +1,298 @@
+
+#include "stdafx.h"
+#include "boinccas.h"
+#include "launcher.h"
+
+
+#ifndef SECURITY_MANDATORY_UNTRUSTED_RID
+
+#define SECURITY_MANDATORY_UNTRUSTED_RID            (0x00000000L)
+#define SECURITY_MANDATORY_LOW_RID                  (0x00001000L)
+#define SECURITY_MANDATORY_MEDIUM_RID               (0x00002000L)
+#define SECURITY_MANDATORY_HIGH_RID                 (0x00003000L)
+#define SECURITY_MANDATORY_SYSTEM_RID               (0x00004000L)
+#define SECURITY_MANDATORY_PROTECTED_PROCESS_RID    (0x00005000L)
+
+typedef struct _TOKEN_MANDATORY_LABEL {
+    SID_AND_ATTRIBUTES Label;
+} TOKEN_MANDATORY_LABEL, *PTOKEN_MANDATORY_LABEL;
+
+typedef enum _MANDATORY_LEVEL {
+    MandatoryLevelUntrusted = 0,
+    MandatoryLevelLow,
+    MandatoryLevelMedium,
+    MandatoryLevelHigh,
+    MandatoryLevelSystem,
+    MandatoryLevelSecureProcess,
+    MandatoryLevelCount
+} MANDATORY_LEVEL, *PMANDATORY_LEVEL;
+
+#define TokenVirtualizationEnabled ((TOKEN_INFORMATION_CLASS)24)
+#define TokenIntegrityLevel ((TOKEN_INFORMATION_CLASS)25)
+
+#endif //!SECURITY_MANDATORY_UNTRUSTED_RID
+
+/*!
+ at brief Function enables/disables/removes a privelege associated with the given token
+ at detailed Calls LookupPrivilegeValue() and AdjustTokenPrivileges()
+ at param[in] hToken - access token handle
+ at param[in] lpszPrivilege - name of privilege to enable/disable
+ at param[in] dwAttributes - (SE_PRIVILEGE_ENABLED) to enable or (0) disable or (SE_PRIVILEGE_REMOVED) to remove privilege
+ at return HRESULT code
+ at todo Removing was checked. To check enabling and disabling.
+*/
+inline HRESULT SetPrivilege(
+		  HANDLE hToken,          
+		  LPCTSTR lpszPrivilege, 
+		  DWORD dwAttributes=SE_PRIVILEGE_ENABLED   
+		  ) 
+{
+	HRESULT hr=S_OK;
+	LUID luid;
+
+	if ( LookupPrivilegeValue( 
+			NULL,            // lookup privilege on local system
+			lpszPrivilege,   // privilege to lookup 
+			&luid ) )        // receives LUID of privilege
+	{
+		TOKEN_PRIVILEGES tp;
+		tp.PrivilegeCount = 1;
+		tp.Privileges[0].Luid = luid;
+		tp.Privileges[0].Attributes = dwAttributes;
+
+		// Enable the privilege or disable all privileges.
+
+		if ( !AdjustTokenPrivileges(
+				hToken, 
+				FALSE, 
+				&tp, 
+				sizeof(TOKEN_PRIVILEGES), 
+				(PTOKEN_PRIVILEGES) NULL, 
+				(PDWORD) NULL) )
+			hr=HRESULT_FROM_WIN32(GetLastError());
+	}//if(LookupPrivilegeValue(...))
+	else
+		hr=HRESULT_FROM_WIN32(GetLastError());
+
+	return hr;
+}
+
+/*!
+Function removes the priveleges which are not associated by default with explorer.exe at Medium Integration Level in Vista
+ at returns HRESULT of the operation on SE_CREATE_GLOBAL_NAME (="SeCreateGlobalPrivilege")
+*/
+inline HRESULT ReducePrivilegesForMediumIL(HANDLE hToken) 
+{
+	HRESULT hr=S_OK;
+	hr=SetPrivilege(hToken, SE_CREATE_GLOBAL_NAME, SE_PRIVILEGE_REMOVED);
+
+	SetPrivilege(hToken, SE_BACKUP_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_CREATE_PAGEFILE_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, TEXT("SeCreateSymbolicLinkPrivilege"), SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_DEBUG_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_IMPERSONATE_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_INC_BASE_PRIORITY_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_INCREASE_QUOTA_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_LOAD_DRIVER_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_MANAGE_VOLUME_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_PROF_SINGLE_PROCESS_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_REMOTE_SHUTDOWN_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_RESTORE_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_SECURITY_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_SYSTEM_ENVIRONMENT_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_SYSTEM_PROFILE_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_SYSTEMTIME_NAME, SE_PRIVILEGE_REMOVED);
+	SetPrivilege(hToken, SE_TAKE_OWNERSHIP_NAME, SE_PRIVILEGE_REMOVED);
+
+	return hr;
+}
+
+/*!
+ at brief Gets Integration level of the given process in Vista. 
+In the older OS assumes the integration level is equal to SECURITY_MANDATORY_HIGH_RID
+
+The function opens the process for all access and opens its token for all access. 
+Then it extracts token information and closes the handles.
+ at param[in] dwProcessId ID of the process to operate
+ at param[out] pdwProcessIL pointer to write the value
+ at return HRESULT
+ at retval <return value> { description }
+ at remarks Function check for OS version by querying the presence of Kernel32.GetProductInfo function. 
+This way is used due to the function is called from InstallShield12 script, so GetVersionEx returns incorrect value.
+ at todo restrict access rights when quering for tokens
+*/
+inline HRESULT GetProcessIL(DWORD dwProcessId, LPDWORD pdwProcessIL)
+{
+	HRESULT hr=S_OK;
+	if(!pdwProcessIL)
+		hr=E_INVALIDARG;
+	if(SUCCEEDED(hr))
+	{
+		bool bVista=false;
+		{
+			// When the function is called from IS12, GetVersionEx returns dwMajorVersion=5 on Vista!
+			HMODULE hmodKernel32=LoadLibrary(L"Kernel32");
+			if(hmodKernel32 && GetProcAddress(hmodKernel32, "GetProductInfo"))
+				bVista=true;
+			if(hmodKernel32) FreeLibrary(hmodKernel32);
+		}
+
+		DWORD dwIL=SECURITY_MANDATORY_HIGH_RID;
+		if(bVista)
+		{//Vista
+			HANDLE hToken=NULL;
+			HANDLE hProcess=OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcessId);
+			if(hProcess)
+			{
+				if(OpenProcessToken(hProcess, TOKEN_ALL_ACCESS, &hToken))
+				{
+					PTOKEN_MANDATORY_LABEL pTIL=NULL;
+					DWORD dwSize=0;
+					if (!GetTokenInformation(hToken, TokenIntegrityLevel, NULL, 0, &dwSize) 
+						&& ERROR_INSUFFICIENT_BUFFER==GetLastError() && dwSize)
+						pTIL=(PTOKEN_MANDATORY_LABEL)HeapAlloc(GetProcessHeap(), 0, dwSize);
+
+					if(pTIL && GetTokenInformation(hToken, TokenIntegrityLevel, pTIL, dwSize, &dwSize))
+					{
+						LPBYTE lpb=GetSidSubAuthorityCount(pTIL->Label.Sid);
+						if(lpb)
+							dwIL = *GetSidSubAuthority(pTIL->Label.Sid, *lpb-1);
+						else
+							hr=E_UNEXPECTED;
+					}
+					if(pTIL)
+						HeapFree(GetProcessHeap(), 0, pTIL);
+					CloseHandle(hToken);
+				}//if(OpenProcessToken(...))
+				CloseHandle(hProcess);
+			}//if(hProcess)
+		}//if(bVista)
+		if(SUCCEEDED(hr))
+			*pdwProcessIL=dwIL;
+	}//if(SUCCEEDED(hr))
+	return hr;
+}
+
+/*!
+ at brief Function launches process with the integration level of Explorer on Vista. On the previous OS, simply creates the process.
+
+Function gets the integration level of the current process and Explorer, then launches the new process.
+If the integration levels are equal, CreateProcess is called. 
+If Explorer has Medium IL, and the current process has High IL, new token is created, its rights are adjusted 
+and CreateProcessWithTokenW is called. 
+If Explorer has Medium IL, and the current process has High IL, error is returned.
+ at param[in] szProcessName - the name of exe file (see CreatePorcess()) 
+ at param[in] szCmdLine - the name of exe file (see CreatePorcess())
+ at return HRESULT code
+ at note The function cannot be used in services, due to if uses USER32.FindWindow() to get the proper instance of Explorer. 
+The parent of new process in taskmgr.exe, but not the current process.
+ at sa ReducePrivilegesForMediumIL()
+*/
+HRESULT CreateProcessWithExplorerIL(LPWSTR szProcessName, LPWSTR szCmdLine)
+{
+    HRESULT hr = S_OK;
+    BOOL bRet;
+    PROCESS_INFORMATION ProcInfo = {0};
+    STARTUPINFO StartupInfo = {0};
+    bool bVista = false;
+
+	// When the function is called from IS12, GetVersionEx returns dwMajorVersion=5 on Vista!
+	HMODULE hmodKernel32 = LoadLibrary(_T("Kernel32"));
+    if (hmodKernel32) {
+        if (GetProcAddress(hmodKernel32, "GetProductInfo")) {
+            bVista = true;
+        }
+        FreeLibrary(hmodKernel32);
+    }
+	
+	if(bVista)
+	{
+	    HANDLE hToken;
+	    HANDLE hNewToken;
+		DWORD dwCurIL = SECURITY_MANDATORY_HIGH_RID, dwExplorerIL = SECURITY_MANDATORY_HIGH_RID; 
+		DWORD dwExplorerID = 0;
+        DWORD dwEnableVirtualization = 0;
+
+		HWND hwndShell = ::FindWindow( _T("Progman"), NULL);
+		if(hwndShell) GetWindowThreadProcessId(hwndShell, &dwExplorerID);
+		
+		GetProcessIL(dwExplorerID, &dwExplorerIL);
+		GetProcessIL(GetCurrentProcessId(), &dwCurIL);
+
+        if( (dwCurIL == SECURITY_MANDATORY_HIGH_RID) && (dwExplorerIL == SECURITY_MANDATORY_MEDIUM_RID) )
+		{
+			HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwExplorerID);
+			if(hProcess)
+			{
+				if(OpenProcessToken(hProcess, TOKEN_ALL_ACCESS, &hToken))
+				{
+                    if(!DuplicateTokenEx(hToken, TOKEN_ALL_ACCESS, NULL, SecurityImpersonation, TokenPrimary, &hNewToken)) {
+						hr = HRESULT_FROM_WIN32(GetLastError());
+                    }
+
+					if(SUCCEEDED(hr)) {
+
+						hr = ReducePrivilegesForMediumIL(hNewToken);
+
+                        SetTokenInformation(
+                            hNewToken,
+                            TokenVirtualizationEnabled,
+                            &dwEnableVirtualization,
+                            sizeof(DWORD)
+                        );
+
+                        if(SUCCEEDED(hr)) {
+							bRet = CreateProcessAsUser(
+                                hNewToken,
+                                szProcessName,
+                                szCmdLine,
+                                NULL,
+                                NULL,
+                                FALSE,
+                                NORMAL_PRIORITY_CLASS,
+                                NULL,
+                                NULL,
+                                &StartupInfo,
+                                &ProcInfo
+                            );
+                            if(!bRet) {
+								hr = HRESULT_FROM_WIN32(GetLastError());
+                            }
+						}
+                        CloseHandle(hNewToken);
+                    } else {
+						hr = HRESULT_FROM_WIN32(GetLastError());
+                    }
+					CloseHandle(hToken);
+                } else {
+					hr = HRESULT_FROM_WIN32(GetLastError());
+                }
+				CloseHandle(hProcess);
+			}
+		} else if ((dwCurIL == SECURITY_MANDATORY_MEDIUM_RID) && (dwExplorerIL == SECURITY_MANDATORY_HIGH_RID)) {
+			hr = E_ACCESSDENIED;
+		}
+	}
+
+	if(!ProcInfo.dwProcessId) {
+		bRet = CreateProcess(
+            szProcessName,
+            szCmdLine, 
+			NULL,
+            NULL,
+            FALSE,
+            0,
+            NULL,
+            NULL,
+            &StartupInfo,
+            &ProcInfo
+        );
+        if(!bRet) {
+			hr = HRESULT_FROM_WIN32(GetLastError());
+        }
+	}
+
+	return hr;
+}
+
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/launcher.h b/win_build/installerv2/redist/Windows/src/boinccas/launcher.h
new file mode 100644
index 0000000..5c56f67
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/launcher.h
@@ -0,0 +1,4 @@
+
+#pragma once
+
+HRESULT CreateProcessWithExplorerIL(LPWSTR szProcessName, LPWSTR szCmdLine);
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/listacl.cpp b/win_build/installerv2/redist/Windows/src/boinccas/listacl.cpp
new file mode 100644
index 0000000..061b239
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/listacl.cpp
@@ -0,0 +1,101 @@
+/*++
+
+DCOM Permission Configuration Sample
+Copyright (c) 1996, Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+    listacl.cpp
+
+Abstract:
+
+    Code to list ACL information
+
+Author:
+
+    Michael Nelson
+
+Environment:
+
+    Windows NT
+
+--*/
+
+#include "stdafx.h"
+#include "ntsecapi.h"
+#include "dcomperm.h"
+
+void
+ListACL (
+    PACL Acl
+    )
+{
+    ACL_SIZE_INFORMATION     aclSizeInfo;
+    ACL_REVISION_INFORMATION aclRevInfo;
+    ULONG                    i = 0;
+    LPVOID                   ace = NULL;
+    ACE_HEADER               *aceHeader = NULL;
+    ACCESS_ALLOWED_ACE       *paaace = NULL;
+    ACCESS_DENIED_ACE        *padace = NULL;
+    TCHAR                    domainName [256];
+    TCHAR                    userName [256];
+    DWORD                    nameLength = 0;
+    SID_NAME_USE             snu;
+
+    if (!GetAclInformation (Acl,
+                            &aclSizeInfo,
+                            sizeof (ACL_SIZE_INFORMATION),
+                            AclSizeInformation))
+    {
+        _tprintf (TEXT("Could not get AclSizeInformation"));
+        return;
+    }
+
+    if (!GetAclInformation (Acl,
+                            &aclRevInfo,
+                            sizeof (ACL_REVISION_INFORMATION),
+                            AclRevisionInformation))
+    {
+        _tprintf (TEXT("Could not get AclRevisionInformation"));
+        return;
+    }
+
+    for (i = 0; i < aclSizeInfo.AceCount; i++)
+    {
+        if (!GetAce (Acl, i, &ace))
+            return;
+
+        aceHeader = (ACE_HEADER *) ace;
+
+        if (aceHeader->AceType == ACCESS_ALLOWED_ACE_TYPE)
+        {
+            paaace = (ACCESS_ALLOWED_ACE *) ace;
+            nameLength = 255;
+            LookupAccountSid (NULL,
+                              &paaace->SidStart,
+                              userName,
+                              &nameLength,
+                              domainName,
+                              &nameLength,
+                              &snu);
+
+            _tprintf (TEXT("Access permitted to %s\\%s.\n"), domainName, userName);
+        } else
+        if (aceHeader->AceType == ACCESS_DENIED_ACE_TYPE)
+        {
+            padace = (ACCESS_DENIED_ACE *) ace;
+            nameLength = 255;
+            LookupAccountSid (NULL,
+                              &padace->SidStart,
+                              userName,
+                              &nameLength,
+                              domainName,
+                              &nameLength,
+                              &snu);
+
+            _tprintf (TEXT("Access denied to %s\\%s.\n"), domainName, userName);
+
+        }
+   }
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/lkuprid.cpp b/win_build/installerv2/redist/Windows/src/boinccas/lkuprid.cpp
new file mode 100644
index 0000000..6345930
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/lkuprid.cpp
@@ -0,0 +1,273 @@
+/*++
+
+Copyright (c) 1996  Microsoft Corporation
+
+Module Name:
+
+    acctname.c
+
+Abstract:
+
+    This module illustrates how to obtain user and group names
+    Associated with accounts that have been renamed or localized. This
+    sample works by building a Sid value and then looking up the name
+    associated with that Sid value.
+
+    For example, in a default English install of Windows NT, the local
+    administrators group is called "Administrators." In a default German
+    install of Windows NT, the local administrators group is called
+    "Administratoren." This can lead to problems when managing users
+    and groups if the proper steps are not taken.
+
+    The following relative ID values are an index into an account
+    database that represents a specific user or group. In DOMAIN_USER_
+    and DOMAIN_GROUP_ cases, the relative ID is appended to the account
+    domain Sid from the machine of interest. In the DOMAIN_ALIAS_ case,
+    the relative ID is appended to a well-known Sid representing the
+    BUILTIN domain that is consistent across machines.
+
+    // Well-known users and groups...
+
+    #define DOMAIN_USER_RID_ADMIN          (0x000001F4L)
+    #define DOMAIN_USER_RID_GUEST          (0x000001F5L)
+
+    #define DOMAIN_GROUP_RID_ADMINS        (0x00000200L)
+    #define DOMAIN_GROUP_RID_USERS         (0x00000201L)
+    #define DOMAIN_GROUP_RID_GUESTS        (0x00000202L)
+
+    // well-known aliases ...
+
+    #define DOMAIN_ALIAS_RID_ADMINS        (0x00000220L)
+    #define DOMAIN_ALIAS_RID_USERS         (0x00000221L)
+    #define DOMAIN_ALIAS_RID_GUESTS        (0x00000222L)
+    #define DOMAIN_ALIAS_RID_POWER_USERS   (0x00000223L)
+    #define DOMAIN_ALIAS_RID_ACCOUNT_OPS   (0x00000224L)
+    #define DOMAIN_ALIAS_RID_SYSTEM_OPS    (0x00000225L)
+    #define DOMAIN_ALIAS_RID_PRINT_OPS     (0x00000226L)
+    #define DOMAIN_ALIAS_RID_BACKUP_OPS    (0x00000227L)
+    #define DOMAIN_ALIAS_RID_REPLICATOR    (0x00000228L)
+
+    The following section is for informational purposes and is useful
+    for visualizing Sid values:
+
+    // Universal well-known SIDs:
+    //
+    //     Null SID                     S-1-0-0
+    //     World                        S-1-1-0
+    //     Local                        S-1-2-0
+    //     Creator Owner ID             S-1-3-0
+    //     Creator Group ID             S-1-3-1
+    //     Creator Owner Server ID      S-1-3-2
+    //     Creator Group Server ID      S-1-3-3
+    //
+    //     (Non-unique IDs)             S-1-4
+
+    #define SECURITY_NULL_SID_AUTHORITY       {0,0,0,0,0,0}
+    #define SECURITY_WORLD_SID_AUTHORITY      {0,0,0,0,0,1}
+    #define SECURITY_LOCAL_SID_AUTHORITY      {0,0,0,0,0,2}
+    #define SECURITY_CREATOR_SID_AUTHORITY    {0,0,0,0,0,3}
+    #define SECURITY_NON_UNIQUE_AUTHORITY     {0,0,0,0,0,4}
+
+    #define SECURITY_NULL_RID                 (0x00000000L)
+    #define SECURITY_WORLD_RID                (0x00000000L)
+    #define SECURITY_LOCAL_RID                (0X00000000L)
+
+    #define SECURITY_CREATOR_OWNER_RID        (0x00000000L)
+    #define SECURITY_CREATOR_GROUP_RID        (0x00000001L)
+
+    #define SECURITY_CREATOR_OWNER_SERVER_RID (0x00000002L)
+    #define SECURITY_CREATOR_GROUP_SERVER_RID (0x00000003L)
+
+    // NT well-known SIDs:
+    //
+    //     NT Authority          S-1-5
+    //     Dialup                S-1-5-1
+    //
+    //     Network               S-1-5-2
+    //     Batch                 S-1-5-3
+    //     Interactive           S-1-5-4
+    //     Service               S-1-5-6
+    //     AnonymousLogon        S-1-5-7       (aka null logon session)
+    //     Proxy                 S-1-5-8
+    //     ServerLogon           S-1-5-8       (aka domain controller
+    //                                            account)
+    //
+    //     (Logon IDs)           S-1-5-5-X-Y
+    //
+    //     (NT non-unique IDs)   S-1-5-0x15-...
+    //
+    //     (Built-in domain)     S-1-5-0x20
+
+    #define SECURITY_NT_AUTHORITY           {0,0,0,0,0,5}   // ntifs
+
+    #define SECURITY_DIALUP_RID             (0x00000001L)
+    #define SECURITY_NETWORK_RID            (0x00000002L)
+    #define SECURITY_BATCH_RID              (0x00000003L)
+    #define SECURITY_INTERACTIVE_RID        (0x00000004L)
+    #define SECURITY_SERVICE_RID            (0x00000006L)
+    #define SECURITY_ANONYMOUS_LOGON_RID    (0x00000007L)
+    #define SECURITY_PROXY_RID              (0x00000008L)
+    #define SECURITY_SERVER_LOGON_RID       (0x00000009L)
+
+    #define SECURITY_LOGON_IDS_RID          (0x00000005L)
+    #define SECURITY_LOGON_IDS_RID_COUNT    (3L)
+
+    #define SECURITY_LOCAL_SYSTEM_RID       (0x00000012L)
+
+    #define SECURITY_NT_NON_UNIQUE          (0x00000015L)
+
+    #define SECURITY_BUILTIN_DOMAIN_RID     (0x00000020L)
+
+    If no Command line arguments are specified, names are looked up
+    on the local machine. If argv[1] is present, the lookup occurs
+    on the specified machine.
+
+    For example, acctname.exe \\winbase will look up names from the
+    machine named \\winbase. If \\winbase is a default German install
+    of Windows NT, names will appear in German locale.
+
+Author:
+
+    Scott Field (sfield)    02-Oct-96
+
+--*/
+
+#include "stdafx.h"
+#include "lkuprid.h"
+
+
+BOOL
+LookupAliasFromRid(
+    LPWSTR TargetComputer,
+    DWORD Rid,
+    LPWSTR Name,
+    PDWORD cchName
+    )
+{
+    SID_IDENTIFIER_AUTHORITY sia = SECURITY_NT_AUTHORITY;
+    SID_NAME_USE snu;
+    PSID pSid;
+    WCHAR DomainName[DNLEN+1];
+    DWORD cchDomainName = DNLEN;
+    BOOL bSuccess = FALSE;
+
+    //
+    // Sid is the same regardless of machine, since the well-known
+    // BUILTIN domain is referenced.
+    //
+
+    if(AllocateAndInitializeSid(
+            &sia,
+            2,
+            SECURITY_BUILTIN_DOMAIN_RID,
+            Rid,
+            0, 0, 0, 0, 0, 0,
+            &pSid
+            )) {
+
+        bSuccess = LookupAccountSidW(
+                TargetComputer,
+                pSid,
+                Name,
+                cchName,
+                DomainName,
+                &cchDomainName,
+                &snu
+                );
+
+        FreeSid(pSid);
+    }
+
+    return bSuccess;
+}
+
+
+BOOL
+LookupUserGroupFromRid(
+    LPWSTR TargetComputer,
+    DWORD Rid,
+    LPWSTR Name,
+    PDWORD cchName
+    )
+{
+    PUSER_MODALS_INFO_2 umi2;
+    NET_API_STATUS nas;
+
+    UCHAR SubAuthorityCount;
+    PSID pSid;
+    SID_NAME_USE snu;
+
+    WCHAR DomainName[DNLEN+1];
+    DWORD cchDomainName = DNLEN;
+    BOOL bSuccess = FALSE; // assume failure
+
+    //
+    // get the account domain Sid on the target machine
+    // note: if you were looking up multiple sids based on the same
+    // account domain, only need to call this once.
+    //
+
+    nas = NetUserModalsGet(TargetComputer, 2, (LPBYTE *)&umi2);
+
+    if(nas != NERR_Success) {
+        SetLastError(nas);
+        return FALSE;
+    }
+
+    SubAuthorityCount = *GetSidSubAuthorityCount
+                        (umi2->usrmod2_domain_id);
+
+    //
+    // allocate storage for new Sid. account domain Sid + account Rid
+    //
+
+    pSid = (PSID)HeapAlloc(GetProcessHeap(), 0,
+            GetSidLengthRequired((UCHAR)(SubAuthorityCount + 1)));
+
+    if(pSid != NULL) {
+
+        if(InitializeSid(
+                pSid,
+                GetSidIdentifierAuthority(umi2->usrmod2_domain_id),
+                (BYTE)(SubAuthorityCount+1)
+                )) {
+
+            DWORD SubAuthIndex = 0;
+
+            //
+            // copy existing subauthorities from account domain Sid into
+            // new Sid
+            //
+
+            for( ; SubAuthIndex < SubAuthorityCount ; SubAuthIndex++) {
+                *GetSidSubAuthority(pSid, SubAuthIndex) =
+                *GetSidSubAuthority(umi2->usrmod2_domain_id,
+                                    SubAuthIndex);
+            }
+
+            //
+            // append Rid to new Sid
+            //
+
+            *GetSidSubAuthority(pSid, SubAuthorityCount) = Rid;
+
+            bSuccess = LookupAccountSidW(
+                    TargetComputer,
+                    pSid,
+                    Name,
+                    cchName,
+                    DomainName,
+                    &cchDomainName,
+                    &snu
+                    );
+        }
+
+        HeapFree(GetProcessHeap(), 0, pSid);
+    }
+
+    NetApiBufferFree(umi2);
+
+    return bSuccess;
+}
+
+const char *BOINC_RCSID_c563201b83="$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/lsaprivs.cpp b/win_build/installerv2/redist/Windows/src/boinccas/lsaprivs.cpp
new file mode 100644
index 0000000..ec714ce
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/lsaprivs.cpp
@@ -0,0 +1,301 @@
+/*++
+
+Copyright 1996 - 1997 Microsoft Corporation
+
+Module Name:
+
+    privs.c
+
+Abstract:
+
+    This module illustrates how to use the Windows NT LSA security API
+    to manage account privileges on the local or a remote machine.
+
+    When targetting a domain controller for privilege update operations,
+    be sure to target the primary domain controller for the domain.
+    The privilege settings are replicated by the primary domain controller
+    to each backup domain controller as appropriate.  The NetGetDCName()
+    Lan Manager API call can be used to get the primary domain controller
+    computer name from a domain name.
+
+    For a list of privilges, consult winnt.h, and search for
+    SE_ASSIGNPRIMARYTOKEN_NAME.
+
+    For a list of logon rights, which can also be assigned using this
+    sample code, consult ntsecapi.h, and search for SE_BATCH_LOGON_NAME
+
+    You can use domain\account as argv[1]. For instance, mydomain\scott will
+    grant the privilege to the mydomain domain account scott.
+
+    The optional target machine is specified as argv[2], otherwise, the
+    account database is updated on the local machine.
+
+    The LSA APIs used by this sample are Unicode only.
+
+    Use LsaRemoveAccountRights() to remove account rights.
+
+Author:
+
+    Scott Field (sfield)    17-Apr-96
+        Minor cleanup
+
+    Scott Field (sfield)    12-Jul-95
+
+--*/
+
+#include "stdafx.h"
+#include "lsaprivs.h"
+
+
+/*++
+This function attempts to obtain a SID representing the supplied
+account on the supplied system.
+
+If the function succeeds, the return value is TRUE. A buffer is
+allocated which contains the SID representing the supplied account.
+This buffer should be freed when it is no longer needed by calling
+HeapFree(GetProcessHeap(), 0, buffer)
+
+If the function fails, the return value is FALSE. Call GetLastError()
+to obtain extended error information.
+
+Scott Field (sfield)    12-Jul-95
+--*/
+
+BOOL
+GetAccountSid(
+    LPCTSTR SystemName,
+    LPCTSTR AccountName,
+    PSID *Sid
+    )
+{
+    LPTSTR ReferencedDomain=NULL;
+    DWORD cbSid=128;    // initial allocation attempt
+    DWORD cchReferencedDomain=16; // initial allocation size
+    SID_NAME_USE peUse;
+    BOOL bSuccess=FALSE; // assume this function will fail
+
+    __try {
+
+    //
+    // initial memory allocations
+    //
+    *Sid = (PSID)HeapAlloc(GetProcessHeap(), 0, cbSid);
+
+    if(*Sid == NULL) __leave;
+
+    ReferencedDomain = (LPTSTR)HeapAlloc(
+                    GetProcessHeap(),
+                    0,
+                    cchReferencedDomain * sizeof(TCHAR)
+                    );
+
+    if(ReferencedDomain == NULL) __leave;
+
+    //
+    // Obtain the SID of the specified account on the specified system.
+    //
+    while(!LookupAccountName(
+                    SystemName,         // machine to lookup account on
+                    AccountName,        // account to lookup
+                    *Sid,               // SID of interest
+                    &cbSid,             // size of SID
+                    ReferencedDomain,   // domain account was found on
+                    &cchReferencedDomain,
+                    &peUse
+                    )) {
+        if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+            //
+            // reallocate memory
+            //
+            *Sid = (PSID)HeapReAlloc(
+                        GetProcessHeap(),
+                        0,
+                        *Sid,
+                        cbSid
+                        );
+            if(*Sid == NULL) __leave;
+
+            ReferencedDomain = (LPTSTR)HeapReAlloc(
+                        GetProcessHeap(),
+                        0,
+                        ReferencedDomain,
+                        cchReferencedDomain * sizeof(TCHAR)
+                        );
+            if(ReferencedDomain == NULL) __leave;
+        }
+        else __leave;
+    }
+
+    //
+    // Indicate success.
+    //
+    bSuccess = TRUE;
+
+    } // try
+    __finally {
+
+    //
+    // Cleanup and indicate failure, if appropriate.
+    //
+
+    HeapFree(GetProcessHeap(), 0, ReferencedDomain);
+
+    if(!bSuccess) {
+        if(*Sid != NULL) {
+            HeapFree(GetProcessHeap(), 0, *Sid);
+            *Sid = NULL;
+        }
+    }
+
+    } // finally
+
+    return bSuccess;
+}
+
+NTSTATUS
+SetPrivilegeOnAccount(
+    LSA_HANDLE PolicyHandle,    // open policy handle
+    PSID AccountSid,            // SID to grant privilege to
+    LPWSTR PrivilegeName,       // privilege to grant (Unicode)
+    BOOL bEnable                // enable or disable
+    )
+{
+    LSA_UNICODE_STRING PrivilegeString;
+
+    //
+    // Create a LSA_UNICODE_STRING for the privilege name.
+    //
+    InitLsaString(&PrivilegeString, PrivilegeName);
+
+    //
+    // grant or revoke the privilege, accordingly
+    //
+    if(bEnable) {
+        return LsaAddAccountRights(
+                PolicyHandle,       // open policy handle
+                AccountSid,         // target SID
+                &PrivilegeString,   // privileges
+                1                   // privilege count
+                );
+    }
+    else {
+        return LsaRemoveAccountRights(
+                PolicyHandle,       // open policy handle
+                AccountSid,         // target SID
+                FALSE,              // do not disable all rights
+                &PrivilegeString,   // privileges
+                1                   // privilege count
+                );
+    }
+}
+
+void
+InitLsaString(
+    PLSA_UNICODE_STRING LsaString,
+    LPWSTR String
+    )
+{
+    DWORD StringLength;
+
+    if(String == NULL) {
+        LsaString->Buffer = NULL;
+        LsaString->Length = 0;
+        LsaString->MaximumLength = 0;
+        return;
+    }
+
+    StringLength = lstrlenW(String);
+    LsaString->Buffer = String;
+    LsaString->Length = (USHORT) StringLength * sizeof(WCHAR);
+    LsaString->MaximumLength=(USHORT)(StringLength+1) * sizeof(WCHAR);
+}
+
+NTSTATUS
+OpenPolicy(
+    LPWSTR ServerName,
+    DWORD DesiredAccess,
+    PLSA_HANDLE PolicyHandle
+    )
+{
+    LSA_OBJECT_ATTRIBUTES ObjectAttributes;
+    LSA_UNICODE_STRING ServerString;
+    PLSA_UNICODE_STRING Server;
+
+    //
+    // Always initialize the object attributes to all zeroes.
+    //
+    ZeroMemory(&ObjectAttributes, sizeof(ObjectAttributes));
+
+    if (ServerName != NULL) {
+        //
+        // Make a LSA_UNICODE_STRING out of the LPWSTR passed in
+        //
+        InitLsaString(&ServerString, ServerName);
+        Server = &ServerString;
+    } else {
+        Server = NULL;
+    }
+
+    //
+    // Attempt to open the policy.
+    //
+    return LsaOpenPolicy(
+                Server,
+                &ObjectAttributes,
+                DesiredAccess,
+                PolicyHandle
+                );
+}
+
+
+BOOL
+GrantUserRight(
+    PSID    psidAccountSid,
+    LPWSTR  pszUserRight,
+    BOOL    bEnable
+    )
+{
+    LSA_HANDLE  PolicyHandle = NULL;
+    NTSTATUS    Status;
+
+    //
+    // Open the policy on the local host.
+    //
+    Status = OpenPolicy(
+                _T(""),
+                POLICY_CREATE_ACCOUNT | POLICY_LOOKUP_NAMES,
+                &PolicyHandle
+                );
+
+
+    if(Status != STATUS_SUCCESS) {
+        return FALSE;
+    }
+
+
+    //
+    // Grant the requested user right represented by psidAccountSid.
+    //
+    Status = SetPrivilegeOnAccount(
+                PolicyHandle,                   // policy handle
+                psidAccountSid,                 // SID to grant privilege
+                pszUserRight,                   // Unicode privilege
+                bEnable                         // enable the privilege
+                );
+
+    if(Status != STATUS_SUCCESS)
+    {
+        LsaClose(PolicyHandle);
+        return FALSE;
+    }
+
+    //
+    // Cleanup any handles and memory allocated during the custom action
+    //
+    LsaClose(PolicyHandle);
+    return TRUE;
+}
+
+
+const char *BOINC_RCSID_0a9587b165 = "$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/lsaprivs.h b/win_build/installerv2/redist/Windows/src/boinccas/lsaprivs.h
new file mode 100644
index 0000000..6ac2a7f
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/lsaprivs.h
@@ -0,0 +1,82 @@
+/*++
+
+Copyright 1996 - 1997 Microsoft Corporation
+
+Module Name:
+
+    privs.c
+
+Abstract:
+
+    This module illustrates how to use the Windows NT LSA security API
+    to manage account privileges on the local or a remote machine.
+
+    When targetting a domain controller for privilege update operations,
+    be sure to target the primary domain controller for the domain.
+    The privilege settings are replicated by the primary domain controller
+    to each backup domain controller as appropriate.  The NetGetDCName()
+    Lan Manager API call can be used to get the primary domain controller
+    computer name from a domain name.
+
+    For a list of privilges, consult winnt.h, and search for
+    SE_ASSIGNPRIMARYTOKEN_NAME.
+
+    For a list of logon rights, which can also be assigned using this
+    sample code, consult ntsecapi.h, and search for SE_BATCH_LOGON_NAME
+
+    You can use domain\account as argv[1]. For instance, mydomain\scott will
+    grant the privilege to the mydomain domain account scott.
+
+    The optional target machine is specified as argv[2], otherwise, the
+    account database is updated on the local machine.
+
+    The LSA APIs used by this sample are Unicode only.
+
+    Use LsaRemoveAccountRights() to remove account rights.
+
+Author:
+
+    Scott Field (sfield)    17-Apr-96
+        Minor cleanup
+
+    Scott Field (sfield)    12-Jul-95
+
+--*/
+
+#pragma once
+
+
+NTSTATUS
+OpenPolicy(
+    LPWSTR ServerName,          // machine to open policy on (Unicode)
+    DWORD DesiredAccess,        // desired access to policy
+    PLSA_HANDLE PolicyHandle    // resultant policy handle
+    );
+
+BOOL
+GetAccountSid(
+    LPCTSTR SystemName,         // where to lookup account
+    LPCTSTR AccountName,        // account of interest
+    PSID *Sid                   // resultant buffer containing SID
+    );
+
+NTSTATUS
+SetPrivilegeOnAccount(
+    LSA_HANDLE PolicyHandle,    // open policy handle
+    PSID AccountSid,            // SID to grant privilege to
+    LPWSTR PrivilegeName,       // privilege to grant (Unicode)
+    BOOL bEnable                // enable or disable
+    );
+
+void
+InitLsaString(
+    PLSA_UNICODE_STRING LsaString, // destination
+    LPWSTR String                  // source (Unicode)
+    );
+
+BOOL
+GrantUserRight(
+    PSID    psidAccountSid,
+    LPWSTR  pszUserRight,
+    BOOL    bEnable
+    );
\ No newline at end of file
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/main.cpp b/win_build/installerv2/redist/Windows/src/boinccas/main.cpp
new file mode 100644
index 0000000..e523b64
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/main.cpp
@@ -0,0 +1,47 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+
+HINSTANCE g_hInstance = NULL;
+
+
+BOOL APIENTRY DllMain( HINSTANCE hInstance, 
+                       DWORD     dwReason, 
+                       LPVOID    lpReserved
+					 )
+{
+    LPVOID lpJunk = NULL;
+
+    g_hInstance = hInstance;
+    lpJunk = lpReserved;
+
+    switch( dwReason )
+    {
+    case DLL_PROCESS_ATTACH:
+    case DLL_THREAD_ATTACH:
+    case DLL_THREAD_DETACH:
+    case DLL_PROCESS_DETACH:
+        break;
+    }
+    return TRUE;
+
+}
+const char *BOINC_RCSID_c03f6a25f3="$Id$";
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/main.h b/win_build/installerv2/redist/Windows/src/boinccas/main.h
new file mode 100644
index 0000000..f8a79a9
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/main.h
@@ -0,0 +1,26 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _MAIN_H_
+
+extern HINSTANCE g_hInstance;
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/password.cpp b/win_build/installerv2/redist/Windows/src/boinccas/password.cpp
new file mode 100644
index 0000000..cfabc9e
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/password.cpp
@@ -0,0 +1,139 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+//
+// Source Code Originally from:
+// http://support.microsoft.com/kb/814463
+//
+
+#include "stdafx.h"
+#include "password.h"
+
+//Generates a Random string of length nLen - 1.  Buffer ppwd must allocate an extra character for null terminator.
+//Returns TRUE if successful, FALSE if fails.
+//Extended error information can be obtained from GetLastError().
+BOOL GenPwd(TCHAR* ppwd, int nLen)
+{
+	BOOL bResult = FALSE;	//assume failure
+	HCRYPTPROV hProv = NULL;
+	HCRYPTHASH hHash = NULL;
+	
+	//Storage for random string 4 times longer than the resulting password.
+	DWORD dwBufSize = nLen*4;
+	DWORD dwSize = Base64EncodeGetRequiredLength((int)dwBufSize);
+	LPSTR pEncodedString = NULL;
+	LPBYTE pRandomBuf = NULL;
+	TCHAR* pTRandomPwd = NULL;
+	
+	try
+	{
+		pEncodedString = new char[dwSize];
+		pRandomBuf = new BYTE[dwBufSize];
+		
+		// Try to acquire context to Crypto provider.
+		if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_SILENT))
+		{
+			if (GetLastError() == NTE_BAD_KEYSET) //Test for non-existent keyset
+			{
+				if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_SILENT | CRYPT_NEWKEYSET))
+					throw(GetLastError());
+			}
+			else
+				throw(GetLastError());
+		}
+
+		//Generate a random sequence.
+		if (!CryptGenRandom(hProv, dwBufSize, pRandomBuf))
+		{
+			throw(GetLastError());
+		}
+
+		//Get a handle to a hash, then hash the random stream.
+		if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash))
+		{
+			throw(GetLastError());
+		}
+
+		if (!CryptHashData(hHash, pRandomBuf, dwBufSize, NULL))
+		{
+			throw(GetLastError());
+		}
+	
+		//Destroy the hash object.
+		CryptDestroyHash(hHash);
+		//Release Provider context
+		CryptReleaseContext(hProv, 0);	
+	
+		//Encode the hash value to base64.
+		if (!Base64Encode(pRandomBuf, dwBufSize, pEncodedString, (int*) &dwSize, 0))
+		{
+			throw(GetLastError());
+		}
+	
+		//Determine how many tchars you need to convert string to base64.
+		int nTchars = (int) strlen(pEncodedString);
+	
+		pTRandomPwd = new TCHAR[nTchars];
+	
+#ifdef UNICODE
+		if (MultiByteToWideChar(CP_UTF8, 0, pEncodedString, nTchars, pTRandomPwd, nTchars) == 0)
+		{
+			throw(GetLastError());
+		}
+#else
+		_tcsncpy( pTRandomPwd, pEncodedString, nLen);
+#endif
+
+		//Copy the first x characters of random string to output buffer.
+		_tcsncpy(ppwd, pTRandomPwd, nLen);
+		//Add null terminator to ppwd string.
+		ppwd[nLen] = _T('\0');
+
+		bResult = TRUE;
+
+	}
+	catch (DWORD)
+	{
+		//Set return value to false.
+		bResult = FALSE;
+	}
+	catch (...)
+	{
+		//Unknown error, throw. 
+		throw;
+	}
+
+	//Clean up memory.
+	if (pRandomBuf)
+	{
+		delete pRandomBuf;
+		pRandomBuf = NULL;
+	}
+
+	if (pEncodedString)
+	{
+		delete pEncodedString;
+		pEncodedString = NULL;
+	}
+
+	if (pTRandomPwd)
+	{
+		delete pTRandomPwd;
+		pTRandomPwd = NULL;
+	}
+
+	return bResult;
+}
+
+
+BOOL GenerateRandomPassword( tstring& strPassword, DWORD dwDesiredLength )
+{
+    TCHAR szBuffer[512];
+    BOOL  bReturnValue = FALSE;
+
+    bReturnValue = GenPwd(szBuffer, dwDesiredLength);
+
+    strPassword = szBuffer;
+
+    return bReturnValue;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/password.h b/win_build/installerv2/redist/Windows/src/boinccas/password.h
new file mode 100644
index 0000000..365a8e5
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/password.h
@@ -0,0 +1,15 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+//
+// Source Code Originally from:
+// http://support.microsoft.com/kb/814463
+//
+
+#ifndef _BOINC_PASSWORD_
+#define _BOINC_PASSWORD_
+
+// Prototypes
+BOOL GenerateRandomPassword( tstring& strPassword, DWORD dwDesiredLength );
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/sdmgmt.cpp b/win_build/installerv2/redist/Windows/src/boinccas/sdmgmt.cpp
new file mode 100644
index 0000000..cae6484
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/sdmgmt.cpp
@@ -0,0 +1,519 @@
+/*++
+
+DCOM Permission Configuration Sample
+Copyright (c) 1996, Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+    sdmgmt.cpp
+
+Abstract:
+
+    Routines to manage security descriptors
+
+Author:
+
+    Michael Nelson
+
+Environment:
+
+    Windows NT
+
+--*/
+
+#include "stdafx.h"
+#include "lsaprivs.h"
+#include "ntsecapi.h"
+#include "dcomperm.h"
+
+DWORD
+CreateNewSD (
+    SECURITY_DESCRIPTOR **SD
+    )
+{
+    PACL    dacl;
+    DWORD   sidLength;
+    PSID    sid;
+    PSID    groupSID;
+    PSID    ownerSID;
+    DWORD   returnValue;
+
+    *SD = NULL;
+
+    returnValue = GetCurrentUserSID (&sid);
+    if (returnValue != ERROR_SUCCESS)
+        return returnValue;
+
+    sidLength = GetLengthSid (sid);
+
+    *SD = (SECURITY_DESCRIPTOR *) malloc (
+        (sizeof (ACL)+sizeof (ACCESS_ALLOWED_ACE)+sidLength) +
+        (2 * sidLength) +
+        sizeof (SECURITY_DESCRIPTOR));
+
+    groupSID = (SID *) (*SD + 1);
+    ownerSID = (SID *) (((BYTE *) groupSID) + sidLength);
+    dacl = (ACL *) (((BYTE *) ownerSID) + sidLength);
+
+    if (!InitializeSecurityDescriptor (*SD, SECURITY_DESCRIPTOR_REVISION))
+    {
+        free (*SD);
+        free (sid);
+        return GetLastError();
+    }
+
+    if (!InitializeAcl (dacl,
+                        sizeof (ACL)+sizeof (ACCESS_ALLOWED_ACE)+sidLength,
+                        ACL_REVISION2))
+    {
+        free (*SD);
+        free (sid);
+        return GetLastError();
+    }
+
+    if (!AddAccessAllowedAce (dacl,
+                              ACL_REVISION2,
+                              COM_RIGHTS_EXECUTE,
+                              sid))
+    {
+        free (*SD);
+        free (sid);
+        return GetLastError();
+    }
+
+    if (!SetSecurityDescriptorDacl (*SD, TRUE, dacl, FALSE))
+    {
+        free (*SD);
+        free (sid);
+        return GetLastError();
+    }
+
+    memcpy (groupSID, sid, sidLength);
+    if (!SetSecurityDescriptorGroup (*SD, groupSID, FALSE))
+    {
+        free (*SD);
+        free (sid);
+        return GetLastError();
+    }
+
+    memcpy (ownerSID, sid, sidLength);
+    if (!SetSecurityDescriptorOwner (*SD, ownerSID, FALSE))
+    {
+        free (*SD);
+        free (sid);
+        return GetLastError();
+    }
+    return ERROR_SUCCESS;
+}
+
+
+DWORD
+MakeSDAbsolute (
+    PSECURITY_DESCRIPTOR OldSD,
+    PSECURITY_DESCRIPTOR *NewSD
+    )
+{
+    PSECURITY_DESCRIPTOR  sd=NULL;
+    DWORD                 descriptorSize;
+    DWORD                 daclSize;
+    DWORD                 saclSize;
+    DWORD                 ownerSIDSize;
+    DWORD                 groupSIDSize;
+    PACL                  dacl;
+    PACL                  sacl;
+    PSID                  ownerSID;
+    PSID                  groupSID;
+    BOOL                  present;
+    BOOL                  systemDefault;
+
+    //
+    // Get SACL
+    //
+
+    if (!GetSecurityDescriptorSacl (OldSD, &present, &sacl, &systemDefault))
+        return GetLastError();
+
+    if (sacl && present)
+    {
+        saclSize = sacl->AclSize;
+    } else saclSize = 0;
+
+    //
+    // Get DACL
+    //
+
+    if (!GetSecurityDescriptorDacl (OldSD, &present, &dacl, &systemDefault))
+        return GetLastError();
+
+    if (dacl && present)
+    {
+        daclSize = dacl->AclSize;
+    } else daclSize = 0;
+
+    //
+    // Get Owner
+    //
+
+    if (!GetSecurityDescriptorOwner (OldSD, &ownerSID, &systemDefault))
+        return GetLastError();
+
+    ownerSIDSize = GetLengthSid (ownerSID);
+
+    //
+    // Get Group
+    //
+
+    if (!GetSecurityDescriptorGroup (OldSD, &groupSID, &systemDefault))
+        return GetLastError();
+
+    groupSIDSize = GetLengthSid (groupSID);
+
+    //
+    // Do the conversion
+    //
+
+    descriptorSize = 0;
+
+    MakeAbsoluteSD (OldSD, sd, &descriptorSize, dacl, &daclSize, sacl,
+                    &saclSize, ownerSID, &ownerSIDSize, groupSID,
+                    &groupSIDSize);
+
+    sd = (PSECURITY_DESCRIPTOR) new BYTE [SECURITY_DESCRIPTOR_MIN_LENGTH];
+    if (!InitializeSecurityDescriptor (sd, SECURITY_DESCRIPTOR_REVISION))
+        return GetLastError();
+
+    if (!MakeAbsoluteSD (OldSD, sd, &descriptorSize, dacl, &daclSize, sacl,
+                         &saclSize, ownerSID, &ownerSIDSize, groupSID,
+                         &groupSIDSize))
+        return GetLastError();
+
+    *NewSD = sd;
+    return ERROR_SUCCESS;
+}
+
+DWORD
+SetNamedValueSD (
+    HKEY RootKey,
+    LPTSTR KeyName,
+    LPTSTR ValueName,
+    SECURITY_DESCRIPTOR *SD
+    )
+{
+    DWORD   returnValue;
+    DWORD   disposition;
+    HKEY    registryKey;
+
+    //
+    // Create new key or open existing key
+    //
+
+    returnValue = RegCreateKeyEx (RootKey, KeyName, 0, TEXT(""), 0, KEY_ALL_ACCESS, NULL, &registryKey, &disposition);
+    if (returnValue != ERROR_SUCCESS)
+        return returnValue;
+
+    //
+    // Write the security descriptor
+    //
+
+    returnValue = RegSetValueEx (registryKey, ValueName, 0, REG_BINARY, (LPBYTE) SD, GetSecurityDescriptorLength (SD));
+    if (returnValue != ERROR_SUCCESS)
+        return returnValue;
+
+    RegCloseKey (registryKey);
+
+    return ERROR_SUCCESS;
+}
+
+DWORD
+GetNamedValueSD (
+    HKEY RootKey,
+    LPTSTR KeyName,
+    LPTSTR ValueName,
+    SECURITY_DESCRIPTOR **SD,
+    BOOL *NewSD
+    )
+{
+    DWORD               returnValue;
+    HKEY                registryKey;
+    DWORD               valueType;
+    DWORD               valueSize;
+
+    *NewSD = FALSE;
+
+    //
+    // Get the security descriptor from the named value. If it doesn't
+    // exist, create a fresh one.
+    //
+
+    returnValue = RegOpenKeyEx (RootKey, KeyName, 0, KEY_ALL_ACCESS, &registryKey);
+
+    if (returnValue != ERROR_SUCCESS)
+    {
+        if (returnValue == ERROR_FILE_NOT_FOUND)
+        {
+            *SD = NULL;
+            returnValue = CreateNewSD (SD);
+            if (returnValue != ERROR_SUCCESS)
+                return returnValue;
+
+            *NewSD = TRUE;
+            return ERROR_SUCCESS;
+        } else
+            return returnValue;
+    }
+
+    returnValue = RegQueryValueEx (registryKey, ValueName, NULL, &valueType, NULL, &valueSize);
+
+    if (returnValue && returnValue != ERROR_INSUFFICIENT_BUFFER)
+    {
+        *SD = NULL;
+        returnValue = CreateNewSD (SD);
+        if (returnValue != ERROR_SUCCESS)
+            return returnValue;
+
+        *NewSD = TRUE;
+    } else
+    {
+        *SD = (SECURITY_DESCRIPTOR *) malloc (valueSize);
+
+        returnValue = RegQueryValueEx (registryKey, ValueName, NULL, &valueType, (LPBYTE) *SD, &valueSize);
+        if (returnValue)
+        {
+            free (*SD);
+
+            *SD = NULL;
+            returnValue = CreateNewSD (SD);
+            if (returnValue != ERROR_SUCCESS)
+                return returnValue;
+
+            *NewSD = TRUE;
+        }
+    }
+
+    RegCloseKey (registryKey);
+
+    return ERROR_SUCCESS;
+}
+
+DWORD
+ListNamedValueSD (
+    HKEY RootKey,
+    LPTSTR KeyName,
+    LPTSTR ValueName
+    )
+{
+    DWORD               returnValue;
+    SECURITY_DESCRIPTOR *sd;
+    BOOL                present;
+    BOOL                defaultDACL;
+    PACL                dacl;
+    BOOL                newSD = FALSE;
+
+    returnValue = GetNamedValueSD (RootKey, KeyName, ValueName, &sd, &newSD);
+
+    if ((returnValue != ERROR_SUCCESS) || (newSD == TRUE))
+    {
+        free (sd);
+        return returnValue;
+    }
+
+    if (!GetSecurityDescriptorDacl (sd, &present, &dacl, &defaultDACL))
+    {
+        free (sd);
+        return GetLastError();
+    }
+
+    if (!present)
+    {
+        free (sd);
+        return ERROR_SUCCESS;
+    }
+
+    ListACL (dacl);
+
+    free (sd);
+
+    return ERROR_SUCCESS;
+}
+
+DWORD
+AddPrincipalToNamedValueSD (
+    HKEY RootKey,
+    LPTSTR KeyName,
+    LPTSTR ValueName,
+    LPTSTR Principal,
+    BOOL Permit
+    )
+{
+    DWORD               returnValue;
+    SECURITY_DESCRIPTOR *sd=NULL;
+    SECURITY_DESCRIPTOR *sdSelfRelative=NULL;
+    SECURITY_DESCRIPTOR *sdAbsolute=NULL;
+    DWORD               secDescSize;
+    BOOL                present;
+    BOOL                defaultDACL;
+    PACL                dacl;
+    BOOL                newSD = FALSE;
+
+    returnValue = GetNamedValueSD (RootKey, KeyName, ValueName, &sd, &newSD);
+
+    //
+    // Get security descriptor from registry or create a new one
+    //
+
+    if (returnValue != ERROR_SUCCESS)
+        return returnValue;
+
+    if (!GetSecurityDescriptorDacl (sd, &present, &dacl, &defaultDACL))
+        return GetLastError();
+
+    if (newSD)
+    {
+        AddAccessAllowedACEToACL (&dacl, COM_RIGHTS_EXECUTE, TEXT("SYSTEM"));
+        AddAccessAllowedACEToACL (&dacl, COM_RIGHTS_EXECUTE, TEXT("INTERACTIVE"));
+    }
+
+    //
+    // Add the Principal that the caller wants added
+    //
+
+    if (Permit)
+        returnValue = AddAccessAllowedACEToACL (&dacl, COM_RIGHTS_EXECUTE, Principal); else
+        returnValue = AddAccessDeniedACEToACL (&dacl, GENERIC_ALL, Principal);
+
+    if (returnValue != ERROR_SUCCESS)
+    {
+        free (sd);
+        return returnValue;
+    }
+
+    //
+    // Make the security descriptor absolute if it isn't new
+    //
+
+    if (!newSD)
+        MakeSDAbsolute ((PSECURITY_DESCRIPTOR) sd, (PSECURITY_DESCRIPTOR *) &sdAbsolute); else
+        sdAbsolute = sd;
+
+    //
+    // Set the discretionary ACL on the security descriptor
+    //
+
+    if (!SetSecurityDescriptorDacl (sdAbsolute, TRUE, dacl, FALSE))
+        return GetLastError();
+
+    //
+    // Make the security descriptor self-relative so that we can
+    // store it in the registry
+    //
+
+    secDescSize = 0;
+    MakeSelfRelativeSD (sdAbsolute, sdSelfRelative, &secDescSize);
+    sdSelfRelative = (SECURITY_DESCRIPTOR *) malloc (secDescSize);
+    if (!MakeSelfRelativeSD (sdAbsolute, sdSelfRelative, &secDescSize))
+        return GetLastError();
+
+    //
+    // Store the security descriptor in the registry
+    //
+
+    SetNamedValueSD (RootKey, KeyName, ValueName, sdSelfRelative);
+
+    free (sd);
+    free (sdSelfRelative);
+    free (sdAbsolute);
+
+    return ERROR_SUCCESS;
+}
+
+DWORD
+RemovePrincipalFromNamedValueSD (
+    HKEY RootKey,
+    LPTSTR KeyName,
+    LPTSTR ValueName,
+    LPTSTR Principal
+    )
+{
+    DWORD               returnValue;
+    SECURITY_DESCRIPTOR *sd=NULL;
+    SECURITY_DESCRIPTOR *sdSelfRelative=NULL;
+    SECURITY_DESCRIPTOR *sdAbsolute=NULL;
+    DWORD               secDescSize;
+    BOOL                present;
+    BOOL                defaultDACL;
+    PACL                dacl;
+    BOOL                newSD = FALSE;
+
+    returnValue = GetNamedValueSD (RootKey, KeyName, ValueName, &sd, &newSD);
+
+    //
+    // Get security descriptor from registry or create a new one
+    //
+
+    if (returnValue != ERROR_SUCCESS)
+        return returnValue;
+
+    if (!GetSecurityDescriptorDacl (sd, &present, &dacl, &defaultDACL))
+        return GetLastError();
+
+    //
+    // If the security descriptor is new, add the required Principals to it
+    //
+
+    if (newSD)
+    {
+        AddAccessAllowedACEToACL (&dacl, COM_RIGHTS_EXECUTE, TEXT("SYSTEM"));
+        AddAccessAllowedACEToACL (&dacl, COM_RIGHTS_EXECUTE, TEXT("INTERACTIVE"));
+    }
+
+    //
+    // Remove the Principal that the caller wants removed
+    //
+
+    returnValue = RemovePrincipalFromACL (dacl, Principal);
+    if (returnValue != ERROR_SUCCESS)
+    {
+        free (sd);
+        return returnValue;
+    }
+
+    //
+    // Make the security descriptor absolute if it isn't new
+    //
+
+    if (!newSD)
+        MakeSDAbsolute ((PSECURITY_DESCRIPTOR) sd, (PSECURITY_DESCRIPTOR *) &sdAbsolute); 
+	else
+        sdAbsolute = sd;
+
+    //
+    // Set the discretionary ACL on the security descriptor
+    //
+
+    if (!SetSecurityDescriptorDacl (sdAbsolute, TRUE, dacl, FALSE))
+        return GetLastError();
+
+    //
+    // Make the security descriptor self-relative so that we can
+    // store it in the registry
+    //
+
+    secDescSize = 0;
+    MakeSelfRelativeSD (sdAbsolute, sdSelfRelative, &secDescSize);
+    sdSelfRelative = (SECURITY_DESCRIPTOR *) malloc (secDescSize);
+    if (!MakeSelfRelativeSD (sdAbsolute, sdSelfRelative, &secDescSize))
+        return GetLastError();
+
+    //
+    // Store the security descriptor in the registry
+    //
+
+    SetNamedValueSD (RootKey, KeyName, ValueName, sdSelfRelative);
+
+    free (sd);
+    free (sdSelfRelative);
+	if (!newSD)
+		free (sdAbsolute);
+
+    return ERROR_SUCCESS;
+}
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/stdafx.h b/win_build/installerv2/redist/Windows/src/boinccas/stdafx.h
new file mode 100644
index 0000000..a79a47b
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/stdafx.h
@@ -0,0 +1,119 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#ifndef _STDAFX_H_
+#define _STDAFX_H_
+
+// Windows System Libraries
+//
+
+// Visual Studio 2005 has extended the C Run-Time Library by including "secure"
+// runtime functions and deprecating the previous function prototypes.  Since
+// we need to use the previous prototypes to maintain compatibility with other
+// platforms we are going to disable the deprecation warnings if we are compiling
+// on Visual Studio 2005
+#if _MSC_VER >= 1400
+#ifndef _CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_DEPRECATE
+#endif
+#endif
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+
+#ifndef WINVER                  // Allow use of features specific to Windows 2000 or later.
+#define WINVER 0x0500           // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINNT            // Allow use of features specific to Windows 2000 or later.
+#define _WIN32_WINNT 0x0500		// Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINDOWS          // Allow use of features specific to Windows 2000 or later.
+#define _WIN32_WINDOWS 0x0500   // Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE               // Allow use of features specific to IE 5.0 or later.
+#define _WIN32_IE 0x0500        // Change this to the appropriate value to target IE 5.0 or later.
+#endif
+
+#ifndef _WIN32_MSI              // Need to specify the smallest version of Windows Installer
+#define _WIN32_MSI 200          // that supports file hashing. This is version 2.0.
+#endif
+
+
+// ATL Headers Files:
+#include <atlbase.h>
+#include <atlenc.h>
+
+// Windows Header Files:
+#include <windows.h>
+#include <crtdbg.h>
+#include <delayimp.h>
+#include <msiquery.h>
+#include <ntsecapi.h>
+#include <lm.h>
+#include <shlobj.h>
+#include <sddl.h>
+#include <wincrypt.h>
+#include <aclapi.h>
+#include <winsafer.h>
+
+// CRT Header Files:
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <errno.h>
+
+// STL Header Files:
+#include <cassert>
+#include <cstdio>
+#include <string>
+#include <iostream>
+#include <sstream>
+#include <vector>
+
+// Misc Includes
+#include <tchar.h>
+
+#ifdef _UNICODE
+#define tstring std::wstring
+#define tostringstream std::wostringstream
+#else
+#define tstring std::string
+#define tostringstream std::ostringstream
+#endif
+
+
+// Define symbols not already defined in the SDK.
+//
+
+#ifndef STATUS_SUCCESS
+#define STATUS_SUCCESS  ((NTSTATUS)0x00000000L)
+#endif
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/terminate.cpp b/win_build/installerv2/redist/Windows/src/boinccas/terminate.cpp
new file mode 100644
index 0000000..a79e5d7
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/terminate.cpp
@@ -0,0 +1,177 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "terminate.h"
+
+
+// NtQuerySystemInformation
+typedef NTSTATUS (WINAPI *tNTQSI)(
+    ULONG SystemInformationClass,
+    PVOID SystemInformation,
+    ULONG SystemInformationLength,
+    PULONG ReturnLength
+);
+
+
+// Provide a structure to store process measurements at the time of a
+//   crash.
+typedef struct _BOINC_PROCESS {
+    DWORD               dwProcessId;
+    DWORD               dwParentProcessId;
+    tstring             strProcessName;
+} BOINC_PROCESS, *PBOINC_PROCESS;
+
+
+int diagnostics_get_process_information(PVOID* ppBuffer, PULONG pcbBuffer) {
+    int      retval = 0;
+    NTSTATUS Status = STATUS_INFO_LENGTH_MISMATCH;
+    HANDLE   hHeap  = GetProcessHeap();
+    HMODULE  hNTDllLib = NULL;
+    tNTQSI   pNTQSI = NULL;
+
+    hNTDllLib = GetModuleHandle(_T("ntdll.dll"));
+    pNTQSI = (tNTQSI)GetProcAddress(hNTDllLib, "NtQuerySystemInformation");
+
+    do {
+        *ppBuffer = HeapAlloc(hHeap, HEAP_ZERO_MEMORY, *pcbBuffer);
+        if (ppBuffer == NULL) {
+            retval = ERROR_NOT_ENOUGH_MEMORY;
+        }
+
+        Status = pNTQSI(
+            SystemProcessAndThreadInformation,
+            *ppBuffer,
+            *pcbBuffer,
+            pcbBuffer
+        );
+
+        if (Status == STATUS_INFO_LENGTH_MISMATCH) {
+            HeapFree(hHeap, NULL, *ppBuffer);
+            *pcbBuffer *= 2;
+        } else if (!NT_SUCCESS(Status)) {
+            HeapFree(hHeap, NULL, *ppBuffer);
+            retval = Status;
+        }
+    } while (Status == STATUS_INFO_LENGTH_MISMATCH);
+
+    return retval;
+}
+
+
+int diagnostics_update_process_list( std::vector<BOINC_PROCESS>& ps ) {
+    ULONG                   cbBuffer = 128*1024;    // 128k initial buffer
+    PVOID                   pBuffer = NULL;
+    PSYSTEM_PROCESSES       pProcesses = NULL;
+
+    // Clear out the vector
+    ps.clear();
+
+    // Get a snapshot of the process and thread information.
+    diagnostics_get_process_information(&pBuffer, &cbBuffer);
+
+    // Lets start walking the structures to find the good stuff.
+    pProcesses = (PSYSTEM_PROCESSES)pBuffer;
+    do {
+
+        if (pProcesses->ProcessId) {
+            BOINC_PROCESS pi;
+            pi.dwProcessId = pProcesses->ProcessId;
+            pi.dwParentProcessId = pProcesses->InheritedFromProcessId;
+            pi.strProcessName = pProcesses->ProcessName.Buffer;
+            ps.push_back(pi);
+        }
+
+        // Move to the next structure if one exists
+        if (!pProcesses->NextEntryDelta) {
+            break;
+        }
+        pProcesses = (PSYSTEM_PROCESSES)(((LPBYTE)pProcesses) + pProcesses->NextEntryDelta);
+    } while (pProcesses);
+
+    // Release resources
+    if (pBuffer) HeapFree(GetProcessHeap(), NULL, pBuffer);
+
+    return 0;
+}
+
+
+tstring downcase_string(tstring& orig) {
+    tstring retval = orig;
+    for (size_t i=0; i < retval.length(); i++) {
+        retval[i] = tolower(retval[i]);
+    }
+    return retval;
+}
+
+
+BOOL TerminateProcessById( DWORD dwProcessID ) {
+    HANDLE hProcess;
+    BOOL bRetVal = FALSE;
+
+    hProcess = OpenProcess( PROCESS_TERMINATE, FALSE, dwProcessID );
+
+    if (hProcess) {
+        bRetVal = TerminateProcess(hProcess, 1);
+    }
+
+    CloseHandle( hProcess );
+
+    return bRetVal;
+}
+
+
+BOOL TerminateProcessEx( tstring& strProcessName ) {
+	unsigned int i,j;
+    std::vector<BOINC_PROCESS> ps;
+    std::vector<BOINC_PROCESS> tps;
+
+    // Get a list of currently executing processes.
+    diagnostics_update_process_list(ps);
+
+
+    // Find our root process that we are supposed to terminate and
+    //   terminate it.
+	for (i=0; i < ps.size(); i++) {
+		BOINC_PROCESS& p = ps[i];
+        if (downcase_string(p.strProcessName) == downcase_string(strProcessName)) {
+            if (TerminateProcessById(p.dwProcessId)) {
+                tps.push_back(p);
+            }
+        }
+	}
+
+
+    // Terminate all child processes
+	for (i=0; i < tps.size(); i++) {
+		BOINC_PROCESS tp = tps[i];
+	    for (j=0; j < ps.size(); j++) {
+		    BOINC_PROCESS p = ps[j];
+            if (tp.dwProcessId == p.dwParentProcessId) {
+                if (TerminateProcessById(p.dwProcessId)) {
+                    tps.push_back(p);
+                }
+            }
+	    }
+	}
+
+    return TRUE;
+}
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/terminate.h b/win_build/installerv2/redist/Windows/src/boinccas/terminate.h
new file mode 100644
index 0000000..e831945
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/terminate.h
@@ -0,0 +1,148 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _BOINC_TERMINATE_
+#define _BOINC_TERMINATE_
+
+#define NT_SUCCESS(Status)                      ((NTSTATUS)(Status) >= 0)
+#define STATUS_INFO_LENGTH_MISMATCH             ((NTSTATUS)0xC0000004L)
+#define SystemProcessAndThreadInformation       5
+
+typedef LONG       NTSTATUS;
+
+typedef LONG       KPRIORITY;
+
+typedef struct _CLIENT_ID {
+    DWORD          UniqueProcess;
+    DWORD          UniqueThread;
+} CLIENT_ID;
+
+typedef struct _VM_COUNTERS {
+    SIZE_T         PeakVirtualSize;
+    SIZE_T         VirtualSize;
+    ULONG          PageFaultCount;
+    SIZE_T         PeakWorkingSetSize;
+    SIZE_T         WorkingSetSize;
+    SIZE_T         QuotaPeakPagedPoolUsage;
+    SIZE_T         QuotaPagedPoolUsage;
+    SIZE_T         QuotaPeakNonPagedPoolUsage;
+    SIZE_T         QuotaNonPagedPoolUsage;
+    SIZE_T         PagefileUsage;
+    SIZE_T         PeakPagefileUsage;
+} VM_COUNTERS;
+
+typedef struct _SYSTEM_THREADS {
+    LARGE_INTEGER  KernelTime;
+    LARGE_INTEGER  UserTime;
+    LARGE_INTEGER  CreateTime;
+    ULONG          WaitTime;
+    PVOID          StartAddress;
+    CLIENT_ID      ClientId;
+    KPRIORITY      Priority;
+    KPRIORITY      BasePriority;
+    ULONG          ContextSwitchCount;
+    LONG           State;
+    LONG           WaitReason;
+} SYSTEM_THREADS, * PSYSTEM_THREADS;
+
+typedef struct _SYSTEM_PROCESSES_NT4 {
+    ULONG          NextEntryDelta;
+    ULONG          ThreadCount;
+    ULONG          Reserved1[6];
+    LARGE_INTEGER  CreateTime;
+    LARGE_INTEGER  UserTime;
+    LARGE_INTEGER  KernelTime;
+    UNICODE_STRING ProcessName;
+    KPRIORITY      BasePriority;
+    ULONG          ProcessId;
+    ULONG          InheritedFromProcessId;
+    ULONG          HandleCount;
+    ULONG          Reserved2[2];
+    VM_COUNTERS    VmCounters;
+    SYSTEM_THREADS Threads[1];
+} SYSTEM_PROCESSES_NT4, *PSYSTEM_PROCESSES_NT4;
+
+typedef struct _SYSTEM_PROCESSES {
+    ULONG          NextEntryDelta;
+    ULONG          ThreadCount;
+    ULONG          Reserved1[6];
+    LARGE_INTEGER  CreateTime;
+    LARGE_INTEGER  UserTime;
+    LARGE_INTEGER  KernelTime;
+    UNICODE_STRING ProcessName;
+    KPRIORITY      BasePriority;
+#ifdef _WIN64
+	ULONG pad1;
+    ULONG          ProcessId;
+	ULONG pad2;
+    ULONG          InheritedFromProcessId;
+	ULONG pad3, pad4, pad5;
+#else
+    ULONG          ProcessId;
+    ULONG          InheritedFromProcessId;
+#endif
+    ULONG          HandleCount;
+    ULONG          Reserved2[2];
+    VM_COUNTERS    VmCounters;
+    IO_COUNTERS    IoCounters;
+    SYSTEM_THREADS Threads[1];
+} SYSTEM_PROCESSES, * PSYSTEM_PROCESSES;
+
+typedef enum _THREAD_STATE {
+    ThreadStateInitialized,
+    ThreadStateReady,
+    ThreadStateRunning,
+    ThreadStateStandby,
+    ThreadStateTerminated,
+    ThreadStateWaiting,
+    ThreadStateTransition
+} THREAD_STATE, *PTHREAD_STATE;
+
+typedef enum _THREAD_WAIT_REASON {
+    ThreadWaitReasonExecutive,
+    ThreadWaitReasonFreePage,
+    ThreadWaitReasonPageIn,
+    ThreadWaitReasonPoolAllocation,
+    ThreadWaitReasonDelayExecution,
+    ThreadWaitReasonSuspended,
+    ThreadWaitReasonUserRequest,
+    ThreadWaitReasonWrExecutive,
+    ThreadWaitReasonWrFreePage,
+    ThreadWaitReasonWrPageIn,
+    ThreadWaitReasonWrPoolAllocation,
+    ThreadWaitReasonWrDelayExecution,
+    ThreadWaitReasonWrSuspended,
+    ThreadWaitReasonWrUserRequest,
+    ThreadWaitReasonWrEventPairHigh,
+    ThreadWaitReasonWrEventPairLow,
+    ThreadWaitReasonWrLpcReceive,
+    ThreadWaitReasonWrLpcReply,
+    ThreadWaitReasonWrVirtualMemory,
+    ThreadWaitReasonWrPageOut,
+    ThreadWaitReasonMaximumWaitReason
+} THREAD_WAIT_REASON;
+
+
+// Prototypes
+BOOL TerminateProcessEx( tstring& strProcessName );
+
+
+#endif
+
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/utils.cpp b/win_build/installerv2/redist/Windows/src/boinccas/utils.cpp
new file mode 100644
index 0000000..0936bb4
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/utils.cpp
@@ -0,0 +1,76 @@
+/*++
+
+DCOM Permission Configuration Sample
+Copyright (c) 1996, Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+    utils.cpp
+
+Abstract:
+
+    Miscellaneous utility functions
+
+Author:
+
+    Michael Nelson
+
+Environment:
+
+    Windows NT
+
+--*/
+
+#include "stdafx.h"
+#include <windows.h>
+#include <stdio.h>
+#include <conio.h>
+#include <tchar.h>
+#include "ntsecapi.h"
+#include "dcomperm.h"
+
+DWORD
+GetCurrentUserSID (
+    PSID *Sid
+    )
+{
+    TOKEN_USER  *tokenUser=NULL;
+    HANDLE      tokenHandle;
+    DWORD       tokenSize;
+    DWORD       sidLength;
+
+    if (OpenProcessToken (GetCurrentProcess(), TOKEN_QUERY, &tokenHandle))
+    {
+        GetTokenInformation (tokenHandle,
+                             TokenUser,
+                             tokenUser,
+                             0,
+                             &tokenSize);
+
+        tokenUser = (TOKEN_USER *) malloc (tokenSize);
+
+        if (GetTokenInformation (tokenHandle,
+                                 TokenUser,
+                                 tokenUser,
+                                 tokenSize,
+                                 &tokenSize))
+        {
+            sidLength = GetLengthSid (tokenUser->User.Sid);
+            *Sid = (PSID) malloc (sidLength);
+
+            memcpy (*Sid, tokenUser->User.Sid, sidLength);
+            CloseHandle (tokenHandle);
+        } else
+        {
+            free (tokenUser);
+            return GetLastError();
+        }
+    } else
+    {
+        free (tokenUser);
+        return GetLastError();
+    }
+
+    free (tokenUser);
+    return ERROR_SUCCESS;
+}
diff --git a/win_build/installerv2/redist/Windows/src/boinccas/wrappers.cpp b/win_build/installerv2/redist/Windows/src/boinccas/wrappers.cpp
new file mode 100644
index 0000000..d44b73a
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/src/boinccas/wrappers.cpp
@@ -0,0 +1,143 @@
+/*++
+
+DCOM Permission Configuration Sample
+Copyright (c) 1996, Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+    wrappers.cpp
+
+Abstract:
+
+    Wrappers for low-level security and registry functions
+
+Author:
+
+    Michael Nelson
+
+Environment:
+
+    Windows NT
+
+--*/
+
+#include "stdafx.h"
+#include "ntsecapi.h"
+#include "dcomperm.h"
+
+DWORD
+ListDefaultAccessACL()
+{
+    return ListNamedValueSD (HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Ole"), TEXT("DefaultAccessPermission"));
+}
+
+DWORD
+ListDefaultLaunchACL()
+{
+    return ListNamedValueSD (HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Ole"), TEXT("DefaultLaunchPermission"));
+}
+
+DWORD
+ListAppIDAccessACL (
+    LPTSTR AppID
+    )
+{
+    TCHAR   keyName [256];
+
+    if (AppID [0] == '{')
+        wsprintf (keyName, TEXT("APPID\\%s"), AppID); else
+        wsprintf (keyName, TEXT("APPID\\{%s}"), AppID);
+
+    return ListNamedValueSD (HKEY_CLASSES_ROOT, keyName, TEXT("AccessPermission"));
+}
+
+DWORD
+ListAppIDLaunchACL (
+    LPTSTR AppID
+    )
+{
+    TCHAR   keyName [256];
+
+    if (AppID [0] == '{')
+        wsprintf (keyName, TEXT("APPID\\%s"), AppID); else
+        wsprintf (keyName, TEXT("APPID\\{%s}"), AppID);
+
+    return ListNamedValueSD (HKEY_CLASSES_ROOT, keyName, TEXT("LaunchPermission"));
+}
+
+DWORD
+ChangeDefaultAccessACL (
+    LPTSTR Principal,
+    BOOL SetPrincipal,
+    BOOL Permit
+    )
+{
+    if (SetPrincipal)
+    {
+        RemovePrincipalFromNamedValueSD (HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Ole"), TEXT("DefaultAccessPermission"), Principal);
+        return AddPrincipalToNamedValueSD (HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Ole"), TEXT("DefaultAccessPermission"), Principal, Permit);
+    } else
+        return RemovePrincipalFromNamedValueSD (HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Ole"), TEXT("DefaultAccessPermission"), Principal);
+}
+
+DWORD
+ChangeDefaultLaunchACL (
+    LPTSTR Principal,
+    BOOL SetPrincipal,
+    BOOL Permit
+    )
+{
+    if (SetPrincipal)
+    {
+        RemovePrincipalFromNamedValueSD (HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Ole"), TEXT("DefaultLaunchPermission"), Principal);
+        return AddPrincipalToNamedValueSD (HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Ole"), TEXT("DefaultLaunchPermission"), Principal, Permit);
+    } else
+        return RemovePrincipalFromNamedValueSD (HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Ole"), TEXT("DefaultLaunchPermission"), Principal);
+}
+
+DWORD
+ChangeAppIDAccessACL (
+    LPTSTR AppID,
+    LPTSTR Principal,
+    BOOL SetPrincipal,
+    BOOL Permit
+    )
+{
+    TCHAR   keyName [256];
+
+    if (AppID [0] == '{')
+        wsprintf (keyName, TEXT("APPID\\%s"), AppID);
+    else
+        wsprintf (keyName, TEXT("APPID\\{%s}"), AppID);
+
+    if (SetPrincipal)
+    {
+        RemovePrincipalFromNamedValueSD (HKEY_CLASSES_ROOT, keyName, TEXT("AccessPermission"), Principal);
+        return AddPrincipalToNamedValueSD (HKEY_CLASSES_ROOT, keyName, TEXT("AccessPermission"), Principal, Permit);
+    } else
+        return RemovePrincipalFromNamedValueSD (HKEY_CLASSES_ROOT, keyName, TEXT("AccessPermission"), Principal);
+}
+
+DWORD
+ChangeAppIDLaunchACL (
+    LPTSTR AppID,
+    LPTSTR Principal,
+    BOOL SetPrincipal,
+    BOOL Permit
+    )
+{
+    TCHAR   keyName [256];
+
+    if (AppID [0] == '{')
+        wsprintf (keyName, TEXT("APPID\\%s"), AppID);
+    else
+        wsprintf (keyName, TEXT("APPID\\{%s}"), AppID);
+
+    if (SetPrincipal)
+    {
+        RemovePrincipalFromNamedValueSD (HKEY_CLASSES_ROOT, keyName, TEXT("LaunchPermission"), Principal);
+        return AddPrincipalToNamedValueSD (HKEY_CLASSES_ROOT, keyName, TEXT("LaunchPermission"), Principal, Permit);
+    } else
+        return RemovePrincipalFromNamedValueSD (HKEY_CLASSES_ROOT, keyName, TEXT("LaunchPermission"), Principal);
+}
+
diff --git a/win_build/installerv2/redist/Windows/x64/boinccas.dll b/win_build/installerv2/redist/Windows/x64/boinccas.dll
new file mode 100644
index 0000000..226db28
Binary files /dev/null and b/win_build/installerv2/redist/Windows/x64/boinccas.dll differ
diff --git a/win_build/installerv2/redist/Windows/x64/boinccas95.dll b/win_build/installerv2/redist/Windows/x64/boinccas95.dll
new file mode 100644
index 0000000..2acf00e
Binary files /dev/null and b/win_build/installerv2/redist/Windows/x64/boinccas95.dll differ
diff --git a/win_build/installerv2/redist/Windows/x64/dbghelp.dll b/win_build/installerv2/redist/Windows/x64/dbghelp.dll
new file mode 100644
index 0000000..d051e0b
Binary files /dev/null and b/win_build/installerv2/redist/Windows/x64/dbghelp.dll differ
diff --git a/win_build/installerv2/redist/Windows/x64/dbghelp95.dll b/win_build/installerv2/redist/Windows/x64/dbghelp95.dll
new file mode 100644
index 0000000..2ce5f01
Binary files /dev/null and b/win_build/installerv2/redist/Windows/x64/dbghelp95.dll differ
diff --git a/win_build/installerv2/redist/Windows/x64/srcsrv.dll b/win_build/installerv2/redist/Windows/x64/srcsrv.dll
new file mode 100644
index 0000000..41e17c8
Binary files /dev/null and b/win_build/installerv2/redist/Windows/x64/srcsrv.dll differ
diff --git a/win_build/installerv2/redist/Windows/x64/symsrv.dll b/win_build/installerv2/redist/Windows/x64/symsrv.dll
new file mode 100644
index 0000000..b43b30d
Binary files /dev/null and b/win_build/installerv2/redist/Windows/x64/symsrv.dll differ
diff --git a/win_build/installerv2/redist/Windows/x64/symsrv.yes b/win_build/installerv2/redist/Windows/x64/symsrv.yes
new file mode 100644
index 0000000..0519ecb
--- /dev/null
+++ b/win_build/installerv2/redist/Windows/x64/symsrv.yes
@@ -0,0 +1 @@
+ 
\ No newline at end of file
diff --git a/win_build/installerv2/redist/all_projects_list.xml b/win_build/installerv2/redist/all_projects_list.xml
new file mode 100644
index 0000000..ae1d9e0
--- /dev/null
+++ b/win_build/installerv2/redist/all_projects_list.xml
@@ -0,0 +1,694 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<projects>
+    <project>
+        <name>Climateprediction.net</name>
+        <url>http://climateprediction.net/</url>
+        <general_area>Earth Sciences</general_area>
+        <specific_area>Climate study</specific_area>
+        <description><![CDATA[Investigate the approximations that have to be made in state-of-the-art climate models. By running the model thousands of times we hope to find out how the model responds to slight tweaks to these approximations - slight enough to not make the approximations any less realistic. This will allow us to improve our understanding of how sensitive our models are to small changes and also to things like changes in carbon dioxide and the sulphur cycle. This will allow us to explore how climate may change in the next century under a wide range of different scenarios.]]></description>
+        <home>Oxford University</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/cpn_logo_world_1.jpg</image>
+    </project>
+    <project>
+        <name>Virtual Prairie</name>
+        <url>http://vcsc.cs.uh.edu/virtual-prairie/</url>
+        <general_area>Earth Sciences</general_area>
+        <specific_area>Study of botanical ecosystems</specific_area>
+        <description><![CDATA[Provide ecological guidelines on the design of prairies with the best potential for water purification.]]></description>
+        <home>University of Houston</home>
+    <platforms>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+    </project>
+    <project>
+        <name>Ibercivis</name>
+        <url>http://registro.ibercivis.es/</url>
+        <general_area>Multiple applications</general_area>
+        <specific_area>Various Spanish research projects</specific_area>
+        <description><![CDATA[Research in physics, material science, and biomedicine]]></description>
+        <home>Spanish universities and research centers</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>powerpc-apple-darwin</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-apple-darwin</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/cabecera2.jpg</image>
+    </project>
+    <project>
+        <name>Yoyo at home</name>
+        <url>http://www.rechenkraft.net/yoyo/</url>
+        <general_area>Multiple applications</general_area>
+        <specific_area>Mathematics, physics, evolution</specific_area>
+        <description><![CDATA[Yoyo at home is an adapter between BOINC and several existing volunteer computing projects: ECM, Muon, Evolution at home, and distributed.net]]></description>
+        <home>Private</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>powerpc-apple-darwin</name>
+        <name>powerpc64-ps3-linux-gnu</name>
+        <name>sparc-sun-solaris</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-apple-darwin</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+    </project>
+    <project>
+        <name>World Community Grid</name>
+        <url>http://www.worldcommunitygrid.org/</url>
+        <general_area>Multiple applications</general_area>
+        <specific_area>Humanitarian research on disease, natural disasters and hunger.</specific_area>
+        <description><![CDATA[To further critical non-profit research on some of humanity's most pressing problems by creating the world's largest volunteer computing grid.  Research includes HIV/AIDS, cancer, muscular dystrophy, dengue fever, and many more.]]></description>
+        <home>IBM Corporate Community Relations</home>
+    <platforms>
+        <name>windows_intelx86</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>i686-apple-darwin</name>
+        <name>powerpc-apple-darwin</name>
+        <name>x86_64-pc-linux-gnu</name>
+        <name>i386-portbld-freebsd</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/wcg.jpg</image>
+    </project>
+    <project>
+        <name>EDGeS at Home</name>
+        <url>http://home.edges-grid.eu/home/</url>
+        <general_area>Multiple applications</general_area>
+        <specific_area>European research projects</specific_area>
+        <description><![CDATA[The EDGeS at Home Beta project integrates volunteer computing into the service grid network of Europe by allowing service grids to send workunits to be processed by the volunteers of this project. The scientific projects covered by the project include math, physics, biology, etc.]]></description>
+        <home>MTA-SZTAKI Laboratory of Parallel and Distributed Systems (Hungary)</home>
+    <platforms>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/logo_edges.png</image>
+    </project>
+    <project>
+        <name>CAS at home</name>
+        <url>http://casathome.ihep.ac.cn/</url>
+        <general_area>Multiple applications</general_area>
+        <specific_area>Physics, biochemistry, and others</specific_area>
+        <description><![CDATA[The objective of CAS at home is to encourage and assist scientists in China to adopt the technologies of volunteer computing and volunteer thinking for their research.]]></description>
+        <home>Chinese Academy of Sciences</home>
+    <platforms>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/cas_at_home.jpg</image>
+    </project>
+    <project>
+        <name>uFluids at home</name>
+        <url>http://www.ufluids.net/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Physics/Aeronautics</specific_area>
+        <description><![CDATA[The uFluids project simulates two-phase fluid behavior in microgravity and microfluidics problems. Our goal is to design better satellite propellant management devices and address two-phase flow in microchannel and MEMS devices.]]></description>
+        <home>Purdue University</home>
+    <platforms>
+        <name>windows_intelx86</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/ufluids.gif</image>
+    </project>
+    <project>
+        <name>Cosmology at Home</name>
+        <url>http://www.cosmologyathome.org/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Astronomy</specific_area>
+        <description><![CDATA[The goal of Cosmology at Home is to search for the model that best describes our Universe and to find the range of models that agree with the available astronomical particle physics data.]]></description>
+        <home>University of Illinois at Urbana-Champaign</home>
+    <platforms>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/cosmo.jpg</image>
+    </project>
+    <project>
+        <name>Orbit at home</name>
+        <url>http://orbit.psi.edu/oah/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Astronomy</specific_area>
+        <description><![CDATA[Monitor and study the hazard posed by near-Earth asteroids]]></description>
+        <home>Planetary Science Institute</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/http://orbit.psi.edu/</image>
+    </project>
+    <project>
+        <name>Spinhenge at home</name>
+        <url>http://spin.fh-bielefeld.de/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Chemical engineering and nanotechnology</specific_area>
+        <description><![CDATA[The study of molecular magnets and controlled nanoscale magnetism.  These magnetic molecules may be used to develop tiny magnetic switches, with applications in medicine (such as local tumor chemotherapy) and biotechnology.]]></description>
+        <home>Bielefeld University of Applied Sciences</home>
+    <platforms>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/rotating-fe30-h90px.gif</image>
+    </project>
+    <project>
+        <name>Einstein at home</name>
+        <url>http://einstein.phys.uwm.edu/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Astrophysics</specific_area>
+        <description><![CDATA[Search for spinning neutron stars (also called pulsars) using data from the LIGO and GEO gravitational wave detectors, and from the Arecibo radio observatory.  Einstein at Home is a World Year of Physics 2005 project supported by the American Physical Society (APS) and by a number of international organizations.]]></description>
+        <home>Univ. of Wisconsin - Milwaukee, Max Planck Institute</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-apple-darwin[cuda]</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>i686-pc-linux-gnu[opencl_ati]</name>
+        <name>i686-pc-linux-gnu[cuda]</name>
+        <name>powerpc-apple-darwin</name>
+        <name>sparc-sun-solaris2.7</name>
+        <name>windows_intelx86</name>
+        <name>windows_intelx86[opencl_ati]</name>
+        <name>windows_intelx86[cuda]</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/einstein.jpg</image>
+    </project>
+    <project>
+        <name>eOn</name>
+        <url>http://eon.ices.utexas.edu/eon2/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Chemistry</specific_area>
+        <description><![CDATA[A common problem in theoretical chemistry, condensed matter physics and materials science is the calculation of the time evolution of an atomic scale system where, for example, chemical reactions and/or diffusion occur. Generally the events of interest are quite rare (many orders of magnitude slower than the vibrational movements of the atoms), and therefore direct simulations, tracking every movement of the atoms, would take thousands of years of computer calculations on the fastest present day computer before a single event of interest can be expected to occur.  Our research group is interested in calculating the long time dynamics of systems.]]></description>
+        <home>University of Texas at Austin</home>
+    <platforms>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>x86_64-apple-darwin</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+    </project>
+    <project>
+        <name>LHC at home</name>
+        <url>http://lhcathomeclassic.cern.ch/sixtrack/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Physics</specific_area>
+        <description><![CDATA[The Large Hadron Collider (LHC) is a particle accelerator at CERN, the European Organization for Nuclear Research, the world's largest particle physics laboratory.  It is the most powerful instrument ever built to investigate on particles proprieties. LHC at home runs simulations to improve the design of LHC and its detectors.]]></description>
+        <home>CERN (European Organization for Nuclear Research)</home>
+    <platforms>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/lhc.jpg</image>
+    </project>
+    <project>
+        <name>Leiden Classical</name>
+        <url>http://boinc.gorlaeus.net/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Chemistry</specific_area>
+        <description><![CDATA[Surface science calculations using Classical Dynamics.  Leiden Classical allows volunteers, students and other scientist to submit their personal calculations to the grid. Each user has his own personal queue for Classical Dynamics jobs. In this way students have used the grid to simulate liquid argon, or to test the validity of the ideal gas law by actually doing the simulations through the grid.]]></description>
+        <home>Leiden University, The Netherlands</home>
+    <platforms>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/leiden_classical.png</image>
+    </project>
+    <project>
+        <name>Milkyway at home</name>
+        <url>http://milkyway.cs.rpi.edu/milkyway/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Astronomy</specific_area>
+        <description><![CDATA[The goal of Milkyway at Home is to create a highly accurate three dimensional model of the Milky Way galaxy using data gathered by the Sloan Digital Sky Survey.]]></description>
+        <home>Rensselaer Polytechnic Institute</home>
+    <platforms>
+        <name>amd64-pc-freebsd</name>
+        <name>amd64-unknown-freebsd</name>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>i686-pc-linux-gnu[ati]</name>
+        <name>powerpc-apple-darwin</name>
+        <name>powerpc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>windows_intelx86[ati]</name>
+        <name>windows_x86_64</name>
+        <name>windows_x86_64[ati]</name>
+        <name>x86_64-apple-darwin</name>
+        <name>x86_64-pc-freebsd</name>
+        <name>x86_64-pc-linux-gnu</name>
+        <name>x86_64-pc-linux-gnu[ati]</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/mw.png</image>
+    </project>
+    <project>
+        <name>SETI at home</name>
+        <url>http://setiathome.berkeley.edu/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Astrophysics, astrobiology</specific_area>
+        <description><![CDATA[SETI (Search for Extraterrestrial Intelligence) is a scientific area whose goal is to detect intelligent life outside Earth. One approach, known as radio SETI, uses radio telescopes to listen for narrow-bandwidth radio signals from space. Such signals are not known to occur naturally, so a detection would provide evidence of extraterrestrial technology.]]></description>
+        <home>University of California, Berkeley</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>powerpc-apple-darwin</name>
+        <name>sparc-sun-solaris</name>
+        <name>sparc-sun-solaris2.7</name>
+        <name>windows_intelx86</name>
+        <name>windows_intelx86[cuda]</name>
+        <name>x86_64-pc-linux-gnu</name>
+        <name>x86_64-unknown-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/seti_logo.png</image>
+    </project>
+    <project>
+        <name>Quantum Monte Carlo at Home</name>
+        <url>http://qah.uni-muenster.de/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Chemistry</specific_area>
+        <description><![CDATA[Study the structure and reactivity of molecules using Quantum Chemistry.]]></description>
+        <home>University of Muenster (Germany)</home>
+    <platforms>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/logo_oben.jpg</image>
+    </project>
+    <project>
+        <name>LHC at home Test4Theory</name>
+        <url>http://lhcathome2.cern.ch/test4theory/</url>
+        <general_area>Astronomy/Physics/Chemistry</general_area>
+        <specific_area>Physics</specific_area>
+        <description><![CDATA[This project uses CERN-developed virtual machine technology for full-fledged LHC event physics simulation on volunteer computers.  Requires that you install VirtualBox on your computer]]></description>
+        <home>CERN (European Organization for Nuclear Research)</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-apple-darwin</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/t4t.png</image>
+    </project>
+    <project>
+        <name>VTU at home</name>
+        <url>http://boinc.vgtu.lt/vtuathome/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Software testing</specific_area>
+        <description><![CDATA[The aim of this project is to provide a powerful distributed computing platform for scientists of Vilnius Gediminas Technical University (VGTU) as well as others Lithuanian academic institutions.  Current applications involve the study of Monte-Carlo based software testing.]]></description>
+        <home>Vilnius Gediminas Technical University and Kaunas University of Technology (Lithuania)</home>
+    <platforms>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/vtuathome-white.gif</image>
+    </project>
+    <project>
+        <name>SZTAKI Desktop Grid</name>
+        <url>http://szdg.lpds.sztaki.hu/szdg/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Mathematics</specific_area>
+        <description><![CDATA[Find all the generalized binary number systems (in which bases are matrices and digits are vectors) up to dimension 11.]]></description>
+        <home>MTA-SZTAKI Laboratory of Parallel and Distributed Systems (Hungary)</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>powerpc-apple-darwin</name>
+        <name>windows_intelx86</name>
+        <name>windows_intelx86_64</name>
+        <name>x86_64-apple-darwin</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/szdg1_small.jpg</image>
+    </project>
+    <project>
+        <name>Collatz Conjecture</name>
+        <url>http://boinc.thesonntags.com/collatz/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Mathematics</specific_area>
+        <description><![CDATA[Study the Collatz Conjecture, an unsolved conjecture in mathematics]]></description>
+        <home>Private</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-apple-darwin[cuda]</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86[ati]</name>
+        <name>windows_intelx86[cuda]</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64[ati]</name>
+        <name>windows_x86_64[cuda]</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-apple-darwin</name>
+        <name>x86_64-apple-darwin[cuda]</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+    </project>
+    <project>
+        <name>Mersenne at home</name>
+        <url>http://mersenneathome.net/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Mathematics</specific_area>
+        <description><![CDATA[Mersenne at home searches for 'Mersenne primes' - prime numbers of the form 2<sup>p</sup>-1.]]></description>
+        <home>Private</home>
+    <platforms>
+        <name>i386-pc-freebsd</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/mersenne_logo80.png</image>
+    </project>
+    <project>
+        <name>NFS at home</name>
+        <url>http://escatter11.fullerton.edu/nfs/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Factorization of large integers</specific_area>
+        <description><![CDATA[NFS at Home is a research project that uses Internet-connected computers to do the lattice sieving step in the Number Field Sieve factorization of large integers. As a young school student, you gained your first experience at breaking an integer into prime factors, such as 15 = 3 * 5 or 35 = 5 * 7. NFS at Home is a continuation of that experience, only with integers that are hundreds of digits long.]]></description>
+        <home>California State University Fullerton</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/NFS_Logo.jpg</image>
+    </project>
+    <project>
+        <name>Surveill at Home</name>
+        <url>http://surveill.dei.uc.pt/surveill</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Web performance</specific_area>
+        <description><![CDATA[Surveill at Home is a research project that conducts end-to-end fine-grained monitoring of web sites.  The project will deploy thousands of probes, each of which repeatedly performs transactions on web sites.  This approach provides end-user failure and performance statistics.]]></description>
+        <home>University of Coimbra, Portugal</home>
+    <platforms>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/surveill.png</image>
+    </project>
+    <project>
+        <name>Chess960 at home</name>
+        <url>http://www.chess960athome.org/alpha/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Game-playing</specific_area>
+        <description><![CDATA[This project studies Chess 960, a variant of orthodox chess. In classical chess the starting position of the game never changes.  In Chess 960, just before the start of every game, the initial configuration of the chess pieces is determined randomly.]]></description>
+        <home>Chess-960.org</home>
+    <platforms>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/chess960athome.jpg</image>
+    </project>
+    <project>
+        <name>DistrRTgen</name>
+        <url>http://boinc.freerainbowtables.com/distrrtgen/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Cryptography</specific_area>
+        <description><![CDATA[To give the world's security experts the best tools available for detecting weak hashes. This can help them to force developers to use more secure methods of password protection.]]></description>
+        <home>Private</home>
+    <platforms>
+        <name>i386-pc-freebsd</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>windows_intelx86[cuda]</name>
+        <name>windows_intelx86[ati]</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-pc-linux-gnu</name>
+        <name>x86_64-pc-linux-gnu[cuda]</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/freerainbowtables_logo.png</image>
+    </project>
+    <project>
+        <name>ABC at home</name>
+        <url>http://abcathome.com/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Mathematics</specific_area>
+        <description><![CDATA[Search for 'abc-triples': positive integers a,b,c such that a+b=c, a < b < c, a,b,c have no common divisors and c > rad(abc), where rad(n) is the product of the distinct prime factors of n. The ABC conjecture says that there are only finitely many a,b,c such that log(c)/log(rad(abc)) > h for any real h > 1. The ABC conjecture is currently one of the greatest open problems in mathematics. If it is proven to be true, a lot of other open problems can be answered directly from it.]]></description>
+        <home>Mathematical Institute of Leiden University / Kennislink</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>powerpc-apple-darwin</name>
+        <name>powerpc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-apple-darwin</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/</image>
+    </project>
+    <project>
+        <name>PrimeGrid</name>
+        <url>http://www.primegrid.com/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Cryptography</specific_area>
+        <description><![CDATA[Primegrid is generating a public sequential prime number database, and is searching for large twin primes of the form k*2<sup>n</sup>+1 and k*2<sup>n</sup>-1]]></description>
+        <home>Private</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-apple-darwin[cuda]</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>i686-pc-linux-gnu[ati]</name>
+        <name>i686-pc-linux-gnu[cuda]</name>
+        <name>powerpc-apple-darwin</name>
+        <name>powerpc64-ps3-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>windows_intelx86[ati]</name>
+        <name>windows_intelx86[cuda]</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-apple-darwin</name>
+        <name>x86_64-apple-darwin[ati]</name>
+        <name>x86_64-apple-darwin[cuda]</name>
+        <name>x86_64-pc-linux-gnu</name>
+        <name>x86_64-pc-linux-gnu[ati]</name>
+        <name>x86_64-pc-linux-gnu[cuda]</name>
+        <name>x86_64-pc-solaris</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/primegrid_logo.png</image>
+    </project>
+    <project>
+        <name>sudoku at vtaiwan</name>
+        <url>http://sudoku.nctu.edu.tw/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Mathematics</specific_area>
+        <description><![CDATA[Sudoku at vtaiwan seeks to solve the minimum Sudoku problem, which is a well-known problem in mathematics and computer science.]]></description>
+        <home>National Chiao Tung University, Taiwan</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-pc-linux-gnu</name>
+        <name>x86_64-unknown-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/sudoku.png</image>
+    </project>
+    <project>
+        <name>primaboinca</name>
+        <url>http://www.primaboinca.com/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Mathematics</specific_area>
+        <description><![CDATA[Search for counterexamples to two conjectures related to the identification of prime numbers]]></description>
+        <home>Hochschule RheinMain University of Applied Sciences</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/logo_primaboinca.gif</image>
+    </project>
+    <project>
+        <name>Enigma at Home</name>
+        <url>http://www.enigmaathome.net/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Cryptography</specific_area>
+        <description><![CDATA[Attempt to decode 3 original Enigma messages. The signals were intercepted in the North Atlantic in 1942 and are believed to be unbroken.]]></description>
+        <home>Private</home>
+    <platforms>
+        <name>arm-unknown-linux-gnueabi</name>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>powerpc-apple-darwin</name>
+        <name>windows_intelx86</name>
+    </platforms>
+    </project>
+    <project>
+        <name>SAT at home</name>
+        <url>http://sat.isa.ru/pdsat/</url>
+        <general_area>Mathematics, computing, and games</general_area>
+        <specific_area>Computer Science</specific_area>
+        <description><![CDATA[Solve hard and practically important problems (discrete functions inversion problems, discrete optimization, bioinformatics, etc.) that can be effectively reduced to Boolean satisfiability problem.]]></description>
+        <home>Institute for Systems Analysis and Institute for System Dynamics and Control Theory, Russian Academy of Science</home>
+    <platforms>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/sat_logo.png</image>
+    </project>
+    <project>
+        <name>SIMAP</name>
+        <url>http://boincsimap.org/boincsimap/</url>
+        <general_area>Biology and Medicine</general_area>
+        <specific_area>Biology</specific_area>
+        <description><![CDATA[Calculate similarities between proteins. SIMAP provides a public database of the resulting data, which plays a key role in many bioinformatics research projects.]]></description>
+        <home>University of Vienna</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>powerpc-apple-darwin</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-pc-linux-gnu</name>
+        <name>x86_64-unknown-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/simaplogo.jpg</image>
+    </project>
+    <project>
+        <name>GPUGrid.net</name>
+        <url>http://www.gpugrid.net/</url>
+        <general_area>Biology and Medicine</general_area>
+        <specific_area>Molecular simulations of proteins</specific_area>
+        <description><![CDATA[GPUGrid.net opens novel computational scenarios by the first full-atom molecular dynamics code (CellMD) specially optimized to run on NVIDIA GPUs. New biomedical applications suddenly become possible giving a new role to computational biology for biomedical research.]]></description>
+        <home>Barcelona Biomedical Research Park (PRBB)</home>
+    <platforms>
+        <name>windows_intelx86[cuda]</name>
+        <name>x86_64-pc-linux-gnu[cuda]</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/gpugrid.png</image>
+    </project>
+    <project>
+        <name>Malariacontrol.net</name>
+        <url>http://www.malariacontrol.net/</url>
+        <general_area>Biology and Medicine</general_area>
+        <specific_area>Epidemiology</specific_area>
+        <description><![CDATA[Simulation models of the transmission dynamics and health effects of malaria are an important tool for malaria control. They can be used to determine optimal strategies for delivering mosquito nets, chemotherapy, or new vaccines which are currently under development and testing.  Such modeling is extremely computer intensive, requiring simulations of large human populations with a diverse set of parameters related to biological and social factors that influence the distribution of the disease. ]]></description>
+        <home>The Swiss Tropical Institute</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>x86_64-pc-linux-gnu</name>
+        <name>x86_64-unknown-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/africaathome.gif</image>
+    </project>
+    <project>
+        <name>Superlink at Technion</name>
+        <url>http://cbl-boinc-server2.cs.technion.ac.il/superlinkattechnion/</url>
+        <general_area>Biology and Medicine</general_area>
+        <specific_area>Genetic linkage analysis</specific_area>
+        <description><![CDATA[Superlink at Technion helps geneticists all over the world find disease-provoking genes causing some types of diabetes, hypertension (high blood pressure), cancer, schizophrenia and many others.]]></description>
+        <home>Technion, Israel</home>
+    <platforms>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/superlink_logo.gif</image>
+    </project>
+    <project>
+        <name>The Lattice Project</name>
+        <url>http://boinc.umiacs.umd.edu/</url>
+        <general_area>Biology and Medicine</general_area>
+        <specific_area>Life science research</specific_area>
+        <description><![CDATA[The Lattice Project supplies computing power to scientists at the University of Maryland studying evolutionary relationships based on DNA sequence data; bacterial, plasmid, and virus protein sequences; and biological diversity in nature reserves. ]]></description>
+        <home>University of Maryland Center for Bioinformatics and Computational Biology</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>powerpc-apple-darwin</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/lattice.gif</image>
+    </project>
+    <project>
+        <name>POEM at HOME</name>
+        <url>http://boinc.fzk.de/poem/</url>
+        <general_area>Biology and Medicine</general_area>
+        <specific_area>Protein structure prediction</specific_area>
+        <description><![CDATA[POEM at HOME uses a computational approach to predict the biologically active structure of proteins, to understand the signal-processing mechanisms when the proteins interact with one another, to understand diseases related to protein malfunction or aggregation, and to develop new drugs on the basis of the three-dimensions structure of biologically important proteins.]]></description>
+        <home>University of Karlsruhe (Germany)</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>windows_intelx86[ati]</name>
+        <name>x86_64-apple-darwin</name>
+        <name>x86_64-pc-linux-gnu</name>
+        <name>x86_64-pc-linux-gnu[ati]</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/poem.jpg</image>
+    </project>
+    <project>
+        <name>Docking at Home</name>
+        <url>http://docking.cis.udel.edu/</url>
+        <general_area>Biology and Medicine</general_area>
+        <specific_area>Study of protein - ligand interactions</specific_area>
+        <description><![CDATA[Docking at Home has both bioscience and computer science goals. The project aims to further knowledge of the atomic details of protein-ligand interactions and, by doing so, will search for insights into the discovery of novel pharmaceuticals.]]></description>
+        <home>University of Delaware</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>powerpc-apple-darwin</name>
+        <name>windows_amd64</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/docking.png</image>
+    </project>
+    <project>
+        <name>Rosetta at home</name>
+        <url>http://boinc.bakerlab.org/rosetta/</url>
+        <general_area>Biology and Medicine</general_area>
+        <specific_area>Biology</specific_area>
+        <description><![CDATA[Determine the 3-dimensional shapes of proteins in research that may ultimately lead to finding cures for some major human diseases. By running Rosetta at home you will help us speed up and extend our research in ways we couldn't possibly attempt without your help. You will also be helping our efforts at designing new proteins to fight diseases such as HIV, Malaria, Cancer, and Alzheimer's]]></description>
+        <home>University of Washington</home>
+    <platforms>
+        <name>i686-apple-darwin</name>
+        <name>i686-pc-linux-gnu</name>
+        <name>powerpc-apple-darwin</name>
+        <name>windows_intelx86</name>
+        <name>windows_x86_64</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+      <image>http://boinc.berkeley.edu/images/rosetta_at_home_logo.jpg</image>
+    </project>
+    <project>
+        <name>FreeHAL</name>
+        <url>http://www.freehal.net/freehal_at_home/</url>
+        <general_area>Cognitive science and artifical intelligence</general_area>
+        <specific_area>Artificial intelligence</specific_area>
+        <description><![CDATA[Parse and convert semantic nets for use in FreeHAL, an artificial intelligence that uses semantic networks, stemmers, part of speech databases, and part of speech taggers in order to imitate human behavior in conversations.]]></description>
+        <home>Private</home>
+    <platforms>
+        <name>i686-pc-linux-gnu</name>
+        <name>windows_intelx86</name>
+        <name>x86_64-pc-linux-gnu</name>
+    </platforms>
+    </project>
+   <account_manager>
+        <name>BAM!</name>
+        <url>http://bam.boincstats.com/</url>
+        <description>BAM assists you in creating and managing your BOINC project accounts and helps you with setting preferences, joining or creating teams, connecting your computers to projects, and much more.  Whether you're a new or an existing BOINC user, BAM will help you get the most out of BOINC.</description>
+        <image>http://boinc.berkeley.edu/images/BAM.png</image>
+    </account_manager>
+   <account_manager>
+        <name>GridRepublic</name>
+        <url>http://www.gridrepublic.org/</url>
+        <description>GridRepublic members run a screensaver that allows their computers to work on public-interest research projects when the machines are not otherwise in use. This screensaver does not affect performance of the host computer any more than an ordinary screensaver does.</description>
+        <image>http://boinc.berkeley.edu/images/logo_gridrepublic_vc.gif</image>
+    </account_manager>
+   <account_manager>
+        <name>Extremadura at home</name>
+        <url>http://boinc.unex.es/extremadurathome</url>
+        <description>When you join Extremadura at home, you will contribute computing power to projects selected by the Extremadura at home community and to research projects from the Spanish province of Extremadura.</description>
+        <image>http://boinc.berkeley.edu/images/extremadurathome.jpg</image>
+    </account_manager>
+</projects>
diff --git a/win_build/installerv2/redist/placeholder.txt b/win_build/installerv2/redist/placeholder.txt
new file mode 100644
index 0000000..dd97f12
--- /dev/null
+++ b/win_build/installerv2/redist/placeholder.txt
@@ -0,0 +1 @@
+This file is used as a placeholder until real data files are created or copied from another location.
\ No newline at end of file
diff --git a/win_build/installerv2/redist/setup.bmp b/win_build/installerv2/redist/setup.bmp
new file mode 100644
index 0000000..fb3918d
Binary files /dev/null and b/win_build/installerv2/redist/setup.bmp differ
diff --git a/client/win/res/icon.ico b/win_build/installerv2/redist/setup.ico
similarity index 100%
copy from client/win/res/icon.ico
copy to win_build/installerv2/redist/setup.ico
diff --git a/win_build/jpeglib.vcproj b/win_build/jpeglib.vcproj
new file mode 100644
index 0000000..cda327d
--- /dev/null
+++ b/win_build/jpeglib.vcproj
@@ -0,0 +1,571 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="jpeglib"
+	ProjectGUID="{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}"
+	RootNamespace="jpeglib"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../lib"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;CLIENT;BOINC_APP_GRAPHICS;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\jpeglib.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../lib"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;CLIENT;BOINC_APP_GRAPHICS;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\jpeglib.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../lib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;HAVE_STD_TRANSFORM;CLIENT;BOINC_APP_GRAPHICS"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\jpeglib.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../lib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;_CRT_SECURE_NO_WARNINGS;HAVE_STD_MAX;HAVE_STD_MIN;HAVE_STD_TRANSFORM;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\jpeglib.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\samples\jpeglib\jcapimin.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcapistd.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jccoefct.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jccolor.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcdctmgr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jchuff.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcinit.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcmainct.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcmarker.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcmaster.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcomapi.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcparam.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcphuff.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcprepct.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jcsample.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jctrans.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdapimin.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdapistd.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdatadst.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdatasrc.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdcoefct.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdcolor.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jddctmgr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdhuff.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdinput.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdmainct.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdmarker.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdmaster.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdmerge.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdphuff.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdpostct.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdsample.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdtrans.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jerror.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jfdctflt.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jfdctfst.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jfdctint.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jidctflt.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jidctfst.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jidctint.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jidctred.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jmemmgr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jmemnobs.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jquant1.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jquant2.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jutils.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\rdbmp.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\rdcolmap.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\rdgif.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\rdppm.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\rdrle.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\rdswitch.c"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\rdtarga.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\samples\jpeglib\cderror.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\cdjpeg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jchuff.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jconfig.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdct.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jdhuff.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jerror.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jinclude.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jmemsys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jmorecfg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jpegint.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jpeglib.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\jpeglib\jversion.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/libboinc.vcproj b/win_build/libboinc.vcproj
new file mode 100644
index 0000000..3e68397
--- /dev/null
+++ b/win_build/libboinc.vcproj
@@ -0,0 +1,1203 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="libboinc"
+	ProjectGUID="{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;../win_build;../lib;../api;../../boinc_depends_win_vs2005/openssl/include;../coprocs/cuda/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="_WIN32;WIN32;_MT;_DLL;_DEBUG;_LIB_WIN32;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				MinimalRebuild="false"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				BrowseInformation="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+				ShowIncludes="false"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboinc.lib"
+				AdditionalLibraryDirectories=""
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;../win_build;../lib;../api;../../boinc_depends_win_vs2005/openssl/include;../coprocs/cuda/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="_WIN32;WIN32;_MT;_DLL;_DEBUG;_LIB_WIN32;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				MinimalRebuild="false"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				BrowseInformation="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+				ShowIncludes="false"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboinc.lib"
+				AdditionalLibraryDirectories="../openssl/win32/x86/lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..;../win_build;../lib;../api;../../boinc_depends_win_vs2005/openssl/include;../coprocs/cuda/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="_WIN32;WIN32;_MT;_DLL;NDEBUG;_LIB_WIN32;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				BrowseInformation="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboinc.lib"
+				AdditionalLibraryDirectories=""
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..;../win_build;../lib;../api;../../boinc_depends_win_vs2005/openssl/include;../coprocs/cuda/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="_WIN32;WIN32;_MT;_DLL;NDEBUG;_LIB_WIN32;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				BrowseInformation="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboinc.lib"
+				AdditionalLibraryDirectories="../openssl/win32/x86/lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\lib\app_ipc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\cal.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\cc_config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\cert_sig.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\common_defs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\coproc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\coproc_impl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\crypt.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\daemonmgt.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\error_numbers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\idlemon.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mem_usage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\notice.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\result_state.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_imports.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\std_fixes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_replace.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\thread.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\url.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\lib\app_ipc.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\base64.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\cc_config.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\cert_sig.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\coproc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\crypt.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\daemonmgt_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\idlemon_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.c"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mem_usage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\notice.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\shmem.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\thread.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\url.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/libboinc_staticcrt.vcproj b/win_build/libboinc_staticcrt.vcproj
new file mode 100644
index 0000000..d7fd7ca
--- /dev/null
+++ b/win_build/libboinc_staticcrt.vcproj
@@ -0,0 +1,1135 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="libboinc_staticcrt"
+	ProjectGUID="{B00664BD-71EB-46C1-957E-CD851418D395}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;../win_build;../lib;../api;../../boinc_depends_win_vs2005/openssl/include;../coprocs/cuda/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="_WIN32;WIN32;_MT;_DEBUG;_LIB_WIN32;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				MinimalRebuild="false"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				BrowseInformation="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+				ShowIncludes="false"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboinc_staticcrt.lib"
+				AdditionalLibraryDirectories="../openssl/win32/x86/lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;../win_build;../lib;../api;../../boinc_depends_win_vs2005/openssl/include;../coprocs/cuda/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="_WIN32;WIN32;_MT;_DEBUG;_LIB_WIN32;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				MinimalRebuild="false"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				BrowseInformation="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+				ShowIncludes="false"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboinc_staticcrt.lib"
+				AdditionalLibraryDirectories="../openssl/win32/x86/lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..;../win_build;../lib;../api;../../boinc_depends_win_vs2005/openssl/include;../coprocs/cuda/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="_WIN32;WIN32;_MT;NDEBUG;_LIB_WIN32;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				BrowseInformation="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboinc_staticcrt.lib"
+				AdditionalLibraryDirectories="../openssl/win32/x86/lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..;../win_build;../lib;../api;../../boinc_depends_win_vs2005/openssl/include;../coprocs/cuda/include;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="_WIN32;WIN32;_MT;NDEBUG;_LIB_WIN32;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				BrowseInformation="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboinc_staticcrt.lib"
+				AdditionalLibraryDirectories="../openssl/win32/x86/lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\lib\app_ipc.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\base64.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\cert_sig.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\coproc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.c"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mem_usage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\notice.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\shmem.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\url.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\lib\app_ipc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\coproc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\error_numbers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mem_usage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\notice.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\result_state.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_imports.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\std_fixes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/libboincapi_staticcrt.vcproj b/win_build/libboincapi_staticcrt.vcproj
new file mode 100644
index 0000000..c6d43c2
--- /dev/null
+++ b/win_build/libboincapi_staticcrt.vcproj
@@ -0,0 +1,459 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="libboincapi_staticcrt"
+	ProjectGUID="{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				MinimalRebuild="true"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboincapi_staticcrt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				MinimalRebuild="true"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboincapi_staticcrt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS;"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboincapi_staticcrt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS;"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboincapi_staticcrt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\api\boinc_api.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\api\boinc_api.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/libboinopencl_staticcrt.vcproj b/win_build/libboinopencl_staticcrt.vcproj
new file mode 100644
index 0000000..8d6ac1f
--- /dev/null
+++ b/win_build/libboinopencl_staticcrt.vcproj
@@ -0,0 +1,463 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="libboincopencl_staticcrt"
+	ProjectGUID="{C0A2DEEE-2EC5-4F67-8048-53264B6BD14D}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				MinimalRebuild="true"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboincopencl_staticcrt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				MinimalRebuild="true"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboincopencl_staticcrt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboincopencl_staticcrt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\libboincopencl_staticcrt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\api\boinc_opencl.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\api\boinc_opencl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/libgraphics2.vcproj b/win_build/libgraphics2.vcproj
new file mode 100644
index 0000000..6e84f2e
--- /dev/null
+++ b/win_build/libgraphics2.vcproj
@@ -0,0 +1,870 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="libgraphics2"
+	ProjectGUID="{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				MinimalRebuild="true"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)/libgraphics2.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_MT;_DEBUG;_WINDOWS;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				MinimalRebuild="true"
+				ExceptionHandling="2"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)/libboincapi.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)/libgraphics2.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_LIB;_CONSOLE;CLIENT;BOINC_APP_GRAPHICS"
+				ExceptionHandling="2"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)/libboincapi.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\api\boinc_api.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+						PrecompiledHeaderThrough="boinc_win.h"
+						ForcedIncludeFiles="boinc_win.h"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+						PrecompiledHeaderThrough="boinc_win.h"
+						ForcedIncludeFiles="boinc_win.h"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+						PrecompiledHeaderThrough="boinc_win.h"
+						ForcedIncludeFiles="boinc_win.h"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+						PrecompiledHeaderThrough="boinc_win.h"
+						ForcedIncludeFiles="boinc_win.h"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+						PrecompiledHeaderThrough="boinc_win.h"
+						ForcedIncludeFiles="boinc_win.h"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+						PrecompiledHeaderThrough="boinc_win.h"
+						ForcedIncludeFiles="boinc_win.h"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+						PrecompiledHeaderThrough="boinc_win.h"
+						ForcedIncludeFiles="boinc_win.h"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+						PrecompiledHeaderThrough="boinc_win.h"
+						ForcedIncludeFiles="boinc_win.h"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+						PrecompiledHeaderThrough="boinc_win.h"
+						ForcedIncludeFiles="boinc_win.h"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+						PrecompiledHeaderThrough="boinc_win.h"
+						ForcedIncludeFiles="boinc_win.h"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\api\graphics2.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\api\graphics2_util.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\api\graphics2_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\api\gutil.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\api\gutil_text.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\api\reduce_lib.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\api\reduce_main.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\api\boinc_api.h"
+				>
+			</File>
+			<File
+				RelativePath="..\api\boinc_gl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\api\graphics2.h"
+				>
+			</File>
+			<File
+				RelativePath="..\api\graphics_api.h"
+				>
+			</File>
+			<File
+				RelativePath="..\api\graphics_data.h"
+				>
+			</File>
+			<File
+				RelativePath="..\api\graphics_impl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\api\gutil.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/nvcuda.rules b/win_build/nvcuda.rules
new file mode 100644
index 0000000..0035ff1
--- /dev/null
+++ b/win_build/nvcuda.rules
@@ -0,0 +1,455 @@
+<?xml version="1.0" encoding="utf-8"?>
+<VisualStudioToolFile
+	Name="CUDA Build Rule v3.0.14"
+	Version="8.00"
+	>
+	<Rules>
+		<CustomBuildRule
+			Name="CUDA Build Rule"
+			DisplayName="CUDA Build Rule v3.0.14"
+			CommandLine="echo [CompilerPath] [Keep] [CInterleavedPTX] [ExtraNvccOptions] -ccbin "$(VCInstallDir)bin" [Emulation] [Debug] [FastMath] [Defines] -I"$(CUDA_INC_PATH)" [Include] -Xcompiler "/EHsc [Warning] /nologo [Optimization] /Zi [RuntimeChecks] [Runtime] [TypeInfo] [ExtraCppOptions]" [MaxRegCount] [PtxAsOptionV] [Arch1] [Arch2] [Arch3] [NvccCompilation] "$(InputPath)" &#x0D;&#x0A; [CompilerPath] [Keep] [CInterleavedPTX] [ExtraNvccOptions] [Arch1] [Arch2] [Arch3]  -ccbin "$(VCInstallDir)bin" [Emulation] [Debug] [FastMath] [Defines] -I"$(CUDA_INC_PATH)" [Include] -Xcompiler "/EHsc [Warning] /nologo [Optimization] /Zi [RuntimeChecks] [Runtime] [TypeInfo] [ExtraCppOptions]" [Include] [MaxRegCount] [ptxasoptionv] [Arch1] [Arch2] [Arch3] [NvccCompilation] "$(InputPath)""
+			Outputs="[compileout]"
+			AdditionalDependencies="[AddedDependencies]"
+			FileExtensions="*.cu"
+			ExecutionDescription="Compiling with CUDA Build Rule..."
+			>
+			<Properties>
+				<StringProperty
+					Name="Include"
+					DisplayName="Additional Include Directories"
+					Description="Specifies one or more directories to add to the include path; use semi-colon delimited list if more than one.  (/I[path])"
+					Switch="-I"[value]""
+					DefaultValue=""$(CUDA_INC_PATH)""
+					Inheritable="true"
+					Delimited="true"
+					Delimiters=";"
+				/>
+				<BooleanProperty
+					Name="Debug"
+					DisplayName="Generate Debug Information"
+					Description="Specifies whether debugging with Nexus support is generated by the CUDA compiler.  (-D_DEBUG -D_WIN32)"
+					Switch="-D_DEBUG -D_WIN32"
+				/>
+				<EnumProperty
+					Name="NvccCompilation"
+					DisplayName="NVCC Compilation Type"
+					Description="Select desired output of NVCC compilation (-c/-compile, -cuda, -gpu, -cubin, -ptx)"
+					>
+					<Values>
+						<EnumValue
+							Value="0"
+							Switch="--compile -o "$(IntDir)\$(InputName).cu.obj""
+							DisplayName="Generate hybrid object file  (--compile / -c)"
+						/>
+						<EnumValue
+							Value="1"
+							Switch="-cuda -o "$(IntDir)\$(InputName).cu.c""
+							DisplayName="Generate hybrid .c file  (-cuda)"
+						/>
+						<EnumValue
+							Value="2"
+							Switch="-gpu -o "$(IntDir)\$(InputName).gpu""
+							DisplayName="Generate .gpu file  (-gpu)"
+						/>
+						<EnumValue
+							Value="3"
+							Switch="-cubin -o "data\$(InputName).cubin""
+							DisplayName="Generate .cubin file  (-cubin)"
+						/>
+						<EnumValue
+							Value="4"
+							Switch="-ptx -o "data\$(InputName).ptx""
+							DisplayName="Generate .ptx file  (-ptx)"
+						/>
+						<EnumValue
+							Value="5"
+							Switch="-cubin -o "[OutputFile].cubin""
+							DisplayName="Custom CUBIN Filename"
+						/>
+						<EnumValue
+							Value="6"
+							Switch="-ptx -o "[OutputFile].ptx""
+							DisplayName="Custom PTX Filename"
+						/>
+					</Values>
+				</EnumProperty>
+				<StringProperty
+					Name="OutputFile"
+					DisplayName="Compiler Output Filename"
+					Switch="[value]"
+				/>
+				<EnumProperty
+					Name="compileout"
+					DisplayName="Compiler Output (obj/cubin/ptx)"
+					Description="Sets output as an OBJ, CUBIN, or PTX file"
+					>
+					<Values>
+						<EnumValue
+							Value="0"
+							Switch=""$(IntDir)/$(InputName).cu.obj""
+							DisplayName=""$(IntDir)/$(InputName).cu.obj""
+						/>
+						<EnumValue
+							Value="1"
+							Switch=""data/$(InputName).cubin""
+							DisplayName=""data/$(InputName).cubin""
+						/>
+						<EnumValue
+							Value="2"
+							Switch=""data/$(InputName).ptx""
+							DisplayName=""data/$(InputName).ptx""
+						/>
+					</Values>
+				</EnumProperty>
+				<StringProperty
+					Name="OverrideCompileOutName"
+					DisplayName="Alternate Compiler Output File (non-standard installation)"
+					Switch="[value]"
+				/>
+				<EnumProperty
+					Name="Arch1"
+					DisplayName="GPU Architecture (1)"
+					Description="Select GPU architecture (1) to use on the command line (-arch sm_10, sm_11, sm_12, sm_13, sm_20)"
+					DefaultValue="10"
+					>
+					<Values>
+						<EnumValue
+							Value="0"
+							Switch=""
+							DisplayName="0"
+						/>
+						<EnumValue
+							Value="10"
+							Switch="-gencode=arch=compute_10,code=\"sm_10,compute_10\""
+							DisplayName="sm_10"
+						/>
+						<EnumValue
+							Value="11"
+							Switch="-gencode=arch=compute_11,code=\"sm_11,compute_11\""
+							DisplayName="sm_11"
+						/>
+						<EnumValue
+							Value="12"
+							Switch="-gencode=arch=compute_12,code=\"sm_12,compute_12\""
+							DisplayName="sm_12"
+						/>
+						<EnumValue
+							Value="13"
+							Switch="-gencode=arch=compute_13,code=\"sm_13,compute_13\""
+							DisplayName="sm_13"
+						/>
+						<EnumValue
+							Value="20"
+							Switch="-gencode=arch=compute_20,code=\"sm_20,compute_20\""
+							DisplayName="sm_20"
+						/>
+					</Values>
+				</EnumProperty>
+				<EnumProperty
+					Name="Arch2"
+					DisplayName="GPU Architecture (2)"
+					Description="Select GPU architecture (2) to use on the command line (-arch sm_10, sm_11, sm_12, sm_13, sm_20)"
+					DefaultValue="20"
+					>
+					<Values>
+						<EnumValue
+							Value="0"
+							Switch=""
+							DisplayName="0"
+						/>
+						<EnumValue
+							Value="10"
+							Switch="-gencode=arch=compute_10,code=\"sm_10,compute_10\""
+							DisplayName="sm_10"
+						/>
+						<EnumValue
+							Value="11"
+							Switch="-gencode=arch=compute_11,code=\"sm_11,compute_11\""
+							DisplayName="sm_11"
+						/>
+						<EnumValue
+							Value="12"
+							Switch="-gencode=arch=compute_12,code=\"sm_12,compute_12\""
+							DisplayName="sm_12"
+						/>
+						<EnumValue
+							Value="13"
+							Switch="-gencode=arch=compute_13,code=\"sm_13,compute_13\""
+							DisplayName="sm_13"
+						/>
+						<EnumValue
+							Value="20"
+							Switch="-gencode=arch=compute_20,code=\"sm_20,compute_20\""
+							DisplayName="sm_20"
+						/>
+					</Values>
+				</EnumProperty>
+				<EnumProperty
+					Name="Arch3"
+					DisplayName="GPU Architecture (3)"
+					Description="Select GPU architecture (3) to use on the command line (-arch sm_10, sm_11, sm_12, sm_13, sm_20)"
+					DefaultValue="0"
+					>
+					<Values>
+						<EnumValue
+							Value="0"
+							Switch=""
+							DisplayName="0"
+						/>
+						<EnumValue
+							Value="10"
+							Switch="-gencode=arch=compute_10,code=\"sm_10,compute_10\""
+							DisplayName="sm_10"
+						/>
+						<EnumValue
+							Value="11"
+							Switch="-gencode=arch=compute_11,code=\"sm_11,compute_11\""
+							DisplayName="sm_11"
+						/>
+						<EnumValue
+							Value="12"
+							Switch="-gencode=arch=compute_12,code=\"sm_12,compute_12\""
+							DisplayName="sm_12"
+						/>
+						<EnumValue
+							Value="13"
+							Switch="-gencode=arch=compute_13,code=\"sm_13,compute_13\""
+							DisplayName="sm_13"
+						/>
+						<EnumValue
+							Value="20"
+							Switch="-gencode=arch=compute_20,code=\"sm_20,compute_20\""
+							DisplayName="sm_20"
+						/>
+					</Values>
+				</EnumProperty>
+				<EnumProperty
+					Name="CompilerPath"
+					DisplayName="Path to nvcc.exe"
+					Description="Specifies the path to the CUDA compiler, nvcc.exe "
+					>
+					<Values>
+						<EnumValue
+							Value="0"
+							Switch=""$(CUDA_BIN_PATH)\nvcc.exe""
+							DisplayName="Installed Toolkit (uses CUDA_BIN_PATH environment varible)"
+						/>
+						<EnumValue
+							Value="1"
+							Switch=""[AlternateNvccPath]""
+							DisplayName="Use Alternate path to CUDA, specified below"
+						/>
+					</Values>
+				</EnumProperty>
+				<StringProperty
+					Name="AlternateNvccPath"
+					DisplayName="Alternate path to NVCC.exe (non-standard installation)"
+					Switch="[value]\nvcc.exe"
+				/>
+				<BooleanProperty
+					Name="Emulation"
+					DisplayName="Emulation Mode"
+					Description="Whether or not to generate emulated code."
+					Switch="-deviceemu -D_DEVICEEMU"
+				/>
+				<BooleanProperty
+					Name="FastMath"
+					DisplayName="Use Fast Math"
+					Category="Default"
+					Description="Make use of the fast math library."
+					Switch="-use_fast_math"
+				/>
+				<IntegerProperty
+					Name="MaxRegCount"
+					DisplayName="maxrregcount"
+					Switch="-maxrregcount=[value]"
+					DefaultValue="32"
+				/>
+				<BooleanProperty
+					Name="PtxAsOptionV"
+					DisplayName="Verbose PTXAS Output"
+					Switch="--ptxas-options=-v"
+				/>
+        <BooleanProperty
+          Name="CInterleavedPTX"
+          DisplayName="Interleave C in PTXAS Output"
+          Switch="--opencc-options -LIST:source=on"
+				/>
+				<StringProperty
+					Name="ExtraNvccOptions"
+					DisplayName="Extra Options"
+					Description="Supply any additional command line options to NVCC"
+					Switch="[value]"
+				/>
+				<StringProperty
+					Name="Defines"
+					DisplayName="Preprocessor Definitions"
+					PropertyPageName="Preprocessor"
+					Description="Specifies one or more preprocessor defines.  (-D[macro])"
+					Switch="-D[value]"
+					Delimited="true"
+					Inheritable="true"
+				/>
+				<BooleanProperty
+					Name="Keep"
+					DisplayName="Keep preprocessed files (.ptx, .cubin, cudafe1.c, cudafe1.cpp, cudafe1.gpu, etc.)"
+					PropertyPageName="Preprocessor"
+					Description="Specifies that preprocessor files generated by the CUDA compiler are not deleted."
+					Switch="--keep"
+				/>
+				<EnumProperty
+					Name="Warning"
+					DisplayName="Warning Level"
+					PropertyPageName="Hybrid CUDA/C++ Options"
+					Description="Select how strict you want the compiler to be about checking for potentially suspect constructs.   (/W0 - /W4)"
+					DefaultValue="3"
+					>
+					<Values>
+						<EnumValue
+							Value="0"
+							Switch="/W0"
+							DisplayName="Off: Turn Off All Warnings (/W0)"
+						/>
+						<EnumValue
+							Value="1"
+							Switch="/W1"
+							DisplayName="Level 1 (/W1)"
+						/>
+						<EnumValue
+							Value="2"
+							Switch="/W2"
+							DisplayName="Level 2 (/W2)"
+						/>
+						<EnumValue
+							Value="3"
+							Switch="/W3"
+							DisplayName="Level 3 (/W3)"
+						/>
+						<EnumValue
+							Value="4"
+							Switch="/W4"
+							DisplayName="Level 4 (/W4)"
+						/>
+					</Values>
+				</EnumProperty>
+				<EnumProperty
+					Name="Optimization"
+					DisplayName="Optimization"
+					Description="Select option for code optimization; choose Custom to use specific optimization options.  (/Od, /O1, /O2, /Ox)"
+					DefaultValue="2"
+					>
+					<Values>
+						<EnumValue
+							Value="0"
+							Switch="/Od"
+							DisplayName="Disabled (/Od)"
+						/>
+						<EnumValue
+							Value="1"
+							Switch="/O1"
+							DisplayName="Minimize Size (/O1)"
+						/>
+						<EnumValue
+							Value="2"
+							Switch="/O2"
+							DisplayName="Maximize Speed (/O2)"
+						/>
+						<EnumValue
+							Value="3"
+							Switch="/Ox"
+							DisplayName="Full Optimization (/Ox)"
+						/>
+					</Values>
+				</EnumProperty>
+				<StringProperty
+					Name="AddedDependencies"
+					DisplayName="Source Dependencies"
+					Description="Add additional CUDA file dependencies"
+					Switch="[value]"
+				/>
+				<EnumProperty
+					Name="RuntimeChecks"
+					DisplayName="Basic Runtime Checks"
+					PropertyPageName="Hybrid CUDA/C++ Options"
+					Description="Perform basic runtime error checks, incompatible with any optimization type other than debug.   (/RTCs, /RTCu, /RTC1)"
+					>
+					<Values>
+						<EnumValue
+							Value="0"
+							Switch=" "
+							DisplayName="Default"
+						/>
+						<EnumValue
+							Value="1"
+							Switch="/RTCs"
+							DisplayName="Stack Frames (/RTCs)"
+						/>
+						<EnumValue
+							Value="2"
+							Switch="/RTCu"
+							DisplayName="Uninitialized Variables (/RTCu)"
+						/>
+						<EnumValue
+							Value="3"
+							Switch="/RTC1"
+							DisplayName="Both (/RTC1, equiv. to /RTCsu)"
+						/>
+					</Values>
+				</EnumProperty>
+				<EnumProperty
+					Name="Runtime"
+					DisplayName="Runtime Library"
+					PropertyPageName="Hybrid CUDA/C++ Options"
+					Description="Specify runtime library for linking.   (/MT, /MTd, /MD, /MDd, /ML, /MLd)"
+					>
+					<Values>
+						<EnumValue
+							Value="0"
+							Switch="/MT"
+							DisplayName="Multi-Threaded (/MT)"
+						/>
+						<EnumValue
+							Value="1"
+							Switch="/MTd"
+							DisplayName="Multi-Threaded Debug (/MTd)"
+						/>
+						<EnumValue
+							Value="2"
+							Switch="/MD"
+							DisplayName="Multi-Threaded DLL (/MD)"
+						/>
+						<EnumValue
+							Value="3"
+							Switch="/MDd"
+							DisplayName="Multi-Threaded Debug DLL (/MDd)"
+						/>
+						<EnumValue
+							Value="4"
+							Switch="/ML"
+							DisplayName="Single-Threaded (/ML)"
+						/>
+						<EnumValue
+							Value="5"
+							Switch="/MLd"
+							DisplayName="Single-Threaded Debug (/MLd)"
+						/>
+					</Values>
+				</EnumProperty>
+				<BooleanProperty
+					Name="TypeInfo"
+					DisplayName="Enable Run-Time Type Info"
+					PropertyPageName="Hybrid CUDA/C++ Options"
+					Description="Adds code for checking C++ object types at run time (runtime type information). (/GR)"
+					Switch="/GR"
+				/>
+				<StringProperty
+					Name="ExtraCppOptions"
+					DisplayName="Extra C++ Options"
+					PropertyPageName="Hybrid CUDA/C++ Options"
+					Description="Supply any additional command line options to the host C++ compiler"
+					Switch="[value]"
+				/>
+			</Properties>
+		</CustomBuildRule>
+	</Rules>
+</VisualStudioToolFile>
diff --git a/win_build/ptp_boinc_cli.vcproj b/win_build/ptp_boinc_cli.vcproj
new file mode 100644
index 0000000..1bde993
--- /dev/null
+++ b/win_build/ptp_boinc_cli.vcproj
@@ -0,0 +1,900 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc"
+	ProjectGUID="{C04F0FCC-BB5D-4627-8656-6173B28BD69E}"
+	RootNamespace="boinc_cli"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS;USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1d.lib ssleay32.lib libeay32.lib libcurld_imp.lib nvapi.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS;USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1d.lib ssleay32.lib libeay32.lib libcurld_imp.lib nvapi.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib userenv.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS;USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib ssleay32.lib libeay32.lib libcurl_imp.lib nvapi.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS;USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				StringPooling="false"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib ssleay32.lib libeay32.lib libcurl_imp.lib nvapi.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib userenv.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\client\acct_mgr.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\acct_setup.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\app.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_control.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_graphics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_start.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\auto_update.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\client\check_state.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_msgs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\client_state.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\client_types.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpu_sched.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_account.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_apps.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_benchmark.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_cmdline.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_files.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_platforms.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_scheduler.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_statefile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_trickle.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone2.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\file_names.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\file_xfer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_http.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\http_curl.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\log_flags.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\main.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\msg_log.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\net_stats.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\pers_file_xfer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\rr_sim.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sandbox.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\scheduler_op.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\time_stats.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\whetstone.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\win_service.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\work_fetch.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\client\acct_mgr.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\acct_setup.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\auto_update.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\boinc_cli.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_msgs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_state.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpp.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpu_benchmark.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\error_numbers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\file_names.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\file_xfer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_http.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\http_curl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\log_flags.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\main.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\msg_log.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\net_stats.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\pers_file_xfer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\rr_sim.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sandbox.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\scheduler_op.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\time_stats.h"
+				>
+			</File>
+			<File
+				RelativePath="..\version.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\win_service.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\work_fetch.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cli.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ptp_boinc_dll.vcproj b/win_build/ptp_boinc_dll.vcproj
new file mode 100644
index 0000000..7b77f9b
--- /dev/null
+++ b/win_build/ptp_boinc_dll.vcproj
@@ -0,0 +1,698 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc_dll"
+	ProjectGUID="{B06280CB-82A4-46DE-8956-602643078BDF}"
+	RootNamespace="boinc"
+	Keyword="AtlProj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="false"
+				TargetEnvironment="1"
+				GenerateStublessProxies="true"
+				TypeLibraryName="$(IntDir)/boinc_dll.tlb"
+				HeaderFileName="boinc_dll.h"
+				DLLDataFileName=""
+				InterfaceIdentifierFileName="boinc_dll_i.c"
+				ProxyFileName="boinc_dll_p.c"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;_PROGRESSTHRUPROCESSORS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdafx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=""$(IntDir)";../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="true"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB wininet.lib kernel32.lib user32.lib advapi32.lib shell32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.dll"
+				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="true"
+				MergedIDLBaseFileName="_boinc_dll.idl"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_dll.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/boinc_dll.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="false"
+				TargetEnvironment="3"
+				GenerateStublessProxies="true"
+				TypeLibraryName="$(IntDir)/boinc_dll.tlb"
+				HeaderFileName="boinc_dll.h"
+				DLLDataFileName=""
+				InterfaceIdentifierFileName="boinc_dll_i.c"
+				ProxyFileName="boinc_dll_p.c"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;_PROGRESSTHRUPROCESSORS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdafx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=""$(IntDir)";../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="true"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB wininet.lib kernel32.lib user32.lib advapi32.lib shell32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.dll"
+				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="true"
+				MergedIDLBaseFileName="_boinc_dll.idl"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_dll.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/boinc_dll.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="false"
+				TargetEnvironment="1"
+				GenerateStublessProxies="true"
+				TypeLibraryName="$(IntDir)/boinc_dll.tlb"
+				HeaderFileName="boinc_dll.h"
+				DLLDataFileName=""
+				InterfaceIdentifierFileName="boinc_dll_i.c"
+				ProxyFileName="boinc_dll_p.c"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../lib"
+				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_PROGRESSTHRUPROCESSORS"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdafx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=""$(IntDir)";../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="true"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB wininet.lib kernel32.lib user32.lib advapi32.lib shell32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.dll"
+				LinkIncremental="1"
+				IgnoreAllDefaultLibraries="true"
+				MergedIDLBaseFileName="_boinc_dll.idl"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_dll.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				ImportLibrary="$(OutDir)/boinc_dll.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfATL="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="false"
+				TargetEnvironment="3"
+				GenerateStublessProxies="true"
+				TypeLibraryName="$(IntDir)/boinc_dll.tlb"
+				HeaderFileName="boinc_dll.h"
+				DLLDataFileName=""
+				InterfaceIdentifierFileName="boinc_dll_i.c"
+				ProxyFileName="boinc_dll_p.c"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../lib"
+				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_PROGRESSTHRUPROCESSORS"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdafx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=""$(IntDir)";../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="true"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB wininet.lib kernel32.lib user32.lib advapi32.lib shell32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.dll"
+				LinkIncremental="1"
+				IgnoreAllDefaultLibraries="true"
+				MergedIDLBaseFileName="_boinc_dll.idl"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_dll.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				ImportLibrary="$(OutDir)/boinc_dll.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\clientlib\win\boinc_dll.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\IdleTracker.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\Service.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\stdafx.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\clientlib\win\boinc_dll.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\IdleTracker.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\Resource.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientlib\win\stdafx.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+			<File
+				RelativePath="..\clientlib\win\boinc_dll.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ptp_boinc_ss.vcproj b/win_build/ptp_boinc_ss.vcproj
new file mode 100644
index 0000000..05a23f8
--- /dev/null
+++ b/win_build/ptp_boinc_ss.vcproj
@@ -0,0 +1,763 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc_ss"
+	ProjectGUID="{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}"
+	RootNamespace="boinc_ss"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib userenv.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib userenv.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\base64.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.c"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\boinc_ss.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_imports.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clientscr\res\boinc.bmp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\boinc_ss.rc"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\gridrepublic.bmp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\gridrepublic.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\res\icon.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\Scricon3.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\seed.bmp"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ptp_boinccmd.vcproj b/win_build/ptp_boinccmd.vcproj
new file mode 100644
index 0000000..38d467e
--- /dev/null
+++ b/win_build/ptp_boinccmd.vcproj
@@ -0,0 +1,610 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinccmd"
+	ProjectGUID="{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}"
+	RootNamespace="boinc_guirpctest"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client;.."
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib userenv.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client;.."
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib userenv.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\client\boinc_cmd.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_print.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cmd.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cmd.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ptp_boincmgr.vcproj b/win_build/ptp_boincmgr.vcproj
new file mode 100644
index 0000000..a9f6bea
--- /dev/null
+++ b/win_build/ptp_boincmgr.vcproj
@@ -0,0 +1,1660 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boincmgr"
+	ProjectGUID="{06113715-AC51-4E91-8B9D-C987CABE0920}"
+	RootNamespace="boincmgr"
+	Keyword="MFCProj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005\wxwidgets\include;"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;__WXNDEBUG__;WXNDEBUG;_UNICODE;UNICODE;_PROGRESSTHRUPROCESSORS;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28u.lib wxbase28u_net.lib wxbase28u_xml.lib wxmsw28u_adv.lib wxmsw28u_core.lib wxmsw28u_html.lib wxregexu.lib wxexpat.lib wxpng.lib wxjpeg.lib wxtiff.lib wxzlib.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\progressthruprocessors.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\progressthruprocessors.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005\wxwidgets\include;"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;__WXNDEBUG__;WXNDEBUG;_UNICODE;UNICODE;_PROGRESSTHRUPROCESSORS;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleacc.lib oleaut32.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28u.lib wxbase28u_net.lib wxbase28u_xml.lib wxmsw28u_adv.lib wxmsw28u_core.lib wxmsw28u_html.lib wxregexu.lib wxexpat.lib wxpng.lib wxtiff.lib wxjpeg.lib wxzlib.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\progressthruprocessors.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\progressthruprocessors.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005\wxwidgets\include;"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswud";..\..\boinc_depends_win_vs2005\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_WINDOWS;_MT;__WXDEBUG__;WXDEBUG;_UNICODE;UNICODE;_PROGRESSTHRUPROCESSORS;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="false"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				EnableEnhancedInstructionSet="0"
+				FloatingPointModel="2"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleacc.lib oleaut32.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxmsw28ud_adv.lib wxmsw28ud_core.lib wxmsw28ud_html.lib wxregexud.lib wxexpatd.lib wxjpegd.lib wxtiffd.lib wxpngd.lib wxzlibd.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\progressthruprocessors.exe"
+				LinkIncremental="0"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\progressthruprocessors.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005\wxwidgets\include;"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswud";..\..\boinc_depends_win_vs2005\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_WINDOWS;_MT;__WXDEBUG__;WXDEBUG;_UNICODE;UNICODE;_PROGRESSTHRUPROCESSORS;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="false"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				EnableEnhancedInstructionSet="0"
+				FloatingPointModel="2"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxmsw28ud_adv.lib wxmsw28ud_core.lib wxmsw28ud_html.lib wxregexud.lib wxexpatd.lib wxpngd.lib wxtiffd.lib wxjpegd.lib wxzlibd.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\progressthruprocessors.exe"
+				LinkIncremental="0"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\progressthruprocessors.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;xrc"
+			UniqueIdentifier="{08DB1F42-8D4B-491a-870C-2A991D5ED0DB}"
+			>
+			<File
+				RelativePath="..\clientgui\res\boinc.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boinc32.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boinc_logo.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boincdisconnect.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\BOINCGUIApp.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCGUIApp.rc"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boincsnooze.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\externalweblink.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\gridrepublic.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\gridrepublicamwizard.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\mess.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\proj.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\result.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\stats.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\usage.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizard_bitmap.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress01.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress02.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress03.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress04.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress05.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress06.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress07.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress08.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress09.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress10.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress11.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress12.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\xfer.xpm"
+				>
+			</File>
+			<Filter
+				Name="Skins"
+				>
+				<Filter
+					Name="Default"
+					>
+					<Filter
+						Name="Graphic"
+						>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\advanced_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\attach_project_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\attach_project_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\cancel_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\cancel_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\change_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\change_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\clear_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\clear_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\close_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\close_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\connecting_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\error_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\left_arrow_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\left_arrow_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_alert_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_dialog_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\preferences_dialog_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\preferences_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\project_area_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\project_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\resume_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\right_arrow_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\right_arrow_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\save_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\save_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\spacer_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\state_indicator_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\suspend_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\synchronize_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\synchronize_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_active_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_animation_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_animation_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_area_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_gauge_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_gauge_progress_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_suspended_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_tab_area_background_image.xpm"
+							>
+						</File>
+					</Filter>
+				</Filter>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Simple"
+			>
+			<Filter
+				Name="Prototype"
+				>
+				<File
+					RelativePath="..\clientgui\sg_BoincSimpleGUI.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_BoincSimpleGUI.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ClientStateIndicator.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ClientStateIndicator.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_CustomControls.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgMessages.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgMessages.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgPreferences.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgPreferences.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageButton.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageButton.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageLoader.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageLoader.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProgressBar.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProgressBar.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProjectsComponent.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProjectsComponent.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_SGUIListControl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_SGUIListControl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_StatImageLoader.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_StatImageLoader.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ViewTabPage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ViewTabPage.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="libboinc"
+			>
+			<File
+				RelativePath="..\lib\app_ipc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\app_ipc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\common_defs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\error_numbers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_imports.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\std_fixes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Wizards"
+			>
+			<File
+				RelativePath="..\clientgui\AccountInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerProcessingPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerProcessingPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerPropertiesPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerPropertiesPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AlreadyExistsPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AlreadyExistsPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionErrorPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionErrorPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NoInternetConnectionPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NoInternetConnectionPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotDetectedPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotDetectedPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotFoundPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotFoundPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectProcessingPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectProcessingPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectPropertiesPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectPropertiesPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\TermsOfUsePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\TermsOfUsePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\UnavailablePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\UnavailablePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WelcomePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WelcomePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WizardAttachProject.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WizardAttachProject.h"
+				>
+			</File>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\ProjectListCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ProjectListCtrl.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Infrastructure"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCBaseWizard.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCBaseWizard.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCWizards.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\wizardex.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\wizardex.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Infrastructure"
+			>
+			<File
+				RelativePath="..\clientgui\BOINCBaseFrame.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCBaseFrame.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCClientManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCClientManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCDialupManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCDialupManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\browser.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\browser.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\hyperlink.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\hyperlink.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\Localization.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\Localization.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\LogBOINC.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\LogBOINC.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\SkinManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\SkinManager.h"
+				>
+			</File>
+			<Filter
+				Name="FlatNotebook"
+				>
+				<File
+					RelativePath="..\clientgui\common\wxFlatNotebook.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxFlatNotebook.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxFlatNotebookImages.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxFNBDropTarget.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Validators"
+				>
+				<File
+					RelativePath="..\clientgui\ValidateAccountKey.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateAccountKey.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateEmailAddress.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateEmailAddress.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateURL.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateURL.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Dialogs"
+				>
+				<File
+					RelativePath="..\clientgui\DlgExitMessage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgExitMessage.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgGenericMessage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgGenericMessage.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Advanced"
+			>
+			<File
+				RelativePath="..\clientgui\AdvancedFrame.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AdvancedFrame.h"
+				>
+			</File>
+			<Filter
+				Name="Views"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCListCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCListCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCTaskCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCTaskCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewMessages.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewMessages.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewNews.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewNews.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewProjects.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewProjects.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewResources.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewResources.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewStatistics.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewStatistics.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewTransfers.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewTransfers.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewWork.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewWork.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCBaseView.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCBaseView.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAbout.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAbout.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferences.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferences.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferencesBase.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferencesBase.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgItemProperties.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgItemProperties.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgOptions.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgOptions.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgSelectComputer.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgSelectComputer.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxPieCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxPieCtrl.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Taskbar"
+			>
+			<File
+				RelativePath="..\clientgui\BOINCTaskBar.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCTaskBar.h"
+				>
+			</File>
+			<Filter
+				Name="Infrastructure"
+				>
+				<File
+					RelativePath="..\clientgui\msw\taskbarex.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\msw\taskbarex.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Document"
+			>
+			<File
+				RelativePath="..\clientgui\MainDocument.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\MainDocument.h"
+				>
+			</File>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\AsyncRPC.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\AsyncRPC.h"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client.h"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client_ops.cpp"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<File
+			RelativePath="..\clientgui\_wx_intellisense.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\BOINCGUIApp.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\BOINCGUIApp.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\Events.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\resource.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\stdwx.cpp"
+			>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Release|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Unicode - Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Unicode - Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\clientgui\stdwx.h"
+			>
+		</File>
+	</Files>
+	<Globals>
+		<Global
+			Name="RESOURCE_FILE"
+			Value="..\clientgui\BOINCGUIApp.rc"
+		/>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ptp_boincsvcctrl.vcproj b/win_build/ptp_boincsvcctrl.vcproj
new file mode 100644
index 0000000..f3f0500
--- /dev/null
+++ b/win_build/ptp_boincsvcctrl.vcproj
@@ -0,0 +1,604 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boincsvcctrl"
+	ProjectGUID="{9FC47E90-4E0D-4383-B446-A84314B00764}"
+	RootNamespace="boincsvcctrl"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB boinc_dll.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB boinc_dll.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="0"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB boinc_dll.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;.."
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				StringPooling="false"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB boinc_dll.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)""
+				ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+				AdditionalManifestDependencies=""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="../clientctrl/boincsvcctrl.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\clientctrl\boincsvcctrl.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientctrl\boincsvcctrl.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clientctrl\boincsvcctrl.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/ptp_boinctray.vcproj b/win_build/ptp_boinctray.vcproj
new file mode 100644
index 0000000..1fd70d6
--- /dev/null
+++ b/win_build/ptp_boinctray.vcproj
@@ -0,0 +1,598 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinctray"
+	ProjectGUID="{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}"
+	RootNamespace="boinc_ss"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib boinc_dll.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib boinc_dll.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib boinc_dll.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE;_PROGRESSTHRUPROCESSORS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_PROGRESSTHRUPROCESSORS"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib boinc_dll.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""$(OutDir)";"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\clienttray\tray_win.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\clienttray\boinc_tray.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clienttray\tray_win.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clienttray\boinc_tray.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/sim.vcproj b/win_build/sim.vcproj
new file mode 100644
index 0000000..09aed5e
--- /dev/null
+++ b/win_build/sim.vcproj
@@ -0,0 +1,675 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boincsim"
+	ProjectGUID="{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}"
+	RootNamespace="boinc_guirpctest"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;SIM"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;SIM"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;SIM"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;SIM"
+				StringPooling="true"
+				ExceptionHandling="1"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\client\app.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\client\client_msgs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\coproc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpu_sched.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_apps.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_scheduler.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\sched\edf_sim.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\log_flags.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\rr_sim.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sim.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sim_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\time_stats.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\work_fetch.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\client\app.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\rr_sim.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sim.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\time_stats.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/sleeper.vcproj b/win_build/sleeper.vcproj
new file mode 100644
index 0000000..2c720f9
--- /dev/null
+++ b/win_build/sleeper.vcproj
@@ -0,0 +1,440 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="sleeper"
+	ProjectGUID="{A9647CEA-644D-4C0A-8733-D916CD344859}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib opengl32.lib psapi.lib glu32.lib ole32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\sleeper_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\sleeper_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib opengl32.lib psapi.lib glu32.lib ole32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\sleeper_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\sleeper_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib psapi.lib glu32.lib ole32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\sleeper_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\sleeper_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib ole32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\sleeper_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\sleeper_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\samples\sleeper\sleeper.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/uc2.vcproj b/win_build/uc2.vcproj
new file mode 100644
index 0000000..c9b0db6
--- /dev/null
+++ b/win_build/uc2.vcproj
@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="example_app"
+	ProjectGUID="{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;APP_GRAPHICS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib odbc32.lib odbccp32.lib psapi.lib libcmt.lib libcpmt.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib odbc32.lib odbccp32.lib psapi.lib libcmt.lib libcpmt.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib ole32.lib psapi.lib delayimp.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib ole32.lib psapi.lib delayimp.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\api\graphics2_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\example_app\uc2.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\samples\example_app\uc2.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/uc2_graphics.vcproj b/win_build/uc2_graphics.vcproj
new file mode 100644
index 0000000..7448dfd
--- /dev/null
+++ b/win_build/uc2_graphics.vcproj
@@ -0,0 +1,460 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="example_app_graphics"
+	ProjectGUID="{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include;../../boinc_depends_win_vs2005/freetype/include;../../boinc_depends_win_vs2005/ftgl/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;FTGL_LIBRARY_STATIC"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4305"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib odbc32.lib odbccp32.lib psapi.lib libcmt.lib libcpmt.lib freetype2410.lib ftgl_static.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/freetype/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/ftgl/mswin/$(PlatformName)/$(ConfigurationName)/lib""
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include;../../boinc_depends_win_vs2005/freetype/include;../../boinc_depends_win_vs2005/ftgl/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;FTGL_LIBRARY_STATIC"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4305"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib odbc32.lib odbccp32.lib psapi.lib libcmt.lib libcpmt.lib freetype2410.lib ftgl_static.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/freetype/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/ftgl/mswin/$(PlatformName)/$(ConfigurationName)/lib""
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include;../../boinc_depends_win_vs2005/freetype/include;../../boinc_depends_win_vs2005/ftgl/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;FTGL_LIBRARY_STATIC"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				DisableSpecificWarnings="4305"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib psapi.lib glu32.lib ole32.lib delayimp.lib freetype2410_D.lib ftgl_static_D.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/freetype/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/ftgl/mswin/$(PlatformName)/$(ConfigurationName)/lib""
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include;../../boinc_depends_win_vs2005/freetype/include;../../boinc_depends_win_vs2005/ftgl/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;FTGL_LIBRARY_STATIC"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4305"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib ole32.lib psapi.lib delayimp.lib freetype2410_D.lib ftgl_static_D.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005/freetype/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005/ftgl/mswin/$(PlatformName)/$(ConfigurationName)/lib""
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\api\ttfont.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\example_app\uc2_graphics.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\api\ttfont.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\example_app\uc2.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/upper_case.vcproj b/win_build/upper_case.vcproj
new file mode 100644
index 0000000..06569d4
--- /dev/null
+++ b/win_build/upper_case.vcproj
@@ -0,0 +1,537 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="upper_case"
+	ProjectGUID="{8281D898-0E64-44EB-8356-4F0336F19A35}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib odbc32.lib odbccp32.lib libcmt.lib libcpmt.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\uppercase_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\uppercase_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib odbc32.lib odbccp32.lib libcmt.lib libcpmt.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\uppercase_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\uppercase_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib ole32.lib delayimp.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\uppercase_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\uppercase_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib ole32.lib delayimp.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\uppercase_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\uppercase_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\samples\uppercase\uc_graphics.cpp"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\samples\uppercase\upper_case.cpp"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/vboxwrapper.vcproj b/win_build/vboxwrapper.vcproj
new file mode 100644
index 0000000..f10403b
--- /dev/null
+++ b/win_build/vboxwrapper.vcproj
@@ -0,0 +1,460 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="vboxwrapper"
+	ProjectGUID="{F243B93C-73CB-44E7-9BDC-847BB95C27CA}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+                                AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib ole32.lib wsock32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\vboxwrapper_25474_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\vboxwrapper_25425_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib  kernel32.lib user32.lib gdi32.lib ole32.lib wsock32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\vboxwrapper_25474_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\vboxwrapper_25425_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib ole32.lib psapi.lib wsock32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\vboxwrapper_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\vboxwrapper_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib ole32.lib wsock32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\vboxwrapper_6.19_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\vboxwrapper_6.19_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\samples\vboxwrapper\floppyio.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\vboxwrapper\vbox.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\vboxwrapper\vboxwrapper.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\samples\vboxwrapper\floppyio.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\vboxwrapper\vbox.h"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\vboxwrapper\vboxwrapper.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/wcg.sln b/win_build/wcg.sln
new file mode 100644
index 0000000..19c529b
--- /dev/null
+++ b/win_build/wcg.sln
@@ -0,0 +1,580 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc", "wcg_boinc_cli.vcproj", "{C04F0FCC-BB5D-4627-8656-6173B28BD69E}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc_dll", "boinc_dll.vcproj", "{B06280CB-82A4-46DE-8956-602643078BDF}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinc_ss", "wcg_boinc_ss.vcproj", "{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinccmd", "wcg_boinccmd.vcproj", "{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E} = {C04F0FCC-BB5D-4627-8656-6173B28BD69E}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincmgr", "wcg_boincmgr.vcproj", "{06113715-AC51-4E91-8B9D-C987CABE0920}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E} = {C04F0FCC-BB5D-4627-8656-6173B28BD69E}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboinc", "libboinc.vcproj", "{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincupdater", "updater.vcproj", "{B865A797-36AF-4059-9D52-8FF4F9B132D5}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincsim", "sim.vcproj", "{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boinctray", "boinctray.vcproj", "{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "image_libs", "image_libs.vcproj", "{D3D21F11-A7E7-4EA2-8518-E24695133BFF}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeglib", "jpeglib.vcproj", "{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glut", "glut.vcproj", "{C4165626-F68F-4F66-A126-3B82DDBB7480}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wrapper", "wrapper.vcproj", "{F243B93C-73CB-44E7-9BDC-847BB95A27CA}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sleeper", "sleeper.vcproj", "{A9647CEA-644D-4C0A-8733-D916CD344859}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "worker", "worker.vcproj", "{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_app", "uc2.vcproj", "{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_app_graphics", "uc2_graphics.vcproj", "{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4} = {814EBFD3-3CE6-4933-A580-C1FE3147ACB4}
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98} = {5F065EAC-B881-4E9A-9E34-7A21D7A01D98}
+		{C4165626-F68F-4F66-A126-3B82DDBB7480} = {C4165626-F68F-4F66-A126-3B82DDBB7480}
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF} = {D3D21F11-A7E7-4EA2-8518-E24695133BFF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgraphics2", "libgraphics2.vcproj", "{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multi_thread", "multi_thread.vcproj", "{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE} = {07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboinc_staticcrt", "libboinc_staticcrt.vcproj", "{B00664BD-71EB-46C1-957E-CD851418D395}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboincapi_staticcrt", "libboincapi_staticcrt.vcproj", "{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boincsvcctrl", "boincsvcctrl.vcproj", "{9FC47E90-4E0D-4383-B446-A84314B00764}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B06280CB-82A4-46DE-8956-602643078BDF} = {B06280CB-82A4-46DE-8956-602643078BDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ss_app", "wcg_ss_app.vcproj", "{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4} = {814EBFD3-3CE6-4933-A580-C1FE3147ACB4}
+		{B00664BD-71EB-46C1-957E-CD851418D395} = {B00664BD-71EB-46C1-957E-CD851418D395}
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98} = {5F065EAC-B881-4E9A-9E34-7A21D7A01D98}
+		{C4165626-F68F-4F66-A126-3B82DDBB7480} = {C4165626-F68F-4F66-A126-3B82DDBB7480}
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF} = {D3D21F11-A7E7-4EA2-8518-E24695133BFF}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		Samples - Debug|Win32 = Samples - Debug|Win32
+		Samples - Debug|x64 = Samples - Debug|x64
+		Samples - Release|Win32 = Samples - Release|Win32
+		Samples - Release|x64 = Samples - Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|Win32.Build.0 = Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|x64.ActiveCfg = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Debug|x64.Build.0 = Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|Win32.ActiveCfg = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|Win32.Build.0 = Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|x64.ActiveCfg = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Release|x64.Build.0 = Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{C04F0FCC-BB5D-4627-8656-6173B28BD69E}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|Win32.Build.0 = Debug|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|x64.ActiveCfg = Debug|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Debug|x64.Build.0 = Debug|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|Win32.ActiveCfg = Release|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|Win32.Build.0 = Release|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|x64.ActiveCfg = Release|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Release|x64.Build.0 = Release|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{B06280CB-82A4-46DE-8956-602643078BDF}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Release|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|Win32.Build.0 = Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|x64.ActiveCfg = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Debug|x64.Build.0 = Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|Win32.ActiveCfg = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|Win32.Build.0 = Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|x64.ActiveCfg = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Release|x64.Build.0 = Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|Win32.ActiveCfg = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|Win32.Build.0 = Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|x64.ActiveCfg = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Debug|x64.Build.0 = Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|Win32.ActiveCfg = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|Win32.Build.0 = Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|x64.ActiveCfg = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Release|x64.Build.0 = Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{06113715-AC51-4E91-8B9D-C987CABE0920}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.Build.0 = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.ActiveCfg = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.Build.0 = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.ActiveCfg = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.Build.0 = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.ActiveCfg = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.Build.0 = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Debug|Win32.Build.0 = Debug|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Debug|x64.ActiveCfg = Debug|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Debug|x64.Build.0 = Debug|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Release|Win32.ActiveCfg = Release|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Release|Win32.Build.0 = Release|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Release|x64.ActiveCfg = Release|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Release|x64.Build.0 = Release|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{B865A797-36AF-4059-9D52-8FF4F9B132D5}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Debug|Win32.Build.0 = Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Debug|x64.ActiveCfg = Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Debug|x64.Build.0 = Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Release|Win32.ActiveCfg = Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Release|Win32.Build.0 = Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Release|x64.ActiveCfg = Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Release|x64.Build.0 = Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{B950E31B-C075-4F6D-8A2B-25EAE9D46C93}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|Win32.Build.0 = Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|x64.ActiveCfg = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Debug|x64.Build.0 = Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|Win32.ActiveCfg = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|Win32.Build.0 = Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|x64.ActiveCfg = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Release|x64.Build.0 = Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{4A2C5963-6A8D-4DA1-A312-C3D749B2EA81}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|Win32.Build.0 = Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|x64.ActiveCfg = Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Debug|x64.Build.0 = Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|Win32.ActiveCfg = Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|Win32.Build.0 = Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|x64.ActiveCfg = Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Release|x64.Build.0 = Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{D3D21F11-A7E7-4EA2-8518-E24695133BFF}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|Win32.Build.0 = Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|x64.ActiveCfg = Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Debug|x64.Build.0 = Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|Win32.ActiveCfg = Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|Win32.Build.0 = Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|x64.ActiveCfg = Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Release|x64.Build.0 = Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{5F065EAC-B881-4E9A-9E34-7A21D7A01D98}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|Win32.Build.0 = Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|x64.ActiveCfg = Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Debug|x64.Build.0 = Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|Win32.ActiveCfg = Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|Win32.Build.0 = Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|x64.ActiveCfg = Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Release|x64.Build.0 = Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{C4165626-F68F-4F66-A126-3B82DDBB7480}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|Win32.Build.0 = Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|x64.ActiveCfg = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Debug|x64.Build.0 = Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|Win32.ActiveCfg = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|Win32.Build.0 = Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|x64.ActiveCfg = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Release|x64.Build.0 = Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{F243B93C-73CB-44E7-9BDC-847BB95A27CA}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|Win32.ActiveCfg = Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|Win32.Build.0 = Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|x64.ActiveCfg = Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Debug|x64.Build.0 = Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|Win32.ActiveCfg = Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|Win32.Build.0 = Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|x64.ActiveCfg = Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Release|x64.Build.0 = Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{A9647CEA-644D-4C0A-8733-D916CD344859}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|Win32.Build.0 = Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|x64.ActiveCfg = Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Debug|x64.Build.0 = Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|Win32.ActiveCfg = Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|Win32.Build.0 = Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|x64.ActiveCfg = Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Release|x64.Build.0 = Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|Win32.ActiveCfg = Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|Win32.Build.0 = Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|x64.ActiveCfg = Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Debug|x64.Build.0 = Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|Win32.ActiveCfg = Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|Win32.Build.0 = Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|x64.ActiveCfg = Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Release|x64.Build.0 = Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{CCB9A37C-7AD8-4FC1-ABEC-1A6ED2268F83}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|Win32.ActiveCfg = Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|Win32.Build.0 = Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|x64.ActiveCfg = Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Debug|x64.Build.0 = Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|Win32.ActiveCfg = Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|Win32.Build.0 = Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|x64.ActiveCfg = Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Release|x64.Build.0 = Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{3CF31288-A44D-4C78-A3AA-B05B6E32DF11}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|Win32.Build.0 = Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|x64.ActiveCfg = Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Debug|x64.Build.0 = Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|Win32.ActiveCfg = Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|Win32.Build.0 = Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|x64.ActiveCfg = Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Release|x64.Build.0 = Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{814EBFD3-3CE6-4933-A580-C1FE3147ACB4}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|Win32.Build.0 = Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|x64.ActiveCfg = Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Debug|x64.Build.0 = Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|Win32.ActiveCfg = Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|Win32.Build.0 = Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|x64.ActiveCfg = Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Release|x64.Build.0 = Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{BFE833C6-840F-4F2E-A1FA-A4DE9B9277D6}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|Win32.Build.0 = Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|x64.ActiveCfg = Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Debug|x64.Build.0 = Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|Win32.ActiveCfg = Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|Win32.Build.0 = Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|x64.ActiveCfg = Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Release|x64.Build.0 = Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{B00664BD-71EB-46C1-957E-CD851418D395}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|Win32.ActiveCfg = Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|Win32.Build.0 = Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|x64.ActiveCfg = Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Debug|x64.Build.0 = Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|Win32.ActiveCfg = Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|Win32.Build.0 = Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|x64.ActiveCfg = Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Release|x64.Build.0 = Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{07BDA8F7-4AAF-4A3B-B96E-EA72A143C5AE}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|Win32.Build.0 = Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|x64.ActiveCfg = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Debug|x64.Build.0 = Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|Win32.ActiveCfg = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|Win32.Build.0 = Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|x64.ActiveCfg = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Release|x64.Build.0 = Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{9FC47E90-4E0D-4383-B446-A84314B00764}.Samples - Release|x64.Build.0 = Samples - Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|Win32.Build.0 = Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|x64.ActiveCfg = Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Debug|x64.Build.0 = Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|Win32.ActiveCfg = Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|Win32.Build.0 = Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|x64.ActiveCfg = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Release|x64.Build.0 = Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|Win32.ActiveCfg = Samples - Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|Win32.Build.0 = Samples - Debug|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|x64.ActiveCfg = Samples - Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Debug|x64.Build.0 = Samples - Debug|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|Win32.ActiveCfg = Samples - Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|Win32.Build.0 = Samples - Release|Win32
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|x64.ActiveCfg = Samples - Release|x64
+		{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}.Samples - Release|x64.Build.0 = Samples - Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/win_build/wcg_boinc_cli.vcproj b/win_build/wcg_boinc_cli.vcproj
new file mode 100644
index 0000000..dc19f09
--- /dev/null
+++ b/win_build/wcg_boinc_cli.vcproj
@@ -0,0 +1,1355 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc"
+	ProjectGUID="{C04F0FCC-BB5D-4627-8656-6173B28BD69E}"
+	RootNamespace="boinc_cli"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_10/openssl/include;../../boinc_depends_win_vs2005_6_10/curl/include;../../boinc_depends_win_vs2005_6_10/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1d.lib ssleay32.lib libeay32.lib libcurld_imp.lib nvapi.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_10/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_10/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_10/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_10/openssl/include;../../boinc_depends_win_vs2005_6_10/curl/include;../../boinc_depends_win_vs2005_6_10/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL;_WCG"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_WCG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib ssleay32.lib libeay32.lib libcurl_imp.lib nvapi.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib gdi32.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_10/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_10/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_10/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_10/openssl/include;../../boinc_depends_win_vs2005_6_10/curl/include;../../boinc_depends_win_vs2005_6_10/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1d.lib ssleay32.lib libeay32.lib libcurld_imp.lib nvapi.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_10/openssl/mswin/$(PlatformName)/Debug/lib";"../../boinc_depends_win_vs2005_6_10/curl/mswin/$(PlatformName)/Debug/lib";"../../boinc_depends_win_vs2005_6_10/zlib/mswin/$(PlatformName)/Debug/lib";"../coprocs/cuda/mswin/$(PlatformName)/Debug/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_10/openssl/include;../../boinc_depends_win_vs2005_6_10/curl/include;../../boinc_depends_win_vs2005_6_10/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib ssleay32.lib libeay32.lib libcurl_imp.lib nvapi.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_10/openssl/mswin/$(PlatformName)/Release/lib";"../../boinc_depends_win_vs2005_6_10/curl/mswin/$(PlatformName)/Release/lib";"../../boinc_depends_win_vs2005_6_10/zlib/mswin/$(PlatformName)/Release/lib";"../coprocs/cuda/mswin/$(PlatformName)/Release/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_10/openssl/include;../../boinc_depends_win_vs2005_6_10/curl/include;../../boinc_depends_win_vs2005_6_10/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1d.lib ssleay32.lib libeay32.lib libcurld_imp.lib nvapi.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib userenv.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_10/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_10/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_10/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_10/openssl/include;../../boinc_depends_win_vs2005_6_10/curl/include;../../boinc_depends_win_vs2005_6_10/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib ssleay32.lib libeay32.lib libcurl_imp.lib nvapi.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib userenv.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_10/openssl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_10/curl/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../../boinc_depends_win_vs2005_6_10/zlib/mswin/$(PlatformName)/$(ConfigurationName)/lib";"../coprocs/cuda/mswin/$(PlatformName)/$(ConfigurationName)/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_10/openssl/include;../../boinc_depends_win_vs2005_6_10/curl/include;../../boinc_depends_win_vs2005_6_10/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1d.lib ssleay32.lib libeay32.lib libcurld_imp.lib nvapi.lib MSVCRTD.LIB MSVCPRTD.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib userenv.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_10/openssl/mswin/$(PlatformName)/Debug/lib";"../../boinc_depends_win_vs2005_6_10/curl/mswin/$(PlatformName)/Debug/lib";"../../boinc_depends_win_vs2005_6_10/zlib/mswin/$(PlatformName)/Debug/lib";"../coprocs/cuda/mswin/$(PlatformName)/Debug/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_cli.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005_6_10/openssl/include;../../boinc_depends_win_vs2005_6_10/curl/include;../../boinc_depends_win_vs2005_6_10/zlib/include;../coprocs/cuda/include"
+				PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL"
+				StringPooling="false"
+				RuntimeLibrary="2"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib ssleay32.lib libeay32.lib libcurl_imp.lib nvapi.lib MSVCRT.LIB MSVCPRT.LIB wsock32.lib wininet.lib winmm.lib sensapi.lib userenv.lib Iphlpapi.lib kernel32.lib user32.lib advapi32.lib sensapi.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""../../boinc_depends_win_vs2005_6_10/openssl/mswin/$(PlatformName)/Release/lib";"../../boinc_depends_win_vs2005_6_10/curl/mswin/$(PlatformName)/Release/lib";"../../boinc_depends_win_vs2005_6_10/zlib/mswin/$(PlatformName)/Release/lib";"../coprocs/cuda/mswin/$(PlatformName)/Release/lib";../../;"$(OutDir)""
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_exe.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boinc.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\client\acct_mgr.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\acct_setup.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\app.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_control.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_graphics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app_start.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\auto_update.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\client\check_state.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_msgs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\client_state.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\client_types.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\coproc_detect.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpu_sched.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_account.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_apps.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_benchmark.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_cmdline.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_files.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_platforms.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_proxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\cs_scheduler.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_statefile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_trickle.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone2.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\file_names.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\file_xfer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_http.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\http_curl.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\log_flags.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\main.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\msg_log.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\net_stats.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\pers_file_xfer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\rr_sim.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sandbox.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\scheduler_op.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sysmon_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\time_stats.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\whetstone.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\work_fetch.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\client\acct_mgr.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\acct_setup.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\app.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\auto_update.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\boinc_cli.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_msgs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_state.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\client_types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpp.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cpu_benchmark.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\cs_proxy.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\dhrystone.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\error_numbers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\file_names.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\file_xfer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_http.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\gui_rpc_server.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\hostinfo_network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\http_curl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\http_curl_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\log_flags.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\main.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\msg_log.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\net_stats.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Client\pers_file_xfer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\procinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\rr_sim.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sandbox.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\scheduler_op.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\sysmon_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\time_stats.h"
+				>
+			</File>
+			<File
+				RelativePath="..\version.h"
+				>
+			</File>
+			<File
+				RelativePath="..\client\work_fetch.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cli.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/wcg_boinc_ss.vcproj b/win_build/wcg_boinc_ss.vcproj
new file mode 100644
index 0000000..21e5c42
--- /dev/null
+++ b/win_build/wcg_boinc_ss.vcproj
@@ -0,0 +1,776 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinc_ss"
+	ProjectGUID="{4A2C5963-6A8D-4CA1-A312-C3D749B2EA81}"
+	RootNamespace="boinc_ss"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib comctl32.lib userenv.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE;_WCG"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_WCG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib comctl32.lib userenv.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../,../api/,../lib,../client/"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="../"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib comctl32.lib userenv.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				StackReserveSize="0"
+				StackCommitSize="0"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_ss.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				AdditionalIncludeDirectories="../api/,../lib/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib wsock32.lib wininet.lib winmm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib comctl32.lib userenv.lib $(NOINHERIT)"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc.scr"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boinc_scr.pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\base64.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\coproc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.c"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\boinc_ss.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\screensaver_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_imports.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.h"
+				>
+			</File>
+			<File
+				RelativePath=".\stdafx.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clientscr\res\boinc.bmp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\boinc_ss.rc"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\gridrepublic.bmp"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\gridrepublic.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\res\icon.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\Scricon3.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\client\win\res\seed.bmp"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+		<Global
+			Name="RESOURCE_FILE"
+			Value="\Src\BOINCSVN\trunk\boinc\clientscr\boinc_ss.rc"
+		/>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/wcg_boinccmd.vcproj b/win_build/wcg_boinccmd.vcproj
new file mode 100644
index 0000000..0775215
--- /dev/null
+++ b/win_build/wcg_boinccmd.vcproj
@@ -0,0 +1,1047 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boinccmd"
+	ProjectGUID="{8F37E1F3-3A68-4A1D-9579-A1210BDD055E}"
+	RootNamespace="boinc_guirpctest"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client;.."
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib userenv.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_WCG"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_WCG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib userenv.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client;.."
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib userenv.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib userenv.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client;.."
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				StringPooling="true"
+				ExceptionHandling="1"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Debug/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client;.."
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				FloatingPointModel="2"
+				RuntimeTypeInfo="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib oldnames.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Build\Release/boinc_guirpctest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client,.."
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+				BrowseInformation="0"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib MSVCRT.LIB MSVCPRT.LIB oldnames.lib"
+				ShowProgress="0"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\client\boinc_cmd.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Samples - Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Unicode - Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseSigned|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_print.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cmd.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\boinc_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\client\win\boinc_cmd.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/wcg_boincmgr.vcproj b/win_build/wcg_boincmgr.vcproj
new file mode 100644
index 0000000..fc2bd5f
--- /dev/null
+++ b/win_build/wcg_boincmgr.vcproj
@@ -0,0 +1,2071 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="boincmgr"
+	ProjectGUID="{06113715-AC51-4E91-8B9D-C987CABE0920}"
+	RootNamespace="boincmgr"
+	Keyword="MFCProj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005_6_10\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;__WXNDEBUG__;WXNDEBUG;_UNICODE;UNICODE;wxUSE_GUI=1;_WCG;$(NOINHERIT)"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_WCG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28u.lib wxbase28u_net.lib wxbase28u_xml.lib wxmsw28u_adv.lib wxmsw28u_core.lib wxmsw28u_html.lib wxregexu.lib wxexpat.lib wxpng.lib wxjpeg.lib wxtiff.lib wxzlib.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_10\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswud";..\..\boinc_depends_win_vs2005_6_10\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_WINDOWS;_MT;__WXDEBUG__;WXDEBUG;_UNICODE;UNICODE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="false"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				EnableEnhancedInstructionSet="0"
+				FloatingPointModel="2"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleacc.lib oleaut32.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxmsw28ud_adv.lib wxmsw28ud_core.lib wxmsw28ud_html.lib wxregexud.lib wxexpatd.lib wxjpegd.lib wxtiffd.lib wxpngd.lib wxzlibd.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_10\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswud";..\..\boinc_depends_win_vs2005_6_10\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_WINDOWS;_MT;__WXDEBUG__;WXDEBUG;wxUSE_GUI=1"
+				StringPooling="false"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				EnableEnhancedInstructionSet="0"
+				FloatingPointModel="2"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28d.lib wxbase28d_net.lib wxbase28d_xml.lib wxmsw28d_adv.lib wxmsw28d_core.lib wxmsw28d_html.lib wxregexd.lib wxexpatd.lib wxpngd.lib wxjpegd.lib wxtiffd.lib wxzlibd.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_10\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005_6_10\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;_DLL;__WXNDEBUG__;WXNDEBUG;wxUSE_GUI=1"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28.lib wxbase28_net.lib wxbase28_xml.lib wxmsw28_adv.lib wxmsw28_core.lib wxmsw28_html.lib wxregex.lib wxexpat.lib wxpng.lib wxjpeg.lib wxtiff.lib wxzlib.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_10\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005_6_10\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;__WXNDEBUG__;WXNDEBUG;_UNICODE;UNICODE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="true"
+				ExceptionHandling="1"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleacc.lib oleaut32.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28u.lib wxbase28u_net.lib wxbase28u_xml.lib wxmsw28u_adv.lib wxmsw28u_core.lib wxmsw28u_html.lib wxregexu.lib wxexpat.lib wxpng.lib wxtiff.lib wxjpeg.lib wxzlib.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_10\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswud";..\..\boinc_depends_win_vs2005_6_10\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_WINDOWS;_MT;__WXDEBUG__;WXDEBUG;_UNICODE;UNICODE;wxUSE_GUI=1;$(NOINHERIT)"
+				StringPooling="false"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				EnableEnhancedInstructionSet="0"
+				FloatingPointModel="2"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxmsw28ud_adv.lib wxmsw28ud_core.lib wxmsw28ud_html.lib wxregexud.lib wxexpatd.lib wxpngd.lib wxtiffd.lib wxjpegd.lib wxzlibd.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_10\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswud";..\..\boinc_depends_win_vs2005_6_10\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_DEBUG;_WINDOWS;_MT;__WXDEBUG__;WXDEBUG;wxUSE_GUI=1"
+				StringPooling="false"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				EnableEnhancedInstructionSet="0"
+				FloatingPointModel="2"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28d.lib wxbase28d_net.lib wxbase28d_xml.lib wxmsw28d_adv.lib wxmsw28d_core.lib wxmsw28d_html.lib wxregexd.lib wxexpatd.lib wxpngd.lib wxjpegd.lib wxtiffd.lib wxzlibd.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="0"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_10\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005_6_10\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)"
+				PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;_DLL;__WXNDEBUG__;WXNDEBUG;wxUSE_GUI=1"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="false"
+				FloatingPointModel="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdwx.h"
+				PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
+				WarningLevel="4"
+				WarnAsError="false"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127;4702;4244"
+				ForcedIncludeFiles="stdwx.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				AdditionalIncludeDirectories="..\..\boinc_depends_win_vs2005_6_10\wxwidgets\include;.."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib oleacc.lib shell32.lib comdlg32.lib advapi32.lib oldnames.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib wininet.lib wxbase28.lib wxbase28_net.lib wxbase28_xml.lib wxmsw28_adv.lib wxmsw28_core.lib wxmsw28_html.lib wxregex.lib wxexpat.lib wxpng.lib wxtiff.lib wxjpeg.lib wxzlib.lib boinc_dll.lib sqlite3.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(OutDir)";"..\..\boinc_depends_win_vs2005_6_10\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib";"..\..\boinc_depends_win_vs2005_6_10\sqlite3\mswin\$(PlatformName)\$(ConfigurationName)\lib""
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				SetChecksum="true"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Checking boincmgr.exe dependencies"
+				CommandLine="boinc_post_bld_rules.cmd "$(SolutionDir)" "$(OutDir)" "$(PlatformName)" "$(ConfigurationName)""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;xrc"
+			UniqueIdentifier="{08DB1F42-8D4B-491a-870C-2A991D5ED0DB}"
+			>
+			<File
+				RelativePath="..\clientgui\res\atiicon.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boinc.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boinc32.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boinc_logo.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boincdisconnect.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\BOINCGUIApp.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCGUIApp.rc"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\boincsnooze.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\externalweblink.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\gridrepublic.ico"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\gridrepublicamwizard.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\mess.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\multicore.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\nvidiaicon.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\proj.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\result.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\stats.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\usage.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizard_bitmap.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress01.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress02.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress03.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress04.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress05.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress06.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress07.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress08.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress09.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress10.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress11.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\wizprogress12.xpm"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\res\xfer.xpm"
+				>
+			</File>
+			<Filter
+				Name="Skins"
+				>
+				<Filter
+					Name="Default"
+					>
+					<Filter
+						Name="Graphic"
+						>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\advanced_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\attach_project_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\attach_project_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\cancel_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\cancel_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\change_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\change_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\clear_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\clear_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\close_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\close_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\connecting_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\error_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\left_arrow_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\left_arrow_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_alert_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_dialog_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\messages_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\preferences_dialog_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\preferences_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\project_area_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\project_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\resume_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\right_arrow_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\right_arrow_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\save_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\save_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\spacer_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\state_indicator_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\suspend_link_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\synchronize_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\synchronize_clicked_button.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_active_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_animation_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_animation_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_area_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_gauge_background_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_gauge_progress_indicator_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_suspended_image.xpm"
+							>
+						</File>
+						<File
+							RelativePath="..\clientgui\res\skins\default\graphic\workunit_tab_area_background_image.xpm"
+							>
+						</File>
+					</Filter>
+				</Filter>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Simple"
+			>
+			<Filter
+				Name="Prototype"
+				>
+				<File
+					RelativePath="..\clientgui\sg_BoincSimpleGUI.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_BoincSimpleGUI.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ClientStateIndicator.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ClientStateIndicator.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_CustomControls.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgMessages.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgMessages.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgPreferences.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_DlgPreferences.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageButton.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageButton.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageLoader.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ImageLoader.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProgressBar.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProgressBar.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProjectsComponent.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ProjectsComponent.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_SGUIListControl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_SGUIListControl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_StatImageLoader.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_StatImageLoader.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ViewTabPage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\sg_ViewTabPage.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="libboinc"
+			>
+			<File
+				RelativePath="..\lib\app_ipc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\app_ipc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\base64.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\common_defs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\coproc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\diagnostics_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\error_numbers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\filesys.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\hostinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\lib\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\md5_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\mfile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\miofile.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\network.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\parse.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\prefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proc_control.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\proxy_info.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_imports.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\stackwalker_win.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\std_fixes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\str_util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\url.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\url.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\win_util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Wizards"
+			>
+			<File
+				RelativePath="..\clientgui\AccountInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerProcessingPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerProcessingPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerPropertiesPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AccountManagerPropertiesPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AlreadyExistsPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AlreadyExistsPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionErrorPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionErrorPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\CompletionPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NoInternetConnectionPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NoInternetConnectionPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotDetectedPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotDetectedPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotFoundPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\NotFoundPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectProcessingPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectProcessingPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectPropertiesPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProjectPropertiesPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyInfoPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyInfoPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyPage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\ProxyPage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\TermsOfUsePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\TermsOfUsePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\UnavailablePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\UnavailablePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WelcomePage.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WelcomePage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WizardAttachProject.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\WizardAttachProject.h"
+				>
+			</File>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\ProjectListCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ProjectListCtrl.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Infrastructure"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCBaseWizard.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCBaseWizard.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCWizards.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\wizardex.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\wizardex.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Infrastructure"
+			>
+			<File
+				RelativePath="..\clientgui\BOINCBaseFrame.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCBaseFrame.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCClientManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCClientManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCDialupManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCDialupManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\browser.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\browser.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\hyperlink.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\hyperlink.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\Localization.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\Localization.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\LogBOINC.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\LogBOINC.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\SkinManager.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\SkinManager.h"
+				>
+			</File>
+			<Filter
+				Name="FlatNotebook"
+				>
+				<File
+					RelativePath="..\clientgui\common\wxFlatNotebook.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxFlatNotebook.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxFlatNotebookImages.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxFNBDropTarget.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Validators"
+				>
+				<File
+					RelativePath="..\clientgui\ValidateAccountKey.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateAccountKey.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateEmailAddress.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateEmailAddress.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateURL.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ValidateURL.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Dialogs"
+				>
+				<File
+					RelativePath="..\clientgui\DlgExitMessage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgExitMessage.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgGenericMessage.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgGenericMessage.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Advanced"
+			>
+			<File
+				RelativePath="..\clientgui\AdvancedFrame.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\AdvancedFrame.h"
+				>
+			</File>
+			<Filter
+				Name="Views"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCListCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCListCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCTaskCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCTaskCtrl.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewMessages.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewMessages.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewProjects.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewProjects.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewResources.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewResources.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewStatistics.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewStatistics.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewTransfers.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewTransfers.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewWork.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\ViewWork.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\BOINCBaseView.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\BOINCBaseView.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAbout.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAbout.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferences.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferences.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferencesBase.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgAdvPreferencesBase.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgItemProperties.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgItemProperties.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgOptions.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgOptions.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgSelectComputer.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\DlgSelectComputer.h"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxPieCtrl.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\common\wxPieCtrl.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Taskbar"
+			>
+			<File
+				RelativePath="..\clientgui\BOINCTaskBar.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\BOINCTaskBar.h"
+				>
+			</File>
+			<Filter
+				Name="Infrastructure"
+				>
+				<File
+					RelativePath="..\clientgui\msw\taskbarex.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\msw\taskbarex.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Document"
+			>
+			<File
+				RelativePath="..\clientgui\MainDocument.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientgui\MainDocument.h"
+				>
+			</File>
+			<Filter
+				Name="Support"
+				>
+				<File
+					RelativePath="..\clientgui\AsyncRPC.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\clientgui\AsyncRPC.h"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client.h"
+					>
+				</File>
+				<File
+					RelativePath="..\lib\gui_rpc_client_ops.cpp"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<File
+			RelativePath="..\clientgui\_wx_intellisense.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\BOINCGUIApp.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\BOINCGUIApp.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\Events.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\resource.h"
+			>
+		</File>
+		<File
+			RelativePath="..\clientgui\stdwx.cpp"
+			>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Samples - Release|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Unicode - Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Unicode - Debug|x64"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					UsePrecompiledHeader="1"
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\clientgui\stdwx.h"
+			>
+		</File>
+	</Files>
+	<Globals>
+		<Global
+			Name="RESOURCE_FILE"
+			Value="..\clientgui\BOINCGUIApp.rc"
+		/>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/wcg_ss_app.vcproj b/win_build/wcg_ss_app.vcproj
new file mode 100644
index 0000000..170a028
--- /dev/null
+++ b/win_build/wcg_ss_app.vcproj
@@ -0,0 +1,870 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="ss_app"
+	ProjectGUID="{C3163ACA-C2E6-49D2-AA21-B8B953331EF7}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_WCG"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4305;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_WCG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib glaux.lib odbc32.lib odbccp32.lib wsock32.lib libcmt.lib libcpmt.lib advapi32.lib gdi32.lib user32.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				DisableSpecificWarnings="4305;4244"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib delayimp.lib wsock32.lib wininet.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				DisableSpecificWarnings="4305;4244"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib delayimp.lib wsock32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4305;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib gdi32.lib advapi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib delayimp.lib wsock32.lib libcmt.lib libcpmt.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4305;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="opengl32.lib glu32.lib glaux.lib odbc32.lib odbccp32.lib wsock32.lib libcmt.lib libcpmt.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4305;4244"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib delayimp.lib wsock32.lib advapi32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4305;4244"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib delayimp.lib wsock32.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Samples - Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;..;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				DisableSpecificWarnings="4305;4244"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories=".."
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib gdi32.lib advapi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib delayimp.lib wsock32.lib libcmt.lib libcpmt.lib $(NOINHERIT)"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\boincscr.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\lib\gui_rpc_client.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\lib\gui_rpc_client_ops.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\ss_app.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="..\clientscr\boinc_ss_opengl.rc"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\clientscr\boinc_ss_opengl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\clientscr\ss_app.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/win-config.h b/win_build/win-config.h
new file mode 100644
index 0000000..3d34dbc
--- /dev/null
+++ b/win_build/win-config.h
@@ -0,0 +1,346 @@
+// Copyright 2003 Regents of the University of California
+
+// SETI_BOINC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2, or (at your option) any later
+// version.
+
+// SETI_BOINC is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+// more details.
+
+// You should have received a copy of the GNU General Public License along
+// with SETI_BOINC; see the file COPYING.  If not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/* config.h.  Generated by configure.  */
+
+#ifndef _SAH_WIN_CONFIG_H_
+#define _SAH_WIN_CONFIG_H_
+
+/* Define to 1 if you have the atanf() function */
+#define HAVE_ATANF 1
+
+/* Define to 1 if you have the `atexit' function. */
+#define HAVE_ATEXIT 1
+
+/* Define to 1 if you have the `atoll' function. */
+#define HAVE_ATOLL 0
+
+/* Define to 1 if the system has the type `bool'. */
+#define HAVE_BOOL 1
+
+/* Define to 1 if you have the cosf() function */
+#define HAVE_COSF 1
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H 0
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `floor' function. */
+#define HAVE_FLOOR 1
+
+/* Define to 1 if you have the `fork' function. */
+#define HAVE_FORK 0
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the <GLUT/glut.h> header file. */
+#define HAVE_GLUT_GLUT_H 1
+
+/* Define to 1 if you have the <glut.h> header file. */
+#define HAVE_GLUT_H 1
+
+/* Define to 1 if you have the <glu.h> header file. */
+/* #undef HAVE_GLU_H */
+
+/* Define to 1 if you have the <GL/glut.h> header file. */
+/* #undef HAVE_GL_GLUT_H */
+
+/* Define to 1 if you have the <GL/glu.h> header file. */
+#define HAVE_GL_GLU_H 1
+
+/* Define to 1 if you have the <GL/gl.h> header file. */
+#define HAVE_GL_GL_H 1
+
+/* Define to 1 if you have the <gl.h> header file. */
+#define HAVE_GL_H 0
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 0
+
+/* Define to 1 if you have the `aio' library (-laio). */
+#define HAVE_LIBAIO 0
+
+/* Define to 1 if you have the `dl' library (-ldl). */
+#define HAVE_LIBDL 0
+
+/* Define to 1 if you have the `elf' library (-lelf). */
+#define HAVE_LIBELF 0
+
+/* Define to 1 if you have the `fftw' library (-lfftw). */
+#define HAVE_LIBFFTW 0
+
+/* Define to 1 if you have the `GL' library (-lGL). */
+#define HAVE_LIBGL 1
+
+/* Define to 1 if you have the `ICE' library (-lICE). */
+#define HAVE_LIBICE 0
+
+/* Define to 1 if you have the `m' library (-lm). */
+#define HAVE_LIBM 1
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#define HAVE_LIBNSL 0
+
+/* Define to 1 if you have the `rsaeuro' library (-lrsaeuro). */
+#define HAVE_LIBRSAEURO 0
+
+/* Define to 1 if you have the `s4' library (-ls4). */
+#define HAVE_LIBS4 0
+
+/* Define to 1 if you have the `SM' library (-lSM). */
+#define HAVE_LIBSM 0
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+#define HAVE_LIBSOCKET 0
+
+/* Define to 1 if you have the `stdc++' library (-lstdc++). */
+#define HAVE_LIBSTDC__ 0
+
+/* Define to 1 if you have the `X11' library (-lX11). */
+#define HAVE_LIBX11 0
+
+/* Define to 1 if you have the `Xaw' library (-lXaw). */
+#define HAVE_LIBXAW 0
+
+/* Define to 1 if you have the `Xext' library (-lXext). */
+#define HAVE_LIBXEXT 0
+
+/* Define to 1 if you have the `Xmu' library (-lXmu). */
+#define HAVE_LIBXMU 0
+
+/* Define to 1 if you have the `Xt' library (-lXt). */
+#define HAVE_LIBXT 0
+
+/* Define to 1 if you have the `z' library (-lz). */
+#define HAVE_LIBZ 0
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if long double works and has more range or precision than
+   double. */
+#define HAVE_LONG_DOUBLE 1
+
+/* Define to 1 if the system has the type `long long'. */
+/* #undef HAVE_LONG_LONG */
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#define HAVE_MALLOC 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the `munmap' function. */
+#define HAVE_MUNMAP 0
+
+/* Define if your C++ compiler supports namespaces */
+#define HAVE_NAMESPACES 1
+
+/* Define to 1 if you have the <OpenGL/glut.h> header file. */
+#define HAVE_OPENGL_GLUT_H 0
+
+/* Define to 1 if you have the <OpenGL/glu.h> header file. */
+#define HAVE_OPENGL_GLU_H 0
+
+/* Define to 1 if you have the <OpenGL/gl.h> header file. */
+#define HAVE_OPENGL_GL_H 0
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#define HAVE_REALLOC 1
+
+/* Define to 1 if you have the sinf() function */
+#define HAVE_SINF 1
+
+/* Define to 1 if you have the `sqrt' function. */
+#define HAVE_SQRT 1
+
+/* Define to 1 if `stat' has the bug that it succeeds when given the
+   zero-length file name argument. */
+#define HAVE_STAT_EMPTY_STRING_BUG 0
+
+#if ( _MSC_VER > 1300 )
+  /* Define to 1 if the max template is in namespace std. */
+  #define HAVE_STD_MAX 1
+
+  /* Define to 1 if the min template is in namespace std. */
+  #define HAVE_STD_MIN 1
+#endif
+
+/* Define to 1 if the transform template is in namespace std. */
+#define HAVE_STD_TRANSFORM 1
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#define HAVE_STDBOOL_H 0
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 0
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 0
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strstr' function. */
+#define HAVE_STRSTR 1
+
+/* Define to 1 if `st_blocks' is member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_BLOCKS 0
+
+/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
+   `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
+#define HAVE_ST_BLOCKS 0
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 0
+
+/* Define to 1 if you have the <sys/statvfs.h> header file. */
+#define HAVE_SYS_STATVFS_H 0
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 0
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 0
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 0
+
+/* Define to 1 if you have the `vfork' function. */
+#define HAVE_VFORK 0
+
+/* Define to 1 if you have the <vfork.h> header file. */
+/* #undef HAVE_VFORK_H 0 */
+
+/* Define to 1 if `fork' works. */
+#define HAVE_WORKING_FORK 0
+
+/* Define to 1 if `vfork' works. */
+#define HAVE_WORKING_VFORK 0
+
+/* Define to 1 if the system has the type `_Bool'. */
+/* #undef HAVE__BOOL 0 */
+
+/* Define to 1 if the system has the type `_int64'. */
+#define HAVE__INT64 0
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+   slash. */
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 0
+
+/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
+   */
+#define MAJOR_IN_MKDEV 1
+
+/* Define to 1 if `major', `minor', and `makedev' are declared in
+   <sysmacros.h>. */
+#define MAJOR_IN_SYSMACROS 0
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "ports at setiathome.ssl.berkeley.edu"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "setiathome"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "setiathome 4.00"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "setiathome"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "4.00"
+
+/* The size of a `long double', as computed by sizeof. */
+#define SIZEOF_LONG_DOUBLE sizeof (long double)
+
+/* The size of a `long int', as computed by sizeof. */
+#define SIZEOF_LONG_INT 4
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#define TM_IN_SYS_TIME 0
+
+/* Define to 1 if informix is installed */
+#define USE_INFORMIX 0
+
+/* Define if MYSQL is installed */
+#define USE_MYSQL 0
+
+/* SETI at home major version number */
+#define VERSION_MAJOR 4
+
+/* SETI at home minor version number */
+#define VERSION_MINOR 18
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing
+   if it is not supported. */
+/* #undef inline */
+
+/* Define to rpl_malloc if the replacement function should be used. */
+/* #undef malloc */
+
+/* Define to `long' if <sys/types.h> does not define. */
+/* #undef off_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef pid_t */
+
+/* Define to rpl_realloc if the replacement function should be used. */
+/* #undef realloc */
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define as `fork' if `vfork' does not work. */
+/* #undef vfork */
+
+#if defined(USE_INFORMIX) && defined(USE_MYSQL) && defined(HAVE_NAMESPACES)
+#define USE_NAMESPACES
+#endif
+
+#endif
diff --git a/win_build/worker.vcproj b/win_build/worker.vcproj
new file mode 100644
index 0000000..0c79512
--- /dev/null
+++ b/win_build/worker.vcproj
@@ -0,0 +1,440 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="worker"
+	ProjectGUID="{F1BE6109-586D-448E-8C5B-D5C2CB874EA2}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\worker_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\worker_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\worker_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\worker_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib ole32.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\worker_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\worker_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib ole32.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\worker_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\worker_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\samples\worker\worker.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/wrapper.vcproj b/win_build/wrapper.vcproj
new file mode 100644
index 0000000..44bd254
--- /dev/null
+++ b/win_build/wrapper.vcproj
@@ -0,0 +1,440 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="wrapper"
+	ProjectGUID="{F243B93C-73CB-44E7-9BDC-847BB95A27CA}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib ole32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrapper_25353_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrapper_25353_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib ole32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrapper_25353_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrapper_25353_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib ole32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrapper_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrapper_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib ole32.lib psapi.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrapper_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrapper_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\samples\wrapper\wrapper.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/win_build/wrappture_example.vcproj b/win_build/wrappture_example.vcproj
new file mode 100644
index 0000000..df65cae
--- /dev/null
+++ b/win_build/wrappture_example.vcproj
@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="wrappture_example"
+	ProjectGUID="{D9AF7F68-B881-45B1-A41C-B10E61D764EF}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrappture_example_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrappture_example_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="false"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles="boinc_win.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib libcpmt.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrappture_example_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrappture_example_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib ole32.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrappture_example_6.1_windows_intelx86.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrappture_example_6.1_windows_intelx86.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory=".\Build\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=""
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../;../api;../lib;../samples/image_libs;../samples/jpeglib;../samples/glut;../coprocs/OpenCL/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough="boinc_win.h"
+				PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="2"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib ole32.lib"
+				OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrappture_example_6.1_windows_x86_64.exe"
+				LinkIncremental="0"
+				SuppressStartupBanner="true"
+				IgnoreAllDefaultLibraries="true"
+				DelayLoadDLLs=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Build\$(PlatformName)\$(ConfigurationName)\wrappture_example_6.1_windows_x86_64.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\samples\wrappture\wrappture.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\samples\wrappture\wrappture_example.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\samples\wrappture\wrappture.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/zip/configure b/zip/configure
new file mode 100644
index 0000000..95531a0
--- /dev/null
+++ b/zip/configure
@@ -0,0 +1,7563 @@
+#! /bin/sh
+# From configure.ac Revision: 1.3 .
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for BOINC_ZIP 1.00.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+#
+#
+# The contents of this file are subject to the BOINC Public License
+# Version 1.0 (the "License"); you may not use this file except in
+# compliance with the License. You may obtain a copy of the License at
+# http://boinc.berkeley.edu/license_1.0.txt
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+# License for the specific language governing rights and limitations
+# under the License.
+#
+# The Original Code is the Berkeley Open Infrastructure for Network Computing.
+#
+# The Initial Developer of the Original Code is the SETI at home project.
+# Portions created by the SETI at home project are Copyright (C) 2002
+# University of California at Berkeley. All Rights Reserved.
+#
+# Contributor(s):  Carl Christensen
+#
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='BOINC_ZIP'
+PACKAGE_TARNAME='boinc_zip'
+PACKAGE_VERSION='1.00'
+PACKAGE_STRING='BOINC_ZIP 1.00'
+PACKAGE_BUGREPORT=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAJOR_VERSION MINOR_VERSION CLIENT_BIN_FILENAME TOP_BUILD_DIR TOP_SOURCE_DIR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP RANLIB ac_ct_RANLIB EGREP LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures BOINC_ZIP 1.00 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of BOINC_ZIP 1.00:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+BOINC_ZIP configure 1.00
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+
+
+The contents of this file are subject to the BOINC Public License
+Version 1.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+http://boinc.berkeley.edu/license_1.0.txt
+
+Software distributed under the License is distributed on an "AS IS"
+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+License for the specific language governing rights and limitations
+under the License.
+
+The Original Code is the Berkeley Open Infrastructure for Network Computing.
+
+The Initial Developer of the Original Code is the SETI at home project.
+Portions created by the SETI at home project are Copyright (C) 2002
+University of California at Berkeley. All Rights Reserved.
+
+Contributor(s):  Carl Christensen
+
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by BOINC_ZIP $as_me 1.00, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+echo "--- Configuring BOINC 1.00 ---"
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+  ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+am__api_version="1.8"
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # Keeping the `.' argument allows $(mkdir_p) to be used without
+  # argument.  Indeed, we sometimes output rules like
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.
+  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
+  # expensive solution, as it forces Make to start a sub-shell.)
+  mkdir_p='mkdir -p -- .'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='boinc_zip'
+ VERSION='1.00'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+
+
+
+
+## AC_CONFIG_SRCDIR(lib/shmem.C)
+
+
+
+
+
+MAJOR_VERSION=`echo 1.00 | sed 's/\..*//'`
+
+MINOR_VERSION=`echo 1.00 | sed 's/.*\.0*//'`
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define MAJOR_VERSION $MAJOR_VERSION
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define MINOR_VERSION $MINOR_VERSION
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define HOSTTYPE "$host"
+_ACEOF
+
+CLIENT_BIN_FILENAME=boinc_1.00_$host${EXEEXT}
+
+TOP_BUILD_DIR=`pwd`
+
+TOP_SOURCE_DIR=`(cd \`dirname "$0"\` && pwd)`
+
+
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
+    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval="$enable_maintainer_mode"
+  USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi;
+  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+	;;
+    conftest.$ac_ext )
+	# This is the source file.
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  export ac_cv_exeext
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+
+
+echo "$as_me:$LINENO: checking for main in -lgen" >&5
+echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
+if test "${ac_cv_lib_gen_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgen  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_gen_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gen_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
+echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
+if test $ac_cv_lib_gen_main = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGEN 1
+_ACEOF
+
+  LIBS="-lgen $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for sin in -lm" >&5
+echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_sin+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char sin ();
+int
+main ()
+{
+sin ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_m_sin=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_sin=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5
+echo "${ECHO_T}$ac_cv_lib_m_sin" >&6
+if test $ac_cv_lib_m_sin = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for gethostbyaddr in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyaddr in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyaddr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gethostbyaddr ();
+int
+main ()
+{
+gethostbyaddr ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_nsl_gethostbyaddr=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostbyaddr=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyaddr" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyaddr" >&6
+if test $ac_cv_lib_nsl_gethostbyaddr = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
+_ACEOF
+
+  LIBS="-lnsl $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for main in -lsocket" >&5
+echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_socket_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
+if test $ac_cv_lib_socket_main = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSOCKET 1
+_ACEOF
+
+  LIBS="-lsocket $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for main in -lstdc++" >&5
+echo $ECHO_N "checking for main in -lstdc++... $ECHO_C" >&6
+if test "${ac_cv_lib_stdcpp_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lstdc++  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_stdcpp_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_stdcpp_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_stdcpp_main" >&5
+echo "${ECHO_T}$ac_cv_lib_stdcpp_main" >&6
+if test $ac_cv_lib_stdcpp_main = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSTDC__ 1
+_ACEOF
+
+  LIBS="-lstdc++ $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for gzopen in -lz" >&5
+echo $ECHO_N "checking for gzopen in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_gzopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gzopen ();
+int
+main ()
+{
+gzopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_z_gzopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_z_gzopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzopen" >&5
+echo "${ECHO_T}$ac_cv_lib_z_gzopen" >&6
+if test $ac_cv_lib_z_gzopen = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+fi
+
+
+
+
+
+
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+  echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char opendir ();
+int
+main ()
+{
+opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_search_opendir="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+  for ac_lib in dir; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char opendir ();
+int
+main ()
+{
+opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_search_opendir="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+fi
+
+else
+  echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char opendir ();
+int
+main ()
+{
+opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_search_opendir="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+  for ac_lib in x; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char opendir ();
+int
+main ()
+{
+opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_search_opendir="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+fi
+
+fi
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_sys_wait_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_sys_wait_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+if test $ac_cv_header_sys_wait_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_time=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in arpa/inet.h dirent.h fcntl.h malloc.h netdb.h netinet/in.h netinet/tcp.h signal.h strings.h sys/file.h sys/ipc.h sys/mount.h sys/resource.h sys/select.h sys/shm.h sys/socket.h sys/statvfs.h sys/statfs.h sys/swap.h sys/sysctl.h sys/systeminfo.h sys/time.h sys/types.h sys/utsname.h sys/vmmeter.h sys/wait.h unistd.h errno.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the BOINC_ZIP lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+case "$target" in
+*-linux-* | *-sun-*)
+
+cat >>confdefs.h <<\_ACEOF
+#define GETSOCKOPT_SOCKLEN_T 1
+_ACEOF
+
+        ;;
+*sysv5OpenUNIX8*)
+
+cat >>confdefs.h <<\_ACEOF
+#define GETSOCKOPT_SIZE_T 1
+_ACEOF
+
+        ;;
+esac
+
+if test $ac_cv_c_compiler_gnu = yes; then
+    echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
+echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
+if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    ac_pattern="Autoconf.*'x'"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sgtty.h>
+Autoconf TIOCGETP
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then
+  ac_cv_prog_gcc_traditional=yes
+else
+  ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+  if test $ac_cv_prog_gcc_traditional = no; then
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <termio.h>
+Autoconf TCGETA
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then
+  ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+  fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
+echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
+  if test $ac_cv_prog_gcc_traditional = yes; then
+    CC="$CC -traditional"
+  fi
+fi
+
+
+for ac_func in vprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+echo "$as_me:$LINENO: checking for _doprnt" >&5
+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
+if test "${ac_cv_func__doprnt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define _doprnt innocuous__doprnt
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _doprnt (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef _doprnt
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char _doprnt ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub__doprnt) || defined (__stub____doprnt)
+choke me
+#else
+char (*f) () = _doprnt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != _doprnt;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func__doprnt=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func__doprnt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+echo "${ECHO_T}$ac_cv_func__doprnt" >&6
+if test $ac_cv_func__doprnt = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DOPRNT 1
+_ACEOF
+
+fi
+
+fi
+done
+
+
+echo "$as_me:$LINENO: checking for wait3 that fills in rusage" >&5
+echo $ECHO_N "checking for wait3 that fills in rusage... $ECHO_C" >&6
+if test "${ac_cv_func_wait3_rusage+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_wait3_rusage=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <stdio.h>
+/* HP-UX has wait3 but does not fill in rusage at all.  */
+int
+main ()
+{
+  struct rusage r;
+  int i;
+  /* Use a field that we can force nonzero --
+     voluntary context switches.
+     For systems like NeXT and OSF/1 that don't set it,
+     also use the system CPU time.  And page faults (I/O) for Linux.  */
+  r.ru_nvcsw = 0;
+  r.ru_stime.tv_sec = 0;
+  r.ru_stime.tv_usec = 0;
+  r.ru_majflt = r.ru_minflt = 0;
+  switch (fork ())
+    {
+    case 0: /* Child.  */
+      sleep(1); /* Give up the CPU.  */
+      _exit(0);
+      break;
+    case -1: /* What can we do?  */
+      _exit(0);
+      break;
+    default: /* Parent.  */
+      wait3(&i, 0, &r);
+      /* Avoid "text file busy" from rm on fast HP-UX machines.  */
+      sleep(2);
+      exit (r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
+	    && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
+    }
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_wait3_rusage=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_wait3_rusage=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_wait3_rusage" >&5
+echo "${ECHO_T}$ac_cv_func_wait3_rusage" >&6
+if test $ac_cv_func_wait3_rusage = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WAIT3 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in gethostname gettimeofday mkdir select socket strstr uname lockf flock strftime setpriority wait4 strlcpy strlcat
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset x;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *ccp;
+  char **p;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  ccp = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++ccp;
+  p = (char**) ccp;
+  ccp = (char const *const *) p;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+  }
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_const=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+  return 0;
+if (sizeof (size_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_size_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_size_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6
+if test $ac_cv_type_size_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
+if test "${ac_cv_struct_tm+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm *tp; tp->tm_sec;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_struct_tm=time.h
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_struct_tm=sys/time.h
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+echo "${ECHO_T}$ac_cv_struct_tm" >&6
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
+if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (ac_aggr.tm_zone)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_tm_tm_zone=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (sizeof ac_aggr.tm_zone)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_tm_tm_zone=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_tm_tm_zone=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
+if test $ac_cv_member_struct_tm_tm_zone = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TM_TM_ZONE 1
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TM_ZONE 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: checking for tzname" >&5
+echo $ECHO_N "checking for tzname... $ECHO_C" >&6
+if test "${ac_cv_var_tzname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <time.h>
+#ifndef tzname /* For SGI.  */
+extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
+#endif
+
+int
+main ()
+{
+atoi(*tzname);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_var_tzname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_var_tzname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+echo "${ECHO_T}$ac_cv_var_tzname" >&6
+  if test $ac_cv_var_tzname = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TZNAME 1
+_ACEOF
+
+  fi
+fi
+
+
+# by default, create static binaries on linux.
+#[if [ "$target_os" = "linux-gnu" ]; then
+#    STATIC_FLAGS="-static"
+#fi
+#echo "checking static flags... ${STATIC_FLAGS:-(none)}"]
+#AC_SUBST(STATIC_FLAGS)
+
+          ac_config_files="$ac_config_files Makefile"
+
+
+          ac_config_headers="$ac_config_headers config.h"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by BOINC_ZIP $as_me 1.00, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+BOINC_ZIP config.status 1.00
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at target@,$target,;t t
+s, at target_cpu@,$target_cpu,;t t
+s, at target_vendor@,$target_vendor,;t t
+s, at target_os@,$target_os,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at CYGPATH_W@,$CYGPATH_W,;t t
+s, at PACKAGE@,$PACKAGE,;t t
+s, at VERSION@,$VERSION,;t t
+s, at ACLOCAL@,$ACLOCAL,;t t
+s, at AUTOCONF@,$AUTOCONF,;t t
+s, at AUTOMAKE@,$AUTOMAKE,;t t
+s, at AUTOHEADER@,$AUTOHEADER,;t t
+s, at MAKEINFO@,$MAKEINFO,;t t
+s, at AMTAR@,$AMTAR,;t t
+s, at install_sh@,$install_sh,;t t
+s, at STRIP@,$STRIP,;t t
+s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s, at mkdir_p@,$mkdir_p,;t t
+s, at AWK@,$AWK,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at am__leading_dot@,$am__leading_dot,;t t
+s, at MAJOR_VERSION@,$MAJOR_VERSION,;t t
+s, at MINOR_VERSION@,$MINOR_VERSION,;t t
+s, at CLIENT_BIN_FILENAME@,$CLIENT_BIN_FILENAME,;t t
+s, at TOP_BUILD_DIR@,$TOP_BUILD_DIR,;t t
+s, at TOP_SOURCE_DIR@,$TOP_SOURCE_DIR,;t t
+s, at MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s, at MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s, at MAINT@,$MAINT,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at DEPDIR@,$DEPDIR,;t t
+s, at am__include@,$am__include,;t t
+s, at am__quote@,$am__quote,;t t
+s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s, at CCDEPMODE@,$CCDEPMODE,;t t
+s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s, at CXX@,$CXX,;t t
+s, at CXXFLAGS@,$CXXFLAGS,;t t
+s, at ac_ct_CXX@,$ac_ct_CXX,;t t
+s, at CXXDEPMODE@,$CXXDEPMODE,;t t
+s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
+s, at CPP@,$CPP,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at EGREP@,$EGREP,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X$ac_file : 'X\(//\)[^/]' \| \
+	 X$ac_file : 'X\(//\)$' \| \
+	 X$ac_file : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+echo "--- Configured BOINC 1.00 ---"
+
+
+true || $TOP_SOURCE_DIR/test/test_sanity.py || (
+    cat <<EOF
+
+******************************************************************************
+**
+** The framework sanity check failed.
+**
+** If you only want to compile (and run) the client or compile (and run) the
+** server, this may be okay.
+**
+** If you are developing BOINC and want to run the automated tests, you need a
+** MySQL server installed and running, with permission to create databases.
+**
+** You can run this sanity check using test/test_sanity.py
+**
+******************************************************************************
+
+EOF
+
+)
+

-- 
BOINC packaging



More information about the pkg-boinc-commits mailing list